0

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

Frederic
  • 2,015
  • 4
  • 20
  • 37

1 Answers1

1

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?

Slaw
  • 37,820
  • 8
  • 53
  • 80
  • Yes, that did what I was looking for thanks ! Here is the code I ended up using : ValueAxis3D valueAxis3D = plot.getValueAxis(); valueAxis3D.setRange(200, 500); – Frederic May 11 '18 at 15:21