Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 925 - ArrayIndexOutOfBoundsException when unzooming a chart with a CustomAxis created after zooming
Summary: ArrayIndexOutOfBoundsException when unzooming a chart with a CustomAxis creat...
Status: RESOLVED FIXED
Alias: None
Product: Java TeeChart
Classification: Unclassified
Component: Axes (show other bugs)
Version: unspecified
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Steema Issue Manager
URL: http://www.teechart.net/support/viewt...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-18 05:52 EDT by yeray alonso
Modified: 2014-09-18 05:57 EDT (History)
0 users

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yeray alonso 2014-09-18 05:52:31 EDT
First zoom in, push the button and then zoom out to reproduce an ArrayIndexOutOfBoundsException.

tChart1.getAspect().setView3D(false);

Line l = new Line(tChart1.getChart());
l.fillSampleValues();

Button b = new Button(tChart1.getParent(), SWT.NONE);
b.setText("First zoom in, push this button and then zoom out to reproduce an ArrayIndexOutOfBoundsException.");
b.addSelectionListener(new SelectionAdapter() {
	@Override
	public void widgetSelected(SelectionEvent e) {
		Axis teeVerticalAxis = new com.steema.teechart.axis.Axis(tChart1.getChart());
		teeVerticalAxis.getGrid().setVisible(false);
		teeVerticalAxis.getTitle().setText("TestAxis");
		tChart1.getAxes().getCustom().add(teeVerticalAxis);

		Line l1 = new Line(tChart1.getChart());
		l1.fillSampleValues();
		l1.setCustomVertAxis(teeVerticalAxis);
		l1.setCustomHorizAxis(tChart1.getAxes().getBottom());

	}
});
Comment 1 yeray alonso 2014-09-18 05:57:39 EDT
restoreScales at Chart.java corrected to loop into AxisSavedScales array, not into all the axes.