Pre loader

Why does my data disappear when YAxis DrawLabels=false


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:NumericAxis AutoRange="Always" DrawMajorGridLines="False" DrawMinorGridLines="False" DrawMajorBands="False" DrawMajorTicks="False" DrawMinorTicks="False">
            <s:DoubleRange Min="0.1" Max="0.1"/>
  • You must 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.

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,

  • 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 Burnett-Thompson
    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 Burnett-Thompson
    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 — 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.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies