billboard.js 4.1.4 → 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 +11129 -7032
- package/dist/billboard.min.css +2 -2
- package/dist/billboard.min.js +20 -20
- package/dist/billboard.pkgd.js +22703 -14154
- 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 +3 -4
- 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 +15 -9
- 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 +26 -17
- package/dist-esm/ChartInternal/Axis/AxisRendererHelper.js +40 -12
- 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 +25 -19
- 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 +13 -13
- 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 +42 -23
- 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 +9 -9
- 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 +15 -11
- package/dist-esm/ChartInternal/shape/treemap.js +8 -5
- package/dist-esm/canvas/CanvasAxisRenderer.js +28 -328
- 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 +6 -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 +4 -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 +113 -900
- 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/chart.ts +2 -1
- package/src/Chart/api/flow.ts +20 -7
- 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 +29 -20
- package/src/ChartInternal/Axis/AxisRendererHelper.ts +45 -9
- 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/flow.ts +50 -19
- 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 +18 -12
- package/src/ChartInternal/internals/size.ts +5 -3
- package/src/ChartInternal/internals/text.ts +24 -28
- package/src/ChartInternal/internals/tooltip.ts +59 -20
- 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/point.ts +6 -3
- package/src/ChartInternal/shape/radar.ts +30 -1
- package/src/ChartInternal/shape/sankey.ts +242 -0
- package/src/ChartInternal/shape/shape.ts +16 -4
- package/src/ChartInternal/shape/treemap.ts +10 -0
- package/src/Plugin/stanford/index.ts +1 -28
- package/src/canvas/CanvasAxisRenderer.ts +54 -596
- 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/interaction/subchart.ts +4 -0
- 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 +2 -1
- package/src/config/classes.ts +0 -1
- package/src/config/const.ts +30 -21
- package/src/config/resolver/canvas.ts +147 -1293
- 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 +13 -1
- package/types/options.shape.d.ts +431 -0
- package/types/types.d.ts +4 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
3
|
+
* billboard.js project is licensed under the MIT license
|
|
4
|
+
*
|
|
5
|
+
* billboard.js, JavaScript chart library
|
|
6
|
+
* https://naver.github.io/billboard.js/
|
|
7
|
+
*
|
|
8
|
+
* @version 4.2.0-next.1
|
|
9
|
+
*/
|
|
10
|
+
// src/config/Options/shape/sankey.ts
|
|
11
|
+
/**
|
|
12
|
+
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
13
|
+
* billboard.js project is licensed under the MIT license
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* sankey config options
|
|
17
|
+
*/
|
|
18
|
+
var sankey_default = {
|
|
19
|
+
/**
|
|
20
|
+
* Set sankey options.<br>
|
|
21
|
+
* A data series is a source node: its values are the links to the nodes named by `data.x`.
|
|
22
|
+
* A node can be a source and a target at once, which makes a flow of many steps.
|
|
23
|
+
* - **NOTE:** The links can't make a cycle (A → B → A). When they do, an error is logged and nothing is drawn.
|
|
24
|
+
* - **NOTE:** `data.x` is required. Without it, the target nodes are named by their indexes.
|
|
25
|
+
* - **NOTE:** The legend shows the source nodes only. A node that is only a target can't be toggled from the legend.
|
|
26
|
+
*
|
|
27
|
+
* The interactions:
|
|
28
|
+
* - [data.onover](#.data․onover), [data.onout](#.data․onout) and [data.onclick](#.data․onclick) are called with the data of a node `{id, index, value, name}`,
|
|
29
|
+
* or of a link `{id, x, index, value, name, source, target}`, where `id` is the source node, `x` the target node and `name` is "source → target".
|
|
30
|
+
* - `.hide(id)` removes the node and all the links of it, the incoming links included.
|
|
31
|
+
* - `.focus(id)` and the legend hover dim the other nodes and their links.
|
|
32
|
+
* A node that is only a target is dimmed when all the links coming to it are.
|
|
33
|
+
* @name sankey
|
|
34
|
+
* @memberof Options
|
|
35
|
+
* @type {object}
|
|
36
|
+
* @property {object} sankey Sankey object
|
|
37
|
+
* @property {boolean} [sankey.rotated=false] Make the flow go down instead of to the right.
|
|
38
|
+
* The nodes of a step are then in a row, and the steps go from the top to the bottom.
|
|
39
|
+
* @property {number} [sankey.node.width=20] The thickness of the nodes along the flow in pixels: the height of the nodes when rotated.
|
|
40
|
+
* @property {number} [sankey.node.padding=10] The space between the nodes of a step in pixels.
|
|
41
|
+
* @property {string} [sankey.node.align="justify"] How the nodes are placed in the columns.
|
|
42
|
+
* - **justify**: as `left`, and the nodes without outgoing links go to the last column
|
|
43
|
+
* - **left**: by the number of the links from the sources
|
|
44
|
+
* - **right**: by the number of the links to the last nodes
|
|
45
|
+
* - **center**: as `left`, and the nodes without incoming links go next to their targets
|
|
46
|
+
* @property {string} [sankey.link.color="source"] The color of the links.
|
|
47
|
+
* - **source**: the color of the source node
|
|
48
|
+
* - **target**: the color of the target node
|
|
49
|
+
* - **gradient**: a gradient from the color of the source node to the color of the target node
|
|
50
|
+
* @property {number} [sankey.link.opacity] The opacity of the links, from 0 to 1.
|
|
51
|
+
* When it isn't set, the opacity is of the stylesheet (0.4 by the default themes). In SVG, a hovered link is 0.3 more opaque.
|
|
52
|
+
* @property {string|function} [sankey.node.sort="auto"] The order of the nodes in a step.
|
|
53
|
+
* - **auto**: the layout orders them, to have less crossing links
|
|
54
|
+
* - **data**: the order the nodes appear in the data: a series, then the nodes of its links, then the next series
|
|
55
|
+
* - **asc**, **desc**: by the value of the nodes
|
|
56
|
+
* - **function(a, b)**: a comparator of the data of two nodes `{id, index, value, name}`, as for `Array.sort()`
|
|
57
|
+
* - **NOTE:** A set order (other than "auto") is kept: the layout moves the nodes, but doesn't change their order.
|
|
58
|
+
* @property {number} [sankey.node.border.width=0] The width of the border of the nodes in pixels.
|
|
59
|
+
* @property {string} [sankey.node.border.color="#000"] The color of the border of the nodes.
|
|
60
|
+
* @property {number} [sankey.iterations=6] The number of the passes to place the nodes vertically.
|
|
61
|
+
* @property {boolean} [sankey.label.show=true] Show the names of the nodes.
|
|
62
|
+
* @property {function} [sankey.label.format] Set the formatter of the node names.
|
|
63
|
+
* - **NOTE:** The arguments are the name, the value and the id of the node.
|
|
64
|
+
* @see [Demo](https://naver.github.io/billboard.js/demo/#Chart.SankeyChart)
|
|
65
|
+
* @example
|
|
66
|
+
* data: {
|
|
67
|
+
* x: "x",
|
|
68
|
+
* columns: [
|
|
69
|
+
* // the target nodes
|
|
70
|
+
* ["x", "B", "C", "D"],
|
|
71
|
+
* // the links of the source node A: A → B 5, A → C 3
|
|
72
|
+
* ["A", 5, 3, 0],
|
|
73
|
+
* // B is a target and a source
|
|
74
|
+
* ["B", 0, 2, 4]
|
|
75
|
+
* ],
|
|
76
|
+
* type: "sankey" // for ESM, import {sankey} from "billboard.js" and do type: sankey()
|
|
77
|
+
* },
|
|
78
|
+
* sankey: {
|
|
79
|
+
* node: {
|
|
80
|
+
* width: 20,
|
|
81
|
+
* padding: 15,
|
|
82
|
+
* align: "left",
|
|
83
|
+
* sort: "desc",
|
|
84
|
+
* border: {
|
|
85
|
+
* width: 1,
|
|
86
|
+
* color: "#fff"
|
|
87
|
+
* }
|
|
88
|
+
* },
|
|
89
|
+
* rotated: true,
|
|
90
|
+
* link: {
|
|
91
|
+
* color: "gradient",
|
|
92
|
+
* opacity: 0.6
|
|
93
|
+
* },
|
|
94
|
+
* iterations: 10,
|
|
95
|
+
* label: {
|
|
96
|
+
* show: true,
|
|
97
|
+
* format: function(name, value, id) {
|
|
98
|
+
* return name + " (" + value + ")";
|
|
99
|
+
* }
|
|
100
|
+
* }
|
|
101
|
+
* }
|
|
102
|
+
*/
|
|
103
|
+
sankey_rotated: false,
|
|
104
|
+
sankey_node_width: 20,
|
|
105
|
+
sankey_node_padding: 10,
|
|
106
|
+
sankey_node_align: "justify",
|
|
107
|
+
sankey_node_sort: "auto",
|
|
108
|
+
sankey_node_border_width: 0,
|
|
109
|
+
sankey_node_border_color: "#000",
|
|
110
|
+
sankey_link_color: "source",
|
|
111
|
+
sankey_link_opacity: void 0,
|
|
112
|
+
sankey_iterations: 6,
|
|
113
|
+
sankey_label_show: true,
|
|
114
|
+
sankey_label_format: void 0
|
|
115
|
+
};
|
|
116
|
+
export { sankey_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/config/Options/shape/scatter.ts
|
|
11
11
|
/**
|
|
12
12
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
13
13
|
* billboard.js project is licensed under the MIT license
|
|
@@ -42,5 +42,4 @@ var scatter_default = {
|
|
|
42
42
|
* }
|
|
43
43
|
*/
|
|
44
44
|
scatter_zerobased: false };
|
|
45
|
-
//#endregion
|
|
46
45
|
export { scatter_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/config/Options/shape/spline.ts
|
|
11
11
|
/**
|
|
12
12
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
13
13
|
* billboard.js project is licensed under the MIT license
|
|
@@ -52,5 +52,4 @@ var spline_default = {
|
|
|
52
52
|
* }
|
|
53
53
|
*/
|
|
54
54
|
spline_interpolation_type: "cardinal" };
|
|
55
|
-
//#endregion
|
|
56
55
|
export { spline_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/config/Options/shape/treemap.ts
|
|
11
11
|
/**
|
|
12
12
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
13
13
|
* billboard.js project is licensed under the MIT license
|
|
@@ -87,5 +87,4 @@ var treemap_default = {
|
|
|
87
87
|
treemap_label_threshold: .05,
|
|
88
88
|
treemap_label_show: true
|
|
89
89
|
};
|
|
90
|
-
//#endregion
|
|
91
90
|
export { treemap_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/config/Store/Element.ts
|
|
11
11
|
/**
|
|
12
12
|
* Elements class.
|
|
13
13
|
* @class Elements
|
|
@@ -70,5 +70,4 @@ var Element = class {
|
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
|
-
//#endregion
|
|
74
73
|
export { Element 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/config/Store/State.ts
|
|
11
11
|
/**
|
|
12
12
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
13
13
|
* billboard.js project is licensed under the MIT license
|
|
@@ -47,12 +47,13 @@ var State = class {
|
|
|
47
47
|
arcHeight: 0,
|
|
48
48
|
xAxisHeight: 0,
|
|
49
49
|
hasAxis: false,
|
|
50
|
-
|
|
50
|
+
customType: null,
|
|
51
51
|
hasRadar: false,
|
|
52
52
|
hasTreemap: false,
|
|
53
53
|
isCanvasMode: false,
|
|
54
54
|
canvasShape: null,
|
|
55
55
|
canvasFocusKey: null,
|
|
56
|
+
canvasFocusData: null,
|
|
56
57
|
canvasSubchartBrushDragging: false,
|
|
57
58
|
canvasSubchartBrushMode: null,
|
|
58
59
|
canvasSubchartBrushStart: null,
|
|
@@ -199,5 +200,4 @@ var State = class {
|
|
|
199
200
|
};
|
|
200
201
|
}
|
|
201
202
|
};
|
|
202
|
-
//#endregion
|
|
203
203
|
export { State as default };
|
|
@@ -5,11 +5,11 @@
|
|
|
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 Element from "./Element.js";
|
|
11
11
|
import State from "./State.js";
|
|
12
|
-
|
|
12
|
+
// src/config/Store/Store.ts
|
|
13
13
|
/**
|
|
14
14
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
15
15
|
* billboard.js project is licensed under the MIT license
|
|
@@ -34,5 +34,4 @@ var Store = class {
|
|
|
34
34
|
return this[name];
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
-
//#endregion
|
|
38
37
|
export { Store 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/config/classes.ts
|
|
11
11
|
/**
|
|
12
12
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
13
13
|
* billboard.js project is licensed under the MIT license
|
|
@@ -201,7 +201,6 @@ var classes_default = {
|
|
|
201
201
|
...$LINE,
|
|
202
202
|
...$EVENT,
|
|
203
203
|
...$FOCUS,
|
|
204
|
-
...$FUNNEL,
|
|
205
204
|
...$GRID,
|
|
206
205
|
...$LEVEL,
|
|
207
206
|
...$RADAR,
|
|
@@ -214,5 +213,4 @@ var classes_default = {
|
|
|
214
213
|
...$TREEMAP,
|
|
215
214
|
...$ZOOM
|
|
216
215
|
};
|
|
217
|
-
//#endregion
|
|
218
216
|
export { $ARC, $AREA, $AXIS, $BAR, $CANDLESTICK, $CIRCLE, $COLOR, $COMMON, $DRAG, $EVENT, $FOCUS, $FUNNEL, $GAUGE, $GRID, $LEGEND, $LEVEL, $LINE, $RADAR, $REGION, $SELECT, $SHAPE, $SUBCHART, $TEXT, $TOOLTIP, $TREEMAP, $ZOOM, classes_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 { isDefined, isObjectType } from "../module/util/type-checks.js";
|
|
11
|
-
|
|
11
|
+
// src/config/config.ts
|
|
12
12
|
/**
|
|
13
13
|
* Load configuration option
|
|
14
14
|
* @param {object} config User's generation config value
|
|
@@ -34,5 +34,4 @@ function loadConfig(config) {
|
|
|
34
34
|
});
|
|
35
35
|
if (this.api) this.state.orgConfig = config;
|
|
36
36
|
}
|
|
37
|
-
//#endregion
|
|
38
37
|
export { loadConfig };
|
package/dist-esm/config/const.js
CHANGED
|
@@ -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/config/const.ts
|
|
11
11
|
/**
|
|
12
12
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
13
13
|
* billboard.js project is licensed under the MIT license
|
|
@@ -69,29 +69,38 @@ const SUBCHART_BRUSH_HANDLE_PATH = {
|
|
|
69
69
|
};
|
|
70
70
|
/**
|
|
71
71
|
* Chart type module and its method from ChartInternal class, needed to be initialized.
|
|
72
|
+
* It is keyed by the name given to `data.type`, for the types of their own module too.
|
|
73
|
+
* The method has to be there for every mode: the module of "billboard.js/canvas" has no part
|
|
74
|
+
* for the svg mode (see getTypeMethod()), so it is a method of the part both of them have.
|
|
75
|
+
* Used by checkModuleImport() to tell that the module of a type was not imported: a name that is not
|
|
76
|
+
* here (a typo for example) is never reported.
|
|
72
77
|
* @private
|
|
73
78
|
*/
|
|
74
79
|
const TYPE_METHOD_NEEDED = {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
80
|
+
area: "initArea",
|
|
81
|
+
"area-line-range": "initArea",
|
|
82
|
+
"area-spline": "initArea",
|
|
83
|
+
"area-spline-range": "initArea",
|
|
84
|
+
"area-step": "initArea",
|
|
85
|
+
"area-step-range": "initArea",
|
|
86
|
+
bar: "initBar",
|
|
87
|
+
bubble: "initCircle",
|
|
88
|
+
boxplot: "initBoxplot",
|
|
89
|
+
bullet: "getBulletData",
|
|
90
|
+
candlestick: "initCandlestick",
|
|
91
|
+
donut: "initArc",
|
|
92
|
+
funnel: "initFunnel",
|
|
93
|
+
gauge: "initArc",
|
|
94
|
+
line: "initLine",
|
|
95
|
+
pie: "initArc",
|
|
96
|
+
polar: "initPolar",
|
|
97
|
+
radar: "initCircle",
|
|
98
|
+
heatmap: "getHeatmapLayout",
|
|
99
|
+
sankey: "getSankeyLayout",
|
|
100
|
+
scatter: "initCircle",
|
|
101
|
+
spline: "initLine",
|
|
102
|
+
step: "initLine",
|
|
103
|
+
treemap: "initTreemap"
|
|
95
104
|
};
|
|
96
105
|
/**
|
|
97
106
|
* chart types by category
|
|
@@ -140,5 +149,4 @@ const TYPE_BY_CATEGORY = {
|
|
|
140
149
|
TYPE.AREA_SPLINE_RANGE
|
|
141
150
|
]
|
|
142
151
|
};
|
|
143
|
-
//#endregion
|
|
144
152
|
export { API_MODULE_NEEDED, SUBCHART_BRUSH_HANDLE_PATH, TYPE, TYPE_BY_CATEGORY, TYPE_METHOD_NEEDED };
|
|
@@ -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 Chart from "../../Chart/Chart.js";
|
|
11
|
+
import ChartInternal from "../../ChartInternal/ChartInternal.js";
|
|
10
12
|
import { extend } from "../../module/util/object.js";
|
|
11
13
|
import Options from "../Options/Options.js";
|
|
12
|
-
import ChartInternal from "../../ChartInternal/ChartInternal.js";
|
|
13
|
-
import Chart from "../../Chart/Chart.js";
|
|
14
14
|
import { api, internal, options } from "./axis.js";
|
|
15
|
-
|
|
15
|
+
// src/config/resolver/axis.core.ts
|
|
16
16
|
/**
|
|
17
17
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
18
18
|
* billboard.js project is licensed under the MIT license
|
|
@@ -37,5 +37,4 @@ function extendAxisModules(module = [], option = []) {
|
|
|
37
37
|
extend(Chart.prototype, api);
|
|
38
38
|
Options.setOptions(getValues(options).concat(option));
|
|
39
39
|
}
|
|
40
|
-
//#endregion
|
|
41
40
|
export { extendAxisModules };
|
|
@@ -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
|
|
8
|
+
* @version 4.2.0-next.1
|
|
9
9
|
*/
|
|
10
10
|
import axis_default from "../../Chart/api/axis.js";
|
|
11
11
|
import group_default from "../../Chart/api/group.js";
|
|
@@ -16,7 +16,7 @@ import clip_default from "../../ChartInternal/internals/clip.js";
|
|
|
16
16
|
import size_axis_default from "../../ChartInternal/internals/size.axis.js";
|
|
17
17
|
import axis_default$1 from "../Options/axis/axis.js";
|
|
18
18
|
import axis_default$2 from "../Options/data/axis.js";
|
|
19
|
-
|
|
19
|
+
// src/config/resolver/axis.ts
|
|
20
20
|
/**
|
|
21
21
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
22
22
|
* billboard.js project is licensed under the MIT license
|
|
@@ -39,5 +39,4 @@ const options = {
|
|
|
39
39
|
optDataAxis: axis_default$2,
|
|
40
40
|
optAxis: axis_default$1
|
|
41
41
|
};
|
|
42
|
-
//#endregion
|
|
43
42
|
export { api, internal, options };
|