@hpcc-js/chart 2.86.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.
Files changed (135) hide show
  1. package/dist/index.css +2 -0
  2. package/dist/index.css.map +7 -0
  3. package/dist/index.js +63 -11786
  4. package/dist/index.js.map +7 -1
  5. package/package.json +29 -33
  6. package/src/Area.ts +1 -1
  7. package/src/Axis.ts +89 -58
  8. package/src/Bar.ts +1 -1
  9. package/src/BubbleXY.ts +1 -1
  10. package/src/Bullet.ts +21 -11
  11. package/src/Column.ts +1 -2
  12. package/src/Contour.ts +1 -1
  13. package/src/Gantt.ts +1 -1
  14. package/src/Gauge.ts +30 -28
  15. package/src/HalfPie.ts +1 -1
  16. package/src/Heat.ts +1 -1
  17. package/src/HexBin.ts +1 -1
  18. package/src/Line.ts +1 -1
  19. package/src/QuarterPie.ts +1 -1
  20. package/src/Scatter.ts +1 -2
  21. package/src/StatChart.ts +2 -2
  22. package/src/Step.ts +1 -1
  23. package/src/WordCloud.ts +1 -1
  24. package/src/XYAxis.ts +1 -1
  25. package/src/__package__.ts +1 -1
  26. package/src/index.ts +27 -27
  27. package/types/Area.d.ts +1 -2
  28. package/types/Axis.d.ts +67 -118
  29. package/types/Bar.d.ts +1 -2
  30. package/types/Bubble.d.ts +0 -1
  31. package/types/BubbleXY.d.ts +1 -2
  32. package/types/Bullet.d.ts +13 -7
  33. package/types/Column.d.ts +1 -3
  34. package/types/Contour.d.ts +1 -2
  35. package/types/D3Cloud.d.ts +0 -1
  36. package/types/Gantt.d.ts +1 -2
  37. package/types/Gauge.d.ts +19 -11
  38. package/types/HalfPie.d.ts +1 -2
  39. package/types/Heat.d.ts +1 -2
  40. package/types/HexBin.d.ts +1 -2
  41. package/types/Line.d.ts +1 -2
  42. package/types/Pie.d.ts +0 -1
  43. package/types/QuarterPie.d.ts +1 -2
  44. package/types/QuartileCandlestick.d.ts +0 -1
  45. package/types/Radar.d.ts +0 -1
  46. package/types/RadialBar.d.ts +0 -1
  47. package/types/Scatter.d.ts +1 -3
  48. package/types/StatChart.d.ts +2 -3
  49. package/types/Step.d.ts +1 -2
  50. package/types/Summary.d.ts +0 -1
  51. package/types/SummaryC.d.ts +0 -1
  52. package/types/WordCloud.d.ts +0 -1
  53. package/types/XYAxis.d.ts +1 -2
  54. package/types/__package__.d.ts +1 -2
  55. package/types/index.d.ts +27 -28
  56. package/dist/index.es6.js +0 -11759
  57. package/dist/index.es6.js.map +0 -1
  58. package/dist/index.min.js +0 -2
  59. package/dist/index.min.js.map +0 -1
  60. package/types/Area.d.ts.map +0 -1
  61. package/types/Axis.d.ts.map +0 -1
  62. package/types/Bar.d.ts.map +0 -1
  63. package/types/Bubble.d.ts.map +0 -1
  64. package/types/BubbleXY.d.ts.map +0 -1
  65. package/types/Bullet.d.ts.map +0 -1
  66. package/types/Column.d.ts.map +0 -1
  67. package/types/Contour.d.ts.map +0 -1
  68. package/types/D3Cloud.d.ts.map +0 -1
  69. package/types/Gantt.d.ts.map +0 -1
  70. package/types/Gauge.d.ts.map +0 -1
  71. package/types/HalfPie.d.ts.map +0 -1
  72. package/types/Heat.d.ts.map +0 -1
  73. package/types/HexBin.d.ts.map +0 -1
  74. package/types/Line.d.ts.map +0 -1
  75. package/types/Pie.d.ts.map +0 -1
  76. package/types/QuarterPie.d.ts.map +0 -1
  77. package/types/QuartileCandlestick.d.ts.map +0 -1
  78. package/types/Radar.d.ts.map +0 -1
  79. package/types/RadialBar.d.ts.map +0 -1
  80. package/types/Scatter.d.ts.map +0 -1
  81. package/types/StatChart.d.ts.map +0 -1
  82. package/types/Step.d.ts.map +0 -1
  83. package/types/Summary.d.ts.map +0 -1
  84. package/types/SummaryC.d.ts.map +0 -1
  85. package/types/WordCloud.d.ts.map +0 -1
  86. package/types/XYAxis.d.ts.map +0 -1
  87. package/types/__package__.d.ts.map +0 -1
  88. package/types/__tests__/heat.d.ts +0 -10
  89. package/types/__tests__/heat.d.ts.map +0 -1
  90. package/types/__tests__/index.d.ts +0 -2
  91. package/types/__tests__/index.d.ts.map +0 -1
  92. package/types/__tests__/pie.d.ts +0 -5
  93. package/types/__tests__/pie.d.ts.map +0 -1
  94. package/types/__tests__/stat.d.ts +0 -5
  95. package/types/__tests__/stat.d.ts.map +0 -1
  96. package/types/__tests__/test3.d.ts +0 -9
  97. package/types/__tests__/test3.d.ts.map +0 -1
  98. package/types/index.d.ts.map +0 -1
  99. package/types/test.d.ts +0 -10
  100. package/types/test.d.ts.map +0 -1
  101. package/types-3.4/Area.d.ts +0 -5
  102. package/types-3.4/Axis.d.ts +0 -180
  103. package/types-3.4/Bar.d.ts +0 -5
  104. package/types-3.4/Bubble.d.ts +0 -32
  105. package/types-3.4/BubbleXY.d.ts +0 -6
  106. package/types-3.4/Bullet.d.ts +0 -19
  107. package/types-3.4/Column.d.ts +0 -70
  108. package/types-3.4/Contour.d.ts +0 -30
  109. package/types-3.4/D3Cloud.d.ts +0 -2
  110. package/types-3.4/Gantt.d.ts +0 -5
  111. package/types-3.4/Gauge.d.ts +0 -47
  112. package/types-3.4/HalfPie.d.ts +0 -7
  113. package/types-3.4/Heat.d.ts +0 -32
  114. package/types-3.4/HexBin.d.ts +0 -34
  115. package/types-3.4/Line.d.ts +0 -6
  116. package/types-3.4/Pie.d.ts +0 -95
  117. package/types-3.4/QuarterPie.d.ts +0 -12
  118. package/types-3.4/QuartileCandlestick.d.ts +0 -57
  119. package/types-3.4/Radar.d.ts +0 -47
  120. package/types-3.4/RadialBar.d.ts +0 -44
  121. package/types-3.4/Scatter.d.ts +0 -80
  122. package/types-3.4/StatChart.d.ts +0 -70
  123. package/types-3.4/Step.d.ts +0 -5
  124. package/types-3.4/Summary.d.ts +0 -105
  125. package/types-3.4/SummaryC.d.ts +0 -69
  126. package/types-3.4/WordCloud.d.ts +0 -130
  127. package/types-3.4/XYAxis.d.ts +0 -181
  128. package/types-3.4/__package__.d.ts +0 -4
  129. package/types-3.4/__tests__/heat.d.ts +0 -10
  130. package/types-3.4/__tests__/index.d.ts +0 -2
  131. package/types-3.4/__tests__/pie.d.ts +0 -5
  132. package/types-3.4/__tests__/stat.d.ts +0 -5
  133. package/types-3.4/__tests__/test3.d.ts +0 -9
  134. package/types-3.4/index.d.ts +0 -28
  135. 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.86.0",
3
+ "version": "3.1.0",
4
4
  "description": "hpcc-js - Viz Chart",
5
- "main": "dist/index.js",
6
- "module": "dist/index.es6",
7
- "unpkg": "dist/index.min.js",
8
- "jsdelivr": "dist/index.min.js",
9
- "types": "types/index.d.ts",
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
- "types-3.4/*",
21
- "src/*"
19
+ "font-awesome/**/*"
22
20
  ],
23
21
  "scripts": {
24
- "clean": "rimraf --glob lib* types dist *.tsbuildinfo",
25
- "compile-es6": "tsc --module es6 --outDir ./lib-es6",
26
- "compile-es6-watch": "npm run compile-es6 -- -w",
27
- "compile-umd": "tsc --module umd --outDir ./lib-umd",
28
- "compile-umd-watch": "npm run compile-umd -- -w",
29
- "bundle": "rollup -c",
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
- "update": "npx --yes npm-check-updates -u -t minor"
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": "^2.14.0",
42
- "@hpcc-js/common": "^2.73.0",
43
- "@hpcc-js/util": "^2.53.0"
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/bundle": "^2.12.0",
47
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.5",
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": "fbbef050700b0e9d76ef99714856383d95155149"
78
+ "gitHead": "3f6146539f487dca08a35cdd5f94ca29609b4343"
83
79
  }
package/src/Area.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Scatter } from "./Scatter";
1
+ import { Scatter } from "./Scatter.ts";
2
2
 
3
3
  export class Area extends Scatter {
4
4
  constructor() {
package/src/Axis.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { publish, SVGWidget } from "@hpcc-js/common";
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
@@ -1,4 +1,4 @@
1
- import { Column } from "./Column";
1
+ import { Column } from "./Column.ts";
2
2
 
3
3
  export class Bar extends Column {
4
4
  constructor() {
package/src/BubbleXY.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Scatter } from "./Scatter";
1
+ import { Scatter } from "./Scatter.ts";
2
2
 
3
3
  export class BubbleXY extends Scatter {
4
4
  constructor() {
package/src/Bullet.ts CHANGED
@@ -1,20 +1,10 @@
1
- import { HTMLWidget, publish, Utility } from "@hpcc-js/common";
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
@@ -1,4 +1,4 @@
1
- import { Bar } from "./Bar";
1
+ import { Bar } from "./Bar.ts";
2
2
 
3
3
  export class Gantt extends Bar {
4
4
  constructor() {
package/src/Gauge.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { publish, SVGWidget } from "@hpcc-js/common";
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
@@ -1,4 +1,4 @@
1
- import { Pie } from "./Pie";
1
+ import { Pie } from "./Pie.ts";
2
2
 
3
3
  export class HalfPie extends Pie {
4
4
  constructor() {
package/src/Heat.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { max, Palette } from "@hpcc-js/common";
2
- import { XYAxis } from "./XYAxis";
2
+ import { XYAxis } from "./XYAxis.ts";
3
3
 
4
4
  export class Heat extends XYAxis {
5
5
 
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
@@ -1,4 +1,4 @@
1
- import { Scatter } from "./Scatter";
1
+ import { Scatter } from "./Scatter.ts";
2
2
 
3
3
  import "../src/Line.css";
4
4
 
package/src/QuarterPie.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Pie } from "./Pie";
1
+ import { Pie } from "./Pie.ts";
2
2
 
3
3
  export class QuarterPie extends Pie {
4
4
  constructor() {
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
@@ -1,4 +1,4 @@
1
- import { Scatter } from "./Scatter";
1
+ import { Scatter } from "./Scatter.ts";
2
2
 
3
3
  export class Step extends Scatter {
4
4
  constructor() {
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
 
@@ -1,3 +1,3 @@
1
1
  export const PKG_NAME = "@hpcc-js/chart";
2
- export const PKG_VERSION = "2.86.0";
2
+ export const PKG_VERSION = "3.1.0";
3
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
@@ -1,5 +1,4 @@
1
- import { Scatter } from "./Scatter";
1
+ import { Scatter } from "./Scatter.ts";
2
2
  export declare class Area extends Scatter {
3
3
  constructor();
4
4
  }
5
- //# sourceMappingURL=Area.d.ts.map