AAChartKit-Swift icon indicating copy to clipboard operation
AAChartKit-Swift copied to clipboard

大佬,字体粗细属性不生效。帮我看看

Open DeraDream opened this issue 2 years ago • 5 comments

此为饼图图例的代码,设置了font-weight为regular,但默认还是粗体,且对fontWeight反复设置bold和regular字体粗细看起来都没有任何变化。 `.legend(AALegend() .enabled(true) .floating(false) .itemStyle(AAItemStyle() .fontWeight(AAChartFontWeightType.regular) .color("#666666")) .align(.center) .verticalAlign(.bottom) .layout(.horizontal) .symbolHeight(10) .symbolWidth(10) .itemMarginTop(10) .itemWidth(100) .labelFormat("{name} {percentage:.2f}% ") .x(0)

                )`

IMG_1587

DeraDream avatar Aug 25 '22 07:08 DeraDream

折线图悬浮框的js代码设置font-weight不生效。 IMG_1588

`aaOptions.tooltip(AATooltip() .shared(true) .useHTML(true) .formatter(#""" function () { return this.points.reduce(function (s, point) { if (point.series.name == '1') { return s + '
' + '<span style=" color:#ECB917 ">● ' + point.y ; }else if (point.series.name == '2') { return s + '
' + '<span style=" color:#1678FD ">● ' + point.y ; }

                    }, '<b>' + '<span style=\" color:#999999; font-size:11px; font-Weight:regular\">' + this.x + '</span> '  + '</b>');
                }
            """#)

                             
        .valueDecimals(2)//设置取值精确到小数点后几位//设置取值精确到小数点后几位
        .backgroundColor("#FFFFFF")
        .borderColor("#00B029")
        .followTouchMove(true)
        
        .style(
            AAStyle()
                .color("#333333")
                .fontSize(12)
                .fontWeight(AAChartFontWeightType.regular)
                ))`

DeraDream avatar Aug 25 '22 07:08 DeraDream

悬浮框的8-21还是粗体。js代码<span style=" color:#999999; font-size:11px; font-Weight:regular"> color和font-size都生效了

DeraDream avatar Aug 25 '22 07:08 DeraDream

看看是不是大小写有问题

AAChartModel avatar Aug 25 '22 11:08 AAChartModel

折线图js里面的font-weight的大小写吗,试过了,不行, 饼图的是用itemStyle设置的,也不行

DeraDream avatar Aug 25 '22 11:08 DeraDream

因为你多加了个 < b >

losedMemory avatar Apr 15 '24 09:04 losedMemory