@hpcc-js/chart 2.86.3 → 2.86.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/LICENSE +43 -43
  2. package/README.md +93 -93
  3. package/dist/index.es6.js +2 -2
  4. package/dist/index.es6.js.map +1 -1
  5. package/dist/index.js +2 -2
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.min.js +1 -1
  8. package/dist/index.min.js.map +1 -1
  9. package/package.json +5 -5
  10. package/src/Area.md +176 -176
  11. package/src/Area.ts +12 -12
  12. package/src/Axis.css +34 -34
  13. package/src/Axis.ts +733 -733
  14. package/src/Bar.md +90 -90
  15. package/src/Bar.ts +9 -9
  16. package/src/Bubble.css +16 -16
  17. package/src/Bubble.md +69 -69
  18. package/src/Bubble.ts +191 -191
  19. package/src/BubbleXY.ts +14 -14
  20. package/src/Bullet.css +60 -60
  21. package/src/Bullet.md +104 -104
  22. package/src/Bullet.ts +167 -167
  23. package/src/Column.css +17 -17
  24. package/src/Column.md +90 -90
  25. package/src/Column.ts +659 -659
  26. package/src/Contour.md +88 -88
  27. package/src/Contour.ts +97 -97
  28. package/src/D3Cloud.ts +400 -400
  29. package/src/Gantt.md +119 -119
  30. package/src/Gantt.ts +14 -14
  31. package/src/Gauge.md +148 -148
  32. package/src/Gauge.ts +358 -358
  33. package/src/HalfPie.md +62 -62
  34. package/src/HalfPie.ts +26 -26
  35. package/src/Heat.md +42 -42
  36. package/src/Heat.ts +283 -283
  37. package/src/HexBin.css +9 -9
  38. package/src/HexBin.md +88 -88
  39. package/src/HexBin.ts +139 -139
  40. package/src/Line.css +6 -6
  41. package/src/Line.md +170 -170
  42. package/src/Line.ts +14 -14
  43. package/src/Pie.css +23 -23
  44. package/src/Pie.md +88 -88
  45. package/src/Pie.ts +503 -503
  46. package/src/QuarterPie.md +61 -61
  47. package/src/QuarterPie.ts +35 -35
  48. package/src/QuartileCandlestick.md +129 -129
  49. package/src/QuartileCandlestick.ts +349 -349
  50. package/src/Radar.css +15 -15
  51. package/src/Radar.md +104 -104
  52. package/src/Radar.ts +336 -336
  53. package/src/RadialBar.css +25 -25
  54. package/src/RadialBar.md +91 -91
  55. package/src/RadialBar.ts +212 -212
  56. package/src/Scatter.css +16 -16
  57. package/src/Scatter.md +163 -163
  58. package/src/Scatter.ts +376 -376
  59. package/src/StatChart.md +117 -117
  60. package/src/StatChart.ts +253 -253
  61. package/src/Step.md +163 -163
  62. package/src/Step.ts +12 -12
  63. package/src/Summary.css +56 -56
  64. package/src/Summary.md +219 -219
  65. package/src/Summary.ts +322 -322
  66. package/src/SummaryC.md +154 -154
  67. package/src/SummaryC.ts +240 -240
  68. package/src/WordCloud.css +3 -3
  69. package/src/WordCloud.md +144 -144
  70. package/src/WordCloud.ts +263 -263
  71. package/src/XYAxis.css +41 -41
  72. package/src/XYAxis.md +149 -149
  73. package/src/XYAxis.ts +803 -803
  74. package/src/__package__.ts +3 -3
  75. package/src/__tests__/heat.ts +71 -71
  76. package/src/__tests__/index.ts +3 -3
  77. package/src/__tests__/pie.ts +20 -20
  78. package/src/__tests__/stat.ts +16 -16
  79. package/src/__tests__/test3.ts +69 -69
  80. package/src/index.ts +27 -27
  81. package/src/test.ts +71 -71
  82. package/types/__package__.d.ts +2 -2
  83. package/types/__package__.d.ts.map +1 -1
  84. package/types-3.4/__package__.d.ts +2 -2
package/src/SummaryC.ts CHANGED
@@ -1,240 +1,240 @@
1
- import { I2DChart } from "@hpcc-js/api";
2
- import { CanvasWidget, Utility } from "@hpcc-js/common";
3
-
4
- export class SummaryC extends CanvasWidget {
5
- protected _playIntervalIdx = 0;
6
-
7
- constructor() {
8
- super();
9
- I2DChart.call(this);
10
- this.playInterval(this.playInterval());
11
- }
12
-
13
- currentRow() {
14
- return this.data()[this._playIntervalIdx];
15
- }
16
-
17
- enter(domNode, element) {
18
- super.enter.apply(this, arguments);
19
- const { width, height } = this.size();
20
- domNode.height = height;
21
- domNode.width = width;
22
- }
23
-
24
- update(domNode, element) {
25
- super.update.apply(this, arguments);
26
- const context = this;
27
- if (this._playIntervalIdx >= this.data().length) {
28
- this._playIntervalIdx = 0;
29
- }
30
- const size = this.size();
31
- const minDimension = Math.min(size.width, size.height);
32
- const sizeRatio = this.fontSizeRatio();
33
- const labelIdx = this.columns().indexOf(this.labelColumn());
34
- const valueIdx = this.columns().indexOf(this.valueColumn());
35
- const bgColorIdx = this.columns().indexOf(this.colorFillColumn());
36
- const fontColorIdx = this.columns().indexOf(this.colorStrokeColumn());
37
- const iconIdx = this.columns().indexOf(this.iconColumn());
38
- const icon = iconIdx !== -1 ? this.currentRow()[iconIdx] : this.icon();
39
- const label = labelIdx !== -1 ? this.currentRow()[labelIdx] : "";
40
- const value = valueIdx !== -1 ? this.currentRow()[valueIdx] : "";
41
- const bgColor = bgColorIdx !== -1 ? this.currentRow()[bgColorIdx] : this.colorFill();
42
- const fontColor = fontColorIdx !== -1 ? this.currentRow()[fontColorIdx] : this.colorStroke();
43
-
44
- let mainFontSize = size.height * (sizeRatio - this.paddingSizeRatio());
45
- const subFontSize = size.height * (1 - sizeRatio - this.paddingSizeRatio());
46
- const iconSize = size.height * (this.iconSizeRatio() - this.paddingSizeRatio());
47
- const p = minDimension * this.paddingSizeRatio();
48
- const ctx = domNode.getContext("2d");
49
-
50
- ctx.clearRect(0, 0, size.width, size.height);
51
-
52
- const fontFamily = context.fontFamily();
53
-
54
- ctx.fillStyle = bgColor;
55
- ctx.fillRect(0, 0, size.width, size.height);
56
-
57
- ctx.globalAlpha = this.iconOpacity();
58
- drawIcon(Utility.faChar(icon), iconSize, context.iconAnchor());
59
-
60
- ctx.globalAlpha = this.valueOpacity();
61
- mainFontSize = drawText(value, p, mainFontSize, context.valueAnchor());
62
-
63
- ctx.globalAlpha = this.labelOpacity();
64
- drawText(label, mainFontSize + p, subFontSize, context.labelAnchor());
65
-
66
- function drawText(text, y, fontSize, anchorMode) {
67
- ctx.textBaseline = "top";
68
- ctx.font = `${fontSize}px ${fontFamily}`;
69
- ctx.fillStyle = fontColor;
70
- let measurement = ctx.measureText(text);
71
- if (measurement.width > (size.width - (p * 2))) {
72
- const fontSizeMult = (size.width - (p * 2)) / measurement.width;
73
- fontSize = fontSize * fontSizeMult;
74
- ctx.font = `${fontSize}px ${fontFamily}`;
75
- measurement = ctx.measureText(text);
76
- }
77
- const x = getTextOffsetX(measurement.width, anchorMode);
78
- ctx.fillText(text, x, y);
79
- return fontSize;
80
- }
81
-
82
- function drawIcon(text, fontSize, anchorMode) {
83
- if (typeof text === "undefined") return;
84
- ctx.textBaseline = context.iconBaseline();
85
- ctx.font = `${fontSize}px FontAwesome`;
86
- ctx.fillStyle = fontColor;
87
- let measurement = ctx.measureText(text);
88
- if (measurement.width > (size.width - (p * 2))) {
89
- const fontSizeMult = (size.width - (p * 2)) / measurement.width;
90
- ctx.font = `${fontSize * fontSizeMult}px FontAwesome`;
91
- measurement = ctx.measureText(text);
92
- }
93
- const x = getTextOffsetX(measurement.width, anchorMode);
94
- const y = getTextOffsetY(context.iconBaseline());
95
- ctx.fillText(text, x, y);
96
- }
97
-
98
- function getTextOffsetX(width, anchorMode) {
99
- switch (anchorMode) {
100
- case "start":
101
- return p;
102
- case "middle":
103
- return (size.width / 2) - (width / 2);
104
- case "end":
105
- return size.width - width - p;
106
- }
107
- }
108
- function getTextOffsetY(anchorMode) {
109
- switch (anchorMode) {
110
- case "top":
111
- return p;
112
- case "middle":
113
- return size.height / 2;
114
- case "bottom":
115
- return size.height - p;
116
- }
117
- }
118
- }
119
- }
120
- SummaryC.prototype._class += " chart_SummaryC";
121
- SummaryC.prototype.implements(I2DChart.prototype);
122
-
123
- export interface SummaryC {
124
- iconColumn(): string;
125
- iconColumn(_: string): this;
126
- iconColumn_exists(): boolean;
127
- icon(): string;
128
- icon(_: string): this;
129
- icon_exists(): boolean;
130
- iconOpacity(): number;
131
- iconOpacity(_: number): this;
132
-
133
- fontFamily(): string;
134
- fontFamily(_: string): this;
135
-
136
- labelColumn(): string;
137
- labelColumn(_: string): this;
138
- labelColumn_exists(): boolean;
139
- labelOpacity(): number;
140
- labelOpacity(_: number): this;
141
-
142
- valueColumn(): string;
143
- valueColumn(_: string): this;
144
- valueColumn_exists(): boolean;
145
- valueOpacity(): number;
146
- valueOpacity(_: number): this;
147
-
148
- fontSizeRatio(): number;
149
- fontSizeRatio(_: number): this;
150
-
151
- colorFillColumn(): string;
152
- colorFillColumn(_: string): this;
153
- colorFillColumn_exists(): boolean;
154
- colorFill(): string;
155
- colorFill(_: string): this;
156
- colorFill_exists(): boolean;
157
- colorStrokeColumn(): string;
158
- colorStrokeColumn(_: string): this;
159
- colorStrokeColumn_exists(): boolean;
160
- colorStroke(): string;
161
- colorStroke(_: string): this;
162
- colorStroke_exists(): boolean;
163
-
164
- fixedSize(): boolean;
165
- fixedSize(_: boolean): this;
166
- fixedSize_exists(): boolean;
167
- minWidth(): number;
168
- minWidth(_: number): this;
169
- minWidth_exists(): boolean;
170
- minHeight(): number;
171
- minHeight(_: number): this;
172
- minHeight_exists(): boolean;
173
- playInterval(): number;
174
- playInterval(_: number): this;
175
- playInterval_exists(): boolean;
176
- paddingSizeRatio(): number;
177
- paddingSizeRatio(_: number): this;
178
- iconSizeRatio(): number;
179
- iconSizeRatio(_: number): this;
180
-
181
- iconAnchor(): "start" | "middle" | "end";
182
- iconAnchor(_: "start" | "middle" | "end"): this;
183
- labelAnchor(): "start" | "middle" | "end";
184
- labelAnchor(_: "start" | "middle" | "end"): this;
185
- valueAnchor(): "start" | "middle" | "end";
186
- valueAnchor(_: "start" | "middle" | "end"): this;
187
-
188
- iconBaseline(): "top" | "middle" | "bottom";
189
- iconBaseline(_: "top" | "middle" | "bottom"): this;
190
- }
191
-
192
- SummaryC.prototype.publish("iconBaseline", "bottom", "string", "Text baseline for the icon", ["top", "middle", "bottom"]);
193
- SummaryC.prototype.publish("iconAnchor", "end", "set", "Anchors the icon either at the start, middle, or end of the summary", ["start", "middle", "end"]);
194
- SummaryC.prototype.publish("valueAnchor", "start", "set", "Anchors the value either at the start, middle, or end of the summary", ["start", "middle", "end"]);
195
- SummaryC.prototype.publish("labelAnchor", "start", "set", "Anchors the label either at the start, middle, or end of the summary", ["start", "middle", "end"]);
196
- SummaryC.prototype.publish("iconColumn", null, "set", "Select Icon Column", function () { return this.columns(); }, { optional: true });
197
- SummaryC.prototype.publish("icon", "fa-briefcase", "string", "FA Char icon class", null, { disable: (w) => w.iconColumn() });
198
-
199
- SummaryC.prototype.publish("fontFamily", "Arial", "string", "Font Family");
200
-
201
- SummaryC.prototype.publish("labelColumn", null, "set", "Select display value", function () { return this.columns(); }, { optional: true });
202
- SummaryC.prototype.publish("valueColumn", null, "set", "Select display value", function () { return this.columns(); }, { optional: true });
203
-
204
- SummaryC.prototype.publish("colorFillColumn", null, "set", "Column for background color", function () { return this.columns(); }, { optional: true });
205
- SummaryC.prototype.publish("colorFill", "#0097e6", "html-color", "Background Color", null, { disable: (w) => w.colorFillColumn() });
206
- SummaryC.prototype.publish("colorStrokeColumn", null, "set", "Column for font color", function () { return this.columns(); }, { optional: true });
207
- SummaryC.prototype.publish("colorStroke", "#2f3640", "html-color", "Font Color", null, { disable: (w) => w.colorStrokeColumn() });
208
-
209
- SummaryC.prototype.publish("fixedSize", true, "boolean", "Fix Size to Min Width/Height");
210
- SummaryC.prototype.publish("minWidth", 225, "number", "Minimum Width");
211
- SummaryC.prototype.publish("minHeight", 150, "number", "Minimum Height");
212
- SummaryC.prototype.publish("playInterval", null, "number", "Play Interval", null, { optional: true });
213
-
214
- SummaryC.prototype.publish("fontSizeRatio", 0.618, "number", "Ratio between widget height and value font size");
215
- SummaryC.prototype.publish("valueOpacity", 1, "number", "Opacity of value text (0..1)");
216
- SummaryC.prototype.publish("labelOpacity", 0.9, "number", "Opacity of label text (0..1)");
217
- SummaryC.prototype.publish("iconOpacity", 0.3, "number", "Opacity of icon text (0..1)");
218
-
219
- SummaryC.prototype.publish("paddingSizeRatio", 0.1, "number", "Ratio of the smallest dimension for edge padding (0..1)");
220
- SummaryC.prototype.publish("iconSizeRatio", 0.9, "number", "Ratio of the height for icon size (0..1)");
221
-
222
- const playInterval = SummaryC.prototype.playInterval;
223
- SummaryC.prototype.playInterval = function (_?: number): number | any {
224
- const retVal = playInterval.apply(this, arguments);
225
- if (arguments.length) {
226
- if (this._playIntervalHandle) {
227
- clearInterval(this._playIntervalHandle);
228
- }
229
- const context = this;
230
- if (_) {
231
- this._playIntervalHandle = setInterval(function () {
232
- context._playIntervalIdx++;
233
- if (context._renderCount && context.data().length) {
234
- context.render();
235
- }
236
- }, _);
237
- }
238
- }
239
- return retVal;
240
- };
1
+ import { I2DChart } from "@hpcc-js/api";
2
+ import { CanvasWidget, Utility } from "@hpcc-js/common";
3
+
4
+ export class SummaryC extends CanvasWidget {
5
+ protected _playIntervalIdx = 0;
6
+
7
+ constructor() {
8
+ super();
9
+ I2DChart.call(this);
10
+ this.playInterval(this.playInterval());
11
+ }
12
+
13
+ currentRow() {
14
+ return this.data()[this._playIntervalIdx];
15
+ }
16
+
17
+ enter(domNode, element) {
18
+ super.enter.apply(this, arguments);
19
+ const { width, height } = this.size();
20
+ domNode.height = height;
21
+ domNode.width = width;
22
+ }
23
+
24
+ update(domNode, element) {
25
+ super.update.apply(this, arguments);
26
+ const context = this;
27
+ if (this._playIntervalIdx >= this.data().length) {
28
+ this._playIntervalIdx = 0;
29
+ }
30
+ const size = this.size();
31
+ const minDimension = Math.min(size.width, size.height);
32
+ const sizeRatio = this.fontSizeRatio();
33
+ const labelIdx = this.columns().indexOf(this.labelColumn());
34
+ const valueIdx = this.columns().indexOf(this.valueColumn());
35
+ const bgColorIdx = this.columns().indexOf(this.colorFillColumn());
36
+ const fontColorIdx = this.columns().indexOf(this.colorStrokeColumn());
37
+ const iconIdx = this.columns().indexOf(this.iconColumn());
38
+ const icon = iconIdx !== -1 ? this.currentRow()[iconIdx] : this.icon();
39
+ const label = labelIdx !== -1 ? this.currentRow()[labelIdx] : "";
40
+ const value = valueIdx !== -1 ? this.currentRow()[valueIdx] : "";
41
+ const bgColor = bgColorIdx !== -1 ? this.currentRow()[bgColorIdx] : this.colorFill();
42
+ const fontColor = fontColorIdx !== -1 ? this.currentRow()[fontColorIdx] : this.colorStroke();
43
+
44
+ let mainFontSize = size.height * (sizeRatio - this.paddingSizeRatio());
45
+ const subFontSize = size.height * (1 - sizeRatio - this.paddingSizeRatio());
46
+ const iconSize = size.height * (this.iconSizeRatio() - this.paddingSizeRatio());
47
+ const p = minDimension * this.paddingSizeRatio();
48
+ const ctx = domNode.getContext("2d");
49
+
50
+ ctx.clearRect(0, 0, size.width, size.height);
51
+
52
+ const fontFamily = context.fontFamily();
53
+
54
+ ctx.fillStyle = bgColor;
55
+ ctx.fillRect(0, 0, size.width, size.height);
56
+
57
+ ctx.globalAlpha = this.iconOpacity();
58
+ drawIcon(Utility.faChar(icon), iconSize, context.iconAnchor());
59
+
60
+ ctx.globalAlpha = this.valueOpacity();
61
+ mainFontSize = drawText(value, p, mainFontSize, context.valueAnchor());
62
+
63
+ ctx.globalAlpha = this.labelOpacity();
64
+ drawText(label, mainFontSize + p, subFontSize, context.labelAnchor());
65
+
66
+ function drawText(text, y, fontSize, anchorMode) {
67
+ ctx.textBaseline = "top";
68
+ ctx.font = `${fontSize}px ${fontFamily}`;
69
+ ctx.fillStyle = fontColor;
70
+ let measurement = ctx.measureText(text);
71
+ if (measurement.width > (size.width - (p * 2))) {
72
+ const fontSizeMult = (size.width - (p * 2)) / measurement.width;
73
+ fontSize = fontSize * fontSizeMult;
74
+ ctx.font = `${fontSize}px ${fontFamily}`;
75
+ measurement = ctx.measureText(text);
76
+ }
77
+ const x = getTextOffsetX(measurement.width, anchorMode);
78
+ ctx.fillText(text, x, y);
79
+ return fontSize;
80
+ }
81
+
82
+ function drawIcon(text, fontSize, anchorMode) {
83
+ if (typeof text === "undefined") return;
84
+ ctx.textBaseline = context.iconBaseline();
85
+ ctx.font = `${fontSize}px FontAwesome`;
86
+ ctx.fillStyle = fontColor;
87
+ let measurement = ctx.measureText(text);
88
+ if (measurement.width > (size.width - (p * 2))) {
89
+ const fontSizeMult = (size.width - (p * 2)) / measurement.width;
90
+ ctx.font = `${fontSize * fontSizeMult}px FontAwesome`;
91
+ measurement = ctx.measureText(text);
92
+ }
93
+ const x = getTextOffsetX(measurement.width, anchorMode);
94
+ const y = getTextOffsetY(context.iconBaseline());
95
+ ctx.fillText(text, x, y);
96
+ }
97
+
98
+ function getTextOffsetX(width, anchorMode) {
99
+ switch (anchorMode) {
100
+ case "start":
101
+ return p;
102
+ case "middle":
103
+ return (size.width / 2) - (width / 2);
104
+ case "end":
105
+ return size.width - width - p;
106
+ }
107
+ }
108
+ function getTextOffsetY(anchorMode) {
109
+ switch (anchorMode) {
110
+ case "top":
111
+ return p;
112
+ case "middle":
113
+ return size.height / 2;
114
+ case "bottom":
115
+ return size.height - p;
116
+ }
117
+ }
118
+ }
119
+ }
120
+ SummaryC.prototype._class += " chart_SummaryC";
121
+ SummaryC.prototype.implements(I2DChart.prototype);
122
+
123
+ export interface SummaryC {
124
+ iconColumn(): string;
125
+ iconColumn(_: string): this;
126
+ iconColumn_exists(): boolean;
127
+ icon(): string;
128
+ icon(_: string): this;
129
+ icon_exists(): boolean;
130
+ iconOpacity(): number;
131
+ iconOpacity(_: number): this;
132
+
133
+ fontFamily(): string;
134
+ fontFamily(_: string): this;
135
+
136
+ labelColumn(): string;
137
+ labelColumn(_: string): this;
138
+ labelColumn_exists(): boolean;
139
+ labelOpacity(): number;
140
+ labelOpacity(_: number): this;
141
+
142
+ valueColumn(): string;
143
+ valueColumn(_: string): this;
144
+ valueColumn_exists(): boolean;
145
+ valueOpacity(): number;
146
+ valueOpacity(_: number): this;
147
+
148
+ fontSizeRatio(): number;
149
+ fontSizeRatio(_: number): this;
150
+
151
+ colorFillColumn(): string;
152
+ colorFillColumn(_: string): this;
153
+ colorFillColumn_exists(): boolean;
154
+ colorFill(): string;
155
+ colorFill(_: string): this;
156
+ colorFill_exists(): boolean;
157
+ colorStrokeColumn(): string;
158
+ colorStrokeColumn(_: string): this;
159
+ colorStrokeColumn_exists(): boolean;
160
+ colorStroke(): string;
161
+ colorStroke(_: string): this;
162
+ colorStroke_exists(): boolean;
163
+
164
+ fixedSize(): boolean;
165
+ fixedSize(_: boolean): this;
166
+ fixedSize_exists(): boolean;
167
+ minWidth(): number;
168
+ minWidth(_: number): this;
169
+ minWidth_exists(): boolean;
170
+ minHeight(): number;
171
+ minHeight(_: number): this;
172
+ minHeight_exists(): boolean;
173
+ playInterval(): number;
174
+ playInterval(_: number): this;
175
+ playInterval_exists(): boolean;
176
+ paddingSizeRatio(): number;
177
+ paddingSizeRatio(_: number): this;
178
+ iconSizeRatio(): number;
179
+ iconSizeRatio(_: number): this;
180
+
181
+ iconAnchor(): "start" | "middle" | "end";
182
+ iconAnchor(_: "start" | "middle" | "end"): this;
183
+ labelAnchor(): "start" | "middle" | "end";
184
+ labelAnchor(_: "start" | "middle" | "end"): this;
185
+ valueAnchor(): "start" | "middle" | "end";
186
+ valueAnchor(_: "start" | "middle" | "end"): this;
187
+
188
+ iconBaseline(): "top" | "middle" | "bottom";
189
+ iconBaseline(_: "top" | "middle" | "bottom"): this;
190
+ }
191
+
192
+ SummaryC.prototype.publish("iconBaseline", "bottom", "string", "Text baseline for the icon", ["top", "middle", "bottom"]);
193
+ SummaryC.prototype.publish("iconAnchor", "end", "set", "Anchors the icon either at the start, middle, or end of the summary", ["start", "middle", "end"]);
194
+ SummaryC.prototype.publish("valueAnchor", "start", "set", "Anchors the value either at the start, middle, or end of the summary", ["start", "middle", "end"]);
195
+ SummaryC.prototype.publish("labelAnchor", "start", "set", "Anchors the label either at the start, middle, or end of the summary", ["start", "middle", "end"]);
196
+ SummaryC.prototype.publish("iconColumn", null, "set", "Select Icon Column", function () { return this.columns(); }, { optional: true });
197
+ SummaryC.prototype.publish("icon", "fa-briefcase", "string", "FA Char icon class", null, { disable: (w) => w.iconColumn() });
198
+
199
+ SummaryC.prototype.publish("fontFamily", "Arial", "string", "Font Family");
200
+
201
+ SummaryC.prototype.publish("labelColumn", null, "set", "Select display value", function () { return this.columns(); }, { optional: true });
202
+ SummaryC.prototype.publish("valueColumn", null, "set", "Select display value", function () { return this.columns(); }, { optional: true });
203
+
204
+ SummaryC.prototype.publish("colorFillColumn", null, "set", "Column for background color", function () { return this.columns(); }, { optional: true });
205
+ SummaryC.prototype.publish("colorFill", "#0097e6", "html-color", "Background Color", null, { disable: (w) => w.colorFillColumn() });
206
+ SummaryC.prototype.publish("colorStrokeColumn", null, "set", "Column for font color", function () { return this.columns(); }, { optional: true });
207
+ SummaryC.prototype.publish("colorStroke", "#2f3640", "html-color", "Font Color", null, { disable: (w) => w.colorStrokeColumn() });
208
+
209
+ SummaryC.prototype.publish("fixedSize", true, "boolean", "Fix Size to Min Width/Height");
210
+ SummaryC.prototype.publish("minWidth", 225, "number", "Minimum Width");
211
+ SummaryC.prototype.publish("minHeight", 150, "number", "Minimum Height");
212
+ SummaryC.prototype.publish("playInterval", null, "number", "Play Interval", null, { optional: true });
213
+
214
+ SummaryC.prototype.publish("fontSizeRatio", 0.618, "number", "Ratio between widget height and value font size");
215
+ SummaryC.prototype.publish("valueOpacity", 1, "number", "Opacity of value text (0..1)");
216
+ SummaryC.prototype.publish("labelOpacity", 0.9, "number", "Opacity of label text (0..1)");
217
+ SummaryC.prototype.publish("iconOpacity", 0.3, "number", "Opacity of icon text (0..1)");
218
+
219
+ SummaryC.prototype.publish("paddingSizeRatio", 0.1, "number", "Ratio of the smallest dimension for edge padding (0..1)");
220
+ SummaryC.prototype.publish("iconSizeRatio", 0.9, "number", "Ratio of the height for icon size (0..1)");
221
+
222
+ const playInterval = SummaryC.prototype.playInterval;
223
+ SummaryC.prototype.playInterval = function (_?: number): number | any {
224
+ const retVal = playInterval.apply(this, arguments);
225
+ if (arguments.length) {
226
+ if (this._playIntervalHandle) {
227
+ clearInterval(this._playIntervalHandle);
228
+ }
229
+ const context = this;
230
+ if (_) {
231
+ this._playIntervalHandle = setInterval(function () {
232
+ context._playIntervalIdx++;
233
+ if (context._renderCount && context.data().length) {
234
+ context.render();
235
+ }
236
+ }, _);
237
+ }
238
+ }
239
+ return retVal;
240
+ };
package/src/WordCloud.css CHANGED
@@ -1,3 +1,3 @@
1
- .other_Wordcloud text {
2
- cursor: pointer;
3
- }
1
+ .other_Wordcloud text {
2
+ cursor: pointer;
3
+ }