The Polar Uniform Heatmap Chart Type
The PolarUniformHeatmapRenderableSeriesπ displays "heat" values as colored cells in a polar (circular) coordinate systemβperfect for visualizing intensity, density, or other matrix-like data in a circular form. Each cell is mapped from a two-dimensional array of z-values, with color gradients representing the data's magnitude.
The JavaScript Polar Uniform Heatmap Chart can be found in theΒ SciChart.Js Examples Suite > Polar Uniform Heatmap ChartΒ on Github, or our live demo atΒ scichart.com/demo.
Propertiesβ
Key options for IPolarUniformHeatmapRenderableSeriesOptionsπ include:
- dataSeriesπ β A UniformHeatmapDataSeriesπ containing a 2D array of
zValues, and X / Y Step and Start. - colorMapπ β Maps zValues to colors via HeatmapColorMapπ.
- useLinearTextureFilteringπ β Enables smooth texture filtering (default:
false). - fillValuesOutOfRangeπ β Fills cells outside the color mapβs min/max with a defined edge color.
- strokeπ and strokeThicknessπ β Cell border styling.
- dataLabelsπ β Enable and style per-cell text labels.
Examplesβ
Basic Polar Heatmapβ
const {
PolarMouseWheelZoomModifier,
SciChartJsNavyTheme,
PolarZoomExtentsModifier,
PolarPanModifier,
EAxisAlignment,
PolarNumericAxis,
EPolarLabelMode,
SciChartPolarSurface,
EPolarAxisMode,
NumberRange,
HeatmapColorMap,
UniformHeatmapDataSeries,
PolarUniformHeatmapRenderableSeries,
} = SciChart;
// or, for npm, import { SciChartSurface, ... } from "scichart"
const { sciChartSurface, wasmContext } = await SciChartPolarSurface.create(divElementId, {
theme: new SciChartJsNavyTheme(),
});
const HEATMAP_WIDTH = 48;
const HEATMAP_HEIGHT = 10;
const angularXAxis = new PolarNumericAxis(wasmContext, {
polarAxisMode: EPolarAxisMode.Angular,
axisAlignment: EAxisAlignment.Left,
visibleRange: new NumberRange(0, HEATMAP_WIDTH),
autoTicks: false,
majorDelta: 1,
polarLabelMode: EPolarLabelMode.Perpendicular,
flippedCoordinates: true, // go clockwise
totalAngle: Math.PI * 2,
});
sciChartSurface.xAxes.add(angularXAxis);
const radialYAxis = new PolarNumericAxis(wasmContext, {
polarAxisMode: EPolarAxisMode.Radial,
axisAlignment: EAxisAlignment.Bottom,
visibleRange: new NumberRange(0, HEATMAP_HEIGHT),
drawLabels: false, // hide radial labels
innerRadius: 0.1,
});
sciChartSurface.yAxes.add(radialYAxis);
// Add a heatmap series to the chart
const heatmapSeries = new PolarUniformHeatmapRenderableSeries(wasmContext, {
dataSeries: new UniformHeatmapDataSeries(wasmContext, {
zValues: Array.from({ length: HEATMAP_HEIGHT }, () => {
return Array.from({ length: HEATMAP_WIDTH }, () => {
return Math.random() * 100;
});
}),
xStart: 0,
yStart: 0,
xStep: 1,
yStep: 1,
}),
colorMap: new HeatmapColorMap({
minimum: 0,
maximum: 100,
gradientStops: [
{ offset: 0, color: "lightblue" },
{ offset: 1, color: "indigo" },
]
}),
});
sciChartSurface.renderableSeries.add(heatmapSeries);
In the code above:
- A 2D array of
zValuesis generated viaArray.from, representing value "intensity" at each polar sector. - PolarUniformHeatmapRenderableSeriesπ is constructed, passing a UniformHeatmapDataSeriesπ and a custom HeatmapColorMapπ with gradient stops, from 0 to 100.
- Polar axes are configured for angular and radial sweep.
- Chart modifiers such as PolarPanModifierπ, PolarZoomExtentsModifierπ, and PolarMouseWheelZoomModifierπ provide interaction.
Polar Heatmap with Legendβ
const COLOR_MAP = new HeatmapColorMap({
minimum: 0,
maximum: 100,
gradientStops: [
{ offset: 0, color: "#000000" },
{ offset: 1, color: "#3333AAAA" },
]
});
// Add a heatmap series to the chart
const heatmapSeries = new PolarUniformHeatmapRenderableSeries(wasmContext, {
dataSeries: new UniformHeatmapDataSeries(wasmContext, {
zValues: Array.from({ length: HEATMAP_HEIGHT }, () => {
return Array.from({ length: HEATMAP_WIDTH }, () => {
return Math.random() * 100;
});
}),
xStart: 0,
yStart: 0,
xStep: 1,
yStep: 1,
}),
colorMap: COLOR_MAP,
});
sciChartSurface.renderableSeries.add(heatmapSeries);
// also pass "scichart-legend-root" as `legendElementId` in drawExample()
const { heatmapLegend } = await HeatmapLegend.create(legendElementId, {
theme: {
...new SciChartJsNavyTheme(),
sciChartBackground: "transparent",
loadingAnimationBackground: "indigo"
},
yAxisOptions: {
isInnerAxis: true,
labelStyle: {
fontSize: 14,
color: "white",
},
axisBorder: {
borderRight: 2,
color: "white",
},
majorTickLineStyle: {
color: "white",
tickSize: 8,
strokeThickness: 2,
},
minorTickLineStyle: {
color: "white",
tickSize: 4,
strokeThickness: 1,
},
},
colorMap: COLOR_MAP
});
You also need an additional HTML element for the legend:
<section>
<div id="scichart-root"></div>
<div id="scichart-legend-root"></div>
</section>
With these CSS properties:
body { margin: 0; }
section { width: 100%; height: 100vh; display: flex; }
#scichart-root { width: 100%; height: 100%; }
#scichart-legend-root { height: 100%; width: 65px; }
In the code above:
- The HeatmapLegendπ component creates an interactive vertical legend, visually linking the z-value color range.
- A custom color map with multiple gradient stops is defined for meaningful value zones.
- Data is generated using a
generateHeatmapDatautility function (see demo source for details). - Both the heatmap and the legend share the same HeatmapColorMapπ instance to keep color mapping consistent.
- Axes are positioned and styled for optimal polar data presentation.
Medical Imaging (Ultrasound Heatmap)β
For the full code walkthrough and live demo, see the Polar Ultrasound Heatmap Example
Tips & Best Practicesβ
- Performance: For large polar heatmaps, enable useLinearTextureFilteringπ for smoother visual transitions, or disable it for sharp, pixelated looks.
- Legend: Use HeatmapLegendπ for accessible, interpretable color mapping.
- Donut charts: Set the innerRadiusπ property of the radial axis for donut-shaped polar heatmaps.
- Manipulate Angles: Use totalAngleπ or totalAngleDegreesπ properties of the angular axis to control the heatmap's angular range. From
0to2Ο radiansor360 degrees. - Interactivity:
- PolarPanModifierπ, PolarZoomExtentsModifierπ, and PolarMouseWheelZoomModifierπ can all be added for advanced user navigation.
- Don't forget about annotations! Use LineArrowAnnotationπ or TextAnnotationπ to highlight specific areas or values in your polar heatmap. All other annotations from SciChart.js are also supported.
Use Casesβ
Polar heatmaps are widely used in:
- Physics and engineering for field visualization
- Medical imaging (e.g. ultrasound, see Polar Ultrasound Demo)
- Environmental mapping
- Radar and sonar data
PolarUniformHeatmapRenderableSeriesπ enables powerful, visually compelling circular heatmaps in JavaScript. With SciChart.js, you can combine rich color gradients, advanced axis control, interaction, and even medical imaging overlays in a performant, interactive chart component.