I am developing the stacked area chart and it is giving problem while plotting. I need to start and ends plotting with exact x axis values but currently my chart plotting with middle of the x axis value.
Current output:
Needs to ends and start with Type 3 position for red value.
enter code here:
chart.setBackgroundPaint(Color.white); final CategoryPlot plot = (CategoryPlot) chart.getPlot(); plot.setBackgroundPaint(Color.WHITE); plot.setDomainGridlinePaint(Color.white); plot.setRangeGridlinePaint(Color.white); final CategoryAxis domainAxis = plot.getDomainAxis(); domainAxis.setLowerMargin(0.0); domainAxis.setUpperMargin(0.0); final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis(); rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); final CategoryItemRenderer renderer = plot.getRenderer(); renderer.setItemLabelsVisible(true);