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);
}
- Gregory Souffleteau asked 8 years ago
- last edited 8 years ago
- You must login to post comments
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
- Andrew Burnett-Thompson answered 8 years ago
- You must login to post comments
Please login first to submit.