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
package/src/module/error.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {API_MODULE_NEEDED,
|
|
1
|
+
import {API_MODULE_NEEDED, TYPE_METHOD_NEEDED} from "../config/const";
|
|
2
2
|
import {window} from "./browser";
|
|
3
3
|
import {camelize, isEmpty} from "./util";
|
|
4
4
|
|
|
@@ -7,38 +7,52 @@ import {camelize, isEmpty} from "./util";
|
|
|
7
7
|
* billboard.js project is licensed under the MIT license
|
|
8
8
|
*/
|
|
9
9
|
/* eslint no-console: "off" */
|
|
10
|
-
export {checkApiModuleImport, checkModuleImport, logError};
|
|
10
|
+
export {checkApiModuleImport, checkModuleImport, getTypeMethod, logError};
|
|
11
11
|
|
|
12
12
|
const MODULE_IMPORT_DOC = "https://github.com/naver/billboard.js/blob/master/MODULE_IMPORTS.md";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Check chart type module imports.
|
|
16
|
+
* The module of a type is there when the method it provides is: it is the same for the types
|
|
17
|
+
* built in and for the types of their own module.
|
|
16
18
|
* @param {ChartInternal} ctx Context
|
|
17
19
|
* @private
|
|
18
20
|
*/
|
|
19
21
|
function checkModuleImport(ctx) {
|
|
20
22
|
const $$ = ctx;
|
|
21
23
|
const {config} = $$;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const t = TYPE[x];
|
|
29
|
-
|
|
30
|
-
if ($$.hasType(t) && !$$[TYPE_METHOD_NEEDED[x]]) {
|
|
31
|
-
type = t;
|
|
32
|
-
break;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
24
|
+
// the types that are given: data.types takes precedence over data.type, and it is line by default
|
|
25
|
+
const given =
|
|
26
|
+
(isEmpty(config.data_types) ? [config.data_type] : Object.values(config.data_types))
|
|
27
|
+
.filter(type => !isEmpty(type));
|
|
28
|
+
const type = (given.length ? given : ["line"])
|
|
29
|
+
.find(name => TYPE_METHOD_NEEDED[name] && !$$[TYPE_METHOD_NEEDED[name]]);
|
|
36
30
|
|
|
37
31
|
type &&
|
|
38
32
|
logError(`Please, make sure if %c${camelize(type)}`,
|
|
39
33
|
"module has been imported and specified correctly.", MODULE_IMPORT_DOC);
|
|
40
34
|
}
|
|
41
35
|
|
|
36
|
+
/**
|
|
37
|
+
* Get a method of a chart type module, for the part of the chart that is drawn by the mode.
|
|
38
|
+
* It is not there when only a part of the module was imported: the types of "billboard.js/canvas"
|
|
39
|
+
* have no part for the svg mode, for example.
|
|
40
|
+
* @param {ChartInternal} ctx Context
|
|
41
|
+
* @param {string} name Method name
|
|
42
|
+
* @returns {function} Method
|
|
43
|
+
* @private
|
|
44
|
+
*/
|
|
45
|
+
function getTypeMethod(ctx, name: string): (...args: any[]) => any {
|
|
46
|
+
if (!ctx[name]) {
|
|
47
|
+
logError(`Please, make sure if the module of %c${name}`,
|
|
48
|
+
`is imported for render.mode='${ctx.config.render_mode}'. ` +
|
|
49
|
+
"The modules of \"billboard.js/canvas\" draw only with render.mode='canvas'.",
|
|
50
|
+
MODULE_IMPORT_DOC);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return ctx[name];
|
|
54
|
+
}
|
|
55
|
+
|
|
42
56
|
/**
|
|
43
57
|
* Check optional API module import (e.g. export, flow).
|
|
44
58
|
* Invoked by stubs on Chart.prototype when the corresponding resolver module
|
|
@@ -62,7 +76,7 @@ function checkApiModuleImport(apiName: string): void {
|
|
|
62
76
|
* @param {string} info Info message
|
|
63
77
|
* @private
|
|
64
78
|
*/
|
|
65
|
-
function logError(head, tail?: string, info?: string) {
|
|
79
|
+
function logError(head: string, tail?: string, info?: string): never {
|
|
66
80
|
const prefix = "[billboard.js]";
|
|
67
81
|
const hasConsole = window.console?.error;
|
|
68
82
|
|
|
@@ -76,5 +90,5 @@ function logError(head, tail?: string, info?: string) {
|
|
|
76
90
|
info && console.info("%cℹ️", "font-size:15px", info);
|
|
77
91
|
}
|
|
78
92
|
|
|
79
|
-
throw Error(`${prefix} ${head.replace(/\%c([a-z-]+)/i, "'$1'
|
|
93
|
+
throw Error(`${prefix} ${head.replace(/\%c([a-z-]+)/i, "'$1'")}${tail ? ` ${tail}` : ""}`);
|
|
80
94
|
}
|
|
@@ -202,7 +202,32 @@ function getUnique(data: any[]): any[] {
|
|
|
202
202
|
* @private
|
|
203
203
|
*/
|
|
204
204
|
function mergeArray(arr: any[]): any[] {
|
|
205
|
-
|
|
205
|
+
if (!arr?.length) {
|
|
206
|
+
return [];
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// a single item was returned as is by the former reduce()
|
|
210
|
+
if (arr.length === 1) {
|
|
211
|
+
return arr[0];
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// push into one array: reduce() + concat() copied the accumulated array
|
|
215
|
+
// per item, which is O(items^2) for many series
|
|
216
|
+
const out: any[] = [];
|
|
217
|
+
|
|
218
|
+
for (let i = 0; i < arr.length; i++) {
|
|
219
|
+
const item = arr[i];
|
|
220
|
+
|
|
221
|
+
if (Array.isArray(item)) {
|
|
222
|
+
for (let j = 0; j < item.length; j++) {
|
|
223
|
+
out.push(item[j]);
|
|
224
|
+
}
|
|
225
|
+
} else {
|
|
226
|
+
out.push(item);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
return out;
|
|
206
231
|
}
|
|
207
232
|
|
|
208
233
|
/**
|
package/src/scss/billboard.scss
CHANGED
|
@@ -79,6 +79,83 @@
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
+
/*-- Bullet --*/
|
|
83
|
+
.bb-chart-bullets {
|
|
84
|
+
// lightness of the first (smallest) and the last range band: the bands in between are interpolated
|
|
85
|
+
--bb-bullet-range-min: 55%;
|
|
86
|
+
--bb-bullet-range-max: 90%;
|
|
87
|
+
|
|
88
|
+
.bb-bullet-range {
|
|
89
|
+
stroke: none;
|
|
90
|
+
fill: hsl(0, 0%, calc(var(--bb-bullet-range-min) + var(--bb-t, 0) * (var(--bb-bullet-range-max) - var(--bb-bullet-range-min))));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.bb-bullet-target {
|
|
94
|
+
stroke: #000;
|
|
95
|
+
stroke-width: 2px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.bb-bullet-title {
|
|
99
|
+
font-size: 11px;
|
|
100
|
+
fill: #000;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.bb-bullet-axis {
|
|
104
|
+
shape-rendering: crispEdges;
|
|
105
|
+
font-size: 10px;
|
|
106
|
+
|
|
107
|
+
text {
|
|
108
|
+
fill: #000;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
path, line {
|
|
112
|
+
stroke: #000;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/*-- Heatmap --*/
|
|
118
|
+
.bb-chart-heatmap {
|
|
119
|
+
.bb-heatmap-axis {
|
|
120
|
+
font-size: 10px;
|
|
121
|
+
fill: #000;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.bb-heatmap-label {
|
|
125
|
+
font-size: 10px;
|
|
126
|
+
pointer-events: none;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// focus: the rows are of the target classes
|
|
130
|
+
.bb-heatmap-row.bb-defocused {
|
|
131
|
+
opacity: 0.3;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/*-- Sankey --*/
|
|
136
|
+
.bb-chart-sankey {
|
|
137
|
+
.bb-sankey-link {
|
|
138
|
+
fill: none;
|
|
139
|
+
// sankey.link.opacity sets the variable
|
|
140
|
+
stroke-opacity: var(--bb-sankey-link-opacity, 0.4);
|
|
141
|
+
|
|
142
|
+
&:hover {
|
|
143
|
+
stroke-opacity: calc(var(--bb-sankey-link-opacity, 0.4) + 0.3);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// focus: the links are not of the target classes
|
|
147
|
+
&.bb-defocused {
|
|
148
|
+
opacity: 0.3 !important;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.bb-sankey-label {
|
|
153
|
+
font-size: 11px;
|
|
154
|
+
fill: #000;
|
|
155
|
+
pointer-events: none;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
82
159
|
/*-- Axis --*/
|
|
83
160
|
.bb-axis {
|
|
84
161
|
shape-rendering: crispEdges;
|
|
@@ -149,6 +226,35 @@
|
|
|
149
226
|
}
|
|
150
227
|
}
|
|
151
228
|
|
|
229
|
+
/*-- Boxplot --*/
|
|
230
|
+
.bb-boxplot-box {
|
|
231
|
+
stroke-width: 1px;
|
|
232
|
+
fill-opacity: 0.7;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.bb-boxplot-whisker {
|
|
236
|
+
stroke-width: 1px;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.bb-boxplot-median {
|
|
240
|
+
stroke-width: 2px;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.bb-boxplot-outlier {
|
|
244
|
+
fill: none;
|
|
245
|
+
stroke-width: 1px;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// under the chart: the rule of the theme for paths (`svg path`) is more specific than a class
|
|
249
|
+
.bb-chart-boxplot .bb-boxplot-mean {
|
|
250
|
+
fill: #fff;
|
|
251
|
+
stroke-width: 1px;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.bb-boxplot._expanded_ .bb-boxplot-box {
|
|
255
|
+
fill-opacity: 0.9;
|
|
256
|
+
}
|
|
257
|
+
|
|
152
258
|
/*-- Focus --*/
|
|
153
259
|
.bb-target, .bb-circles {
|
|
154
260
|
&.bb-focused {
|
package/src/scss/theme/dark.scss
CHANGED
|
@@ -58,6 +58,87 @@ $font-family: Helvetica, Arial, sans-serif, "nanumgothic", "Dotum";
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
/*-- Bullet --*/
|
|
62
|
+
.bb-chart-bullets {
|
|
63
|
+
// darker bands, so that the data labels and the axis (light on dark) stay readable
|
|
64
|
+
--bb-bullet-range-min: 16%;
|
|
65
|
+
--bb-bullet-range-max: 34%;
|
|
66
|
+
|
|
67
|
+
.bb-bullet-range {
|
|
68
|
+
stroke: none;
|
|
69
|
+
fill: hsl(0, 0%, calc(var(--bb-bullet-range-min) + var(--bb-t, 0) * (var(--bb-bullet-range-max) - var(--bb-bullet-range-min))));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.bb-bullet-target {
|
|
73
|
+
stroke: #fff;
|
|
74
|
+
stroke-width: 2px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.bb-bullet-title {
|
|
78
|
+
font-size: 11px;
|
|
79
|
+
fill: #fff;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.bb-bullet-axis {
|
|
83
|
+
shape-rendering: crispEdges;
|
|
84
|
+
font-size: 10px;
|
|
85
|
+
|
|
86
|
+
text {
|
|
87
|
+
fill: #fff;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
path, line {
|
|
91
|
+
stroke: #fff;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
+ .bb-chart-texts text {
|
|
96
|
+
fill: #fff;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/*-- Heatmap --*/
|
|
101
|
+
.bb-chart-heatmap {
|
|
102
|
+
.bb-heatmap-axis {
|
|
103
|
+
font-size: 10px;
|
|
104
|
+
fill: #fff;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.bb-heatmap-label {
|
|
108
|
+
font-size: 10px;
|
|
109
|
+
pointer-events: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// focus: the rows are of the target classes
|
|
113
|
+
.bb-heatmap-row.bb-defocused {
|
|
114
|
+
opacity: 0.5;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/*-- Sankey --*/
|
|
119
|
+
.bb-chart-sankey {
|
|
120
|
+
.bb-sankey-link {
|
|
121
|
+
fill: none;
|
|
122
|
+
// sankey.link.opacity sets the variable
|
|
123
|
+
stroke-opacity: var(--bb-sankey-link-opacity, 0.4);
|
|
124
|
+
|
|
125
|
+
&:hover {
|
|
126
|
+
stroke-opacity: calc(var(--bb-sankey-link-opacity, 0.4) + 0.3);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// focus: the links are not of the target classes
|
|
130
|
+
&.bb-defocused {
|
|
131
|
+
opacity: 0.5 !important;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.bb-sankey-label {
|
|
136
|
+
font-size: 11px;
|
|
137
|
+
fill: #fff;
|
|
138
|
+
pointer-events: none;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
61
142
|
/*-- Axis --*/
|
|
62
143
|
.bb-axis {
|
|
63
144
|
shape-rendering: crispEdges;
|
|
@@ -158,6 +239,35 @@ rect.bb-circle, use.bb-circle {
|
|
|
158
239
|
}
|
|
159
240
|
}
|
|
160
241
|
|
|
242
|
+
/*-- Boxplot --*/
|
|
243
|
+
.bb-boxplot-box {
|
|
244
|
+
stroke-width: 1px;
|
|
245
|
+
fill-opacity: 0.7;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.bb-boxplot-whisker {
|
|
249
|
+
stroke-width: 1px;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.bb-boxplot-median {
|
|
253
|
+
stroke-width: 2px;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.bb-boxplot-outlier {
|
|
257
|
+
fill: none;
|
|
258
|
+
stroke-width: 1px;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// under the chart: the rule of the theme for paths (`svg path`) is more specific than a class
|
|
262
|
+
.bb-chart-boxplot .bb-boxplot-mean {
|
|
263
|
+
fill: #fff;
|
|
264
|
+
stroke-width: 1px;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.bb-boxplot._expanded_ .bb-boxplot-box {
|
|
268
|
+
fill-opacity: 0.9;
|
|
269
|
+
}
|
|
270
|
+
|
|
161
271
|
/*-- Focus --*/
|
|
162
272
|
.bb-target, .bb-circles {
|
|
163
273
|
&.bb-focused {
|
|
@@ -53,6 +53,83 @@ $text-font-size: 11px;
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
/*-- Bullet --*/
|
|
57
|
+
.bb-chart-bullets {
|
|
58
|
+
// lightness of the first (smallest) and the last range band: the bands in between are interpolated
|
|
59
|
+
--bb-bullet-range-min: 55%;
|
|
60
|
+
--bb-bullet-range-max: 90%;
|
|
61
|
+
|
|
62
|
+
.bb-bullet-range {
|
|
63
|
+
stroke: none;
|
|
64
|
+
fill: hsl(0, 0%, calc(var(--bb-bullet-range-min) + var(--bb-t, 0) * (var(--bb-bullet-range-max) - var(--bb-bullet-range-min))));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.bb-bullet-target {
|
|
68
|
+
stroke: #000;
|
|
69
|
+
stroke-width: 2px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.bb-bullet-title {
|
|
73
|
+
font-size: 11px;
|
|
74
|
+
fill: #000;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.bb-bullet-axis {
|
|
78
|
+
shape-rendering: crispEdges;
|
|
79
|
+
font-size: 10px;
|
|
80
|
+
|
|
81
|
+
text {
|
|
82
|
+
fill: #000;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
path, line {
|
|
86
|
+
stroke: #000;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/*-- Heatmap --*/
|
|
92
|
+
.bb-chart-heatmap {
|
|
93
|
+
.bb-heatmap-axis {
|
|
94
|
+
font-size: 10px;
|
|
95
|
+
fill: #000;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.bb-heatmap-label {
|
|
99
|
+
font-size: 10px;
|
|
100
|
+
pointer-events: none;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// focus: the rows are of the target classes
|
|
104
|
+
.bb-heatmap-row.bb-defocused {
|
|
105
|
+
opacity: 0.3;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/*-- Sankey --*/
|
|
110
|
+
.bb-chart-sankey {
|
|
111
|
+
.bb-sankey-link {
|
|
112
|
+
fill: none;
|
|
113
|
+
// sankey.link.opacity sets the variable
|
|
114
|
+
stroke-opacity: var(--bb-sankey-link-opacity, 0.4);
|
|
115
|
+
|
|
116
|
+
&:hover {
|
|
117
|
+
stroke-opacity: calc(var(--bb-sankey-link-opacity, 0.4) + 0.3);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// focus: the links are not of the target classes
|
|
121
|
+
&.bb-defocused {
|
|
122
|
+
opacity: 0.3 !important;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.bb-sankey-label {
|
|
127
|
+
font-size: 11px;
|
|
128
|
+
fill: #000;
|
|
129
|
+
pointer-events: none;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
56
133
|
/*-- Axis --*/
|
|
57
134
|
.bb-axis {
|
|
58
135
|
stroke-width: $line-stroke-widdth;
|
|
@@ -143,6 +220,35 @@ $text-font-size: 11px;
|
|
|
143
220
|
}
|
|
144
221
|
}
|
|
145
222
|
|
|
223
|
+
/*-- Boxplot --*/
|
|
224
|
+
.bb-boxplot-box {
|
|
225
|
+
stroke-width: 1px;
|
|
226
|
+
fill-opacity: 0.7;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.bb-boxplot-whisker {
|
|
230
|
+
stroke-width: 1px;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.bb-boxplot-median {
|
|
234
|
+
stroke-width: 2px;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.bb-boxplot-outlier {
|
|
238
|
+
fill: none;
|
|
239
|
+
stroke-width: 1px;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// under the chart: the rule of the theme for paths (`svg path`) is more specific than a class
|
|
243
|
+
.bb-chart-boxplot .bb-boxplot-mean {
|
|
244
|
+
fill: #fff;
|
|
245
|
+
stroke-width: 1px;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.bb-boxplot._expanded_ .bb-boxplot-box {
|
|
249
|
+
fill-opacity: 0.9;
|
|
250
|
+
}
|
|
251
|
+
|
|
146
252
|
/*-- Focus --*/
|
|
147
253
|
.bb-target, .bb-circles {
|
|
148
254
|
&.bb-focused {
|
|
@@ -62,6 +62,83 @@ $axis-color: #8c8c8c;
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
/*-- Bullet --*/
|
|
66
|
+
.bb-chart-bullets {
|
|
67
|
+
// lightness of the first (smallest) and the last range band: the bands in between are interpolated
|
|
68
|
+
--bb-bullet-range-min: 55%;
|
|
69
|
+
--bb-bullet-range-max: 90%;
|
|
70
|
+
|
|
71
|
+
.bb-bullet-range {
|
|
72
|
+
stroke: none;
|
|
73
|
+
fill: hsl(0, 0%, calc(var(--bb-bullet-range-min) + var(--bb-t, 0) * (var(--bb-bullet-range-max) - var(--bb-bullet-range-min))));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.bb-bullet-target {
|
|
77
|
+
stroke: #000;
|
|
78
|
+
stroke-width: 2px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.bb-bullet-title {
|
|
82
|
+
font-size: 11px;
|
|
83
|
+
fill: #000;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.bb-bullet-axis {
|
|
87
|
+
shape-rendering: crispEdges;
|
|
88
|
+
font-size: 10px;
|
|
89
|
+
|
|
90
|
+
text {
|
|
91
|
+
fill: #000;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
path, line {
|
|
95
|
+
stroke: #000;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/*-- Heatmap --*/
|
|
101
|
+
.bb-chart-heatmap {
|
|
102
|
+
.bb-heatmap-axis {
|
|
103
|
+
font-size: 10px;
|
|
104
|
+
fill: #000;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.bb-heatmap-label {
|
|
108
|
+
font-size: 10px;
|
|
109
|
+
pointer-events: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// focus: the rows are of the target classes
|
|
113
|
+
.bb-heatmap-row.bb-defocused {
|
|
114
|
+
opacity: 0.3;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/*-- Sankey --*/
|
|
119
|
+
.bb-chart-sankey {
|
|
120
|
+
.bb-sankey-link {
|
|
121
|
+
fill: none;
|
|
122
|
+
// sankey.link.opacity sets the variable
|
|
123
|
+
stroke-opacity: var(--bb-sankey-link-opacity, 0.4);
|
|
124
|
+
|
|
125
|
+
&:hover {
|
|
126
|
+
stroke-opacity: calc(var(--bb-sankey-link-opacity, 0.4) + 0.3);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// focus: the links are not of the target classes
|
|
130
|
+
&.bb-defocused {
|
|
131
|
+
opacity: 0.3 !important;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.bb-sankey-label {
|
|
136
|
+
font-size: 11px;
|
|
137
|
+
fill: #000;
|
|
138
|
+
pointer-events: none;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
65
142
|
/*-- Axis --*/
|
|
66
143
|
.bb-axis {
|
|
67
144
|
shape-rendering: crispEdges;
|
|
@@ -155,6 +232,35 @@ rect.bb-circle, use.bb-circle {
|
|
|
155
232
|
}
|
|
156
233
|
}
|
|
157
234
|
|
|
235
|
+
/*-- Boxplot --*/
|
|
236
|
+
.bb-boxplot-box {
|
|
237
|
+
stroke-width: 1px;
|
|
238
|
+
fill-opacity: 0.7;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.bb-boxplot-whisker {
|
|
242
|
+
stroke-width: 1px;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.bb-boxplot-median {
|
|
246
|
+
stroke-width: 2px;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.bb-boxplot-outlier {
|
|
250
|
+
fill: none;
|
|
251
|
+
stroke-width: 1px;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// under the chart: the rule of the theme for paths (`svg path`) is more specific than a class
|
|
255
|
+
.bb-chart-boxplot .bb-boxplot-mean {
|
|
256
|
+
fill: #fff;
|
|
257
|
+
stroke-width: 1px;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.bb-boxplot._expanded_ .bb-boxplot-box {
|
|
261
|
+
fill-opacity: 0.9;
|
|
262
|
+
}
|
|
263
|
+
|
|
158
264
|
/*-- Focus --*/
|
|
159
265
|
.bb-target, .bb-circles {
|
|
160
266
|
&.bb-focused {
|
|
@@ -56,6 +56,83 @@ $font-family: sans-serif, Arial, "nanumgothic", "Dotum";
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
/*-- Bullet --*/
|
|
60
|
+
.bb-chart-bullets {
|
|
61
|
+
// lightness of the first (smallest) and the last range band: the bands in between are interpolated
|
|
62
|
+
--bb-bullet-range-min: 55%;
|
|
63
|
+
--bb-bullet-range-max: 90%;
|
|
64
|
+
|
|
65
|
+
.bb-bullet-range {
|
|
66
|
+
stroke: none;
|
|
67
|
+
fill: hsl(0, 0%, calc(var(--bb-bullet-range-min) + var(--bb-t, 0) * (var(--bb-bullet-range-max) - var(--bb-bullet-range-min))));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.bb-bullet-target {
|
|
71
|
+
stroke: #000;
|
|
72
|
+
stroke-width: 2px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.bb-bullet-title {
|
|
76
|
+
font-size: 11px;
|
|
77
|
+
fill: #000;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.bb-bullet-axis {
|
|
81
|
+
shape-rendering: crispEdges;
|
|
82
|
+
font-size: 10px;
|
|
83
|
+
|
|
84
|
+
text {
|
|
85
|
+
fill: #000;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
path, line {
|
|
89
|
+
stroke: #000;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/*-- Heatmap --*/
|
|
95
|
+
.bb-chart-heatmap {
|
|
96
|
+
.bb-heatmap-axis {
|
|
97
|
+
font-size: 10px;
|
|
98
|
+
fill: #000;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.bb-heatmap-label {
|
|
102
|
+
font-size: 10px;
|
|
103
|
+
pointer-events: none;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// focus: the rows are of the target classes
|
|
107
|
+
.bb-heatmap-row.bb-defocused {
|
|
108
|
+
opacity: 0.3;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/*-- Sankey --*/
|
|
113
|
+
.bb-chart-sankey {
|
|
114
|
+
.bb-sankey-link {
|
|
115
|
+
fill: none;
|
|
116
|
+
// sankey.link.opacity sets the variable
|
|
117
|
+
stroke-opacity: var(--bb-sankey-link-opacity, 0.4);
|
|
118
|
+
|
|
119
|
+
&:hover {
|
|
120
|
+
stroke-opacity: calc(var(--bb-sankey-link-opacity, 0.4) + 0.3);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// focus: the links are not of the target classes
|
|
124
|
+
&.bb-defocused {
|
|
125
|
+
opacity: 0.3 !important;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.bb-sankey-label {
|
|
130
|
+
font-size: 11px;
|
|
131
|
+
fill: #000;
|
|
132
|
+
pointer-events: none;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
59
136
|
/*-- Axis --*/
|
|
60
137
|
.bb-axis {
|
|
61
138
|
shape-rendering: crispEdges;
|
|
@@ -150,6 +227,35 @@ rect.bb-circle, use.bb-circle {
|
|
|
150
227
|
}
|
|
151
228
|
}
|
|
152
229
|
|
|
230
|
+
/*-- Boxplot --*/
|
|
231
|
+
.bb-boxplot-box {
|
|
232
|
+
stroke-width: 1px;
|
|
233
|
+
fill-opacity: 0.7;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.bb-boxplot-whisker {
|
|
237
|
+
stroke-width: 1px;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.bb-boxplot-median {
|
|
241
|
+
stroke-width: 2px;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.bb-boxplot-outlier {
|
|
245
|
+
fill: none;
|
|
246
|
+
stroke-width: 1px;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// under the chart: the rule of the theme for paths (`svg path`) is more specific than a class
|
|
250
|
+
.bb-chart-boxplot .bb-boxplot-mean {
|
|
251
|
+
fill: #fff;
|
|
252
|
+
stroke-width: 1px;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.bb-boxplot._expanded_ .bb-boxplot-box {
|
|
256
|
+
fill-opacity: 0.9;
|
|
257
|
+
}
|
|
258
|
+
|
|
153
259
|
/*-- Focus --*/
|
|
154
260
|
.bb-target, .bb-circles {
|
|
155
261
|
&.bb-focused {
|