Creates a Angular Polar Uniform Heatmap Chart using SciChart's powerful JavaScript Charts and its range of features.
drawExample.ts
angular.ts
theme.ts
generateHeatmapData.ts
1import {
2 PolarMouseWheelZoomModifier,
3 PolarZoomExtentsModifier,
4 PolarPanModifier,
5 PolarNumericAxis,
6 SciChartPolarSurface,
7 EPolarAxisMode,
8 NumberRange,
9 EAxisAlignment,
10 EPolarLabelMode,
11 HeatmapColorMap,
12 UniformHeatmapDataSeries,
13 PolarUniformHeatmapRenderableSeries,
14 HeatmapLegend,
15 Thickness,
16} from "scichart";
17import { appTheme } from "../../../theme";
18import { generateHeatmapData } from "./generateHeatmapData";
19
20const HEATMAP_WIDTH = 300;
21const HEATMAP_HEIGHT = 500;
22
23// Define color map globally to be used in both the chart and the legend
24const COLOR_MAP = new HeatmapColorMap({
25 minimum: 0,
26 maximum: 1,
27 gradientStops: [
28 { offset: 0, color: appTheme.VividPink },
29 { offset: 0.1, color: appTheme.VividOrange },
30 { offset: 0.2, color: appTheme.MutedRed },
31 { offset: 0.5, color: appTheme.VividGreen },
32 { offset: 0.8, color: appTheme.VividSkyBlue },
33 { offset: 0.9, color: appTheme.Indigo },
34 { offset: 1, color: appTheme.DarkIndigo },
35 ]
36})
37
38export const drawExample = async (rootElement: string | HTMLDivElement) => {
39 const { sciChartSurface, wasmContext } = await SciChartPolarSurface.create(rootElement, {
40 theme: appTheme.SciChartJsTheme,
41 padding: new Thickness(0, 60, 0, 0)
42 });
43
44 const radialAxisY = new PolarNumericAxis(wasmContext, {
45 polarAxisMode: EPolarAxisMode.Radial,
46 axisAlignment: EAxisAlignment.Right,
47 visibleRangeLimit: new NumberRange(0, HEATMAP_HEIGHT),
48 useNativeText: true,
49 drawMinorGridLines: false,
50
51 drawMajorTickLines: false,
52 drawMinorTickLines: false,
53 labelPrecision: 0,
54 innerRadius: 0.2
55 });
56 sciChartSurface.yAxes.add(radialAxisY);
57
58 const angularAxisX = new PolarNumericAxis(wasmContext, {
59 polarAxisMode: EPolarAxisMode.Angular,
60 axisAlignment: EAxisAlignment.Top,
61 flippedCoordinates: true,
62 useNativeText: true,
63
64 drawMajorTickLines: false,
65 drawMinorTickLines: false,
66 polarLabelMode: EPolarLabelMode.Parallel,
67 labelPrecision: 0,
68 totalAngle: Math.PI / 2
69 });
70 sciChartSurface.xAxes.add(angularAxisX);
71
72 const heatmapSeries = new PolarUniformHeatmapRenderableSeries(wasmContext, {
73 dataSeries: new UniformHeatmapDataSeries(wasmContext, {
74 zValues: generateHeatmapData(HEATMAP_WIDTH, HEATMAP_HEIGHT, 1999),
75 xStart: 0,
76 xStep: 1,
77 yStart: 0,
78 yStep: 1,
79 }),
80 colorMap: COLOR_MAP,
81 stroke: "white",
82 strokeThickness: 5,
83 });
84 sciChartSurface.renderableSeries.add(heatmapSeries);
85
86 sciChartSurface.chartModifiers.add(
87 new PolarPanModifier(),
88 new PolarZoomExtentsModifier(),
89 new PolarMouseWheelZoomModifier()
90 );
91
92 return { sciChartSurface, wasmContext };
93};
94
95// Draws a Heatmap legend over the <div id={divHeatmapLegend}></div>
96export const drawHeatmapLegend = async (rootElement: string | HTMLDivElement) => {
97 const { heatmapLegend } = await HeatmapLegend.create(rootElement, {
98 theme: {
99 ...appTheme.SciChartJsTheme,
100 sciChartBackground: appTheme.DarkIndigo + "BB",
101 loadingAnimationBackground: appTheme.DarkIndigo + "BB",
102 },
103 yAxisOptions: {
104 isInnerAxis: true,
105 labelStyle: {
106 fontSize: 14,
107 color: appTheme.ForegroundColor,
108 },
109 axisBorder: {
110 borderRight: 2,
111 color: appTheme.ForegroundColor,
112 },
113 majorTickLineStyle: {
114 color: appTheme.ForegroundColor,
115 tickSize: 8,
116 strokeThickness: 2,
117 },
118 minorTickLineStyle: {
119 color: appTheme.ForegroundColor,
120 tickSize: 4,
121 strokeThickness: 1,
122 },
123 },
124 colorMap: COLOR_MAP
125 });
126
127 return { sciChartSurface: heatmapLegend.innerSciChartSurface.sciChartSurface };
128};This Angular example demonstrates a Polar Uniform Heatmap Chart using SciChart.js in a standalone component. The implementation follows Angular's component-based architecture while leveraging SciChart's high-performance rendering.
The chart is integrated via ScichartAngularComponent with [initChart] input bound to the drawExample function. The Angular component maintains a clean template structure while delegating chart creation to SciChart's API. The example could be extended to include the heatmap legend as a separate component.
The Angular implementation preserves all core features: polar heatmap rendering, color mapping, and interactive modifiers. The standalone component approach demonstrates modern Angular practices while utilizing SciChart's WebAssembly-powered rendering.
The example showcases Angular-SciChart integration using the scichart-angular package. Best practices include proper component initialization and potential use of Angular services for data generation.

Explore the React Polar Line Chart example to create data labels, line interpolation, gradient palette stroke and startup animations. Try the SciChart Demo.

Try the Angular Polar Spline Line Chart example to see SciChart's GPU-accelerated rendering in action. Choose a cubic spline or polar interpolation. View demo.

Create an Angular Multi-Cycle Polar Chart to plot data over multiple cycles and visualize patterns over time. This example shows surface temperature by month.

Try the Angular Polar Bar Chart example to render bars in a polar layout with gradient fills and animations. Use SciChart for seamless integration.

Create an Angular Polar Colum Category chart visualizing UK consumer price changes. Try the demo with a custom positive/negative threshold fill and stroke.

Create an Angular Polar Range Column Chart with SciChart. This example displays monthly minimum and maximum temperatures within a Polar layout. Try the demo.

View the Angular Windrose Chart example to display directional data with stacked columns in a polar layout. Try the polar chart demo with customizable labels.

See the Angular Sunburst Chart example with multiple levels, smooth animation transitions and dynamically updating segment colors. Try the SciChart demo.

View the Angular Radial Column Chart example to see the difference that SciChart has to offer. Switch radial and angular axes and add interactive modifiers.

This Angular Stacked Radial Bar Chart example shows Olympic medal data by country. Try the demo for yourself with async initialization and theme application.

The Angular Polar Area Chart example, also known as Nightingale Rose Chart, renders an area series with polar coordinates with interactive legend controls.

Try the Angular Stacked Radial Mountain Chart example to show multiple datasets on a polar layout with a stacked mountain series and animated transitions.

Create an Angular Polar Chart with regular and interpolated error bands. Enhance a standard chart with shaded areas to show upper and lower data boundaries.

Build a Angular Polar Scatter Chart with this example to render multiple scatter series on radial and angular axes. Try the flexible SciChart demo today.

View the Angular Polar Radar Chart example. Also known as the Spider Radar Chart, view the scalability and stability that SciChart has to offer. Try demo.

Create Angular Gauge Charts, including an Angular Circular Gauge Dashboard, with a friendly initialization and responsive design. Give the SciChart demo a go.

View Angular Arc Gauge Charts alongside FIFO Scrolling Charts, all on the same dashboard with real-time, high-performance data rendering. Try the demo.

No description available for this example yet

Create an Angular Polar Partial Arc that bends from a full Polar Circle to a Cartesian-like arc. Try the demo to display an arc segment with Polar coordinates.

Create an Angular Polar Axis Label with SciChart. This demo shows the various label modes for Polar Axes – all optimised for pan, zoom, and mouse wheel.

View the React Polar Map Example using the SciChartReact component. Display geographic data as color-coded triangles on a polar coordinate system. Try demo.