Is it possible to specify the range of the Y-Axis

117 Views Asked by At

I have my Area chart created in the code below

chart = Chart3DFactory.createAreaChart("", // Main title
                "", // Sub title
                dataset, null, "Date", // X-Axis legend
                "Time (seconds)"); // Y-Axis legend


        chart.setChartBoxColor(new Color(255, 255, 255, 127));
        chart.setLegendAnchor(LegendAnchor.BOTTOM_RIGHT);
        CategoryPlot3D plot = (CategoryPlot3D) chart.getPlot();
        plot.setGridlinePaintForValues(Color.BLACK);
        chartViewer = new Chart3DViewer(chart);
        borderPane.setCenter(chartViewer);

enter image description here

My values in the graph are above 200 and I would like to specify the Axis to start at 200. I haven't found much documentation on the official website or Github. Does anyone know if it's possible ? Thanks

1

There are 1 best solutions below

1
Slaw On BEST ANSWER

I've never looked at this library before, so I'm sorry if this answer is incorrect.

I see that your plot is of the type CategoryPlot3D. This class has the method getValueAxis() which returns a ValueAxis3D object. The ValueAxis3D interface extends from the Axis3D interface. And this last interface has these two methods:

Where I believe the the latter method is just a convenience method so you do not have to create a Range object.

I hope this is what you were asking for?