本站消息

站长简介/公众号

  出租广告位,需要合作请联系站长


+关注
已关注

分类  

暂无分类

标签  

暂无标签

日期归档  

暂无数据

Maximal values of axes in a GraphView

发布于2022-02-05 11:54     阅读(1127)     评论(0)     点赞(15)     收藏(1)


I have the following code:

LineGraphSeries<DataPoint> series = new LineGraphSeries<>(arr);
                graphView.addSeries(series);
                graphView.getViewport().setMaxX(31);
                graphView.getViewport().setMaxY(150);
                graphView.getViewport().setMinX(1);
                graphView.getViewport().setMinY(0);

I need to set maximal and minimal values of axises by this code, but when I run the program I have this values:

enter image description here

What's the matter?


解决方案


From javadoc:

Make sure to set the y bounds to manual via setYAxisBoundsManual(boolean)

So you must also add

graphView.getViewport().setYAxisBoundsManual(true);
graphView.getViewport().setXAxisBoundsManual(true);


所属网站分类: 技术文章 > 问答

作者:黑洞官方问答小能手

链接:http://www.javaheidong.com/blog/article/386757/29fff50d20c2f1313d56/

来源:java黑洞网

任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任

15 0
收藏该文
已收藏

评论内容:(最多支持255个字符)