Pre loader

StackedColumnRenderableSeries different number of X points

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

Answered
1
0

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

Images
  • You must to post comments
Best Answer
1
0

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

  • You must to post comments
1
0

Perfect andrew,

by replacing missing values ​​with NAN (not 0) it works .

Thank you

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies