Manually assign axis in dataset and add RFC live data

This commit is contained in:
Maximilian Grundke
2018-04-11 14:10:38 +02:00
parent c4af08e73a
commit 44d3ebd408
2 changed files with 40 additions and 6 deletions

View File

@ -13,14 +13,13 @@ $(document).ready(function () {
var groups;
var buildChartGroups = function() {
initialData = initialData.sort(function (a, b) {return a.data - b.data});
return _.map(initialData, function(element, index) {
return _.map(initialData, function(element) {
return {
content: element.name + (element.unit ? ' [' + element.unit + ']' : ''),
id: element.key,
visible: false,
options: {
yAxisOrientation: index >= initialData.length / 2 ? 'right' : 'left'
yAxisOrientation: element.axis ? element.axis : 'left'
}
};
});
@ -46,7 +45,6 @@ $(document).ready(function () {
},
end: vis.moment(),
legend: true,
shaded: true,
start: CHART_START
});
};