Error from chart in div chart1 Error: getNativeXValues is invalid for heatmap type series. Try getting or setting zValues instead
at UniformHeatmapDataSeries.BaseHeatmapDataSeries.getNativeXValues (BaseHeatmapDataSeries.js:430:1)
Help! Please!
- Alexandr Zhuk asked 3 years ago
- You must login to post comments
Hi Alexandr
I think the message is quite self explanatory
getNativeXValues is invalid for heatmap type series. Try getting or setting zValues instead
See the property here zValues. This is a two dimensional array
JavaScript Uniform Heatmap Documentation
There is a section in the page above showing how to update values in a heat map
import { UniformHeatmapDataSeries } from "scichart/Charting/Model/UniformHeatmapDataSeries";
import { zeroArray2D } from "scichart/utils/zeroArray2D";
// Create an empty 2D array of size height & width
const initialZValues: number[][] = zeroArray2D([height, width]);
// Create a Heatmap Data-series. Pass the heatValues as a number[][] to the UniformHeatmapDataSeries
const heatmapDataSeries = new UniformHeatmapDataSeries(wasmContext, 0, 1, 0, 1, initialZValues);
// ...
// Later, update the data
initialZValues[5][6] = 123.4;
// Tell SciChart the data has changed
heatmapDataSeries.notifyDataChanged()
// You can also load an entirely new array with the function UniformHeatmapDataSeries.setZValues
const newZValues: number[][];
heatmapDataSeries.setZValues(newZValues);
Try this?
Best regards
Andrew
- Andrew Burnett-Thompson answered 3 years ago
- You must login to post comments
Please login first to submit.