HC connectNull Demo
author(s):
Marc
by J. Albert Bowden
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<div id="container" style="height: 400px; max-width: 800px; margin: 0 auto"></div>
JavaScript
$(function () {
$('#container').highcharts({
title: {
text: 'LineWithNulls'
},
subtitle: {
text: 'How can I connect the the line in a different color or with a dotted line'
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
series: [{
color: 'black',
data: [4, 5, 1, null, 3, 4, 2],
connectNulls: true,
zoneAxis: 'x',
zones: [{
value: 2,
dashStyle: 'solid'
},{
value: 4,
dashStyle: 'dot'
}]
}]
});
});