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

0 votes
2k views

I just added a stacked mountain series to my chart and I’m getting some very odd rendering behavior. There’s lots of gaps and “misses” where it’s not adding or drawing the data correctly. Also, whenever the zoom or pan changes, everything jumps around, with the gaps and stacked series’s changing constantly (the lowest series is fine).

Here’s an example:

enter image description here

Notice the left graph, one part seems to be working, but then it starts overlapping. You can see examples of gaps on the right series.

If I pan a little to the right, it all jiggles around and I get this:

enter image description here

The overlap has now jumped up. The graph on the right has completely changed except for the first series (lowest).

I’ve not set any grouping, just added two stacked series to the ObservableCollection like this:

                RenderableSeriesViewModels.Add(new StackedMountainRenderableSeriesViewModel()
                {
                    DataSeries = dataSeries,
                    Stroke = color,
                    Fill = new SolidColorBrush(ColorHelper.MultiplyTransparency(0.5f, color)),
                    StrokeThickness = 2
                });

As a line series, everything works fine.

  • Ken Hobbs asked 3 years ago
  • last active 3 years ago
0 votes
3k views

Hi,

I need to create a chart with areas (100%) clickable.
So I used StackedMountainRenderableSeries series.

the problem is that the graph remains flat (all lines are 0).

            <s:SciChartSurface x:Name="ChartTgt"  Grid.Column="0" s:ThemeManager.Theme="Chrome" >
            <s:SciChartSurface.XAxis>
                <s:NumericAxis  x:Name="AxeXTgt"/>
            </s:SciChartSurface.XAxis>
            <s:SciChartSurface.YAxis>
                <s:NumericAxis x:Name="AxeYTgt"/>
            </s:SciChartSurface.YAxis>
            </s:SciChartSurface>


        AxeXTgt.LabelProvider = new CustomLabelProvider(months.ToArray());
                AxeYTgt.TextFormatting = "#0'%'";
            foreach (var cat in categ)
            {
                XyDataSeries<double, double> serie = new XyDataSeries<double, double>();
                foreach (var m in months)
                    serie.Append(months.IndexOf(m), tgt.FirstOrDefault(o => o.CAT == cat && o.PERIOD == m)?.QTY ?? 0);
                ChartTgt.RenderableSeries.Add(new StackedMountainRenderableSeries { AntiAliasing = true, DataSeries = serie, SeriesColor = colors[categ.IndexOf(cat)], AreaBrush = new SolidColorBrush(colors[categ.IndexOf(cat)]), IsOneHundredPercent = true});
            }

but if I put IsOneHundredPercent false, I can see the lines.

the version of the DLL is 3.21.0.5511

Thanks

  • Sylvain60 asked 4 years ago
  • last active 4 years ago
Showing 2 results
This template supports the sidebar's widgets. Add one or use Full Width layout.