Graph with data with same unit but different magnitude
Posted: Monday 10 October 2022 18:02
I have a question for which I hope someone already got the solution. It feels like a silly problem.
I am trying to plot my daily gas usage as well as my cumulative year usage in one plot.
However my gas usage varies from 0 to 10 m3 per day
while my cumulative goes up to about 2500 m3 over the year.
I would like to define two axis, but both in m3.
But whatever I try in CONFIG.js, it keeps showing only one axis.
How can I plot these two variables in one plot properly?
Kind regards,
Bert Hi all,
I am trying to plot my daily gas usage as well as my cumulative year usage in one plot.
However my gas usage varies from 0 to 10 m3 per day
while my cumulative goes up to about 2500 m3 over the year.
I would like to define two axis, but both in m3.
But whatever I try in CONFIG.js, it keeps showing only one axis.
How can I plot these two variables in one plot properly?
Kind regards,
Bert Hi all,
Code: Select all
locks['graph_gas'] = {
title: 'Gas',
devices: [3],
graph: ['bar','line'],
custom : {
"last day": {
range: 'day',
filter: '25 hours',
data: {
U: 'd.v_3',
C: 'd.c_3',
}
},
"last week": {
range: 'week',
filter: '7 days',
data: {
U: 'd.v_3',
C: 'd.c_3',
}
"last month": {
range: 'month',
filter: '31 days',
data: {
U: 'd.v_3',
C: 'd.c_3',
}
},
"last year": {
range: 'year',
filter: '12 months',
data: {
U: 'd.v_3',
C: 'd.c_3-11083',
},
options: {
scales: {
yAxes: [
{
ticks: {
min: 0,
max: 20
}
},{
ticks: {
min: 0,
max: 3000
}
}
]
}
}
}
},
legend: { 'U':'Gas Usage [m3]','C':'Gas Usage Cumulative [m3]',},
datasetColors:['red','green']
}