I noticed when I put the values inside the JS it works but if I pass dynamically with a parameter not works.
Code: Select all
var data = [ { name: 'ADBE default (average)', data: [ [ 1313964000000, 23.17 ], [ 1314050400000, 23.78 ], [ 1314136800000, 24.1 ], [ 1314223200000, 23.86 ], [ 1314309600000, 24.54 ], [ 1314568800000, 25.51 ], [ 1314655200000, 25.19 ], [ 1314741600000, 25.24 ], [ 1314828000000, 24.77 ], [ 1314914400000, 24.15 ], [ 1315260000000, 23.74 ], [ 1315346400000, 25.3 ], [ 1315432800000, 24.99 ], [ 1315519200000, 24.64 ], [ 1315778400000, 25.2 ] ] }, { name: 'ADBE start', data: [ [ 1313964000000, 23.17 ], [ 1314050400000, 23.78 ], [ 1314136800000, 24.1 ], [ 1314223200000, 23.86 ], [ 1314309600000, 24.54 ], [ 1314568800000, 25.51 ], [ 1314655200000, 25.19 ], [ 1314741600000, 25.24 ], [ 1314828000000, 24.77 ], [ 1314914400000, 24.15 ], [ 1315260000000, 23.74 ], [ 1315346400000, 25.3 ], [ 1315432800000, 24.99 ], [ 1315519200000, 24.64 ], [ 1315778400000, 25.2 ] ], type: 'column', stack: 'one' }, { name: 'ADBE end', data: [ [ 1313964000000, 23.17 ], [ 1314050400000, 23.78 ], [ 1314136800000, 24.1 ], [ 1314223200000, 23.86 ], [ 1314309600000, 24.54 ], [ 1314568800000, 25.51 ], [ 1314655200000, 25.19 ], [ 1314741600000, 25.24 ], [ 1314828000000, 24.77 ], [ 1314914400000, 24.15 ], [ 1315260000000, 23.74 ], [ 1315346400000, 25.3 ], [ 1315432800000, 24.99 ], [ 1315519200000, 24.64 ], [ 1315778400000, 25.2 ] ], type: 'column', stack: 'one' } ]
console.log(data)
Highcharts.stockChart($parameters.ContainerID, {
series: data,
rangeSelector: {
selected: 4
},
plotOptions: {
series: {
tooltip: {
valueDecimals: 2
},
dataGrouping: {
forced: true,
units: [
['week', [1]]
]
}
},
column: {
stacking: 'normal'
}
}
});
I noticed in inspector when the data is already in script happens a serialization but if comes from parameter this serialization not happens.