Skip to content

Commit

Permalink
Support PH-TESS subjects, which are { x: number[], y: number[] }
Browse files Browse the repository at this point in the history
  • Loading branch information
eatyourgreens committed Jun 6, 2024
1 parent db27228 commit c6031ce
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions app/features/modelling/line-plot/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit c6031ce

Please sign in to comment.