I've created a chart with custom axes and a simple line that uses a vertical and a horizontal axis out of them. Next I zoomed in by calling the setAutomatic(false) and setMinMax(min, max) method provided by the Axis class. TeeChart zoomed in, but it behaves different in comparison to a normal zoom-in. It does not rescale the axis labels - why? How to rescale axis labels so that they do not overlap?
After debugging I found out, that after a normal zoom-in the method invalidate() is called next. So I also tried to call doInvalidate() on my teechart instance, but that didn't help. setMinorTickCount(arg0) and adjustMinMax() changed also nothing.
Any idea how to re-scale labels?
Thx for help
Overlapping labels after setMinMax() function at teechart ja
Re: Overlapping labels after setMinMax() function at teechart ja
Here is how you can reproduce it:
I need something like I get, when I scroll after this operations. After a scroll the labels re-scale properly.
Thx
Code: Select all
TChart chart = new TChart(parent, 0);
Line series = new Line(chart.getChart());
series.fillSampleValues(100);
chart.getAxes().getBottom().setAutomatic(false);
chart.getAxes().getBottom().setMinMax(0.0, 10.0);
chart.getAxes().getBottom().setMinMax(2.0, 5.0);
Thx
Re: Overlapping labels after setMinMax() function at teechart ja
Hi,
First of all note the setMinMax() function already sets automatic to false, so you don't need to call setAutomatic(false) before calling setMinMax().
Also, calling setMinMax() function twice, only the last call makes sense, and I don't see any different behaviour adding or removing the first one.
I've seen your code seems to produce a chart with overlapping labels int he bottom axis. That's strange because if I scroll the chart a bit, or I set a slightly different minimum and maximum, the overlap doesn't appear:
I've added it to the wish list to be revised for next releases (TJ71016731).
First of all note the setMinMax() function already sets automatic to false, so you don't need to call setAutomatic(false) before calling setMinMax().
Also, calling setMinMax() function twice, only the last call makes sense, and I don't see any different behaviour adding or removing the first one.
I've seen your code seems to produce a chart with overlapping labels int he bottom axis. That's strange because if I scroll the chart a bit, or I set a slightly different minimum and maximum, the overlap doesn't appear:
Code: Select all
tChart1.getAxes().getBottom().setMinMax(2.01, 5.01);
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Overlapping labels after setMinMax() function at teechart ja
Hi,
As a workaround, you could manually set an Increment as follows:
As a workaround, you could manually set an Increment as follows:
Code: Select all
tChart1.getAxes().getBottom().setIncrement(0.5);
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Overlapping labels after setMinMax() function at teechart ja
Thx, this solved my problem so far.