我LightningChartJs 2.0.2在我的Angular應用程序中使用。在圖表中,我實現了一條線和一個點系列,效果如預期。但是如果我改變路線并返回到圖表the point series is not visible anymore。嘗試了不同的環境但沒有成功。我也無法找到實際問題的原因。以下代碼顯示了圖表和系列的創建:this.chart = lightningChart().ChartXY({container: `${this.chartId}`});const lineSeries = this.chart.addLineSeries().setStrokeStyle((style) => style.setThickness(5)); lineSeries.add(this.points);const pointSeries = this.chart.addPointSeries().setName('Points').setPointSize(6);pointSeries.add(this.points);在銷毀圖表時:ngOnDestroy() { // "dispose" should be called when the component is unmounted to free all the resources used by the chart this.chart.dispose(); }通常情況下,圖表和所有依賴項將在此時被銷毀。如果我回到圖表頁面,圖表應該是新創建的,包含它的所有系列,但點系列不是。為什么點系列不再可見以及如何解決?請參閱 stackblitz 示例!圖表處理位于/src/app/lc-test/lc-test.component.ts重現問題的步驟:將路線更改為LC Test。您會看到線和點系列。變回Dashboard并再次變回LC-Test。線系列可見,點系列不可見。在 Mac 上使用 Chrome 和 Firefox。lightningChart Js - stackblitz - 點系列在路線更改問題上消失在使用了一些縮放選項后,點系列似乎出現了渲染問題:正常行為:更改路線并放大頂部后:
更改角度路線后 LightningChartJs 點系列消失
蝴蝶刀刀
2023-05-11 09:58:20