AAChartKit-Swift
AAChartKit-Swift copied to clipboard
大佬,字体粗细属性不生效。帮我看看
此为饼图图例的代码,设置了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)
)`
折线图悬浮框的js代码设置font-weight不生效。
`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)
))`
悬浮框的8-21还是粗体。js代码<span style=" color:#999999; font-size:11px; font-Weight:regular"> color和font-size都生效了
看看是不是大小写有问题
折线图js里面的font-weight的大小写吗,试过了,不行, 饼图的是用itemStyle设置的,也不行
因为你多加了个 < b >