How to MELT 2 Series on the Bottom Axes?
Posted: Wed Jul 30, 2014 4:56 pm
HI,
I have a Chart with 2 Series.
Both series have the same bottom axis, which is a date.
One series is of the Type CandleSeries and the other one LineSeries.
this WORKS:
To add my points I use:
This works fine.
To my mind, this is due to the fact, that the date values come in SORTED.
DOES NOT WORK;
The moment I use 2 loops:
and:
It does not work any more as intended.
To my mind, this is due to the fact, that the date series comes in sorted, but in 2 CLUSTERS.
The candle data has e.g. the date from the 1st of April to the 1st of October.
Then the line series starts again by the 1st of April.
This is not the case, if I have ONE loop.
How can I make these 2 series to MELT on the bottom-date axis?
Only the y-values shall differ and have 2 axis.
The x-value shall be the same and show my 2 values at the same day if it occurs to have a common day.
In other words:
The Series.AddXY(date...)
shall do for me:
- search, if there is the date at the bottom axis already
--- if yes, draw the y-value above this very x-value
--- if no, draw a new x-value on the appropriate place and the y-value above it.
I attach you a screenshot, how it shall NOT look alike.
Thanks in advance,
Cheryll
I have a Chart with 2 Series.
Both series have the same bottom axis, which is a date.
One series is of the Type CandleSeries and the other one LineSeries.
this WORKS:
To add my points I use:
Code: Select all
for i ... to ....
begin
SeriesCandle.AddCandle(date,...)
Series_Line.AddXY(date,..)
end;
To my mind, this is due to the fact, that the date values come in SORTED.
DOES NOT WORK;
The moment I use 2 loops:
Code: Select all
for i...to...
begin
SeriesCandle.AddCandle(date,...)
end;
Code: Select all
for i...to...
begin
SeriesLine.Addxy(date,...)
end;
To my mind, this is due to the fact, that the date series comes in sorted, but in 2 CLUSTERS.
The candle data has e.g. the date from the 1st of April to the 1st of October.
Then the line series starts again by the 1st of April.
This is not the case, if I have ONE loop.
How can I make these 2 series to MELT on the bottom-date axis?
Only the y-values shall differ and have 2 axis.
The x-value shall be the same and show my 2 values at the same day if it occurs to have a common day.
In other words:
The Series.AddXY(date...)
shall do for me:
- search, if there is the date at the bottom axis already
--- if yes, draw the y-value above this very x-value
--- if no, draw a new x-value on the appropriate place and the y-value above it.
I attach you a screenshot, how it shall NOT look alike.
Thanks in advance,
Cheryll