@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/WordCloud.ts CHANGED
@@ -1,263 +1,263 @@
1
- import { I2DChart, ITooltip } from "@hpcc-js/api";
2
- import { d3Event, InputField, SVGWidget, Utility, zoom as d3Zoom } from "@hpcc-js/common";
3
- import { extent as d3Extent } from "d3-array";
4
- import { scaleLinear as d3ScaleLinear, scaleLog as d3ScaleLog, scalePow as d3ScalePow, scaleSqrt as d3ScaleSqrt } from "d3-scale";
5
- import { d3Cloud } from "./D3Cloud";
6
-
7
- import "../src/WordCloud.css";
8
-
9
- export class WordCloud extends SVGWidget {
10
- static __inputs: InputField[] = [{
11
- id: "label",
12
- type: "string"
13
- }, {
14
- id: "value",
15
- type: "number"
16
- }];
17
-
18
- private _prevOffsetX;
19
- private _prevOffsetY;
20
- private _prevZoom;
21
- private _root;
22
- private _canvas;
23
- private _d3Cloud;
24
- private _d3Zoom;
25
-
26
- constructor() {
27
- super();
28
- I2DChart.call(this);
29
- ITooltip.call(this);
30
- Utility.SimpleSelectionMixin.call(this);
31
-
32
- this._prevOffsetX = this.offsetX();
33
- this._prevOffsetY = this.offsetY();
34
- this._prevZoom = this.zoom();
35
- }
36
-
37
- calcData() {
38
- return this.data().map(row => {
39
- return {
40
- __viz_label: row[0],
41
- __viz_weight: row[1],
42
- __viz_row: row
43
- };
44
- });
45
- }
46
-
47
- enter(domNode, element) {
48
- super.enter(domNode, element);
49
- this._selection.widgetElement(element);
50
-
51
- this._root = element.append("g");
52
- this._canvas = document.createElement("canvas");
53
-
54
- const context = this;
55
- this._d3Zoom = d3Zoom()
56
- .scaleExtent([0.1, 10])
57
- ;
58
- this._d3Zoom
59
- .on("zoom", function (evt) {
60
- const event = d3Event();
61
- if (event && event.transform) {
62
- context.zoomed(context._d3Zoom, [event.transform.x, event.transform.y], event.transform.k);
63
- }
64
- })
65
- ;
66
- element.call(this._d3Zoom);
67
-
68
- this
69
- .tooltipHTML(function (d) {
70
- const columns = context.columns();
71
- const series = columns && columns.length ? columns[0] : "Word";
72
- return context.tooltipFormat({ label: d.__viz_label, series, value: d.__viz_weight });
73
- })
74
- ;
75
- }
76
-
77
- update(domNode, element) {
78
- super.update(domNode, element);
79
-
80
- this._palette = this._palette.switch(this.paletteID());
81
- if (this.useClonedPalette()) {
82
- this._palette = this._palette.cloneNotExists(this.paletteID() + "_" + this.id());
83
- }
84
-
85
- this._d3Cloud = d3Cloud()
86
- .canvas(() => this._canvas)
87
- ;
88
-
89
- this.zoomed(this, [this.offsetX(), this.offsetY()], this.zoom());
90
-
91
- const data = this.calcData();
92
- const context = this;
93
- const extent = d3Extent(data, function (d: any) { return d.__viz_weight; });
94
- let scaler;
95
- switch (this.scaleMode()) {
96
- case "log":
97
- scaler = d3ScaleLog;
98
- break;
99
- case "sqrt":
100
- scaler = d3ScaleSqrt;
101
- break;
102
- case "pow":
103
- scaler = d3ScalePow;
104
- break;
105
- case "linear":
106
- default:
107
- scaler = d3ScaleLinear;
108
- break;
109
- }
110
- const scale = scaler().domain(extent).range([this.fontSizeFrom(), this.fontSizeTo()]);
111
- const angleDomain = d3ScaleLinear().domain([0, context.angleCount() - 1]).range([context.angleFrom(), context.angleTo()]);
112
-
113
- this._d3Cloud.stop()
114
- .size([this.width(), this.height()])
115
- .words(data)
116
- .font(this.fontFamily())
117
- .padding(this.padding())
118
- .spiral(this.spiral())
119
- .text(function (d) {
120
- return d.__viz_label.trim();
121
- })
122
- .fontSize(function (d) {
123
- return scale(d.__viz_weight);
124
- })
125
- .rotate((d, i) => angleDomain(i % context.angleCount()))
126
- .on("word", w => {
127
- })
128
- .on("end", draw)
129
- .start()
130
- ;
131
-
132
- function draw(data, bounds) {
133
- const text = context._root.selectAll("text")
134
- .data(data, function (d) { return d.__viz_label ? d.__viz_label.toLowerCase() : ""; })
135
- ;
136
- text.enter().append("text")
137
- .attr("text-anchor", "middle")
138
- .call(context._selection.enter.bind(context._selection))
139
- .text(function (d) { return d.__viz_label; })
140
- .on("click", function (d) {
141
- context.click(context.rowToObj(d.__viz_row), context.columns()[1], context._selection.selected(this));
142
- })
143
- .on("dblclick", function (d) {
144
- context.dblclick(context.rowToObj(d.__viz_row), context.columns()[1], context._selection.selected(this));
145
- })
146
- .on("mouseout.tooltip", context.tooltip.hide)
147
- .on("mousemove.tooltip", context.tooltip.show)
148
- .style("opacity", 1e-6)
149
- .merge(text)
150
- .style("font-size", function (d) { return scale(d.__viz_weight) + "px"; })
151
- .style("font-family", context.fontFamily())
152
- .transition().duration(1000)
153
- .attr("transform", function (d) { return "translate(" + [d.x, d.y] + ")rotate(" + d.rotate + ")"; })
154
- .style("fill", function (d) { return context._palette(d.__viz_label ? d.__viz_label.toLowerCase() : ""); })
155
- .style("opacity", 1)
156
- ;
157
- text.exit().transition().duration(1000)
158
- .style("opacity", 1e-4)
159
- .remove()
160
- ;
161
- }
162
- }
163
-
164
- zoomed(source, translate, scale) {
165
- if (translate[0] !== this._prevOffsetX || translate[1] !== this._prevOffsetY || scale !== this._prevZoom) {
166
- this._root.attr("transform", translate);
167
- switch (source) {
168
- case this:
169
- /*
170
- this._d3Zoom
171
- .scale(scale)
172
- .translate(translate)
173
- ;
174
- */
175
- break;
176
- case this._d3Zoom:
177
- this.offsetX(translate[0]);
178
- this.offsetY(translate[1]);
179
- this.zoom(scale);
180
- break;
181
- }
182
- this._prevOffsetX = translate[0];
183
- this._prevOffsetY = translate[1];
184
- this._prevZoom = scale;
185
- }
186
- }
187
-
188
- paletteID: { (): string; (_: string): WordCloud };
189
- paletteID_exists: () => boolean;
190
- useClonedPalette: { (): boolean; (_: boolean): WordCloud };
191
- useClonedPalette_exists: () => boolean;
192
- fontFamily: { (): string; (_: string): WordCloud };
193
- fontFamily_exists: () => boolean;
194
- fontSizeFrom: { (): number; (_: number): WordCloud };
195
- fontSizeFrom_exists: () => boolean;
196
- fontSizeTo: { (): number; (_: number): WordCloud };
197
- fontSizeTo_exists: () => boolean;
198
- angleFrom: { (): number; (_: number): WordCloud };
199
- angleFrom_exists: () => boolean;
200
- angleTo: { (): number; (_: number): WordCloud };
201
- angleTo_exists: () => boolean;
202
- angleCount: { (): number; (_: number): WordCloud };
203
- angleCount_exists: () => boolean;
204
- padding: { (): number; (_: number): WordCloud };
205
- padding_exists: () => boolean;
206
- scaleMode: { (): string; (_: string): WordCloud };
207
- scaleMode_exists: () => boolean;
208
- spiral: { (): string; (_: string): WordCloud };
209
- spiral_exists: () => boolean;
210
- offsetX: { (): number; (_: number): WordCloud };
211
- offsetX_exists: () => boolean;
212
- offsetY: { (): number; (_: number): WordCloud };
213
- offsetY_exists: () => boolean;
214
- zoom: { (): number; (_: number): WordCloud };
215
- zoom_exists: () => boolean;
216
-
217
- // I2DChart
218
- _palette;
219
- click: (row, column, selected) => void;
220
- dblclick: (row, column, selected) => void;
221
-
222
- // ITooltip ---
223
- tooltip;
224
- tooltipHTML: (_?) => any;
225
- tooltipFormat: (opts) => any;
226
- tooltipStyle: { (): string; (_: string): WordCloud };
227
- tooltipStyle_exists: () => boolean;
228
- tooltipValueFormat: { (): string; (_: string): WordCloud };
229
- tooltipValueFormat_exists: () => boolean;
230
- tooltipSeriesColor: { (): string; (_: string): WordCloud };
231
- tooltipSeriesColor_exists: () => boolean;
232
- tooltipLabelColor: { (): string; (_: string): WordCloud };
233
- tooltipLabelColor_exists: () => boolean;
234
- tooltipValueColor: { (): string; (_: string): WordCloud };
235
- tooltipValueColor_exists: () => boolean;
236
- tooltipTick: { (): boolean; (_: boolean): WordCloud };
237
- tooltipTick_exists: () => boolean;
238
- tooltipOffset: { (): number; (_: number): WordCloud };
239
- tooltipOffset_exists: () => boolean;
240
-
241
- // SimpleSelectionMixin
242
- _selection: Utility.SimpleSelection;
243
- }
244
- WordCloud.prototype._class += " chart_WordCloud";
245
- WordCloud.prototype.implements(I2DChart.prototype);
246
- WordCloud.prototype.implements(ITooltip.prototype);
247
- WordCloud.prototype.mixin(Utility.SimpleSelectionMixin);
248
-
249
- WordCloud.prototype.publish("paletteID", "default", "set", "Color palette for this widget", WordCloud.prototype._palette.switch(), { tags: ["Basic", "Shared"] });
250
- WordCloud.prototype.publish("useClonedPalette", false, "boolean", "Enable or disable using a cloned palette", null, { tags: ["Intermediate", "Shared"] });
251
-
252
- WordCloud.prototype.publish("fontFamily", "Impact", "string", "Font Name", null, { tags: ["Basic"] });
253
- WordCloud.prototype.publish("fontSizeFrom", 6, "number", "Minimum font size (pixels)", null, { tags: ["Basic"] });
254
- WordCloud.prototype.publish("fontSizeTo", 48, "number", "Maximum font size (pixels)", null, { tags: ["Basic"] });
255
- WordCloud.prototype.publish("angleFrom", -60, "number", "Minimum angle (degrees)", null, { tags: ["Basic"] });
256
- WordCloud.prototype.publish("angleTo", 60, "number", "Maximum angle (degrees)", null, { tags: ["Basic"] });
257
- WordCloud.prototype.publish("angleCount", 5, "number", "Number of different angles", null, { tags: ["Basic"] });
258
- WordCloud.prototype.publish("padding", 0, "number", "Padding between words (pixels)", null, { tags: ["Intermediate"] });
259
- WordCloud.prototype.publish("scaleMode", "linear", "set", "Text scaling mode", ["linear", "log", "sqrt", "pow"], { tags: ["Intermediate"] });
260
- WordCloud.prototype.publish("spiral", "archimedean", "set", "Text scaling mode", ["archimedean", "rectangular"], { tags: ["Intermediate"] });
261
- WordCloud.prototype.publish("offsetX", 0, "number", "X offset", null, { tags: ["Advanced"] });
262
- WordCloud.prototype.publish("offsetY", 0, "number", "Y offset", null, { tags: ["Advanced"] });
263
- WordCloud.prototype.publish("zoom", 1, "number", "Zoom", null, { tags: ["Advanced"] });
1
+ import { I2DChart, ITooltip } from "@hpcc-js/api";
2
+ import { d3Event, InputField, SVGWidget, Utility, zoom as d3Zoom } from "@hpcc-js/common";
3
+ import { extent as d3Extent } from "d3-array";
4
+ import { scaleLinear as d3ScaleLinear, scaleLog as d3ScaleLog, scalePow as d3ScalePow, scaleSqrt as d3ScaleSqrt } from "d3-scale";
5
+ import { d3Cloud } from "./D3Cloud";
6
+
7
+ import "../src/WordCloud.css";
8
+
9
+ export class WordCloud extends SVGWidget {
10
+ static __inputs: InputField[] = [{
11
+ id: "label",
12
+ type: "string"
13
+ }, {
14
+ id: "value",
15
+ type: "number"
16
+ }];
17
+
18
+ private _prevOffsetX;
19
+ private _prevOffsetY;
20
+ private _prevZoom;
21
+ private _root;
22
+ private _canvas;
23
+ private _d3Cloud;
24
+ private _d3Zoom;
25
+
26
+ constructor() {
27
+ super();
28
+ I2DChart.call(this);
29
+ ITooltip.call(this);
30
+ Utility.SimpleSelectionMixin.call(this);
31
+
32
+ this._prevOffsetX = this.offsetX();
33
+ this._prevOffsetY = this.offsetY();
34
+ this._prevZoom = this.zoom();
35
+ }
36
+
37
+ calcData() {
38
+ return this.data().map(row => {
39
+ return {
40
+ __viz_label: row[0],
41
+ __viz_weight: row[1],
42
+ __viz_row: row
43
+ };
44
+ });
45
+ }
46
+
47
+ enter(domNode, element) {
48
+ super.enter(domNode, element);
49
+ this._selection.widgetElement(element);
50
+
51
+ this._root = element.append("g");
52
+ this._canvas = document.createElement("canvas");
53
+
54
+ const context = this;
55
+ this._d3Zoom = d3Zoom()
56
+ .scaleExtent([0.1, 10])
57
+ ;
58
+ this._d3Zoom
59
+ .on("zoom", function (evt) {
60
+ const event = d3Event();
61
+ if (event && event.transform) {
62
+ context.zoomed(context._d3Zoom, [event.transform.x, event.transform.y], event.transform.k);
63
+ }
64
+ })
65
+ ;
66
+ element.call(this._d3Zoom);
67
+
68
+ this
69
+ .tooltipHTML(function (d) {
70
+ const columns = context.columns();
71
+ const series = columns && columns.length ? columns[0] : "Word";
72
+ return context.tooltipFormat({ label: d.__viz_label, series, value: d.__viz_weight });
73
+ })
74
+ ;
75
+ }
76
+
77
+ update(domNode, element) {
78
+ super.update(domNode, element);
79
+
80
+ this._palette = this._palette.switch(this.paletteID());
81
+ if (this.useClonedPalette()) {
82
+ this._palette = this._palette.cloneNotExists(this.paletteID() + "_" + this.id());
83
+ }
84
+
85
+ this._d3Cloud = d3Cloud()
86
+ .canvas(() => this._canvas)
87
+ ;
88
+
89
+ this.zoomed(this, [this.offsetX(), this.offsetY()], this.zoom());
90
+
91
+ const data = this.calcData();
92
+ const context = this;
93
+ const extent = d3Extent(data, function (d: any) { return d.__viz_weight; });
94
+ let scaler;
95
+ switch (this.scaleMode()) {
96
+ case "log":
97
+ scaler = d3ScaleLog;
98
+ break;
99
+ case "sqrt":
100
+ scaler = d3ScaleSqrt;
101
+ break;
102
+ case "pow":
103
+ scaler = d3ScalePow;
104
+ break;
105
+ case "linear":
106
+ default:
107
+ scaler = d3ScaleLinear;
108
+ break;
109
+ }
110
+ const scale = scaler().domain(extent).range([this.fontSizeFrom(), this.fontSizeTo()]);
111
+ const angleDomain = d3ScaleLinear().domain([0, context.angleCount() - 1]).range([context.angleFrom(), context.angleTo()]);
112
+
113
+ this._d3Cloud.stop()
114
+ .size([this.width(), this.height()])
115
+ .words(data)
116
+ .font(this.fontFamily())
117
+ .padding(this.padding())
118
+ .spiral(this.spiral())
119
+ .text(function (d) {
120
+ return d.__viz_label.trim();
121
+ })
122
+ .fontSize(function (d) {
123
+ return scale(d.__viz_weight);
124
+ })
125
+ .rotate((d, i) => angleDomain(i % context.angleCount()))
126
+ .on("word", w => {
127
+ })
128
+ .on("end", draw)
129
+ .start()
130
+ ;
131
+
132
+ function draw(data, bounds) {
133
+ const text = context._root.selectAll("text")
134
+ .data(data, function (d) { return d.__viz_label ? d.__viz_label.toLowerCase() : ""; })
135
+ ;
136
+ text.enter().append("text")
137
+ .attr("text-anchor", "middle")
138
+ .call(context._selection.enter.bind(context._selection))
139
+ .text(function (d) { return d.__viz_label; })
140
+ .on("click", function (d) {
141
+ context.click(context.rowToObj(d.__viz_row), context.columns()[1], context._selection.selected(this));
142
+ })
143
+ .on("dblclick", function (d) {
144
+ context.dblclick(context.rowToObj(d.__viz_row), context.columns()[1], context._selection.selected(this));
145
+ })
146
+ .on("mouseout.tooltip", context.tooltip.hide)
147
+ .on("mousemove.tooltip", context.tooltip.show)
148
+ .style("opacity", 1e-6)
149
+ .merge(text)
150
+ .style("font-size", function (d) { return scale(d.__viz_weight) + "px"; })
151
+ .style("font-family", context.fontFamily())
152
+ .transition().duration(1000)
153
+ .attr("transform", function (d) { return "translate(" + [d.x, d.y] + ")rotate(" + d.rotate + ")"; })
154
+ .style("fill", function (d) { return context._palette(d.__viz_label ? d.__viz_label.toLowerCase() : ""); })
155
+ .style("opacity", 1)
156
+ ;
157
+ text.exit().transition().duration(1000)
158
+ .style("opacity", 1e-4)
159
+ .remove()
160
+ ;
161
+ }
162
+ }
163
+
164
+ zoomed(source, translate, scale) {
165
+ if (translate[0] !== this._prevOffsetX || translate[1] !== this._prevOffsetY || scale !== this._prevZoom) {
166
+ this._root.attr("transform", translate);
167
+ switch (source) {
168
+ case this:
169
+ /*
170
+ this._d3Zoom
171
+ .scale(scale)
172
+ .translate(translate)
173
+ ;
174
+ */
175
+ break;
176
+ case this._d3Zoom:
177
+ this.offsetX(translate[0]);
178
+ this.offsetY(translate[1]);
179
+ this.zoom(scale);
180
+ break;
181
+ }
182
+ this._prevOffsetX = translate[0];
183
+ this._prevOffsetY = translate[1];
184
+ this._prevZoom = scale;
185
+ }
186
+ }
187
+
188
+ paletteID: { (): string; (_: string): WordCloud };
189
+ paletteID_exists: () => boolean;
190
+ useClonedPalette: { (): boolean; (_: boolean): WordCloud };
191
+ useClonedPalette_exists: () => boolean;
192
+ fontFamily: { (): string; (_: string): WordCloud };
193
+ fontFamily_exists: () => boolean;
194
+ fontSizeFrom: { (): number; (_: number): WordCloud };
195
+ fontSizeFrom_exists: () => boolean;
196
+ fontSizeTo: { (): number; (_: number): WordCloud };
197
+ fontSizeTo_exists: () => boolean;
198
+ angleFrom: { (): number; (_: number): WordCloud };
199
+ angleFrom_exists: () => boolean;
200
+ angleTo: { (): number; (_: number): WordCloud };
201
+ angleTo_exists: () => boolean;
202
+ angleCount: { (): number; (_: number): WordCloud };
203
+ angleCount_exists: () => boolean;
204
+ padding: { (): number; (_: number): WordCloud };
205
+ padding_exists: () => boolean;
206
+ scaleMode: { (): string; (_: string): WordCloud };
207
+ scaleMode_exists: () => boolean;
208
+ spiral: { (): string; (_: string): WordCloud };
209
+ spiral_exists: () => boolean;
210
+ offsetX: { (): number; (_: number): WordCloud };
211
+ offsetX_exists: () => boolean;
212
+ offsetY: { (): number; (_: number): WordCloud };
213
+ offsetY_exists: () => boolean;
214
+ zoom: { (): number; (_: number): WordCloud };
215
+ zoom_exists: () => boolean;
216
+
217
+ // I2DChart
218
+ _palette;
219
+ click: (row, column, selected) => void;
220
+ dblclick: (row, column, selected) => void;
221
+
222
+ // ITooltip ---
223
+ tooltip;
224
+ tooltipHTML: (_?) => any;
225
+ tooltipFormat: (opts) => any;
226
+ tooltipStyle: { (): string; (_: string): WordCloud };
227
+ tooltipStyle_exists: () => boolean;
228
+ tooltipValueFormat: { (): string; (_: string): WordCloud };
229
+ tooltipValueFormat_exists: () => boolean;
230
+ tooltipSeriesColor: { (): string; (_: string): WordCloud };
231
+ tooltipSeriesColor_exists: () => boolean;
232
+ tooltipLabelColor: { (): string; (_: string): WordCloud };
233
+ tooltipLabelColor_exists: () => boolean;
234
+ tooltipValueColor: { (): string; (_: string): WordCloud };
235
+ tooltipValueColor_exists: () => boolean;
236
+ tooltipTick: { (): boolean; (_: boolean): WordCloud };
237
+ tooltipTick_exists: () => boolean;
238
+ tooltipOffset: { (): number; (_: number): WordCloud };
239
+ tooltipOffset_exists: () => boolean;
240
+
241
+ // SimpleSelectionMixin
242
+ _selection: Utility.SimpleSelection;
243
+ }
244
+ WordCloud.prototype._class += " chart_WordCloud";
245
+ WordCloud.prototype.implements(I2DChart.prototype);
246
+ WordCloud.prototype.implements(ITooltip.prototype);
247
+ WordCloud.prototype.mixin(Utility.SimpleSelectionMixin);
248
+
249
+ WordCloud.prototype.publish("paletteID", "default", "set", "Color palette for this widget", WordCloud.prototype._palette.switch(), { tags: ["Basic", "Shared"] });
250
+ WordCloud.prototype.publish("useClonedPalette", false, "boolean", "Enable or disable using a cloned palette", null, { tags: ["Intermediate", "Shared"] });
251
+
252
+ WordCloud.prototype.publish("fontFamily", "Impact", "string", "Font Name", null, { tags: ["Basic"] });
253
+ WordCloud.prototype.publish("fontSizeFrom", 6, "number", "Minimum font size (pixels)", null, { tags: ["Basic"] });
254
+ WordCloud.prototype.publish("fontSizeTo", 48, "number", "Maximum font size (pixels)", null, { tags: ["Basic"] });
255
+ WordCloud.prototype.publish("angleFrom", -60, "number", "Minimum angle (degrees)", null, { tags: ["Basic"] });
256
+ WordCloud.prototype.publish("angleTo", 60, "number", "Maximum angle (degrees)", null, { tags: ["Basic"] });
257
+ WordCloud.prototype.publish("angleCount", 5, "number", "Number of different angles", null, { tags: ["Basic"] });
258
+ WordCloud.prototype.publish("padding", 0, "number", "Padding between words (pixels)", null, { tags: ["Intermediate"] });
259
+ WordCloud.prototype.publish("scaleMode", "linear", "set", "Text scaling mode", ["linear", "log", "sqrt", "pow"], { tags: ["Intermediate"] });
260
+ WordCloud.prototype.publish("spiral", "archimedean", "set", "Text scaling mode", ["archimedean", "rectangular"], { tags: ["Intermediate"] });
261
+ WordCloud.prototype.publish("offsetX", 0, "number", "X offset", null, { tags: ["Advanced"] });
262
+ WordCloud.prototype.publish("offsetY", 0, "number", "Y offset", null, { tags: ["Advanced"] });
263
+ WordCloud.prototype.publish("zoom", 1, "number", "Zoom", null, { tags: ["Advanced"] });
package/src/XYAxis.css CHANGED
@@ -1,41 +1,41 @@
1
- .chart_XYAxis .axis {
2
- fill: black;
3
- font: 10px sans-serif;
4
- }
5
-
6
- .chart_XYAxis .tick > text {
7
- font: 10px sans-serif;
8
- }
9
-
10
- .chart_XYAxis .focus .chart_Axis.value .tick {
11
- visibility:hidden;
12
- }
13
-
14
- .chart_XYAxis .axis path,
15
- .chart_XYAxis .axis line {
16
- fill: none;
17
- stroke: #000;
18
- shape-rendering: crispEdges;
19
- }
20
-
21
- .chart_XYAxis .region {
22
- opacity: 0.33;
23
- }
24
-
25
- .chart_XYAxis .brush rect.background {
26
- z-index: -999;
27
- }
28
-
29
- .chart_XYAxis .brush .selection {
30
- stroke: steelblue;
31
- stroke-opacity: 1;
32
- stroke-width: 1px;
33
- fill: steelblue;
34
- fill-opacity: .125;
35
- shape-rendering: crispEdges;
36
- }
37
-
38
- .chart_XYAxis .brush path.handle--custom {
39
- fill: #eee;
40
- stroke: #666;
41
- }
1
+ .chart_XYAxis .axis {
2
+ fill: black;
3
+ font: 10px sans-serif;
4
+ }
5
+
6
+ .chart_XYAxis .tick > text {
7
+ font: 10px sans-serif;
8
+ }
9
+
10
+ .chart_XYAxis .focus .chart_Axis.value .tick {
11
+ visibility:hidden;
12
+ }
13
+
14
+ .chart_XYAxis .axis path,
15
+ .chart_XYAxis .axis line {
16
+ fill: none;
17
+ stroke: #000;
18
+ shape-rendering: crispEdges;
19
+ }
20
+
21
+ .chart_XYAxis .region {
22
+ opacity: 0.33;
23
+ }
24
+
25
+ .chart_XYAxis .brush rect.background {
26
+ z-index: -999;
27
+ }
28
+
29
+ .chart_XYAxis .brush .selection {
30
+ stroke: steelblue;
31
+ stroke-opacity: 1;
32
+ stroke-width: 1px;
33
+ fill: steelblue;
34
+ fill-opacity: .125;
35
+ shape-rendering: crispEdges;
36
+ }
37
+
38
+ .chart_XYAxis .brush path.handle--custom {
39
+ fill: #eee;
40
+ stroke: #666;
41
+ }