Hi,
I'm trying to create a chart that prevents scrolling past the end of a data set using v1 for Android. I've already read tutorial 8
http://www.steema.com/files/public/teec ... orial8.htm
The following example seems to be exactly what I want to do. Can anyone direct me to where this snippet of code was taken from, or a similar example?
private void Load() {
int range = com.steema.teechart.Utils.Round((bar1.getXValues().getMaximum() - bar1.getXValues().getMinimum() / 2));
bar1.fillSampleValues(20);
tChart1.getPanning().setAllow(ScrollModes.NONE);
jScrollBar1.setValue(range);
jScrollBar1.setMinimum(range - 50);
jScrollBar1.setMaximum(range + 50);
}
public void jScrollBar1_propertyChange(PropertyChangeEvent evt) {
tChart1.getAxes().getBottom().setAutomatic(false);
tChart1.getAxes().getBottom().setMinimum(jScrollBar1.getValue());
tChart1.getAxes().getBottom().setMaximum(jScrollBar1.getValue() + bar1.getCount());
}
Thanks!
Scrolling past data set
Re: Scrolling past data set
Hi,
The example you noticed is from an SWT/Swing project, not an Android one. And, the ScrollBars are substituted by ScrollViews in Android.
In Android you could use the PanData tool as in the features demo project included with TeeChart Java for Android.
To limit the scroll it allows, you should modify that tool manually.
The example you noticed is from an SWT/Swing project, not an Android one. And, the ScrollBars are substituted by ScrollViews in Android.
In Android you could use the PanData tool as in the features demo project included with TeeChart Java for Android.
To limit the scroll it allows, you should modify that tool manually.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |