@hpcc-js/chart 3.6.3 → 3.6.5
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 +6 -6
- package/src/Area.md +176 -176
- package/src/Area.ts +12 -12
- package/src/Axis.css +34 -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 +6 -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/Bar.md
CHANGED
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
# Bar
|
|
2
|
-
|
|
3
|
-
<!--meta
|
|
4
|
-
|
|
5
|
-
-->
|
|
6
|
-
|
|
7
|
-
Bar and [Column](./Column) are effectively the same class, but have one different default value - their _orientation_. They support all of the same properties.
|
|
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 { Bar } from "@hpcc-js/chart";
|
|
15
|
-
|
|
16
|
-
new Bar()
|
|
17
|
-
.target("placeholder")
|
|
18
|
-
.columns(["Category", "Value"])
|
|
19
|
-
.data([
|
|
20
|
-
["A", 34],
|
|
21
|
-
["B", 55],
|
|
22
|
-
["C", 89],
|
|
23
|
-
["D", 144]
|
|
24
|
-
])
|
|
25
|
-
.yAxisDomainLow(0)
|
|
26
|
-
.render()
|
|
27
|
-
;
|
|
28
|
-
</script>
|
|
29
|
-
</hpcc-vitepress>
|
|
30
|
-
</ClientOnly>
|
|
31
|
-
|
|
32
|
-
Two or more series are commonly compared with a bar chart.
|
|
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 { Bar } from "@hpcc-js/chart";
|
|
40
|
-
|
|
41
|
-
new Bar()
|
|
42
|
-
.target("placeholder")
|
|
43
|
-
.columns(["Category", "Value 1", "Value 2"])
|
|
44
|
-
.data([
|
|
45
|
-
["A", 34, 90],
|
|
46
|
-
["B", 55, 50],
|
|
47
|
-
["C", 89, 75],
|
|
48
|
-
["D", 144, 66]
|
|
49
|
-
])
|
|
50
|
-
.xAxisOrdinalPaddingInner(0.38)
|
|
51
|
-
.xAxisOrdinalPaddingOuter(0.62)
|
|
52
|
-
.xAxisFocus(true)
|
|
53
|
-
.render()
|
|
54
|
-
;
|
|
55
|
-
</script>
|
|
56
|
-
</hpcc-vitepress>
|
|
57
|
-
</ClientOnly>
|
|
58
|
-
|
|
59
|
-
A bar chart supports n-number of numeric values per data row. A series is created for each column as needed. In the below example the series' are stacked together using the _yAxisStacked_ property.
|
|
60
|
-
|
|
61
|
-
<ClientOnly>
|
|
62
|
-
<hpcc-vitepress style="width:100%;height:600px">
|
|
63
|
-
<div id="placeholder" style="height:400px">
|
|
64
|
-
</div>
|
|
65
|
-
<script type="module">
|
|
66
|
-
import { Bar } from "@hpcc-js/chart";
|
|
67
|
-
|
|
68
|
-
new Bar()
|
|
69
|
-
.target("placeholder")
|
|
70
|
-
.columns(["Category", "Value 1", "Value 2", "Value 3"])
|
|
71
|
-
.data([
|
|
72
|
-
["A", 34, 90, 82],
|
|
73
|
-
["B", 55, 50, 65],
|
|
74
|
-
["C", 89, 75, 43],
|
|
75
|
-
["D", 144, 66, 56]
|
|
76
|
-
])
|
|
77
|
-
.showValue(true)
|
|
78
|
-
.valueCentered(true)
|
|
79
|
-
.yAxisStacked(true)
|
|
80
|
-
.render()
|
|
81
|
-
;
|
|
82
|
-
</script>
|
|
83
|
-
</hpcc-vitepress>
|
|
84
|
-
</ClientOnly>
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
## API
|
|
88
|
-
|
|
89
|
-
## Published Properties
|
|
90
|
-
```@hpcc-js/chart:Bar
|
|
1
|
+
# Bar
|
|
2
|
+
|
|
3
|
+
<!--meta
|
|
4
|
+
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
Bar and [Column](./Column) are effectively the same class, but have one different default value - their _orientation_. They support all of the same properties.
|
|
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 { Bar } from "@hpcc-js/chart";
|
|
15
|
+
|
|
16
|
+
new Bar()
|
|
17
|
+
.target("placeholder")
|
|
18
|
+
.columns(["Category", "Value"])
|
|
19
|
+
.data([
|
|
20
|
+
["A", 34],
|
|
21
|
+
["B", 55],
|
|
22
|
+
["C", 89],
|
|
23
|
+
["D", 144]
|
|
24
|
+
])
|
|
25
|
+
.yAxisDomainLow(0)
|
|
26
|
+
.render()
|
|
27
|
+
;
|
|
28
|
+
</script>
|
|
29
|
+
</hpcc-vitepress>
|
|
30
|
+
</ClientOnly>
|
|
31
|
+
|
|
32
|
+
Two or more series are commonly compared with a bar chart.
|
|
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 { Bar } from "@hpcc-js/chart";
|
|
40
|
+
|
|
41
|
+
new Bar()
|
|
42
|
+
.target("placeholder")
|
|
43
|
+
.columns(["Category", "Value 1", "Value 2"])
|
|
44
|
+
.data([
|
|
45
|
+
["A", 34, 90],
|
|
46
|
+
["B", 55, 50],
|
|
47
|
+
["C", 89, 75],
|
|
48
|
+
["D", 144, 66]
|
|
49
|
+
])
|
|
50
|
+
.xAxisOrdinalPaddingInner(0.38)
|
|
51
|
+
.xAxisOrdinalPaddingOuter(0.62)
|
|
52
|
+
.xAxisFocus(true)
|
|
53
|
+
.render()
|
|
54
|
+
;
|
|
55
|
+
</script>
|
|
56
|
+
</hpcc-vitepress>
|
|
57
|
+
</ClientOnly>
|
|
58
|
+
|
|
59
|
+
A bar chart supports n-number of numeric values per data row. A series is created for each column as needed. In the below example the series' are stacked together using the _yAxisStacked_ property.
|
|
60
|
+
|
|
61
|
+
<ClientOnly>
|
|
62
|
+
<hpcc-vitepress style="width:100%;height:600px">
|
|
63
|
+
<div id="placeholder" style="height:400px">
|
|
64
|
+
</div>
|
|
65
|
+
<script type="module">
|
|
66
|
+
import { Bar } from "@hpcc-js/chart";
|
|
67
|
+
|
|
68
|
+
new Bar()
|
|
69
|
+
.target("placeholder")
|
|
70
|
+
.columns(["Category", "Value 1", "Value 2", "Value 3"])
|
|
71
|
+
.data([
|
|
72
|
+
["A", 34, 90, 82],
|
|
73
|
+
["B", 55, 50, 65],
|
|
74
|
+
["C", 89, 75, 43],
|
|
75
|
+
["D", 144, 66, 56]
|
|
76
|
+
])
|
|
77
|
+
.showValue(true)
|
|
78
|
+
.valueCentered(true)
|
|
79
|
+
.yAxisStacked(true)
|
|
80
|
+
.render()
|
|
81
|
+
;
|
|
82
|
+
</script>
|
|
83
|
+
</hpcc-vitepress>
|
|
84
|
+
</ClientOnly>
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
## API
|
|
88
|
+
|
|
89
|
+
## Published Properties
|
|
90
|
+
```@hpcc-js/chart:Bar
|
|
91
91
|
```
|
package/src/Bar.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Column } from "./Column.ts";
|
|
2
|
-
|
|
3
|
-
export class Bar extends Column {
|
|
4
|
-
constructor() {
|
|
5
|
-
super();
|
|
6
|
-
this.orientation_default("vertical");
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
Bar.prototype._class += " chart_Bar";
|
|
1
|
+
import { Column } from "./Column.ts";
|
|
2
|
+
|
|
3
|
+
export class Bar extends Column {
|
|
4
|
+
constructor() {
|
|
5
|
+
super();
|
|
6
|
+
this.orientation_default("vertical");
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
Bar.prototype._class += " chart_Bar";
|
package/src/Bubble.css
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
.chart_Bubble circle {
|
|
2
|
-
cursor: pointer;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.chart_Bubble .selected circle {
|
|
6
|
-
stroke: red;
|
|
7
|
-
stroke-width: 1.5px
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.chart_Bubble .common_FAChar {
|
|
11
|
-
fill: white;
|
|
12
|
-
pointer-events: none;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.chart_Bubble .common_Text {
|
|
16
|
-
pointer-events: none;
|
|
1
|
+
.chart_Bubble circle {
|
|
2
|
+
cursor: pointer;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.chart_Bubble .selected circle {
|
|
6
|
+
stroke: red;
|
|
7
|
+
stroke-width: 1.5px
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.chart_Bubble .common_FAChar {
|
|
11
|
+
fill: white;
|
|
12
|
+
pointer-events: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.chart_Bubble .common_Text {
|
|
16
|
+
pointer-events: none;
|
|
17
17
|
}
|
package/src/Bubble.md
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
# Bubble
|
|
2
|
-
|
|
3
|
-
<!--meta
|
|
4
|
-
|
|
5
|
-
-->
|
|
6
|
-
|
|
7
|
-
A bubble chart represents a categorical data by displaying circles sized relative to each category's value. The circles are sized automatically to fit their target element.
|
|
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 { Bubble } from "@hpcc-js/chart";
|
|
16
|
-
|
|
17
|
-
new Bubble()
|
|
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
|
-
_paletteID_ can be used to assign an ordinal color palette.
|
|
34
|
-
|
|
35
|
-
_selectionGlowColor_ can be used to change the glow color when a bubble is selected.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<ClientOnly>
|
|
39
|
-
<hpcc-vitepress style="width:100%;height:600px">
|
|
40
|
-
<div id="placeholder" style="height:400px">
|
|
41
|
-
</div>
|
|
42
|
-
<script type="module">
|
|
43
|
-
import { Bubble } from "@hpcc-js/chart";
|
|
44
|
-
|
|
45
|
-
new Bubble()
|
|
46
|
-
.target("placeholder")
|
|
47
|
-
.columns(["Category", "Value"])
|
|
48
|
-
.data([
|
|
49
|
-
["A", 34],
|
|
50
|
-
["B", 55],
|
|
51
|
-
["C", 89],
|
|
52
|
-
["D", 1440]
|
|
53
|
-
])
|
|
54
|
-
.paletteID("FlatUI_British")
|
|
55
|
-
.selectionGlowColor("#00FF00")
|
|
56
|
-
.render()
|
|
57
|
-
;
|
|
58
|
-
</script>
|
|
59
|
-
</hpcc-vitepress>
|
|
60
|
-
</ClientOnly>
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
<!-- For documentation on tooltip properties, take a look at the [Tooltip Documentation](../../common/docs/Tooltip.md) -->
|
|
64
|
-
|
|
65
|
-
## API
|
|
66
|
-
|
|
67
|
-
## Published Properties
|
|
68
|
-
```@hpcc-js/chart:Bubble
|
|
69
|
-
```
|
|
1
|
+
# Bubble
|
|
2
|
+
|
|
3
|
+
<!--meta
|
|
4
|
+
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
A bubble chart represents a categorical data by displaying circles sized relative to each category's value. The circles are sized automatically to fit their target element.
|
|
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 { Bubble } from "@hpcc-js/chart";
|
|
16
|
+
|
|
17
|
+
new Bubble()
|
|
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
|
+
_paletteID_ can be used to assign an ordinal color palette.
|
|
34
|
+
|
|
35
|
+
_selectionGlowColor_ can be used to change the glow color when a bubble is selected.
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
<ClientOnly>
|
|
39
|
+
<hpcc-vitepress style="width:100%;height:600px">
|
|
40
|
+
<div id="placeholder" style="height:400px">
|
|
41
|
+
</div>
|
|
42
|
+
<script type="module">
|
|
43
|
+
import { Bubble } from "@hpcc-js/chart";
|
|
44
|
+
|
|
45
|
+
new Bubble()
|
|
46
|
+
.target("placeholder")
|
|
47
|
+
.columns(["Category", "Value"])
|
|
48
|
+
.data([
|
|
49
|
+
["A", 34],
|
|
50
|
+
["B", 55],
|
|
51
|
+
["C", 89],
|
|
52
|
+
["D", 1440]
|
|
53
|
+
])
|
|
54
|
+
.paletteID("FlatUI_British")
|
|
55
|
+
.selectionGlowColor("#00FF00")
|
|
56
|
+
.render()
|
|
57
|
+
;
|
|
58
|
+
</script>
|
|
59
|
+
</hpcc-vitepress>
|
|
60
|
+
</ClientOnly>
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
<!-- For documentation on tooltip properties, take a look at the [Tooltip Documentation](../../common/docs/Tooltip.md) -->
|
|
64
|
+
|
|
65
|
+
## API
|
|
66
|
+
|
|
67
|
+
## Published Properties
|
|
68
|
+
```@hpcc-js/chart:Bubble
|
|
69
|
+
```
|