我创建了这样的图表XY:
this.chart = lightningChart().ChartXY({container: `${this.chartId}`,theme:Themes.dark})
有人知道如何在不再次使用lightningChart((.ChartXY((的情况下将主题更改为Themes.light吗?
创建图表后,无法更改图表的主题。
唯一的选择是用不同的主题重新创建图表。
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})