Hi
We have been using the TeeChart Active X component for some years now. Now moving to the .Net version, a couple of issues have arisen.
As we often use multiple y-axes, we only use custom y-axes to be able to treat all in the same manner. Also we at all time only have one x-axis, in DateTime units. This is also a custom axis.
Perhaps I should also mention that when the user performs a zoom-gesture the zoomed area is shown in a separate window. Please see below
Now using
Steema.TeeChart.TChart.Zoom.ZoomRect(new Rectangle(x, y, width, height));
causes some problems. When zooming into a small time span the charts x-alignment goes off center
Doing exactly the same, but for a larger user defined zoom rectangle, everything look as expected.
At first I thought that perhaps it was the zoom rectangle height/width ratio. But even ensuring that the zoom rectangle has the same height/width ratio as the whole chart, does not seem to help.
Another thing. Depending on how much the user zooms, the spreading of the x-axis grid becomes nonlinear somehow:
I’m a little lost for ideas, could you please advice?
Best Regards
Christian
Multiple custom y-axes and zooming
Re: Multiple custom y-axes and zooming
Hello Christian,
Could you try arrange a simple project a simple example project we can run as-is to reproduce exactly the problem here?
Thanks,
Could you try arrange a simple project a simple example project we can run as-is to reproduce exactly the problem here?
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Multiple custom y-axes and zooming
Hi Sandra,
Yep sure. As I saied, we used to use your Active X component. In order to change a minimum of our orginal software, we have made a wapper project. I’ll upload that.
Please be aware that zooming for now only is done in the “Custom Zooming” region, ultimate by the
private void CustomZoomInInternal(object sender, EventArgs e)
method.
Please let me know if you need anything else.
BR
Christian
Yep sure. As I saied, we used to use your Active X component. In order to change a minimum of our orginal software, we have made a wapper project. I’ll upload that.
Please be aware that zooming for now only is done in the “Custom Zooming” region, ultimate by the
private void CustomZoomInInternal(object sender, EventArgs e)
method.
Please let me know if you need anything else.
BR
Christian
- Attachments
-
- Ellab.Charting.zip
- TeeChart wapper project
- (40.8 KiB) Downloaded 474 times
Re: Multiple custom y-axes and zooming
Hello Christian,
On the other hand, I couldn't run your project,because this has lost:
I am gratetful if you could you explain because if you only have one x-axis, you need a x-custom axis? I think is more easy use default bottom axis and I recommend it.Another thing. Depending on how much the user zooms, the spreading of the x-axis grid becomes nonlinear somehow:
On the other hand, I couldn't run your project,because this has lost:
- - properties folder.
-Ellab.Debug
-Ellab.Utilities
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Multiple custom y-axes and zooming
Hi again Sandra,
Thanks for your swift reply, and sorry – I see now that what I attached earlier, was kind of useless
Anyhow – I’ve attached a simple Windows Forms VS2010 solution (ChartingSandbox.zip), taking use of our wapper class, and which will clearly show my problem. Just add your TeeChart.dll to the .. \ChartingSandbox\Ellab.Charting\DLL folder and it should build and run. Please let me know it you have any problems.
In the app, zoom in to approx 15 sec, and the series x-axis values are misaligned. Also the x-axis grid is not evenly spread. Both issues, as shown below..
Oh - and by the way - the data added to the chart, can be viewed by clicking the 'Show Data' button.
We decided to use a custom x-axis, as this would enable us, at a later date, to introduce multiple x-axes without having to keep track on which was the bottom axis and which was the custom ones. Same philosophy as with the y-axes actually.
Thanks for your swift reply, and sorry – I see now that what I attached earlier, was kind of useless
Anyhow – I’ve attached a simple Windows Forms VS2010 solution (ChartingSandbox.zip), taking use of our wapper class, and which will clearly show my problem. Just add your TeeChart.dll to the .. \ChartingSandbox\Ellab.Charting\DLL folder and it should build and run. Please let me know it you have any problems.
In the app, zoom in to approx 15 sec, and the series x-axis values are misaligned. Also the x-axis grid is not evenly spread. Both issues, as shown below..
Oh - and by the way - the data added to the chart, can be viewed by clicking the 'Show Data' button.
We decided to use a custom x-axis, as this would enable us, at a later date, to introduce multiple x-axes without having to keep track on which was the bottom axis and which was the custom ones. Same philosophy as with the y-axes actually.
- Attachments
-
- ChartingSandbox.zip
- (70.82 KiB) Downloaded 414 times
Re: Multiple custom y-axes and zooming
Hello Christian,
Seems the problem is that the rounding of axis labels. You can check this, adding milliseconds and changing label format as next lines of code:
Using it and doing zoom you will get next image:
If you calculate the difference of milliseconds there are between values of labels of bottom axis, these correspond approximately one second. I think that a good solution for you would be fixing the DateTimeSteps to a OneSecond as do in next line of code:
And you will get next image doing zoom that increments one second to one second:
Please, could you confirm us if our solution solve your problem?
I hope will helps.
Thanks,
Seems the problem is that the rounding of axis labels. You can check this, adding milliseconds and changing label format as next lines of code:
Code: Select all
this.chartControl.HorizontalAxis.LabelFormat = "hh:mm:ss:fff";
Code: Select all
this.chartControl.HorizontalAxis.Increment = Steema.TeeChart.Utils.GetDateTimeStep(Steema.TeeChart.DateTimeSteps.OneSecond);
I hope will helps.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Multiple custom y-axes and zooming
Hi Sandra,
Your a Sweetheart - thanks a million. This was exactly what I was looking for.
And sorry for the late reply - I just now saw that you had a solution for me.
Have a nice easter weekend.
Christian
Your a Sweetheart - thanks a million. This was exactly what I was looking for.
And sorry for the late reply - I just now saw that you had a solution for me.
Have a nice easter weekend.
Christian