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!

1
0

Hi,
I use SciChart in a datagrid as a Sparkline.
Using a NumericAxis the first and last column is displayed in half.
By replacing the X axis by CategoryNumericAxis chart doesnt works.

<s:SciChartSurface Height="200" Width="300" RenderPriority="Low" MaxFrameRate="24" Background="Black">
<s:SciChartSurface.RenderSurface>
    <s:HighSpeedRenderSurface/>
</s:SciChartSurface.RenderSurface>
<s:SciChartSurface.RenderableSeries>
    <s:FastColumnRenderableSeries DataSeries="{Binding Volume}" DataPointWidth="0.75" Fill="Red" Stroke="Black"/>
</s:SciChartSurface.RenderableSeries>
<s:SciChartSurface.XAxis>
    <s:CategoryNumericAxis AutoRange="Always" DrawMinorGridLines="False" Visibility="Hidden" DrawMajorGridLines="False" DrawMajorBands="False" />
</s:SciChartSurface.XAxis>
<s:SciChartSurface.YAxis>
    <s:NumericAxis AutoRange="Always" DrawMinorGridLines="False" DrawMinorTicks="False" DrawMajorGridLines="False" DrawMajorBands="False" DrawMajorTicks="False" >
        <s:DoubleRange Min="0" />
    </s:NumericAxis>
</s:SciChartSurface.YAxis>

and code

public XyDataSeries<int, float> Volume { get; set; } = new XyDataSeries<int, float>();

init()
{
   Volume.Append(0, 500);
   Volume.Append(1, 100);
   Volume.Append(2, 1000);
   Volume.Append(3, 700);
   Volume.Append(4, 600);
   Volume.Append(5, 300);
}
Version
4.1.1.8645
  • You must to post comments
0
0

Recently someone reported the bug that CategoryNumericAxis throws when DataSeries TX is int.

The good news is, we have fixed that and published it to our Nuget feed.

If you update to the latest version (v4.2.0) of SciChart, it will work. Or, if you cannot update, as a workaround you can set TX=double and it will also work.

Best regards,
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.