1

I've been trying to figure out if it is possible to put the exact value for each Bar/Line Marker.

Current Result : enter image description here

Desired Result : enter image description here

blong
  • 2,815
  • 8
  • 44
  • 110
Michael 'Maik' Ardan
  • 4,213
  • 9
  • 37
  • 60

1 Answers1

0

In Xchart library, to get the count of each bar use annotations.

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);
Dheeraj
  • 332
  • 3
  • 4