Scrolling past data set
Posted: Mon Aug 27, 2012 7:56 pm
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!
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!