@hpcc-js/chart 3.7.4 → 3.7.6
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 +9 -7
- package/src/Area.md +176 -176
- package/src/Area.ts +12 -12
- package/src/Axis.css +35 -35
- 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 +59 -59
- 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 +8 -8
- package/src/HexBin.md +88 -88
- package/src/HexBin.ts +144 -144
- package/src/Line.css +4 -4
- 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 +14 -14
- 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 +55 -55
- 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 +2 -2
- package/src/WordCloud.md +144 -144
- package/src/WordCloud.ts +268 -268
- package/src/XYAxis.css +40 -40
- 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/SummaryC.md
CHANGED
|
@@ -1,154 +1,154 @@
|
|
|
1
|
-
# SummaryC
|
|
2
|
-
|
|
3
|
-
<!--meta
|
|
4
|
-
|
|
5
|
-
-->
|
|
6
|
-
|
|
7
|
-
SummaryC is commonly used to emphasize significant data points within a dashboard. It requires _labelColumn_ and _valueColumn_ to be specified.
|
|
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 { SummaryC } from "@hpcc-js/chart";
|
|
15
|
-
|
|
16
|
-
new SummaryC()
|
|
17
|
-
.target("placeholder")
|
|
18
|
-
.columns(["Summary", "Score"])
|
|
19
|
-
.data([
|
|
20
|
-
["Cars", 128]
|
|
21
|
-
])
|
|
22
|
-
.labelColumn("Summary")
|
|
23
|
-
.valueColumn("Score")
|
|
24
|
-
.render()
|
|
25
|
-
;
|
|
26
|
-
</script>
|
|
27
|
-
</hpcc-vitepress>
|
|
28
|
-
</ClientOnly>
|
|
29
|
-
|
|
30
|
-
_icon_ can be set to an empty string to prevent the default icon from displaying.
|
|
31
|
-
|
|
32
|
-
_fontSizeRatio_ can be used to set the font size ration between the value size and the label size.
|
|
33
|
-
|
|
34
|
-
<ClientOnly>
|
|
35
|
-
<hpcc-vitepress style="width:100%;height:600px">
|
|
36
|
-
<div id="placeholder" style="height:400px">
|
|
37
|
-
</div>
|
|
38
|
-
<script type="module">
|
|
39
|
-
import { SummaryC } from "@hpcc-js/chart";
|
|
40
|
-
|
|
41
|
-
new SummaryC()
|
|
42
|
-
.target("placeholder")
|
|
43
|
-
.columns(["Summary", "Score"])
|
|
44
|
-
.data([
|
|
45
|
-
["Cars", 128]
|
|
46
|
-
])
|
|
47
|
-
.labelColumn("Summary")
|
|
48
|
-
.valueColumn("Score")
|
|
49
|
-
.icon("")
|
|
50
|
-
.fontSizeRatio(0.38)
|
|
51
|
-
.render()
|
|
52
|
-
;
|
|
53
|
-
</script>
|
|
54
|
-
</hpcc-vitepress>
|
|
55
|
-
</ClientOnly>
|
|
56
|
-
|
|
57
|
-
_icon_ can also be used to assign a FontAwesome icon by class.
|
|
58
|
-
|
|
59
|
-
_iconSizeRatio_ can be used to control the icon's size relative to the overall height.
|
|
60
|
-
|
|
61
|
-
_colorFill_ sets the background color.
|
|
62
|
-
|
|
63
|
-
_colorStroke_ sets the text and icon color.
|
|
64
|
-
|
|
65
|
-
_iconBaseline_ controls the vertical placement of the icon.
|
|
66
|
-
|
|
67
|
-
<ClientOnly>
|
|
68
|
-
<hpcc-vitepress style="width:100%;height:600px">
|
|
69
|
-
<div id="placeholder" style="height:400px">
|
|
70
|
-
</div>
|
|
71
|
-
<script type="module">
|
|
72
|
-
import { SummaryC } from "@hpcc-js/chart";
|
|
73
|
-
|
|
74
|
-
new SummaryC()
|
|
75
|
-
.target("placeholder")
|
|
76
|
-
.columns(["Summary", "Score"])
|
|
77
|
-
.data([
|
|
78
|
-
["Users", 256]
|
|
79
|
-
])
|
|
80
|
-
.labelColumn("Summary")
|
|
81
|
-
.valueColumn("Score")
|
|
82
|
-
.icon("fa-users")
|
|
83
|
-
.colorFill("#eeeeee")
|
|
84
|
-
.colorStroke("#30336b")
|
|
85
|
-
.iconSizeRatio(0.5)
|
|
86
|
-
.iconBaseline("middle")
|
|
87
|
-
.render()
|
|
88
|
-
;
|
|
89
|
-
</script>
|
|
90
|
-
</hpcc-vitepress>
|
|
91
|
-
</ClientOnly>
|
|
92
|
-
|
|
93
|
-
_playInterval_ can be used to cycle through multiple data rows. In the below example the play interval is set to 2000 milliseconds (two seconds).
|
|
94
|
-
|
|
95
|
-
<ClientOnly>
|
|
96
|
-
<hpcc-vitepress style="width:100%;height:600px">
|
|
97
|
-
<div id="placeholder" style="height:400px">
|
|
98
|
-
</div>
|
|
99
|
-
<script type="module">
|
|
100
|
-
import { SummaryC } from "@hpcc-js/chart";
|
|
101
|
-
|
|
102
|
-
new SummaryC()
|
|
103
|
-
.target("placeholder")
|
|
104
|
-
.columns(["Summary", "Score", "Icon"])
|
|
105
|
-
.data([
|
|
106
|
-
["Cars", 128, "fa-automobile"],
|
|
107
|
-
["Trucks", 64, "fa-truck"]
|
|
108
|
-
])
|
|
109
|
-
.labelColumn("Summary")
|
|
110
|
-
.valueColumn("Score")
|
|
111
|
-
.iconColumn("Icon")
|
|
112
|
-
.playInterval(2000)
|
|
113
|
-
.render()
|
|
114
|
-
;
|
|
115
|
-
</script>
|
|
116
|
-
</hpcc-vitepress>
|
|
117
|
-
</ClientOnly>
|
|
118
|
-
|
|
119
|
-
_iconColumn_, _colorFillColumn_ and _colorStrokeColumn_ can be set to designate data row columns for these properties. This allows the properties to change for each data row.
|
|
120
|
-
|
|
121
|
-
<ClientOnly>
|
|
122
|
-
<hpcc-vitepress style="width:100%;height:600px">
|
|
123
|
-
<div id="placeholder" style="height:400px">
|
|
124
|
-
</div>
|
|
125
|
-
<script type="module">
|
|
126
|
-
import { SummaryC } from "@hpcc-js/chart";
|
|
127
|
-
|
|
128
|
-
new SummaryC()
|
|
129
|
-
.target("placeholder")
|
|
130
|
-
.columns(["Summary", "Score", "Icon", "Background", "TextColor"])
|
|
131
|
-
.data([
|
|
132
|
-
["Cold days", 56, "fa-thermometer-0", "#95a5a6", "#34495e"],
|
|
133
|
-
["Cool days", 120, "fa-thermometer-1", "white", "#2980b9"],
|
|
134
|
-
["Warm days", 130, "fa-thermometer-2", "#f1c40f", "#d35400"],
|
|
135
|
-
["Hot days", 59, "fa-thermometer-3", "#c0392b", "#ecf0f1"]
|
|
136
|
-
])
|
|
137
|
-
.labelColumn("Summary")
|
|
138
|
-
.valueColumn("Score")
|
|
139
|
-
.iconColumn("Icon")
|
|
140
|
-
.colorFillColumn("Background")
|
|
141
|
-
.colorStrokeColumn("TextColor")
|
|
142
|
-
.playInterval(2000)
|
|
143
|
-
.render()
|
|
144
|
-
;
|
|
145
|
-
</script>
|
|
146
|
-
</hpcc-vitepress>
|
|
147
|
-
</ClientOnly>
|
|
148
|
-
|
|
149
|
-
## API
|
|
150
|
-
|
|
151
|
-
## Published Properties
|
|
152
|
-
|
|
153
|
-
```@hpcc-js/chart:SummaryC
|
|
154
|
-
```
|
|
1
|
+
# SummaryC
|
|
2
|
+
|
|
3
|
+
<!--meta
|
|
4
|
+
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
SummaryC is commonly used to emphasize significant data points within a dashboard. It requires _labelColumn_ and _valueColumn_ to be specified.
|
|
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 { SummaryC } from "@hpcc-js/chart";
|
|
15
|
+
|
|
16
|
+
new SummaryC()
|
|
17
|
+
.target("placeholder")
|
|
18
|
+
.columns(["Summary", "Score"])
|
|
19
|
+
.data([
|
|
20
|
+
["Cars", 128]
|
|
21
|
+
])
|
|
22
|
+
.labelColumn("Summary")
|
|
23
|
+
.valueColumn("Score")
|
|
24
|
+
.render()
|
|
25
|
+
;
|
|
26
|
+
</script>
|
|
27
|
+
</hpcc-vitepress>
|
|
28
|
+
</ClientOnly>
|
|
29
|
+
|
|
30
|
+
_icon_ can be set to an empty string to prevent the default icon from displaying.
|
|
31
|
+
|
|
32
|
+
_fontSizeRatio_ can be used to set the font size ration between the value size and the label size.
|
|
33
|
+
|
|
34
|
+
<ClientOnly>
|
|
35
|
+
<hpcc-vitepress style="width:100%;height:600px">
|
|
36
|
+
<div id="placeholder" style="height:400px">
|
|
37
|
+
</div>
|
|
38
|
+
<script type="module">
|
|
39
|
+
import { SummaryC } from "@hpcc-js/chart";
|
|
40
|
+
|
|
41
|
+
new SummaryC()
|
|
42
|
+
.target("placeholder")
|
|
43
|
+
.columns(["Summary", "Score"])
|
|
44
|
+
.data([
|
|
45
|
+
["Cars", 128]
|
|
46
|
+
])
|
|
47
|
+
.labelColumn("Summary")
|
|
48
|
+
.valueColumn("Score")
|
|
49
|
+
.icon("")
|
|
50
|
+
.fontSizeRatio(0.38)
|
|
51
|
+
.render()
|
|
52
|
+
;
|
|
53
|
+
</script>
|
|
54
|
+
</hpcc-vitepress>
|
|
55
|
+
</ClientOnly>
|
|
56
|
+
|
|
57
|
+
_icon_ can also be used to assign a FontAwesome icon by class.
|
|
58
|
+
|
|
59
|
+
_iconSizeRatio_ can be used to control the icon's size relative to the overall height.
|
|
60
|
+
|
|
61
|
+
_colorFill_ sets the background color.
|
|
62
|
+
|
|
63
|
+
_colorStroke_ sets the text and icon color.
|
|
64
|
+
|
|
65
|
+
_iconBaseline_ controls the vertical placement of the icon.
|
|
66
|
+
|
|
67
|
+
<ClientOnly>
|
|
68
|
+
<hpcc-vitepress style="width:100%;height:600px">
|
|
69
|
+
<div id="placeholder" style="height:400px">
|
|
70
|
+
</div>
|
|
71
|
+
<script type="module">
|
|
72
|
+
import { SummaryC } from "@hpcc-js/chart";
|
|
73
|
+
|
|
74
|
+
new SummaryC()
|
|
75
|
+
.target("placeholder")
|
|
76
|
+
.columns(["Summary", "Score"])
|
|
77
|
+
.data([
|
|
78
|
+
["Users", 256]
|
|
79
|
+
])
|
|
80
|
+
.labelColumn("Summary")
|
|
81
|
+
.valueColumn("Score")
|
|
82
|
+
.icon("fa-users")
|
|
83
|
+
.colorFill("#eeeeee")
|
|
84
|
+
.colorStroke("#30336b")
|
|
85
|
+
.iconSizeRatio(0.5)
|
|
86
|
+
.iconBaseline("middle")
|
|
87
|
+
.render()
|
|
88
|
+
;
|
|
89
|
+
</script>
|
|
90
|
+
</hpcc-vitepress>
|
|
91
|
+
</ClientOnly>
|
|
92
|
+
|
|
93
|
+
_playInterval_ can be used to cycle through multiple data rows. In the below example the play interval is set to 2000 milliseconds (two seconds).
|
|
94
|
+
|
|
95
|
+
<ClientOnly>
|
|
96
|
+
<hpcc-vitepress style="width:100%;height:600px">
|
|
97
|
+
<div id="placeholder" style="height:400px">
|
|
98
|
+
</div>
|
|
99
|
+
<script type="module">
|
|
100
|
+
import { SummaryC } from "@hpcc-js/chart";
|
|
101
|
+
|
|
102
|
+
new SummaryC()
|
|
103
|
+
.target("placeholder")
|
|
104
|
+
.columns(["Summary", "Score", "Icon"])
|
|
105
|
+
.data([
|
|
106
|
+
["Cars", 128, "fa-automobile"],
|
|
107
|
+
["Trucks", 64, "fa-truck"]
|
|
108
|
+
])
|
|
109
|
+
.labelColumn("Summary")
|
|
110
|
+
.valueColumn("Score")
|
|
111
|
+
.iconColumn("Icon")
|
|
112
|
+
.playInterval(2000)
|
|
113
|
+
.render()
|
|
114
|
+
;
|
|
115
|
+
</script>
|
|
116
|
+
</hpcc-vitepress>
|
|
117
|
+
</ClientOnly>
|
|
118
|
+
|
|
119
|
+
_iconColumn_, _colorFillColumn_ and _colorStrokeColumn_ can be set to designate data row columns for these properties. This allows the properties to change for each data row.
|
|
120
|
+
|
|
121
|
+
<ClientOnly>
|
|
122
|
+
<hpcc-vitepress style="width:100%;height:600px">
|
|
123
|
+
<div id="placeholder" style="height:400px">
|
|
124
|
+
</div>
|
|
125
|
+
<script type="module">
|
|
126
|
+
import { SummaryC } from "@hpcc-js/chart";
|
|
127
|
+
|
|
128
|
+
new SummaryC()
|
|
129
|
+
.target("placeholder")
|
|
130
|
+
.columns(["Summary", "Score", "Icon", "Background", "TextColor"])
|
|
131
|
+
.data([
|
|
132
|
+
["Cold days", 56, "fa-thermometer-0", "#95a5a6", "#34495e"],
|
|
133
|
+
["Cool days", 120, "fa-thermometer-1", "white", "#2980b9"],
|
|
134
|
+
["Warm days", 130, "fa-thermometer-2", "#f1c40f", "#d35400"],
|
|
135
|
+
["Hot days", 59, "fa-thermometer-3", "#c0392b", "#ecf0f1"]
|
|
136
|
+
])
|
|
137
|
+
.labelColumn("Summary")
|
|
138
|
+
.valueColumn("Score")
|
|
139
|
+
.iconColumn("Icon")
|
|
140
|
+
.colorFillColumn("Background")
|
|
141
|
+
.colorStrokeColumn("TextColor")
|
|
142
|
+
.playInterval(2000)
|
|
143
|
+
.render()
|
|
144
|
+
;
|
|
145
|
+
</script>
|
|
146
|
+
</hpcc-vitepress>
|
|
147
|
+
</ClientOnly>
|
|
148
|
+
|
|
149
|
+
## API
|
|
150
|
+
|
|
151
|
+
## Published Properties
|
|
152
|
+
|
|
153
|
+
```@hpcc-js/chart:SummaryC
|
|
154
|
+
```
|