diff --git a/app/features/modelling/line-plot/index.js b/app/features/modelling/line-plot/index.js index 168b1c2947..6f91990a86 100644 --- a/app/features/modelling/line-plot/index.js +++ b/app/features/modelling/line-plot/index.js @@ -40,6 +40,23 @@ class LinePlotModel { this.frame = frame; fetch(`${src}?=`) .then(response => response.json()) + .then(data => { + if(data.x && data.y) { + return { + data: { + x: data.x, + y: data.y + } + }, + { + chartOptions: { + xAxisLabel: 'Days', + yAxisLabel: 'Brightness' + } + }; + } + return data; + }) .then(({ data, chartOptions, ...rest }) => { const datasets = getDatasets(data); console.log({