I've never quite understood how to work with stacked area series--everything I have tried, and the chart does strange things.
Here is an example with two different types of events:
http://www.trakcentral.com/files/stackedseries.zip
The two methods here produce holes in the chart, and the series goes all over the place.
What should the code look like?
In case it is not obvious, let me explain.
1) In Test 1, datapoint 10, the chart should show 1/2 of the value from Series 1 and 1/2 of the value from series 2--that works--but it shows the hole in the chart. How do I remove that?
2) In Test 2, the chart should show a smooth transition between the datapoinnts, but it does not--series 2 goes way out of the way and leaving a large hole.
If there is a white paper on how to work wiht stacked series, please let me know.
problems with stacked series
-
- Advanced
- Posts: 228
- Joined: Tue Aug 28, 2007 12:00 am
- Location: Oregon, USA
Hi TestAlways,
Once you set the property "Stacked", when you have two series in the same X their Y values are automatically added.
And the Area Series draws a line from one up position of the area to the next up position and the same for the down positions. And thats why you encounter holes.
So the easiest solution should be to add another point where you encounter a hole to force the "bar" to start where you want.
So for your test2, you don't need a null point at -100, but your hole is painted adding a point at the same x=0 and with value 0:
And for your test1, you only need to add a point at the same x=10 and with the value you want it to have:
I hope it helps you to understand how stacked works.
Once you set the property "Stacked", when you have two series in the same X their Y values are automatically added.
And the Area Series draws a line from one up position of the area to the next up position and the same for the down positions. And thats why you encounter holes.
So the easiest solution should be to add another point where you encounter a hole to force the "bar" to start where you want.
So for your test2, you don't need a null point at -100, but your hole is painted adding a point at the same x=0 and with value 0:
Code: Select all
if I = 10 then
begin
Series1.AddXY(I, lValue);
// Series1.AddNullXY(I, -100);
Series2.AddXY(I, 0);
Series2.AddXY(I, lValue);
end
Code: Select all
if I = 10 then
begin
Series1.AddXY(I, lValue * 0.5);
Series2.AddXY(I, lValue * 0.5);
Series2.AddXY(I, lValue);
end
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |