@carbon/charts 1.7.6 → 1.8.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 (96) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/build/demo/data/CHART_TYPES.d.ts +5 -0
  3. package/build/demo/data/choropleth.d.ts +738 -0
  4. package/build/demo/data/index.d.ts +1 -0
  5. package/build/demo/data/topojson-110.d.ts +360 -0
  6. package/build/src/charts/choropleth.d.ts +10 -0
  7. package/build/src/charts/index.d.ts +1 -0
  8. package/build/src/components/essentials/color-scale-legend.d.ts +3 -0
  9. package/build/src/components/essentials/geo-projection.d.ts +16 -0
  10. package/build/src/components/graphs/choropleth.d.ts +6 -0
  11. package/build/src/components/index.d.ts +2 -0
  12. package/build/src/configuration.d.ts +3 -1
  13. package/build/src/interfaces/charts.d.ts +28 -1
  14. package/build/src/interfaces/enums.d.ts +12 -0
  15. package/build/src/interfaces/events.d.ts +9 -0
  16. package/build/src/model/choropleth.d.ts +29 -0
  17. package/build/src/model/heatmap.d.ts +0 -5
  18. package/build/src/services/color-scale-utils.d.ts +10 -0
  19. package/build/src/services/index.d.ts +1 -0
  20. package/build/src/services/scales-cartesian.d.ts +1 -1
  21. package/bundle.js +2 -2
  22. package/charts/choropleth.d.ts +10 -0
  23. package/charts/choropleth.js +141 -0
  24. package/charts/choropleth.js.map +1 -0
  25. package/charts/heatmap.js +5 -1
  26. package/charts/heatmap.js.map +1 -1
  27. package/charts/index.d.ts +1 -0
  28. package/charts/index.js +1 -0
  29. package/charts/index.js.map +1 -1
  30. package/components/essentials/color-scale-legend.d.ts +3 -0
  31. package/components/essentials/color-scale-legend.js +18 -11
  32. package/components/essentials/color-scale-legend.js.map +1 -1
  33. package/components/essentials/geo-projection.d.ts +16 -0
  34. package/components/essentials/geo-projection.js +160 -0
  35. package/components/essentials/geo-projection.js.map +1 -0
  36. package/components/graphs/choropleth.d.ts +6 -0
  37. package/components/graphs/choropleth.js +106 -0
  38. package/components/graphs/choropleth.js.map +1 -0
  39. package/components/index.d.ts +2 -0
  40. package/components/index.js +2 -0
  41. package/components/index.js.map +1 -1
  42. package/configuration.d.ts +3 -1
  43. package/configuration.js +18 -1
  44. package/configuration.js.map +1 -1
  45. package/demo/create-codesandbox.js +20 -2
  46. package/demo/create-codesandbox.js.map +1 -1
  47. package/demo/data/CHART_TYPES.d.ts +5 -0
  48. package/demo/data/CHART_TYPES.js +5 -0
  49. package/demo/data/CHART_TYPES.js.map +1 -1
  50. package/demo/data/bundle.js +1 -1
  51. package/demo/data/choropleth.d.ts +738 -0
  52. package/demo/data/choropleth.js +1684 -0
  53. package/demo/data/choropleth.js.map +1 -0
  54. package/demo/data/index.d.ts +1 -0
  55. package/demo/data/index.js +45 -5
  56. package/demo/data/index.js.map +1 -1
  57. package/demo/data/topojson-110.d.ts +360 -0
  58. package/demo/data/topojson-110.js +40724 -0
  59. package/demo/data/topojson-110.js.map +1 -0
  60. package/demo/styles.css +410 -185
  61. package/demo/styles.css.map +1 -1
  62. package/demo/styles.min.css +1 -1
  63. package/demo/styles.min.css.map +1 -1
  64. package/demo/tsconfig.tsbuildinfo +25 -6
  65. package/demo/utils.js +29 -1
  66. package/demo/utils.js.map +1 -1
  67. package/interfaces/charts.d.ts +28 -1
  68. package/interfaces/charts.js.map +1 -1
  69. package/interfaces/enums.d.ts +12 -0
  70. package/interfaces/enums.js +16 -0
  71. package/interfaces/enums.js.map +1 -1
  72. package/interfaces/events.d.ts +9 -0
  73. package/interfaces/events.js +10 -0
  74. package/interfaces/events.js.map +1 -1
  75. package/model/choropleth.d.ts +29 -0
  76. package/model/choropleth.js +105 -0
  77. package/model/choropleth.js.map +1 -0
  78. package/model/heatmap.d.ts +0 -5
  79. package/model/heatmap.js +3 -64
  80. package/model/heatmap.js.map +1 -1
  81. package/package.json +4 -3
  82. package/services/color-scale-utils.d.ts +2 -0
  83. package/services/color-scale-utils.js +64 -0
  84. package/services/color-scale-utils.js.map +1 -0
  85. package/services/index.d.ts +1 -0
  86. package/services/index.js +1 -0
  87. package/services/index.js.map +1 -1
  88. package/styles/color-palatte.scss +96 -0
  89. package/styles/colors.scss +23 -8
  90. package/styles/graphs/_choropleth.scss +18 -0
  91. package/styles/graphs/index.scss +1 -0
  92. package/styles.css +156 -144
  93. package/styles.css.map +1 -1
  94. package/styles.min.css +1 -1
  95. package/styles.min.css.map +1 -1
  96. package/tsconfig.tsbuildinfo +415 -43
@@ -23,6 +23,7 @@ export * from './zoom-bar';
23
23
  export * from './high-scale';
24
24
  export * from './alluvial';
25
25
  export * from './heatmap';
26
+ export * from './choropleth';
26
27
  export * from './CHART_TYPES';
27
28
  export declare enum DemoGroupTypes {
28
29
  UTILITY = "utility",
@@ -0,0 +1,360 @@
1
+ export declare const worldTopoJson: {
2
+ type: string;
3
+ arcs: number[][][];
4
+ transform: {
5
+ scale: number[];
6
+ translate: number[];
7
+ };
8
+ objects: {
9
+ countries: {
10
+ type: string;
11
+ geometries: ({
12
+ arcs: number[][][];
13
+ type: string;
14
+ properties: {
15
+ featurecla: string;
16
+ scalerank: number;
17
+ LABELRANK: number;
18
+ SOVEREIGNT: string;
19
+ SOV_A3: string;
20
+ ADM0_DIF: number;
21
+ LEVEL: number;
22
+ TYPE: string;
23
+ TLC: string;
24
+ ADMIN: string;
25
+ ADM0_A3: string;
26
+ GEOU_DIF: number;
27
+ GEOUNIT: string;
28
+ GU_A3: string;
29
+ SU_DIF: number;
30
+ SUBUNIT: string;
31
+ SU_A3: string;
32
+ BRK_DIFF: number;
33
+ NAME: string;
34
+ NAME_LONG: string;
35
+ BRK_A3: string;
36
+ BRK_NAME: string;
37
+ BRK_GROUP: string;
38
+ ABBREV: string;
39
+ POSTAL: string;
40
+ FORMAL_EN: string;
41
+ FORMAL_FR: string;
42
+ NAME_CIAWF: string;
43
+ NOTE_ADM0: string;
44
+ NOTE_BRK: string;
45
+ NAME_SORT: string;
46
+ NAME_ALT: string;
47
+ MAPCOLOR7: number;
48
+ MAPCOLOR8: number;
49
+ MAPCOLOR9: number;
50
+ MAPCOLOR13: number;
51
+ POP_EST: number;
52
+ POP_RANK: number;
53
+ POP_YEAR: number;
54
+ GDP_MD: number;
55
+ GDP_YEAR: number;
56
+ ECONOMY: string;
57
+ INCOME_GRP: string;
58
+ FIPS_10: string;
59
+ ISO_A2: string;
60
+ ISO_A2_EH: string;
61
+ ISO_A3: string;
62
+ ISO_A3_EH: string;
63
+ ISO_N3: string;
64
+ ISO_N3_EH: string;
65
+ UN_A3: string;
66
+ WB_A2: string;
67
+ WB_A3: string;
68
+ WOE_ID: number;
69
+ WOE_ID_EH: number;
70
+ WOE_NOTE: string;
71
+ ADM0_ISO: string;
72
+ ADM0_DIFF: string;
73
+ ADM0_TLC: string;
74
+ ADM0_A3_US: string;
75
+ ADM0_A3_FR: string;
76
+ ADM0_A3_RU: string;
77
+ ADM0_A3_ES: string;
78
+ ADM0_A3_CN: string;
79
+ ADM0_A3_TW: string;
80
+ ADM0_A3_IN: string;
81
+ ADM0_A3_NP: string;
82
+ ADM0_A3_PK: string;
83
+ ADM0_A3_DE: string;
84
+ ADM0_A3_GB: string;
85
+ ADM0_A3_BR: string;
86
+ ADM0_A3_IL: string;
87
+ ADM0_A3_PS: string;
88
+ ADM0_A3_SA: string;
89
+ ADM0_A3_EG: string;
90
+ ADM0_A3_MA: string;
91
+ ADM0_A3_PT: string;
92
+ ADM0_A3_AR: string;
93
+ ADM0_A3_JP: string;
94
+ ADM0_A3_KO: string;
95
+ ADM0_A3_VN: string;
96
+ ADM0_A3_TR: string;
97
+ ADM0_A3_ID: string;
98
+ ADM0_A3_PL: string;
99
+ ADM0_A3_GR: string;
100
+ ADM0_A3_IT: string;
101
+ ADM0_A3_NL: string;
102
+ ADM0_A3_SE: string;
103
+ ADM0_A3_BD: string;
104
+ ADM0_A3_UA: string;
105
+ ADM0_A3_UN: number;
106
+ ADM0_A3_WB: number;
107
+ CONTINENT: string;
108
+ REGION_UN: string;
109
+ SUBREGION: string;
110
+ REGION_WB: string;
111
+ NAME_LEN: number;
112
+ LONG_LEN: number;
113
+ ABBREV_LEN: number;
114
+ TINY: number;
115
+ HOMEPART: number;
116
+ MIN_ZOOM: number;
117
+ MIN_LABEL: number;
118
+ MAX_LABEL: number;
119
+ LABEL_X: number;
120
+ LABEL_Y: number;
121
+ NE_ID: number;
122
+ WIKIDATAID: string;
123
+ NAME_AR: string;
124
+ NAME_BN: string;
125
+ NAME_DE: string;
126
+ NAME_EN: string;
127
+ NAME_ES: string;
128
+ NAME_FA: string;
129
+ NAME_FR: string;
130
+ NAME_EL: string;
131
+ NAME_HE: string;
132
+ NAME_HI: string;
133
+ NAME_HU: string;
134
+ NAME_ID: string;
135
+ NAME_IT: string;
136
+ NAME_JA: string;
137
+ NAME_KO: string;
138
+ NAME_NL: string;
139
+ NAME_PL: string;
140
+ NAME_PT: string;
141
+ NAME_RU: string;
142
+ NAME_SV: string;
143
+ NAME_TR: string;
144
+ NAME_UK: string;
145
+ NAME_UR: string;
146
+ NAME_VI: string;
147
+ NAME_ZH: string;
148
+ NAME_ZHT: string;
149
+ FCLASS_ISO: string;
150
+ TLC_DIFF: string;
151
+ FCLASS_TLC: string;
152
+ FCLASS_US: string;
153
+ FCLASS_FR: string;
154
+ FCLASS_RU: string;
155
+ FCLASS_ES: string;
156
+ FCLASS_CN: string;
157
+ FCLASS_TW: string;
158
+ FCLASS_IN: string;
159
+ FCLASS_NP: string;
160
+ FCLASS_PK: string;
161
+ FCLASS_DE: string;
162
+ FCLASS_GB: string;
163
+ FCLASS_BR: string;
164
+ FCLASS_IL: string;
165
+ FCLASS_PS: string;
166
+ FCLASS_SA: string;
167
+ FCLASS_EG: string;
168
+ FCLASS_MA: string;
169
+ FCLASS_PT: string;
170
+ FCLASS_AR: string;
171
+ FCLASS_JP: string;
172
+ FCLASS_KO: string;
173
+ FCLASS_VN: string;
174
+ FCLASS_TR: string;
175
+ FCLASS_ID: string;
176
+ FCLASS_PL: string;
177
+ FCLASS_GR: string;
178
+ FCLASS_IT: string;
179
+ FCLASS_NL: string;
180
+ FCLASS_SE: string;
181
+ FCLASS_BD: string;
182
+ FCLASS_UA: string;
183
+ };
184
+ } | {
185
+ arcs: number[][];
186
+ type: string;
187
+ properties: {
188
+ featurecla: string;
189
+ scalerank: number;
190
+ LABELRANK: number;
191
+ SOVEREIGNT: string;
192
+ SOV_A3: string;
193
+ ADM0_DIF: number;
194
+ LEVEL: number;
195
+ TYPE: string;
196
+ TLC: string;
197
+ ADMIN: string;
198
+ ADM0_A3: string;
199
+ GEOU_DIF: number;
200
+ GEOUNIT: string;
201
+ GU_A3: string;
202
+ SU_DIF: number;
203
+ SUBUNIT: string;
204
+ SU_A3: string;
205
+ BRK_DIFF: number;
206
+ NAME: string;
207
+ NAME_LONG: string;
208
+ BRK_A3: string;
209
+ BRK_NAME: string;
210
+ BRK_GROUP: string;
211
+ ABBREV: string;
212
+ POSTAL: string;
213
+ FORMAL_EN: string;
214
+ FORMAL_FR: string;
215
+ NAME_CIAWF: string;
216
+ NOTE_ADM0: string;
217
+ NOTE_BRK: string;
218
+ NAME_SORT: string;
219
+ NAME_ALT: string;
220
+ MAPCOLOR7: number;
221
+ MAPCOLOR8: number;
222
+ MAPCOLOR9: number;
223
+ MAPCOLOR13: number;
224
+ POP_EST: number;
225
+ POP_RANK: number;
226
+ POP_YEAR: number;
227
+ GDP_MD: number;
228
+ GDP_YEAR: number;
229
+ ECONOMY: string;
230
+ INCOME_GRP: string;
231
+ FIPS_10: string;
232
+ ISO_A2: string;
233
+ ISO_A2_EH: string;
234
+ ISO_A3: string;
235
+ ISO_A3_EH: string;
236
+ ISO_N3: string;
237
+ ISO_N3_EH: string;
238
+ UN_A3: string;
239
+ WB_A2: string;
240
+ WB_A3: string;
241
+ WOE_ID: number;
242
+ WOE_ID_EH: number;
243
+ WOE_NOTE: string;
244
+ ADM0_ISO: string;
245
+ ADM0_DIFF: string;
246
+ ADM0_TLC: string;
247
+ ADM0_A3_US: string;
248
+ ADM0_A3_FR: string;
249
+ ADM0_A3_RU: string;
250
+ ADM0_A3_ES: string;
251
+ ADM0_A3_CN: string;
252
+ ADM0_A3_TW: string;
253
+ ADM0_A3_IN: string;
254
+ ADM0_A3_NP: string;
255
+ ADM0_A3_PK: string;
256
+ ADM0_A3_DE: string;
257
+ ADM0_A3_GB: string;
258
+ ADM0_A3_BR: string;
259
+ ADM0_A3_IL: string;
260
+ ADM0_A3_PS: string;
261
+ ADM0_A3_SA: string;
262
+ ADM0_A3_EG: string;
263
+ ADM0_A3_MA: string;
264
+ ADM0_A3_PT: string;
265
+ ADM0_A3_AR: string;
266
+ ADM0_A3_JP: string;
267
+ ADM0_A3_KO: string;
268
+ ADM0_A3_VN: string;
269
+ ADM0_A3_TR: string;
270
+ ADM0_A3_ID: string;
271
+ ADM0_A3_PL: string;
272
+ ADM0_A3_GR: string;
273
+ ADM0_A3_IT: string;
274
+ ADM0_A3_NL: string;
275
+ ADM0_A3_SE: string;
276
+ ADM0_A3_BD: string;
277
+ ADM0_A3_UA: string;
278
+ ADM0_A3_UN: number;
279
+ ADM0_A3_WB: number;
280
+ CONTINENT: string;
281
+ REGION_UN: string;
282
+ SUBREGION: string;
283
+ REGION_WB: string;
284
+ NAME_LEN: number;
285
+ LONG_LEN: number;
286
+ ABBREV_LEN: number;
287
+ TINY: number;
288
+ HOMEPART: number;
289
+ MIN_ZOOM: number;
290
+ MIN_LABEL: number;
291
+ MAX_LABEL: number;
292
+ LABEL_X: number;
293
+ LABEL_Y: number;
294
+ NE_ID: number;
295
+ WIKIDATAID: string;
296
+ NAME_AR: string;
297
+ NAME_BN: string;
298
+ NAME_DE: string;
299
+ NAME_EN: string;
300
+ NAME_ES: string;
301
+ NAME_FA: string;
302
+ NAME_FR: string;
303
+ NAME_EL: string;
304
+ NAME_HE: string;
305
+ NAME_HI: string;
306
+ NAME_HU: string;
307
+ NAME_ID: string;
308
+ NAME_IT: string;
309
+ NAME_JA: string;
310
+ NAME_KO: string;
311
+ NAME_NL: string;
312
+ NAME_PL: string;
313
+ NAME_PT: string;
314
+ NAME_RU: string;
315
+ NAME_SV: string;
316
+ NAME_TR: string;
317
+ NAME_UK: string;
318
+ NAME_UR: string;
319
+ NAME_VI: string;
320
+ NAME_ZH: string;
321
+ NAME_ZHT: string;
322
+ FCLASS_ISO: string;
323
+ TLC_DIFF: string;
324
+ FCLASS_TLC: string;
325
+ FCLASS_US: string;
326
+ FCLASS_FR: string;
327
+ FCLASS_RU: string;
328
+ FCLASS_ES: string;
329
+ FCLASS_CN: string;
330
+ FCLASS_TW: string;
331
+ FCLASS_IN: string;
332
+ FCLASS_NP: string;
333
+ FCLASS_PK: string;
334
+ FCLASS_DE: string;
335
+ FCLASS_GB: string;
336
+ FCLASS_BR: string;
337
+ FCLASS_IL: string;
338
+ FCLASS_PS: string;
339
+ FCLASS_SA: string;
340
+ FCLASS_EG: string;
341
+ FCLASS_MA: string;
342
+ FCLASS_PT: string;
343
+ FCLASS_AR: string;
344
+ FCLASS_JP: string;
345
+ FCLASS_KO: string;
346
+ FCLASS_VN: string;
347
+ FCLASS_TR: string;
348
+ FCLASS_ID: string;
349
+ FCLASS_PL: string;
350
+ FCLASS_GR: string;
351
+ FCLASS_IT: string;
352
+ FCLASS_NL: string;
353
+ FCLASS_SE: string;
354
+ FCLASS_BD: string;
355
+ FCLASS_UA: string;
356
+ };
357
+ })[];
358
+ };
359
+ };
360
+ };
@@ -0,0 +1,10 @@
1
+ import { Chart } from '../chart';
2
+ import { ChoroplethModel } from '../model/choropleth';
3
+ import { ChoroplethChartOptions, ChartConfig } from '../interfaces/index';
4
+ import { Modal, LayoutComponent, Tooltip } from '../components';
5
+ export declare class EXPERIMENTAL_ChoroplethChart extends Chart {
6
+ model: ChoroplethModel;
7
+ constructor(holder: Element, chartConfigs: ChartConfig<ChoroplethChartOptions>);
8
+ protected getChartComponents(graphFrameComponents: any[], configs?: any): (Tooltip | Modal | LayoutComponent)[];
9
+ getComponents(): any[];
10
+ }
@@ -22,3 +22,4 @@ export * from './circle-pack';
22
22
  export * from './wordcloud';
23
23
  export * from './alluvial';
24
24
  export * from './heatmap';
25
+ export * from './choropleth';
@@ -1,9 +1,12 @@
1
1
  import { RenderTypes } from '../../interfaces';
2
2
  import { Legend } from './legend';
3
+ import { ChartModel } from '../../model/model';
3
4
  export declare class ColorScaleLegend extends Legend {
4
5
  type: string;
5
6
  renderType: RenderTypes;
6
7
  private gradient_id;
8
+ private chartType;
9
+ constructor(model: ChartModel, services: any, configs?: any);
7
10
  init(): void;
8
11
  handleAxisCompleteEvent: (event: CustomEvent<any>) => void;
9
12
  render(animate?: boolean): void;
@@ -0,0 +1,16 @@
1
+ import { Component } from '../component';
2
+ import { RenderTypes } from '../../interfaces';
3
+ export declare class GeoProjection extends Component {
4
+ type: string;
5
+ renderType: RenderTypes;
6
+ render(): void;
7
+ /**
8
+ * @info
9
+ * Depending on projection, we may need to provide additional configuration
10
+ * e.g. sizing
11
+ *
12
+ * In such case, function can be refactored so that
13
+ * projection should return an object with the configuraiton & function
14
+ */
15
+ getProjection(): any;
16
+ }
@@ -0,0 +1,6 @@
1
+ import { GeoProjection } from '../essentials/geo-projection';
2
+ export declare class Choropleth extends GeoProjection {
3
+ type: string;
4
+ render(animate?: boolean): void;
5
+ addCountryAreaEventListener(): void;
6
+ }
@@ -9,6 +9,7 @@ export * from './essentials/tooltip';
9
9
  export * from './essentials/tooltip-axis';
10
10
  export * from './essentials/canvas-chart-clip';
11
11
  export * from './essentials/highlights';
12
+ export * from './essentials/geo-projection';
12
13
  export * from './graphs/area';
13
14
  export * from './graphs/area-stacked';
14
15
  export * from './graphs/bar-simple';
@@ -34,6 +35,7 @@ export * from './graphs/circle-pack';
34
35
  export * from './graphs/wordcloud';
35
36
  export * from './graphs/alluvial';
36
37
  export * from './graphs/heatmap';
38
+ export * from './graphs/choropleth';
37
39
  export * from './layout/spacer';
38
40
  export * from './layout/layout';
39
41
  export * from './axes/two-dimensional-axes';
@@ -1,4 +1,4 @@
1
- import { BaseChartOptions, AxisChartOptions, ScatterChartOptions, LollipopChartOptions, LineChartOptions, BarChartOptions, StackedBarChartOptions, BoxplotChartOptions, AreaChartOptions, PieChartOptions, GaugeChartOptions, DonutChartOptions, BubbleChartOptions, BulletChartOptions, HistogramChartOptions, RadarChartOptions, ComboChartOptions, TreeChartOptions, TreemapChartOptions, CirclePackChartOptions, WorldCloudChartOptions, AlluvialChartOptions, GridOptions, RulerOptions, TimeScaleOptions, TooltipOptions, MeterChartOptions, ProportionalMeterChartOptions, HeatmapChartOptions } from './interfaces';
1
+ import { BaseChartOptions, AxisChartOptions, ScatterChartOptions, LollipopChartOptions, LineChartOptions, BarChartOptions, StackedBarChartOptions, BoxplotChartOptions, AreaChartOptions, PieChartOptions, GaugeChartOptions, DonutChartOptions, BubbleChartOptions, BulletChartOptions, HistogramChartOptions, RadarChartOptions, ComboChartOptions, TreeChartOptions, TreemapChartOptions, CirclePackChartOptions, WorldCloudChartOptions, AlluvialChartOptions, ThematicChartOptions, ChoroplethChartOptions, GridOptions, RulerOptions, TimeScaleOptions, TooltipOptions, MeterChartOptions, ProportionalMeterChartOptions, HeatmapChartOptions } from './interfaces';
2
2
  /**
3
3
  * Grid options
4
4
  */
@@ -15,6 +15,7 @@ export declare const timeScale: TimeScaleOptions;
15
15
  export declare const options: {
16
16
  chart: BaseChartOptions;
17
17
  axisChart: AxisChartOptions;
18
+ thematicChart: ThematicChartOptions;
18
19
  simpleBarChart: BarChartOptions;
19
20
  groupedBarChart: BarChartOptions;
20
21
  stackedBarChart: StackedBarChartOptions;
@@ -40,5 +41,6 @@ export declare const options: {
40
41
  wordCloudChart: WorldCloudChartOptions;
41
42
  alluvialChart: AlluvialChartOptions;
42
43
  heatmapChart: HeatmapChartOptions;
44
+ choroplethChart: ChoroplethChartOptions;
43
45
  };
44
46
  export * from './configuration-non-customizable';
@@ -1,4 +1,4 @@
1
- import { GaugeTypes, Statuses, ArrowDirections, Alignments, ChartTypes, TreeTypes, DividerStatus, ColorLegendType, ChartTheme } from './enums';
1
+ import { GaugeTypes, Statuses, ArrowDirections, Alignments, ChartTypes, TreeTypes, DividerStatus, ColorLegendType, ChartTheme, Projection } from './enums';
2
2
  import { LegendOptions, TooltipOptions, GridOptions, AxesOptions, ZoomBarsOptions } from './index';
3
3
  import { BarOptions, StackedBarOptions, ToolbarOptions } from './components';
4
4
  import { AxisOptions, BinnedAxisOptions, ComboChartAxisOptions, TimeScaleOptions } from './axis-scales';
@@ -483,3 +483,30 @@ export interface HeatmapChartOptions extends BaseChartOptions {
483
483
  };
484
484
  };
485
485
  }
486
+ /**
487
+ * Options common to any thematic chart
488
+ */
489
+ export interface ThematicChartOptions extends BaseChartOptions {
490
+ thematic: {
491
+ projection: Projection;
492
+ };
493
+ }
494
+ /**
495
+ * Options common to any thematic chart
496
+ */
497
+ export interface ChoroplethChartOptions extends ThematicChartOptions {
498
+ choropleth: {
499
+ /**
500
+ * customize color legend
501
+ * enabled by default on select charts
502
+ */
503
+ colorLegend?: {
504
+ /**
505
+ * Text to display beside or on top of the legend
506
+ * Position is determined by text length
507
+ */
508
+ title?: string;
509
+ type: ColorLegendType;
510
+ };
511
+ };
512
+ }
@@ -247,3 +247,15 @@ export declare enum AxisFlavor {
247
247
  DEFAULT = "default",
248
248
  HOVERABLE = "hoverable"
249
249
  }
250
+ /**
251
+ * enum of supported projection types
252
+ */
253
+ export declare enum Projection {
254
+ geoEqualEarth = "geoEqualEarth",
255
+ geoAlbers = "geoAlbers",
256
+ geoConicEqualArea = "geoConicEqualArea",
257
+ geoConicEquidistant = "geoConicEquidistant",
258
+ geoEquirectangular = "geoEquirectangular",
259
+ geoMercator = "geoMercator",
260
+ geoNaturalEarth1 = "geoNaturalEarth1"
261
+ }
@@ -228,3 +228,12 @@ export declare enum Heatmap {
228
228
  HEATMAP_MOUSEOUT = "heatmap-mouseout",
229
229
  HEATMAP_MOUSEMOVE = "hetmap-mousemove"
230
230
  }
231
+ /**
232
+ * enum of all choropleth related events
233
+ */
234
+ export declare enum Choropleth {
235
+ CHOROPLETH_MOUSEOVER = "choropleth-mouseover",
236
+ CHOROPLETH_CLICK = "choropleth-click",
237
+ CHOROPLETH_MOUSEOUT = "choropleth-mouseout",
238
+ CHOROPLETH_MOUSEMOVE = "choropleth-mousemove"
239
+ }
@@ -0,0 +1,29 @@
1
+ import { ChartModel } from './model';
2
+ /**
3
+ * Base thematic maps chart model layer
4
+ */
5
+ export declare class ChoroplethModel extends ChartModel {
6
+ private _colorScale;
7
+ private _matrix;
8
+ constructor(services: any);
9
+ /**
10
+ * @override
11
+ * @param value
12
+ * @returns string
13
+ */
14
+ getFillColor(value: number): any;
15
+ /**
16
+ * Helper function that will generate a dictionary
17
+ */
18
+ getCombinedData(): {};
19
+ /**
20
+ * Generate tabular data from display data
21
+ * @returns Array<Object>
22
+ */
23
+ getTabularDataArray(): any[];
24
+ getColorClassName(configs: {
25
+ value?: number;
26
+ originalClassName?: string;
27
+ }): string;
28
+ protected setColorClassNames(): void;
29
+ }
@@ -8,11 +8,6 @@ export declare class HeatmapModel extends ChartModelCartesian {
8
8
  private _ranges;
9
9
  private _matrix;
10
10
  constructor(services: any);
11
- /**
12
- * Get min and maximum value of the display data
13
- * @returns Array consisting of smallest and largest values in data
14
- */
15
- getValueDomain(): number[];
16
11
  /**
17
12
  * @override
18
13
  * @param value
@@ -0,0 +1,10 @@
1
+ export declare function getDomain(data: any): number[];
2
+ export declare namespace getDomain {
3
+ var displayName: string;
4
+ var __docgenInfo: {
5
+ "description": string;
6
+ "displayName": string;
7
+ "props": {};
8
+ };
9
+ }
10
+ export declare function getColorScale(displayData: any, colorOptions: any): import("d3-scale").ScaleQuantize<number, never>;
@@ -7,3 +7,4 @@ export * from './scales-cartesian';
7
7
  export * from './curves';
8
8
  export * from './zoom';
9
9
  export * from './canvas-zoom';
10
+ export * from './color-scale-utils';
@@ -58,7 +58,7 @@ export declare class CartesianScales extends Service {
58
58
  getMainYScaleType(): any;
59
59
  getDomainIdentifier(datum?: any): any;
60
60
  getRangeIdentifier(datum?: any): any;
61
- extendsDomain(axisPosition: AxisPositions, domain: any): Date[] | number[];
61
+ extendsDomain(axisPosition: AxisPositions, domain: any): number[] | Date[];
62
62
  protected findVerticalAxesPositions(): {
63
63
  primary: AxisPositions;
64
64
  secondary: AxisPositions;