I have run my head into a brick wall with this one. I have a data set that tracks three data points over time. These data points can change independently of each other. I am trying to show the history of these changes in a line chart but I have yet to find out how to make a common x axis for the three.
The data is returned like this:
{
"Default": {
"Values": [
999,
799,
999
],
"Timestamps": [
"2015-03-01T03:31:16+00:00",
"2015-03-01T07:21:43+00:00",
"2015-03-01T14:02:22+00:00"
]
},
"Current": {
"Values": [
399,
849
],
"Timestamps": [
"2015-03-01T01:15:22+00:00",
"2015-03-01T21:30:43+00:00"
]
},
"CurrentPremium": {
"Values": [
500,
345,
200,
500
],
"Timestamps": [
"2015-02-01T14:24:00+00:00",
"2015-03-01T00:13:28+00:00",
"2015-03-01T09:56:43+00:00",
"2015-03-01T12:00:04+00:00"
]
}
}
The returned values indicate when this value changed from its previous value.
I am using a linechart from chartjs to visualize the data. For that I need to supply a common list of labels that match the data points for the lines so I need to align these three data sets somehow but I can't figure out how to achieve this.