I would like to know if there is a way to draw series without an Y series. That series should be align with the pixel of the chartrect or a ratio of it.
Why i need something like that:
We use TChart to analyse Data we collected from Build Automation System. Usually, the X(bottom) axis is the time, the Y(Left) axis is the (kW,kWh,m³,l/h, etc...) and the Y(right) axis is the °C or °F for outdoor/indoor temp et... Often, we have other series that are On/Off data. I want to be able to show those data in the same graphic. My idea was to show the first one on the bottom using 10 pixel height and the next one over that one. So those one are pixel related and wont be screwed by the Y axis zoom and scale.
What i did try to do is:
Using a TList to put all my On/Off series in and removing them from the TChart (so they wont be draw automatically)
Then, on the AfterDraw of the TChart, i am painting them manually.
This is "good" but im having some speed issue and when i did that, i forgot my code was all based on the TChart. So im screw because there are too much stuff to change to work with that TList of mine.
Is there an exceptional way to get where i wish to go ? I know that most of the time, you guys did already made stuff that i havent heared of. So please, do as usual, and tell me TChart already manage that and point me where to look at to solve my problem.
Thanks a lot.
GoToXY
Drawing series without Y axis
Re: Drawing series without Y axis
Hi again
I though you may need more information. So there is a screeny of what i have done so far. I did paint the background to be easier to see the 2 lineSeries.
As i told you before, im using the TChart.Series for a lots of stuff (Live Reports, Saving the graphics into my DB, showing a table of values, etc..)
I though you may need more information. So there is a screeny of what i have done so far. I did paint the background to be easier to see the 2 lineSeries.
As i told you before, im using the TChart.Series for a lots of stuff (Live Reports, Saving the graphics into my DB, showing a table of values, etc..)
Re: Drawing series without Y axis
Oh well, im sorry to have bother you again. Sometimes, my brain just want to remake the world in its own way! Anyway, i just figure out that the only thing i had to do is to create a new kind of series from TSeriesLine and override the DrawValue fonction and then, add my code in it. So simple. I must need vacation lol.
Thanks to you to have make it simple as that to make custom series ect... I just finished it and it works like a charm!
Thanks to you to have make it simple as that to make custom series ect... I just finished it and it works like a charm!
Re: Drawing series without Y axis
Hello,
Another possibility you could try is to set:
This restricts the whole chart to scroll horizontally. So the upper part won't scroll vertically.
However, you could use a chart for the upper part and another chart, or a subcharttool, for the down part. Something as in the example here:
http://www.teechart.net/support/viewtop ... 815#p45475
Another possibility you could try is to set:
Code: Select all
TChart1.Scroll.Enable = pmHorizontal
However, you could use a chart for the upper part and another chart, or a subcharttool, for the down part. Something as in the example here:
http://www.teechart.net/support/viewtop ... 815#p45475
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Drawing series without Y axis
I need the scrolling option for the other series. Only the On/Off series must be unable to be scrolled by the Y axis. But thanks anyway for the idea.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Drawing series without Y axis
Hi GoToXY,
In that case 2 charts or a subchart tool would be the way to go, as Yeray suggested. You could then restrict scrolling to horizontal for the chart you need.
In that case 2 charts or a subchart tool would be the way to go, as Yeray suggested. You could then restrict scrolling to horizontal for the chart you need.
Best Regards,
Narcís Calvet / 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 |