@hpcc-js/chart 2.85.0 → 3.1.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.css +2 -0
- package/dist/index.css.map +7 -0
- package/dist/index.js +63 -11786
- package/dist/index.js.map +7 -1
- package/package.json +30 -34
- package/src/Area.ts +1 -1
- package/src/Axis.ts +89 -58
- package/src/Bar.ts +1 -1
- package/src/BubbleXY.ts +1 -1
- package/src/Bullet.ts +21 -11
- package/src/Column.ts +1 -2
- package/src/Contour.ts +1 -1
- 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 +1 -1
- package/src/Line.ts +1 -1
- package/src/QuarterPie.ts +1 -1
- package/src/Scatter.ts +1 -2
- package/src/StatChart.ts +2 -2
- package/src/Step.ts +1 -1
- package/src/WordCloud.ts +1 -1
- package/src/XYAxis.ts +1 -1
- package/src/__package__.ts +2 -2
- package/src/index.ts +27 -27
- package/types/Area.d.ts +1 -2
- package/types/Axis.d.ts +67 -118
- package/types/Bar.d.ts +1 -2
- package/types/Bubble.d.ts +0 -1
- package/types/BubbleXY.d.ts +1 -2
- package/types/Bullet.d.ts +13 -7
- package/types/Column.d.ts +1 -3
- 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 +1 -2
- package/types/Line.d.ts +1 -2
- package/types/Pie.d.ts +0 -1
- package/types/QuarterPie.d.ts +1 -2
- package/types/QuartileCandlestick.d.ts +0 -1
- package/types/Radar.d.ts +0 -1
- package/types/RadialBar.d.ts +0 -1
- package/types/Scatter.d.ts +1 -3
- package/types/StatChart.d.ts +2 -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 +0 -1
- package/types/XYAxis.d.ts +1 -2
- 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": "
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "hpcc-js - Viz Chart",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
"<3.8": {
|
|
12
|
-
"*": [
|
|
13
|
-
"types-3.4/index.d.ts"
|
|
14
|
-
]
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./types/index.d.ts",
|
|
9
|
+
"default": "./dist/index.js"
|
|
15
10
|
}
|
|
16
11
|
},
|
|
12
|
+
"module": "./dist/index.js",
|
|
13
|
+
"browser": "./dist/index.js",
|
|
14
|
+
"types": "./types/index.d.ts",
|
|
17
15
|
"files": [
|
|
18
16
|
"dist/*",
|
|
17
|
+
"src/*",
|
|
19
18
|
"types/*",
|
|
20
|
-
"
|
|
21
|
-
"src/*"
|
|
19
|
+
"font-awesome/**/*"
|
|
22
20
|
],
|
|
23
21
|
"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",
|
|
22
|
+
"clean": "rimraf --glob lib* types dist *.tsbuildinfo .turbo",
|
|
23
|
+
"bundle": "node esbuild.js",
|
|
24
|
+
"bundle-watch": "npm run bundle -- --development --watch",
|
|
25
|
+
"gen-types": "tsc --project tsconfig.json",
|
|
26
|
+
"gen-types-watch": "npm run gen-types -- --watch",
|
|
27
|
+
"build": "run-p gen-types bundle",
|
|
35
28
|
"stamp": "node ../../node_modules/@hpcc-js/bundle/src/stamp.js",
|
|
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 -y npm-check-updates -u -t minor"
|
|
39
36
|
},
|
|
40
37
|
"dependencies": {
|
|
41
|
-
"@hpcc-js/api": "^
|
|
42
|
-
"@hpcc-js/common": "^
|
|
43
|
-
"@hpcc-js/util": "^
|
|
38
|
+
"@hpcc-js/api": "^3.1.0",
|
|
39
|
+
"@hpcc-js/common": "^3.1.0",
|
|
40
|
+
"@hpcc-js/util": "^3.1.0"
|
|
44
41
|
},
|
|
45
42
|
"devDependencies": {
|
|
46
|
-
"@hpcc-js/
|
|
47
|
-
"@hpcc-js/
|
|
43
|
+
"@hpcc-js/dataflow": "^9.1.0",
|
|
44
|
+
"@hpcc-js/esbuild-plugins": "^1.2.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.6.3"
|
|
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": "3f6146539f487dca08a35cdd5f94ca29609b4343"
|
|
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;
|
|
@@ -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 (arguments.length) {
|
|
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 (arguments.length) {
|
|
760
|
+
this._timePattern = _;
|
|
761
|
+
this.updateScale();
|
|
762
|
+
}
|
|
763
|
+
return retVal;
|
|
764
|
+
};
|
package/src/Bar.ts
CHANGED
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
|
|
|
@@ -574,7 +574,6 @@ export class Column extends XYAxis {
|
|
|
574
574
|
}
|
|
575
575
|
|
|
576
576
|
// INDChart ---
|
|
577
|
-
_palette;
|
|
578
577
|
fillColor: (row, column, value, origRow) => string;
|
|
579
578
|
textColor: (row, column, value, origRow) => string;
|
|
580
579
|
dblclick: (row, column, selected) => void;
|
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/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
package/src/HexBin.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { I2DAggrChart, ITooltip } from "@hpcc-js/api";
|
|
|
2
2
|
import { InputField } from "@hpcc-js/common";
|
|
3
3
|
import { extent as d3Extent, max as d3Max, min as d3Min } from "d3-array";
|
|
4
4
|
import { hexbin as d3HexBin } from "d3-hexbin";
|
|
5
|
-
import { XYAxis } from "./XYAxis";
|
|
5
|
+
import { XYAxis } from "./XYAxis.ts";
|
|
6
6
|
|
|
7
7
|
import "../src/HexBin.css";
|
|
8
8
|
|
package/src/Line.ts
CHANGED
package/src/QuarterPie.ts
CHANGED
package/src/Scatter.ts
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
curveMonotoneX as d3CurveMonotoneX, curveNatural as d3CurveNatural, curveStep as d3CurveStep, curveStepAfter as d3CurveStepAfter, curveStepBefore as d3CurveStepBefore,
|
|
10
10
|
line as d3Line
|
|
11
11
|
} from "d3-shape";
|
|
12
|
-
import { XYAxis } from "./XYAxis";
|
|
12
|
+
import { XYAxis } from "./XYAxis.ts";
|
|
13
13
|
|
|
14
14
|
import "../src/Scatter.css";
|
|
15
15
|
|
|
@@ -334,7 +334,6 @@ export class Scatter extends XYAxis {
|
|
|
334
334
|
interpolateFillOpacity: { (): number; (_: number): Scatter; };
|
|
335
335
|
|
|
336
336
|
// INDChart
|
|
337
|
-
_palette;
|
|
338
337
|
fillColor: (row, column, value, origRow) => string;
|
|
339
338
|
strokeColor: (row, column, value, origRow) => string;
|
|
340
339
|
textColor: (row, column, value, origRow) => string;
|
package/src/StatChart.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { format as d3Format, HTMLWidget, Palette } from "@hpcc-js/common";
|
|
2
|
-
import { QuartileCandlestick } from "./QuartileCandlestick";
|
|
3
|
-
import { Scatter } from "./Scatter";
|
|
2
|
+
import { QuartileCandlestick } from "./QuartileCandlestick.ts";
|
|
3
|
+
import { Scatter } from "./Scatter.ts";
|
|
4
4
|
|
|
5
5
|
const rainbow = Palette.rainbow("Blues");
|
|
6
6
|
const palette = Palette.ordinal("Quartile", [rainbow(100, 0, 100), rainbow(50, 0, 100), rainbow(50, 0, 100), rainbow(75, 0, 100)]);
|
package/src/Step.ts
CHANGED
package/src/WordCloud.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { I2DChart, ITooltip } from "@hpcc-js/api";
|
|
|
2
2
|
import { d3Event, InputField, SVGWidget, Utility, zoom as d3Zoom } from "@hpcc-js/common";
|
|
3
3
|
import { extent as d3Extent } from "d3-array";
|
|
4
4
|
import { scaleLinear as d3ScaleLinear, scaleLog as d3ScaleLog, scalePow as d3ScalePow, scaleSqrt as d3ScaleSqrt } from "d3-scale";
|
|
5
|
-
import { d3Cloud } from "./D3Cloud";
|
|
5
|
+
import { d3Cloud } from "./D3Cloud.ts";
|
|
6
6
|
|
|
7
7
|
import "../src/WordCloud.css";
|
|
8
8
|
|
package/src/XYAxis.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { d3Event, select as d3Select, SVGWidget, Utility } from "@hpcc-js/common
|
|
|
2
2
|
import { max as d3Max, min as d3Min } from "d3-array";
|
|
3
3
|
import { brush as d3Brush, brushSelection as d3BrushSelection, brushX as d3BrushX, brushY as d3BrushY } from "d3-brush";
|
|
4
4
|
import { hsl as d3Hsl } from "d3-color";
|
|
5
|
-
import { Axis } from "./Axis";
|
|
5
|
+
import { Axis } from "./Axis.ts";
|
|
6
6
|
|
|
7
7
|
import "../src/XYAxis.css";
|
|
8
8
|
|
package/src/__package__.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export const PKG_NAME = "@hpcc-js/chart";
|
|
2
|
-
export const PKG_VERSION = "
|
|
3
|
-
export const BUILD_VERSION = "2.
|
|
2
|
+
export const PKG_VERSION = "3.1.0";
|
|
3
|
+
export const BUILD_VERSION = "2.107.0";
|
package/src/index.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
export * from "./__package__";
|
|
2
|
-
export * from "./Area";
|
|
3
|
-
export * from "./Axis";
|
|
4
|
-
export * from "./Bar";
|
|
5
|
-
export * from "./Bubble";
|
|
6
|
-
export * from "./BubbleXY";
|
|
7
|
-
export * from "./Bullet";
|
|
8
|
-
export * from "./Column";
|
|
9
|
-
export * from "./Contour";
|
|
10
|
-
export * from "./Gantt";
|
|
11
|
-
export * from "./Gauge";
|
|
12
|
-
export * from "./HalfPie";
|
|
13
|
-
export * from "./Heat";
|
|
14
|
-
export * from "./HexBin";
|
|
15
|
-
export * from "./Line";
|
|
16
|
-
export * from "./Pie";
|
|
17
|
-
export * from "./QuarterPie";
|
|
18
|
-
export * from "./QuartileCandlestick";
|
|
19
|
-
export * from "./Radar";
|
|
20
|
-
export * from "./RadialBar";
|
|
21
|
-
export * from "./Scatter";
|
|
22
|
-
export * from "./StatChart";
|
|
23
|
-
export * from "./Step";
|
|
24
|
-
export * from "./Summary";
|
|
25
|
-
export * from "./SummaryC";
|
|
26
|
-
export * from "./WordCloud";
|
|
27
|
-
export * from "./XYAxis";
|
|
1
|
+
export * from "./__package__.ts";
|
|
2
|
+
export * from "./Area.ts";
|
|
3
|
+
export * from "./Axis.ts";
|
|
4
|
+
export * from "./Bar.ts";
|
|
5
|
+
export * from "./Bubble.ts";
|
|
6
|
+
export * from "./BubbleXY.ts";
|
|
7
|
+
export * from "./Bullet.ts";
|
|
8
|
+
export * from "./Column.ts";
|
|
9
|
+
export * from "./Contour.ts";
|
|
10
|
+
export * from "./Gantt.ts";
|
|
11
|
+
export * from "./Gauge.ts";
|
|
12
|
+
export * from "./HalfPie.ts";
|
|
13
|
+
export * from "./Heat.ts";
|
|
14
|
+
export * from "./HexBin.ts";
|
|
15
|
+
export * from "./Line.ts";
|
|
16
|
+
export * from "./Pie.ts";
|
|
17
|
+
export * from "./QuarterPie.ts";
|
|
18
|
+
export * from "./QuartileCandlestick.ts";
|
|
19
|
+
export * from "./Radar.ts";
|
|
20
|
+
export * from "./RadialBar.ts";
|
|
21
|
+
export * from "./Scatter.ts";
|
|
22
|
+
export * from "./StatChart.ts";
|
|
23
|
+
export * from "./Step.ts";
|
|
24
|
+
export * from "./Summary.ts";
|
|
25
|
+
export * from "./SummaryC.ts";
|
|
26
|
+
export * from "./WordCloud.ts";
|
|
27
|
+
export * from "./XYAxis.ts";
|
package/types/Area.d.ts
CHANGED