AndroidPlot-使图形与X轴标签一起滚动 [英] AndroidPlot - Make graph scrollable along with x-axis labels

查看:78
本文介绍了AndroidPlot-使图形与X轴标签一起滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用AndroidPlot创建了折线图.
由于我已经了解了Domain值(x轴标签),因此我需要实现滚动.
在给出此示例的情况下,

I created a line graph with AndroidPlot.
Since I have got pleanty of Domain values(x-axis labels), I need to implement a scroll.
With this example given http://androidplot.com/docs/how-to-pan-zoom-and-scale/ , the graph scrolls, but the x-axis labels changes dynamically according to the scroll.
But I just need the entire x-axis values to get scrolled along with the graph.
Is this possible with HorizontalScrollview or any other help is appreciated....

推荐答案

网格线是相对于原点进行计算和绘制的.默认情况下,原点始终是最左侧的可见值,滚动时显然会改变. 要将网格锁定为特定值,请设置用户定义的原点:

The gridlines are calculated and drawn in relation to the origin. By default the origin is always the left most visible value, which obviously changes when scrolling. To have a grid locked to specific values set a user defined origin:

setUserDomainOrigin()    and    setUserRangeOrigin()

现在将根据该用户选择的原点计算并绘制网格及其值,并与固定原点一起滚动.

now the grid and it's values will be calculated and drawn in relation to this User chosen origin and scroll along with the fixed origin.

这篇关于AndroidPlot-使图形与X轴标签一起滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆