Closed yuexuanchen closed 2 years ago
Java 版本的写法:
public static AAOptions configureBoxplotChartWithSpecialStyle() {
AAChartModel aaChartModel = new AAChartModel()
.chartType(AAChartType.Boxplot)//图表类型
.title("BOXPLOT CHART")//图表主标题
.subtitle("virtual data")//图表副标题
.yAxisTitle("℃")//设置 Y 轴标题
.yAxisVisible(true)//设置 Y 轴是否可见
.series(new AASeriesElement[]{
new AASeriesElement()
.name("Observed Data")
.color("#ef476f")
.fillColor("#04d69f")
.data(new Object[][]{
{760, 801, 848, 895, 965},
{733, 853, 939, 980, 1080},
{714, 762, 817, 870, 918},
{724, 802, 806, 871, 950},
{834, 836, 864, 882, 910}
}),
});
AAOptions aaOptions = aaChartModel.aa_toAAOptions();
aaOptions.plotOptions
.boxplot(new AABoxplot()
.boxDashStyle(AAChartLineDashStyleType.Dash)
.fillColor("#F0F0E0")
.lineWidth(2)
.medianColor("#0C5DA5")
.medianDashStyle(AAChartLineDashStyleType.ShortDot)
.medianWidth(3)
.stemColor("#A63400")
.stemDashStyle(AAChartLineDashStyleType.Dot)
.stemWidth(1)
.whiskerColor("#3D9200")
.whiskerDashStyle(AAChartLineDashStyleType.Solid)
.whiskerLength("60%")
.whiskerWidth(6)
);
aaOptions.plotOptions.series
.pointWidth(100);
return aaOptions;
}
备注:
新增的 AABoxplot
需要更新 AAChartCore 至最新内容, 方可使用.
请问箱线图顶部和底部的横线样式有开放的方法可以直接控制样式吗?