0

我像这样创建了chartXY:

this.chart = lightningChart().ChartXY({container: `${this.chartId}`,theme:Themes.dark})

有谁知道如何在不使用 LightningChart().ChartXY() 的情况下将主题更改为 Themes.light?

4

1 回答 1

0

创建图表后,无法更改图表的主题。

唯一的选择是重新创建具有不同主题的图表。

const lc = lightningChart()

let chart = lc.ChartXY({theme:Themes.dark})

...

// delete the old chart, also ensure that no references to the old chart is left in application code
chart.dispose()
chart = undefined

// recreate the chart
chart = lc.ChartXY({theme:Themes.light})
于 2020-10-12T06:08:39.330 回答