@hpcc-js/chart 3.6.5 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +43 -43
- package/README.md +93 -93
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +5 -5
- package/src/Area.md +176 -176
- package/src/Area.ts +12 -12
- package/src/Axis.css +36 -34
- package/src/Axis.ts +781 -781
- package/src/Bar.md +90 -90
- package/src/Bar.ts +9 -9
- package/src/Bubble.css +16 -16
- package/src/Bubble.md +69 -69
- package/src/Bubble.ts +196 -196
- package/src/BubbleXY.ts +14 -14
- package/src/Bullet.css +60 -60
- package/src/Bullet.md +104 -104
- package/src/Bullet.ts +176 -176
- package/src/Column.css +44 -44
- package/src/Column.md +90 -90
- package/src/Column.ts +684 -684
- package/src/Contour.md +88 -88
- package/src/Contour.ts +97 -97
- package/src/D3Cloud.ts +403 -403
- package/src/Gantt.md +119 -119
- package/src/Gantt.ts +14 -14
- package/src/Gauge.md +148 -148
- package/src/Gauge.ts +368 -368
- package/src/HalfPie.md +62 -62
- package/src/HalfPie.ts +26 -26
- package/src/Heat.md +42 -42
- package/src/Heat.ts +283 -283
- package/src/HexBin.css +9 -9
- package/src/HexBin.md +88 -88
- package/src/HexBin.ts +144 -144
- package/src/Line.css +5 -6
- package/src/Line.md +170 -170
- package/src/Line.ts +14 -14
- package/src/Pie.css +50 -50
- package/src/Pie.md +88 -88
- package/src/Pie.ts +546 -546
- package/src/QuarterPie.md +61 -61
- package/src/QuarterPie.ts +35 -35
- package/src/QuartileCandlestick.md +129 -129
- package/src/QuartileCandlestick.ts +349 -349
- package/src/Radar.css +15 -15
- package/src/Radar.md +104 -104
- package/src/Radar.ts +336 -336
- package/src/RadialBar.css +25 -25
- package/src/RadialBar.md +91 -91
- package/src/RadialBar.ts +217 -217
- package/src/Scatter.css +42 -42
- package/src/Scatter.md +163 -163
- package/src/Scatter.ts +412 -412
- package/src/StatChart.md +117 -117
- package/src/StatChart.ts +261 -261
- package/src/Step.md +163 -163
- package/src/Step.ts +12 -12
- package/src/Summary.css +56 -56
- package/src/Summary.md +219 -219
- package/src/Summary.ts +322 -322
- package/src/SummaryC.md +154 -154
- package/src/SummaryC.ts +240 -240
- package/src/WordCloud.css +3 -3
- package/src/WordCloud.md +144 -144
- package/src/WordCloud.ts +268 -268
- package/src/XYAxis.css +41 -41
- package/src/XYAxis.md +149 -149
- package/src/XYAxis.ts +809 -809
- package/src/__package__.ts +3 -3
- package/src/__tests__/heat.ts +71 -71
- package/src/__tests__/index.ts +3 -3
- package/src/__tests__/pie.ts +20 -20
- package/src/__tests__/stat.ts +16 -16
- package/src/__tests__/test3.ts +68 -68
- package/src/index.ts +28 -28
- package/src/test.ts +70 -70
- package/src/timeFormats.ts +26 -26
package/src/Line.md
CHANGED
|
@@ -1,170 +1,170 @@
|
|
|
1
|
-
# Line
|
|
2
|
-
|
|
3
|
-
<!--meta
|
|
4
|
-
|
|
5
|
-
-->
|
|
6
|
-
|
|
7
|
-
Line, [Area](./Area.md), [Scatter](./Scatter.md) and [Step](./Step.md) serve a similar purpose. They display continuous data along a categorical or continuous axis.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<ClientOnly>
|
|
11
|
-
<hpcc-vitepress style="width:100%;height:600px">
|
|
12
|
-
<div id="placeholder" style="height:400px">
|
|
13
|
-
</div>
|
|
14
|
-
<script type="module">
|
|
15
|
-
import { Line } from "@hpcc-js/chart";
|
|
16
|
-
|
|
17
|
-
new Line()
|
|
18
|
-
.target("placeholder")
|
|
19
|
-
.columns(["Category", "Value"])
|
|
20
|
-
.data([
|
|
21
|
-
["A", 34],
|
|
22
|
-
["B", 55],
|
|
23
|
-
["C", 89],
|
|
24
|
-
["D", 144]
|
|
25
|
-
])
|
|
26
|
-
.render()
|
|
27
|
-
;
|
|
28
|
-
</script>
|
|
29
|
-
</hpcc-vitepress>
|
|
30
|
-
</ClientOnly>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
Line supports n-number of numeric values per data row. A series is created for each column as needed.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
<ClientOnly>
|
|
37
|
-
<hpcc-vitepress style="width:100%;height:600px">
|
|
38
|
-
<div id="placeholder" style="height:400px">
|
|
39
|
-
</div>
|
|
40
|
-
<script type="module">
|
|
41
|
-
import { Line } from "@hpcc-js/chart";
|
|
42
|
-
|
|
43
|
-
new Line()
|
|
44
|
-
.target("placeholder")
|
|
45
|
-
.columns(["Category", "Value 1", "Value 2", "Value 3"])
|
|
46
|
-
.data([
|
|
47
|
-
["A", 34, 90, 82],
|
|
48
|
-
["B", 55, 50, 65],
|
|
49
|
-
["C", 89, 75, 43],
|
|
50
|
-
["D", 144, 66, 56]
|
|
51
|
-
])
|
|
52
|
-
.render()
|
|
53
|
-
;
|
|
54
|
-
</script>
|
|
55
|
-
</hpcc-vitepress>
|
|
56
|
-
</ClientOnly>
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
_pointShape_ can be used to specify the shape of each data point (see the property list below for potential values).
|
|
60
|
-
|
|
61
|
-
_pointSize_ can be used to set the size of each data point's shape.
|
|
62
|
-
|
|
63
|
-
_showValue_ specifies whether or not to display the value above each data point.
|
|
64
|
-
|
|
65
|
-
_yAxisDomainPadding_ can be used to reserve a percentage of the top and bottom edges for white space.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
<ClientOnly>
|
|
69
|
-
<hpcc-vitepress style="width:100%;height:600px">
|
|
70
|
-
<div id="placeholder" style="height:400px">
|
|
71
|
-
</div>
|
|
72
|
-
<script type="module">
|
|
73
|
-
import { Line } from "@hpcc-js/chart";
|
|
74
|
-
|
|
75
|
-
new Line()
|
|
76
|
-
.target("placeholder")
|
|
77
|
-
.columns(["Category", "Value", "Value 2"])
|
|
78
|
-
.data([
|
|
79
|
-
["A", 34, 350],
|
|
80
|
-
["B", 55, 380],
|
|
81
|
-
["C", 89, 390],
|
|
82
|
-
["D", 98, 410]
|
|
83
|
-
])
|
|
84
|
-
.pointShape("circle")
|
|
85
|
-
.pointSize(2)
|
|
86
|
-
.showValue(true)
|
|
87
|
-
.render()
|
|
88
|
-
;
|
|
89
|
-
</script>
|
|
90
|
-
</hpcc-vitepress>
|
|
91
|
-
</ClientOnly>
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
_interpolate_ can be used to specify which line interpolation mode is used to draw the connecting line between data points (see the property list below for potential values).
|
|
95
|
-
|
|
96
|
-
_pointDarken_ can be set to 'false' to disable the slight darkening effect applied to each data point.
|
|
97
|
-
|
|
98
|
-
_xAxisDomainPadding_ can be used to reserve a percentage of the left and right edges for white space.
|
|
99
|
-
|
|
100
|
-
_showValue_ along with _valueBaseline("central")_ places the values at the center of each data point.
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
<ClientOnly>
|
|
104
|
-
<hpcc-vitepress style="width:100%;height:600px">
|
|
105
|
-
<div id="placeholder" style="height:400px">
|
|
106
|
-
</div>
|
|
107
|
-
<script type="module">
|
|
108
|
-
import { Line } from "@hpcc-js/chart";
|
|
109
|
-
|
|
110
|
-
new Line()
|
|
111
|
-
.target("placeholder")
|
|
112
|
-
.columns(["Value 1", "Value 2"])
|
|
113
|
-
.data([
|
|
114
|
-
[144, 90],
|
|
115
|
-
[89, 50],
|
|
116
|
-
[55, 75],
|
|
117
|
-
[34, 66]
|
|
118
|
-
])
|
|
119
|
-
.paletteID("FlatUI_German")
|
|
120
|
-
.xAxisType("linear")
|
|
121
|
-
.xAxisDomainPadding(5)
|
|
122
|
-
.pointShape("rectangle")
|
|
123
|
-
.pointSize(20)
|
|
124
|
-
.pointDarken(false)
|
|
125
|
-
.showValue(true)
|
|
126
|
-
.valueBaseline("central")
|
|
127
|
-
.interpolate("monotone")
|
|
128
|
-
.render()
|
|
129
|
-
;
|
|
130
|
-
</script>
|
|
131
|
-
</hpcc-vitepress>
|
|
132
|
-
</ClientOnly>
|
|
133
|
-
|
|
134
|
-
For documentation on axis-specific properties, like those used in the below example, take a look at the [Axis Documentation](./XYAxis.md).
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
<ClientOnly>
|
|
138
|
-
<hpcc-vitepress style="width:100%;height:600px">
|
|
139
|
-
<div id="placeholder" style="height:400px">
|
|
140
|
-
</div>
|
|
141
|
-
<script type="module">
|
|
142
|
-
import { Line } from "@hpcc-js/chart";
|
|
143
|
-
|
|
144
|
-
new Line()
|
|
145
|
-
.target("placeholder")
|
|
146
|
-
.columns(["Value 1", "Value 2"])
|
|
147
|
-
.data([
|
|
148
|
-
[144, 90],
|
|
149
|
-
[89, 50],
|
|
150
|
-
[55, 75],
|
|
151
|
-
[34, 66]
|
|
152
|
-
])
|
|
153
|
-
.xAxisType("linear")
|
|
154
|
-
.xAxisTitle("X-Axis Title")
|
|
155
|
-
.yAxisTitle("Y-Axis Title")
|
|
156
|
-
.xAxisTickCount(30)
|
|
157
|
-
.xAxisOverlapMode("rotate")
|
|
158
|
-
.xAxisLabelRotation(90)
|
|
159
|
-
.pointShape("circle")
|
|
160
|
-
.render()
|
|
161
|
-
;
|
|
162
|
-
</script>
|
|
163
|
-
</hpcc-vitepress>
|
|
164
|
-
</ClientOnly>
|
|
165
|
-
|
|
166
|
-
## API
|
|
167
|
-
|
|
168
|
-
## Published Properties
|
|
169
|
-
```@hpcc-js/chart:Line
|
|
170
|
-
```
|
|
1
|
+
# Line
|
|
2
|
+
|
|
3
|
+
<!--meta
|
|
4
|
+
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
Line, [Area](./Area.md), [Scatter](./Scatter.md) and [Step](./Step.md) serve a similar purpose. They display continuous data along a categorical or continuous axis.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
<ClientOnly>
|
|
11
|
+
<hpcc-vitepress style="width:100%;height:600px">
|
|
12
|
+
<div id="placeholder" style="height:400px">
|
|
13
|
+
</div>
|
|
14
|
+
<script type="module">
|
|
15
|
+
import { Line } from "@hpcc-js/chart";
|
|
16
|
+
|
|
17
|
+
new Line()
|
|
18
|
+
.target("placeholder")
|
|
19
|
+
.columns(["Category", "Value"])
|
|
20
|
+
.data([
|
|
21
|
+
["A", 34],
|
|
22
|
+
["B", 55],
|
|
23
|
+
["C", 89],
|
|
24
|
+
["D", 144]
|
|
25
|
+
])
|
|
26
|
+
.render()
|
|
27
|
+
;
|
|
28
|
+
</script>
|
|
29
|
+
</hpcc-vitepress>
|
|
30
|
+
</ClientOnly>
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
Line supports n-number of numeric values per data row. A series is created for each column as needed.
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
<ClientOnly>
|
|
37
|
+
<hpcc-vitepress style="width:100%;height:600px">
|
|
38
|
+
<div id="placeholder" style="height:400px">
|
|
39
|
+
</div>
|
|
40
|
+
<script type="module">
|
|
41
|
+
import { Line } from "@hpcc-js/chart";
|
|
42
|
+
|
|
43
|
+
new Line()
|
|
44
|
+
.target("placeholder")
|
|
45
|
+
.columns(["Category", "Value 1", "Value 2", "Value 3"])
|
|
46
|
+
.data([
|
|
47
|
+
["A", 34, 90, 82],
|
|
48
|
+
["B", 55, 50, 65],
|
|
49
|
+
["C", 89, 75, 43],
|
|
50
|
+
["D", 144, 66, 56]
|
|
51
|
+
])
|
|
52
|
+
.render()
|
|
53
|
+
;
|
|
54
|
+
</script>
|
|
55
|
+
</hpcc-vitepress>
|
|
56
|
+
</ClientOnly>
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
_pointShape_ can be used to specify the shape of each data point (see the property list below for potential values).
|
|
60
|
+
|
|
61
|
+
_pointSize_ can be used to set the size of each data point's shape.
|
|
62
|
+
|
|
63
|
+
_showValue_ specifies whether or not to display the value above each data point.
|
|
64
|
+
|
|
65
|
+
_yAxisDomainPadding_ can be used to reserve a percentage of the top and bottom edges for white space.
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
<ClientOnly>
|
|
69
|
+
<hpcc-vitepress style="width:100%;height:600px">
|
|
70
|
+
<div id="placeholder" style="height:400px">
|
|
71
|
+
</div>
|
|
72
|
+
<script type="module">
|
|
73
|
+
import { Line } from "@hpcc-js/chart";
|
|
74
|
+
|
|
75
|
+
new Line()
|
|
76
|
+
.target("placeholder")
|
|
77
|
+
.columns(["Category", "Value", "Value 2"])
|
|
78
|
+
.data([
|
|
79
|
+
["A", 34, 350],
|
|
80
|
+
["B", 55, 380],
|
|
81
|
+
["C", 89, 390],
|
|
82
|
+
["D", 98, 410]
|
|
83
|
+
])
|
|
84
|
+
.pointShape("circle")
|
|
85
|
+
.pointSize(2)
|
|
86
|
+
.showValue(true)
|
|
87
|
+
.render()
|
|
88
|
+
;
|
|
89
|
+
</script>
|
|
90
|
+
</hpcc-vitepress>
|
|
91
|
+
</ClientOnly>
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
_interpolate_ can be used to specify which line interpolation mode is used to draw the connecting line between data points (see the property list below for potential values).
|
|
95
|
+
|
|
96
|
+
_pointDarken_ can be set to 'false' to disable the slight darkening effect applied to each data point.
|
|
97
|
+
|
|
98
|
+
_xAxisDomainPadding_ can be used to reserve a percentage of the left and right edges for white space.
|
|
99
|
+
|
|
100
|
+
_showValue_ along with _valueBaseline("central")_ places the values at the center of each data point.
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
<ClientOnly>
|
|
104
|
+
<hpcc-vitepress style="width:100%;height:600px">
|
|
105
|
+
<div id="placeholder" style="height:400px">
|
|
106
|
+
</div>
|
|
107
|
+
<script type="module">
|
|
108
|
+
import { Line } from "@hpcc-js/chart";
|
|
109
|
+
|
|
110
|
+
new Line()
|
|
111
|
+
.target("placeholder")
|
|
112
|
+
.columns(["Value 1", "Value 2"])
|
|
113
|
+
.data([
|
|
114
|
+
[144, 90],
|
|
115
|
+
[89, 50],
|
|
116
|
+
[55, 75],
|
|
117
|
+
[34, 66]
|
|
118
|
+
])
|
|
119
|
+
.paletteID("FlatUI_German")
|
|
120
|
+
.xAxisType("linear")
|
|
121
|
+
.xAxisDomainPadding(5)
|
|
122
|
+
.pointShape("rectangle")
|
|
123
|
+
.pointSize(20)
|
|
124
|
+
.pointDarken(false)
|
|
125
|
+
.showValue(true)
|
|
126
|
+
.valueBaseline("central")
|
|
127
|
+
.interpolate("monotone")
|
|
128
|
+
.render()
|
|
129
|
+
;
|
|
130
|
+
</script>
|
|
131
|
+
</hpcc-vitepress>
|
|
132
|
+
</ClientOnly>
|
|
133
|
+
|
|
134
|
+
For documentation on axis-specific properties, like those used in the below example, take a look at the [Axis Documentation](./XYAxis.md).
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
<ClientOnly>
|
|
138
|
+
<hpcc-vitepress style="width:100%;height:600px">
|
|
139
|
+
<div id="placeholder" style="height:400px">
|
|
140
|
+
</div>
|
|
141
|
+
<script type="module">
|
|
142
|
+
import { Line } from "@hpcc-js/chart";
|
|
143
|
+
|
|
144
|
+
new Line()
|
|
145
|
+
.target("placeholder")
|
|
146
|
+
.columns(["Value 1", "Value 2"])
|
|
147
|
+
.data([
|
|
148
|
+
[144, 90],
|
|
149
|
+
[89, 50],
|
|
150
|
+
[55, 75],
|
|
151
|
+
[34, 66]
|
|
152
|
+
])
|
|
153
|
+
.xAxisType("linear")
|
|
154
|
+
.xAxisTitle("X-Axis Title")
|
|
155
|
+
.yAxisTitle("Y-Axis Title")
|
|
156
|
+
.xAxisTickCount(30)
|
|
157
|
+
.xAxisOverlapMode("rotate")
|
|
158
|
+
.xAxisLabelRotation(90)
|
|
159
|
+
.pointShape("circle")
|
|
160
|
+
.render()
|
|
161
|
+
;
|
|
162
|
+
</script>
|
|
163
|
+
</hpcc-vitepress>
|
|
164
|
+
</ClientOnly>
|
|
165
|
+
|
|
166
|
+
## API
|
|
167
|
+
|
|
168
|
+
## Published Properties
|
|
169
|
+
```@hpcc-js/chart:Line
|
|
170
|
+
```
|
package/src/Line.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Scatter } from "./Scatter.ts";
|
|
2
|
-
|
|
3
|
-
import "../src/Line.css";
|
|
4
|
-
|
|
5
|
-
export class Line extends Scatter {
|
|
6
|
-
constructor() {
|
|
7
|
-
super();
|
|
8
|
-
|
|
9
|
-
this
|
|
10
|
-
.interpolate_default("linear")
|
|
11
|
-
;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
Line.prototype._class += " chart_Line";
|
|
1
|
+
import { Scatter } from "./Scatter.ts";
|
|
2
|
+
|
|
3
|
+
import "../src/Line.css";
|
|
4
|
+
|
|
5
|
+
export class Line extends Scatter {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
|
|
9
|
+
this
|
|
10
|
+
.interpolate_default("linear")
|
|
11
|
+
;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
Line.prototype._class += " chart_Line";
|
package/src/Pie.css
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
.chart_Pie path {
|
|
2
|
-
cursor: pointer;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.chart_Pie>g>text {
|
|
6
|
-
cursor: pointer;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.chart_Pie .arc path {
|
|
10
|
-
stroke: transparent;
|
|
11
|
-
stroke-width: 2px;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.chart_Pie .arc.selected path {
|
|
15
|
-
stroke: #dc3545 !important;
|
|
16
|
-
stroke-width: 3px !important;
|
|
17
|
-
paint-order: fill stroke !important;
|
|
18
|
-
transition: all 0.2s ease;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.chart_Pie polyline {
|
|
22
|
-
opacity: .3;
|
|
23
|
-
stroke: black;
|
|
24
|
-
stroke-width: 2px;
|
|
25
|
-
fill: none;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.chart_Pie .arc:hover path {
|
|
29
|
-
stroke: rgba(108, 117, 125, 0.6);
|
|
30
|
-
stroke-width: 2px;
|
|
31
|
-
filter: brightness(1.05);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.chart_Pie .arc:focus path {
|
|
35
|
-
stroke: #007bff !important;
|
|
36
|
-
stroke-width: 3px !important;
|
|
37
|
-
paint-order: fill stroke !important;
|
|
38
|
-
transition: all 0.2s ease;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.chart_Pie .arc.selected:focus path {
|
|
42
|
-
stroke: #6f42c1 !important;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.chart_Pie .arc:focus-visible {
|
|
46
|
-
outline: none;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.chart_Pie .arc:active {
|
|
50
|
-
outline: none !important;
|
|
1
|
+
.chart_Pie path {
|
|
2
|
+
cursor: pointer;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.chart_Pie>g>text {
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.chart_Pie .arc path {
|
|
10
|
+
stroke: transparent;
|
|
11
|
+
stroke-width: 2px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.chart_Pie .arc.selected path {
|
|
15
|
+
stroke: #dc3545 !important;
|
|
16
|
+
stroke-width: 3px !important;
|
|
17
|
+
paint-order: fill stroke !important;
|
|
18
|
+
transition: all 0.2s ease;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.chart_Pie polyline {
|
|
22
|
+
opacity: .3;
|
|
23
|
+
stroke: black;
|
|
24
|
+
stroke-width: 2px;
|
|
25
|
+
fill: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.chart_Pie .arc:hover path {
|
|
29
|
+
stroke: rgba(108, 117, 125, 0.6);
|
|
30
|
+
stroke-width: 2px;
|
|
31
|
+
filter: brightness(1.05);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.chart_Pie .arc:focus path {
|
|
35
|
+
stroke: #007bff !important;
|
|
36
|
+
stroke-width: 3px !important;
|
|
37
|
+
paint-order: fill stroke !important;
|
|
38
|
+
transition: all 0.2s ease;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.chart_Pie .arc.selected:focus path {
|
|
42
|
+
stroke: #6f42c1 !important;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.chart_Pie .arc:focus-visible {
|
|
46
|
+
outline: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.chart_Pie .arc:active {
|
|
50
|
+
outline: none !important;
|
|
51
51
|
}
|
package/src/Pie.md
CHANGED
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
# Pie
|
|
2
|
-
|
|
3
|
-
<!--meta
|
|
4
|
-
|
|
5
|
-
-->
|
|
6
|
-
|
|
7
|
-
A circular statistical graphic, which is divided into slices to illustrate numerical proportion. In a pie chart, the arc length of each slice, is proportional to the quantity it represents. (See also: [HalfPie](./HalfPie.md) and [QuarterPie](./QuarterPie.md) )
|
|
8
|
-
|
|
9
|
-
<ClientOnly>
|
|
10
|
-
<hpcc-vitepress style="width:100%;height:600px">
|
|
11
|
-
<div id="placeholder" style="height:400px">
|
|
12
|
-
</div>
|
|
13
|
-
<script type="module">
|
|
14
|
-
import { Pie } from "@hpcc-js/chart";
|
|
15
|
-
|
|
16
|
-
new Pie()
|
|
17
|
-
.target("placeholder")
|
|
18
|
-
.columns(["Category", "Value"])
|
|
19
|
-
.data([
|
|
20
|
-
["A", 34],
|
|
21
|
-
["B", 55],
|
|
22
|
-
["C", 89],
|
|
23
|
-
["D", 144]
|
|
24
|
-
])
|
|
25
|
-
.render()
|
|
26
|
-
;
|
|
27
|
-
</script>
|
|
28
|
-
</hpcc-vitepress>
|
|
29
|
-
</ClientOnly>
|
|
30
|
-
|
|
31
|
-
In the below example the 'showSeriesValue' is used to display the value next to each slice label.
|
|
32
|
-
|
|
33
|
-
<ClientOnly>
|
|
34
|
-
<hpcc-vitepress style="width:100%;height:600px">
|
|
35
|
-
<div id="placeholder" style="height:400px">
|
|
36
|
-
</div>
|
|
37
|
-
<script type="module">
|
|
38
|
-
import { Pie } from "@hpcc-js/chart";
|
|
39
|
-
|
|
40
|
-
new Pie()
|
|
41
|
-
.target("placeholder")
|
|
42
|
-
.columns(["Category", "Value"])
|
|
43
|
-
.data([
|
|
44
|
-
["A", 34],
|
|
45
|
-
["B", 55],
|
|
46
|
-
["C", 89],
|
|
47
|
-
["D", 144]
|
|
48
|
-
])
|
|
49
|
-
.showSeriesValue(true)
|
|
50
|
-
.render()
|
|
51
|
-
;
|
|
52
|
-
</script>
|
|
53
|
-
</hpcc-vitepress>
|
|
54
|
-
</ClientOnly>
|
|
55
|
-
|
|
56
|
-
In the below example the 'innerRadius' is used to transform the pie chart into a donut chart.
|
|
57
|
-
'showSeriesPercentage' displays the percentage next to each slice label.
|
|
58
|
-
|
|
59
|
-
<ClientOnly>
|
|
60
|
-
<hpcc-vitepress style="width:100%;height:600px">
|
|
61
|
-
<div id="placeholder" style="height:400px">
|
|
62
|
-
</div>
|
|
63
|
-
<script type="module">
|
|
64
|
-
import { Pie } from "@hpcc-js/chart";
|
|
65
|
-
|
|
66
|
-
new Pie()
|
|
67
|
-
.target("placeholder")
|
|
68
|
-
.columns(["Category", "Value"])
|
|
69
|
-
.data([
|
|
70
|
-
["A", 34],
|
|
71
|
-
["B", 55],
|
|
72
|
-
["C", 89],
|
|
73
|
-
["D", 144]
|
|
74
|
-
])
|
|
75
|
-
.innerRadius(62)
|
|
76
|
-
.showSeriesPercentage(true)
|
|
77
|
-
.render()
|
|
78
|
-
;
|
|
79
|
-
</script>
|
|
80
|
-
</hpcc-vitepress>
|
|
81
|
-
</ClientOnly>
|
|
82
|
-
|
|
83
|
-
## API
|
|
84
|
-
|
|
85
|
-
## Published Properties
|
|
86
|
-
|
|
87
|
-
```@hpcc-js/chart:Pie
|
|
88
|
-
```
|
|
1
|
+
# Pie
|
|
2
|
+
|
|
3
|
+
<!--meta
|
|
4
|
+
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
A circular statistical graphic, which is divided into slices to illustrate numerical proportion. In a pie chart, the arc length of each slice, is proportional to the quantity it represents. (See also: [HalfPie](./HalfPie.md) and [QuarterPie](./QuarterPie.md) )
|
|
8
|
+
|
|
9
|
+
<ClientOnly>
|
|
10
|
+
<hpcc-vitepress style="width:100%;height:600px">
|
|
11
|
+
<div id="placeholder" style="height:400px">
|
|
12
|
+
</div>
|
|
13
|
+
<script type="module">
|
|
14
|
+
import { Pie } from "@hpcc-js/chart";
|
|
15
|
+
|
|
16
|
+
new Pie()
|
|
17
|
+
.target("placeholder")
|
|
18
|
+
.columns(["Category", "Value"])
|
|
19
|
+
.data([
|
|
20
|
+
["A", 34],
|
|
21
|
+
["B", 55],
|
|
22
|
+
["C", 89],
|
|
23
|
+
["D", 144]
|
|
24
|
+
])
|
|
25
|
+
.render()
|
|
26
|
+
;
|
|
27
|
+
</script>
|
|
28
|
+
</hpcc-vitepress>
|
|
29
|
+
</ClientOnly>
|
|
30
|
+
|
|
31
|
+
In the below example the 'showSeriesValue' is used to display the value next to each slice label.
|
|
32
|
+
|
|
33
|
+
<ClientOnly>
|
|
34
|
+
<hpcc-vitepress style="width:100%;height:600px">
|
|
35
|
+
<div id="placeholder" style="height:400px">
|
|
36
|
+
</div>
|
|
37
|
+
<script type="module">
|
|
38
|
+
import { Pie } from "@hpcc-js/chart";
|
|
39
|
+
|
|
40
|
+
new Pie()
|
|
41
|
+
.target("placeholder")
|
|
42
|
+
.columns(["Category", "Value"])
|
|
43
|
+
.data([
|
|
44
|
+
["A", 34],
|
|
45
|
+
["B", 55],
|
|
46
|
+
["C", 89],
|
|
47
|
+
["D", 144]
|
|
48
|
+
])
|
|
49
|
+
.showSeriesValue(true)
|
|
50
|
+
.render()
|
|
51
|
+
;
|
|
52
|
+
</script>
|
|
53
|
+
</hpcc-vitepress>
|
|
54
|
+
</ClientOnly>
|
|
55
|
+
|
|
56
|
+
In the below example the 'innerRadius' is used to transform the pie chart into a donut chart.
|
|
57
|
+
'showSeriesPercentage' displays the percentage next to each slice label.
|
|
58
|
+
|
|
59
|
+
<ClientOnly>
|
|
60
|
+
<hpcc-vitepress style="width:100%;height:600px">
|
|
61
|
+
<div id="placeholder" style="height:400px">
|
|
62
|
+
</div>
|
|
63
|
+
<script type="module">
|
|
64
|
+
import { Pie } from "@hpcc-js/chart";
|
|
65
|
+
|
|
66
|
+
new Pie()
|
|
67
|
+
.target("placeholder")
|
|
68
|
+
.columns(["Category", "Value"])
|
|
69
|
+
.data([
|
|
70
|
+
["A", 34],
|
|
71
|
+
["B", 55],
|
|
72
|
+
["C", 89],
|
|
73
|
+
["D", 144]
|
|
74
|
+
])
|
|
75
|
+
.innerRadius(62)
|
|
76
|
+
.showSeriesPercentage(true)
|
|
77
|
+
.render()
|
|
78
|
+
;
|
|
79
|
+
</script>
|
|
80
|
+
</hpcc-vitepress>
|
|
81
|
+
</ClientOnly>
|
|
82
|
+
|
|
83
|
+
## API
|
|
84
|
+
|
|
85
|
+
## Published Properties
|
|
86
|
+
|
|
87
|
+
```@hpcc-js/chart:Pie
|
|
88
|
+
```
|