Angular Polar Range Column Chart

Creates a Angular Polar Range Column 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    PolarCategoryAxis,
10    PolarColumnRenderableSeries,
11    XyyDataSeries,
12    SweepAnimation
13} from "scichart";
14import { appTheme } from "../../../theme";
15
16export const MONTHS_SHORT = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
17export const TEMPERATURE_DATA = {
18    min: [11.81948, 12.034697, 12.778375, 13.789007, 14.624746, 15.316486, 15.89393, 15.517554, 14.725496, 13.799661, 12.776523, 12.119616],
19    max: [12.493054, 12.817261, 14.034957, 14.891214, 15.676935, 16.244125, 16.889472, 16.512617, 15.804098, 14.787963, 13.775281, 13.000732]
20}
21
22export const drawExample = async (rootElement: string | HTMLDivElement) => {
23    const { sciChartSurface, wasmContext } = await SciChartPolarSurface.create(rootElement, {
24        theme: appTheme.SciChartJsTheme,
25        title: "Min and Max surface temperature of each month of 20204",
26        titleStyle: {
27            fontSize: 24
28        }
29    });
30
31    const radialYAxis = new PolarNumericAxis(wasmContext, {
32        polarAxisMode: EPolarAxisMode.Radial,
33        drawLabels: true,
34        labelPrecision: 0,
35        labelStyle: {
36            color: "white"
37        },
38        labelPostfix: "°C",
39        autoTicks: false,
40        majorDelta: 1,
41        drawMinorGridLines: false,
42        drawMajorTickLines: false,
43        drawMinorTickLines: false,
44        majorGridLineStyle: {
45            color: appTheme.DarkIndigo,
46            strokeThickness: 1
47        },
48        visibleRange: new NumberRange(11, 17), // min and max temperatures
49        zoomExtentsToInitialRange: true,
50        innerRadius: 0.05, // donut hole
51        startAngle: Math.PI / 2, // start only after 12 o'clock
52    });
53    sciChartSurface.yAxes.add(radialYAxis);
54
55    const polarXAxis = new PolarCategoryAxis(wasmContext, {
56        polarAxisMode: EPolarAxisMode.Angular, 
57        labels: MONTHS_SHORT,
58        autoTicks: false,
59        majorDelta: 1, // one tick per month    
60
61        // replace minors with majors by not drawing majors and setting this:
62        minorsPerMajor: 2, 
63        drawMajorGridLines: false,
64        drawMinorGridLines: true,
65        minorGridLineStyle: {
66            color: appTheme.DarkIndigo,
67            strokeThickness: 1
68        },
69
70        drawMajorTickLines: false,
71        drawMinorTickLines: false,
72        flippedCoordinates: true, // grow clockwise
73        startAngle: Math.PI / 2 - Math.PI / 12,
74        visibleRange: new NumberRange(0, 12), // 12 months
75        zoomExtentsToInitialRange: true,
76    });
77    sciChartSurface.xAxes.add(polarXAxis);
78
79    // Add series
80    const xValues = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
81    const columns = new PolarColumnRenderableSeries(wasmContext, {
82        dataSeries: new XyyDataSeries(wasmContext, {
83            xValues,
84            yValues: TEMPERATURE_DATA.min,
85            y1Values: TEMPERATURE_DATA.max
86        }),
87        dataPointWidth: 1, 
88        fill: appTheme.VividSkyBlue + "44",
89        stroke: appTheme.VividSkyBlue,
90        animation: new SweepAnimation({ duration: 800 })
91    })
92    sciChartSurface.renderableSeries.add(columns);
93
94    // Add modifiers
95    sciChartSurface.chartModifiers.add(
96        new PolarPanModifier(),
97        new PolarZoomExtentsModifier(),
98        new PolarMouseWheelZoomModifier(),
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 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 Band Chart | JavaScript Charts | SciChart.js | SciChart.js Demo

Angular Polar Band Chart

Angular Polar Band 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.