billboard.js 3.2.2 → 3.3.1

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 (100) hide show
  1. package/dist/billboard.css +1 -1
  2. package/dist/billboard.js +818 -468
  3. package/dist/billboard.min.css +1 -1
  4. package/dist/billboard.min.js +2 -2
  5. package/dist/billboard.pkgd.js +4765 -3104
  6. package/dist/billboard.pkgd.min.js +4 -4
  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 +145 -99
  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 +144 -98
  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 +13 -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 +11 -126
  21. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  22. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +3980 -2669
  23. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +4119 -2762
  24. package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +4117 -2760
  25. package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +3970 -2774
  26. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +3969 -2773
  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 +787 -464
  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 +45 -44
  45. package/src/Chart/api/chart.ts +7 -1
  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 +3 -3
  51. package/src/ChartInternal/Axis/Axis.ts +26 -19
  52. package/src/ChartInternal/ChartInternal.ts +18 -8
  53. package/src/ChartInternal/data/IData.ts +9 -0
  54. package/src/ChartInternal/data/convert.ts +1 -1
  55. package/src/ChartInternal/data/data.ts +29 -12
  56. package/src/ChartInternal/data/load.ts +2 -2
  57. package/src/ChartInternal/interactions/drag.ts +15 -15
  58. package/src/ChartInternal/interactions/eventrect.ts +18 -18
  59. package/src/ChartInternal/interactions/interaction.ts +46 -14
  60. package/src/ChartInternal/interactions/zoom.ts +4 -4
  61. package/src/ChartInternal/internals/color.ts +4 -4
  62. package/src/ChartInternal/internals/domain.ts +5 -3
  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 +3 -3
  66. package/src/ChartInternal/internals/region.ts +3 -3
  67. package/src/ChartInternal/internals/scale.ts +3 -2
  68. package/src/ChartInternal/internals/selection.ts +16 -15
  69. package/src/ChartInternal/internals/size.ts +35 -4
  70. package/src/ChartInternal/internals/text.ts +10 -10
  71. package/src/ChartInternal/internals/title.ts +4 -4
  72. package/src/ChartInternal/internals/tooltip.ts +9 -6
  73. package/src/ChartInternal/internals/transform.ts +5 -5
  74. package/src/ChartInternal/shape/arc.ts +24 -22
  75. package/src/ChartInternal/shape/area.ts +4 -4
  76. package/src/ChartInternal/shape/bar.ts +87 -40
  77. package/src/ChartInternal/shape/candlestick.ts +8 -8
  78. package/src/ChartInternal/shape/gauge.ts +8 -8
  79. package/src/ChartInternal/shape/line.ts +7 -7
  80. package/src/ChartInternal/shape/point.ts +18 -18
  81. package/src/ChartInternal/shape/radar.ts +12 -10
  82. package/src/ChartInternal/shape/shape.ts +76 -13
  83. package/src/Plugin/sparkline/index.ts +4 -4
  84. package/src/Plugin/stanford/index.ts +3 -3
  85. package/src/Plugin/stanford/util.ts +0 -1
  86. package/src/Plugin/tableview/index.ts +1 -1
  87. package/src/config/Options/axis/x.ts +27 -7
  88. package/src/config/Options/axis/y.ts +24 -3
  89. package/src/config/Options/axis/y2.ts +24 -3
  90. package/src/config/Options/common/main.ts +11 -1
  91. package/src/config/Options/data/data.ts +22 -0
  92. package/src/config/Options/shape/bar.ts +9 -2
  93. package/src/config/classes.ts +154 -66
  94. package/src/module/util.ts +17 -17
  95. package/types/axis.d.ts +22 -8
  96. package/types/chart.d.ts +1 -1
  97. package/types/options.d.ts +40 -33
  98. package/types/plugin/tableview/index.d.ts +3 -3
  99. package/types/plugin/tableview/options.d.ts +1 -1
  100. package/types/types.d.ts +4 -4
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import {select as d3Select} from "d3-selection";
6
6
  import {KEY} from "../../module/Cache";
7
- import CLASS from "../../config/classes";
7
+ import {$AXIS, $COMMON, $RADAR, $SHAPE, $TEXT} from "../../config/classes";
8
8
  import {getMinMax, getRange, isDefined, isEmpty, isNumber, isUndefined, setTextValue, toArray} from "../../module/util";
9
9
 
10
10
  /**
@@ -35,20 +35,20 @@ export default {
35
35
  const {config, state: {current}, $el} = $$;
36
36
 
37
37
  if ($$.hasType("radar")) {
38
- $el.radar = $el.main.select(`.${CLASS.chart}`).append("g")
39
- .attr("class", CLASS.chartRadars);
38
+ $el.radar = $el.main.select(`.${$COMMON.chart}`).append("g")
39
+ .attr("class", $RADAR.chartRadars);
40
40
 
41
41
  // level
42
42
  $el.radar.levels = $el.radar.append("g")
43
- .attr("class", CLASS.levels);
43
+ .attr("class", $RADAR.levels);
44
44
 
45
45
  // axis
46
46
  $el.radar.axes = $el.radar.append("g")
47
- .attr("class", CLASS.axis);
47
+ .attr("class", $AXIS.axis);
48
48
 
49
49
  // shapes
50
50
  $el.radar.shapes = $el.radar.append("g")
51
- .attr("class", CLASS.shapes);
51
+ .attr("class", $SHAPE.shapes);
52
52
 
53
53
  current.dataMax = config.radar_axis_max || $$.getMinMaxData().max[0].value;
54
54
  }
@@ -126,7 +126,7 @@ export default {
126
126
  // Adjust radar, circles and texts' position
127
127
  if (translate) {
128
128
  radar.attr("transform", translate);
129
- main.select(`.${CLASS.chartTexts}`).attr("transform", translate);
129
+ main.select(`.${$TEXT.chartTexts}`).attr("transform", translate);
130
130
 
131
131
  $$.generateRadarPoints();
132
132
  $$.updateRadarLevel();
@@ -176,13 +176,13 @@ export default {
176
176
  });
177
177
 
178
178
  const level = radarLevels
179
- .selectAll(`.${CLASS.level}`)
179
+ .selectAll(`.${$RADAR.level}`)
180
180
  .data(levelData);
181
181
 
182
182
  level.exit().remove();
183
183
 
184
184
  const levelEnter = level.enter().append("g")
185
- .attr("class", (d, i) => `${CLASS.level} ${CLASS.level}-${i}`);
185
+ .attr("class", (d, i) => `${$RADAR.level} ${$RADAR.level}-${i}`);
186
186
 
187
187
  levelEnter.append("polygon")
188
188
  .style("visibility", config.radar_level_show ? null : "hidden");
@@ -231,7 +231,7 @@ export default {
231
231
  axis.exit().remove();
232
232
 
233
233
  const axisEnter = axis.enter().append("g")
234
- .attr("class", (d, i) => `${CLASS.axis}-${i}`);
234
+ .attr("class", (d, i) => `${$AXIS.axis}-${i}`);
235
235
 
236
236
  config.radar_axis_line_show && axisEnter.append("line");
237
237
  config.radar_axis_text_show && axisEnter.append("text");
@@ -314,6 +314,8 @@ export default {
314
314
  return d && Object.keys(d).length === 1 ? d.index : undefined;
315
315
  };
316
316
  const hide = event => {
317
+ state.event = event;
318
+
317
319
  const index = getIndex(event);
318
320
  const noIndex = isUndefined(index);
319
321
 
@@ -23,9 +23,10 @@ import {
23
23
  curveStep as d3CurveStep
24
24
  } from "d3-shape";
25
25
  import {select as d3Select} from "d3-selection";
26
- import {d3Selection} from "types/types";
26
+ import {d3Selection} from "../../../types/types";
27
27
  import CLASS from "../../config/classes";
28
- import {capitalize, getUnique, isObjectType, isNumber, isValue, isUndefined, notEmpty} from "../../module/util";
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;
@@ -204,6 +234,9 @@ export default {
204
234
  value = $$.getRatio("index", d, true);
205
235
  } else if ($$.isBubbleZType(d)) {
206
236
  value = $$.getBubbleZData(d.value, "y");
237
+ } else if ($$.isBarRangeType(d)) {
238
+ // TODO use range.getEnd() like method
239
+ value = value[1];
207
240
  }
208
241
 
209
242
  return $$.getYScaleById(d.id, isSub)(value);
@@ -218,10 +251,12 @@ export default {
218
251
  */
219
252
  getShapeYMin(id: string): number {
220
253
  const $$ = this;
221
- const scale = $$.scale[$$.axis.getId(id)];
254
+ const axisId = $$.axis.getId(id);
255
+ const scale = $$.scale[axisId];
222
256
  const [yMin] = scale.domain();
257
+ const inverted = $$.config[`axis_${axisId}_inverted`];
223
258
 
224
- return !$$.isGrouped(id) && yMin > 0 ? yMin : 0;
259
+ return !$$.isGrouped(id) && !inverted && yMin > 0 ? yMin : 0;
225
260
  },
226
261
 
227
262
  /**
@@ -273,8 +308,14 @@ export default {
273
308
 
274
309
  return (d, idx) => {
275
310
  const {id, value, x} = d;
276
- const ind = $$.getIndices(indices, id);
311
+ const ind = $$.getIndices(indices, d);
277
312
  const scale = $$.getYScaleById(id, isSub);
313
+
314
+ if ($$.isBarRangeType(d)) {
315
+ // TODO use range.getStart()
316
+ return scale(value[0]);
317
+ }
318
+
278
319
  const y0 = scale($$.getShapeYMin(id));
279
320
 
280
321
  const dataXAsNumber = Number(x);
@@ -285,6 +326,7 @@ export default {
285
326
  .forEach(t => {
286
327
  const {id: tid, rowValueMapByXValue, rowValues, values: tvalues} = t;
287
328
 
329
+ // for same stacked group (ind[tid] === ind[id])
288
330
  if (ind[tid] === ind[id] && indexMapByTargetId[tid] < indexMapByTargetId[id]) {
289
331
  let row = rowValues[idx];
290
332
 
@@ -424,5 +466,26 @@ export default {
424
466
  $$.isStepType(d) ?
425
467
  config.line_step_type : "linear"
426
468
  );
469
+ },
470
+
471
+ isWithinBar(that): boolean {
472
+ const mouse = getPointer(this.state.event, that);
473
+ const list = getRectSegList(that);
474
+ const [seg0, seg1] = list;
475
+ const x = Math.min(seg0.x, seg1.x);
476
+ const y = Math.min(seg0.y, seg1.y);
477
+ const offset = this.config.bar_sensitivity;
478
+ const {width, height} = that.getBBox();
479
+ const sx = x - offset;
480
+ const ex = x + width + offset;
481
+ const sy = y + height + offset;
482
+ const ey = y - offset;
483
+
484
+ const isWithin = sx < mouse[0] &&
485
+ mouse[0] < ex &&
486
+ ey < mouse[1] &&
487
+ mouse[1] < sy;
488
+
489
+ return isWithin;
427
490
  }
428
491
  };
@@ -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
  /**
@@ -114,7 +114,7 @@ export default class TableView extends Plugin {
114
114
  title: dataToShow.length ? this.config.categoryTitle : ""
115
115
  });
116
116
  let tbody = "";
117
- const rows: number|string[][] = [];
117
+ const rows: (number|string)[][] = [];
118
118
 
119
119
  dataToShow.forEach(v => {
120
120
  thead += tplProcess(tpl.thead, {title: v.id});
@@ -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).
@@ -262,8 +282,8 @@ export default {
262
282
 
263
283
  /**
264
284
  * Fit x axis ticks.
265
- * - **true**: ticks will be positioned nicely to have same intervals.
266
- * - **false**: ticks will be positioned according to x value of the data points.
285
+ * - **true**: ticks will be shown according to x value of the data points.
286
+ * - **false**: ticks will be shown as to have same intervals.
267
287
  * @name axis․x․tick․fit
268
288
  * @memberof Options
269
289
  * @type {boolean}
@@ -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
@@ -109,12 +109,21 @@ export default {
109
109
  * @name padding
110
110
  * @memberof Options
111
111
  * @type {object}
112
- * @property {object} [padding] padding object
112
+ * @property {object|boolean} [padding=true] Set padding of chart, and accepts object or boolean type.
113
+ * - `Object`: Specify each side's padding.
114
+ * - `false`: Remove padding completely and make shape to fully occupy the container element.
115
+ * - In this case, axes and subchart will be hidden.
116
+ * - To adjust some padding from this state, use `axis.[x|y].padding` option.
113
117
  * @property {number} [padding.top] padding on the top of chart
114
118
  * @property {number} [padding.right] padding on the right of chart
115
119
  * @property {number} [padding.bottom] padding on the bottom of chart
116
120
  * @property {number} [padding.left] padding on the left of chart
121
+ * @see [Demo](https://naver.github.io/billboard.js/demo/#ChartOptions.Padding)
117
122
  * @example
123
+ * // remove padding completely.
124
+ * padding: false,
125
+ *
126
+ * // or specify padding value for each side
118
127
  * padding: {
119
128
  * top: 20,
120
129
  * right: 20,
@@ -122,6 +131,7 @@ export default {
122
131
  * left: 20
123
132
  * }
124
133
  */
134
+ padding: true,
125
135
  padding_left: <number|undefined> undefined,
126
136
  padding_right: <number|undefined> undefined,
127
137
  padding_top: <number|undefined> undefined,
@@ -634,6 +634,18 @@ export default {
634
634
  * ]
635
635
  * }
636
636
  *
637
+ * // for 'bar' type, data can contain:
638
+ * // - an array of [start, end] data following the order
639
+ * data: {
640
+ * rows: [
641
+ * ["data1", "data2"],
642
+ * [[100, 150], 120],
643
+ * [[200, 300], 55],
644
+ * [[-400, 500], 60]
645
+ * ],
646
+ * type: "bar"
647
+ * }
648
+ *
637
649
  * // for 'range' types('area-line-range' or 'area-spline-range'), data should contain:
638
650
  * // - an array of [high, mid, low] data following the order
639
651
  * // - or an object with 'high', 'mid' and 'low' key value
@@ -710,6 +722,16 @@ export default {
710
722
  * ]
711
723
  * }
712
724
  *
725
+ * // for 'bar' type, data can contain:
726
+ * // - an array of [start, end] data following the order
727
+ * data: {
728
+ * columns: [
729
+ * ["data1", -100, 50, [100, 200], [200, 300]],
730
+ * ["data2", -200, 300, [-100, 100], [-50, -30]],
731
+ * ],
732
+ * type: "bar"
733
+ * }
734
+ *
713
735
  * // for 'range' types('area-line-range' or 'area-spline-range'), data should contain:
714
736
  * // - an array of [high, mid, low] data following the order
715
737
  * // - or an object with 'high', 'mid' and 'low' key value
@@ -12,10 +12,10 @@ 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.
18
- * - **NOTE:** Works only for non-stacked bar
19
19
  * @property {number} [bar.radius.ratio] Set the radius ratio of bar edge in relative the bar's width.
20
20
  * @property {number} [bar.sensitivity=2] The senstivity offset value for interaction boundary.
21
21
  * @property {number} [bar.width] Change the width of bar chart.
@@ -28,15 +28,21 @@ export default {
28
28
  * @property {number} [bar.width.dataname.ratio=0.6] Change the width of bar chart by ratio.
29
29
  * @property {number} [bar.width.dataname.max] The maximum width value for ratio.
30
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)
31
32
  * @see [Demo: bar padding](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarPadding)
32
33
  * @see [Demo: bar radius](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarRadius)
33
34
  * @see [Demo: bar width](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarWidth)
34
35
  * @see [Demo: bar width variant](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarWidthVariant)
35
36
  * @example
36
37
  * bar: {
38
+ * // remove nullish data on bar indices postions
39
+ * indices: {
40
+ * removeNull: true
41
+ * },
42
+ *
37
43
  * padding: 1,
38
44
  *
39
- * // the 'radius' option can be used only for non-stacking bars
45
+ * // bar radius
40
46
  * radius: 10,
41
47
  * // or
42
48
  * radius: {
@@ -73,6 +79,7 @@ export default {
73
79
  * }
74
80
  */
75
81
  bar_label_threshold: 0,
82
+ bar_indices_removeNull: false,
76
83
  bar_padding: 0,
77
84
  bar_radius: <number|{ratio: number}|undefined> undefined,
78
85
  bar_radius_ratio: <number|undefined> undefined,