I don't know why, the example in the document can display the icon, but the one I wrote does not display enter image description here
this.SpecChart.addOnScreenMenu(
[
[
// Default buttons
OnScreenMenuButtonType.ZoomInX,
OnScreenMenuButtonType.ZoomOutX,
OnScreenMenuButtonType.ZoomInY,
OnScreenMenuButtonType.ZoomOutY,
OnScreenMenuButtonType.ZoomToFit,
OnScreenMenuButtonType.ToggleAnimations,
// cusrom button
{
dimensions: { rows: 1, columns: 1 },
label: "Show Heatmap",
opacity: "1",
color: "blue",
shape: OnScreenMenuButtonShape.RoundedRectangle,
action: this.show,
},
],
],
OnScreenMenuButtonShape.RoundedRectangle
);