Reputation: 690
Using Highcharts, I'm trying to draw a serie with a "step centered". It works, but I really would like that my line start before my first point and goes through my last point.
Here are my options:
series: [{
type: 'line',
data: [5, 6, 7, 8, 9 , 10, 11, 12, 13],
step: 'center',
name: 'Center'
}]
And an illustration of what I want to do on the left:
and on the right, at the end:
Upvotes: 0
Views: 1033
Reputation: 5222
You can make similar chart by adding new point before your first point and adding last point after your last point:
data: [5, 5, 6, 7, 8, 9, 10, 11, 12, 13, 13],
Then you can use xAxis.min and xAxis.max for showing only the range you want on your chart:
xAxis: {
categories: ['', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', ''],
min: 1,
max: 9
},
Here you can see an example how it can work: http://jsfiddle.net/3ggbqt33/9/
Upvotes: 2