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,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
3
|
+
* billboard.js project is licensed under the MIT license
|
|
4
|
+
*/
|
|
5
|
+
import canvasBoxplotDraw from "../../canvas/boxplot";
|
|
6
|
+
import shapeBoxplotCommon from "../../ChartInternal/shape/core/boxplot";
|
|
7
|
+
import optPoint from "../Options/common/point";
|
|
8
|
+
import optBoxplot from "../Options/shape/boxplot";
|
|
9
|
+
import {extendAxisModules} from "./axis.core";
|
|
10
|
+
import {registerAxisType} from "./customType";
|
|
11
|
+
import {boxplotAxisType} from "./shape/boxplot";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Canvas boxplot shape marker.
|
|
15
|
+
* Installed to satisfy chart type import checks without importing the SVG boxplot renderer.
|
|
16
|
+
* @private
|
|
17
|
+
*/
|
|
18
|
+
const canvasBoxplotModule = {
|
|
19
|
+
/**
|
|
20
|
+
* No-op canvas boxplot initializer.
|
|
21
|
+
* Canvas mode draws boxplots through the module of the type.
|
|
22
|
+
* @private
|
|
23
|
+
*/
|
|
24
|
+
initBoxplot(): void {},
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* No-op: boxplot has no SVG elements in canvas mode.
|
|
28
|
+
* @private
|
|
29
|
+
*/
|
|
30
|
+
updateTargetsForBoxplot(): void {}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Register modules and options required for canvas boxplot charts.
|
|
35
|
+
* Canvas mode draws the boxplot through the module of the type: bundles without it do not carry it.
|
|
36
|
+
* @returns {string} Boxplot chart type
|
|
37
|
+
*/
|
|
38
|
+
export let boxplot = (): string => (
|
|
39
|
+
extendAxisModules([canvasBoxplotModule, shapeBoxplotCommon], [optPoint, optBoxplot]),
|
|
40
|
+
registerAxisType("boxplot", {...boxplotAxisType, canvas: canvasBoxplotDraw}),
|
|
41
|
+
(boxplot = () => "boxplot")()
|
|
42
|
+
);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
3
|
+
* billboard.js project is licensed under the MIT license
|
|
4
|
+
*/
|
|
5
|
+
import canvasBulletDraw from "../../canvas/bullet";
|
|
6
|
+
import shapeBulletCommon, {customTypeHooks} from "../../ChartInternal/shape/core/bullet";
|
|
7
|
+
import optBullet from "../Options/shape/bullet";
|
|
8
|
+
import {extendAxisModules} from "./axis.core";
|
|
9
|
+
import {registerCustomType} from "./customType";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Register modules and options required for canvas bullet charts.
|
|
13
|
+
* Canvas mode draws bullets through the module of the type: bundles without it do not carry it.
|
|
14
|
+
* @returns {string} Bullet chart type
|
|
15
|
+
*/
|
|
16
|
+
export let bullet = (): string => (
|
|
17
|
+
extendAxisModules([shapeBulletCommon], [optBullet]),
|
|
18
|
+
registerCustomType("bullet", {hooks: customTypeHooks, canvas: canvasBulletDraw}),
|
|
19
|
+
(bullet = () => "bullet")()
|
|
20
|
+
);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
3
|
+
* billboard.js project is licensed under the MIT license
|
|
4
|
+
*/
|
|
5
|
+
import canvasFlow from "../../canvas/flow";
|
|
6
|
+
import ChartInternal from "../../ChartInternal/ChartInternal";
|
|
7
|
+
import {extend} from "../../module/util";
|
|
8
|
+
import {flow as svgFlow} from "./flow";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Enable chart flow API for the canvas entry: the flow module with the canvas animation.
|
|
12
|
+
* @returns {object} Empty options object (safe to spread into bb.generate())
|
|
13
|
+
*/
|
|
14
|
+
export let flow = (): Record<string, never> => {
|
|
15
|
+
svgFlow();
|
|
16
|
+
extend(ChartInternal.prototype, canvasFlow);
|
|
17
|
+
return (flow = () => ({}))();
|
|
18
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
3
|
+
* billboard.js project is licensed under the MIT license
|
|
4
|
+
*/
|
|
5
|
+
import canvasGrid from "../../canvas/grid";
|
|
6
|
+
import {registerCanvasFeature} from "./canvasType";
|
|
7
|
+
import {grid as svgGrid} from "./grid";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Enable grid for the canvas entry: the grid module with the canvas drawing of the grid.
|
|
11
|
+
* @returns {object} Empty options object (safe to spread into bb.generate())
|
|
12
|
+
*/
|
|
13
|
+
export let grid = (): Record<string, never> => {
|
|
14
|
+
svgGrid();
|
|
15
|
+
registerCanvasFeature("grid", canvasGrid);
|
|
16
|
+
return (grid = () => ({}))();
|
|
17
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
3
|
+
* billboard.js project is licensed under the MIT license
|
|
4
|
+
*/
|
|
5
|
+
import canvasHeatmapDraw from "../../canvas/heatmap";
|
|
6
|
+
import ChartInternal from "../../ChartInternal/ChartInternal";
|
|
7
|
+
import shapeHeatmapCommon, {customTypeHooks} from "../../ChartInternal/shape/core/heatmap";
|
|
8
|
+
import {extend} from "../../module/util";
|
|
9
|
+
import Options from "../Options/Options";
|
|
10
|
+
import optHeatmap from "../Options/shape/heatmap";
|
|
11
|
+
import {registerCustomType} from "./customType";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Register modules and options required for canvas heatmap charts.
|
|
15
|
+
* Canvas mode draws the heatmap through the module of the type: bundles without it do not carry it.
|
|
16
|
+
* @returns {string} Heatmap chart type
|
|
17
|
+
*/
|
|
18
|
+
export let heatmap = (): string => (
|
|
19
|
+
extend(ChartInternal.prototype, [shapeHeatmapCommon]),
|
|
20
|
+
Options.setOptions([optHeatmap]),
|
|
21
|
+
registerCustomType("heatmap", {hooks: customTypeHooks, canvas: canvasHeatmapDraw}),
|
|
22
|
+
(heatmap = () => "heatmap")()
|
|
23
|
+
);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
3
|
+
* billboard.js project is licensed under the MIT license
|
|
4
|
+
*/
|
|
5
|
+
import canvasSankeyDraw from "../../canvas/sankey";
|
|
6
|
+
import ChartInternal from "../../ChartInternal/ChartInternal";
|
|
7
|
+
import shapeSankeyCommon, {customTypeHooks} from "../../ChartInternal/shape/core/sankey";
|
|
8
|
+
import {extend} from "../../module/util";
|
|
9
|
+
import Options from "../Options/Options";
|
|
10
|
+
import optSankey from "../Options/shape/sankey";
|
|
11
|
+
import {registerCustomType} from "./customType";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Register modules and options required for canvas sankey charts.
|
|
15
|
+
* Canvas mode draws the sankey through the module of the type: bundles without it do not carry it.
|
|
16
|
+
* @returns {string} Sankey chart type
|
|
17
|
+
*/
|
|
18
|
+
export let sankey = (): string => (
|
|
19
|
+
extend(ChartInternal.prototype, [shapeSankeyCommon]),
|
|
20
|
+
Options.setOptions([optSankey]),
|
|
21
|
+
registerCustomType("sankey", {hooks: customTypeHooks, canvas: canvasSankeyDraw}),
|
|
22
|
+
(sankey = () => "sankey")()
|
|
23
|
+
);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
3
|
+
* billboard.js project is licensed under the MIT license
|
|
4
|
+
*/
|
|
5
|
+
import canvasSelection, {selectionDraw} from "../../canvas/selection";
|
|
6
|
+
import ChartInternal from "../../ChartInternal/ChartInternal";
|
|
7
|
+
import {extend} from "../../module/util";
|
|
8
|
+
import {registerCanvasFeature} from "./canvasType";
|
|
9
|
+
import {selectionModule} from "./interaction/selection";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Enable data selection for the canvas entry: the selection module with the canvas selection.
|
|
13
|
+
* @returns {boolean} true
|
|
14
|
+
*/
|
|
15
|
+
export let selection = (): boolean => {
|
|
16
|
+
selectionModule();
|
|
17
|
+
extend(ChartInternal.prototype, canvasSelection);
|
|
18
|
+
registerCanvasFeature("selection", selectionDraw);
|
|
19
|
+
return (selection = () => true)();
|
|
20
|
+
};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
3
3
|
* billboard.js project is licensed under the MIT license
|
|
4
4
|
*/
|
|
5
|
+
import canvasTreemap from "../../canvas/treemap";
|
|
5
6
|
import shapeBubbleCommon from "../../ChartInternal/shape/core/bubble";
|
|
6
7
|
import shapeCandlestickCommon from "../../ChartInternal/shape/core/candlestick";
|
|
7
8
|
import shapeTreemapCommon from "../../ChartInternal/shape/core/treemap";
|
|
@@ -16,6 +17,7 @@ import optScatter from "../Options/shape/scatter";
|
|
|
16
17
|
import optSpline from "../Options/shape/spline";
|
|
17
18
|
import optTreemap from "../Options/shape/treemap";
|
|
18
19
|
import {extendAxisModules} from "./axis.core";
|
|
20
|
+
import {registerCanvasType} from "./canvasType";
|
|
19
21
|
|
|
20
22
|
/**
|
|
21
23
|
* Canvas line shape marker.
|
|
@@ -254,5 +256,8 @@ export let treemap = (): string => (
|
|
|
254
256
|
extendCanvasAxisShape(
|
|
255
257
|
[canvasTreemapModule, shapeTreemapCommon],
|
|
256
258
|
[optTreemap]
|
|
257
|
-
),
|
|
259
|
+
),
|
|
260
|
+
// the canvas drawing, hit detection and theme of treemap: only when its module is there
|
|
261
|
+
registerCanvasType("treemap", canvasTreemap),
|
|
262
|
+
(treemap = () => TYPE.TREEMAP)()
|
|
258
263
|
);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
3
|
+
* billboard.js project is licensed under the MIT license
|
|
4
|
+
*/
|
|
5
|
+
import canvasSubchart, {subchartDraw} from "../../canvas/subchart";
|
|
6
|
+
import ChartInternal from "../../ChartInternal/ChartInternal";
|
|
7
|
+
import {extend} from "../../module/util";
|
|
8
|
+
import {registerCanvasFeature} from "./canvasType";
|
|
9
|
+
import {subchartModule} from "./interaction/subchart";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Enable subchart for the canvas entry: the subchart module with the canvas drawing and brush.
|
|
13
|
+
* @returns {boolean} true
|
|
14
|
+
*/
|
|
15
|
+
export let subchart = (): boolean => {
|
|
16
|
+
subchartModule();
|
|
17
|
+
extend(ChartInternal.prototype, canvasSubchart);
|
|
18
|
+
registerCanvasFeature("subchart", subchartDraw);
|
|
19
|
+
return (subchart = () => true)();
|
|
20
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
3
|
+
* billboard.js project is licensed under the MIT license
|
|
4
|
+
*/
|
|
5
|
+
import ChartInternal from "../../ChartInternal/ChartInternal";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* What the module of a chart type adds to the canvas drawing of the chart.
|
|
9
|
+
* Unlike a custom type (one at most for a chart), more of these can be active in a chart:
|
|
10
|
+
* the parts of every type the chart has are used.
|
|
11
|
+
* The functions are called with the chart (ChartInternal) as `this`.
|
|
12
|
+
* @private
|
|
13
|
+
*/
|
|
14
|
+
export interface ICanvasTypeParts {
|
|
15
|
+
// the type is the whole chart: it is drawn and hit alone, and nothing else is (treemap)
|
|
16
|
+
exclusive?: boolean;
|
|
17
|
+
// draw the type: renderer is the CanvasRenderer
|
|
18
|
+
draw?: (renderer, shape?, focusData?) => void;
|
|
19
|
+
// add the hit items of the type: detector is the HitDetector
|
|
20
|
+
hits?: (detector) => void;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Register the canvas parts of a chart type, by the name of the type.
|
|
25
|
+
* The parts of a type are kept apart from those of the others, so a bundle has the canvas code
|
|
26
|
+
* of the types it imports only. Registering a name again adds to what is there.
|
|
27
|
+
* @param {string} name Chart type name
|
|
28
|
+
* @param {object} parts Canvas parts of the type
|
|
29
|
+
* @private
|
|
30
|
+
*/
|
|
31
|
+
export function registerCanvasType(name: string, parts: ICanvasTypeParts): void {
|
|
32
|
+
const proto: any = ChartInternal.prototype;
|
|
33
|
+
const types = proto.canvasTypes || (proto.canvasTypes = {});
|
|
34
|
+
|
|
35
|
+
types[name] = {...types[name], ...parts};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Register the canvas drawing of an optional feature (grid, flow, subchart...), by feature name.
|
|
40
|
+
* The module of the feature adds it, so bundles without the module do not carry it.
|
|
41
|
+
* The functions are called with the chart (ChartInternal) as `this`.
|
|
42
|
+
* @param {string} name Feature name
|
|
43
|
+
* @param {object} parts Canvas functions of the feature
|
|
44
|
+
* @private
|
|
45
|
+
*/
|
|
46
|
+
export function registerCanvasFeature(name: string, parts: Record<string, any>): void {
|
|
47
|
+
const proto: any = ChartInternal.prototype;
|
|
48
|
+
const features = proto.canvasFeatures || (proto.canvasFeatures = {});
|
|
49
|
+
|
|
50
|
+
features[name] = {...features[name], ...parts};
|
|
51
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
3
|
+
* billboard.js project is licensed under the MIT license
|
|
4
|
+
*/
|
|
5
|
+
import ChartInternal from "../../ChartInternal/ChartInternal";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* What the module of a chart type of its own adds to the chart.
|
|
9
|
+
* - hooks: how the shared code works with the type (labels, tooltip)
|
|
10
|
+
* - canvas: how the type is drawn on canvas (`draw`, `hits`) and styled (`theme`)
|
|
11
|
+
* @private
|
|
12
|
+
*/
|
|
13
|
+
export interface ICustomTypeParts {
|
|
14
|
+
hooks?: Record<string, any>;
|
|
15
|
+
canvas?: {draw?: (renderer) => void, hits?: (detector) => void, theme?: Record<string, any>};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Register the parts of a chart type of its own module, by the name of the type.
|
|
20
|
+
* The parts of a type are kept apart from those of the others, so a bundle can have more than one
|
|
21
|
+
* of these modules. Registering a name again adds to what is there: the svg part and the canvas
|
|
22
|
+
* part of a type are registered by their own resolvers.
|
|
23
|
+
* @param {string} name Chart type name
|
|
24
|
+
* @param {object} parts Parts of the type
|
|
25
|
+
* @private
|
|
26
|
+
*/
|
|
27
|
+
export function registerCustomType(name: string, parts: ICustomTypeParts): void {
|
|
28
|
+
const proto: any = ChartInternal.prototype;
|
|
29
|
+
const types = proto.customTypes || (proto.customTypes = {});
|
|
30
|
+
|
|
31
|
+
types[name] = {...types[name], ...parts};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Register a chart type of its own module that is drawn on the axes (the type of the chart
|
|
36
|
+
* keeps its axes, unlike the types of registerCustomType()).
|
|
37
|
+
* The shared code reaches the type by name: the lists of shapes of the axes, the hit of the
|
|
38
|
+
* pointer (`hit`) and the rows of the tooltip (`tooltipRows`).
|
|
39
|
+
* @param {string} name Chart type name
|
|
40
|
+
* @param {object} parts Hooks of the type
|
|
41
|
+
* @param {boolean} parts.padded Whether the x axis gets the room of a bar at each end
|
|
42
|
+
* @param {function} parts.domainValues Get the values of a data row that the y domain has to cover
|
|
43
|
+
* @param {function} parts.hit Get the selector of the shape of a data row, to check the pointer on it
|
|
44
|
+
* @param {function} parts.tooltipRows Get the [name, value] pairs of a data row
|
|
45
|
+
* @param {object} parts.canvas Canvas parts of the type
|
|
46
|
+
* @param {function} parts.canvas.draw Draw the shapes of the type
|
|
47
|
+
* @param {function} parts.canvas.hits Add the hit items of the shapes
|
|
48
|
+
* @param {function} parts.canvas.theme Get the canvas theme of the type
|
|
49
|
+
* @private
|
|
50
|
+
*/
|
|
51
|
+
export function registerAxisType(
|
|
52
|
+
name: string,
|
|
53
|
+
parts: {
|
|
54
|
+
padded?: boolean,
|
|
55
|
+
domainValues?: ($$, row) => number[],
|
|
56
|
+
hit?: ($$, d) => string,
|
|
57
|
+
tooltipRows?: ($$, row, format, param) => string[][],
|
|
58
|
+
canvas?: {
|
|
59
|
+
draw?: (renderer, shape) => void,
|
|
60
|
+
hits?: (detector, context) => void,
|
|
61
|
+
theme?: Record<string, any>
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
): void {
|
|
65
|
+
const proto: any = ChartInternal.prototype;
|
|
66
|
+
const types = proto.axisTypes || (proto.axisTypes = {});
|
|
67
|
+
|
|
68
|
+
types[name] = {...types[name], ...parts};
|
|
69
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
3
|
+
* billboard.js project is licensed under the MIT license
|
|
4
|
+
*/
|
|
5
|
+
import shapeBoxplot from "../../../ChartInternal/shape/boxplot";
|
|
6
|
+
import shapeBoxplotCommon, {$BOXPLOT} from "../../../ChartInternal/shape/core/boxplot";
|
|
7
|
+
import shapePointCommon from "../../../ChartInternal/shape/core/point";
|
|
8
|
+
import {$COMMON} from "../../classes";
|
|
9
|
+
import optPoint from "../../Options/common/point";
|
|
10
|
+
import optBoxplot from "../../Options/shape/boxplot";
|
|
11
|
+
import {registerAxisType} from "../customType";
|
|
12
|
+
import {extendAxis} from "./axis.helpers";
|
|
13
|
+
|
|
14
|
+
// what the shared code uses of the type: the hit of the pointer and the rows of the tooltip
|
|
15
|
+
export const boxplotAxisType = {
|
|
16
|
+
padded: true,
|
|
17
|
+
domainValues: ($$, row) => shapeBoxplotCommon.getBoxplotDomainValues.call($$, row),
|
|
18
|
+
// the box of the shape: the pointer is on the data when it is within the box
|
|
19
|
+
hit: ($$, d) =>
|
|
20
|
+
`.${$BOXPLOT.chartBoxplot}.${$COMMON.target}${
|
|
21
|
+
$$.getTargetSelectorSuffix(d.id)
|
|
22
|
+
} .${$BOXPLOT.boxplot}-${d.index} .${$BOXPLOT.boxplotBox}`,
|
|
23
|
+
tooltipRows: ($$, row, format, param) =>
|
|
24
|
+
shapeBoxplotCommon.getBoxplotTooltipRows.call($$, row, format, param)
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export let boxplot = (): string => (
|
|
28
|
+
extendAxis([shapeBoxplot, shapePointCommon], [optBoxplot, optPoint]),
|
|
29
|
+
registerAxisType("boxplot", boxplotAxisType),
|
|
30
|
+
(boxplot = () => "boxplot")()
|
|
31
|
+
);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
3
|
+
* billboard.js project is licensed under the MIT license
|
|
4
|
+
*/
|
|
5
|
+
import ChartInternal from "../../../ChartInternal/ChartInternal";
|
|
6
|
+
import shapeBullet from "../../../ChartInternal/shape/bullet";
|
|
7
|
+
import {customTypeHooks} from "../../../ChartInternal/shape/core/bullet";
|
|
8
|
+
import {extend} from "../../../module/util";
|
|
9
|
+
import Options from "../../Options/Options";
|
|
10
|
+
import optBullet from "../../Options/shape/bullet";
|
|
11
|
+
import {registerCustomType} from "../customType";
|
|
12
|
+
|
|
13
|
+
export let bullet = (): string => (
|
|
14
|
+
extend(ChartInternal.prototype, [shapeBullet]),
|
|
15
|
+
Options.setOptions([optBullet]),
|
|
16
|
+
registerCustomType("bullet", {hooks: customTypeHooks}),
|
|
17
|
+
(bullet = () => "bullet")()
|
|
18
|
+
);
|
|
@@ -2,11 +2,17 @@
|
|
|
2
2
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
3
3
|
* billboard.js project is licensed under the MIT license
|
|
4
4
|
*/
|
|
5
|
-
import shapeFunnel from "../../../ChartInternal/shape/funnel";
|
|
5
|
+
import shapeFunnel, {customTypeHooks} from "../../../ChartInternal/shape/funnel";
|
|
6
|
+
import CLASS, {$FUNNEL} from "../../classes";
|
|
6
7
|
import {TYPE} from "../../const";
|
|
7
8
|
import optFunnel from "../../Options/shape/funnel";
|
|
9
|
+
import {registerCustomType} from "../customType";
|
|
8
10
|
import {extendArc} from "./arc.helpers";
|
|
9
11
|
|
|
10
12
|
export let funnel = (): string => (
|
|
11
|
-
extendArc([shapeFunnel], [optFunnel]),
|
|
13
|
+
extendArc([shapeFunnel], [optFunnel]),
|
|
14
|
+
// the classes of the type are in the map of the classes only when its module is there
|
|
15
|
+
Object.assign(CLASS, $FUNNEL),
|
|
16
|
+
registerCustomType("funnel", {hooks: customTypeHooks}),
|
|
17
|
+
(funnel = () => TYPE.FUNNEL)()
|
|
12
18
|
);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
3
|
+
* billboard.js project is licensed under the MIT license
|
|
4
|
+
*/
|
|
5
|
+
import ChartInternal from "../../../ChartInternal/ChartInternal";
|
|
6
|
+
import {customTypeHooks} from "../../../ChartInternal/shape/core/heatmap";
|
|
7
|
+
import shapeHeatmap from "../../../ChartInternal/shape/heatmap";
|
|
8
|
+
import {extend} from "../../../module/util";
|
|
9
|
+
import Options from "../../Options/Options";
|
|
10
|
+
import optHeatmap from "../../Options/shape/heatmap";
|
|
11
|
+
import {registerCustomType} from "../customType";
|
|
12
|
+
|
|
13
|
+
export let heatmap = (): string => (
|
|
14
|
+
extend(ChartInternal.prototype, [shapeHeatmap]),
|
|
15
|
+
Options.setOptions([optHeatmap]),
|
|
16
|
+
registerCustomType("heatmap", {hooks: customTypeHooks}),
|
|
17
|
+
(heatmap = () => "heatmap")()
|
|
18
|
+
);
|
|
@@ -4,14 +4,18 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export {area, areaLineRange, areaSpline, areaSplineRange, areaStep, areaStepRange} from "./area";
|
|
6
6
|
export {bar} from "./bar";
|
|
7
|
+
export {boxplot} from "./boxplot";
|
|
7
8
|
export {bubble} from "./bubble";
|
|
9
|
+
export {bullet} from "./bullet";
|
|
8
10
|
export {candlestick} from "./candlestick";
|
|
9
11
|
export {donut} from "./donut";
|
|
10
12
|
export {funnel} from "./funnel";
|
|
11
13
|
export {gauge} from "./gauge";
|
|
14
|
+
export {heatmap} from "./heatmap";
|
|
12
15
|
export {line, spline, step} from "./line";
|
|
13
16
|
export {pie} from "./pie";
|
|
14
17
|
export {polar} from "./polar";
|
|
15
18
|
export {radar} from "./radar";
|
|
19
|
+
export {sankey} from "./sankey";
|
|
16
20
|
export {scatter} from "./scatter";
|
|
17
21
|
export {treemap} from "./treemap";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
3
|
+
* billboard.js project is licensed under the MIT license
|
|
4
|
+
*/
|
|
5
|
+
import ChartInternal from "../../../ChartInternal/ChartInternal";
|
|
6
|
+
import {customTypeHooks} from "../../../ChartInternal/shape/core/sankey";
|
|
7
|
+
import shapeSankey from "../../../ChartInternal/shape/sankey";
|
|
8
|
+
import {extend} from "../../../module/util";
|
|
9
|
+
import Options from "../../Options/Options";
|
|
10
|
+
import optSankey from "../../Options/shape/sankey";
|
|
11
|
+
import {registerCustomType} from "../customType";
|
|
12
|
+
|
|
13
|
+
export let sankey = (): string => (
|
|
14
|
+
extend(ChartInternal.prototype, [shapeSankey]),
|
|
15
|
+
Options.setOptions([optSankey]),
|
|
16
|
+
registerCustomType("sankey", {hooks: customTypeHooks}),
|
|
17
|
+
(sankey = () => "sankey")()
|
|
18
|
+
);
|
package/src/index.canvas.ts
CHANGED
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
import "./Chart/api/stubs";
|
|
9
9
|
|
|
10
10
|
// canvas shape modules
|
|
11
|
+
export {boxplot} from "./config/resolver/canvasBoxplot";
|
|
12
|
+
export {bullet} from "./config/resolver/canvasBullet";
|
|
13
|
+
export {heatmap} from "./config/resolver/canvasHeatmap";
|
|
14
|
+
export {sankey} from "./config/resolver/canvasSankey";
|
|
11
15
|
export {
|
|
12
16
|
area,
|
|
13
17
|
areaLineRange,
|
|
@@ -29,13 +33,15 @@ export {
|
|
|
29
33
|
export {canvas} from "./config/resolver/canvas";
|
|
30
34
|
|
|
31
35
|
// optional API modules (tree-shakable)
|
|
36
|
+
export {flow} from "./config/resolver/canvasFlow";
|
|
37
|
+
export {grid} from "./config/resolver/canvasGrid";
|
|
32
38
|
export {category} from "./config/resolver/category";
|
|
33
39
|
export {exportApi} from "./config/resolver/export";
|
|
34
|
-
export {flow} from "./config/resolver/flow";
|
|
35
|
-
export {grid} from "./config/resolver/grid";
|
|
36
40
|
export {regions} from "./config/resolver/regions";
|
|
37
41
|
|
|
38
42
|
// interaction modules (tree-shakable)
|
|
39
|
-
export {selection
|
|
43
|
+
export {selection} from "./config/resolver/canvasSelection";
|
|
44
|
+
export {subchart} from "./config/resolver/canvasSubchart";
|
|
45
|
+
export {zoom} from "./config/resolver/interaction";
|
|
40
46
|
|
|
41
47
|
export {bb, default} from "./core";
|
package/src/index.esm.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -2,14 +2,27 @@
|
|
|
2
2
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
3
3
|
* billboard project is licensed under the MIT license
|
|
4
4
|
*/
|
|
5
|
+
import canvasBoxplot from "./canvas/boxplot";
|
|
6
|
+
import canvasBullet from "./canvas/bullet";
|
|
7
|
+
import canvasFlow from "./canvas/flow";
|
|
8
|
+
import canvasGrid from "./canvas/grid";
|
|
9
|
+
import canvasHeatmap from "./canvas/heatmap";
|
|
10
|
+
import canvasSankey from "./canvas/sankey";
|
|
11
|
+
import canvasSelection, {selectionDraw} from "./canvas/selection";
|
|
12
|
+
import canvasSubchart, {subchartDraw} from "./canvas/subchart";
|
|
13
|
+
import canvasTreemap from "./canvas/treemap";
|
|
14
|
+
import ChartInternal from "./ChartInternal/ChartInternal";
|
|
5
15
|
import {canvas} from "./config/resolver/canvas";
|
|
16
|
+
import {registerCanvasFeature, registerCanvasType} from "./config/resolver/canvasType";
|
|
6
17
|
import {category} from "./config/resolver/category";
|
|
18
|
+
import {registerAxisType, registerCustomType} from "./config/resolver/customType";
|
|
7
19
|
import {exportApi} from "./config/resolver/export";
|
|
8
20
|
import {flow} from "./config/resolver/flow";
|
|
9
21
|
import {grid} from "./config/resolver/grid";
|
|
10
22
|
import * as interaction from "./config/resolver/interaction";
|
|
11
23
|
import {regions} from "./config/resolver/regions";
|
|
12
24
|
import * as shape from "./config/resolver/shape";
|
|
25
|
+
import {extend} from "./module/util";
|
|
13
26
|
|
|
14
27
|
// extends shape modules
|
|
15
28
|
Object.keys(shape)
|
|
@@ -22,9 +35,30 @@ Object.keys(interaction)
|
|
|
22
35
|
// always include optional API modules in UMD bundle
|
|
23
36
|
exportApi();
|
|
24
37
|
flow();
|
|
38
|
+
extend(ChartInternal.prototype, canvasFlow);
|
|
25
39
|
grid();
|
|
40
|
+
registerCanvasFeature("grid", canvasGrid);
|
|
41
|
+
extend(ChartInternal.prototype, canvasSubchart);
|
|
42
|
+
registerCanvasFeature("subchart", subchartDraw);
|
|
43
|
+
extend(ChartInternal.prototype, canvasSelection);
|
|
44
|
+
registerCanvasFeature("selection", selectionDraw);
|
|
26
45
|
regions();
|
|
27
46
|
category();
|
|
28
47
|
canvas();
|
|
29
48
|
|
|
49
|
+
// the canvas drawing of boxplot, which the svg shape resolver does not carry
|
|
50
|
+
registerAxisType("boxplot", {canvas: canvasBoxplot});
|
|
51
|
+
|
|
52
|
+
// the canvas drawing of bullet, which shape resolvers do not carry
|
|
53
|
+
registerCustomType("bullet", {canvas: canvasBullet});
|
|
54
|
+
|
|
55
|
+
// the canvas drawing of heatmap, which the svg shape resolver does not carry
|
|
56
|
+
registerCustomType("heatmap", {canvas: canvasHeatmap});
|
|
57
|
+
|
|
58
|
+
// the canvas drawing of sankey, which the svg shape resolver does not carry
|
|
59
|
+
registerCustomType("sankey", {canvas: canvasSankey});
|
|
60
|
+
|
|
61
|
+
// the canvas drawing of treemap, which the svg shape resolver does not carry
|
|
62
|
+
registerCanvasType("treemap", canvasTreemap);
|
|
63
|
+
|
|
30
64
|
export {bb, default} from "./core";
|