[英]How to set the proportion of a bar(in y-axis) in a mpandroidchart barchart
[英]How to control the increments of values on the Y-Axis of BarChart
因此,这就是我最终使这些值平方的方法,包括动态设置RangeAxis范围。 我还根据@FredK的建议删除了3d元素。 我正在使用DefaultCategoryDataSet(图为CategoryPlot),因此以下代码适用于这些条件...
LogAxis yAxis = new LogAxis("Transaction Time (ms)");
yAxis.setBase(10);
plot.setRangeAxis(yAxis);
yAxis.setTickUnit(new NumberTickUnit(1));
yAxis.setMinorTickMarksVisible(true);
yAxis.setAutoRange(true);
plot.setRangeAxis(yAxis);
plot.getRangeAxis().setLabelFont(new Font("SansSerif", Font.BOLD, 14));
plot.getRangeAxis().setTickLabelFont(new Font("SansSerif", Font.BOLD, 12));
Double maximum = (Double) DatasetUtilities.findMaximumRangeValue(dataset);
plot.getRangeAxis().setLowerBound(10);
plot.getRangeAxis().setUpperBound(maximum * 1.6);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.