Reputation: 4393
I've been trying to figure out if it is possible to put the exact value for each Bar/Line Marker.
Current Result :
Desired Result :
Upvotes: 1
Views: 735
Reputation: 342
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);
Upvotes: 0