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

0
0

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>
Version
5.4.1.12182
  • You must to post comments
0
0

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

Images
  • James Lanng
    OK I can see it’s because DataSeries is null, so it bails out. When DrawLabels=true, I can see my XySeries
  • James Lanng
    To be more specific, there is a RenderableSeries whose DataSeries is null
  • Andrew
    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?
  • James Lanng
    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
  • Andrew
    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
Showing 1 result
Your Answer

Please first to submit.

SciChart WPF v6 BETA released! Note pricing/licensing changes are coming. Contact us to beat the rise!Read more
+