billboard.js 4.0.0-next.3 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (228) hide show
  1. package/dist/billboard.css +1 -1
  2. package/dist/billboard.js +240 -149
  3. package/dist/billboard.min.css +1 -1
  4. package/dist/billboard.min.js +20 -20
  5. package/dist/billboard.pkgd.js +240 -149
  6. package/dist/billboard.pkgd.min.js +27 -27
  7. package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  9. package/dist/plugin/billboardjs-plugin-sparkline.js +11 -13
  10. package/dist/plugin/billboardjs-plugin-sparkline.min.js +3 -3
  11. package/dist/plugin/billboardjs-plugin-stanford.js +11 -13
  12. package/dist/plugin/billboardjs-plugin-stanford.min.js +4 -4
  13. package/dist/plugin/billboardjs-plugin-tableview.js +28 -15
  14. package/dist/plugin/billboardjs-plugin-tableview.min.js +4 -4
  15. package/dist/plugin/billboardjs-plugin-textoverlap.js +2 -2
  16. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  17. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +2 -2
  18. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +2 -2
  19. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +11 -13
  20. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +9 -9
  21. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +11 -13
  22. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +3 -3
  23. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +28 -15
  24. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +6 -6
  25. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +2 -2
  26. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +2 -2
  27. package/dist/theme/dark.css +1 -1
  28. package/dist/theme/dark.min.css +1 -1
  29. package/dist/theme/datalab.css +1 -1
  30. package/dist/theme/datalab.min.css +1 -1
  31. package/dist/theme/graph.css +1 -1
  32. package/dist/theme/graph.min.css +1 -1
  33. package/dist/theme/insight.css +1 -1
  34. package/dist/theme/insight.min.css +1 -1
  35. package/dist/theme/modern.css +1 -1
  36. package/dist/theme/modern.min.css +1 -1
  37. package/dist-esm/Chart/Chart.js +1 -1
  38. package/dist-esm/Chart/api/axis.js +1 -1
  39. package/dist-esm/Chart/api/category.js +1 -1
  40. package/dist-esm/Chart/api/chart.js +1 -1
  41. package/dist-esm/Chart/api/color.js +1 -1
  42. package/dist-esm/Chart/api/data.js +1 -1
  43. package/dist-esm/Chart/api/export.js +1 -1
  44. package/dist-esm/Chart/api/flow.js +1 -1
  45. package/dist-esm/Chart/api/focus.js +1 -1
  46. package/dist-esm/Chart/api/grid.js +1 -1
  47. package/dist-esm/Chart/api/group.js +1 -1
  48. package/dist-esm/Chart/api/legend.js +1 -1
  49. package/dist-esm/Chart/api/load.js +1 -1
  50. package/dist-esm/Chart/api/regions.js +1 -1
  51. package/dist-esm/Chart/api/selection.js +1 -1
  52. package/dist-esm/Chart/api/show.js +1 -1
  53. package/dist-esm/Chart/api/stubs.js +53 -0
  54. package/dist-esm/Chart/api/subchart.js +2 -2
  55. package/dist-esm/Chart/api/tooltip.js +1 -1
  56. package/dist-esm/Chart/api/x.js +1 -1
  57. package/dist-esm/Chart/api/zoom.js +2 -2
  58. package/dist-esm/ChartInternal/Axis/Axis.js +1 -1
  59. package/dist-esm/ChartInternal/Axis/AxisRenderer.js +149 -96
  60. package/dist-esm/ChartInternal/Axis/AxisRendererHelper.js +1 -1
  61. package/dist-esm/ChartInternal/ChartInternal.js +8 -4
  62. package/dist-esm/ChartInternal/data/convert.helper.js +1 -1
  63. package/dist-esm/ChartInternal/data/convert.js +1 -1
  64. package/dist-esm/ChartInternal/data/data.js +1 -1
  65. package/dist-esm/ChartInternal/data/load.js +1 -1
  66. package/dist-esm/ChartInternal/interactions/drag.js +1 -1
  67. package/dist-esm/ChartInternal/interactions/eventrect.js +2 -2
  68. package/dist-esm/ChartInternal/interactions/flow.js +1 -1
  69. package/dist-esm/ChartInternal/interactions/interaction.js +1 -1
  70. package/dist-esm/ChartInternal/interactions/subchart.js +1 -1
  71. package/dist-esm/ChartInternal/interactions/zoom.js +1 -1
  72. package/dist-esm/ChartInternal/internals/category.js +1 -1
  73. package/dist-esm/ChartInternal/internals/class.js +1 -1
  74. package/dist-esm/ChartInternal/internals/clip.js +1 -1
  75. package/dist-esm/ChartInternal/internals/color.js +1 -1
  76. package/dist-esm/ChartInternal/internals/domain.js +1 -1
  77. package/dist-esm/ChartInternal/internals/format.js +1 -1
  78. package/dist-esm/ChartInternal/internals/grid.js +1 -1
  79. package/dist-esm/ChartInternal/internals/legend.js +1 -1
  80. package/dist-esm/ChartInternal/internals/redraw.js +1 -1
  81. package/dist-esm/ChartInternal/internals/region.js +1 -1
  82. package/dist-esm/ChartInternal/internals/scale.js +1 -1
  83. package/dist-esm/ChartInternal/internals/selection.js +1 -1
  84. package/dist-esm/ChartInternal/internals/size.axis.js +1 -1
  85. package/dist-esm/ChartInternal/internals/size.js +1 -1
  86. package/dist-esm/ChartInternal/internals/style.js +1 -1
  87. package/dist-esm/ChartInternal/internals/text.arc.js +1 -1
  88. package/dist-esm/ChartInternal/internals/text.js +1 -1
  89. package/dist-esm/ChartInternal/internals/text.util.js +1 -1
  90. package/dist-esm/ChartInternal/internals/title.js +1 -1
  91. package/dist-esm/ChartInternal/internals/tooltip.js +1 -1
  92. package/dist-esm/ChartInternal/internals/transform.js +1 -1
  93. package/dist-esm/ChartInternal/internals/type.js +1 -1
  94. package/dist-esm/ChartInternal/shape/arc.js +1 -1
  95. package/dist-esm/ChartInternal/shape/area.js +1 -1
  96. package/dist-esm/ChartInternal/shape/bar.js +1 -1
  97. package/dist-esm/ChartInternal/shape/bubble.js +1 -1
  98. package/dist-esm/ChartInternal/shape/candlestick.js +1 -1
  99. package/dist-esm/ChartInternal/shape/core/barRadius.js +1 -1
  100. package/dist-esm/ChartInternal/shape/core/bubble.js +1 -1
  101. package/dist-esm/ChartInternal/shape/core/candlestick.js +1 -1
  102. package/dist-esm/ChartInternal/shape/core/dataRegion.js +1 -1
  103. package/dist-esm/ChartInternal/shape/core/geometry.js +1 -1
  104. package/dist-esm/ChartInternal/shape/core/path.js +1 -1
  105. package/dist-esm/ChartInternal/shape/core/point.js +1 -1
  106. package/dist-esm/ChartInternal/shape/core/treemap.js +1 -1
  107. package/dist-esm/ChartInternal/shape/funnel.js +1 -1
  108. package/dist-esm/ChartInternal/shape/gauge.js +1 -1
  109. package/dist-esm/ChartInternal/shape/line.js +1 -1
  110. package/dist-esm/ChartInternal/shape/point.js +1 -1
  111. package/dist-esm/ChartInternal/shape/polar.js +1 -1
  112. package/dist-esm/ChartInternal/shape/radar.js +1 -1
  113. package/dist-esm/ChartInternal/shape/shape.js +6 -4
  114. package/dist-esm/ChartInternal/shape/treemap.js +1 -1
  115. package/dist-esm/canvas/CanvasAxisRenderer.js +1 -1
  116. package/dist-esm/canvas/CanvasEngine.js +18 -5
  117. package/dist-esm/canvas/CanvasPainter.js +1 -1
  118. package/dist-esm/canvas/CanvasRenderer.js +58 -35
  119. package/dist-esm/canvas/CanvasTheme.js +1 -1
  120. package/dist-esm/canvas/HitDetector.js +1 -1
  121. package/dist-esm/canvas/axisTicks.js +1 -1
  122. package/dist-esm/canvas/classes.js +1 -1
  123. package/dist-esm/canvas/color.js +1 -1
  124. package/dist-esm/canvas/geometry.js +1 -1
  125. package/dist-esm/canvas/labels.js +1 -1
  126. package/dist-esm/canvas/pointPattern.js +1 -1
  127. package/dist-esm/canvas/util.js +1 -1
  128. package/dist-esm/config/Options/Options.js +1 -1
  129. package/dist-esm/config/Options/axis/axis.js +1 -1
  130. package/dist-esm/config/Options/axis/x.js +1 -1
  131. package/dist-esm/config/Options/axis/y.js +1 -1
  132. package/dist-esm/config/Options/axis/y2.js +1 -13
  133. package/dist-esm/config/Options/common/boost.js +1 -1
  134. package/dist-esm/config/Options/common/color.js +1 -1
  135. package/dist-esm/config/Options/common/grid.js +1 -1
  136. package/dist-esm/config/Options/common/legend.js +1 -1
  137. package/dist-esm/config/Options/common/main.js +1 -1
  138. package/dist-esm/config/Options/common/point.js +1 -1
  139. package/dist-esm/config/Options/common/title.js +1 -1
  140. package/dist-esm/config/Options/common/tooltip.js +1 -1
  141. package/dist-esm/config/Options/data/axis.js +1 -1
  142. package/dist-esm/config/Options/data/data.js +1 -1
  143. package/dist-esm/config/Options/data/selection.js +1 -1
  144. package/dist-esm/config/Options/interaction/interaction.js +1 -1
  145. package/dist-esm/config/Options/interaction/subchart.js +1 -1
  146. package/dist-esm/config/Options/interaction/zoom.js +1 -1
  147. package/dist-esm/config/Options/shape/arc.js +1 -1
  148. package/dist-esm/config/Options/shape/area.js +1 -1
  149. package/dist-esm/config/Options/shape/bar.js +1 -1
  150. package/dist-esm/config/Options/shape/bubble.js +1 -1
  151. package/dist-esm/config/Options/shape/candlestick.js +1 -1
  152. package/dist-esm/config/Options/shape/donut.js +1 -1
  153. package/dist-esm/config/Options/shape/funnel.js +1 -1
  154. package/dist-esm/config/Options/shape/gauge.js +1 -1
  155. package/dist-esm/config/Options/shape/line.js +1 -1
  156. package/dist-esm/config/Options/shape/pie.js +1 -1
  157. package/dist-esm/config/Options/shape/polar.js +1 -1
  158. package/dist-esm/config/Options/shape/radar.js +1 -1
  159. package/dist-esm/config/Options/shape/scatter.js +1 -1
  160. package/dist-esm/config/Options/shape/spline.js +1 -1
  161. package/dist-esm/config/Options/shape/treemap.js +1 -1
  162. package/dist-esm/config/Store/Element.js +1 -1
  163. package/dist-esm/config/Store/State.js +1 -1
  164. package/dist-esm/config/Store/Store.js +1 -1
  165. package/dist-esm/config/classes.js +1 -1
  166. package/dist-esm/config/config.js +1 -1
  167. package/dist-esm/config/const.js +17 -2
  168. package/dist-esm/config/resolver/axis.core.js +1 -1
  169. package/dist-esm/config/resolver/axis.js +1 -1
  170. package/dist-esm/config/resolver/canvas.js +1 -1
  171. package/dist-esm/config/resolver/canvasShape.js +1 -1
  172. package/dist-esm/config/resolver/category.js +1 -1
  173. package/dist-esm/config/resolver/export.js +1 -1
  174. package/dist-esm/config/resolver/flow.js +1 -1
  175. package/dist-esm/config/resolver/grid.js +1 -1
  176. package/dist-esm/config/resolver/interaction/selection.js +1 -1
  177. package/dist-esm/config/resolver/interaction/subchart.js +1 -1
  178. package/dist-esm/config/resolver/interaction/zoom.js +1 -1
  179. package/dist-esm/config/resolver/regions.js +1 -1
  180. package/dist-esm/config/resolver/shape/arc.helpers.js +1 -1
  181. package/dist-esm/config/resolver/shape/area.js +1 -1
  182. package/dist-esm/config/resolver/shape/axis.helpers.js +1 -1
  183. package/dist-esm/config/resolver/shape/bar.js +1 -1
  184. package/dist-esm/config/resolver/shape/bubble.js +1 -1
  185. package/dist-esm/config/resolver/shape/candlestick.js +1 -1
  186. package/dist-esm/config/resolver/shape/donut.js +1 -1
  187. package/dist-esm/config/resolver/shape/funnel.js +1 -1
  188. package/dist-esm/config/resolver/shape/gauge.js +1 -1
  189. package/dist-esm/config/resolver/shape/line.js +1 -1
  190. package/dist-esm/config/resolver/shape/pie.js +1 -1
  191. package/dist-esm/config/resolver/shape/polar.js +1 -1
  192. package/dist-esm/config/resolver/shape/radar.js +1 -1
  193. package/dist-esm/config/resolver/shape/scatter.js +1 -1
  194. package/dist-esm/config/resolver/shape/treemap.js +1 -1
  195. package/dist-esm/core.js +3 -3
  196. package/dist-esm/index.canvas.js +2 -1
  197. package/dist-esm/index.esm.js +2 -1
  198. package/dist-esm/module/Cache.js +1 -1
  199. package/dist-esm/module/browser.js +1 -1
  200. package/dist-esm/module/dsv.js +1 -1
  201. package/dist-esm/module/error.js +16 -3
  202. package/dist-esm/module/generator.js +1 -1
  203. package/dist-esm/module/sanitize.js +14 -18
  204. package/dist-esm/module/util/brush.js +1 -1
  205. package/dist-esm/module/util/dom.js +1 -1
  206. package/dist-esm/module/util/object.js +7 -4
  207. package/dist-esm/module/util/type-checks.js +1 -1
  208. package/dist-esm/module/worker.js +32 -22
  209. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  210. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -2
  211. package/dist-esm/plugin/billboardjs-plugin-stanford.js +2 -2
  212. package/dist-esm/plugin/billboardjs-plugin-tableview.js +32 -21
  213. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
  214. package/package.json +37 -11
  215. package/src/ChartInternal/Axis/AxisRenderer.ts +179 -105
  216. package/src/ChartInternal/ChartInternal.ts +11 -3
  217. package/src/ChartInternal/interactions/eventrect.ts +3 -1
  218. package/src/ChartInternal/shape/shape.ts +5 -3
  219. package/src/Plugin/tableview/Options.ts +17 -1
  220. package/src/Plugin/tableview/index.ts +1 -1
  221. package/src/canvas/CanvasEngine.ts +18 -5
  222. package/src/canvas/CanvasRenderer.ts +71 -36
  223. package/src/config/Options/axis/y2.ts +0 -13
  224. package/src/module/sanitize.ts +13 -20
  225. package/src/module/util/object.ts +4 -2
  226. package/src/module/worker.ts +34 -24
  227. package/types/index.d.ts +0 -3
  228. package/types/plugin/tableview/options.d.ts +5 -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.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { TYPE_BY_CATEGORY, TYPE } from '../../config/const.js';
11
11
  import { isNumber, isArray, isString } from '../../module/util/type-checks.js';
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { interpolate } from 'd3-interpolate';
11
11
  import { select } from 'd3-selection';
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { select } from 'd3-selection';
11
11
  import { $AREA, $CIRCLE, $LINE } from '../../config/classes.js';
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { select } from 'd3-selection';
11
11
  import { $BAR, $COMMON } from '../../config/classes.js';
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import shapeBubbleCommon from './core/bubble.js';
11
11
 
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { select } from 'd3-selection';
11
11
  import { $CANDLESTICK } from '../../config/classes.js';
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { isNumber } from '../../../module/util/type-checks.js';
11
11
 
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { KEY } from '../../../module/Cache.js';
11
11
  import { isObject, isFunction, isNumber } from '../../../module/util/type-checks.js';
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { isArray, isObject, isNumber } from '../../../module/util/type-checks.js';
11
11
 
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { isValue, isUndefined } from '../../../module/util/type-checks.js';
11
11
  import { parseDate } from '../../../module/util/object.js';
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  /**
11
11
  * Copyright (c) 2017 ~ present NAVER Corp.
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { area, line } from 'd3-shape';
11
11
 
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { select, namespaces } from 'd3-selection';
11
11
  import { document as doc } from '../../../module/browser.js';
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { hierarchy, treemap, treemapResquarify, treemapSquarify, treemapSliceDice, treemapSlice, treemapDice, treemapBinary } from 'd3-hierarchy';
11
11
 
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { select } from 'd3-selection';
11
11
  import { line, curveLinear } from 'd3-shape';
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { select } from 'd3-selection';
11
11
  import { $ARC, $COMMON, $GAUGE } from '../../config/classes.js';
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { $LINE } from '../../config/classes.js';
11
11
  import { getScale } from '../internals/scale.js';
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { select } from 'd3-selection';
11
11
  import { $COMMON, $SELECT, $CIRCLE } from '../../config/classes.js';
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { $LEVEL } from '../../config/classes.js';
11
11
  import { getRange } from '../../module/util/object.js';
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { select } from 'd3-selection';
11
11
  import { $AXIS, $LEVEL, $TEXT, $COMMON, $RADAR, $SHAPE } from '../../config/classes.js';
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { select } from 'd3-selection';
11
11
  import { curveStepBefore, curveStepAfter, curveStep, curveLinear, curveLinearClosed, curveNatural, curveMonotoneY, curveMonotoneX, curveCatmullRomOpen, curveCatmullRomClosed, curveCatmullRom, curveCardinalOpen, curveCardinalClosed, curveCardinal, curveBundle, curveBasisOpen, curveBasisClosed, curveBasis } from 'd3-shape';
@@ -389,12 +389,14 @@ var shape = {
389
389
  getShapeOffsetData(typeFilter) {
390
390
  const $$ = this;
391
391
  const targets = $$.orderTargets($$.filterTargetsToShow($$.data.targets.filter(typeFilter, $$)));
392
- // Create cache key based on target IDs
392
+ // Same IDs can receive new values through load()/flow(), so ID-only
393
+ // caching can leave stacked offsets pointing at stale row maps.
394
+ const dataGeneration = $$.state.dataGeneration;
393
395
  const targetIds = targets.map(t => t.id).join("_");
394
396
  const cacheKey = `${KEY.shapeOffset}_${targetIds}`;
395
397
  // Check if result is already cached
396
398
  const cachedData = $$.cache.get(cacheKey);
397
- if (cachedData) {
399
+ if (cachedData?.generation === dataGeneration) {
398
400
  return cachedData;
399
401
  }
400
402
  const isStackNormalized = $$.isStackNormalized();
@@ -422,7 +424,7 @@ var shape = {
422
424
  out[id] = index;
423
425
  return out;
424
426
  }, {});
425
- const result = { indexMapByTargetId, shapeOffsetTargets };
427
+ const result = { generation: dataGeneration, indexMapByTargetId, shapeOffsetTargets };
426
428
  // Cache the result
427
429
  $$.cache.add(cacheKey, result);
428
430
  return result;
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { select } from 'd3-selection';
11
11
  import { $COMMON, $TREEMAP } from '../../config/classes.js';
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { AXIS_TICK_SIZE, AXIS_TICK_PADDING } from '../config/const.js';
11
11
  import { getSubXTickValues, normalizeXValue, getXTickValues, getYGridTickValues, normalizeYValue, getAdditionalAxisScale, getAdditionalAxisTickFormat, getAdditionalAxisTickValues, getXScale, getXTickLineValues, getXTickLinePosition, isSameTickValue, getYTickValues } from './axisTicks.js';
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { document as doc, window as win } from '../module/browser.js';
11
11
  import { $CANVAS } from './classes.js';
@@ -24,6 +24,7 @@ class CanvasEngine {
24
24
  dpr = 1;
25
25
  frame = null;
26
26
  frameCtx = null;
27
+ frameValid = false;
27
28
  /**
28
29
  * Create and attach the canvas element.
29
30
  * @param {HTMLElement} container Chart container
@@ -58,13 +59,14 @@ class CanvasEngine {
58
59
  this.ctx.setTransform(this.dpr, 0, 0, this.dpr, 0, 0);
59
60
  this.frame = null;
60
61
  this.frameCtx = null;
62
+ this.frameValid = false;
61
63
  }
62
64
  /**
63
65
  * Clear transient overlay drawings by restoring the captured frame.
64
66
  * @private
65
67
  */
66
68
  clearOverlay() {
67
- this.restoreFrame();
69
+ this.frameValid && this.restoreFrame();
68
70
  }
69
71
  /**
70
72
  * Draw transient overlay content on the single visible canvas.
@@ -73,7 +75,15 @@ class CanvasEngine {
73
75
  */
74
76
  withOverlay(draw) {
75
77
  const { ctx } = this;
76
- this.clearOverlay();
78
+ const hasFrame = this.frameValid;
79
+ if (hasFrame) {
80
+ this.clearOverlay();
81
+ }
82
+ else {
83
+ // Copy the clean frame only when an overlay is actually requested.
84
+ // Large filled charts make eager full-canvas copies expensive.
85
+ this.captureFrame();
86
+ }
77
87
  ctx.save();
78
88
  ctx.setTransform(this.dpr, 0, 0, this.dpr, 0, 0);
79
89
  try {
@@ -91,6 +101,7 @@ class CanvasEngine {
91
101
  */
92
102
  beginFrame(w, h) {
93
103
  const { ctx } = this;
104
+ this.frameValid = false;
94
105
  ctx.save();
95
106
  ctx.setTransform(this.dpr, 0, 0, this.dpr, 0, 0);
96
107
  ctx.clearRect(0, 0, w, h);
@@ -101,7 +112,6 @@ class CanvasEngine {
101
112
  */
102
113
  endFrame() {
103
114
  this.ctx.restore();
104
- this.captureFrame();
105
115
  }
106
116
  /**
107
117
  * Capture the rendered frame for focus overlay restoration.
@@ -109,6 +119,7 @@ class CanvasEngine {
109
119
  */
110
120
  captureFrame() {
111
121
  const { canvas } = this;
122
+ this.frameValid = false;
112
123
  if (canvas.width && canvas.height) {
113
124
  let { frame, frameCtx } = this;
114
125
  if (!frame) {
@@ -132,6 +143,7 @@ class CanvasEngine {
132
143
  frameCtx.clearRect(0, 0, canvas.width, canvas.height);
133
144
  }
134
145
  frameCtx.drawImage(canvas, 0, 0);
146
+ this.frameValid = true;
135
147
  }
136
148
  }
137
149
  /**
@@ -139,7 +151,7 @@ class CanvasEngine {
139
151
  * @private
140
152
  */
141
153
  restoreFrame() {
142
- if (!this.frame || !this.frameCtx) {
154
+ if (!this.frameValid || !this.frame || !this.frameCtx) {
143
155
  return;
144
156
  }
145
157
  const { canvas, ctx } = this;
@@ -158,6 +170,7 @@ class CanvasEngine {
158
170
  this.canvas?.remove();
159
171
  this.frame = null;
160
172
  this.frameCtx = null;
173
+ this.frameValid = false;
161
174
  }
162
175
  }
163
176
 
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { getFontSize } from './util.js';
11
11
 
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { getStackingBarRadiusSet, getBarRadiusInfo, getBarRadiusResolver } from '../ChartInternal/shape/core/barRadius.js';
11
11
  import { getLineRegionSegments } from '../ChartInternal/shape/core/dataRegion.js';
@@ -126,6 +126,20 @@ function drawCanvasArea($$, target, indices, painter, isSub = false) {
126
126
  generateDrawAreaPath($$, indices, isSub, ctx)(target);
127
127
  });
128
128
  }
129
+ /**
130
+ * Get a target copy clipped to the current visible x range.
131
+ * @param {object} $$ ChartInternal instance
132
+ * @param {object} target Data target
133
+ * @returns {object} Original target or a visible values copy
134
+ * @private
135
+ */
136
+ function getVisibleCanvasTarget($$, target) {
137
+ const range = getCanvasTargetVisibleRange($$, target);
138
+ return range.start === 0 && range.end === target.values.length ? target : {
139
+ ...target,
140
+ values: target.values.slice(range.start, range.end)
141
+ };
142
+ }
129
143
  /**
130
144
  * Get focused row for a datum or target.
131
145
  * @param {Array} focusData Focused data rows
@@ -1270,8 +1284,7 @@ class CanvasRenderer {
1270
1284
  hasExpandedShapeFocus($$, selectedData) {
1271
1285
  return !!selectedData?.some(d => d &&
1272
1286
  (isCanvasBarType($$, d) ||
1273
- isCanvasCandlestickType($$, d) ||
1274
- (isCanvasPointType($$, d) && getPointOpacity($$, d) < 1)));
1287
+ isCanvasCandlestickType($$, d)));
1275
1288
  }
1276
1289
  /**
1277
1290
  * Draw line strokes on canvas.
@@ -1292,7 +1305,8 @@ class CanvasRenderer {
1292
1305
  }
1293
1306
  painter.withTranslation(margin.left, margin.top, () => {
1294
1307
  for (const target of targets) {
1295
- if (!target.values.some(hasCanvasDrawableValue.bind(null, $$))) {
1308
+ const visibleTarget = getVisibleCanvasTarget($$, target);
1309
+ if (!visibleTarget.values.some(hasCanvasDrawableValue.bind(null, $$))) {
1296
1310
  continue;
1297
1311
  }
1298
1312
  ctx.globalAlpha = getCanvasTargetFocusOpacity($$, target);
@@ -1300,9 +1314,9 @@ class CanvasRenderer {
1300
1314
  style.shape.lineFocusedWidth :
1301
1315
  style.shape.lineWidth;
1302
1316
  ctx.strokeStyle = $$.color(target.id);
1303
- $$.config.data_regions?.[target.id] ?
1304
- drawCanvasLineWithDataRegions($$, target, painter) :
1305
- drawCanvasLine($$, target, indices, painter);
1317
+ $$.config.data_regions?.[visibleTarget.id] ?
1318
+ drawCanvasLineWithDataRegions($$, visibleTarget, painter) :
1319
+ drawCanvasLine($$, visibleTarget, indices, painter);
1306
1320
  }
1307
1321
  ctx.globalAlpha = 1;
1308
1322
  });
@@ -1327,15 +1341,17 @@ class CanvasRenderer {
1327
1341
  }
1328
1342
  painter.withTranslation(margin.left, margin.top, () => {
1329
1343
  for (const target of targets) {
1330
- if (!target.values.some(hasCanvasDrawableValue.bind(null, $$))) {
1344
+ const visibleTarget = getVisibleCanvasTarget($$, target);
1345
+ if (!visibleTarget.values.some(hasCanvasDrawableValue.bind(null, $$))) {
1331
1346
  continue;
1332
1347
  }
1333
- const color = getCanvasRenderColor($$, target, focusData);
1348
+ const color = getCanvasRenderColor($$, visibleTarget, focusData);
1334
1349
  ctx.globalAlpha = style.shape.areaOpacity * getCanvasTargetFocusOpacity($$, target);
1335
- ctx.fillStyle = getCanvasLinearGradientFill($$, ctx, target, "area",
1336
- // bounds computation is a full O(n) pass: skip when no gradient is set
1350
+ ctx.fillStyle = getCanvasLinearGradientFill($$, ctx, visibleTarget, "area",
1351
+ // Bounds computation walks visible rows, so skip it when no gradient is set.
1352
+ // Use the original target so the range cache stays aligned with unsliced values.
1337
1353
  $$.config.area_linearGradient ? getCanvasAreaBounds($$, target, indices) : null, color);
1338
- drawCanvasArea($$, target, indices, painter);
1354
+ drawCanvasArea($$, visibleTarget, indices, painter);
1339
1355
  }
1340
1356
  ctx.globalAlpha = 1;
1341
1357
  });
@@ -1594,7 +1610,6 @@ class CanvasRenderer {
1594
1610
  isCanvasAreaType($$, target) ||
1595
1611
  isCanvasCandlestickType($$, target)) &&
1596
1612
  isCanvasRenderableTarget($$, target));
1597
- // single filtering pass: keep target-local index `i`, it drives geometry lookup
1598
1613
  const targetRows = [];
1599
1614
  let labelCount = 0;
1600
1615
  targets.forEach(target => {
@@ -1608,7 +1623,7 @@ class CanvasRenderer {
1608
1623
  d.index >= range.start &&
1609
1624
  d.index < range.end &&
1610
1625
  hasCanvasDrawableValue($$, d)) {
1611
- rows.push({ d, i, text });
1626
+ rows.push({ d, text });
1612
1627
  }
1613
1628
  }
1614
1629
  labelCount += rows.length;
@@ -1622,11 +1637,11 @@ class CanvasRenderer {
1622
1637
  ctx.textAlign = "center";
1623
1638
  targetRows
1624
1639
  .forEach(rows => {
1625
- for (const { d, i, text } of rows) {
1640
+ for (const { d, text } of rows) {
1626
1641
  let x;
1627
1642
  let y;
1628
1643
  if (isCanvasBarType($$, d) && barPoints) {
1629
- const geometry = getCanvasBarGeometry($$, barPoints, d, i);
1644
+ const geometry = getCanvasBarGeometry($$, barPoints, d, d.index);
1630
1645
  if (!geometry) {
1631
1646
  continue;
1632
1647
  }
@@ -1651,27 +1666,28 @@ class CanvasRenderer {
1651
1666
  }
1652
1667
  else if (isCanvasCandlestickType($$, d) && candlestickPoints) {
1653
1668
  const value = $$.getCandlestickData?.(d);
1654
- const geometry = getCanvasCandlestickGeometry($$, candlestickPoints, d, i);
1669
+ const geometry = getCanvasCandlestickGeometry($$, candlestickPoints, d, d.index);
1655
1670
  const isUp = value?._isUp;
1656
1671
  if (!geometry) {
1657
1672
  continue;
1658
1673
  }
1659
- const { body } = geometry;
1674
+ const { wickEnd, wickStart } = geometry;
1675
+ const isInverted = $$.config[`axis_${$$.axis?.getId(d.id)}_inverted`];
1660
1676
  x = $$.config.axis_rotated ?
1661
- (isUp ? body.x + body.w + 4 : body.x - 4) :
1662
- body.x + body.w / 2;
1677
+ (isUp ? wickEnd[0] + 4 : wickStart[0] - 4) :
1678
+ wickStart[0];
1663
1679
  y = $$.config.axis_rotated ?
1664
- body.y + body.h / 2 :
1665
- (isUp ? body.y - 4 : body.y + body.h + 13);
1680
+ wickStart[1] + 3 :
1681
+ (isUp ? wickEnd[1] - 3 : wickStart[1] + 12);
1682
+ !$$.config.axis_rotated && isInverted &&
1683
+ (y += 15 * (isUp ? 1 : -1));
1666
1684
  ctx.textAlign = $$.config.axis_rotated ?
1667
1685
  (isUp ? "left" : "right") :
1668
1686
  "center";
1669
- ctx.textBaseline = $$.config.axis_rotated ?
1670
- "middle" :
1671
- (isUp ? "bottom" : "top");
1687
+ ctx.textBaseline = "alphabetic";
1672
1688
  }
1673
1689
  else if (cx && cy) {
1674
- ({ x, y } = getShapePoint(shape.pos, d, i));
1690
+ ({ x, y } = getShapePoint(shape.pos, d, d.index));
1675
1691
  ({ x, y } = getPointLabelAnchor($$, ctx, d, x, y));
1676
1692
  }
1677
1693
  x += getLabelPosition($$, d, "x", texts);
@@ -1889,18 +1905,25 @@ class CanvasRenderer {
1889
1905
  const r = $$.pointExpandedR?.(d) ?? (baseR * 1.75);
1890
1906
  const overColor = getCanvasOverColor($$, d);
1891
1907
  const color = overColor || $$.color(d.id);
1908
+ const fill = overColor ||
1909
+ style.focusPoint.fill ||
1910
+ style.shape.pointFillColor ||
1911
+ color;
1912
+ const stroke = overColor || style.focusPoint.stroke || color;
1913
+ const lineWidth = style.focusPoint.lineWidth;
1914
+ const alpha = getPointOpacity($$, d);
1915
+ const hasStroke = !!stroke && (lineWidth ?? 0) > 0;
1916
+ const mergeSameColorStroke = pointType === "circle" &&
1917
+ hasStroke &&
1918
+ isNumber(alpha) &&
1919
+ alpha < 1 &&
1920
+ fill === stroke;
1892
1921
  if (!isFiniteCanvasCoordinate(x, y)) {
1893
1922
  return;
1894
1923
  }
1895
- drawPointPattern(painter, pointType, x, y, r, {
1896
- fill: overColor ||
1897
- style.focusPoint.fill ||
1898
- style.shape.pointFillColor ||
1899
- color,
1900
- lineWidth: style.focusPoint.lineWidth,
1901
- stroke: overColor || style.focusPoint.stroke || color,
1902
- alpha: getPointOpacity($$, d)
1903
- }, baseR);
1924
+ drawPointPattern(painter, pointType, x, y, mergeSameColorStroke ? r + (lineWidth || 0) / 2 : r, hasStroke && !mergeSameColorStroke ?
1925
+ { fill, lineWidth, stroke, alpha } :
1926
+ { fill, alpha }, baseR);
1904
1927
  });
1905
1928
  }
1906
1929
  this.drawFocusLabels($$, selectedData);
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { document as doc, window as win } from '../module/browser.js';
11
11
  import { mergeObj } from '../module/util/object.js';
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { getTreemapNodeRect } from '../ChartInternal/shape/core/geometry.js';
11
11
  import { TYPE } from '../config/const.js';
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { getScale } from '../ChartInternal/internals/scale.js';
11
11
  import { AXIS_DEFAULT_TICK_COUNT, AXIS_TICK_LINE_OVERLAP_PADDING } from '../config/const.js';
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  /**
11
11
  * Copyright (c) 2017 ~ present NAVER Corp.
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { window as win } from '../module/browser.js';
11
11
  import { isNumber } from '../module/util/type-checks.js';
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { getRenderRect, getCandlestickGeometry } from '../ChartInternal/shape/core/geometry.js';
11
11
  import { isFiniteCanvasCoordinate } from './util.js';
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { isCanvasBubbleType, getFontSize, isCanvasCandlestickType, isCanvasLineType, isCanvasScatterType } from './util.js';
11
11
  import { isFunction, isNumber, isString, isObject } from '../module/util/type-checks.js';
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { window as win } from '../module/browser.js';
11
11
  import { withOpacity } from './color.js';
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.0-next.3
8
+ * @version 4.0.0
9
9
  */
10
10
  import { TYPE_BY_CATEGORY, TYPE } from '../config/const.js';
11
11