简体   繁体   中英

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

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);

在此处输入图片说明

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

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM