Home forums Using CanvasJS Make datapoint null values not render or invisible Reply To: Make datapoint null values not render or invisible

#14736

Ray
Member

Thankyou it is useful to see how you access the datapoints through javascript

However this is not resolving my issue.

The problem I have is I have an array of data that contains single dates for each entry.
When I make the chart it shows a blank width for each entry including the ones without an entry for that date

Eg
{
type: “column”,
name: “Item 1”,
dataPoints: [
{x:new Date(2017,02,07), y:7}
]
},
{
type: “column”,
name: “Item2”,
dataPoints: [
{x:new Date(2017,02,14), y:13}
]
},
{
type: “column”,
name: “Item3”,
dataPoints: [
{x:new Date(2017,02,21), y:8}
]
},

When I make the chart it on 2017,02,07 its shows the first item and two blank spaces for the other two.
For 2017,02,14 it shows a blank entry then second item them another blank entry
For 2017,02,21 it shows two blank entries and then third item

I want it only to show the item that contains the date entry in the the datapoint for that particular day and not blank entries for all other data that doesnt have a datapoint for that day.

Is that possible?

Thankyou again