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
|
@@ -59,6 +59,83 @@ $button-bg: #404244;
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
/*-- Bullet --*/
|
|
63
|
+
.bb-chart-bullets {
|
|
64
|
+
// lightness of the first (smallest) and the last range band: the bands in between are interpolated
|
|
65
|
+
--bb-bullet-range-min: 55%;
|
|
66
|
+
--bb-bullet-range-max: 90%;
|
|
67
|
+
|
|
68
|
+
.bb-bullet-range {
|
|
69
|
+
stroke: none;
|
|
70
|
+
fill: hsl(0, 0%, calc(var(--bb-bullet-range-min) + var(--bb-t, 0) * (var(--bb-bullet-range-max) - var(--bb-bullet-range-min))));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.bb-bullet-target {
|
|
74
|
+
stroke: #000;
|
|
75
|
+
stroke-width: 2px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.bb-bullet-title {
|
|
79
|
+
font-size: 11px;
|
|
80
|
+
fill: #000;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.bb-bullet-axis {
|
|
84
|
+
shape-rendering: crispEdges;
|
|
85
|
+
font-size: 10px;
|
|
86
|
+
|
|
87
|
+
text {
|
|
88
|
+
fill: #000;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
path, line {
|
|
92
|
+
stroke: #000;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/*-- Heatmap --*/
|
|
98
|
+
.bb-chart-heatmap {
|
|
99
|
+
.bb-heatmap-axis {
|
|
100
|
+
font-size: 10px;
|
|
101
|
+
fill: #000;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.bb-heatmap-label {
|
|
105
|
+
font-size: 10px;
|
|
106
|
+
pointer-events: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// focus: the rows are of the target classes
|
|
110
|
+
.bb-heatmap-row.bb-defocused {
|
|
111
|
+
opacity: 0.3;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/*-- Sankey --*/
|
|
116
|
+
.bb-chart-sankey {
|
|
117
|
+
.bb-sankey-link {
|
|
118
|
+
fill: none;
|
|
119
|
+
// sankey.link.opacity sets the variable
|
|
120
|
+
stroke-opacity: var(--bb-sankey-link-opacity, 0.4);
|
|
121
|
+
|
|
122
|
+
&:hover {
|
|
123
|
+
stroke-opacity: calc(var(--bb-sankey-link-opacity, 0.4) + 0.3);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// focus: the links are not of the target classes
|
|
127
|
+
&.bb-defocused {
|
|
128
|
+
opacity: 0.3 !important;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.bb-sankey-label {
|
|
133
|
+
font-size: 11px;
|
|
134
|
+
fill: #000;
|
|
135
|
+
pointer-events: none;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
62
139
|
/*-- Axis --*/
|
|
63
140
|
.bb-axis {
|
|
64
141
|
shape-rendering: crispEdges;
|
|
@@ -152,6 +229,35 @@ rect.bb-circle, use.bb-circle {
|
|
|
152
229
|
}
|
|
153
230
|
}
|
|
154
231
|
|
|
232
|
+
/*-- Boxplot --*/
|
|
233
|
+
.bb-boxplot-box {
|
|
234
|
+
stroke-width: 1px;
|
|
235
|
+
fill-opacity: 0.7;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.bb-boxplot-whisker {
|
|
239
|
+
stroke-width: 1px;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.bb-boxplot-median {
|
|
243
|
+
stroke-width: 2px;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.bb-boxplot-outlier {
|
|
247
|
+
fill: none;
|
|
248
|
+
stroke-width: 1px;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// under the chart: the rule of the theme for paths (`svg path`) is more specific than a class
|
|
252
|
+
.bb-chart-boxplot .bb-boxplot-mean {
|
|
253
|
+
fill: #fff;
|
|
254
|
+
stroke-width: 1px;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.bb-boxplot._expanded_ .bb-boxplot-box {
|
|
258
|
+
fill-opacity: 0.9;
|
|
259
|
+
}
|
|
260
|
+
|
|
155
261
|
/*-- Focus --*/
|
|
156
262
|
.bb-target, .bb-circles {
|
|
157
263
|
&.bb-focused {
|
package/types/bb.d.ts
CHANGED
|
@@ -40,15 +40,19 @@ export function areaSplineRange(): "area-spline-range";
|
|
|
40
40
|
export function areaStep(): "area-step";
|
|
41
41
|
export function areaStepRange(): "area-step-range";
|
|
42
42
|
export function bar(): "bar";
|
|
43
|
+
export function boxplot(): "boxplot";
|
|
43
44
|
export function bubble(): "bubble";
|
|
45
|
+
export function bullet(): "bullet";
|
|
44
46
|
export function candlestick(): "candlestick";
|
|
45
47
|
export function donut(): "donut";
|
|
46
48
|
export function funnel(): "funnel";
|
|
47
49
|
export function gauge(): "gauge";
|
|
50
|
+
export function heatmap(): "heatmap";
|
|
48
51
|
export function line(): "line";
|
|
49
52
|
export function pie(): "pie";
|
|
50
53
|
export function polar(): "polar";
|
|
51
54
|
export function radar(): "radar";
|
|
55
|
+
export function sankey(): "sankey";
|
|
52
56
|
export function scatter(): "scatter";
|
|
53
57
|
export function spline(): "spline";
|
|
54
58
|
export function step(): "step";
|
package/types/canvas.d.ts
CHANGED
package/types/chart.d.ts
CHANGED
package/types/index.d.ts
CHANGED
package/types/options.d.ts
CHANGED
|
@@ -10,16 +10,20 @@ import {
|
|
|
10
10
|
ArcOptions,
|
|
11
11
|
AreaOptions,
|
|
12
12
|
BarOptions,
|
|
13
|
+
BoxplotOptions,
|
|
13
14
|
BubbleOptions,
|
|
15
|
+
BulletOptions,
|
|
14
16
|
CandlestickOptions,
|
|
15
17
|
DonutOptions,
|
|
16
18
|
FunnelOptions,
|
|
17
19
|
GaugeOptions,
|
|
20
|
+
HeatmapOptions,
|
|
18
21
|
LineOptions,
|
|
19
22
|
PieOptions,
|
|
20
23
|
PolarOptions,
|
|
21
24
|
RadarOptions,
|
|
22
25
|
RadialGradientOptions,
|
|
26
|
+
SankeyOptions,
|
|
23
27
|
ScatterOptions,
|
|
24
28
|
SplineOptions,
|
|
25
29
|
TreemapOptions
|
|
@@ -377,7 +381,9 @@ export interface ChartOptions {
|
|
|
377
381
|
arc?: ArcOptions;
|
|
378
382
|
area?: AreaOptions;
|
|
379
383
|
bar?: BarOptions;
|
|
384
|
+
boxplot?: BoxplotOptions;
|
|
380
385
|
bubble?: BubbleOptions;
|
|
386
|
+
bullet?: BulletOptions;
|
|
381
387
|
candlestick?: CandlestickOptions;
|
|
382
388
|
donut?: DonutOptions;
|
|
383
389
|
funnel?: FunnelOptions;
|
|
@@ -386,6 +392,8 @@ export interface ChartOptions {
|
|
|
386
392
|
polar?: PolarOptions;
|
|
387
393
|
pie?: PieOptions;
|
|
388
394
|
radar?: RadarOptions;
|
|
395
|
+
heatmap?: HeatmapOptions;
|
|
396
|
+
sankey?: SankeyOptions;
|
|
389
397
|
scatter?: ScatterOptions;
|
|
390
398
|
spline?: SplineOptions;
|
|
391
399
|
treemap?: TreemapOptions;
|
|
@@ -844,6 +852,9 @@ export interface SubchartOptions {
|
|
|
844
852
|
* Set chart type for the subchart.
|
|
845
853
|
* If this option is specified, the type will be applied to every data in the subchart.
|
|
846
854
|
* This setting can be overwritten by subchart.types.
|
|
855
|
+
* When candlestick data is rendered as another type, the subchart takes one value of the data:
|
|
856
|
+
* - `bar`: the volume of the data. Without volume, the close value for a rise and the open value for a fall, from zero.
|
|
857
|
+
* - other types (`line`, `area`, etc.): the close value.
|
|
847
858
|
*/
|
|
848
859
|
type?: ChartTypes;
|
|
849
860
|
|
|
@@ -1411,7 +1422,7 @@ export interface Data {
|
|
|
1411
1422
|
/**
|
|
1412
1423
|
* Set chart type at once.
|
|
1413
1424
|
* If this option is specified, the type will be applied to every data. This setting can be overwritten by data.types.
|
|
1414
|
-
* - Available Values: area, area-line-range, area-spline, area-spline-range, area-step, area-step-range, bar, bubble, candlestick, donut, gauge, line, pie, radar, scatter, spline, step
|
|
1425
|
+
* - Available Values: area, area-line-range, area-spline, area-spline-range, area-step, area-step-range, bar, boxplot, bubble, candlestick, donut, gauge, line, pie, radar, scatter, spline, step
|
|
1415
1426
|
*/
|
|
1416
1427
|
type?: ChartTypes;
|
|
1417
1428
|
|
|
@@ -1757,6 +1768,7 @@ export interface Data {
|
|
|
1757
1768
|
* This callback will be called when each data point clicked and will receive d and element as the arguments.
|
|
1758
1769
|
* - d is the data clicked and element is the element clicked. In canvas mode, element is the shared `<canvas>` element.
|
|
1759
1770
|
* In this callback, this will be the Chart object.
|
|
1771
|
+
* For radar type, clicking an axis text calls it once for each data at the axis, with the axis text as the element.
|
|
1760
1772
|
*/
|
|
1761
1773
|
onclick?(this: Chart, d: DataItem, element: DataEventElement): void;
|
|
1762
1774
|
|
package/types/options.shape.d.ts
CHANGED
|
@@ -294,6 +294,74 @@ export interface BubbleOptions {
|
|
|
294
294
|
zerobased?: boolean;
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
+
export interface BoxplotOptions {
|
|
298
|
+
/**
|
|
299
|
+
* Set true to give the samples as the data value, instead of the five-number summary.
|
|
300
|
+
* The chart calculates the quartiles, the whiskers, the outliers and the mean.
|
|
301
|
+
*/
|
|
302
|
+
samples?: boolean;
|
|
303
|
+
|
|
304
|
+
whisker?: {
|
|
305
|
+
/**
|
|
306
|
+
* Width of the cap at the end of the whiskers, by the ratio of the width of the box.
|
|
307
|
+
*/
|
|
308
|
+
width?: number;
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* How far the whiskers reach, by the multiple of the interquartile range.
|
|
312
|
+
* Applied when `samples` is set.
|
|
313
|
+
*/
|
|
314
|
+
iqr?: number;
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
outlier?: {
|
|
318
|
+
/**
|
|
319
|
+
* Show the outliers.
|
|
320
|
+
*/
|
|
321
|
+
show?: boolean;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Radius of the outliers.
|
|
325
|
+
*/
|
|
326
|
+
r?: number;
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
mean?: {
|
|
330
|
+
/**
|
|
331
|
+
* Show the mean.
|
|
332
|
+
*/
|
|
333
|
+
show?: boolean;
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Size of the mean marker.
|
|
337
|
+
*/
|
|
338
|
+
r?: number;
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Change the width of the box. If ratio is specified, change the width by ratio.
|
|
343
|
+
*/
|
|
344
|
+
width?: number | {
|
|
345
|
+
/**
|
|
346
|
+
* Set the width of each box by ratio
|
|
347
|
+
*/
|
|
348
|
+
ratio: number;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Set max width of each box
|
|
352
|
+
*/
|
|
353
|
+
max?: number;
|
|
354
|
+
} | {
|
|
355
|
+
/**
|
|
356
|
+
* Set the width option for specific dataset
|
|
357
|
+
*/
|
|
358
|
+
[key: string]: number | {
|
|
359
|
+
ratio: number;
|
|
360
|
+
max: number;
|
|
361
|
+
}
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
|
|
297
365
|
export interface CandlestickOptions {
|
|
298
366
|
/**
|
|
299
367
|
* Change the width of bar chart. If ratio is specified, change the width of bar chart by ratio.
|
|
@@ -473,6 +541,162 @@ export interface DonutOptions {
|
|
|
473
541
|
title?: string;
|
|
474
542
|
}
|
|
475
543
|
|
|
544
|
+
export interface BulletOptions {
|
|
545
|
+
/**
|
|
546
|
+
* Set bullet orientation.
|
|
547
|
+
* When `false` (default), bullets are rendered horizontally (measure grows to the right).
|
|
548
|
+
* When `true`, bullets are rendered vertically (measure grows upward).
|
|
549
|
+
*/
|
|
550
|
+
rotated?: boolean;
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* Set how the measure value is rendered.
|
|
554
|
+
* - `bar`: render the measure as a solid bar growing from the baseline.
|
|
555
|
+
* - `dot`: render the measure as a dot marker positioned at the measure value.
|
|
556
|
+
*/
|
|
557
|
+
type?: "bar" | "dot";
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
* Set the dot radius (in px) used when `type="dot"`.
|
|
561
|
+
* When `0`, the radius is derived from the bullet thickness.
|
|
562
|
+
*/
|
|
563
|
+
marker?: {
|
|
564
|
+
size?: number;
|
|
565
|
+
};
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* Set the qualitative range band thresholds.
|
|
569
|
+
* - `Array`: shared ascending thresholds applied to every bullet.
|
|
570
|
+
* - `object`: per-data-id thresholds.
|
|
571
|
+
* - `Function`: callback returning thresholds per bullet.
|
|
572
|
+
* When omitted, three bands are generated automatically from the measure/target domain.
|
|
573
|
+
*/
|
|
574
|
+
ranges?: number[] | {[key: string]: number[]} | ((id: string, value: number) => number[]);
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Set the comparative target marker value.
|
|
578
|
+
* Can be given as a `number` or an `Array` of numbers, an `object` keyed by data id, or a `Function`.
|
|
579
|
+
* An `Array` draws more than one marker for a bullet. All the markers share the same style.
|
|
580
|
+
*/
|
|
581
|
+
target?:
|
|
582
|
+
| number
|
|
583
|
+
| number[]
|
|
584
|
+
| {[key: string]: number | number[]}
|
|
585
|
+
| ((id: string, value: number) => number | number[]);
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* Set the thickness of the measure and the length of the target marker.
|
|
589
|
+
*/
|
|
590
|
+
width?: {
|
|
591
|
+
/**
|
|
592
|
+
* Set the measure thickness as a ratio (0~1) of the bullet band.
|
|
593
|
+
*/
|
|
594
|
+
ratio?: number;
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Set the target marker length.
|
|
598
|
+
*/
|
|
599
|
+
target?: {
|
|
600
|
+
/**
|
|
601
|
+
* Set the target marker length as a ratio (0~1) of the bullet band.
|
|
602
|
+
* @default 0.6
|
|
603
|
+
*/
|
|
604
|
+
ratio?: number;
|
|
605
|
+
};
|
|
606
|
+
};
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
* Set the qualitative range band colors.
|
|
610
|
+
* - `Array`: color strings ordered from the smallest to the largest band.
|
|
611
|
+
* - `Function`: callback returning a color per band.
|
|
612
|
+
* When omitted, the grayscale of the theme is used. Its lightness is set by the CSS variables
|
|
613
|
+
* `--bb-bullet-range-min` and `--bb-bullet-range-max` of `.bb-chart-bullets`.
|
|
614
|
+
*/
|
|
615
|
+
range?: {
|
|
616
|
+
colors?: string[] | ((index: number, length: number) => string);
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* Set the padding (in px) between each bullet band.
|
|
621
|
+
*/
|
|
622
|
+
padding?: number;
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* Set the quantitative scale axis drawn under (beside, when rotated) each bullet.
|
|
626
|
+
*/
|
|
627
|
+
axis?: {
|
|
628
|
+
/**
|
|
629
|
+
* Show or hide the axis.
|
|
630
|
+
* @default true
|
|
631
|
+
*/
|
|
632
|
+
show?: boolean;
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* Set the min value of the scale of every bullet.
|
|
636
|
+
* When not given, the scale of each bullet is calculated from its values and ranges.
|
|
637
|
+
* Set both `min` and `max` to make the bullets share the same scale.
|
|
638
|
+
*/
|
|
639
|
+
min?: number;
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* Set the max value of the scale of every bullet. See `min`.
|
|
643
|
+
*/
|
|
644
|
+
max?: number;
|
|
645
|
+
|
|
646
|
+
tick?: {
|
|
647
|
+
/**
|
|
648
|
+
* Set the approximate number of the ticks.
|
|
649
|
+
*/
|
|
650
|
+
count?: number;
|
|
651
|
+
|
|
652
|
+
/**
|
|
653
|
+
* Set the values of the ticks. It takes precedence over `count`.
|
|
654
|
+
*/
|
|
655
|
+
values?: number[];
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* Set the format of the tick labels.
|
|
659
|
+
*/
|
|
660
|
+
format?: (value: number) => string | number;
|
|
661
|
+
};
|
|
662
|
+
};
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* Set the title of each bullet. It is drawn on the left of the bullet (under the column, when rotated).
|
|
666
|
+
*/
|
|
667
|
+
title?: {
|
|
668
|
+
/**
|
|
669
|
+
* Show or hide the title.
|
|
670
|
+
* @default false
|
|
671
|
+
*/
|
|
672
|
+
show?: boolean;
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Set the text of the title. By default it is the data name, or the data id.
|
|
676
|
+
* Can be given as an `object` keyed by data id, or a `Function`.
|
|
677
|
+
*/
|
|
678
|
+
text?: {[key: string]: string} | ((id: string, value: number) => string);
|
|
679
|
+
};
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* Set the measure value label.
|
|
683
|
+
* The label is a data label: it is drawn when `data.labels` is set.
|
|
684
|
+
*/
|
|
685
|
+
label?: {
|
|
686
|
+
/**
|
|
687
|
+
* Show or hide the measure value label.
|
|
688
|
+
* @default true
|
|
689
|
+
*/
|
|
690
|
+
show?: boolean;
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* Set a formatter for the measure value label.
|
|
694
|
+
* Takes precedence over `data.labels.format`.
|
|
695
|
+
*/
|
|
696
|
+
format?: (value: number, id: string) => string | number;
|
|
697
|
+
};
|
|
698
|
+
}
|
|
699
|
+
|
|
476
700
|
export interface FunnelOptions {
|
|
477
701
|
neck?: {
|
|
478
702
|
/**
|
|
@@ -1036,6 +1260,213 @@ export interface PolarOptions {
|
|
|
1036
1260
|
startAngle?: number;
|
|
1037
1261
|
}
|
|
1038
1262
|
|
|
1263
|
+
export interface HeatmapCellData {
|
|
1264
|
+
id: string;
|
|
1265
|
+
x: string;
|
|
1266
|
+
index: number;
|
|
1267
|
+
value: number | null;
|
|
1268
|
+
name: string;
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
export interface HeatmapOptions {
|
|
1272
|
+
color?: {
|
|
1273
|
+
/**
|
|
1274
|
+
* The colors from the min to the max value (two or more).
|
|
1275
|
+
*/
|
|
1276
|
+
range?: string[];
|
|
1277
|
+
|
|
1278
|
+
/**
|
|
1279
|
+
* The colors by the ranges of the values, instead of a color range spread on the values.
|
|
1280
|
+
* The first range that has the value is used. A value in no range is of `none`.
|
|
1281
|
+
*/
|
|
1282
|
+
ranges?: {from?: number; to?: number; color: string; name?: string}[];
|
|
1283
|
+
|
|
1284
|
+
/**
|
|
1285
|
+
* The value of the first color. When it isn't set, the min value of the data is used.
|
|
1286
|
+
*/
|
|
1287
|
+
min?: number;
|
|
1288
|
+
|
|
1289
|
+
/**
|
|
1290
|
+
* The value of the last color. When it isn't set, the max value of the data is used.
|
|
1291
|
+
*/
|
|
1292
|
+
max?: number;
|
|
1293
|
+
|
|
1294
|
+
/**
|
|
1295
|
+
* The color of a cell without a value. Set `null` to draw nothing there.
|
|
1296
|
+
*/
|
|
1297
|
+
none?: string | null;
|
|
1298
|
+
};
|
|
1299
|
+
|
|
1300
|
+
cell?: {
|
|
1301
|
+
/**
|
|
1302
|
+
* The ratio of the width to the height of the cells: 1 makes them squares.
|
|
1303
|
+
* The chart is as high as the cells need, from its width. When `size.height` is set, the cells are the biggest of the ratio that fit in it. When it isn't set, the cells fill the chart.
|
|
1304
|
+
*/
|
|
1305
|
+
ratio?: number;
|
|
1306
|
+
|
|
1307
|
+
/**
|
|
1308
|
+
* The gap between the cells in pixels.
|
|
1309
|
+
*/
|
|
1310
|
+
padding?: number;
|
|
1311
|
+
|
|
1312
|
+
/**
|
|
1313
|
+
* The radius of the corners of the cells in pixels.
|
|
1314
|
+
*/
|
|
1315
|
+
radius?: number;
|
|
1316
|
+
|
|
1317
|
+
border?: {
|
|
1318
|
+
/**
|
|
1319
|
+
* The width of the border of the cells in pixels.
|
|
1320
|
+
*/
|
|
1321
|
+
width?: number;
|
|
1322
|
+
|
|
1323
|
+
/**
|
|
1324
|
+
* The color of the border of the cells.
|
|
1325
|
+
*/
|
|
1326
|
+
color?: string;
|
|
1327
|
+
};
|
|
1328
|
+
};
|
|
1329
|
+
|
|
1330
|
+
label?: {
|
|
1331
|
+
/**
|
|
1332
|
+
* Show the values in the cells.
|
|
1333
|
+
*/
|
|
1334
|
+
show?: boolean;
|
|
1335
|
+
|
|
1336
|
+
/**
|
|
1337
|
+
* Set the formatter of the values in the cells.
|
|
1338
|
+
*/
|
|
1339
|
+
format?: (this: Chart, value: number, x: string, id: string) => string;
|
|
1340
|
+
|
|
1341
|
+
/**
|
|
1342
|
+
* The color of the values. When it isn't set, black or white is used to read on the cell.
|
|
1343
|
+
*/
|
|
1344
|
+
color?: string;
|
|
1345
|
+
};
|
|
1346
|
+
|
|
1347
|
+
axis?: {
|
|
1348
|
+
x?: {
|
|
1349
|
+
/**
|
|
1350
|
+
* Show the names of the columns.
|
|
1351
|
+
*/
|
|
1352
|
+
show?: boolean;
|
|
1353
|
+
|
|
1354
|
+
/**
|
|
1355
|
+
* The position of the names of the columns.
|
|
1356
|
+
*/
|
|
1357
|
+
position?: "bottom" | "top";
|
|
1358
|
+
};
|
|
1359
|
+
|
|
1360
|
+
y?: {
|
|
1361
|
+
/**
|
|
1362
|
+
* Show the names of the rows.
|
|
1363
|
+
*/
|
|
1364
|
+
show?: boolean;
|
|
1365
|
+
};
|
|
1366
|
+
};
|
|
1367
|
+
|
|
1368
|
+
colorbar?: {
|
|
1369
|
+
/**
|
|
1370
|
+
* Show the color bar, with the min and the max value.
|
|
1371
|
+
*/
|
|
1372
|
+
show?: boolean;
|
|
1373
|
+
|
|
1374
|
+
/**
|
|
1375
|
+
* The position of the color bar: right (vertical), bottom or top (horizontal).
|
|
1376
|
+
*/
|
|
1377
|
+
position?: "right" | "bottom" | "top";
|
|
1378
|
+
|
|
1379
|
+
/**
|
|
1380
|
+
* Set the formatter of the values of the color bar.
|
|
1381
|
+
*/
|
|
1382
|
+
format?: (this: Chart, value: number) => string;
|
|
1383
|
+
};
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
export interface SankeyNodeData {
|
|
1387
|
+
id: string;
|
|
1388
|
+
index: number;
|
|
1389
|
+
value: number;
|
|
1390
|
+
name: string;
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
export interface SankeyOptions {
|
|
1394
|
+
/**
|
|
1395
|
+
* Make the flow go down instead of to the right.
|
|
1396
|
+
*/
|
|
1397
|
+
rotated?: boolean;
|
|
1398
|
+
|
|
1399
|
+
node?: {
|
|
1400
|
+
/**
|
|
1401
|
+
* The thickness of the nodes along the flow in pixels.
|
|
1402
|
+
*/
|
|
1403
|
+
width?: number;
|
|
1404
|
+
|
|
1405
|
+
/**
|
|
1406
|
+
* The space between the nodes of a step in pixels.
|
|
1407
|
+
*/
|
|
1408
|
+
padding?: number;
|
|
1409
|
+
|
|
1410
|
+
/**
|
|
1411
|
+
* How the nodes are placed in the columns.
|
|
1412
|
+
*/
|
|
1413
|
+
align?: "justify" | "left" | "right" | "center";
|
|
1414
|
+
|
|
1415
|
+
/**
|
|
1416
|
+
* The order of the nodes in a step.
|
|
1417
|
+
* - auto: the layout orders them, to have less crossing links
|
|
1418
|
+
* - data: the order the nodes appear in the data
|
|
1419
|
+
* - asc, desc: by the value of the nodes
|
|
1420
|
+
* - function: a comparator of the data of two nodes
|
|
1421
|
+
*/
|
|
1422
|
+
sort?: "auto" | "data" | "asc" | "desc" | ((this: Chart, a: SankeyNodeData, b: SankeyNodeData) => number);
|
|
1423
|
+
|
|
1424
|
+
border?: {
|
|
1425
|
+
/**
|
|
1426
|
+
* The width of the border of the nodes in pixels.
|
|
1427
|
+
*/
|
|
1428
|
+
width?: number;
|
|
1429
|
+
|
|
1430
|
+
/**
|
|
1431
|
+
* The color of the border of the nodes.
|
|
1432
|
+
*/
|
|
1433
|
+
color?: string;
|
|
1434
|
+
};
|
|
1435
|
+
};
|
|
1436
|
+
|
|
1437
|
+
link?: {
|
|
1438
|
+
/**
|
|
1439
|
+
* The color of the links.
|
|
1440
|
+
* - source: the color of the source node
|
|
1441
|
+
* - target: the color of the target node
|
|
1442
|
+
* - gradient: a gradient from the color of the source node to the color of the target node
|
|
1443
|
+
*/
|
|
1444
|
+
color?: "source" | "target" | "gradient";
|
|
1445
|
+
|
|
1446
|
+
/**
|
|
1447
|
+
* The opacity of the links, from 0 to 1. When it isn't set, the opacity is of the stylesheet.
|
|
1448
|
+
*/
|
|
1449
|
+
opacity?: number;
|
|
1450
|
+
};
|
|
1451
|
+
|
|
1452
|
+
/**
|
|
1453
|
+
* The number of the passes to place the nodes vertically.
|
|
1454
|
+
*/
|
|
1455
|
+
iterations?: number;
|
|
1456
|
+
|
|
1457
|
+
label?: {
|
|
1458
|
+
/**
|
|
1459
|
+
* Show the names of the nodes.
|
|
1460
|
+
*/
|
|
1461
|
+
show?: boolean;
|
|
1462
|
+
|
|
1463
|
+
/**
|
|
1464
|
+
* Set the formatter of the node names.
|
|
1465
|
+
*/
|
|
1466
|
+
format?: (this: Chart, name: string, value: number, id: string) => string;
|
|
1467
|
+
};
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1039
1470
|
export interface RadarOptions {
|
|
1040
1471
|
axis?: {
|
|
1041
1472
|
/**
|
package/types/types.d.ts
CHANGED
|
@@ -19,15 +19,19 @@ export type ChartTypes = "area"
|
|
|
19
19
|
| "area-step"
|
|
20
20
|
| "area-step-range"
|
|
21
21
|
| "bar"
|
|
22
|
+
| "boxplot"
|
|
22
23
|
| "bubble"
|
|
24
|
+
| "bullet"
|
|
23
25
|
| "candlestick"
|
|
24
26
|
| "donut"
|
|
25
27
|
| "funnel"
|
|
26
28
|
| "gauge"
|
|
29
|
+
| "heatmap"
|
|
27
30
|
| "line"
|
|
28
31
|
| "pie"
|
|
29
32
|
| "polar"
|
|
30
33
|
| "radar"
|
|
34
|
+
| "sankey"
|
|
31
35
|
| "scatter"
|
|
32
36
|
| "spline"
|
|
33
37
|
| "step"
|