Search code examples
asp.netchartsshieldui

How to make a Line Chart with multiple Series where one series has null values


I have a line chart that has 3 series - the first shows cumulative sales for last week - the next shows the daily sales for this week and the next shows cumulative sales for this week.

This shows the days of the week at the bottom.

Last weeks cumulative sales show fine as there is data for each day of the week.

For this week's daily and cumulative sales I don't want a point drawn if the day hasn't happened yet.

I loop through the days of the week and if the day hasn't happened yet I want to assign the value to null instead of 0 and I don't want the line to show anything for these series if the day hasn't happened yet.

Does anyone have advice on this point?


Solution

  • After much looking I found how to do this. It was very easy and described in the below documentation from shieldui.com:

    Example using null in dataSeries

    I had earlier tried all manner of sending empty strings, null value strings and in the end it was as simple as setting that data member to null like this and shieldui handled it correctly:

    dailyincome = null;