SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

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.