billboard.js 4.1.4 → 4.1.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 (233) hide show
  1. package/dist/billboard.css +1 -1
  2. package/dist/billboard.js +154 -87
  3. package/dist/billboard.min.css +1 -1
  4. package/dist/billboard.min.js +19 -19
  5. package/dist/billboard.pkgd.js +154 -87
  6. package/dist/billboard.pkgd.min.js +23 -23
  7. package/dist/billboard.react.js +1 -1
  8. package/dist/billboard.react.min.js +1 -1
  9. package/dist/billboard.worker.js +1 -1
  10. package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  11. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  12. package/dist/plugin/billboardjs-plugin-sparkline.js +2 -2
  13. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  14. package/dist/plugin/billboardjs-plugin-stanford.js +2 -2
  15. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  16. package/dist/plugin/billboardjs-plugin-tableview.js +2 -2
  17. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  18. package/dist/plugin/billboardjs-plugin-textoverlap.js +2 -2
  19. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  20. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +2 -2
  21. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +2 -2
  22. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +2 -2
  23. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +2 -2
  24. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +2 -2
  25. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +2 -2
  26. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +2 -2
  27. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +2 -2
  28. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +2 -2
  29. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +2 -2
  30. package/dist/theme/dark.css +1 -1
  31. package/dist/theme/dark.min.css +1 -1
  32. package/dist/theme/datalab.css +1 -1
  33. package/dist/theme/datalab.min.css +1 -1
  34. package/dist/theme/graph.css +1 -1
  35. package/dist/theme/graph.min.css +1 -1
  36. package/dist/theme/insight.css +1 -1
  37. package/dist/theme/insight.min.css +1 -1
  38. package/dist/theme/modern.css +1 -1
  39. package/dist/theme/modern.min.css +1 -1
  40. package/dist-esm/Chart/Chart.js +1 -1
  41. package/dist-esm/Chart/api/axis.js +1 -1
  42. package/dist-esm/Chart/api/category.js +1 -1
  43. package/dist-esm/Chart/api/chart.js +2 -2
  44. package/dist-esm/Chart/api/color.js +1 -1
  45. package/dist-esm/Chart/api/data.js +1 -1
  46. package/dist-esm/Chart/api/export.js +1 -1
  47. package/dist-esm/Chart/api/flow.js +13 -6
  48. package/dist-esm/Chart/api/focus.js +1 -1
  49. package/dist-esm/Chart/api/grid.js +1 -1
  50. package/dist-esm/Chart/api/group.js +1 -1
  51. package/dist-esm/Chart/api/legend.js +1 -1
  52. package/dist-esm/Chart/api/load.js +1 -1
  53. package/dist-esm/Chart/api/regions.js +1 -1
  54. package/dist-esm/Chart/api/selection.js +1 -1
  55. package/dist-esm/Chart/api/show.js +1 -1
  56. package/dist-esm/Chart/api/stubs.js +1 -1
  57. package/dist-esm/Chart/api/subchart.js +1 -1
  58. package/dist-esm/Chart/api/tooltip.js +1 -1
  59. package/dist-esm/Chart/api/x.js +1 -1
  60. package/dist-esm/Chart/api/zoom.js +1 -1
  61. package/dist-esm/ChartInternal/Axis/Axis.js +1 -1
  62. package/dist-esm/ChartInternal/Axis/AxisRenderer.js +18 -11
  63. package/dist-esm/ChartInternal/Axis/AxisRendererHelper.js +2 -2
  64. package/dist-esm/ChartInternal/ChartInternal.js +1 -1
  65. package/dist-esm/ChartInternal/data/convert.helper.js +1 -1
  66. package/dist-esm/ChartInternal/data/convert.js +1 -1
  67. package/dist-esm/ChartInternal/data/data.js +1 -1
  68. package/dist-esm/ChartInternal/data/load.js +1 -1
  69. package/dist-esm/ChartInternal/interactions/drag.js +1 -1
  70. package/dist-esm/ChartInternal/interactions/eventrect.js +1 -1
  71. package/dist-esm/ChartInternal/interactions/flow.js +23 -16
  72. package/dist-esm/ChartInternal/interactions/interaction.js +1 -1
  73. package/dist-esm/ChartInternal/interactions/subchart.js +1 -1
  74. package/dist-esm/ChartInternal/interactions/zoom.js +1 -1
  75. package/dist-esm/ChartInternal/internals/category.js +1 -1
  76. package/dist-esm/ChartInternal/internals/class.js +1 -1
  77. package/dist-esm/ChartInternal/internals/clip.js +1 -1
  78. package/dist-esm/ChartInternal/internals/color.js +1 -1
  79. package/dist-esm/ChartInternal/internals/domain.js +1 -1
  80. package/dist-esm/ChartInternal/internals/format.js +1 -1
  81. package/dist-esm/ChartInternal/internals/grid.js +1 -1
  82. package/dist-esm/ChartInternal/internals/legend.js +1 -1
  83. package/dist-esm/ChartInternal/internals/redraw.js +6 -6
  84. package/dist-esm/ChartInternal/internals/region.js +1 -1
  85. package/dist-esm/ChartInternal/internals/scale.js +1 -1
  86. package/dist-esm/ChartInternal/internals/selection.js +1 -1
  87. package/dist-esm/ChartInternal/internals/size.axis.js +1 -1
  88. package/dist-esm/ChartInternal/internals/size.js +1 -1
  89. package/dist-esm/ChartInternal/internals/style.js +1 -1
  90. package/dist-esm/ChartInternal/internals/subchart.util.js +1 -1
  91. package/dist-esm/ChartInternal/internals/text.arc.js +1 -1
  92. package/dist-esm/ChartInternal/internals/text.js +1 -1
  93. package/dist-esm/ChartInternal/internals/text.util.js +1 -1
  94. package/dist-esm/ChartInternal/internals/title.js +1 -1
  95. package/dist-esm/ChartInternal/internals/tooltip.js +23 -4
  96. package/dist-esm/ChartInternal/internals/transform.js +1 -1
  97. package/dist-esm/ChartInternal/internals/type.js +1 -1
  98. package/dist-esm/ChartInternal/shape/arc.js +1 -1
  99. package/dist-esm/ChartInternal/shape/area.js +1 -1
  100. package/dist-esm/ChartInternal/shape/bar.js +1 -1
  101. package/dist-esm/ChartInternal/shape/bubble.js +1 -1
  102. package/dist-esm/ChartInternal/shape/candlestick.js +1 -1
  103. package/dist-esm/ChartInternal/shape/core/barRadius.js +1 -1
  104. package/dist-esm/ChartInternal/shape/core/bubble.js +1 -1
  105. package/dist-esm/ChartInternal/shape/core/candlestick.js +1 -1
  106. package/dist-esm/ChartInternal/shape/core/dataRegion.js +1 -1
  107. package/dist-esm/ChartInternal/shape/core/geometry.js +1 -1
  108. package/dist-esm/ChartInternal/shape/core/path.js +1 -1
  109. package/dist-esm/ChartInternal/shape/core/point.js +1 -1
  110. package/dist-esm/ChartInternal/shape/core/treemap.js +1 -1
  111. package/dist-esm/ChartInternal/shape/funnel.js +1 -1
  112. package/dist-esm/ChartInternal/shape/gauge.js +1 -1
  113. package/dist-esm/ChartInternal/shape/line.js +1 -1
  114. package/dist-esm/ChartInternal/shape/point.js +5 -4
  115. package/dist-esm/ChartInternal/shape/polar.js +1 -1
  116. package/dist-esm/ChartInternal/shape/radar.js +1 -1
  117. package/dist-esm/ChartInternal/shape/shape.js +9 -5
  118. package/dist-esm/ChartInternal/shape/treemap.js +1 -1
  119. package/dist-esm/canvas/CanvasAxisRenderer.js +18 -15
  120. package/dist-esm/canvas/CanvasEngine.js +1 -1
  121. package/dist-esm/canvas/CanvasPainter.js +1 -1
  122. package/dist-esm/canvas/CanvasRenderer.js +1 -1
  123. package/dist-esm/canvas/CanvasTheme.js +1 -1
  124. package/dist-esm/canvas/HitDetector.js +1 -1
  125. package/dist-esm/canvas/axisTicks.js +1 -1
  126. package/dist-esm/canvas/classes.js +1 -1
  127. package/dist-esm/canvas/color.js +1 -1
  128. package/dist-esm/canvas/geometry.js +1 -1
  129. package/dist-esm/canvas/labels.js +1 -1
  130. package/dist-esm/canvas/pointPattern.js +1 -1
  131. package/dist-esm/canvas/util.js +1 -1
  132. package/dist-esm/config/Options/Options.js +1 -1
  133. package/dist-esm/config/Options/axis/axis.js +1 -1
  134. package/dist-esm/config/Options/axis/x.js +1 -1
  135. package/dist-esm/config/Options/axis/y.js +1 -1
  136. package/dist-esm/config/Options/axis/y2.js +1 -1
  137. package/dist-esm/config/Options/common/boost.js +1 -1
  138. package/dist-esm/config/Options/common/color.js +1 -1
  139. package/dist-esm/config/Options/common/grid.js +1 -1
  140. package/dist-esm/config/Options/common/legend.js +1 -1
  141. package/dist-esm/config/Options/common/main.js +1 -1
  142. package/dist-esm/config/Options/common/point.js +1 -1
  143. package/dist-esm/config/Options/common/title.js +1 -1
  144. package/dist-esm/config/Options/common/tooltip.js +1 -1
  145. package/dist-esm/config/Options/data/axis.js +1 -1
  146. package/dist-esm/config/Options/data/data.js +1 -1
  147. package/dist-esm/config/Options/data/selection.js +1 -1
  148. package/dist-esm/config/Options/interaction/interaction.js +1 -1
  149. package/dist-esm/config/Options/interaction/subchart.js +5 -1
  150. package/dist-esm/config/Options/interaction/zoom.js +1 -1
  151. package/dist-esm/config/Options/shape/arc.js +1 -1
  152. package/dist-esm/config/Options/shape/area.js +1 -1
  153. package/dist-esm/config/Options/shape/bar.js +1 -1
  154. package/dist-esm/config/Options/shape/bubble.js +1 -1
  155. package/dist-esm/config/Options/shape/candlestick.js +1 -1
  156. package/dist-esm/config/Options/shape/donut.js +1 -1
  157. package/dist-esm/config/Options/shape/funnel.js +1 -1
  158. package/dist-esm/config/Options/shape/gauge.js +1 -1
  159. package/dist-esm/config/Options/shape/line.js +1 -1
  160. package/dist-esm/config/Options/shape/pie.js +1 -1
  161. package/dist-esm/config/Options/shape/polar.js +1 -1
  162. package/dist-esm/config/Options/shape/radar.js +1 -1
  163. package/dist-esm/config/Options/shape/scatter.js +1 -1
  164. package/dist-esm/config/Options/shape/spline.js +1 -1
  165. package/dist-esm/config/Options/shape/treemap.js +1 -1
  166. package/dist-esm/config/Store/Element.js +1 -1
  167. package/dist-esm/config/Store/State.js +2 -1
  168. package/dist-esm/config/Store/Store.js +1 -1
  169. package/dist-esm/config/classes.js +1 -1
  170. package/dist-esm/config/config.js +1 -1
  171. package/dist-esm/config/const.js +1 -1
  172. package/dist-esm/config/resolver/axis.core.js +1 -1
  173. package/dist-esm/config/resolver/axis.js +1 -1
  174. package/dist-esm/config/resolver/canvas.js +15 -3
  175. package/dist-esm/config/resolver/canvasShape.js +1 -1
  176. package/dist-esm/config/resolver/category.js +1 -1
  177. package/dist-esm/config/resolver/export.js +1 -1
  178. package/dist-esm/config/resolver/flow.js +1 -1
  179. package/dist-esm/config/resolver/grid.js +1 -1
  180. package/dist-esm/config/resolver/interaction/selection.js +1 -1
  181. package/dist-esm/config/resolver/interaction/subchart.js +1 -1
  182. package/dist-esm/config/resolver/interaction/zoom.js +1 -1
  183. package/dist-esm/config/resolver/regions.js +1 -1
  184. package/dist-esm/config/resolver/shape/arc.helpers.js +1 -1
  185. package/dist-esm/config/resolver/shape/area.js +1 -1
  186. package/dist-esm/config/resolver/shape/axis.helpers.js +1 -1
  187. package/dist-esm/config/resolver/shape/bar.js +1 -1
  188. package/dist-esm/config/resolver/shape/bubble.js +1 -1
  189. package/dist-esm/config/resolver/shape/candlestick.js +1 -1
  190. package/dist-esm/config/resolver/shape/donut.js +1 -1
  191. package/dist-esm/config/resolver/shape/funnel.js +1 -1
  192. package/dist-esm/config/resolver/shape/gauge.js +1 -1
  193. package/dist-esm/config/resolver/shape/line.js +1 -1
  194. package/dist-esm/config/resolver/shape/pie.js +1 -1
  195. package/dist-esm/config/resolver/shape/polar.js +1 -1
  196. package/dist-esm/config/resolver/shape/radar.js +1 -1
  197. package/dist-esm/config/resolver/shape/scatter.js +1 -1
  198. package/dist-esm/config/resolver/shape/treemap.js +1 -1
  199. package/dist-esm/core.js +3 -3
  200. package/dist-esm/index.canvas.js +1 -1
  201. package/dist-esm/index.esm.js +1 -1
  202. package/dist-esm/module/Cache.js +1 -1
  203. package/dist-esm/module/browser.js +1 -1
  204. package/dist-esm/module/dsv.js +1 -1
  205. package/dist-esm/module/error.js +1 -1
  206. package/dist-esm/module/generator.js +1 -1
  207. package/dist-esm/module/sanitize.js +1 -1
  208. package/dist-esm/module/util/brush.js +1 -1
  209. package/dist-esm/module/util/dom.js +1 -1
  210. package/dist-esm/module/util/object.js +1 -1
  211. package/dist-esm/module/util/type-checks.js +1 -1
  212. package/dist-esm/module/worker.js +1 -1
  213. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  214. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -2
  215. package/dist-esm/plugin/billboardjs-plugin-stanford.js +2 -2
  216. package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
  217. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
  218. package/dist-esm/react/index.js +1 -1
  219. package/package.json +1 -1
  220. package/src/Chart/api/chart.ts +2 -1
  221. package/src/Chart/api/flow.ts +20 -7
  222. package/src/ChartInternal/Axis/AxisRenderer.ts +20 -18
  223. package/src/ChartInternal/Axis/AxisRendererHelper.ts +3 -1
  224. package/src/ChartInternal/interactions/flow.ts +50 -19
  225. package/src/ChartInternal/internals/redraw.ts +15 -9
  226. package/src/ChartInternal/internals/tooltip.ts +24 -6
  227. package/src/ChartInternal/shape/point.ts +6 -3
  228. package/src/ChartInternal/shape/shape.ts +15 -3
  229. package/src/canvas/CanvasAxisRenderer.ts +19 -22
  230. package/src/config/Options/interaction/subchart.ts +4 -0
  231. package/src/config/Store/State.ts +1 -0
  232. package/src/config/resolver/canvas.ts +20 -2
  233. package/types/options.d.ts +3 -0
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.1.4
8
+ * @version 4.1.5
9
9
  *
10
10
  * All-in-one packaged file for ease use of 'billboard.js' with dependant d3.js modules & polyfills.
11
11
  * - @types/d3-selection ^3.0.12
@@ -29848,23 +29848,27 @@ function splitTickTextByWidth(text, width, painter) {
29848
29848
  return [text];
29849
29849
  }
29850
29850
  const charWidth = painter.measureText("0").width || 5.5;
29851
- function split(lines, value) {
29851
+ const lines = [];
29852
+ let start = 0;
29853
+ while (true) {
29852
29854
  let spaceIndex;
29853
- for (let i = 1; i < value.length; i++) {
29854
- if (value.charAt(i) === " ") {
29855
+ let splitAt = -1;
29856
+ for (let i = 1; start + i < text.length; i++) {
29857
+ if (text.charAt(start + i) === " ") {
29855
29858
  spaceIndex = i;
29856
29859
  }
29857
29860
  if (width < charWidth * (i + 1)) {
29858
- const splitIndex = spaceIndex || i;
29859
- return split(
29860
- lines.concat(value.slice(0, splitIndex)),
29861
- value.slice(spaceIndex ? spaceIndex + 1 : i)
29862
- );
29861
+ splitAt = i;
29862
+ break;
29863
29863
  }
29864
29864
  }
29865
- return lines.concat(value);
29865
+ if (splitAt === -1) {
29866
+ lines.push(text.slice(start));
29867
+ return lines;
29868
+ }
29869
+ lines.push(text.slice(start, start + (spaceIndex || splitAt)));
29870
+ start += spaceIndex ? spaceIndex + 1 : splitAt;
29866
29871
  }
29867
- return split([], text);
29868
29872
  }
29869
29873
  function getXTickTextWidth($$, ticks, isRotated, targetScale) {
29870
29874
  var _a, _b;
@@ -38405,6 +38409,7 @@ class State {
38405
38409
  isCanvasMode: false,
38406
38410
  canvasShape: null,
38407
38411
  canvasFocusKey: null,
38412
+ canvasFocusData: null,
38408
38413
  canvasSubchartBrushDragging: false,
38409
38414
  canvasSubchartBrushMode: null,
38410
38415
  canvasSubchartBrushStart: null,
@@ -44795,7 +44800,7 @@ function _getLegendTouchOption($$) {
44795
44800
 
44796
44801
  /* harmony default export */ var redraw = ({
44797
44802
  redraw(options = {}) {
44798
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
44803
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
44799
44804
  const $$ = this;
44800
44805
  const { config, state, $el } = $$;
44801
44806
  const { main, treemap } = $el;
@@ -44831,27 +44836,27 @@ function _getLegendTouchOption($$) {
44831
44836
  $$.updateSizes(initializing);
44832
44837
  if (state.isCanvasMode) {
44833
44838
  const zoomScale = $$.scale.zoom;
44834
- const zoomDomain = zoomScale == null ? void 0 : zoomScale.domain();
44839
+ const zoomDomain = (_d = (_c = zoomScale == null ? void 0 : zoomScale.orgDomain) == null ? void 0 : _c.call(zoomScale)) != null ? _d : zoomScale == null ? void 0 : zoomScale.domain();
44835
44840
  zoomScale && ($$.scale.zoom = null);
44836
44841
  $$.updateScales(initializing, wth.UpdateXDomain);
44837
44842
  if (zoomScale) {
44838
44843
  zoomScale.range($$.scale.x.range());
44839
44844
  zoomDomain && zoomScale.domain(zoomDomain);
44840
- $$.scale.zoom = $$.getCustomizedXScale(zoomScale);
44845
+ $$.scale.zoom = $$.getCustomizedXScale((_f = (_e = zoomScale.orgScale) == null ? void 0 : _e.call(zoomScale)) != null ? _f : zoomScale);
44841
44846
  $$.axis.x.scale($$.scale.zoom);
44842
44847
  $$.scale.x.domain(config.zoom_rescale ? zoomDomain : $$.org.xDomain);
44843
44848
  $$.scale.subX.domain($$.org.xDomain);
44844
44849
  }
44845
44850
  state.hasAxis && $$.axis.syncAxisDomains(targetsToShow, wth, flow);
44846
- state.hasAxis && ((_c = $$.applyCanvasSubchartDomain) == null ? void 0 : _c.call($$));
44851
+ state.hasAxis && ((_g = $$.applyCanvasSubchartDomain) == null ? void 0 : _g.call($$));
44847
44852
  const shape = needShapeUpdate ? $$.getDrawShape() : state._cachedDrawShape || $$.getDrawShape();
44848
44853
  if (needShapeUpdate) {
44849
44854
  state._cachedDrawShape = shape;
44850
44855
  }
44851
44856
  if (config.legend_show && $el.legend && !(config.legend_contents_bindto && config.legend_contents_template)) {
44852
- (_d = $$.positionHtmlLegend) == null ? void 0 : _d.call($$);
44857
+ (_h = $$.positionHtmlLegend) == null ? void 0 : _h.call($$);
44853
44858
  }
44854
- (_e = $$.resizeCanvas) == null ? void 0 : _e.call($$);
44859
+ (_i = $$.resizeCanvas) == null ? void 0 : _i.call($$);
44855
44860
  state.canvasFocusKey = null;
44856
44861
  $$.renderCanvasFrame(shape, null, true);
44857
44862
  initializing && $$.updateTypesElements();
@@ -44872,11 +44877,11 @@ function _getLegendTouchOption($$) {
44872
44877
  $$.updateDimension(true);
44873
44878
  }
44874
44879
  config.data_empty_label_text && main.select(`text.${$TEXT.text}.${$COMMON.empty}`).attr("x", state.width / 2).attr("y", state.height / 2).text(config.data_empty_label_text).style("display", targetsToShow.length ? "none" : null);
44875
- (_f = $$.redrawTitle) == null ? void 0 : _f.call($$);
44880
+ (_j = $$.redrawTitle) == null ? void 0 : _j.call($$);
44876
44881
  if (state.hasAxis) {
44877
44882
  $$.axis.redrawAxis(targetsToShow, wth, transitions, flow, initializing);
44878
- ((_g = $$.hasGrid) == null ? void 0 : _g.call($$)) && $$.updateGrid();
44879
- config.regions.length && ((_h = $$.updateRegion) == null ? void 0 : _h.call($$));
44883
+ ((_k = $$.hasGrid) == null ? void 0 : _k.call($$)) && $$.updateGrid();
44884
+ config.regions.length && ((_l = $$.updateRegion) == null ? void 0 : _l.call($$));
44880
44885
  ["bar", "candlestick", "line", "area"].forEach((v) => {
44881
44886
  const name = capitalize(v);
44882
44887
  if (/^(line|area)$/.test(v) && $$.hasTypeOf(name) || $$.hasType(v)) {
@@ -44888,7 +44893,7 @@ function _getLegendTouchOption($$) {
44888
44893
  $el.text && main.selectAll(`.${$SELECT.selectedCircles}`).filter($$.isBarType.bind($$)).selectAll("circle").remove();
44889
44894
  if (config.interaction_enabled && !flow && wth.EventRect) {
44890
44895
  $$.redrawEventRect();
44891
- (_i = $$.bindZoomEvent) == null ? void 0 : _i.call($$);
44896
+ (_m = $$.bindZoomEvent) == null ? void 0 : _m.call($$);
44892
44897
  }
44893
44898
  } else {
44894
44899
  $el.arcs && $$.redrawArc(duration, durationForExit, wth.Transform);
@@ -44899,9 +44904,9 @@ function _getLegendTouchOption($$) {
44899
44904
  }
44900
44905
  if (!state.resizing && !treemap && ($$.hasPointType() || state.hasRadar)) {
44901
44906
  if (needShapeUpdate) {
44902
- $$.updateCircle();
44907
+ $$.updateCircle(false, !!flow);
44903
44908
  }
44904
- } else if ((_j = $$.hasLegendDefsPoint) == null ? void 0 : _j.call($$)) {
44909
+ } else if ((_n = $$.hasLegendDefsPoint) == null ? void 0 : _n.call($$)) {
44905
44910
  $$.data.targets.forEach($$.point("create", this));
44906
44911
  }
44907
44912
  if ($$.hasDataLabel() && !$$.hasArcType(null, ["radar"])) {
@@ -44926,13 +44931,13 @@ function _getLegendTouchOption($$) {
44926
44931
  generateRedrawList(targets, flow, duration, withSubchart, needShapeRegen = true) {
44927
44932
  const $$ = this;
44928
44933
  const { config, state } = $$;
44934
+ if (state.hasAxis) {
44935
+ config.subchart_show && $$.redrawSubchart(withSubchart, duration);
44936
+ }
44929
44937
  const shape = needShapeRegen ? $$.getDrawShape() : state._cachedDrawShape || $$.getDrawShape();
44930
44938
  if (needShapeRegen) {
44931
44939
  state._cachedDrawShape = shape;
44932
44940
  }
44933
- if (state.hasAxis) {
44934
- config.subchart_show && $$.redrawSubchart(withSubchart, duration, shape);
44935
- }
44936
44941
  const flowFn = flow && $$.generateFlow({
44937
44942
  targets,
44938
44943
  flow,
@@ -44940,7 +44945,7 @@ function _getLegendTouchOption($$) {
44940
44945
  shape,
44941
44946
  xv: $$.xv.bind($$)
44942
44947
  });
44943
- const withTransition = (duration || flowFn) && isTabVisible();
44948
+ const withTransition = !flowFn && duration && isTabVisible();
44944
44949
  const redrawList = $$.getRedrawList(shape, flow, flowFn, withTransition);
44945
44950
  const afterRedraw = () => {
44946
44951
  flowFn && flowFn();
@@ -46197,6 +46202,11 @@ function _getCanvasTitleHeight($$) {
46197
46202
 
46198
46203
  const RE_WHITESPACE = /(\r?\n|\t)/g;
46199
46204
  const RE_TOOLTIP_TPL = /{{(.*)}}/;
46205
+ function getRangeValueHtml(values) {
46206
+ return `<div style="display:inline-grid;grid-template-columns:auto auto;gap:0 .3em;text-align:left">${values.map(([name, v]) => `<b style="text-align:right">${name}:</b><span>${v}</span>`).join(
46207
+ ""
46208
+ )}</div>`;
46209
+ }
46200
46210
  /* harmony default export */ var internals_tooltip = ({
46201
46211
  /**
46202
46212
  * Initializes the tooltip
@@ -46337,7 +46347,7 @@ const RE_TOOLTIP_TPL = /{{(.*)}}/;
46337
46347
  (v) => valueFormat($$.getRangedData(row, v), ...param)
46338
46348
  );
46339
46349
  const mid = valueFormat(getRowValue(row), ...param);
46340
- value = `<b>Mid:</b> ${mid} <b>High:</b> ${high} <b>Low:</b> ${low}`;
46350
+ value = getRangeValueHtml([["Mid", mid], ["High", high], ["Low", low]]);
46341
46351
  } else if ($$.isCandlestickType(row)) {
46342
46352
  const [open, high, low, close, volume] = ["open", "high", "low", "close", "volume"].map((v) => {
46343
46353
  const value2 = $$.getRangedData(row, v, "candlestick");
@@ -46346,7 +46356,13 @@ const RE_TOOLTIP_TPL = /{{(.*)}}/;
46346
46356
  ...param
46347
46357
  ) : void 0;
46348
46358
  });
46349
- value = `<b>Open:</b> ${open} <b>High:</b> ${high} <b>Low:</b> ${low} <b>Close:</b> ${close}${volume ? ` <b>Volume:</b> ${volume}` : ""}`;
46359
+ value = getRangeValueHtml([
46360
+ ["Open", open],
46361
+ ["High", high],
46362
+ ["Low", low],
46363
+ ["Close", close],
46364
+ ...volume ? [["Volume", volume]] : []
46365
+ ]);
46350
46366
  } else if ($$.isBarRangeType(row)) {
46351
46367
  const { value: rangeValue, id, index } = row;
46352
46368
  value = `${valueFormat(rangeValue, void 0, id, index)}`;
@@ -46689,7 +46705,7 @@ const RE_TOOLTIP_TPL = /{{(.*)}}/;
46689
46705
  $el: { eventRect, svg, tooltip },
46690
46706
  state: { event, hasAxis, hasRadar, hasTreemap }
46691
46707
  } = $$;
46692
- if ($$.state.isCanvasMode) {
46708
+ if ($$.state.isCanvasMode || $$.state.flowing) {
46693
46709
  return;
46694
46710
  }
46695
46711
  if ((tooltip == null ? void 0 : tooltip.style("display")) === "block" && event) {
@@ -48040,6 +48056,9 @@ function getSubchartCandlestickShapeValue($$, d, isSub) {
48040
48056
  return void 0;
48041
48057
  }
48042
48058
  if ($$.isBarType(d)) {
48059
+ if (isNumber(value.volume)) {
48060
+ return value.volume;
48061
+ }
48043
48062
  return isNumber(value.open) && isNumber(value.close) ? value._isUp ? value.close : value.open : void 0;
48044
48063
  }
48045
48064
  return isNumber(value.close) ? value.close : void 0;
@@ -48694,23 +48713,25 @@ function updateTargetsForShape(targets, config) {
48694
48713
  return sensitivity;
48695
48714
  },
48696
48715
  getBarW(type, axis, targetsNum) {
48697
- var _a, _b, _c, _d, _e;
48716
+ var _a, _b, _c, _d;
48698
48717
  const $$ = this;
48699
48718
  const { config, org, scale, state } = $$;
48700
48719
  const maxDataCount = $$.getMaxDataCount();
48701
48720
  const isGrouped = type === "bar" && ((_a = config.data_groups) == null ? void 0 : _a.length);
48702
48721
  const configName = `${type}_width`;
48703
- const { k } = (_c = (_b = $$.getZoomTransform) == null ? void 0 : _b.call($$)) != null ? _c : { k: 1 };
48704
48722
  const xMinMax = [
48705
- (_d = config.axis_x_min) != null ? _d : org.xDomain[0],
48706
- (_e = config.axis_x_max) != null ? _e : org.xDomain[1]
48723
+ (_b = config.axis_x_min) != null ? _b : org.xDomain[0],
48724
+ (_c = config.axis_x_max) != null ? _c : org.xDomain[1]
48707
48725
  ].map((v) => $$.axis.isTimeSeries() ? parseDate.call($$, v) : Number(v));
48708
48726
  let tickInterval = axis.tickInterval(maxDataCount);
48709
- if (scale.zoom && !$$.axis.isCategorized() && k > 1) {
48727
+ const xScale = (_d = scale.zoom) != null ? _d : scale.x;
48728
+ const getSpan = ([min, max]) => Math.abs(+max - +min);
48729
+ const isZoomed = axis !== $$.axis.subX && !$$.axis.isCategorized() && getSpan(xScale.domain()) < getSpan(org.xDomain);
48730
+ if (isZoomed) {
48710
48731
  const isSameMinMax = xMinMax.every((v, i) => v === org.xDomain[i]);
48711
48732
  tickInterval = org.xDomain.map((v, i) => {
48712
48733
  const value = isSameMinMax ? v : v - Math.abs(xMinMax[i]);
48713
- return scale.zoom(value);
48734
+ return xScale(value);
48714
48735
  }).reduce((a, c) => Math.abs(a) + c) / maxDataCount;
48715
48736
  }
48716
48737
  const getWidth = (id) => {
@@ -50185,6 +50206,17 @@ const canvasInternal = {
50185
50206
  }
50186
50207
  callCallback && config.subchart_onbrush.bind($$.api)(scale.x.orgDomain());
50187
50208
  },
50209
+ /**
50210
+ * Show the focus and tooltip of the data the flow moved under the pointer.
50211
+ * @private
50212
+ */
50213
+ updateCanvasFlowFocus() {
50214
+ var _a;
50215
+ const $$ = this;
50216
+ const { state } = $$;
50217
+ state.canvasFocusKey = null;
50218
+ ((_a = $$.$el.tooltip) == null ? void 0 : _a.style("display")) === "block" && state.event && $$.onCanvasMouseMove(state.event);
50219
+ },
50188
50220
  /**
50189
50221
  * Finish a pending canvas flow animation before accepting another flow mutation.
50190
50222
  * @private
@@ -50206,7 +50238,7 @@ const canvasInternal = {
50206
50238
  * @private
50207
50239
  */
50208
50240
  animateCanvasFlow(flow) {
50209
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
50241
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
50210
50242
  const $$ = this;
50211
50243
  const { axis, data, org, scale, state } = $$;
50212
50244
  const { done = () => {
@@ -50219,6 +50251,7 @@ const canvasInternal = {
50219
50251
  const startDomain = scale.x.domain().slice(0, 2);
50220
50252
  const startOrgDomain = (_d = (_c = org.xDomain) == null ? void 0 : _c.slice) == null ? void 0 : _d.call(_c);
50221
50253
  const startSubXDomain = (_h = (_f = (_e = scale.subX) == null ? void 0 : _e.domain) == null ? void 0 : (_g = _f.call(_e)).slice) == null ? void 0 : _h.call(_g);
50254
+ const focusData = state.canvasFocusKey ? state.canvasFocusData : null;
50222
50255
  if (!isCanvasFlowDomain(startDomain, isLog)) {
50223
50256
  return false;
50224
50257
  }
@@ -50268,6 +50301,7 @@ const canvasInternal = {
50268
50301
  state.canvasFlowFrame = null;
50269
50302
  state.canvasFlowFinish = null;
50270
50303
  state.flowing = false;
50304
+ $$.updateCanvasFlowFocus();
50271
50305
  done.call($$.api);
50272
50306
  };
50273
50307
  const render = (timestamp) => {
@@ -50279,7 +50313,7 @@ const canvasInternal = {
50279
50313
  state._cachedDrawShape = null;
50280
50314
  state._canvasVisibleRangeCache = null;
50281
50315
  state._canvasXTickValuesCache = null;
50282
- $$.renderCanvasFrame(void 0, null, false);
50316
+ $$.renderCanvasFrame(void 0, focusData, false);
50283
50317
  if (ratio < 1) {
50284
50318
  state.canvasFlowFrame = requestFrame(render);
50285
50319
  } else {
@@ -50292,7 +50326,6 @@ const canvasInternal = {
50292
50326
  axis.x.scale(scale.x);
50293
50327
  state.flowing = true;
50294
50328
  state.cancelClick = true;
50295
- (_k = $$.hideTooltip) == null ? void 0 : _k.call($$);
50296
50329
  state.canvasFlowFinish = finish;
50297
50330
  state.canvasFlowFrame = requestFrame(render);
50298
50331
  return true;
@@ -51636,6 +51669,7 @@ const canvasInternal = {
51636
51669
  const $$ = this;
51637
51670
  const { state } = $$;
51638
51671
  const withMainRedraw = (_b = (_a = $$.canvasRenderer).hasExpandedShapeFocus) == null ? void 0 : _b.call(_a, $$, focusData);
51672
+ state.canvasFocusData = focusData;
51639
51673
  if (withMainRedraw) {
51640
51674
  const drawShape = state.canvasShape || $$.getDrawShape();
51641
51675
  $$.canvasEngine.beginFrame(state.current.width, $$.getCanvasSurfaceHeight());
@@ -51837,7 +51871,7 @@ function loadConfig(config) {
51837
51871
  * chart.flush(true);
51838
51872
  */
51839
51873
  flush(soft) {
51840
- var _a, _b;
51874
+ var _a, _b, _c, _d;
51841
51875
  const $$ = this.internal;
51842
51876
  const { state, $el: { zoomResetBtn } } = $$;
51843
51877
  if (state.rendered) {
@@ -51848,7 +51882,7 @@ function loadConfig(config) {
51848
51882
  }
51849
51883
  zoomResetBtn == null ? void 0 : zoomResetBtn.style("display", "none");
51850
51884
  if ($$.scale.zoom) {
51851
- state.current.zoomDomain = $$.scale.zoom.domain();
51885
+ state.current.zoomDomain = (_d = (_c = $$.zoom) == null ? void 0 : _c.getDomain()) != null ? _d : $$.scale.zoom.domain();
51852
51886
  }
51853
51887
  $$.scale.zoom = null;
51854
51888
  if (!state.resizing) {
@@ -53225,7 +53259,7 @@ let exportApi = () => {
53225
53259
  });
53226
53260
  }
53227
53261
  function _() {
53228
- var _a, _b, _c;
53262
+ var _a, _b, _c, _d, _e;
53229
53263
  let domain;
53230
53264
  let length = 0;
53231
53265
  let tail = 0;
@@ -53239,6 +53273,12 @@ let exportApi = () => {
53239
53273
  const orgDataCount = $$.getMaxDataCount();
53240
53274
  const targets = $$.convertDataToTargets(data, true);
53241
53275
  const isTimeSeries = $$.axis.isTimeSeries();
53276
+ const isCustomX = !isTimeSeries && $$.axis.isCustomX() && !$$.axis.isCategorized();
53277
+ const hasDataX = isTimeSeries || isCustomX;
53278
+ const firstValue = (_b = $$.data.targets.find((t) => t.values.length)) == null ? void 0 : _b.values[0];
53279
+ const xOffset = firstValue ? firstValue.x - firstValue.index : 0;
53280
+ const getX = (index) => isTimeSeries ? $$.getOtherTargetX(index) : index + xOffset;
53281
+ const flowedXs = [];
53242
53282
  $$.data.targets.forEach((t) => {
53243
53283
  let found = false;
53244
53284
  for (let i = 0; i < targets.length; i++) {
@@ -53251,9 +53291,10 @@ let exportApi = () => {
53251
53291
  length = values.length;
53252
53292
  for (let j = 0; j < length; j++) {
53253
53293
  values[j].index = tail + j;
53254
- if (!isTimeSeries) {
53255
- values[j].x = tail + j;
53294
+ if (!hasDataX) {
53295
+ values[j].x = getX(tail + j);
53256
53296
  }
53297
+ flowedXs[j] = values[j].x;
53257
53298
  t.values.push(values[j]);
53258
53299
  }
53259
53300
  targets.splice(i, 1);
@@ -53273,7 +53314,7 @@ let exportApi = () => {
53273
53314
  t.values.push({
53274
53315
  id: t.id,
53275
53316
  index: tail + j,
53276
- x: isTimeSeries ? $$.getOtherTargetX(tail + j) : tail + j,
53317
+ x: isCustomX ? flowedXs[j] : getX(tail + j),
53277
53318
  value: null
53278
53319
  });
53279
53320
  }
@@ -53282,6 +53323,7 @@ let exportApi = () => {
53282
53323
  });
53283
53324
  if ($$.data.targets.length) {
53284
53325
  targets.forEach((t) => {
53326
+ var _a2;
53285
53327
  const firstIndex = $$.data.targets[0].values[0].index;
53286
53328
  const values = t.values;
53287
53329
  const valueLength = values.length;
@@ -53296,7 +53338,7 @@ let exportApi = () => {
53296
53338
  values[i] = {
53297
53339
  id: t.id,
53298
53340
  index,
53299
- x: isTimeSeries ? $$.getOtherTargetX(index) : index,
53341
+ x: isCustomX ? (_a2 = $$.data.targets[0].values[i]) == null ? void 0 : _a2.x : getX(index),
53300
53342
  value: null
53301
53343
  };
53302
53344
  }
@@ -53304,8 +53346,8 @@ let exportApi = () => {
53304
53346
  for (let i = missingLength; i < values.length; i++) {
53305
53347
  const v = values[i];
53306
53348
  v.index += tail;
53307
- if (!isTimeSeries) {
53308
- v.x += tail;
53349
+ if (!hasDataX) {
53350
+ v.x = getX(v.index);
53309
53351
  }
53310
53352
  }
53311
53353
  });
@@ -53338,7 +53380,7 @@ let exportApi = () => {
53338
53380
  domain && $$.updateXDomain(null, true, true, false, domain);
53339
53381
  if ($$.state.isCanvasMode) {
53340
53382
  const duration = isValue(args.duration) ? args.duration : $$.config.transition_duration;
53341
- const animated = (_b = $$.animateCanvasFlow) == null ? void 0 : _b.call($$, {
53383
+ const animated = (_c = $$.animateCanvasFlow) == null ? void 0 : _c.call($$, {
53342
53384
  done: args.done,
53343
53385
  duration,
53344
53386
  length,
@@ -53363,7 +53405,8 @@ let exportApi = () => {
53363
53405
  withUpdateXDomain: true
53364
53406
  });
53365
53407
  $$.updateTypesElements();
53366
- (_c = args.done) == null ? void 0 : _c.call($$.api);
53408
+ (_d = $$.updateCanvasFlowFocus) == null ? void 0 : _d.call($$);
53409
+ (_e = args.done) == null ? void 0 : _e.call($$.api);
53367
53410
  return;
53368
53411
  }
53369
53412
  $$.updateTargets($$.data.targets);
@@ -53371,7 +53414,6 @@ let exportApi = () => {
53371
53414
  $$.state._eventRectFingerprint = null;
53372
53415
  $$.redraw({
53373
53416
  flow: {
53374
- index: baseValue.index,
53375
53417
  length,
53376
53418
  duration: isValue(args.duration) ? args.duration : $$.config.transition_duration,
53377
53419
  done: args.done,
@@ -53399,9 +53441,12 @@ let exportApi = () => {
53399
53441
  */
53400
53442
  generateFlow(args) {
53401
53443
  const $$ = this;
53402
- const { data, state, $el } = $$;
53444
+ const { config, data, state, $el } = $$;
53403
53445
  return function() {
53404
53446
  var _a;
53447
+ if (!$$.$el) {
53448
+ return;
53449
+ }
53405
53450
  const flowLength = args.flow.length;
53406
53451
  state.flowing = true;
53407
53452
  data.targets.forEach((d) => {
@@ -53432,7 +53477,15 @@ let exportApi = () => {
53432
53477
  elements[v] = node;
53433
53478
  }
53434
53479
  });
53435
- (_a = $$.hideGridFocus) == null ? void 0 : _a.call($$);
53480
+ if (config.axis_rotated) {
53481
+ (_a = $$.hideGridFocus) == null ? void 0 : _a.call($$);
53482
+ } else {
53483
+ const xFocus = $el.main.selectAll(
53484
+ `line.${config_classes.xgridFocus}:not(.${config_classes.xgridFocusContinuous})`
53485
+ );
53486
+ xFocus.size() && (elements["gridFocus.x"] = xFocus);
53487
+ $el.main.selectAll(`line.${config_classes.ygridFocus}`).style("visibility", "hidden");
53488
+ }
53436
53489
  $$.setFlowList(elements, args);
53437
53490
  };
53438
53491
  },
@@ -53447,11 +53500,9 @@ let exportApi = () => {
53447
53500
  const { flow, targets } = args;
53448
53501
  const {
53449
53502
  duration = args.duration,
53450
- index: flowIndex,
53451
- length: flowLength,
53452
53503
  orgDataCount
53453
53504
  } = flow;
53454
- const transform = $$.getFlowTransform(targets, orgDataCount, flowIndex, flowLength);
53505
+ const transform = $$.getFlowTransform(targets, orgDataCount);
53455
53506
  const wait = generateWait();
53456
53507
  let n;
53457
53508
  wait.add(Object.keys(elements).map((v) => {
@@ -53478,7 +53529,11 @@ let exportApi = () => {
53478
53529
  * @private
53479
53530
  */
53480
53531
  cleanUpFlow(elements, args) {
53532
+ var _a, _b;
53481
53533
  const $$ = this;
53534
+ if (!$$.$el) {
53535
+ return;
53536
+ }
53482
53537
  const { config, state, $el: { svg } } = $$;
53483
53538
  const isRotated = config.axis_rotated;
53484
53539
  const { flow, shape, xv } = args;
@@ -53489,12 +53544,18 @@ let exportApi = () => {
53489
53544
  length: flowLength
53490
53545
  } = flow;
53491
53546
  if (flowLength) {
53547
+ const isFocusCircle = $$.isPointFocusOnly() ? (node) => {
53548
+ var _a2;
53549
+ return (_a2 = node.parentElement) == null ? void 0 : _a2.classList.contains(config_classes.circles);
53550
+ } : () => false;
53492
53551
  ["circle", "text", "shape", "eventRect"].forEach((v) => {
53493
53552
  const target = [];
53494
53553
  for (let i = 0; i < flowLength; i++) {
53495
53554
  target.push(`.${config_classes[v]}-${i}`);
53496
53555
  }
53497
- svg.selectAll(`.${config_classes[`${v}s`]}`).selectAll(target).remove();
53556
+ svg.selectAll(`.${config_classes[`${v}s`]}`).selectAll(target).filter(function() {
53557
+ return !isFocusCircle(this);
53558
+ }).remove();
53498
53559
  });
53499
53560
  svg.select(`.${config_classes.xgrid}`).remove();
53500
53561
  }
@@ -53525,24 +53586,25 @@ let exportApi = () => {
53525
53586
  }
53526
53587
  });
53527
53588
  config.interaction_enabled && $$.redrawEventRect();
53528
- done.call($$.api);
53529
53589
  state.flowing = false;
53590
+ if (((_a = $$.$el.tooltip) == null ? void 0 : _a.style("display")) === "block") {
53591
+ $$.updateTooltipOnRedraw();
53592
+ } else {
53593
+ (_b = $$.hideGridFocus) == null ? void 0 : _b.call($$);
53594
+ }
53595
+ done.call($$.api);
53530
53596
  },
53531
53597
  /**
53532
53598
  * Get flow transform value
53533
53599
  * @param {object} targets target
53534
53600
  * @param {number} orgDataCount original data count
53535
- * @param {number} flowIndex flow index
53536
- * @param {number} flowLength flow length
53537
53601
  * @returns {string}
53538
53602
  * @private
53539
53603
  */
53540
- getFlowTransform(targets, orgDataCount, flowIndex, flowLength) {
53604
+ getFlowTransform(targets, orgDataCount) {
53541
53605
  const $$ = this;
53542
53606
  const { data, scale: { x } } = $$;
53543
53607
  const dataValues = data.targets[0].values;
53544
- let flowStart = $$.getValueOnIndex(dataValues, flowIndex);
53545
- let flowEnd = $$.getValueOnIndex(dataValues, flowIndex + flowLength);
53546
53608
  let translateX;
53547
53609
  const orgDomain = x.domain();
53548
53610
  const domain = $$.updateXDomain(targets, true, true);
@@ -53551,17 +53613,15 @@ let exportApi = () => {
53551
53613
  translateX = x(orgDomain[0]) - x(domain[0]);
53552
53614
  } else {
53553
53615
  if ($$.axis.isTimeSeries()) {
53554
- flowStart = $$.getValueOnIndex(dataValues, 0);
53555
- flowEnd = $$.getValueOnIndex(dataValues, dataValues.length - 1);
53616
+ const flowStart = $$.getValueOnIndex(dataValues, 0);
53617
+ const flowEnd = $$.getValueOnIndex(dataValues, dataValues.length - 1);
53556
53618
  translateX = x(flowStart.x) - x(flowEnd.x);
53557
53619
  } else {
53558
53620
  translateX = diffDomain(domain) / 2;
53559
53621
  }
53560
53622
  }
53561
- } else if (orgDataCount === 1 || (flowStart == null ? void 0 : flowStart.x) === (flowEnd == null ? void 0 : flowEnd.x)) {
53562
- translateX = x(orgDomain[0]) - x(domain[0]);
53563
53623
  } else {
53564
- translateX = $$.axis.isTimeSeries() ? x(orgDomain[0]) - x(domain[0]) : x((flowStart == null ? void 0 : flowStart.x) || 0) - x(flowEnd.x);
53624
+ translateX = x(orgDomain[0]) - x(domain[0]);
53565
53625
  }
53566
53626
  const scaleX = diffDomain(orgDomain) / diffDomain(domain);
53567
53627
  return `translate(${translateX},0) scale(${scaleX},1)`;
@@ -55385,6 +55445,10 @@ function dispatchSubchartEvent($$, type, event, context) {
55385
55445
  * - **NOTE:** for ESM imports, needs to import 'subchart' exports and instantiate it by calling `subchart()`.
55386
55446
  * - `show: subchart()`
55387
55447
  * @property {string} [subchart.type] Set chart type for the subchart. Defaults to data.type.
55448
+ * - **NOTE:** When candlestick data is rendered as another type in the subchart, the subchart takes one value of the data:
55449
+ * - `bar`: the `volume` of the data. Without `volume`, the close value for a rise and the open value for a fall, from zero.
55450
+ * - other types (`line`, `area`, etc.): the close value.
55451
+ * - The y axis domain of the subchart follows the taken values. The `volume` is not part of the main chart's y axis domain.
55388
55452
  * @property {object} [subchart.types] Set chart type for each data in the subchart. Defaults to data.types.
55389
55453
  * @property {boolean} [subchart.brush.enabled=true] Enable subchart brush interaction.
55390
55454
  * @property {boolean} [subchart.showHandle=false] Show sub chart's handle.
@@ -57519,7 +57583,7 @@ function getPointBBox(node) {
57519
57583
  });
57520
57584
  });
57521
57585
  },
57522
- updateCircle(isSub = false) {
57586
+ updateCircle(isSub = false, withFlow = false) {
57523
57587
  const $$ = this;
57524
57588
  const { config, state, $el } = $$;
57525
57589
  const focusOnly = $$.isPointFocusOnly();
@@ -57534,8 +57598,9 @@ function getPointBBox(node) {
57534
57598
  const pointR = $$.pointR.bind($$);
57535
57599
  const updateCircleColor = $$.generateUpdateCircleColor();
57536
57600
  const initialOpacityForCircle = $$.initialOpacityForCircle.bind($$);
57537
- circles.enter().filter(Boolean).append($$.point("create", this, pointR, updateCircleColor));
57538
- $root.circle = $root.main.selectAll(`.${$CIRCLE.circles} .${$CIRCLE.circle}`).style("stroke", $$.getStylePropValue($$.color)).style("opacity", initialOpacityForCircle);
57601
+ const entered = circles.enter().filter(Boolean).append($$.point("create", this, pointR, updateCircleColor));
57602
+ $root.circle = $root.main.selectAll(`.${$CIRCLE.circles} .${$CIRCLE.circle}`).style("stroke", $$.getStylePropValue($$.color));
57603
+ (focusOnly && withFlow ? entered : $root.circle).style("opacity", initialOpacityForCircle);
57539
57604
  }
57540
57605
  },
57541
57606
  /**
@@ -58426,7 +58491,7 @@ class AxisRendererHelper {
58426
58491
  transitionise(selection) {
58427
58492
  const { config } = this;
58428
58493
  let transitionSelection = selection;
58429
- if (config.withoutTransition) {
58494
+ if (config.withoutTransition && !config.transition) {
58430
58495
  transitionSelection = selection.interrupt();
58431
58496
  } else if (config.transition || !this.owner.params.noTransition) {
58432
58497
  try {
@@ -58774,26 +58839,28 @@ class AxisRenderer {
58774
58839
  if (!tickWidth || tickWidth <= 0) {
58775
58840
  tickWidth = isLeftRight ? 95 : params.isCategory ? (params.isInverted ? scale(ticks[0]) - scale(ticks[1]) : scale(ticks[1]) - scale(ticks[0])) - 12 : 110;
58776
58841
  }
58777
- function split(splitted2, text) {
58778
- let subtext;
58842
+ const text = String(tickText);
58843
+ const result = [];
58844
+ let start = 0;
58845
+ while (true) {
58779
58846
  let spaceIndex;
58780
- let textWidth;
58781
- for (let i = 1; i < text.length; i++) {
58782
- if (text.charAt(i) === " ") {
58847
+ let splitAt = -1;
58848
+ for (let i = 1; start + i < text.length; i++) {
58849
+ if (text.charAt(start + i) === " ") {
58783
58850
  spaceIndex = i;
58784
58851
  }
58785
- subtext = text.substr(0, i + 1);
58786
- textWidth = charWidth * subtext.length;
58787
- if (tickWidth < textWidth) {
58788
- return split(
58789
- splitted2.concat(text.substr(0, spaceIndex || i)),
58790
- text.slice(spaceIndex ? spaceIndex + 1 : i)
58791
- );
58852
+ if (tickWidth < charWidth * (i + 1)) {
58853
+ splitAt = i;
58854
+ break;
58792
58855
  }
58793
58856
  }
58794
- return splitted2.concat(text);
58857
+ if (splitAt === -1) {
58858
+ result.push(text.slice(start));
58859
+ return result;
58860
+ }
58861
+ result.push(text.substr(start, spaceIndex || splitAt));
58862
+ start += spaceIndex ? spaceIndex + 1 : splitAt;
58795
58863
  }
58796
- return split(splitted, String(tickText));
58797
58864
  }
58798
58865
  scale(x) {
58799
58866
  if (!arguments.length) {
@@ -67728,7 +67795,7 @@ const bb = {
67728
67795
  * bb.version; // "1.0.0"
67729
67796
  * @memberof bb
67730
67797
  */
67731
- version: "4.1.4",
67798
+ version: "4.1.5",
67732
67799
  /**
67733
67800
  * Generate chart
67734
67801
  * - **NOTE:** Bear in mind for the possibility of ***throwing an error***, during the generation when: