mirror of
https://gitlab.silvrtree.co.uk/martind2000/mdot_server.git
synced 2025-01-26 20:16:17 +00:00
new graph
This commit is contained in:
parent
3afe833595
commit
40871afd81
@ -234,6 +234,7 @@
|
||||
template: _.template($('#AMChart-template').html()),
|
||||
initialize: function() {
|
||||
this.modes = ['', 'lux', 'temp', 'co2', 'humid', 'noise'];
|
||||
this.titles = ['','Light Levels','Temperature','Co2 Levels','Humidity','Sound'];
|
||||
this.mode = 0;
|
||||
|
||||
// Config AMChart
|
||||
@ -289,7 +290,7 @@
|
||||
|
||||
var mode = parseInt(this.mode);
|
||||
console.log('mode:', mode, this.mode);
|
||||
debugger;
|
||||
|
||||
_(this.collection.models).each(function(i) {
|
||||
var dt = i.get('dt');
|
||||
var obj;
|
||||
@ -356,6 +357,8 @@
|
||||
valueAxis.axisAlpha = 0;
|
||||
valueAxis.showFirstLabel = false;
|
||||
valueAxis.showLastLabel = false;
|
||||
valueAxis.title = this.titles[this.mode];
|
||||
valueAxis.position = 'left';
|
||||
self.chart.addValueAxis(valueAxis);
|
||||
|
||||
if (mode === 6) {
|
||||
@ -364,6 +367,7 @@
|
||||
co2Axis.axisAlpha = 0;
|
||||
co2Axis.showFirstLabel = false;
|
||||
co2Axis.showLastLabel = false;
|
||||
co2Axis.title = "Co2 Levels";
|
||||
co2Axis.position = 'right';
|
||||
self.chart.addValueAxis(co2Axis);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user