billboard.js 3.3.0-next.1 → 3.3.2

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/dist/billboard.css +1 -1
  2. package/dist/billboard.js +644 -427
  3. package/dist/billboard.min.css +1 -1
  4. package/dist/billboard.min.js +2 -2
  5. package/dist/billboard.pkgd.js +2809 -2331
  6. package/dist/billboard.pkgd.min.js +3 -3
  7. package/dist/plugin/billboardjs-plugin-bubblecompare.d.ts +7 -0
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  9. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  10. package/dist/plugin/billboardjs-plugin-sparkline.d.ts +7 -0
  11. package/dist/plugin/billboardjs-plugin-sparkline.js +156 -103
  12. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  13. package/dist/plugin/billboardjs-plugin-stanford.d.ts +7 -0
  14. package/dist/plugin/billboardjs-plugin-stanford.js +154 -101
  15. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  16. package/dist/plugin/billboardjs-plugin-tableview.d.ts +7 -0
  17. package/dist/plugin/billboardjs-plugin-tableview.js +20 -128
  18. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  19. package/dist/plugin/billboardjs-plugin-textoverlap.d.ts +7 -0
  20. package/dist/plugin/billboardjs-plugin-textoverlap.js +20 -128
  21. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  22. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +2166 -1905
  23. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +2325 -2011
  24. package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +2320 -2006
  25. package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +2186 -2033
  26. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +2187 -2034
  27. package/dist/theme/datalab.css +1 -1
  28. package/dist/theme/datalab.min.css +2 -2
  29. package/dist/theme/graph.css +1 -1
  30. package/dist/theme/graph.min.css +2 -2
  31. package/dist/theme/insight.css +1 -1
  32. package/dist/theme/insight.min.css +2 -2
  33. package/dist-esm/billboard.js +642 -440
  34. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.d.ts +7 -0
  35. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -4
  36. package/dist-esm/plugin/billboardjs-plugin-sparkline.d.ts +7 -0
  37. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +131 -79
  38. package/dist-esm/plugin/billboardjs-plugin-stanford.d.ts +7 -0
  39. package/dist-esm/plugin/billboardjs-plugin-stanford.js +135 -80
  40. package/dist-esm/plugin/billboardjs-plugin-tableview.d.ts +7 -0
  41. package/dist-esm/plugin/billboardjs-plugin-tableview.js +4 -8
  42. package/dist-esm/plugin/billboardjs-plugin-textoverlap.d.ts +7 -0
  43. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +4 -7
  44. package/package.json +39 -38
  45. package/src/Chart/api/chart.ts +8 -2
  46. package/src/Chart/api/data.ts +3 -4
  47. package/src/Chart/api/focus.ts +8 -8
  48. package/src/Chart/api/regions.ts +3 -3
  49. package/src/Chart/api/selection.ts +15 -15
  50. package/src/Chart/api/subchart.ts +10 -10
  51. package/src/ChartInternal/Axis/Axis.ts +26 -19
  52. package/src/ChartInternal/ChartInternal.ts +8 -7
  53. package/src/ChartInternal/data/IData.ts +9 -0
  54. package/src/ChartInternal/data/data.ts +4 -4
  55. package/src/ChartInternal/data/load.ts +2 -2
  56. package/src/ChartInternal/interactions/drag.ts +15 -15
  57. package/src/ChartInternal/interactions/eventrect.ts +18 -18
  58. package/src/ChartInternal/interactions/interaction.ts +46 -14
  59. package/src/ChartInternal/interactions/zoom.ts +4 -4
  60. package/src/ChartInternal/internals/color.ts +4 -4
  61. package/src/ChartInternal/internals/domain.ts +1 -1
  62. package/src/ChartInternal/internals/format.ts +9 -4
  63. package/src/ChartInternal/internals/grid.ts +32 -32
  64. package/src/ChartInternal/internals/legend.ts +27 -27
  65. package/src/ChartInternal/internals/redraw.ts +6 -5
  66. package/src/ChartInternal/internals/region.ts +3 -3
  67. package/src/ChartInternal/internals/selection.ts +16 -15
  68. package/src/ChartInternal/internals/size.ts +3 -3
  69. package/src/ChartInternal/internals/text.ts +8 -8
  70. package/src/ChartInternal/internals/title.ts +4 -4
  71. package/src/ChartInternal/internals/tooltip.ts +5 -6
  72. package/src/ChartInternal/internals/transform.ts +5 -5
  73. package/src/ChartInternal/shape/arc.ts +24 -22
  74. package/src/ChartInternal/shape/area.ts +4 -4
  75. package/src/ChartInternal/shape/bar.ts +11 -9
  76. package/src/ChartInternal/shape/candlestick.ts +8 -8
  77. package/src/ChartInternal/shape/gauge.ts +8 -8
  78. package/src/ChartInternal/shape/line.ts +7 -7
  79. package/src/ChartInternal/shape/point.ts +18 -18
  80. package/src/ChartInternal/shape/radar.ts +12 -10
  81. package/src/ChartInternal/shape/shape.ts +43 -11
  82. package/src/Plugin/sparkline/index.ts +4 -4
  83. package/src/Plugin/stanford/index.ts +3 -3
  84. package/src/Plugin/stanford/util.ts +0 -1
  85. package/src/config/Options/axis/x.ts +25 -5
  86. package/src/config/Options/axis/y.ts +24 -3
  87. package/src/config/Options/axis/y2.ts +24 -3
  88. package/src/config/Options/common/tooltip.ts +10 -1
  89. package/src/config/Options/shape/bar.ts +8 -0
  90. package/src/config/classes.ts +154 -66
  91. package/src/module/util.ts +17 -11
  92. package/types/axis.d.ts +22 -8
  93. package/types/chart.d.ts +1 -1
  94. package/types/options.d.ts +32 -32
  95. package/types/plugin/tableview/index.d.ts +3 -3
  96. package/types/plugin/tableview/options.d.ts +1 -1
@@ -26,6 +26,7 @@ import {select as d3Select} from "d3-selection";
26
26
  import {d3Selection} from "../../../types/types";
27
27
  import CLASS from "../../config/classes";
28
28
  import {capitalize, getPointer, getRectSegList, getUnique, isObjectType, isNumber, isValue, isUndefined, notEmpty} from "../../module/util";
29
+ import {IDataRow, IDataIndice, TIndices} from "../data/IData";
29
30
 
30
31
  export default {
31
32
  /**
@@ -75,12 +76,25 @@ export default {
75
76
  return shape;
76
77
  },
77
78
 
78
- getShapeIndices(typeFilter): {[key: string]: number} {
79
+ /**
80
+ * Get shape's indices according it's position
81
+ *
82
+ * From the below example, indices will be:
83
+ * ==> {data1: 0, data2: 0, data3: 1, data4: 1, __max__: 1}
84
+ *
85
+ * data1 data3 data1 data3
86
+ * data2 data4 data2 data4
87
+ * -------------------------
88
+ * 0 1
89
+ * @param {Function} typeFilter Chart type filter function
90
+ * @returns {object} Indices object with its position
91
+ */
92
+ getShapeIndices(typeFilter): TIndices {
79
93
  const $$ = this;
80
94
  const {config} = $$;
81
95
  const xs = config.data_xs;
82
96
  const hasXs = notEmpty(xs);
83
- const indices = {};
97
+ const indices: TIndices = {};
84
98
  let i: any = hasXs ? {} : 0;
85
99
 
86
100
  if (hasXs) {
@@ -121,12 +135,28 @@ export default {
121
135
  /**
122
136
  * Get indices value based on data ID value
123
137
  * @param {object} indices Indices object
124
- * @param {string} id Data id value
138
+ * @param {object} d Data row
139
+ * @param {string} caller Caller function name (Used only for 'sparkline' plugin)
125
140
  * @returns {object} Indices object
126
141
  * @private
127
142
  */
128
- getIndices(indices, id: string) {
129
- const xs = this.config.data_xs;
143
+ getIndices(indices: TIndices, d: IDataRow, caller?: string): IDataIndice { // eslint-disable-line
144
+ const $$ = this;
145
+ const {data_xs: xs, bar_indices_removeNull: removeNull} = $$.config;
146
+ const {id, index} = d;
147
+
148
+ if ($$.isBarType(id) && removeNull) {
149
+ const ind = {} as IDataIndice;
150
+
151
+ // redefine bar indices order
152
+ $$.getAllValuesOnIndex(index, true)
153
+ .forEach((v, i) => {
154
+ ind[v.id] = i;
155
+ ind.__max__ = i;
156
+ });
157
+
158
+ return ind;
159
+ }
130
160
 
131
161
  return notEmpty(xs) ?
132
162
  indices[xs[id]] : indices;
@@ -138,12 +168,12 @@ export default {
138
168
  * @returns {number} Max number
139
169
  * @private
140
170
  */
141
- getIndicesMax(indices): number {
171
+ getIndicesMax(indices: TIndices | IDataIndice): number {
142
172
  return notEmpty(this.config.data_xs) ?
143
173
  // if is multiple xs, return total sum of xs' __max__ value
144
174
  Object.keys(indices)
145
175
  .map(v => indices[v].__max__ || 0)
146
- .reduce((acc, curr) => acc + curr) : indices.__max__;
176
+ .reduce((acc, curr) => acc + curr) : (indices as IDataIndice).__max__;
147
177
  },
148
178
 
149
179
  getShapeX(offset, indices, isSub?: boolean): (d) => number {
@@ -157,7 +187,7 @@ export default {
157
187
  );
158
188
 
159
189
  return d => {
160
- const ind = $$.getIndices(indices, d.id, "getShapeX");
190
+ const ind = $$.getIndices(indices, d, "getShapeX");
161
191
  const index = d.id in ind ? ind[d.id] : 0;
162
192
  const targetsNum = (ind.__max__ || 0) + 1;
163
193
  let x = 0;
@@ -221,10 +251,12 @@ export default {
221
251
  */
222
252
  getShapeYMin(id: string): number {
223
253
  const $$ = this;
224
- const scale = $$.scale[$$.axis.getId(id)];
254
+ const axisId = $$.axis.getId(id);
255
+ const scale = $$.scale[axisId];
225
256
  const [yMin] = scale.domain();
257
+ const inverted = $$.config[`axis_${axisId}_inverted`];
226
258
 
227
- return !$$.isGrouped(id) && yMin > 0 ? yMin : 0;
259
+ return !$$.isGrouped(id) && !inverted && yMin > 0 ? yMin : 0;
228
260
  },
229
261
 
230
262
  /**
@@ -276,7 +308,7 @@ export default {
276
308
 
277
309
  return (d, idx) => {
278
310
  const {id, value, x} = d;
279
- const ind = $$.getIndices(indices, id);
311
+ const ind = $$.getIndices(indices, d);
280
312
  const scale = $$.getYScaleById(id, isSub);
281
313
 
282
314
  if ($$.isBarRangeType(d)) {
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) 2021 ~ present NAVER Corp.
3
3
  * billboard.js project is licensed under the MIT license
4
4
  */
5
- import CLASS from "../../config/classes";
5
+ import {$COMMON} from "../../config/classes";
6
6
  import Plugin from "../Plugin";
7
7
  import Options from "./Options";
8
8
  import {IData} from "../../ChartInternal/data/IData";
@@ -105,8 +105,8 @@ export default class Sparkline extends Plugin {
105
105
  const {getBarW, getIndices} = $$;
106
106
 
107
107
  // override internal methods to positioning bars
108
- $$.getIndices = function(indices, id, caller) {
109
- return caller === "getShapeX" ? {} : getIndices.call(this, indices, id);
108
+ $$.getIndices = function(indices, d, caller) {
109
+ return caller === "getShapeX" ? {} : getIndices.call(this, indices, d);
110
110
  };
111
111
 
112
112
  $$.getBarW = function(type, axis) {
@@ -244,7 +244,7 @@ export default class Sparkline extends Plugin {
244
244
 
245
245
  data.map(v => v.id)
246
246
  .forEach((id, i) => {
247
- const selector = `.${CLASS.target}-${id}`;
247
+ const selector = `.${$COMMON.target}-${id}`;
248
248
  const shape = $el.main.selectAll(selector);
249
249
  let svg = el[i].querySelector("svg");
250
250
 
@@ -6,7 +6,7 @@
6
6
  import {interpolateHslLong as d3InterpolateHslLong} from "d3-interpolate";
7
7
  import {hsl as d3Hsl} from "d3-color";
8
8
  import {scaleSequentialLog as d3ScaleSequentialLog} from "d3-scale";
9
- import CLASS from "../../config/classes";
9
+ import {$TOOLTIP} from "../../config/classes";
10
10
  import {loadConfig} from "../../config/config";
11
11
  import Plugin from "../Plugin";
12
12
  import Options from "./Options";
@@ -228,7 +228,7 @@ export default class Stanford extends Plugin {
228
228
 
229
229
  if (isEmpty(config.tooltip_contents)) {
230
230
  config.tooltip_contents = function(d, defaultTitleFormat, defaultValueFormat, color) {
231
- let html = `<table class="${CLASS.tooltip}"><tbody>`;
231
+ let html = `<table class="${$TOOLTIP.tooltip}"><tbody>`;
232
232
 
233
233
  d.forEach(v => {
234
234
  html += `<tr>
@@ -239,7 +239,7 @@ export default class Stanford extends Plugin {
239
239
  <th>${defaultTitleFormat(v.id)}</th>
240
240
  <th class="value">${defaultValueFormat(v.value)}</th>
241
241
  </tr>
242
- <tr class="${CLASS.tooltipName}-${v.id}">
242
+ <tr class="${$TOOLTIP.tooltipName}-${v.id}">
243
243
  <td class="name"><span style="background-color:${color(v)}"></span>${defaultTitleFormat("Epochs")}</td>
244
244
  <td class="value">${defaultValueFormat(v.epochs)}</td>
245
245
  </tr>`;
@@ -3,7 +3,6 @@
3
3
  * billboard.js project is licensed under the MIT license
4
4
  * @ignore
5
5
  */
6
-
7
6
  import {getRange, isEmpty, isFunction, isString, parseDate} from "../../module/util";
8
7
 
9
8
  /**
@@ -143,15 +143,16 @@ export default {
143
143
  axis_x_tick_format: <Function|string|undefined> undefined,
144
144
 
145
145
  /**
146
- * Setting for culling ticks.<br><br>
147
- * If true is set, the ticks will be culled, then only limitted tick text will be shown. This option does not hide the tick lines. If false is set, all of ticks will be shown.<br><br>
148
- * We can change the number of ticks to be shown by axis.x.tick.culling.max.
146
+ * Setting for culling ticks.
147
+ * - `true`: the ticks will be culled, then only limited tick text will be shown.<br>
148
+ * This option does not hide the tick lines by default, if want to hide tick lines, set `axis.x.tick.culling.lines=false`.
149
+ * - `false`: all of ticks will be shown.<br><br>
150
+ * The number of ticks to be shown can be chaned by `axis.x.tick.culling.max`.
149
151
  * @name axis․x․tick․culling
150
152
  * @memberof Options
151
153
  * @type {boolean}
152
154
  * @default
153
- * - true for indexed axis and timeseries axis
154
- * - false for category axis
155
+ * `true` for indexed axis and timeseries axis, `false` for category axis
155
156
  * @example
156
157
  * axis: {
157
158
  * x: {
@@ -182,6 +183,25 @@ export default {
182
183
  */
183
184
  axis_x_tick_culling_max: 10,
184
185
 
186
+ /**
187
+ * Control visibility of tick lines within culling option, along with tick text.
188
+ * @name axis․x․tick․culling․lines
189
+ * @memberof Options
190
+ * @type {boolean}
191
+ * @default true
192
+ * @example
193
+ * axis: {
194
+ * x: {
195
+ * tick: {
196
+ * culling: {
197
+ * lines: false,
198
+ * }
199
+ * }
200
+ * }
201
+ * }
202
+ */
203
+ axis_x_tick_culling_lines: true,
204
+
185
205
  /**
186
206
  * The number of x axis ticks to show.<br><br>
187
207
  * This option hides tick lines together with tick text. If this option is used on timeseries axis, the ticks position will be determined precisely and not nicely positioned (e.g. it will have rough second value).
@@ -187,9 +187,11 @@ export default {
187
187
  axis_y_tick_format: <Function|undefined> undefined,
188
188
 
189
189
  /**
190
- * Setting for culling ticks.<br><br>
191
- * If true is set, the ticks will be culled, then only limitted tick text will be shown. This option does not hide the tick lines. If false is set, all of ticks will be shown.<br><br>
192
- * We can change the number of ticks to be shown by axis.y.tick.culling.max.
190
+ * Setting for culling ticks.
191
+ * - `true`: the ticks will be culled, then only limited tick text will be shown.<br>
192
+ * This option does not hide the tick lines by default, if want to hide tick lines, set `axis.y.tick.culling.lines=false`.
193
+ * - `false`: all of ticks will be shown.<br><br>
194
+ * The number of ticks to be shown can be chaned by `axis.y.tick.culling.max`.
193
195
  * @name axis․y․tick․culling
194
196
  * @memberof Options
195
197
  * @type {boolean}
@@ -224,6 +226,25 @@ export default {
224
226
  */
225
227
  axis_y_tick_culling_max: 5,
226
228
 
229
+ /**
230
+ * Control visibility of tick lines within culling option, along with tick text.
231
+ * @name axis․y․tick․culling․lines
232
+ * @memberof Options
233
+ * @type {boolean}
234
+ * @default true
235
+ * @example
236
+ * axis: {
237
+ * y: {
238
+ * tick: {
239
+ * culling: {
240
+ * lines: false,
241
+ * }
242
+ * }
243
+ * }
244
+ * }
245
+ */
246
+ axis_y_tick_culling_lines: true,
247
+
227
248
  /**
228
249
  * Show y axis outer tick.
229
250
  * @name axis․y․tick․outer
@@ -173,9 +173,11 @@ export default {
173
173
  axis_y2_tick_format: <Function|undefined> undefined,
174
174
 
175
175
  /**
176
- * Setting for culling ticks.<br><br>
177
- * If true is set, the ticks will be culled, then only limitted tick text will be shown. This option does not hide the tick lines. If false is set, all of ticks will be shown.<br><br>
178
- * We can change the number of ticks to be shown by axis.y.tick.culling.max.
176
+ * Setting for culling ticks.
177
+ * - `true`: the ticks will be culled, then only limited tick text will be shown.<br>
178
+ * This option does not hide the tick lines by default, if want to hide tick lines, set `axis.y2.tick.culling.lines=false`.
179
+ * - `false`: all of ticks will be shown.<br><br>
180
+ * The number of ticks to be shown can be chaned by `axis.y2.tick.culling.max`.
179
181
  * @name axis․y2․tick․culling
180
182
  * @memberof Options
181
183
  * @type {boolean}
@@ -210,6 +212,25 @@ export default {
210
212
  */
211
213
  axis_y2_tick_culling_max: 5,
212
214
 
215
+ /**
216
+ * Control visibility of tick lines within culling option, along with tick text.
217
+ * @name axis․y2․tick․culling․lines
218
+ * @memberof Options
219
+ * @type {boolean}
220
+ * @default true
221
+ * @example
222
+ * axis: {
223
+ * y2: {
224
+ * tick: {
225
+ * culling: {
226
+ * lines: false,
227
+ * }
228
+ * }
229
+ * }
230
+ * }
231
+ */
232
+ axis_y2_tick_culling_lines: true,
233
+
213
234
  /**
214
235
  * Show or hide y2 axis outer tick.
215
236
  * @name axis․y2․tick․outer
@@ -34,7 +34,16 @@ export default {
34
34
  * - `element {SVGElement}`: Tooltip event bound element
35
35
  * - `pos {object}`: Current position of the tooltip.
36
36
  * @property {Function|object} [tooltip.contents] Set custom HTML for the tooltip.<br>
37
- * Specified function receives data, defaultTitleFormat, defaultValueFormat and color of the data point to show. If tooltip.grouped is true, data includes multiple data points.
37
+ * If tooltip.grouped is true, data includes multiple data points.<br><br>
38
+ * Specified function receives `data` array and `defaultTitleFormat`, `defaultValueFormat` and `color` functions of the data point to show.
39
+ * - **Note:**
40
+ * - defaultTitleFormat:
41
+ * - if `axis.x.tick.format` option will be used if set.
42
+ * - otherwise, will return funciton based on tick format type(category, timeseries).
43
+ * - defaultValueFormat:
44
+ * - for Arc type (except gauge, radar), the function will return value from `(ratio * 100).toFixed(1)`.
45
+ * - for Axis based types, will be used `axis.[y|y2].tick.format` option value if is set.
46
+ * - otherwise, will parse value and return as number.
38
47
  * @property {string|HTMLElement} [tooltip.contents.bindto=undefined] Set CSS selector or element reference to bind tooltip.
39
48
  * - **NOTE:** When is specified, will not be updating tooltip's position.
40
49
  * @property {string} [tooltip.contents.template=undefined] Set tooltip's template.<br><br>
@@ -12,6 +12,7 @@ export default {
12
12
  * @memberof Options
13
13
  * @type {object}
14
14
  * @property {object} bar Bar object
15
+ * @property {number} [bar.indices.removeNull=false] Remove nullish data on bar indices positions.
15
16
  * @property {number} [bar.label.threshold=0] Set threshold ratio to show/hide labels.
16
17
  * @property {number} [bar.padding=0] The padding pixel value between each bar.
17
18
  * @property {number} [bar.radius] Set the radius of bar edge in pixel.
@@ -27,12 +28,18 @@ export default {
27
28
  * @property {number} [bar.width.dataname.ratio=0.6] Change the width of bar chart by ratio.
28
29
  * @property {number} [bar.width.dataname.max] The maximum width value for ratio.
29
30
  * @property {boolean} [bar.zerobased=true] Set if min or max value will be 0 on bar chart.
31
+ * @see [Demo: bar indices](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarIndices)
30
32
  * @see [Demo: bar padding](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarPadding)
31
33
  * @see [Demo: bar radius](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarRadius)
32
34
  * @see [Demo: bar width](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarWidth)
33
35
  * @see [Demo: bar width variant](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarWidthVariant)
34
36
  * @example
35
37
  * bar: {
38
+ * // remove nullish data on bar indices postions
39
+ * indices: {
40
+ * removeNull: true
41
+ * },
42
+ *
36
43
  * padding: 1,
37
44
  *
38
45
  * // bar radius
@@ -72,6 +79,7 @@ export default {
72
79
  * }
73
80
  */
74
81
  bar_label_threshold: 0,
82
+ bar_indices_removeNull: false,
75
83
  bar_padding: 0,
76
84
  bar_radius: <number|{ratio: number}|undefined> undefined,
77
85
  bar_radius_ratio: <number|undefined> undefined,
@@ -6,108 +6,196 @@
6
6
  * CSS class names definition
7
7
  * @private
8
8
  */
9
- export default {
9
+ export const $COMMON = {
10
+ button: "bb-button",
11
+ chart: "bb-chart",
12
+ empty: "bb-empty",
13
+ main: "bb-main",
14
+ target: "bb-target",
15
+ EXPANDED: "_expanded_"
16
+ };
17
+
18
+ export const $ARC = {
10
19
  arc: "bb-arc",
11
20
  arcLabelLine: "bb-arc-label-line",
12
21
  arcs: "bb-arcs",
22
+ chartArc: "bb-chart-arc",
23
+ chartArcs: "bb-chart-arcs",
24
+ chartArcsBackground: "bb-chart-arcs-background",
25
+ chartArcsTitle: "bb-chart-arcs-title"
26
+ };
27
+
28
+ export const $AREA = {
13
29
  area: "bb-area",
14
- areas: "bb-areas",
30
+ areas: "bb-areas"
31
+ };
32
+
33
+ export const $AXIS = {
15
34
  axis: "bb-axis",
16
35
  axisX: "bb-axis-x",
17
36
  axisXLabel: "bb-axis-x-label",
18
37
  axisY: "bb-axis-y",
19
38
  axisY2: "bb-axis-y2",
20
39
  axisY2Label: "bb-axis-y2-label",
21
- axisYLabel: "bb-axis-y-label",
40
+ axisYLabel: "bb-axis-y-label"
41
+ };
42
+
43
+ export const $BAR = {
22
44
  bar: "bb-bar",
23
45
  bars: "bb-bars",
24
- brush: "bb-brush",
25
- button: "bb-button",
26
- buttonZoomReset: "bb-zoom-reset",
46
+ chartBar: "bb-chart-bar",
47
+ chartBars: "bb-chart-bars"
48
+ };
49
+
50
+ export const $CANDLESTICK = {
27
51
  candlestick: "bb-candlestick",
28
52
  candlesticks: "bb-candlesticks",
29
- chart: "bb-chart",
30
- chartArc: "bb-chart-arc",
31
- chartArcs: "bb-chart-arcs",
32
- chartArcsBackground: "bb-chart-arcs-background",
33
- chartArcsGaugeMax: "bb-chart-arcs-gauge-max",
34
- chartArcsGaugeMin: "bb-chart-arcs-gauge-min",
35
- chartArcsGaugeUnit: "bb-chart-arcs-gauge-unit",
36
- chartArcsTitle: "bb-chart-arcs-title",
37
- chartArcsGaugeTitle: "bb-chart-arcs-gauge-title",
38
- chartBar: "bb-chart-bar",
39
- chartBars: "bb-chart-bars",
40
53
  chartCandlestick: "bb-chart-candlestick",
41
54
  chartCandlesticks: "bb-chart-candlesticks",
55
+ valueDown: "bb-value-down",
56
+ valueUp: "bb-value-up"
57
+ };
58
+
59
+ export const $CIRCLE = {
42
60
  chartCircles: "bb-chart-circles",
43
- chartLine: "bb-chart-line",
44
- chartLines: "bb-chart-lines",
45
- chartRadar: "bb-chart-radar",
46
- chartRadars: "bb-chart-radars",
47
- chartText: "bb-chart-text",
48
- chartTexts: "bb-chart-texts",
49
61
  circle: "bb-circle",
50
- circles: "bb-circles",
62
+ circles: "bb-circles"
63
+ };
64
+
65
+ export const $COLOR = {
51
66
  colorPattern: "bb-color-pattern",
52
- colorScale: "bb-colorscale",
53
- defocused: "bb-defocused",
67
+ colorScale: "bb-colorscale"
68
+ };
69
+
70
+ export const $DRAG = {
54
71
  dragarea: "bb-dragarea",
55
- empty: "bb-empty",
72
+ INCLUDED: "_included_"
73
+ };
74
+
75
+ export const $GAUGE = {
76
+ chartArcsGaugeMax: "bb-chart-arcs-gauge-max",
77
+ chartArcsGaugeMin: "bb-chart-arcs-gauge-min",
78
+ chartArcsGaugeUnit: "bb-chart-arcs-gauge-unit",
79
+ chartArcsGaugeTitle: "bb-chart-arcs-gauge-title",
80
+ gaugeValue: "bb-gauge-value"
81
+ };
82
+
83
+ export const $LEGEND = {
84
+ legend: "bb-legend",
85
+ legendBackground: "bb-legend-background",
86
+ legendItem: "bb-legend-item",
87
+ legendItemEvent: "bb-legend-item-event",
88
+ legendItemHidden: "bb-legend-item-hidden",
89
+ legendItemPoint: "bb-legend-item-point",
90
+ legendItemTile: "bb-legend-item-tile"
91
+ };
92
+
93
+ export const $LINE = {
94
+ chartLine: "bb-chart-line",
95
+ chartLines: "bb-chart-lines",
96
+ line: "bb-line",
97
+ lines: "bb-lines"
98
+ };
99
+
100
+ export const $EVENT = {
56
101
  eventRect: "bb-event-rect",
57
102
  eventRects: "bb-event-rects",
58
103
  eventRectsMultiple: "bb-event-rects-multiple",
59
104
  eventRectsSingle: "bb-event-rects-single",
105
+
106
+ };
107
+
108
+ export const $FOCUS = {
60
109
  focused: "bb-focused",
61
- gaugeValue: "bb-gauge-value",
110
+ defocused: "bb-defocused",
111
+ legendItemFocused: "bb-legend-item-focused",
112
+ xgridFocus: "bb-xgrid-focus",
113
+ ygridFocus: "bb-ygrid-focus"
114
+ };
115
+
116
+ export const $GRID = {
62
117
  grid: "bb-grid",
63
118
  gridLines: "bb-grid-lines",
64
- legend: "bb-legend",
65
- legendBackground: "bb-legend-background",
66
- legendItem: "bb-legend-item",
67
- legendItemEvent: "bb-legend-item-event",
68
- legendItemFocused: "bb-legend-item-focused",
69
- legendItemHidden: "bb-legend-item-hidden",
70
- legendItemPoint: "bb-legend-item-point",
71
- legendItemTile: "bb-legend-item-tile",
119
+ xgrid: "bb-xgrid",
120
+ xgridLine: "bb-xgrid-line",
121
+ xgridLines: "bb-xgrid-lines",
122
+ xgrids: "bb-xgrids",
123
+ ygrid: "bb-ygrid",
124
+ ygridLine: "bb-ygrid-line",
125
+ ygridLines: "bb-ygrid-lines",
126
+ ygrids: "bb-ygrids"
127
+ };
128
+
129
+ export const $RADAR = {
130
+ chartRadar: "bb-chart-radar",
131
+ chartRadars: "bb-chart-radars",
72
132
  level: "bb-level",
73
- levels: "bb-levels",
74
- line: "bb-line",
75
- lines: "bb-lines",
76
- main: "bb-main",
133
+ levels: "bb-levels"
134
+ };
135
+
136
+ export const $REGION = {
77
137
  region: "bb-region",
78
- regions: "bb-regions",
138
+ regions: "bb-regions"
139
+ };
140
+
141
+ export const $SELECT = {
79
142
  selectedCircle: "bb-selected-circle",
80
143
  selectedCircles: "bb-selected-circles",
144
+ SELECTED: "_selected_"
145
+ };
146
+
147
+ export const $SHAPE = {
81
148
  shape: "bb-shape",
82
149
  shapes: "bb-shapes",
83
- stanfordElements: "bb-stanford-elements",
84
- stanfordLine: "bb-stanford-line",
85
- stanfordLines: "bb-stanford-lines",
86
- stanfordRegion: "bb-stanford-region",
87
- stanfordRegions: "bb-stanford-regions",
88
- subchart: "bb-subchart",
89
- target: "bb-target",
150
+ };
151
+
152
+ export const $SUBCHART = {
153
+ brush: "bb-brush",
154
+ subchart: "bb-subchart"
155
+ };
156
+
157
+ export const $TEXT = {
158
+ chartText: "bb-chart-text",
159
+ chartTexts: "bb-chart-texts",
90
160
  text: "bb-text",
91
161
  texts: "bb-texts",
92
162
  title: "bb-title",
163
+ TextOverlapping: "text-overlapping"
164
+ };
165
+
166
+ export const $TOOLTIP = {
93
167
  tooltip: "bb-tooltip",
94
168
  tooltipContainer: "bb-tooltip-container",
95
- tooltipName: "bb-tooltip-name",
96
- valueDown: "bb-value-down",
97
- valueUp: "bb-value-up",
98
- xgrid: "bb-xgrid",
99
- xgridFocus: "bb-xgrid-focus",
100
- xgridLine: "bb-xgrid-line",
101
- xgridLines: "bb-xgrid-lines",
102
- xgrids: "bb-xgrids",
103
- ygrid: "bb-ygrid",
104
- ygridFocus: "bb-ygrid-focus",
105
- ygridLine: "bb-ygrid-line",
106
- ygridLines: "bb-ygrid-lines",
107
- ygrids: "bb-ygrids",
108
- zoomBrush: "bb-zoom-brush",
109
- EXPANDED: "_expanded_",
110
- SELECTED: "_selected_",
111
- INCLUDED: "_included_",
112
- TextOverlapping: "text-overlapping"
169
+ tooltipName: "bb-tooltip-name"
170
+ };
171
+
172
+ export const $ZOOM = {
173
+ buttonZoomReset: "bb-zoom-reset",
174
+ zoomBrush: "bb-zoom-brush"
175
+ };
176
+
177
+ export default {
178
+ ...$COMMON,
179
+ ...$ARC,
180
+ ...$AREA,
181
+ ...$AXIS,
182
+ ...$BAR,
183
+ ...$CANDLESTICK,
184
+ ...$CIRCLE,
185
+ ...$COLOR,
186
+ ...$DRAG,
187
+ ...$GAUGE,
188
+ ...$LEGEND,
189
+ ...$LINE,
190
+ ...$EVENT,
191
+ ...$FOCUS,
192
+ ...$GRID,
193
+ ...$RADAR,
194
+ ...$REGION,
195
+ ...$SELECT,
196
+ ...$SHAPE,
197
+ ...$SUBCHART,
198
+ ...$TEXT,
199
+ ...$TOOLTIP,
200
+ ...$ZOOM
113
201
  };