Skip to content

Commit 536ea2c

Browse files
committed
Stop pie chart radius updates from being overwritten when adding data
1 parent dfbc966 commit 536ea2c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ui/src/widgets/ui-chart/UIChart.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,9 @@ export default {
425425
const seriesCount = this.chart.getOption().series.length
426426
this.add(msg)
427427
// if any series have been added, re-apply any chartOptions passed in
428-
if (this.chart.getOption().series.length > seriesCount) {
428+
// Also re-apply if this is a radial (pie or doughnut) chart as the radius for these are re-calculated
429+
// when adding data, which may remove any radius applied via msg.ui_update.
430+
if (this.chart.getOption().series.length > seriesCount || this.props.xAxisType === 'radial') {
429431
// update the chart first from options applied in previous sessions
430432
const chartOptions = this.chartOptions
431433
if (chartOptions) {

0 commit comments

Comments
 (0)