Michele
Michele

Reputation: 8753

Series with different time ranges in Highcharts

I'm trying to use plot a line chart with multiple (3 to 5) series. Each of them covers a period that may or not cross (overlap) another line.

http://jsfiddle.net/MicheleC/E4SnM/

I tried to define each series via array of [x,y] like

"series": [
 {
"data": [
 [
 new Date(2004,0,30),
  8175 
],
[
 new Date(2004,9,1),
  8367 
],
....

But highcharts converts dates in numbers and make each series to start from 1.

Upvotes: 0

Views: 1190

Answers (1)

wergeld
wergeld

Reputation: 14442

You need to tell highcharts that the xAxis is a date. It defaults to linear.

            "xAxis": {
                "type": "datetime",
            "title": {
                "text": "DATE"
            }

You then need to probably format your xAxis labels as well to how you want them to show.

Upvotes: 2

Related Questions