使用 JFreeChart 减少 MeterPlot 图表的面积
我正在使用 MeterPlot 创建一个图表,其中需要 6 个静态值。原来图把顶部的部分和侧面的部分都切掉了;我如何减少该区域?我已经尝试过这个:
public void draw(Graphics2D g2, Rectangle2D chartArea, Point anchor, ChartRenderingInfo info) {
chartArea.setRect(chartArea.getX(), chartArea.getY(),
chartArea.getWidth(), chartArea.getHeight() + 50);
super.draw(g2, chartArea, anchor, info);
}
它对我不起作用。正如你所看到的,图像被切掉了;我需要它出来中心。
I'm creating a graph with MeterPlot
in which I need 6 static values. It turns out that the graph cuts the top part and the part of the sides; how do I reduce that area? I already tried with this:
public void draw(Graphics2D g2, Rectangle2D chartArea, Point anchor, ChartRenderingInfo info) {
chartArea.setRect(chartArea.getX(), chartArea.getY(),
chartArea.getWidth(), chartArea.getHeight() + 50);
super.draw(g2, chartArea, anchor, info);
}
It doesn't work for me. As you can see, the image comes out cut off; I need it to come out central.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论