AAChartKit icon indicating copy to clipboard operation
AAChartKit copied to clipboard

扇形状态百份比标签缺失

Open sonwa opened this issue 2 years ago • 0 comments

您好,以数量最大值排最前,百份比标签缺失请问怎样解决? 还有数值不同位置对部份标签有可能不显示问题

1655451262655 1655451210996 1655451142076

NSArray *dataArray = @[ @[@"浏览器1", @39], @[@"浏览器2", @1], @[@"浏览器3", @1], @[@"浏览器4", @1], @[@"浏览器5", @1], @[@"浏览器6", @1], ]; AAChartModel *aaChartModel= AAObject(AAChartModel) .chartTypeSet(AAChartTypePie) .dataLabelsEnabledSet(true)//是否直接显示扇形图数据 .animationDurationSet(@0) .legendEnabledSet(false) .seriesSet(@[ AASeriesElement.new .nameSet(@"统计") .colorsSet(@[ AARgbaColor(66, 133, 244, 1.0), AARgbaColor(66, 133, 244, 0.8), AARgbaColor(66, 133, 244, 0.6), AARgbaColor(66, 133, 244, 0.4), AARgbaColor(66, 133, 244, 0.2), AARgbaColor(66, 133, 244, 0.1), ]) .sizeSet((id)@"70%")//尺寸大小 .innerSizeSet(@"80%")//内部圆环半径大小占比 .borderWidthSet(@1)//描边的宽度 .allowPointSelectSet(false)//是否允许在点击数据点标记(扇形图点击选中的块发生位移) .dataSet(dataArray) .dataLabelsSet(AADataLabels.new .enabledSet(true) .useHTMLSet(true) .allowOverlapSet(true) .distanceSet(@30)//扇形图百分比线的长度 .formatSet(@"<span style=""color:#7B879A;font-weight:thin;font-size:13px"">{point.name}
<span style=""color:#172B4D;font-weight:bold;font-size:16px"">{point.percentage:.1f}
<span style=""color:#172B4D;font-weight:bold;font-size:16px"">%") ) ]);

/*图表视图对象调用图表模型对象,绘制最终图形*/
[_aaChartView aa_drawChartWithChartModel:aaChartModel];

sonwa avatar Jun 17 '22 07:06 sonwa