Angular Polar Band Chart

Creates a Angular Polar Band Chart using SciChart.js, with the following features: DataLabels, Rounded corners, Gradient-palette fill, startup animations.

Fullscreen

Edit

 Edit

Docs

drawExample.ts

angular.ts

theme.ts

Copy to clipboard
Minimise
Fullscreen
1import {
2    PolarMouseWheelZoomModifier,
3    PolarZoomExtentsModifier,
4    PolarPanModifier,
5    PolarNumericAxis,
6    SciChartPolarSurface,
7    EPolarAxisMode, 
8    NumberRange, 
9    EAxisAlignment, 
10    EPolarLabelMode,
11    PolarBandRenderableSeries,
12    XyyDataSeries,
13    PolarLegendModifier,
14    SweepAnimation,
15} from "scichart";
16import { appTheme } from "../../../theme";
17
18export const drawExample = async (rootElement: string | HTMLDivElement) => {
19    const { sciChartSurface, wasmContext } = await SciChartPolarSurface.create(rootElement, {
20        theme: appTheme.SciChartJsTheme,
21    });
22
23    const radialYAxis = new PolarNumericAxis(wasmContext, {
24        polarAxisMode: EPolarAxisMode.Radial,
25        axisAlignment: EAxisAlignment.Right,
26        visibleRange: new NumberRange(0, 6),
27        drawMinorTickLines: false,
28        drawMajorTickLines: false,
29        useNativeText: true,
30        drawMinorGridLines: false,
31        startAngle: Math.PI / 2,
32        zoomExtentsToInitialRange: true,
33        labelPrecision: 0,
34        innerRadius: 0.1, // donut hole
35    });
36    sciChartSurface.yAxes.add(radialYAxis);
37
38    const polarXAxis = new PolarNumericAxis(wasmContext, {
39        polarAxisMode: EPolarAxisMode.Angular,
40        axisAlignment: EAxisAlignment.Top,
41
42        polarLabelMode: EPolarLabelMode.Parallel,
43        visibleRange: new NumberRange(0, 12),
44
45        autoTicks: false,
46        majorDelta: 1,
47
48        useNativeText: true,
49        flippedCoordinates: true, // go clockwise
50        startAngle: Math.PI / 2, // start at 12 o'clock
51        zoomExtentsToInitialRange: true,
52        labelPrecision: 0,
53    });
54    sciChartSurface.xAxes.add(polarXAxis);
55
56    // regular (non-interpolated) band
57    const polarBand1 = new PolarBandRenderableSeries(wasmContext, {
58        dataSeries: new XyyDataSeries(wasmContext, {
59            xValues: [0, 1, 2, 3, 4, 5],
60            yValues: [1, 2, 3, 4, 5, 6],
61            y1Values: [6, 5, 1, 5, 4, 2],
62            dataSeriesName: "Regular Band",
63        }),
64        stroke: appTheme.VividOrange,
65        strokeY1: appTheme.VividSkyBlue,
66        fill: appTheme.VividOrange + "88",
67        fillY1: appTheme.VividSkyBlue + "88",
68        strokeThickness: 3,
69        interpolateLine: false, // not interpolated
70        animation: new SweepAnimation({ duration: 400, delay: 400 }),
71    });
72    sciChartSurface.renderableSeries.add(polarBand1);
73
74    // interpolated band
75    const polarBand2 = new PolarBandRenderableSeries(wasmContext, {
76        dataSeries: new XyyDataSeries(wasmContext, {
77            xValues: [6, 7, 8, 9, 10, 11],
78            yValues: [1, 2, 3, 4, 5, 6],
79            y1Values: [6, 5, 1, 5, 4, 2],
80            dataSeriesName: "Interpolated Band",
81        }),
82        stroke: appTheme.VividPink,
83        strokeY1: appTheme.VividGreen,
84        fill: appTheme.VividPink + "88",
85        fillY1: appTheme.VividGreen + "88",
86        strokeThickness: 3,
87        interpolateLine: true,
88        animation: new SweepAnimation({ duration: 400 }),
89    });
90    sciChartSurface.renderableSeries.add(polarBand2);
91
92    sciChartSurface.chartModifiers.add(
93        new PolarPanModifier(),
94        new PolarZoomExtentsModifier(),
95        new PolarMouseWheelZoomModifier(),
96        new PolarLegendModifier({
97            showCheckboxes: true,
98        })
99    );
100
101    return { sciChartSurface, wasmContext };
102};

See Also: Polar Charts (20 Demos)

Angular Polar Line Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Line Chart

Angular Polar Line Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Spline Line Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Spline Line Chart

Angular Polar Spline Line Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Line Temperature Average | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Line Temperature Average

Angular Polar Line Temperature Average demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Column Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Column Chart

Angular Polar Column Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Column Category Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Column Category Chart

Angular Polar Column Category Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Range Column Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Range Column Chart

Angular Polar Range Column Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Windrose Column Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Windrose Column Chart

Angular Windrose Column Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Sunburst Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Sunburst Chart

Angular Polar Sunburst Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Radial Column Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Radial Column Chart

Angular Radial Column Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Stacked Radial Column Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Stacked Radial Column Chart

Angular Stacked Radial Column Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Mountain Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Mountain Chart

Angular Polar Mountain Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Stacked Mountain Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Stacked Mountain Chart

Angular Polar Stacked Mountain Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Scatter Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Scatter Chart

Angular Polar Scatter Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Radar Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Radar Chart

Angular Polar Radar Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Gauge Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Gauge Chart

Angular Polar Gauge Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Gauge Fifo Dashboard | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Gauge Fifo Dashboard

Angular Polar Gauge Fifo Dashboard demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Uniform Heatmap Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Uniform Heatmap Chart

Angular Polar Uniform Heatmap Chart demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Ultrasound Heatmap | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Ultrasound Heatmap

Angular Polar Ultrasound Heatmap demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Partial Arc | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Partial Arc

Angular Polar Partial Arc demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

Angular Polar Label Modes | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Label Modes

Angular Polar Label Modes demo by SciChart supports gradient fill and paletteproviders for more custom coloring options. Get your free demo now.

SciChart Ltd, 16 Beaufort Court, Admirals Way, Docklands, London, E14 9XL.