Pre loader

Column issues with ColumnRenderableSeriesViewModel

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

0
0

I’m putting together a fairly simply column chart but my columns aren’t appearing how I want them to.

Basically, I’m creating 20 columns for each chart (picture below) and I’m getting various widths (despite setting UseUniformWidth to true and using the same DataPointWidth) and the first column isn’t being shown. The top chart, for example, should be a repeating pattern of red, green, blue, and purple.

Column Charts

Here’s how I’m building the ColumnRenderableSeriesViewModel and adding it to the HighPressureRenderableSeries…

XyDataSeries<int, double> dataSeries = new XyDataSeries<int, double>() { SeriesName = $"{modbus.Name} - {channel.Name}" };

ColumnRenderableSeriesViewModel series = new ColumnRenderableSeriesViewModel()
{
    Stroke = channel.Color,
    DataPointWidth = .1,
    UseUniformWidth = true,
    XAxisId = "ChannelsId",
    YAxisId = "PressureId",
    Fill = channel.ColorBrush,
    DataSeries = dataSeries,
    ZeroLineY = 0.0
};

dataSeries.Append(x: channel.Index, y: channel.Value); // channel.Index goes from 0 - 19

HighPressureRenderableSeries.Add(series);

And here’s the XAML for the High Pressure chart…

<sci:SciChartSurface ChartTitle="High Pressure" RenderableSeries="{sci:SeriesBinding HighPressureRenderableSeries}">
    <sci:SciChartSurface.XAxis>
        <sci:NumericAxis AxisTitle="Channels" Id="ChannelsId" DrawMajorBands="False" />
    </sci:SciChartSurface.XAxis>

    <sci:SciChartSurface.YAxis>
        <sci:NumericAxis AxisTitle="Pressure" Id="PressureId" DrawMajorBands="False" VisibleRange="0,25" VisibleRangeLimit="0,25" />
    </sci:SciChartSurface.YAxis>

    <sci:SciChartSurface.ChartModifier>
        <sci:ModifierGroup>
            <sci:RubberBandXyZoomModifier />
            <sci:ZoomExtentsModifier />
        </sci:ModifierGroup>
    </sci:SciChartSurface.ChartModifier>
</sci:SciChartSurface>

Any tips or advice would be appreciated. I’m sure I’m just missing something simple.

Version
5.4.0.12119
  • You must to post comments
1
0

Hi Greg,

I am sorry for the misunderstanding.
Please take a look at our “Manipulate Series MVVM” example. We have an option to add a Column Series there:
https://www.scichart.com/example/wpf-chart-example-manipulate-series-mvvm/

This gives us the following:
Column Series

Which seems to work OK. The columns are correctly spaced, and the first item is shown.

Also for the colouring, you can consider PaletteProvider. Please take a look at the corresponding documentation:
https://www.scichart.com/documentation/v5.x/webframe.html#Paletted%20Series.html

And our “Using PaletteProvider” example:
https://www.scichart.com/example/wpf-chart-example-using-paletteprovider/

Could you please modify the above example until the issue with spacing occurs? That way we can better understand your problem.

Images
  • Greg Knox
    I’m mainly wondering why each column appears to be a different width despite DataPointWidth staying the same and UseUniformWidth set to true. What would cause the widths to continually grow with each column?
  • Greg Knox
    Oleksandr, do you know why each column is growing in width? I’m not setting the width and I’m setting UseUniformWidth to true.
  • Oleksandr Shvets
    Hi Greg, Thanks for your reply. Setting the UseUniformWidth property to True doesn’t cause the width growing in our examples. Unfortunately, I can’t be more helpful without being able to reproduce this issue on our side. Could you please send us a small sample project reproducing this issue for investigation? Thanks in advance, Oleksandr
  • You must to post comments
-1
0

Hi Greg,

Thanks for your inquiry.
You can use PaletteProvider to set a custom colour scheme for the columns. Please take a look at the following documentation for more info:
https://www.scichart.com/documentation/v5.x/webframe.html#Paletted%20Series.html

And our “Using PaletteProvider” example:
https://www.scichart.com/example/wpf-chart-example-using-paletteprovider/

If you continue experiencing this issue please send us a small sample project reproducing it for investigation.

Thanks in advance.

  • Andrew Burnett-Thompson
    I don’t think this answer addresses the problem. Oleksandr could take a second look?
  • 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