SciCharts
SciCharts Type
修改器
How to use
| import {MouseWheelZoomModifier} from "scichart/Charting/ChartModifiers/MouseWheelZoomModifier";
const mouseWheelZoomModifier = new MouseWheelZoomModifier(); sciChartSurface.chartModifiers.add(mouseWheelZoomModifier);
mouseWheelZoomModifier.isEnabled = false;
|
配置x,y轴名称
| const lineSeries = new FastLineRenderableSeries(wasmContext, { stroke: "#4083B7", strokeThickness: 2 });
const lineData = new XyDataSeries(wasmContext, { dataSeriesName: "X轴名称" });
lineData = [1,2,3,4,5];
lineSeries.dataSeries = lineData
|
Realtime updates
RenderableSeries呈现数据,而DataSeries保存X、Y数据并管理更新
| let phase = 0.0; const updateDataFunc = () => { for(let i = 0; i < 1000; i++) { lineData.update(i, Math.sin(i * 0.1 + phase)); } phase += 0.01; setTimeout(updateDataFunc, 1/60); }; updateDataFunc();
|