billboard.js 4.1.5 → 4.2.0-next.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.
- package/dist/billboard.css +87 -1
- package/dist/billboard.js +11000 -6970
- package/dist/billboard.min.css +2 -2
- package/dist/billboard.min.js +19 -19
- package/dist/billboard.pkgd.js +22584 -14102
- package/dist/billboard.pkgd.min.js +37 -37
- package/dist/billboard.react.js +5 -5
- package/dist/billboard.react.min.js +2 -2
- package/dist/billboard.worker.js +1 -1
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.js +21 -4
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +3 -3
- package/dist/plugin/billboardjs-plugin-stanford.js +22 -13
- package/dist/plugin/billboardjs-plugin-stanford.min.js +4 -4
- package/dist/plugin/billboardjs-plugin-tableview.js +20 -3
- package/dist/plugin/billboardjs-plugin-tableview.min.js +4 -4
- package/dist/plugin/billboardjs-plugin-textoverlap.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +1689 -1252
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +8 -8
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +2288 -1012
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +10 -10
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +6350 -2390
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +18 -18
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +1310 -1006
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +10 -10
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +1293 -1006
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +8 -8
- package/dist/theme/dark.css +90 -1
- package/dist/theme/dark.min.css +2 -2
- package/dist/theme/datalab.css +87 -1
- package/dist/theme/datalab.min.css +2 -2
- package/dist/theme/graph.css +87 -1
- package/dist/theme/graph.min.css +2 -2
- package/dist/theme/insight.css +87 -1
- package/dist/theme/insight.min.css +2 -2
- package/dist/theme/modern.css +87 -1
- package/dist/theme/modern.min.css +2 -2
- package/dist-esm/Chart/Chart.js +5 -5
- package/dist-esm/Chart/api/axis.js +2 -3
- package/dist-esm/Chart/api/category.js +2 -3
- package/dist-esm/Chart/api/chart.js +2 -3
- package/dist-esm/Chart/api/color.js +2 -3
- package/dist-esm/Chart/api/data.js +3 -4
- package/dist-esm/Chart/api/export.js +3 -4
- package/dist-esm/Chart/api/flow.js +3 -4
- package/dist-esm/Chart/api/focus.js +5 -3
- package/dist-esm/Chart/api/grid.js +2 -3
- package/dist-esm/Chart/api/group.js +2 -3
- package/dist-esm/Chart/api/legend.js +1 -2
- package/dist-esm/Chart/api/load.js +3 -4
- package/dist-esm/Chart/api/regions.js +3 -4
- package/dist-esm/Chart/api/selection.js +3 -4
- package/dist-esm/Chart/api/show.js +2 -3
- package/dist-esm/Chart/api/stubs.js +3 -4
- package/dist-esm/Chart/api/subchart.js +4 -5
- package/dist-esm/Chart/api/tooltip.js +28 -9
- package/dist-esm/Chart/api/x.js +2 -3
- package/dist-esm/Chart/api/zoom.js +6 -7
- package/dist-esm/ChartInternal/Axis/Axis.js +5 -6
- package/dist-esm/ChartInternal/Axis/AxisRenderer.js +9 -7
- package/dist-esm/ChartInternal/Axis/AxisRendererHelper.js +39 -11
- package/dist-esm/ChartInternal/ChartInternal.js +39 -24
- package/dist-esm/ChartInternal/data/convert.helper.js +2 -3
- package/dist-esm/ChartInternal/data/convert.js +3 -4
- package/dist-esm/ChartInternal/data/data.js +18 -11
- package/dist-esm/ChartInternal/data/load.js +4 -5
- package/dist-esm/ChartInternal/interactions/drag.js +3 -4
- package/dist-esm/ChartInternal/interactions/eventrect.js +4 -5
- package/dist-esm/ChartInternal/interactions/flow.js +3 -4
- package/dist-esm/ChartInternal/interactions/interaction.js +14 -13
- package/dist-esm/ChartInternal/interactions/subchart.js +5 -6
- package/dist-esm/ChartInternal/interactions/zoom.js +4 -5
- package/dist-esm/ChartInternal/internals/category.js +2 -3
- package/dist-esm/ChartInternal/internals/class.js +5 -5
- package/dist-esm/ChartInternal/internals/clip.js +2 -3
- package/dist-esm/ChartInternal/internals/color.js +4 -5
- package/dist-esm/ChartInternal/internals/domain.js +7 -7
- package/dist-esm/ChartInternal/internals/format.js +3 -4
- package/dist-esm/ChartInternal/internals/grid.js +4 -5
- package/dist-esm/ChartInternal/internals/legend.js +7 -7
- package/dist-esm/ChartInternal/internals/redraw.js +8 -8
- package/dist-esm/ChartInternal/internals/region.js +4 -5
- package/dist-esm/ChartInternal/internals/scale.js +2 -3
- package/dist-esm/ChartInternal/internals/selection.js +3 -4
- package/dist-esm/ChartInternal/internals/size.axis.js +2 -3
- package/dist-esm/ChartInternal/internals/size.js +8 -9
- package/dist-esm/ChartInternal/internals/style.js +4 -5
- package/dist-esm/ChartInternal/internals/subchart.util.js +2 -3
- package/dist-esm/ChartInternal/internals/text.arc.js +3 -4
- package/dist-esm/ChartInternal/internals/text.js +22 -23
- package/dist-esm/ChartInternal/internals/text.util.js +4 -5
- package/dist-esm/ChartInternal/internals/title.js +4 -5
- package/dist-esm/ChartInternal/internals/tooltip.js +20 -20
- package/dist-esm/ChartInternal/internals/transform.js +5 -6
- package/dist-esm/ChartInternal/internals/type.js +78 -11
- package/dist-esm/ChartInternal/shape/arc.js +5 -6
- package/dist-esm/ChartInternal/shape/area.js +4 -5
- package/dist-esm/ChartInternal/shape/bar.js +5 -6
- package/dist-esm/ChartInternal/shape/boxplot.js +111 -0
- package/dist-esm/ChartInternal/shape/bubble.js +2 -3
- package/dist-esm/ChartInternal/shape/bullet.js +213 -0
- package/dist-esm/ChartInternal/shape/candlestick.js +5 -6
- package/dist-esm/ChartInternal/shape/core/barRadius.js +2 -3
- package/dist-esm/ChartInternal/shape/core/boxplot.js +192 -0
- package/dist-esm/ChartInternal/shape/core/bubble.js +4 -5
- package/dist-esm/ChartInternal/shape/core/bullet.js +528 -0
- package/dist-esm/ChartInternal/shape/core/candlestick.js +2 -3
- package/dist-esm/ChartInternal/shape/core/dataRegion.js +2 -3
- package/dist-esm/ChartInternal/shape/core/geometry.js +2 -3
- package/dist-esm/ChartInternal/shape/core/heatmap.js +453 -0
- package/dist-esm/ChartInternal/shape/core/path.js +2 -3
- package/dist-esm/ChartInternal/shape/core/point.js +2 -3
- package/dist-esm/ChartInternal/shape/core/sankey.js +576 -0
- package/dist-esm/ChartInternal/shape/core/treemap.js +2 -3
- package/dist-esm/ChartInternal/shape/funnel.js +45 -6
- package/dist-esm/ChartInternal/shape/gauge.js +3 -4
- package/dist-esm/ChartInternal/shape/heatmap.js +144 -0
- package/dist-esm/ChartInternal/shape/line.js +7 -8
- package/dist-esm/ChartInternal/shape/point.js +5 -6
- package/dist-esm/ChartInternal/shape/polar.js +3 -4
- package/dist-esm/ChartInternal/shape/radar.js +19 -7
- package/dist-esm/ChartInternal/shape/sankey.js +154 -0
- package/dist-esm/ChartInternal/shape/shape.js +7 -7
- package/dist-esm/ChartInternal/shape/treemap.js +8 -5
- package/dist-esm/canvas/CanvasAxisRenderer.js +12 -315
- package/dist-esm/canvas/CanvasEngine.js +2 -3
- package/dist-esm/canvas/CanvasPainter.js +2 -3
- package/dist-esm/canvas/CanvasRenderer.js +38 -408
- package/dist-esm/canvas/CanvasTheme.js +28 -8
- package/dist-esm/canvas/HitDetector.js +20 -24
- package/dist-esm/canvas/axisTicks.js +5 -6
- package/dist-esm/canvas/boxplot.js +201 -0
- package/dist-esm/canvas/bullet.js +212 -0
- package/dist-esm/canvas/classes.js +2 -3
- package/dist-esm/canvas/color.js +2 -3
- package/dist-esm/canvas/flow.js +190 -0
- package/dist-esm/canvas/geometry.js +2 -3
- package/dist-esm/canvas/grid.js +206 -0
- package/dist-esm/canvas/heatmap.js +141 -0
- package/dist-esm/canvas/labels.js +3 -4
- package/dist-esm/canvas/pointPattern.js +2 -3
- package/dist-esm/canvas/sankey.js +137 -0
- package/dist-esm/canvas/selection.js +473 -0
- package/dist-esm/canvas/subchart.js +814 -0
- package/dist-esm/canvas/treemap.js +100 -0
- package/dist-esm/canvas/util.js +2 -3
- package/dist-esm/config/Options/Options.js +3 -4
- package/dist-esm/config/Options/axis/axis.js +2 -3
- package/dist-esm/config/Options/axis/x.js +2 -3
- package/dist-esm/config/Options/axis/y.js +2 -3
- package/dist-esm/config/Options/axis/y2.js +14 -3
- package/dist-esm/config/Options/common/boost.js +2 -3
- package/dist-esm/config/Options/common/color.js +2 -3
- package/dist-esm/config/Options/common/grid.js +2 -3
- package/dist-esm/config/Options/common/legend.js +2 -3
- package/dist-esm/config/Options/common/main.js +2 -3
- package/dist-esm/config/Options/common/point.js +2 -3
- package/dist-esm/config/Options/common/title.js +2 -3
- package/dist-esm/config/Options/common/tooltip.js +2 -3
- package/dist-esm/config/Options/data/axis.js +2 -3
- package/dist-esm/config/Options/data/data.js +49 -4
- package/dist-esm/config/Options/data/selection.js +2 -3
- package/dist-esm/config/Options/interaction/interaction.js +2 -3
- package/dist-esm/config/Options/interaction/subchart.js +2 -3
- package/dist-esm/config/Options/interaction/zoom.js +2 -3
- package/dist-esm/config/Options/shape/arc.js +2 -3
- package/dist-esm/config/Options/shape/area.js +2 -3
- package/dist-esm/config/Options/shape/bar.js +2 -3
- package/dist-esm/config/Options/shape/boxplot.js +106 -0
- package/dist-esm/config/Options/shape/bubble.js +2 -3
- package/dist-esm/config/Options/shape/bullet.js +177 -0
- package/dist-esm/config/Options/shape/candlestick.js +2 -3
- package/dist-esm/config/Options/shape/donut.js +2 -3
- package/dist-esm/config/Options/shape/funnel.js +2 -3
- package/dist-esm/config/Options/shape/gauge.js +2 -3
- package/dist-esm/config/Options/shape/heatmap.js +137 -0
- package/dist-esm/config/Options/shape/line.js +2 -3
- package/dist-esm/config/Options/shape/pie.js +2 -3
- package/dist-esm/config/Options/shape/polar.js +2 -3
- package/dist-esm/config/Options/shape/radar.js +2 -3
- package/dist-esm/config/Options/shape/sankey.js +116 -0
- package/dist-esm/config/Options/shape/scatter.js +2 -3
- package/dist-esm/config/Options/shape/spline.js +2 -3
- package/dist-esm/config/Options/shape/treemap.js +2 -3
- package/dist-esm/config/Store/Element.js +2 -3
- package/dist-esm/config/Store/State.js +3 -4
- package/dist-esm/config/Store/Store.js +2 -3
- package/dist-esm/config/classes.js +2 -4
- package/dist-esm/config/config.js +2 -3
- package/dist-esm/config/const.js +31 -23
- package/dist-esm/config/resolver/axis.core.js +4 -5
- package/dist-esm/config/resolver/axis.js +2 -3
- package/dist-esm/config/resolver/canvas.js +112 -911
- package/dist-esm/config/resolver/canvasBoxplot.js +49 -0
- package/dist-esm/config/resolver/canvasBullet.js +29 -0
- package/dist-esm/config/resolver/canvasFlow.js +28 -0
- package/dist-esm/config/resolver/canvasGrid.js +27 -0
- package/dist-esm/config/resolver/canvasHeatmap.js +31 -0
- package/dist-esm/config/resolver/canvasSankey.js +31 -0
- package/dist-esm/config/resolver/canvasSelection.js +30 -0
- package/dist-esm/config/resolver/canvasShape.js +13 -12
- package/dist-esm/config/resolver/canvasSubchart.js +30 -0
- package/dist-esm/config/resolver/canvasType.js +48 -0
- package/dist-esm/config/resolver/category.js +3 -4
- package/dist-esm/config/resolver/customType.js +58 -0
- package/dist-esm/config/resolver/export.js +3 -4
- package/dist-esm/config/resolver/flow.js +5 -6
- package/dist-esm/config/resolver/grid.js +6 -7
- package/dist-esm/config/resolver/interaction/selection.js +6 -7
- package/dist-esm/config/resolver/interaction/subchart.js +6 -7
- package/dist-esm/config/resolver/interaction/zoom.js +6 -7
- package/dist-esm/config/resolver/regions.js +5 -6
- package/dist-esm/config/resolver/shape/arc.helpers.js +5 -6
- package/dist-esm/config/resolver/shape/area.js +3 -4
- package/dist-esm/config/resolver/shape/axis.helpers.js +2 -3
- package/dist-esm/config/resolver/shape/bar.js +5 -6
- package/dist-esm/config/resolver/shape/boxplot.js +30 -0
- package/dist-esm/config/resolver/shape/bubble.js +5 -6
- package/dist-esm/config/resolver/shape/bullet.js +23 -0
- package/dist-esm/config/resolver/shape/candlestick.js +5 -6
- package/dist-esm/config/resolver/shape/donut.js +2 -3
- package/dist-esm/config/resolver/shape/funnel.js +7 -6
- package/dist-esm/config/resolver/shape/gauge.js +4 -5
- package/dist-esm/config/resolver/shape/heatmap.js +23 -0
- package/dist-esm/config/resolver/shape/line.js +2 -3
- package/dist-esm/config/resolver/shape/pie.js +3 -4
- package/dist-esm/config/resolver/shape/polar.js +4 -5
- package/dist-esm/config/resolver/shape/radar.js +5 -6
- package/dist-esm/config/resolver/shape/sankey.js +23 -0
- package/dist-esm/config/resolver/shape/scatter.js +4 -5
- package/dist-esm/config/resolver/shape/treemap.js +4 -5
- package/dist-esm/core.js +5 -6
- package/dist-esm/index.canvas.js +13 -9
- package/dist-esm/index.esm.js +6 -2
- package/dist-esm/module/Cache.js +2 -3
- package/dist-esm/module/browser.js +2 -3
- package/dist-esm/module/dsv.js +2 -3
- package/dist-esm/module/error.js +23 -16
- package/dist-esm/module/generator.js +3 -4
- package/dist-esm/module/sanitize.js +2 -3
- package/dist-esm/module/util/brush.js +2 -3
- package/dist-esm/module/util/dom.js +3 -4
- package/dist-esm/module/util/object.js +13 -6
- package/dist-esm/module/util/type-checks.js +2 -3
- package/dist-esm/module/worker.js +2 -3
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +6 -10
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +10 -18
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +17 -45
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +10 -18
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +9 -16
- package/dist-esm/react/index.js +2 -3
- package/package.json +44 -44
- package/src/Chart/Chart.ts +1 -0
- package/src/Chart/api/focus.ts +3 -0
- package/src/Chart/api/subchart.ts +1 -1
- package/src/Chart/api/tooltip.ts +54 -15
- package/src/ChartInternal/Axis/AxisRenderer.ts +9 -2
- package/src/ChartInternal/Axis/AxisRendererHelper.ts +42 -8
- package/src/ChartInternal/ChartInternal.ts +46 -19
- package/src/ChartInternal/data/IData.ts +13 -0
- package/src/ChartInternal/data/data.ts +26 -5
- package/src/ChartInternal/data/load.ts +2 -2
- package/src/ChartInternal/interactions/interaction.ts +15 -11
- package/src/ChartInternal/internals/class.ts +3 -2
- package/src/ChartInternal/internals/domain.ts +4 -2
- package/src/ChartInternal/internals/format.ts +3 -1
- package/src/ChartInternal/internals/legend.ts +2 -1
- package/src/ChartInternal/internals/redraw.ts +3 -3
- package/src/ChartInternal/internals/size.ts +5 -3
- package/src/ChartInternal/internals/text.ts +24 -28
- package/src/ChartInternal/internals/tooltip.ts +35 -14
- package/src/ChartInternal/internals/transform.ts +2 -2
- package/src/ChartInternal/internals/type.ts +101 -9
- package/src/ChartInternal/shape/boxplot.ts +172 -0
- package/src/ChartInternal/shape/bullet.ts +323 -0
- package/src/ChartInternal/shape/core/boxplot.ts +241 -0
- package/src/ChartInternal/shape/core/bullet.ts +734 -0
- package/src/ChartInternal/shape/core/heatmap.ts +665 -0
- package/src/ChartInternal/shape/core/sankey.ts +782 -0
- package/src/ChartInternal/shape/funnel.ts +73 -2
- package/src/ChartInternal/shape/heatmap.ts +236 -0
- package/src/ChartInternal/shape/radar.ts +30 -1
- package/src/ChartInternal/shape/sankey.ts +242 -0
- package/src/ChartInternal/shape/shape.ts +1 -1
- package/src/ChartInternal/shape/treemap.ts +10 -0
- package/src/Plugin/stanford/index.ts +1 -28
- package/src/canvas/CanvasAxisRenderer.ts +35 -574
- package/src/canvas/CanvasRenderer.ts +68 -640
- package/src/canvas/CanvasTheme.ts +92 -6
- package/src/canvas/HitDetector.ts +30 -28
- package/src/canvas/boxplot.ts +230 -0
- package/src/canvas/bullet.ts +269 -0
- package/src/canvas/flow.ts +237 -0
- package/src/canvas/grid.ts +359 -0
- package/src/canvas/heatmap.ts +147 -0
- package/src/canvas/labels.ts +3 -1
- package/src/canvas/sankey.ts +151 -0
- package/src/canvas/selection.ts +626 -0
- package/src/canvas/subchart.ts +1292 -0
- package/src/canvas/treemap.ts +142 -0
- package/src/config/Options/axis/y2.ts +13 -0
- package/src/config/Options/data/data.ts +47 -1
- package/src/config/Options/shape/boxplot.ts +95 -0
- package/src/config/Options/shape/bullet.ts +170 -0
- package/src/config/Options/shape/heatmap.ts +125 -0
- package/src/config/Options/shape/sankey.ts +108 -0
- package/src/config/Store/State.ts +1 -1
- package/src/config/classes.ts +0 -1
- package/src/config/const.ts +30 -21
- package/src/config/resolver/canvas.ts +126 -1290
- package/src/config/resolver/canvasBoxplot.ts +42 -0
- package/src/config/resolver/canvasBullet.ts +20 -0
- package/src/config/resolver/canvasFlow.ts +18 -0
- package/src/config/resolver/canvasGrid.ts +17 -0
- package/src/config/resolver/canvasHeatmap.ts +23 -0
- package/src/config/resolver/canvasSankey.ts +23 -0
- package/src/config/resolver/canvasSelection.ts +20 -0
- package/src/config/resolver/canvasShape.ts +6 -1
- package/src/config/resolver/canvasSubchart.ts +20 -0
- package/src/config/resolver/canvasType.ts +51 -0
- package/src/config/resolver/customType.ts +69 -0
- package/src/config/resolver/shape/boxplot.ts +31 -0
- package/src/config/resolver/shape/bullet.ts +18 -0
- package/src/config/resolver/shape/funnel.ts +8 -2
- package/src/config/resolver/shape/heatmap.ts +18 -0
- package/src/config/resolver/shape/index.ts +4 -0
- package/src/config/resolver/shape/sankey.ts +18 -0
- package/src/index.canvas.ts +9 -3
- package/src/index.esm.ts +4 -0
- package/src/index.ts +34 -0
- package/src/module/error.ts +32 -18
- package/src/module/util/object.ts +26 -1
- package/src/scss/billboard.scss +106 -0
- package/src/scss/theme/dark.scss +110 -0
- package/src/scss/theme/datalab.scss +106 -0
- package/src/scss/theme/graph.scss +106 -0
- package/src/scss/theme/insight.scss +106 -0
- package/src/scss/theme/modern.scss +106 -0
- package/types/bb.d.ts +4 -0
- package/types/canvas.d.ts +3 -0
- package/types/chart.d.ts +5 -0
- package/types/index.d.ts +4 -0
- package/types/options.d.ts +10 -1
- package/types/options.shape.d.ts +431 -0
- package/types/types.d.ts +4 -0
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1
|
|
8
|
+
* @version 4.2.0-next.1
|
|
9
9
|
*/
|
|
10
|
-
import { isNumber, isObject } from "../../module/util/type-checks.js";
|
|
11
|
-
import { emulateEvent, getBoundingRect, getPointer, getTransformCTM, hasViewBox } from "../../module/util/dom.js";
|
|
12
10
|
import { $ARC, $AXIS, $COMMON, $SHAPE } from "../../config/classes.js";
|
|
13
11
|
import { KEY } from "../../module/Cache.js";
|
|
12
|
+
import { emulateEvent, getBoundingRect, getPointer, getTransformCTM, hasViewBox } from "../../module/util/dom.js";
|
|
13
|
+
import { isNumber, isObject } from "../../module/util/type-checks.js";
|
|
14
14
|
import { select } from "d3-selection";
|
|
15
15
|
import { drag } from "d3-drag";
|
|
16
|
-
|
|
16
|
+
// src/ChartInternal/interactions/interaction.ts
|
|
17
17
|
/**
|
|
18
18
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
19
19
|
* billboard.js project is licensed under the MIT license
|
|
@@ -51,19 +51,20 @@ var interaction_default = {
|
|
|
51
51
|
* Handle data.onover/out callback options
|
|
52
52
|
* @param {boolean} isOver Over or not
|
|
53
53
|
* @param {number|object} d data object
|
|
54
|
+
* @param {Element} [element] The element hovered, when it isn't the first shape of the data
|
|
54
55
|
* @private
|
|
55
56
|
*/
|
|
56
|
-
setOverOut(isOver, d) {
|
|
57
|
+
setOverOut(isOver, d, element) {
|
|
57
58
|
const $$ = this;
|
|
58
|
-
const { config, state: {
|
|
59
|
+
const { config, state: { customType, hasRadar, hasTreemap }, $el: { main } } = $$;
|
|
59
60
|
const isArcishData = isObject(d);
|
|
60
61
|
if (isArcishData || d !== -1) {
|
|
61
62
|
const callback = config[isOver ? "data_onover" : "data_onout"].bind($$.api);
|
|
62
63
|
config.color_onover && $$.setOverColor(isOver, d, isArcishData);
|
|
63
64
|
if (isArcishData) {
|
|
64
65
|
const suffix = $$.getTargetSelectorSuffix(d.id);
|
|
65
|
-
const selector =
|
|
66
|
-
callback(d, main.select(`.${selector}`).node());
|
|
66
|
+
const selector = customType || hasTreemap ? `${$COMMON.target + suffix} .${$SHAPE.shape}` : $ARC.arc + suffix;
|
|
67
|
+
callback(d, element ?? main.select(`.${selector}`).node());
|
|
67
68
|
} else if (!config.tooltip_grouped) {
|
|
68
69
|
const last = $$.cache.get(KEY.setOverOut) || [];
|
|
69
70
|
const shapesAtIndex = main.selectAll(`.${$SHAPE.shape}-${d}`).filter(function(d) {
|
|
@@ -133,8 +134,8 @@ var interaction_default = {
|
|
|
133
134
|
*/
|
|
134
135
|
dispatchEvent(type, index, mouse) {
|
|
135
136
|
const $$ = this;
|
|
136
|
-
const { config, state: { eventReceiver, hasAxis,
|
|
137
|
-
let element = ((
|
|
137
|
+
const { config, state: { eventReceiver, hasAxis, customType, hasRadar, hasTreemap }, $el: { eventRect, radar, svg, treemap } } = $$;
|
|
138
|
+
let element = ((customType || hasTreemap) && eventReceiver.rect || hasRadar && radar.axes.select(`.${$AXIS.axis}-${index} text`) || eventRect || $$.getArcElementByIdOrIndex?.(index))?.node?.();
|
|
138
139
|
if (element) {
|
|
139
140
|
const isMultipleX = $$.isMultipleX();
|
|
140
141
|
const isRotated = config.axis_rotated;
|
|
@@ -165,7 +166,7 @@ var interaction_default = {
|
|
|
165
166
|
clientY: y,
|
|
166
167
|
bubbles: hasRadar
|
|
167
168
|
};
|
|
168
|
-
if (
|
|
169
|
+
if (customType || hasTreemap) element = ($$.$el[customType] ?? treemap).node();
|
|
169
170
|
emulateEvent[/^(mouse|click)/.test(type) ? "mouse" : "touch"](element, type, params);
|
|
170
171
|
}
|
|
171
172
|
},
|
|
@@ -189,7 +190,7 @@ var interaction_default = {
|
|
|
189
190
|
*/
|
|
190
191
|
unbindAllEvents() {
|
|
191
192
|
const $$ = this;
|
|
192
|
-
const { $el: { arcs, eventRect, legend, region, svg, treemap }, brush } = $$;
|
|
193
|
+
const { $el: { arcs, eventRect, legend, region, svg, treemap }, brush, state: { customType } } = $$;
|
|
193
194
|
const list = [
|
|
194
195
|
"wheel",
|
|
195
196
|
"click",
|
|
@@ -215,10 +216,10 @@ var interaction_default = {
|
|
|
215
216
|
brush?.getSelection(),
|
|
216
217
|
arcs?.selectAll("path"),
|
|
217
218
|
legend?.selectAll("g"),
|
|
219
|
+
$$.$el[customType],
|
|
218
220
|
treemap
|
|
219
221
|
].forEach((v) => v?.on(list, null));
|
|
220
222
|
$$.unbindZoomEvent?.();
|
|
221
223
|
}
|
|
222
224
|
};
|
|
223
|
-
//#endregion
|
|
224
225
|
export { interaction_default as default };
|
|
@@ -5,19 +5,19 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1
|
|
8
|
+
* @version 4.2.0-next.1
|
|
9
9
|
*/
|
|
10
|
+
import classes_default from "../../config/classes.js";
|
|
10
11
|
import { SUBCHART_BRUSH_HANDLE_PATH } from "../../config/const.js";
|
|
11
12
|
import { window as win } from "../../module/browser.js";
|
|
12
|
-
import {
|
|
13
|
+
import { brushEmpty } from "../../module/util/brush.js";
|
|
13
14
|
import { capitalize } from "../../module/util/object.js";
|
|
14
15
|
import { emulateEvent, getBoundingRect, getPointer } from "../../module/util/dom.js";
|
|
15
|
-
import {
|
|
16
|
-
import classes_default from "../../config/classes.js";
|
|
16
|
+
import { isArray } from "../../module/util/type-checks.js";
|
|
17
17
|
import { getMainCoordFromSubchartCoord, isContinuousGridFocusEnabled } from "../internals/subchart.util.js";
|
|
18
18
|
import { select } from "d3-selection";
|
|
19
19
|
import { brushSelection, brushX, brushY } from "d3-brush";
|
|
20
|
-
|
|
20
|
+
// src/ChartInternal/interactions/subchart.ts
|
|
21
21
|
/**
|
|
22
22
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
23
23
|
* billboard.js project is licensed under the MIT license
|
|
@@ -433,5 +433,4 @@ var subchart_default = {
|
|
|
433
433
|
subY2Axis.attr("transform", $$.getTranslate("subY2"));
|
|
434
434
|
}
|
|
435
435
|
};
|
|
436
|
-
//#endregion
|
|
437
436
|
export { subchart_default as default };
|
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1
|
|
8
|
+
* @version 4.2.0-next.1
|
|
9
9
|
*/
|
|
10
|
+
import { $COMMON, $ZOOM } from "../../config/classes.js";
|
|
10
11
|
import { window as win } from "../../module/browser.js";
|
|
11
|
-
import { diffDomain, isFunction } from "../../module/util/type-checks.js";
|
|
12
12
|
import { callFn } from "../../module/util/object.js";
|
|
13
|
+
import { diffDomain, isFunction } from "../../module/util/type-checks.js";
|
|
13
14
|
import { getPointer, scheduleRAFUpdate } from "../../module/util/dom.js";
|
|
14
|
-
import { $COMMON, $ZOOM } from "../../config/classes.js";
|
|
15
15
|
import { drag } from "d3-drag";
|
|
16
16
|
import { zoom, zoomIdentity, zoomTransform } from "d3-zoom";
|
|
17
|
-
|
|
17
|
+
// src/ChartInternal/interactions/zoom.ts
|
|
18
18
|
/**
|
|
19
19
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
20
20
|
* billboard.js project is licensed under the MIT license
|
|
@@ -341,5 +341,4 @@ var zoom_default = {
|
|
|
341
341
|
return node ? toPlotZoomTransform($$, zoomTransform(node)) : { k: 1 };
|
|
342
342
|
}
|
|
343
343
|
};
|
|
344
|
-
//#endregion
|
|
345
344
|
export { zoom_default as default };
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1
|
|
8
|
+
* @version 4.2.0-next.1
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
// src/ChartInternal/internals/category.ts
|
|
11
11
|
/**
|
|
12
12
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
13
13
|
* billboard.js project is licensed under the MIT license
|
|
@@ -23,5 +23,4 @@ categoryName(i) {
|
|
|
23
23
|
const { axis_x_categories } = this.config;
|
|
24
24
|
return axis_x_categories?.[i] ?? i;
|
|
25
25
|
} };
|
|
26
|
-
//#endregion
|
|
27
26
|
export { category_default as default };
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1
|
|
8
|
+
* @version 4.2.0-next.1
|
|
9
9
|
*/
|
|
10
10
|
import classes_default from "../../config/classes.js";
|
|
11
|
-
|
|
11
|
+
// src/ChartInternal/internals/class.ts
|
|
12
12
|
/**
|
|
13
13
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
14
14
|
* billboard.js project is licensed under the MIT license
|
|
@@ -29,12 +29,13 @@ var class_default = {
|
|
|
29
29
|
* Get class string
|
|
30
30
|
* @param {string} type Shape type
|
|
31
31
|
* @param {boolean} withShape Get with shape prefix
|
|
32
|
+
* @param {boolean} useId Use the id of the data as the key of the class, as the types of the group
|
|
32
33
|
* @returns {string} Class string
|
|
33
34
|
* @private
|
|
34
35
|
*/
|
|
35
|
-
getClass(type, withShape) {
|
|
36
|
+
getClass(type, withShape, useId) {
|
|
36
37
|
const isPlural = /s$/.test(type);
|
|
37
|
-
const useIdKey = /^(area|arc|line|
|
|
38
|
+
const useIdKey = useId ?? /^(area|arc|line|treemap)s?$/.test(type);
|
|
38
39
|
const key = isPlural ? "id" : "index";
|
|
39
40
|
return (d) => {
|
|
40
41
|
const data = d.data || d;
|
|
@@ -95,5 +96,4 @@ var class_default = {
|
|
|
95
96
|
return ids?.length ? ids.map((id) => this.selectorLegend(id)) : null;
|
|
96
97
|
}
|
|
97
98
|
};
|
|
98
|
-
//#endregion
|
|
99
99
|
export { class_default as default };
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1
|
|
8
|
+
* @version 4.2.0-next.1
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
// src/ChartInternal/internals/clip.ts
|
|
11
11
|
/**
|
|
12
12
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
13
13
|
* billboard.js project is licensed under the MIT license
|
|
@@ -94,5 +94,4 @@ var clip_default = {
|
|
|
94
94
|
if (svg) svg.select(`#${clip.idXAxisTickTexts} rect`).attr("width", current.maxTickSize.x.clipPath).attr("height", 30);
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
|
-
//#endregion
|
|
98
97
|
export { clip_default as default };
|
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1
|
|
8
|
+
* @version 4.2.0-next.1
|
|
9
9
|
*/
|
|
10
|
+
import { $ARC, $COLOR, $SHAPE } from "../../config/classes.js";
|
|
10
11
|
import { document as doc } from "../../module/browser.js";
|
|
12
|
+
import { KEY } from "../../module/Cache.js";
|
|
11
13
|
import { isFunction, isObject, isString, notEmpty } from "../../module/util/type-checks.js";
|
|
12
14
|
import { sanitize } from "../../module/sanitize.js";
|
|
13
|
-
import { $ARC, $COLOR, $SHAPE } from "../../config/classes.js";
|
|
14
|
-
import { KEY } from "../../module/Cache.js";
|
|
15
15
|
import { select } from "d3-selection";
|
|
16
|
-
|
|
16
|
+
// src/ChartInternal/internals/color.ts
|
|
17
17
|
/**
|
|
18
18
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
19
19
|
* billboard.js project is licensed under the MIT license
|
|
@@ -247,5 +247,4 @@ var color_default = {
|
|
|
247
247
|
main.selectAll(isObject(d) ? `.${$ARC.arc}${$$.getTargetSelectorSuffix(d.id)}` : `.${$SHAPE.shape}-${d}`).style("fill", color);
|
|
248
248
|
}
|
|
249
249
|
};
|
|
250
|
-
//#endregion
|
|
251
250
|
export { color_default as default };
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1
|
|
8
|
+
* @version 4.2.0-next.1
|
|
9
9
|
*/
|
|
10
10
|
import { TYPE, TYPE_BY_CATEGORY } from "../../config/const.js";
|
|
11
|
+
import { KEY } from "../../module/Cache.js";
|
|
12
|
+
import { brushEmpty, getBrushSelection } from "../../module/util/brush.js";
|
|
11
13
|
import { diffDomain, isDefined, isNumber, isObject, isValue, notEmpty } from "../../module/util/type-checks.js";
|
|
12
14
|
import { getMinMax, parseDate, sortValue, toSet } from "../../module/util/object.js";
|
|
13
|
-
|
|
14
|
-
import { KEY } from "../../module/Cache.js";
|
|
15
|
-
//#region src/ChartInternal/internals/domain.ts
|
|
15
|
+
// src/ChartInternal/internals/domain.ts
|
|
16
16
|
/**
|
|
17
17
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
18
18
|
* billboard.js project is licensed under the MIT license
|
|
@@ -89,10 +89,11 @@ function getTargetValueMinMax($$, targets) {
|
|
|
89
89
|
const target = targets[i];
|
|
90
90
|
const isCandlestick = $$.isCandlestickType?.(target);
|
|
91
91
|
const isSubchartCandlestick = !isCandlestick && !!$$.isSubchartSourceTypeOf?.(target, TYPE.CANDLESTICK);
|
|
92
|
+
const axisDomain = $$.getAxisTypeHooks?.(target)?.domainValues;
|
|
92
93
|
const { values } = target;
|
|
93
94
|
for (let j = 0; j < values.length; j++) {
|
|
94
95
|
const row = values[j];
|
|
95
|
-
let value = row.value;
|
|
96
|
+
let value = axisDomain ? axisDomain($$, row) : row.value;
|
|
96
97
|
if (!(isValue(value) || value === null)) continue;
|
|
97
98
|
const subchartCandlestickValue = isSubchartCandlestick ? $$.getSubchartCandlestickShapeValue?.(row, true) : void 0;
|
|
98
99
|
if (isNumber(subchartCandlestickValue)) value = subchartCandlestickValue;
|
|
@@ -322,7 +323,7 @@ var domain_default = {
|
|
|
322
323
|
const diff = diffDomain(domain);
|
|
323
324
|
let defaultValue;
|
|
324
325
|
if (axis.isCategorized() || isTimeSeriesTickCount) defaultValue = 0;
|
|
325
|
-
else if ($$.hasType("bar")) {
|
|
326
|
+
else if ($$.hasType("bar") || $$.hasAxisTypePadding?.()) {
|
|
326
327
|
const maxDataCount = $$.getMaxDataCount();
|
|
327
328
|
defaultValue = maxDataCount > 1 ? diff / (maxDataCount - 1) / 2 : .5;
|
|
328
329
|
} else defaultValue = $$.getResettedPadding(diff * .01);
|
|
@@ -480,5 +481,4 @@ var domain_default = {
|
|
|
480
481
|
return false;
|
|
481
482
|
}
|
|
482
483
|
};
|
|
483
|
-
//#endregion
|
|
484
484
|
export { domain_default as default };
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1
|
|
8
|
+
* @version 4.2.0-next.1
|
|
9
9
|
*/
|
|
10
10
|
import { isArray, isFunction, isObject, isObjectType, isValue } from "../../module/util/type-checks.js";
|
|
11
|
-
|
|
11
|
+
// src/ChartInternal/internals/format.ts
|
|
12
12
|
/**
|
|
13
13
|
* Get formatted
|
|
14
14
|
* @param {object} $$ Context
|
|
@@ -71,8 +71,7 @@ var format_default = {
|
|
|
71
71
|
if (dataLabels.format[targetId]) format = dataLabels.format[targetId] === true ? defaultFormat : dataLabels.format[targetId];
|
|
72
72
|
else format = () => "";
|
|
73
73
|
}
|
|
74
|
-
return format.bind($$.api);
|
|
74
|
+
return $$.state.customType && $$.customTypeHooks?.labelFormat?.($$, targetId) || format.bind($$.api);
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
|
-
//#endregion
|
|
78
77
|
export { format_default as default };
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1
|
|
8
|
+
* @version 4.2.0-next.1
|
|
9
9
|
*/
|
|
10
|
-
import { isArray, isValue } from "../../module/util/type-checks.js";
|
|
11
|
-
import { getPointer } from "../../module/util/dom.js";
|
|
12
10
|
import { $AXIS, $COMMON, $FOCUS, $GRID } from "../../config/classes.js";
|
|
11
|
+
import { getPointer } from "../../module/util/dom.js";
|
|
12
|
+
import { isArray, isValue } from "../../module/util/type-checks.js";
|
|
13
13
|
import { select, selectAll } from "d3-selection";
|
|
14
|
-
|
|
14
|
+
// src/ChartInternal/internals/grid.ts
|
|
15
15
|
/**
|
|
16
16
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
17
17
|
* billboard.js project is licensed under the MIT license
|
|
@@ -350,5 +350,4 @@ var grid_default = {
|
|
|
350
350
|
config[gridLines] = config[gridLines].filter(toShow);
|
|
351
351
|
}
|
|
352
352
|
};
|
|
353
|
-
//#endregion
|
|
354
353
|
export { grid_default as default };
|
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1
|
|
8
|
+
* @version 4.2.0-next.1
|
|
9
9
|
*/
|
|
10
|
+
import { $FOCUS, $GAUGE, $LEGEND } from "../../config/classes.js";
|
|
10
11
|
import { document as doc } from "../../module/browser.js";
|
|
12
|
+
import { KEY } from "../../module/Cache.js";
|
|
13
|
+
import { callFn, getOption, toMap, tplProcess } from "../../module/util/object.js";
|
|
11
14
|
import { isBoolean, isDefined, isEmpty, isFunction } from "../../module/util/type-checks.js";
|
|
12
15
|
import { sanitize } from "../../module/sanitize.js";
|
|
13
|
-
import { callFn, getOption, toMap, tplProcess } from "../../module/util/object.js";
|
|
14
|
-
import { $FOCUS, $GAUGE, $LEGEND } from "../../config/classes.js";
|
|
15
|
-
import { KEY } from "../../module/Cache.js";
|
|
16
16
|
import { namespaces, select } from "d3-selection";
|
|
17
|
-
|
|
17
|
+
// src/ChartInternal/internals/legend.ts
|
|
18
18
|
/**
|
|
19
19
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
20
20
|
* billboard.js project is licensed under the MIT license
|
|
@@ -31,7 +31,8 @@ const LEGEND_TOUCH_CLICK_TIMEOUT = 750;
|
|
|
31
31
|
function _getLegendColor(id) {
|
|
32
32
|
const $$ = this;
|
|
33
33
|
const data = $$.getDataById(id);
|
|
34
|
-
|
|
34
|
+
const color = $$.levelColor ? $$.levelColor(data.values[0].value) : $$.color(data);
|
|
35
|
+
return $$.customTypeHooks?.legendColor?.($$, data) ?? color;
|
|
35
36
|
}
|
|
36
37
|
/**
|
|
37
38
|
* Get formatted text value
|
|
@@ -714,5 +715,4 @@ var legend_default = {
|
|
|
714
715
|
});
|
|
715
716
|
}
|
|
716
717
|
};
|
|
717
|
-
//#endregion
|
|
718
718
|
export { legend_default as default };
|
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1
|
|
8
|
+
* @version 4.2.0-next.1
|
|
9
9
|
*/
|
|
10
|
-
import { notEmpty } from "../../module/util/type-checks.js";
|
|
11
|
-
import { callFn, capitalize, getOption } from "../../module/util/object.js";
|
|
12
|
-
import { isTabVisible } from "../../module/util/dom.js";
|
|
13
10
|
import { $COMMON, $SELECT, $TEXT } from "../../config/classes.js";
|
|
14
11
|
import { KEY } from "../../module/Cache.js";
|
|
15
12
|
import { generateWait } from "../../module/generator.js";
|
|
13
|
+
import { callFn, capitalize, getOption } from "../../module/util/object.js";
|
|
14
|
+
import { isTabVisible } from "../../module/util/dom.js";
|
|
15
|
+
import { notEmpty } from "../../module/util/type-checks.js";
|
|
16
16
|
import { transition } from "d3-transition";
|
|
17
|
-
|
|
17
|
+
// src/ChartInternal/internals/redraw.ts
|
|
18
18
|
/**
|
|
19
19
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
20
20
|
* billboard.js project is licensed under the MIT license
|
|
@@ -95,7 +95,8 @@ var redraw_default = {
|
|
|
95
95
|
"bar",
|
|
96
96
|
"candlestick",
|
|
97
97
|
"line",
|
|
98
|
-
"area"
|
|
98
|
+
"area",
|
|
99
|
+
...$$.getAxisTypes()
|
|
99
100
|
].forEach((v) => {
|
|
100
101
|
const name = capitalize(v);
|
|
101
102
|
if (/^(line|area)$/.test(v) && $$.hasTypeOf(name) || $$.hasType(v)) {
|
|
@@ -111,7 +112,7 @@ var redraw_default = {
|
|
|
111
112
|
$el.arcs && $$.redrawArc(duration, durationForExit, wth.Transform);
|
|
112
113
|
$el.radar && $$.redrawRadar();
|
|
113
114
|
$el.polar && $$.redrawPolar();
|
|
114
|
-
|
|
115
|
+
state.customType && $$[`redraw${capitalize(state.customType)}`](wth.Transition);
|
|
115
116
|
treemap && $$.updateTreemap(durationForExit);
|
|
116
117
|
}
|
|
117
118
|
if (!state.resizing && !treemap && ($$.hasPointType() || state.hasRadar)) {
|
|
@@ -206,5 +207,4 @@ var redraw_default = {
|
|
|
206
207
|
$$.redraw(options);
|
|
207
208
|
}
|
|
208
209
|
};
|
|
209
|
-
//#endregion
|
|
210
210
|
export { redraw_default as default };
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1
|
|
8
|
+
* @version 4.2.0-next.1
|
|
9
9
|
*/
|
|
10
|
+
import { $REGION } from "../../config/classes.js";
|
|
11
|
+
import { getBoundingRect } from "../../module/util/dom.js";
|
|
10
12
|
import { isString, isValue } from "../../module/util/type-checks.js";
|
|
11
13
|
import { parseDate } from "../../module/util/object.js";
|
|
12
|
-
import { getBoundingRect } from "../../module/util/dom.js";
|
|
13
|
-
import { $REGION } from "../../config/classes.js";
|
|
14
14
|
import { select } from "d3-selection";
|
|
15
|
-
|
|
15
|
+
// src/ChartInternal/internals/region.ts
|
|
16
16
|
/**
|
|
17
17
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
18
18
|
* billboard.js project is licensed under the MIT license
|
|
@@ -112,5 +112,4 @@ var region_default = {
|
|
|
112
112
|
return !d.axis || d.axis === "x";
|
|
113
113
|
}
|
|
114
114
|
};
|
|
115
|
-
//#endregion
|
|
116
115
|
export { region_default as default };
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1
|
|
8
|
+
* @version 4.2.0-next.1
|
|
9
9
|
*/
|
|
10
10
|
import { isString, isValue } from "../../module/util/type-checks.js";
|
|
11
11
|
import { parseDate } from "../../module/util/object.js";
|
|
12
12
|
import { scaleLinear, scaleLog, scaleSymlog, scaleTime, scaleUtc } from "d3-scale";
|
|
13
|
-
|
|
13
|
+
// src/ChartInternal/internals/scale.ts
|
|
14
14
|
/**
|
|
15
15
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
16
16
|
* billboard.js project is licensed under the MIT license
|
|
@@ -195,5 +195,4 @@ var scale_default = {
|
|
|
195
195
|
return d ? this.scale.subX(d.x) : null;
|
|
196
196
|
}
|
|
197
197
|
};
|
|
198
|
-
//#endregion
|
|
199
198
|
export { scale_default as default, getScale };
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1
|
|
8
|
+
* @version 4.2.0-next.1
|
|
9
9
|
*/
|
|
10
|
-
import { callFn } from "../../module/util/object.js";
|
|
11
10
|
import { $SELECT, $SHAPE } from "../../config/classes.js";
|
|
11
|
+
import { callFn } from "../../module/util/object.js";
|
|
12
12
|
import drag_default from "../interactions/drag.js";
|
|
13
13
|
import { select } from "d3-selection";
|
|
14
|
-
|
|
14
|
+
// src/ChartInternal/internals/selection.ts
|
|
15
15
|
/**
|
|
16
16
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
17
17
|
* billboard.js project is licensed under the MIT license
|
|
@@ -138,5 +138,4 @@ var selection_default = {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
};
|
|
141
|
-
//#endregion
|
|
142
141
|
export { selection_default as default };
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1
|
|
8
|
+
* @version 4.2.0-next.1
|
|
9
9
|
*/
|
|
10
10
|
import { isNumber } from "../../module/util/type-checks.js";
|
|
11
|
-
|
|
11
|
+
// src/ChartInternal/internals/size.axis.ts
|
|
12
12
|
var size_axis_default = {
|
|
13
13
|
/**
|
|
14
14
|
* Get Axis size according its position
|
|
@@ -97,5 +97,4 @@ var size_axis_default = {
|
|
|
97
97
|
return width > (tickCountWithPadding ? xAxisLength / tickCountWithPadding : 0);
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
|
-
//#endregion
|
|
101
100
|
export { size_axis_default as default };
|
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1
|
|
8
|
+
* @version 4.2.0-next.1
|
|
9
9
|
*/
|
|
10
|
+
import { $AXIS, $SUBCHART } from "../../config/classes.js";
|
|
10
11
|
import { document as doc } from "../../module/browser.js";
|
|
11
|
-
import {
|
|
12
|
+
import { KEY } from "../../module/Cache.js";
|
|
12
13
|
import { capitalize } from "../../module/util/object.js";
|
|
14
|
+
import { ceil10, isEmpty, isNumber, isString, isUndefined } from "../../module/util/type-checks.js";
|
|
13
15
|
import { getBoundingRect } from "../../module/util/dom.js";
|
|
14
|
-
|
|
15
|
-
import { KEY } from "../../module/Cache.js";
|
|
16
|
-
//#region src/ChartInternal/internals/size.ts
|
|
16
|
+
// src/ChartInternal/internals/size.ts
|
|
17
17
|
/**
|
|
18
18
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
19
19
|
* billboard.js project is licensed under the MIT license
|
|
@@ -36,7 +36,7 @@ var size_default = {
|
|
|
36
36
|
getCurrentHeight() {
|
|
37
37
|
const $$ = this;
|
|
38
38
|
const { config, state, $el } = $$;
|
|
39
|
-
let h = config.size_height;
|
|
39
|
+
let h = config.size_height || $$.customTypeHooks?.currentHeight?.($$);
|
|
40
40
|
if (!h) {
|
|
41
41
|
const chartNode = state.isCanvasMode ? $el.chart?.node() : null;
|
|
42
42
|
const minHeight = chartNode?.style.minHeight;
|
|
@@ -259,7 +259,7 @@ var size_default = {
|
|
|
259
259
|
const $$ = this;
|
|
260
260
|
const { config, state, $el: { legend } } = $$;
|
|
261
261
|
const isRotated = config.axis_rotated;
|
|
262
|
-
const isNonAxis = $$.hasArcType() || state.
|
|
262
|
+
const isNonAxis = $$.hasArcType() || state.customType || state.hasTreemap;
|
|
263
263
|
const isFitPadding = config.padding?.mode === "fit";
|
|
264
264
|
!isInit && $$.setContainerSize();
|
|
265
265
|
const legendWidth = legend ? $$.getLegendWidth() : 0;
|
|
@@ -335,8 +335,7 @@ var size_default = {
|
|
|
335
335
|
if (hasGauge && !config.gauge_fullCircle) state.arcHeight += state.height - $$.getPaddingBottomForGauge();
|
|
336
336
|
$$.updateRadius?.();
|
|
337
337
|
}
|
|
338
|
-
if (state.isLegendRight && isNonAxis) state.margin3.left = state.arcWidth / 2 + state.radiusExpanded * 1.1;
|
|
338
|
+
if (state.isLegendRight && isNonAxis && !$$.customTypeHooks?.ownLegendLayout) state.margin3.left = state.arcWidth / 2 + state.radiusExpanded * 1.1;
|
|
339
339
|
}
|
|
340
340
|
};
|
|
341
|
-
//#endregion
|
|
342
341
|
export { size_default as default };
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1
|
|
8
|
+
* @version 4.2.0-next.1
|
|
9
9
|
*/
|
|
10
|
-
import { isFunction, isString } from "../../module/util/type-checks.js";
|
|
11
|
-
import { addCssRules } from "../../module/util/dom.js";
|
|
12
10
|
import { $SHAPE } from "../../config/classes.js";
|
|
13
|
-
|
|
11
|
+
import { addCssRules } from "../../module/util/dom.js";
|
|
12
|
+
import { isFunction, isString } from "../../module/util/type-checks.js";
|
|
13
|
+
// src/ChartInternal/internals/style.ts
|
|
14
14
|
var style_default = {
|
|
15
15
|
/**
|
|
16
16
|
* Add props color css rule to given selector
|
|
@@ -44,5 +44,4 @@ var style_default = {
|
|
|
44
44
|
return useCssRule ? null : isFunction(v) ? v.bind(this) : v;
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
|
-
//#endregion
|
|
48
47
|
export { style_default as default };
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1
|
|
8
|
+
* @version 4.2.0-next.1
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
// src/ChartInternal/internals/subchart.util.ts
|
|
11
11
|
/**
|
|
12
12
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
13
13
|
* billboard.js project is licensed under the MIT license
|
|
@@ -45,5 +45,4 @@ function getMainCoordFromSubchartCoord($$, subCoord) {
|
|
|
45
45
|
if (!Number.isFinite(mainCoord) && subLength > 0) mainCoord = Math.max(0, Math.min(1, subCoord / subLength)) * mainLength;
|
|
46
46
|
return Number.isFinite(mainCoord) ? Math.max(0, Math.min(mainLength, mainCoord)) : null;
|
|
47
47
|
}
|
|
48
|
-
//#endregion
|
|
49
48
|
export { getMainCoordFromSubchartCoord, isContinuousGridFocusEnabled };
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1
|
|
8
|
+
* @version 4.2.0-next.1
|
|
9
9
|
*/
|
|
10
|
+
import { $ARC } from "../../config/classes.js";
|
|
10
11
|
import { window as win } from "../../module/browser.js";
|
|
11
12
|
import { isFunction, isObjectType } from "../../module/util/type-checks.js";
|
|
12
13
|
import { setTextValue } from "../../module/util/dom.js";
|
|
13
|
-
import { $ARC } from "../../config/classes.js";
|
|
14
14
|
import { select } from "d3-selection";
|
|
15
|
-
|
|
15
|
+
// src/ChartInternal/internals/text.arc.ts
|
|
16
16
|
/**
|
|
17
17
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
18
18
|
* billboard.js project is licensed under the MIT license
|
|
@@ -176,5 +176,4 @@ function redrawArcLabelLines(duration) {
|
|
|
176
176
|
} else $T(labelLineText, duration).style("opacity", "0");
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
|
-
//#endregion
|
|
180
179
|
export { isLabelWithLine, redrawArcLabelLines };
|