1

我一直在试图弄清楚是否可以为每个条形图/线形标记放置准确的值。

当前结果: 在此处输入图像描述

期望的结果: 在此处输入图像描述

4

1 回答 1

0

在 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);
于 2020-06-16T11:08:02.783 回答