@hpcc-js/chart 2.86.0 → 3.2.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/dist/index.js +323 -11790
- package/dist/index.js.map +7 -1
- package/package.json +32 -36
- package/src/Area.ts +1 -1
- package/src/Axis.ts +91 -60
- package/src/Bar.ts +1 -1
- package/src/Bubble.ts +18 -13
- package/src/BubbleXY.ts +1 -1
- package/src/Bullet.ts +21 -11
- package/src/Column.ts +13 -13
- package/src/Contour.ts +1 -1
- package/src/D3Cloud.ts +13 -13
- package/src/Gantt.ts +1 -1
- package/src/Gauge.ts +30 -28
- package/src/HalfPie.ts +1 -1
- package/src/Heat.ts +1 -1
- package/src/HexBin.ts +16 -11
- package/src/Line.ts +1 -1
- package/src/Pie.ts +31 -27
- package/src/QuarterPie.ts +1 -1
- package/src/Radar.ts +15 -15
- package/src/RadialBar.ts +18 -13
- package/src/Scatter.ts +36 -25
- package/src/StatChart.ts +11 -3
- package/src/Step.ts +1 -1
- package/src/WordCloud.ts +56 -51
- package/src/XYAxis.ts +4 -4
- package/src/__package__.ts +2 -2
- package/src/index.ts +27 -27
- package/types/Area.d.ts +1 -2
- package/types/Axis.d.ts +69 -120
- package/types/Bar.d.ts +1 -2
- package/types/Bubble.d.ts +13 -16
- package/types/BubbleXY.d.ts +1 -2
- package/types/Bullet.d.ts +13 -7
- package/types/Column.d.ts +9 -10
- package/types/Contour.d.ts +1 -2
- package/types/D3Cloud.d.ts +0 -1
- package/types/Gantt.d.ts +1 -2
- package/types/Gauge.d.ts +19 -11
- package/types/HalfPie.d.ts +1 -2
- package/types/Heat.d.ts +1 -2
- package/types/HexBin.d.ts +13 -18
- package/types/Line.d.ts +1 -2
- package/types/Pie.d.ts +23 -35
- package/types/QuarterPie.d.ts +1 -2
- package/types/QuartileCandlestick.d.ts +0 -1
- package/types/Radar.d.ts +10 -11
- package/types/RadialBar.d.ts +10 -11
- package/types/Scatter.d.ts +29 -51
- package/types/StatChart.d.ts +3 -3
- package/types/Step.d.ts +1 -2
- package/types/Summary.d.ts +0 -1
- package/types/SummaryC.d.ts +0 -1
- package/types/WordCloud.d.ts +50 -110
- package/types/XYAxis.d.ts +3 -4
- package/types/__package__.d.ts +2 -3
- package/types/index.d.ts +27 -28
- package/dist/index.es6.js +0 -11759
- package/dist/index.es6.js.map +0 -1
- package/dist/index.min.js +0 -2
- package/dist/index.min.js.map +0 -1
- package/types/Area.d.ts.map +0 -1
- package/types/Axis.d.ts.map +0 -1
- package/types/Bar.d.ts.map +0 -1
- package/types/Bubble.d.ts.map +0 -1
- package/types/BubbleXY.d.ts.map +0 -1
- package/types/Bullet.d.ts.map +0 -1
- package/types/Column.d.ts.map +0 -1
- package/types/Contour.d.ts.map +0 -1
- package/types/D3Cloud.d.ts.map +0 -1
- package/types/Gantt.d.ts.map +0 -1
- package/types/Gauge.d.ts.map +0 -1
- package/types/HalfPie.d.ts.map +0 -1
- package/types/Heat.d.ts.map +0 -1
- package/types/HexBin.d.ts.map +0 -1
- package/types/Line.d.ts.map +0 -1
- package/types/Pie.d.ts.map +0 -1
- package/types/QuarterPie.d.ts.map +0 -1
- package/types/QuartileCandlestick.d.ts.map +0 -1
- package/types/Radar.d.ts.map +0 -1
- package/types/RadialBar.d.ts.map +0 -1
- package/types/Scatter.d.ts.map +0 -1
- package/types/StatChart.d.ts.map +0 -1
- package/types/Step.d.ts.map +0 -1
- package/types/Summary.d.ts.map +0 -1
- package/types/SummaryC.d.ts.map +0 -1
- package/types/WordCloud.d.ts.map +0 -1
- package/types/XYAxis.d.ts.map +0 -1
- package/types/__package__.d.ts.map +0 -1
- package/types/__tests__/heat.d.ts +0 -10
- package/types/__tests__/heat.d.ts.map +0 -1
- package/types/__tests__/index.d.ts +0 -2
- package/types/__tests__/index.d.ts.map +0 -1
- package/types/__tests__/pie.d.ts +0 -5
- package/types/__tests__/pie.d.ts.map +0 -1
- package/types/__tests__/stat.d.ts +0 -5
- package/types/__tests__/stat.d.ts.map +0 -1
- package/types/__tests__/test3.d.ts +0 -9
- package/types/__tests__/test3.d.ts.map +0 -1
- package/types/index.d.ts.map +0 -1
- package/types/test.d.ts +0 -10
- package/types/test.d.ts.map +0 -1
- package/types-3.4/Area.d.ts +0 -5
- package/types-3.4/Axis.d.ts +0 -180
- package/types-3.4/Bar.d.ts +0 -5
- package/types-3.4/Bubble.d.ts +0 -32
- package/types-3.4/BubbleXY.d.ts +0 -6
- package/types-3.4/Bullet.d.ts +0 -19
- package/types-3.4/Column.d.ts +0 -70
- package/types-3.4/Contour.d.ts +0 -30
- package/types-3.4/D3Cloud.d.ts +0 -2
- package/types-3.4/Gantt.d.ts +0 -5
- package/types-3.4/Gauge.d.ts +0 -47
- package/types-3.4/HalfPie.d.ts +0 -7
- package/types-3.4/Heat.d.ts +0 -32
- package/types-3.4/HexBin.d.ts +0 -34
- package/types-3.4/Line.d.ts +0 -6
- package/types-3.4/Pie.d.ts +0 -95
- package/types-3.4/QuarterPie.d.ts +0 -12
- package/types-3.4/QuartileCandlestick.d.ts +0 -57
- package/types-3.4/Radar.d.ts +0 -47
- package/types-3.4/RadialBar.d.ts +0 -44
- package/types-3.4/Scatter.d.ts +0 -80
- package/types-3.4/StatChart.d.ts +0 -70
- package/types-3.4/Step.d.ts +0 -5
- package/types-3.4/Summary.d.ts +0 -105
- package/types-3.4/SummaryC.d.ts +0 -69
- package/types-3.4/WordCloud.d.ts +0 -130
- package/types-3.4/XYAxis.d.ts +0 -181
- package/types-3.4/__package__.d.ts +0 -4
- package/types-3.4/__tests__/heat.d.ts +0 -10
- package/types-3.4/__tests__/index.d.ts +0 -2
- package/types-3.4/__tests__/pie.d.ts +0 -5
- package/types-3.4/__tests__/stat.d.ts +0 -5
- package/types-3.4/__tests__/test3.d.ts +0 -9
- package/types-3.4/index.d.ts +0 -28
- package/types-3.4/test.d.ts +0 -10
package/package.json
CHANGED
|
@@ -1,52 +1,49 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hpcc-js/chart",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "hpcc-js - Viz Chart",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
"*": [
|
|
13
|
-
"types-3.4/index.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./types/index.d.ts",
|
|
9
|
+
"default": "./dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"./dist/*": "./dist/*"
|
|
16
12
|
},
|
|
13
|
+
"module": "./dist/index.js",
|
|
14
|
+
"browser": "./dist/index.js",
|
|
15
|
+
"types": "./types/index.d.ts",
|
|
17
16
|
"files": [
|
|
18
17
|
"dist/*",
|
|
18
|
+
"src/*",
|
|
19
19
|
"types/*",
|
|
20
|
-
"
|
|
21
|
-
"src/*"
|
|
20
|
+
"font-awesome/**/*"
|
|
22
21
|
],
|
|
23
22
|
"scripts": {
|
|
24
|
-
"clean": "rimraf --glob lib* types dist *.tsbuildinfo",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"bundle-watch": "npm run bundle -- -w",
|
|
31
|
-
"minimize": "terser dist/index.js -c -m --source-map \"content='dist/index.js.map',url='index.min.js.map'\" -o dist/index.min.js",
|
|
32
|
-
"gen-legacy-types": "downlevel-dts ./types ./types-3.4",
|
|
33
|
-
"build": "npm run compile-es6 && npm run bundle",
|
|
34
|
-
"watch": "npm-run-all compile-es6 -p compile-es6-watch bundle-watch",
|
|
35
|
-
"stamp": "node ../../node_modules/@hpcc-js/bundle/src/stamp.js",
|
|
23
|
+
"clean": "rimraf --glob lib* types dist *.tsbuildinfo .turbo",
|
|
24
|
+
"bundle": "node esbuild.js",
|
|
25
|
+
"bundle-watch": "npm run bundle -- --development --watch",
|
|
26
|
+
"gen-types": "tsc --project tsconfig.json",
|
|
27
|
+
"gen-types-watch": "npm run gen-types -- --watch",
|
|
28
|
+
"build": "run-p gen-types bundle",
|
|
36
29
|
"lint": "eslint ./src",
|
|
30
|
+
"lint-fix": "eslint --fix src/**/*.ts",
|
|
37
31
|
"docs": "typedoc --options tdoptions.json .",
|
|
38
|
-
"
|
|
32
|
+
"test-browser": "vitest run --project browser",
|
|
33
|
+
"test": "vitest run",
|
|
34
|
+
"coverage": "vitest run --coverage",
|
|
35
|
+
"update": "npx --yes npm-check-updates -u -t minor",
|
|
36
|
+
"update-major": "npx --yes npm-check-updates -u"
|
|
39
37
|
},
|
|
40
38
|
"dependencies": {
|
|
41
|
-
"@hpcc-js/api": "^2.
|
|
42
|
-
"@hpcc-js/common": "^2.
|
|
43
|
-
"@hpcc-js/util": "^2.
|
|
39
|
+
"@hpcc-js/api": "^3.2.0",
|
|
40
|
+
"@hpcc-js/common": "^3.2.0",
|
|
41
|
+
"@hpcc-js/util": "^3.2.0"
|
|
44
42
|
},
|
|
45
43
|
"devDependencies": {
|
|
46
|
-
"@hpcc-js/
|
|
47
|
-
"@hpcc-js/dataflow": "^9.1.0",
|
|
44
|
+
"@hpcc-js/esbuild-plugins": "^1.3.0",
|
|
48
45
|
"@types/d3-shape": "1.3.12",
|
|
49
|
-
"@types/d3-transition": "1.3.
|
|
46
|
+
"@types/d3-transition": "1.3.6",
|
|
50
47
|
"d3-array": "^1",
|
|
51
48
|
"d3-axis": "^1",
|
|
52
49
|
"d3-brush": "^1",
|
|
@@ -65,8 +62,7 @@
|
|
|
65
62
|
"d3-time-format": "^2",
|
|
66
63
|
"d3-transition": "^1",
|
|
67
64
|
"d3-zoom": "^1",
|
|
68
|
-
"d3v4-bullet": "1.0.7"
|
|
69
|
-
"tslib": "2.7.0"
|
|
65
|
+
"d3v4-bullet": "1.0.7"
|
|
70
66
|
},
|
|
71
67
|
"repository": {
|
|
72
68
|
"type": "git",
|
|
@@ -79,5 +75,5 @@
|
|
|
79
75
|
"url": "https://github.com/hpcc-systems/Visualization/issues"
|
|
80
76
|
},
|
|
81
77
|
"homepage": "https://github.com/hpcc-systems/Visualization",
|
|
82
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "658c50fd965a7744ba8db675ba6878607c44d5e2"
|
|
83
79
|
}
|
package/src/Area.ts
CHANGED
package/src/Axis.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SVGWidget } from "@hpcc-js/common";
|
|
2
2
|
import { axisBottom as d3AxisBottom, axisLeft as d3AxisLeft, axisRight as d3AxisRight, axisTop as d3AxisTop } from "d3-axis";
|
|
3
3
|
import { format as d3Format } from "d3-format";
|
|
4
4
|
import { scaleBand as d3ScaleBand, scaleLinear as d3ScaleLinear, scaleLog as d3ScaleLog, scalePow as d3ScalePow, scaleTime as d3ScaleTime } from "d3-scale";
|
|
@@ -17,6 +17,9 @@ export interface IOverflow {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export class Axis extends SVGWidget {
|
|
20
|
+
_origType;
|
|
21
|
+
_origTimePattern;
|
|
22
|
+
|
|
20
23
|
protected parser;
|
|
21
24
|
protected parserInvert;
|
|
22
25
|
protected formatter: (date: Date) => string;
|
|
@@ -28,32 +31,6 @@ export class Axis extends SVGWidget {
|
|
|
28
31
|
protected svgAxis;
|
|
29
32
|
protected svgGuides;
|
|
30
33
|
|
|
31
|
-
@publish("linear", "set", "Type", ["none", "ordinal", "linear", "pow", "log", "time"])
|
|
32
|
-
_type: string;
|
|
33
|
-
type(): string;
|
|
34
|
-
type(_: string): this;
|
|
35
|
-
type(_?: string): string | this {
|
|
36
|
-
if (!arguments.length) return this._type;
|
|
37
|
-
this._type = _;
|
|
38
|
-
this.updateScale();
|
|
39
|
-
return this;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
@publish("%Y-%m-%d", "string", "Time Series Pattern", null, { disable: (w: any) => w.type() !== "time" })
|
|
43
|
-
_timePattern: string;
|
|
44
|
-
timePattern(): string;
|
|
45
|
-
timePattern(_: string): this;
|
|
46
|
-
timePattern(_?: string): string | this {
|
|
47
|
-
if (!arguments.length) return this._timePattern;
|
|
48
|
-
this._timePattern = _;
|
|
49
|
-
this.updateScale();
|
|
50
|
-
return this;
|
|
51
|
-
}
|
|
52
|
-
timePattern_exists: () => boolean;
|
|
53
|
-
|
|
54
|
-
@publish(false, "boolean", "Reverse")
|
|
55
|
-
reverse: publish<this, boolean>;
|
|
56
|
-
|
|
57
34
|
constructor(drawStartPosition: "origin" | "center" = "origin") {
|
|
58
35
|
super();
|
|
59
36
|
this._drawStartPos = drawStartPosition;
|
|
@@ -136,13 +113,13 @@ export class Axis extends SVGWidget {
|
|
|
136
113
|
return true;
|
|
137
114
|
}
|
|
138
115
|
|
|
139
|
-
domain(_) {
|
|
116
|
+
domain(_?) {
|
|
140
117
|
if (!arguments.length) return this.d3Scale.domain();
|
|
141
118
|
this.d3Scale.domain(_);
|
|
142
119
|
return this;
|
|
143
120
|
}
|
|
144
121
|
|
|
145
|
-
range(_) {
|
|
122
|
+
range(_?) {
|
|
146
123
|
if (!arguments.length) {
|
|
147
124
|
if (this.d3Scale.rangeRoundBands) {
|
|
148
125
|
return this.d3Scale.rangeExtent();
|
|
@@ -662,42 +639,71 @@ export class Axis extends SVGWidget {
|
|
|
662
639
|
;
|
|
663
640
|
}
|
|
664
641
|
}
|
|
665
|
-
|
|
666
|
-
title: { (): string; (_: string): Axis; };
|
|
667
|
-
orientation: { (): string; (_: string): Axis; };
|
|
668
|
-
orientation_default: { (): string; (_: string): Axis; };
|
|
669
|
-
powExponent: { (): number; (_: number): Axis; };
|
|
670
|
-
logBase: { (): number; (_: number): Axis; };
|
|
671
|
-
ordinals: { (): string[]; (_: string[]): Axis; };
|
|
672
|
-
ordinals_exists: () => boolean;
|
|
673
|
-
fontSize: { (): number; (_: number): Axis; };
|
|
674
|
-
fontSize_exists: () => boolean;
|
|
675
|
-
fontFamily: { (): string; (_: string): Axis; };
|
|
676
|
-
tickCount: { (): number; (_: number): Axis; };
|
|
677
|
-
tickFormat: { (): string; (_: string): Axis; };
|
|
678
|
-
tickFormat_exists: () => boolean;
|
|
679
|
-
tickLength: { (): number; (_: number): Axis; };
|
|
680
|
-
tickLength_exists: () => boolean;
|
|
681
|
-
ticks: { (): Array<{ value: string, label: string }>; (_: Array<{ value: string, label: string }>): Axis; };
|
|
682
|
-
xAxisDomainLow: { (): string; (_: string): Axis; };
|
|
683
|
-
xAxisDomainHigh: { (): string; (_: string): Axis; };
|
|
684
|
-
low: { (): any; (_: any): Axis; };
|
|
685
|
-
low_exists: () => boolean;
|
|
686
|
-
high: { (): any; (_: any): Axis; };
|
|
687
|
-
high_exists: () => boolean;
|
|
688
|
-
overlapMode: { (): string; (_: string): Axis; };
|
|
689
|
-
overlapMode_default: { (): string; (_: string): Axis; };
|
|
690
|
-
labelRotation: { (): number; (_: number): Axis; };
|
|
691
|
-
shrinkToFit: { (): string; (_: string): Axis; };
|
|
692
|
-
shrinkToFit_default: { (): string; (_: string): Axis; };
|
|
693
|
-
extend: { (): number; (_: number): Axis; };
|
|
694
|
-
extend_default: { (): number; (_: number): Axis; };
|
|
695
|
-
hidden: { (): boolean; (_: boolean): Axis; };
|
|
696
642
|
}
|
|
697
643
|
Axis.prototype._class += " chart_Axis";
|
|
698
644
|
|
|
699
645
|
export interface Axis {
|
|
646
|
+
type(): string;
|
|
647
|
+
type(_: string): this;
|
|
648
|
+
type_exists(): boolean;
|
|
649
|
+
timePattern(): string;
|
|
650
|
+
timePattern(_: string): this;
|
|
651
|
+
timePattern_exists(): boolean;
|
|
652
|
+
reverse(): boolean;
|
|
653
|
+
reverse(_: boolean): this;
|
|
654
|
+
|
|
655
|
+
title(): string;
|
|
656
|
+
title(_: string): this;
|
|
700
657
|
title_exists(): boolean;
|
|
658
|
+
orientation(): string;
|
|
659
|
+
orientation(_: string): this;
|
|
660
|
+
orientation_default(): string;
|
|
661
|
+
orientation_default(_: string): this;
|
|
662
|
+
powExponent(): number;
|
|
663
|
+
powExponent(_: number): this;
|
|
664
|
+
logBase(): number;
|
|
665
|
+
logBase(_: number): this;
|
|
666
|
+
ordinals(): string[];
|
|
667
|
+
ordinals(_: string[]): this;
|
|
668
|
+
ordinals_exists(): boolean;
|
|
669
|
+
fontSize(): number;
|
|
670
|
+
fontSize(_: number): this;
|
|
671
|
+
fontSize_exists(): boolean;
|
|
672
|
+
fontFamily(): string;
|
|
673
|
+
fontFamily(_: string): this;
|
|
674
|
+
tickCount(): number;
|
|
675
|
+
tickCount(_: number): this;
|
|
676
|
+
tickFormat(): string;
|
|
677
|
+
tickFormat(_: string): this;
|
|
678
|
+
tickFormat_exists(): boolean;
|
|
679
|
+
tickLength(): number;
|
|
680
|
+
tickLength(_: number): this;
|
|
681
|
+
tickLength_exists(): boolean;
|
|
682
|
+
ticks(): Array<{ value: string, label: string }>;
|
|
683
|
+
ticks(_: Array<{ value: string, label: string }>): this;
|
|
684
|
+
low(): any;
|
|
685
|
+
low(_: any): this;
|
|
686
|
+
low_exists(): boolean;
|
|
687
|
+
high(): any;
|
|
688
|
+
high(_: any): this;
|
|
689
|
+
high_exists(): boolean;
|
|
690
|
+
overlapMode(): string;
|
|
691
|
+
overlapMode(_: string): this;
|
|
692
|
+
overlapMode_default(): string;
|
|
693
|
+
overlapMode_default(_: string): this;
|
|
694
|
+
labelRotation(): number;
|
|
695
|
+
labelRotation(_: number): this;
|
|
696
|
+
shrinkToFit(): string;
|
|
697
|
+
shrinkToFit(_: string): this;
|
|
698
|
+
shrinkToFit_default(): string;
|
|
699
|
+
shrinkToFit_default(_: string): this;
|
|
700
|
+
extend(): number;
|
|
701
|
+
extend(_: number): this;
|
|
702
|
+
extend_default(): number;
|
|
703
|
+
extend_default(_: number): this;
|
|
704
|
+
hidden(): boolean;
|
|
705
|
+
hidden(_: boolean): this;
|
|
706
|
+
|
|
701
707
|
ordinalPaddingInner(): number;
|
|
702
708
|
ordinalPaddingInner(_: number): this;
|
|
703
709
|
ordinalPaddingOuter(): number;
|
|
@@ -709,6 +715,10 @@ export interface Axis {
|
|
|
709
715
|
padding(_: number): this;
|
|
710
716
|
}
|
|
711
717
|
|
|
718
|
+
Axis.prototype.publish("type", "linear", "set", "Type", ["none", "ordinal", "linear", "pow", "log", "time"]);
|
|
719
|
+
Axis.prototype.publish("timePattern", "%Y-%m-%d", "string", "Time Series Pattern", null, { disable: (w: any) => w.type() !== "time" });
|
|
720
|
+
Axis.prototype.publish("reverse", false, "boolean", "Reverse");
|
|
721
|
+
|
|
712
722
|
Axis.prototype.publish("title", null, "string", "Title");
|
|
713
723
|
Axis.prototype.publish("orientation", "bottom", "set", "Placement/orientation of the axis", ["left", "top", "right", "bottom"]);
|
|
714
724
|
Axis.prototype.publish("powExponent", 2, "number", "Power exponent (disabled when type is not 'pow')", null, { disable: (w: any) => w.type() !== "pow" });
|
|
@@ -727,7 +737,28 @@ Axis.prototype.publish("labelRotation", 33, "number", "Angle of rotation for tic
|
|
|
727
737
|
Axis.prototype.publish("shrinkToFit", "both", "set", "shrinkToFit", ["none", "low", "high", "both"]); // TODO: What does this control?
|
|
728
738
|
Axis.prototype.publish("extend", 5, "number", "Extend the axis range by this % beyond what is needed to display the data (disabled when type is 'ordinal')", null, { optional: true, disable: (w: any) => w.type() === "ordinal" });
|
|
729
739
|
Axis.prototype.publish("hidden", false, "boolean", "Hides axis when 'true'");
|
|
740
|
+
|
|
730
741
|
Axis.prototype.publish("ordinalPaddingInner", 0.1, "number", "Determines the ratio of the range that is reserved for blank space between band (0->1)", null, { disable: (w: Axis) => w.type() !== "ordinal" });
|
|
731
742
|
Axis.prototype.publish("ordinalPaddingOuter", 0.1, "number", "Determines the ratio of the range that is reserved for blank space before the first band and after the last band (0->1)", null, { disable: (w: Axis) => w.type() !== "ordinal" });
|
|
732
743
|
Axis.prototype.publish("ordinalMappings", null, "object", "Alternative label mappings (icons)", null, { optional: true });
|
|
733
744
|
Axis.prototype.publish("padding", 0, "number", "Padding space at top of axis (pixels)", null, { optional: true });
|
|
745
|
+
|
|
746
|
+
Axis.prototype._origType = Axis.prototype.type;
|
|
747
|
+
Axis.prototype.type = function (_?: string) {
|
|
748
|
+
const retVal = Axis.prototype._origType.apply(this, arguments);
|
|
749
|
+
if (_ !== undefined) {
|
|
750
|
+
this._type = _;
|
|
751
|
+
this.updateScale();
|
|
752
|
+
}
|
|
753
|
+
return retVal;
|
|
754
|
+
};
|
|
755
|
+
|
|
756
|
+
Axis.prototype._origTimePattern = Axis.prototype.timePattern;
|
|
757
|
+
Axis.prototype.timePattern = function (_?: string) {
|
|
758
|
+
const retVal = Axis.prototype._origTimePattern.apply(this, arguments);
|
|
759
|
+
if (_ !== undefined) {
|
|
760
|
+
this._timePattern = _;
|
|
761
|
+
this.updateScale();
|
|
762
|
+
}
|
|
763
|
+
return retVal;
|
|
764
|
+
};
|
package/src/Bar.ts
CHANGED
package/src/Bubble.ts
CHANGED
|
@@ -163,29 +163,34 @@ export class Bubble extends SVGWidget {
|
|
|
163
163
|
super.exit(domNode, element);
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
}
|
|
167
|
+
Bubble.prototype._class += " chart_Bubble";
|
|
168
|
+
Bubble.prototype.implements(I2DChart.prototype);
|
|
169
|
+
Bubble.prototype.implements(ITooltip.prototype);
|
|
170
|
+
Bubble.prototype.mixin(Utility.SimpleSelectionMixin);
|
|
171
|
+
|
|
172
|
+
export interface Bubble {
|
|
173
|
+
paletteID(): string;
|
|
174
|
+
paletteID(_: string): this;
|
|
175
|
+
useClonedPalette(): boolean;
|
|
176
|
+
useClonedPalette(_: boolean): this;
|
|
168
177
|
|
|
169
178
|
// I2DChart
|
|
170
179
|
_palette;
|
|
171
|
-
fillColor
|
|
172
|
-
textColor
|
|
173
|
-
click
|
|
174
|
-
dblclick
|
|
180
|
+
fillColor(row: any[], column: string, value: number): string;
|
|
181
|
+
textColor(row: any[], column: string, value: number): string;
|
|
182
|
+
click(row, column, selected): void;
|
|
183
|
+
dblclick(row, column, selected): void;
|
|
175
184
|
|
|
176
185
|
// ITooltip
|
|
177
186
|
tooltip;
|
|
178
|
-
tooltipHTML
|
|
179
|
-
tooltipFormat
|
|
180
|
-
tooltipStyle
|
|
187
|
+
tooltipHTML(_): string;
|
|
188
|
+
tooltipFormat(_): string;
|
|
189
|
+
tooltipStyle(): "default" | "none" | "series-table";
|
|
181
190
|
|
|
182
191
|
// SimpleSelectionMixin
|
|
183
192
|
_selection;
|
|
184
193
|
}
|
|
185
|
-
Bubble.prototype._class += " chart_Bubble";
|
|
186
|
-
Bubble.prototype.implements(I2DChart.prototype);
|
|
187
|
-
Bubble.prototype.implements(ITooltip.prototype);
|
|
188
|
-
Bubble.prototype.mixin(Utility.SimpleSelectionMixin);
|
|
189
194
|
|
|
190
195
|
Bubble.prototype.publish("paletteID", "default", "set", "Color palette for this widget", Bubble.prototype._palette.switch(), { tags: ["Basic", "Shared"] });
|
|
191
196
|
Bubble.prototype.publish("useClonedPalette", false, "boolean", "Enable or disable using a cloned palette", null, { tags: ["Intermediate", "Shared"] });
|
package/src/BubbleXY.ts
CHANGED
package/src/Bullet.ts
CHANGED
|
@@ -1,20 +1,10 @@
|
|
|
1
|
-
import { HTMLWidget,
|
|
1
|
+
import { HTMLWidget, Utility } from "@hpcc-js/common";
|
|
2
2
|
import { select as d3Select } from "d3-selection";
|
|
3
3
|
import { bullet as d3Bullet } from "d3v4-bullet";
|
|
4
4
|
|
|
5
5
|
import "../src/Bullet.css";
|
|
6
6
|
|
|
7
7
|
export class Bullet extends HTMLWidget {
|
|
8
|
-
@publish(null, "set", "Title Column", function () { return this.columns(); }, { optional: true })
|
|
9
|
-
titleColumn: publish<this, string>;
|
|
10
|
-
@publish(null, "set", "Subtitle Column", function () { return this.columns(); }, { optional: true })
|
|
11
|
-
subtitleColumn: publish<this, string>;
|
|
12
|
-
@publish(null, "set", "Ranges Column", function () { return this.columns(); }, { optional: true })
|
|
13
|
-
rangesColumn: publish<this, string>;
|
|
14
|
-
@publish(null, "set", "Measures Column", function () { return this.columns(); }, { optional: true })
|
|
15
|
-
measuresColumn: publish<this, string>;
|
|
16
|
-
@publish(null, "set", "Markers Column", function () { return this.columns(); }, { optional: true })
|
|
17
|
-
markersColumn: publish<this, string>;
|
|
18
8
|
|
|
19
9
|
private _hiddenColumns = {};
|
|
20
10
|
|
|
@@ -165,3 +155,23 @@ export class Bullet extends HTMLWidget {
|
|
|
165
155
|
_selection;
|
|
166
156
|
}
|
|
167
157
|
Bullet.prototype._class += " chart_Bullet";
|
|
158
|
+
|
|
159
|
+
export interface Bullet {
|
|
160
|
+
titleColumn(): string;
|
|
161
|
+
titleColumn(_: string): this;
|
|
162
|
+
subtitleColumn(): string;
|
|
163
|
+
subtitleColumn(_: string): this;
|
|
164
|
+
rangesColumn(): string;
|
|
165
|
+
rangesColumn(_: string): this;
|
|
166
|
+
measuresColumn(): string;
|
|
167
|
+
measuresColumn(_: string): this;
|
|
168
|
+
markersColumn(): string;
|
|
169
|
+
markersColumn(_: string): this;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
Bullet.prototype.publish("titleColumn", null, "set", "Title Column", function () { return this.columns(); }, { optional: true });
|
|
173
|
+
Bullet.prototype.publish("subtitleColumn", null, "set", "Subtitle Column", function () { return this.columns(); }, { optional: true });
|
|
174
|
+
Bullet.prototype.publish("rangesColumn", null, "set", "Ranges Column", function () { return this.columns(); }, { optional: true });
|
|
175
|
+
Bullet.prototype.publish("measuresColumn", null, "set", "Measures Column", function () { return this.columns(); }, { optional: true });
|
|
176
|
+
Bullet.prototype.publish("markersColumn", null, "set", "Markers Column", function () { return this.columns(); }, { optional: true });
|
|
177
|
+
|
package/src/Column.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { InputField, Text } from "@hpcc-js/common";
|
|
|
3
3
|
import { format as d3Format } from "d3-format";
|
|
4
4
|
import { scaleBand as d3ScaleBand } from "d3-scale";
|
|
5
5
|
import { local as d3Local, select as d3Select } from "d3-selection";
|
|
6
|
-
import { XYAxis } from "./XYAxis";
|
|
6
|
+
import { XYAxis } from "./XYAxis.ts";
|
|
7
7
|
|
|
8
8
|
import "../src/Column.css";
|
|
9
9
|
|
|
@@ -572,18 +572,6 @@ export class Column extends XYAxis {
|
|
|
572
572
|
innerText(origRow, lparam, idx): string {
|
|
573
573
|
return origRow[0];
|
|
574
574
|
}
|
|
575
|
-
|
|
576
|
-
// INDChart ---
|
|
577
|
-
_palette;
|
|
578
|
-
fillColor: (row, column, value, origRow) => string;
|
|
579
|
-
textColor: (row, column, value, origRow) => string;
|
|
580
|
-
dblclick: (row, column, selected) => void;
|
|
581
|
-
|
|
582
|
-
// ITooltip ---
|
|
583
|
-
tooltip;
|
|
584
|
-
tooltipHTML: (_) => string;
|
|
585
|
-
tooltipFormat: (_) => string;
|
|
586
|
-
tooltipStyle: () => "default" | "none" | "series-table";
|
|
587
575
|
}
|
|
588
576
|
Column.prototype._class += " chart_Column";
|
|
589
577
|
Column.prototype.implements(INDChart.prototype);
|
|
@@ -627,6 +615,18 @@ export interface Column {
|
|
|
627
615
|
innerTextPadding_exists(): boolean;
|
|
628
616
|
tooltipInnerTextEllipsedOnly(): boolean;
|
|
629
617
|
tooltipInnerTextEllipsedOnly(_: boolean): this;
|
|
618
|
+
|
|
619
|
+
// INDChart ---
|
|
620
|
+
fillColor(row, column, value, origRow): string;
|
|
621
|
+
textColor(row, column, value, origRow): string;
|
|
622
|
+
dblclick(row, column, selected): void;
|
|
623
|
+
|
|
624
|
+
// ITooltip ---
|
|
625
|
+
tooltip;
|
|
626
|
+
tooltipHTML(_): string;
|
|
627
|
+
tooltipFormat(_): string;
|
|
628
|
+
tooltipStyle(): "default" | "none" | "series-table";
|
|
629
|
+
tooltipStyle(_: "default" | "none" | "series-table"): this;
|
|
630
630
|
}
|
|
631
631
|
|
|
632
632
|
Column.prototype.publish("valueFontFamily", null, "string", "Font family of value text", null, { optional: true });
|
package/src/Contour.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { I1DChart } from "@hpcc-js/api";
|
|
|
2
2
|
import { InputField } from "@hpcc-js/common";
|
|
3
3
|
import { contourDensity as d3ContourDensity } from "d3-contour";
|
|
4
4
|
import { geoPath } from "d3-geo";
|
|
5
|
-
import { XYAxis } from "./XYAxis";
|
|
5
|
+
import { XYAxis } from "./XYAxis.ts";
|
|
6
6
|
|
|
7
7
|
export class Contour extends XYAxis {
|
|
8
8
|
static __inputs: InputField[] = [{
|
package/src/D3Cloud.ts
CHANGED
|
@@ -26,7 +26,7 @@ export function d3Cloud() {
|
|
|
26
26
|
let random = Math.random;
|
|
27
27
|
let canvas = cloudCanvas;
|
|
28
28
|
|
|
29
|
-
cloud.canvas = function (_) {
|
|
29
|
+
cloud.canvas = function (_?) {
|
|
30
30
|
return arguments.length ? (canvas = functor(_), cloud) : canvas;
|
|
31
31
|
};
|
|
32
32
|
|
|
@@ -149,51 +149,51 @@ export function d3Cloud() {
|
|
|
149
149
|
return false;
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
cloud.timeInterval = function (_) {
|
|
152
|
+
cloud.timeInterval = function (_?) {
|
|
153
153
|
return arguments.length ? (timeInterval = _ == null ? Infinity : _, cloud) : timeInterval;
|
|
154
154
|
};
|
|
155
155
|
|
|
156
|
-
cloud.words = function (_) {
|
|
156
|
+
cloud.words = function (_?) {
|
|
157
157
|
return arguments.length ? (words = _, cloud) : words;
|
|
158
158
|
};
|
|
159
159
|
|
|
160
|
-
cloud.size = function (_) {
|
|
160
|
+
cloud.size = function (_?) {
|
|
161
161
|
return arguments.length ? (size = [+_[0], +_[1]], cloud) : size;
|
|
162
162
|
};
|
|
163
163
|
|
|
164
|
-
cloud.font = function (_) {
|
|
164
|
+
cloud.font = function (_?) {
|
|
165
165
|
return arguments.length ? (font = functor(_), cloud) : font;
|
|
166
166
|
};
|
|
167
167
|
|
|
168
|
-
cloud.fontStyle = function (_) {
|
|
168
|
+
cloud.fontStyle = function (_?) {
|
|
169
169
|
return arguments.length ? (fontStyle = functor(_), cloud) : fontStyle;
|
|
170
170
|
};
|
|
171
171
|
|
|
172
|
-
cloud.fontWeight = function (_) {
|
|
172
|
+
cloud.fontWeight = function (_?) {
|
|
173
173
|
return arguments.length ? (fontWeight = functor(_), cloud) : fontWeight;
|
|
174
174
|
};
|
|
175
175
|
|
|
176
|
-
cloud.rotate = function (_) {
|
|
176
|
+
cloud.rotate = function (_?) {
|
|
177
177
|
return arguments.length ? (rotate = functor(_), cloud) : rotate;
|
|
178
178
|
};
|
|
179
179
|
|
|
180
|
-
cloud.text = function (_) {
|
|
180
|
+
cloud.text = function (_?) {
|
|
181
181
|
return arguments.length ? (text = functor(_), cloud) : text;
|
|
182
182
|
};
|
|
183
183
|
|
|
184
|
-
cloud.spiral = function (_) {
|
|
184
|
+
cloud.spiral = function (_?) {
|
|
185
185
|
return arguments.length ? (spiral = spirals[_] || _, cloud) : spiral;
|
|
186
186
|
};
|
|
187
187
|
|
|
188
|
-
cloud.fontSize = function (_) {
|
|
188
|
+
cloud.fontSize = function (_?) {
|
|
189
189
|
return arguments.length ? (fontSize = functor(_), cloud) : fontSize;
|
|
190
190
|
};
|
|
191
191
|
|
|
192
|
-
cloud.padding = function (_) {
|
|
192
|
+
cloud.padding = function (_?) {
|
|
193
193
|
return arguments.length ? (padding = functor(_), cloud) : padding;
|
|
194
194
|
};
|
|
195
195
|
|
|
196
|
-
cloud.random = function (_) {
|
|
196
|
+
cloud.random = function (_?) {
|
|
197
197
|
return arguments.length ? (random = _, cloud) : random;
|
|
198
198
|
};
|
|
199
199
|
|
package/src/Gantt.ts
CHANGED
package/src/Gauge.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SVGWidget } from "@hpcc-js/common";
|
|
2
2
|
import { format as d3Format } from "d3-format";
|
|
3
3
|
import { interpolate as d3Interpolate, interpolateHcl as d3InterpolateHcl } from "d3-interpolate";
|
|
4
4
|
import { scaleLinear } from "d3-scale";
|
|
@@ -66,33 +66,6 @@ export class Gauge extends SVGWidget {
|
|
|
66
66
|
protected _tooltipG: any;
|
|
67
67
|
protected _mainTooltip: any;
|
|
68
68
|
|
|
69
|
-
@publish("", "string")
|
|
70
|
-
title: publish<this, string>;
|
|
71
|
-
|
|
72
|
-
@publish("", "string")
|
|
73
|
-
titleDescription: publish<this, string>;
|
|
74
|
-
|
|
75
|
-
@publish(128, "number")
|
|
76
|
-
maxDiameter: publish<this, number>;
|
|
77
|
-
|
|
78
|
-
@publish(0, "number")
|
|
79
|
-
value: publish<this, number>;
|
|
80
|
-
|
|
81
|
-
@publish("", "string")
|
|
82
|
-
valueDescription: publish<this, string>;
|
|
83
|
-
|
|
84
|
-
@publish(false, "boolean")
|
|
85
|
-
showTick: publish<this, boolean>;
|
|
86
|
-
|
|
87
|
-
@publish(0, "number")
|
|
88
|
-
tickValue: publish<this, number>;
|
|
89
|
-
|
|
90
|
-
@publish("", "string")
|
|
91
|
-
tickValueDescription: publish<this, string>;
|
|
92
|
-
|
|
93
|
-
@publish("", "string")
|
|
94
|
-
tooltip: publish<this, string>;
|
|
95
|
-
|
|
96
69
|
constructor() {
|
|
97
70
|
super();
|
|
98
71
|
}
|
|
@@ -342,6 +315,25 @@ export class Gauge extends SVGWidget {
|
|
|
342
315
|
Gauge.prototype._class += " chart_Gauge";
|
|
343
316
|
|
|
344
317
|
export interface Gauge {
|
|
318
|
+
title(): string;
|
|
319
|
+
title(_: string): this;
|
|
320
|
+
titleDescription(): string;
|
|
321
|
+
titleDescription(_: string): this;
|
|
322
|
+
maxDiameter(): number;
|
|
323
|
+
maxDiameter(_: number): this;
|
|
324
|
+
value(): number;
|
|
325
|
+
value(_: number): this;
|
|
326
|
+
valueDescription(): string;
|
|
327
|
+
valueDescription(_: string): this;
|
|
328
|
+
showTick(): boolean;
|
|
329
|
+
showTick(_: boolean): this;
|
|
330
|
+
tickValue(): number;
|
|
331
|
+
tickValue(_: number): this;
|
|
332
|
+
tickValueDescription(): string;
|
|
333
|
+
tickValueDescription(_: string): this;
|
|
334
|
+
tooltip(): string;
|
|
335
|
+
tooltip(_: string): this;
|
|
336
|
+
|
|
345
337
|
tickColor(): string;
|
|
346
338
|
tickColor(_: string): this;
|
|
347
339
|
emptyColor(): string;
|
|
@@ -352,6 +344,16 @@ export interface Gauge {
|
|
|
352
344
|
colorRange(_: string[]): this;
|
|
353
345
|
}
|
|
354
346
|
|
|
347
|
+
Gauge.prototype.publish("title", "", "string", "Title");
|
|
348
|
+
Gauge.prototype.publish("titleDescription", "", "string", "Title Description");
|
|
349
|
+
Gauge.prototype.publish("maxDiameter", 128, "number", "Max Diameter");
|
|
350
|
+
Gauge.prototype.publish("value", 0, "number", "Value");
|
|
351
|
+
Gauge.prototype.publish("valueDescription", "", "string", "Value Description");
|
|
352
|
+
Gauge.prototype.publish("showTick", false, "boolean", "Show Tick");
|
|
353
|
+
Gauge.prototype.publish("tickValue", 0, "number", "Tick Value");
|
|
354
|
+
Gauge.prototype.publish("tickValueDescription", "", "string", "Tick Value Description");
|
|
355
|
+
Gauge.prototype.publish("tooltip", "", "string", "Tooltip");
|
|
356
|
+
|
|
355
357
|
Gauge.prototype.publish("colorRange", ["green", "green", "green", "green", "green", "green", "green", "green", "orange", "red", "red"], "array", "Array of colors for the filled gauge portion. The fill color will be relative to the gauge value.");
|
|
356
358
|
Gauge.prototype.publish("colorDomain", [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1], "array", "This array augments the mapping of the value to the fill colorRange.");
|
|
357
359
|
Gauge.prototype.publish("emptyColor", "lightgrey", "html-color", "Color of the empty portion of the gauge");
|
package/src/HalfPie.ts
CHANGED
package/src/Heat.ts
CHANGED