jfreechart 线图 xy轴整数显示

xiaoxiao2026-05-20  21

XYPlot plotxy = chart.getXYPlot(); NumberAxis na= (NumberAxis)plotxy.getDomainAxis();//x轴整数显示 //NumberAxis na= (NumberAxis)plotxy.getRangeAxis();//y轴整数显示 na.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); 以上用于线图 CategoryPlot plotBar = chart.getCategoryPlot(); NumberAxis na= (NumberAxis)plotBar.getRangeAxis(); na.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); 这个可以用于饼状图。 相关资源:敏捷开发V1.0.pptx
转载请注明原文地址: https://www.6miu.com/read-5049060.html

最新回复(0)