Using Delphi 12.1 / patch 1
Using TChart 2024.40.240410 VCL
What I am trying and failing badly at is a chart, with multiple TBarSeries. Could be 4.. could be 15... so could be many of them.
I run through a grid of data. Each rows column will plot to this chart.
So if 5 columns... 5 bars.
I do this, so i can assign a custom axes to it.
3 Custom Axes for right now to simply things
-100 to 100
0 to 15
0 to 10000
I use the max value from each column to decide which custom axis to use.
I am having a hard time getting the chart to look nice. Things over lap, ive tried changing the Multibar value and nothing seems to clean up.... I set customBarWidth to make thinner for now. But there are large gaps.
Included are 3 images... 2 of what I have going now playing around to figure this out.
Other showing my wish of how it would turn out.
Showing 3 axes on the chart and each bar series playing happy with the others on scale and positioning.
I've gone over this over and over and over... and just can't figure it out.
Code wise... everything Series and Custom Axes created at run time.
I just have a TChart on my form, and fill in the rest as needed.
Multiple TBarSeries on chart and axes
Multiple TBarSeries on chart and axes
- Attachments
-
- bar1.png (106.1 KiB) Viewed 8412 times
-
- bar3.png (16.3 KiB) Viewed 8412 times
-
- bar4.png (7.26 KiB) Viewed 8412 times
Re: Multiple TBarSeries on chart and axes
Hello,
I guess the issue is you are creating too many series or too many values for each series, which reserves the space for the bars to be drawn, even if they are nulls or 0 values.
If you can arrange a simple example project we can run as-is to reproduce the problem here, we'll be pleased to give you a more concrete reply and we'll probably be able to provide a counter-example showing how to do it.
I guess the issue is you are creating too many series or too many values for each series, which reserves the space for the bars to be drawn, even if they are nulls or 0 values.
If you can arrange a simple example project we can run as-is to reproduce the problem here, we'll be pleased to give you a more concrete reply and we'll probably be able to provide a counter-example showing how to do it.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Multiple TBarSeries on chart and axes
Ill clean up my stand alone demo program and post it soon.
After thinking about it, and your response....
Possibly would it make since to have 3 custom Axes.. and 3 bar series. Each series assigned one of the custom axes.
Then whatever data comes through populate bar series it would fit under to fit the axes it would need.... so each of the 3 bar series can have X number of bars on it?
Instead of each bar getting its own series?
After thinking about it, and your response....
Possibly would it make since to have 3 custom Axes.. and 3 bar series. Each series assigned one of the custom axes.
Then whatever data comes through populate bar series it would fit under to fit the axes it would need.... so each of the 3 bar series can have X number of bars on it?
Instead of each bar getting its own series?
Re: Multiple TBarSeries on chart and axes
Yes, that's probably the easiest way.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |