I’m rending a number of very small sparkline graphs that don’t need axis labels. As soon as I take the markup below and add DrawLabels=”False” to my Y Axis, I can no longer see any data. What am I missing here?
<s:SciChartSurface RenderableSeries="{s:SeriesBinding Chart.RenderableSeries}">
<s:SciChartSurface.XAxis >
<s:DateTimeAxis AutoRange="Always" DrawLabels="False" DrawMajorGridLines="False" DrawMinorGridLines="False" DrawMajorBands="False" DrawMajorTicks="False" DrawMinorTicks="False" >
</s:DateTimeAxis>
</s:SciChartSurface.XAxis>
<s:SciChartSurface.YAxis>
<s:NumericAxis AutoRange="Always" DrawMajorGridLines="False" DrawMinorGridLines="False" DrawMajorBands="False" DrawMajorTicks="False" DrawMinorTicks="False">
<s:DoubleRange Min="0.1" Max="0.1"/>
</s:NumericAxis>
</s:SciChartSurface.YAxis>
</s:SciChartSurface>
- James Lanng asked 4 years ago
- You must login to post comments
I’m struggling to reproduce this James
I used our SeriesBinding example here, and set DrawLabels, DrawMajorGridlines, DrawAxisBands, DrawMinorGridlines, DrawMajorTicks and DrawMinorTicks to false. The series render fine.
https://www.scichart.com/example/wpf-chart-example-series-binding/
I have tried as well smaller chart surfaces thinking it was something todo with chart size (you mentioned spark line)
can you help me repro?
Best regards,
Andrew
- Andrew Burnett-Thompson answered 4 years ago
-
OK I can see it’s because DataSeries is null, so it bails out. When DrawLabels=true, I can see my XySeries
-
To be more specific, there is a RenderableSeries whose DataSeries is null
-
Ok so my question to you is … why is RenderableSeries.DataSeries null? Does this occur when DrawLabels is set to false? Or is there another reason? Perhaps it’s a binding error?
-
Changing DrawLabels to false causes this DataSeries to become null. When DrawLabels is true, DataSeries is set to my XySeries. A breakpoint in the DataSeries dependency property change handler shows that it is set to my DataSeries through the binding, and it is never set to null
-
There is nothing in our code which sets the DataSeries to null if Axis.DrawLabels is false. I can only think of … some kind of binding in your application, or, a binding error occurring. Have a look at https://www.scichart.com/example/wpf-chart-example-modify-axis-properties/ — in this example we have checkboxes for things like DrawLabels and it doesn’t affect dataseries
- 3 more comments
- You must login to post comments
Please login first to submit.