Reputation: 5708
How can I hide the time gap between two data points of a line chart when there are no values between them?
For example, 3 points:
I have tried it with
series: {
connectNulls: fals,
}
Did not work. Is there a other property for this?
Upvotes: 2
Views: 3546
Reputation: 7157
Do not show datapoints
Use null
as value:
series: {
data: [5, 2, null, null, 4, 5]
}
You do not need to use connectNulls
.
Do not show x axis ticks
When you want to hide the x axis ticks for empty datapoints, switch your x axis to type: category
, and exclude those values. Be sure to exclude them from your series as well.
xAxis: {
type: 'category',
data: ['thursday', 'friday', 'monday', 'tuesday']
},
series: {
data: [5, 2, 4, 5]
}
Upvotes: 4