我一直在试图弄清楚是否可以为每个条形图/线形标记放置准确的值。
当前结果:
期望的结果:
在 Xchart 库中,要获取每个条的计数,请使用注释。
CategoryChart chart = new CategoryChartBuilder()
.yAxisTitle("ABC Title")
.theme(Styler.ChartTheme.GGPlot2).build();
//each stack count and total count of each bar
chart.getStyler().setHasAnnotations(true);
chart.getStyler().setShowTotalAnnotations(true);
chart.getStyler().setAnnotationsPosition(1);