I am using lightningChartJS to create a heatmap within a dashboard object. My requirement is to have a logarithmic x-axis, while the normal x-axis should not be visible. This setup worked perfectly in version 4.2.1, but after updating to version 5.2.0, it throws an error and the heatmap is not displayed.
Here’s a snippet of the React code I am using:
import { useEffect } from "react";
import { lightningChart, Axis, ChartXY } from "@arction/lcjs";
function App() {
useEffect(() => {
const lc = lightningChart({license: "my-license"});
const chart = lc.ChartXY({ container: "lc" });
chart.getDefaultAxisX().setVisible(false);
const logXAxis = chart
.addAxisX({
type: "logarithmic",
base: 10
})
.setInterval({
start: 3,
end: 500
});
const heatmapSeries = chart.addHeatmapGridSeries({
columns: 901,
rows: 2500,
dataOrder: "rows",
start: { x: 0, y: 0 },
end: { x: 25, y: 25 }
})
.setWireframeStyle(emptyLine)
.setIntensityInterpolation("bilinear");
return () => {
chart.dispose();
};
}, []);
return <div id="lc" style={{ width: "500px", height: "500px" }}></div>;
}
export default App;
In version 4.2.1, the heatmap displays correctly, as shown in this screenshot:
after updating to version 5.2.0, I encounter the following error and the chart does not render:
Uncaught Error: HeatmapGridSeries can only be attached to a pair of Linear Axes.
Here is a screenshot of the error:
Has anyone else encountered this issue? Is there a workaround to use a logarithmic axis with a heatmap in the latest version, or is this a bug?