Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions nodes/widgets/ui_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ module.exports = function (RED) {
// Deep merge new options in with old
const mergedOptions = deepMerge(currentOptions, updates.chartOptions)
statestore.set(group.getBase(), node, msg, 'chartOptions', mergedOptions)
// pass the full set to the clients so they don't need to do the merge
msg.ui_update.chartOptions = mergedOptions
}
}

Expand Down
7 changes: 0 additions & 7 deletions ui/src/widgets/ui-chart/UIChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
},
chartUpdateDebounceTimeout: null,
tooltipDataset: [],
dynamicChartOptions: [], // an array of chart options updates received this session
resizeObserver: null
}
},
Expand Down Expand Up @@ -193,8 +192,6 @@
if (this.chart) {
this.chart.setOption(updates.chartOptions)
}
// add these options to the array of previous updates received this session
this.dynamicChartOptions.push(updates.chartOptions)
}
},
generateChartOptions () {
Expand Down Expand Up @@ -433,10 +430,6 @@
if (chartOptions) {
this.chart.setOption(chartOptions)
}
// then from this session
this.dynamicChartOptions.forEach((options) => {
this.chart.setOption(options)
})
}
}
}
Expand Down Expand Up @@ -748,10 +741,10 @@
updateYAxisLimits (options) {
if (this.hasData && this.props.xAxisType !== 'radial') {
if (!Object.hasOwn(this.props, 'ymin') || this.props.ymin === '' || typeof this.props.ymin === 'undefined') {
options.yAxis[0].min = axisHelper.getAxisMin // set sensible y-limits

Check warning on line 744 in ui/src/widgets/ui-chart/UIChart.vue

View workflow job for this annotation

GitHub Actions / build / Build on 24

Caution: `axisHelper` also has a named export `getAxisMin`. Check if you meant to write `import {getAxisMin} from './helpers/axis.helper'` instead
}
if (!Object.hasOwn(this.props, 'ymax') || this.props.ymax === '' || typeof this.props.ymax === 'undefined') {
options.yAxis[0].max = axisHelper.getAxisMax // set sensible y-limits

Check warning on line 747 in ui/src/widgets/ui-chart/UIChart.vue

View workflow job for this annotation

GitHub Actions / build / Build on 24

Caution: `axisHelper` also has a named export `getAxisMax`. Check if you meant to write `import {getAxisMax} from './helpers/axis.helper'` instead
}
}
},
Expand Down
Loading