Hi,
I need create a columnChart with multiple Column value.
If I create a datapoint with 0 in Y value I have a flat red line
{
XyDataSeries<DateTime, double> Serie = new XyDataSeries<DateTime, double>();
foreach (var point in Ohlcvs)
Serie.Append(point.THE_DATE, (point.O < point.C) ? point.V : 0);
var ser = new StackedColumnRenderableSeries
{
DataSeries = Serie,
StackedGroupId = "VolumeId",
FillBrush = ColorCode.StockUp,
SeriesColor = ColorCode.StockUp.Color,
DataPointWidth = 0.8
};
ChartVolume.RenderableSeries.Add(ser);
}
{
XyDataSeries<DateTime, double> Serie = new XyDataSeries<DateTime, double>();
foreach (var point in Ohlcvs)
Serie.Append(point.THE_DATE, (point.O > point.C) ? point.V : 0);
var ser = new StackedColumnRenderableSeries
{
DataSeries = Serie,
StackedGroupId = "VolumeId",
FillBrush = ColorCode.StockDown,
SeriesColor = ColorCode.StockDown.Color,
DataPointWidth = 0.8
};
ChartVolume.RenderableSeries.Add(ser);
}
when StackedColumnRenderableSeries is used with different number of datapoint in the each serie I have this bug
{
XyDataSeries<DateTime, double> Serie = new XyDataSeries<DateTime, double>();
foreach (var point in Ohlcvs.Where(o=>o.O<o.C))
Serie.Append(point.THE_DATE, point.V );
var ser = new StackedColumnRenderableSeries
{
DataSeries = Serie,
StackedGroupId = "VolumeId",
FillBrush = ColorCode.StockUp,
SeriesColor = ColorCode.StockUp.Color,
DataPointWidth = 0.8
};
ChartVolume.RenderableSeries.Add(ser);
}
{
XyDataSeries<DateTime, double> Serie = new XyDataSeries<DateTime, double>();
foreach (var point in Ohlcvs.Where(o => o.O > o.C))
Serie.Append(point.THE_DATE, point.V);
var ser = new StackedColumnRenderableSeries
{
DataSeries = Serie,
StackedGroupId = "VolumeId",
FillBrush = ColorCode.StockDown,
SeriesColor = ColorCode.StockDown.Color,
DataPointWidth = 0.8
};
ChartVolume.RenderableSeries.Add(ser);
}
In the real case , there are 8 series .
They can beings presented on the same point X or not .
Thanks
- Sylvain60 asked 9 years ago
- last edited 9 years ago
- You must login to post comments
Hi Slyvain,
This question has been answered over here: Gaps in Stacked Column Chart
Can you let me know if it helps?
Best regards,
Andrew
- Andrew Burnett-Thompson answered 9 years ago
- You must login to post comments
Perfect andrew,
by replacing missing values with NAN (not 0) it works .
Thank you
- Sylvain60 answered 9 years ago
- You must login to post comments
Please login first to submit.