minerva-design 1.3.0 → 1.4.0
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/CHANGELOG.md +9 -0
- package/README.md +21 -21
- package/custom-elements.json +13630 -4757
- package/dist/angular/fesm2022/minerva-angular.mjs +6872 -172
- package/dist/angular/fesm2022/minerva-angular.mjs.map +1 -1
- package/dist/angular/types/minerva-angular.d.ts +2240 -0
- package/dist/charts/canvas.d.cts +7 -2
- package/dist/charts/canvas.d.ts +7 -2
- package/dist/charts/core.cjs +1 -1
- package/dist/charts/core.d.cts +7 -4
- package/dist/charts/core.d.ts +7 -4
- package/dist/charts/core.js +19 -8
- package/dist/charts/engine/axis.cjs +1 -1
- package/dist/charts/engine/axis.cjs.map +1 -1
- package/dist/charts/engine/axis.js +6 -6
- package/dist/charts/engine/axis.js.map +1 -1
- package/dist/charts/engine/canvas.cjs +1 -1
- package/dist/charts/engine/canvas.cjs.map +1 -1
- package/dist/charts/engine/canvas.d.cts +11 -1
- package/dist/charts/engine/canvas.d.ts +11 -1
- package/dist/charts/engine/canvas.js +118 -68
- package/dist/charts/engine/canvas.js.map +1 -1
- package/dist/charts/engine/chart.cjs +1 -1
- package/dist/charts/engine/chart.cjs.map +1 -1
- package/dist/charts/engine/chart.d.cts +1 -1
- package/dist/charts/engine/chart.d.ts +1 -1
- package/dist/charts/engine/chart.js +307 -285
- package/dist/charts/engine/chart.js.map +1 -1
- package/dist/charts/engine/color.cjs +1 -1
- package/dist/charts/engine/color.cjs.map +1 -1
- package/dist/charts/engine/color.js +2 -2
- package/dist/charts/engine/color.js.map +1 -1
- package/dist/charts/engine/controller.cjs +1 -1
- package/dist/charts/engine/controller.cjs.map +1 -1
- package/dist/charts/engine/controller.d.cts +12 -3
- package/dist/charts/engine/controller.d.ts +12 -3
- package/dist/charts/engine/controller.js +359 -299
- package/dist/charts/engine/controller.js.map +1 -1
- package/dist/charts/engine/data.cjs +1 -1
- package/dist/charts/engine/data.cjs.map +1 -1
- package/dist/charts/engine/data.d.cts +6 -0
- package/dist/charts/engine/data.d.ts +6 -0
- package/dist/charts/engine/data.js +63 -49
- package/dist/charts/engine/data.js.map +1 -1
- package/dist/charts/engine/format.cjs +1 -1
- package/dist/charts/engine/format.cjs.map +1 -1
- package/dist/charts/engine/format.d.cts +21 -6
- package/dist/charts/engine/format.d.ts +21 -6
- package/dist/charts/engine/format.js +46 -21
- package/dist/charts/engine/format.js.map +1 -1
- package/dist/charts/engine/items.cjs +1 -1
- package/dist/charts/engine/items.cjs.map +1 -1
- package/dist/charts/engine/items.js +211 -54
- package/dist/charts/engine/items.js.map +1 -1
- package/dist/charts/engine/labels.cjs +2 -0
- package/dist/charts/engine/labels.cjs.map +1 -0
- package/dist/charts/engine/labels.d.cts +13 -0
- package/dist/charts/engine/labels.d.ts +13 -0
- package/dist/charts/engine/labels.js +74 -0
- package/dist/charts/engine/labels.js.map +1 -0
- package/dist/charts/engine/layout.cjs +1 -1
- package/dist/charts/engine/layout.cjs.map +1 -1
- package/dist/charts/engine/layout.d.cts +34 -2
- package/dist/charts/engine/layout.d.ts +34 -2
- package/dist/charts/engine/layout.js +53 -12
- package/dist/charts/engine/layout.js.map +1 -1
- package/dist/charts/engine/locale.cjs +2 -0
- package/dist/charts/engine/locale.cjs.map +1 -0
- package/dist/charts/engine/locale.d.cts +33 -0
- package/dist/charts/engine/locale.d.ts +33 -0
- package/dist/charts/engine/locale.js +68 -0
- package/dist/charts/engine/locale.js.map +1 -0
- package/dist/charts/engine/model.cjs +1 -1
- package/dist/charts/engine/model.cjs.map +1 -1
- package/dist/charts/engine/model.d.cts +39 -1
- package/dist/charts/engine/model.d.ts +39 -1
- package/dist/charts/engine/model.js +212 -105
- package/dist/charts/engine/model.js.map +1 -1
- package/dist/charts/engine/orderbook/book.cjs +2 -0
- package/dist/charts/engine/orderbook/book.cjs.map +1 -0
- package/dist/charts/engine/orderbook/book.d.cts +28 -0
- package/dist/charts/engine/orderbook/book.d.ts +28 -0
- package/dist/charts/engine/orderbook/book.js +134 -0
- package/dist/charts/engine/orderbook/book.js.map +1 -0
- package/dist/charts/engine/orderbook/depth.cjs +2 -0
- package/dist/charts/engine/orderbook/depth.cjs.map +1 -0
- package/dist/charts/engine/orderbook/depth.d.cts +7 -0
- package/dist/charts/engine/orderbook/depth.d.ts +7 -0
- package/dist/charts/engine/orderbook/depth.js +413 -0
- package/dist/charts/engine/orderbook/depth.js.map +1 -0
- package/dist/charts/engine/orderbook/format.cjs +2 -0
- package/dist/charts/engine/orderbook/format.cjs.map +1 -0
- package/dist/charts/engine/orderbook/format.d.cts +48 -0
- package/dist/charts/engine/orderbook/format.d.ts +48 -0
- package/dist/charts/engine/orderbook/format.js +65 -0
- package/dist/charts/engine/orderbook/format.js.map +1 -0
- package/dist/charts/engine/orderbook/heatmap.cjs +2 -0
- package/dist/charts/engine/orderbook/heatmap.cjs.map +1 -0
- package/dist/charts/engine/orderbook/heatmap.d.cts +9 -0
- package/dist/charts/engine/orderbook/heatmap.d.ts +9 -0
- package/dist/charts/engine/orderbook/heatmap.js +703 -0
- package/dist/charts/engine/orderbook/heatmap.js.map +1 -0
- package/dist/charts/engine/orderbook/host.cjs +2 -0
- package/dist/charts/engine/orderbook/host.cjs.map +1 -0
- package/dist/charts/engine/orderbook/host.d.cts +50 -0
- package/dist/charts/engine/orderbook/host.d.ts +50 -0
- package/dist/charts/engine/orderbook/host.js +161 -0
- package/dist/charts/engine/orderbook/host.js.map +1 -0
- package/dist/charts/engine/orderbook/index.cjs +1 -0
- package/dist/charts/engine/orderbook/index.d.cts +6 -0
- package/dist/charts/engine/orderbook/index.d.ts +6 -0
- package/dist/charts/engine/orderbook/index.js +6 -0
- package/dist/charts/engine/orderbook/ladder.cjs +2 -0
- package/dist/charts/engine/orderbook/ladder.cjs.map +1 -0
- package/dist/charts/engine/orderbook/ladder.d.cts +6 -0
- package/dist/charts/engine/orderbook/ladder.d.ts +6 -0
- package/dist/charts/engine/orderbook/ladder.js +341 -0
- package/dist/charts/engine/orderbook/ladder.js.map +1 -0
- package/dist/charts/engine/orderbook/tape.cjs +2 -0
- package/dist/charts/engine/orderbook/tape.cjs.map +1 -0
- package/dist/charts/engine/orderbook/tape.d.cts +6 -0
- package/dist/charts/engine/orderbook/tape.d.ts +6 -0
- package/dist/charts/engine/orderbook/tape.js +450 -0
- package/dist/charts/engine/orderbook/tape.js.map +1 -0
- package/dist/charts/engine/orderbook/types.d.cts +735 -0
- package/dist/charts/engine/orderbook/types.d.ts +735 -0
- package/dist/charts/engine/overlay.cjs +1 -1
- package/dist/charts/engine/overlay.cjs.map +1 -1
- package/dist/charts/engine/overlay.d.cts +18 -2
- package/dist/charts/engine/overlay.d.ts +18 -2
- package/dist/charts/engine/overlay.js +132 -96
- package/dist/charts/engine/overlay.js.map +1 -1
- package/dist/charts/engine/presets.cjs +2 -2
- package/dist/charts/engine/presets.cjs.map +1 -1
- package/dist/charts/engine/presets.d.cts +249 -1
- package/dist/charts/engine/presets.d.ts +249 -1
- package/dist/charts/engine/presets.js +367 -29
- package/dist/charts/engine/presets.js.map +1 -1
- package/dist/charts/engine/renderers/detect.cjs +1 -1
- package/dist/charts/engine/renderers/detect.cjs.map +1 -1
- package/dist/charts/engine/renderers/detect.js +18 -15
- package/dist/charts/engine/renderers/detect.js.map +1 -1
- package/dist/charts/engine/renderers/gl.cjs +2 -0
- package/dist/charts/engine/renderers/gl.cjs.map +1 -0
- package/dist/charts/engine/renderers/gl.d.cts +21 -0
- package/dist/charts/engine/renderers/gl.d.ts +21 -0
- package/dist/charts/engine/renderers/gl.js +56 -0
- package/dist/charts/engine/renderers/gl.js.map +1 -0
- package/dist/charts/engine/renderers/shaders.cjs +143 -1
- package/dist/charts/engine/renderers/shaders.cjs.map +1 -1
- package/dist/charts/engine/renderers/shaders.d.cts +16 -0
- package/dist/charts/engine/renderers/shaders.d.ts +16 -0
- package/dist/charts/engine/renderers/shaders.js +139 -1
- package/dist/charts/engine/renderers/shaders.js.map +1 -1
- package/dist/charts/engine/renderers/webgl.cjs +2 -0
- package/dist/charts/engine/renderers/webgl.cjs.map +1 -0
- package/dist/charts/engine/renderers/webgl.d.cts +4 -0
- package/dist/charts/engine/renderers/webgl.d.ts +4 -0
- package/dist/charts/engine/renderers/webgl.js +133 -0
- package/dist/charts/engine/renderers/webgl.js.map +1 -0
- package/dist/charts/engine/renderers/webgl2.cjs +1 -1
- package/dist/charts/engine/renderers/webgl2.cjs.map +1 -1
- package/dist/charts/engine/renderers/webgl2.d.cts +0 -1
- package/dist/charts/engine/renderers/webgl2.d.ts +0 -1
- package/dist/charts/engine/renderers/webgl2.js +59 -108
- package/dist/charts/engine/renderers/webgl2.js.map +1 -1
- package/dist/charts/engine/scale.cjs +1 -1
- package/dist/charts/engine/scale.cjs.map +1 -1
- package/dist/charts/engine/scale.js +1 -1
- package/dist/charts/engine/scale.js.map +1 -1
- package/dist/charts/engine/scene.cjs +1 -1
- package/dist/charts/engine/scene.cjs.map +1 -1
- package/dist/charts/engine/scene.d.cts +14 -4
- package/dist/charts/engine/scene.d.ts +14 -4
- package/dist/charts/engine/scene.js +292 -163
- package/dist/charts/engine/scene.js.map +1 -1
- package/dist/charts/engine/shapes/bullet.cjs +2 -0
- package/dist/charts/engine/shapes/bullet.cjs.map +1 -0
- package/dist/charts/engine/shapes/bullet.d.cts +6 -0
- package/dist/charts/engine/shapes/bullet.d.ts +6 -0
- package/dist/charts/engine/shapes/bullet.js +255 -0
- package/dist/charts/engine/shapes/bullet.js.map +1 -0
- package/dist/charts/engine/shapes/calendar.cjs +2 -0
- package/dist/charts/engine/shapes/calendar.cjs.map +1 -0
- package/dist/charts/engine/shapes/calendar.d.cts +38 -0
- package/dist/charts/engine/shapes/calendar.d.ts +38 -0
- package/dist/charts/engine/shapes/calendar.js +369 -0
- package/dist/charts/engine/shapes/calendar.js.map +1 -0
- package/dist/charts/engine/shapes/canvas.cjs +1 -1
- package/dist/charts/engine/shapes/canvas.cjs.map +1 -1
- package/dist/charts/engine/shapes/canvas.d.cts +7 -0
- package/dist/charts/engine/shapes/canvas.d.ts +7 -0
- package/dist/charts/engine/shapes/canvas.js +22 -13
- package/dist/charts/engine/shapes/canvas.js.map +1 -1
- package/dist/charts/engine/shapes/chart.cjs +1 -1
- package/dist/charts/engine/shapes/chart.cjs.map +1 -1
- package/dist/charts/engine/shapes/chart.d.cts +3 -2
- package/dist/charts/engine/shapes/chart.d.ts +3 -2
- package/dist/charts/engine/shapes/chart.js +45 -26
- package/dist/charts/engine/shapes/chart.js.map +1 -1
- package/dist/charts/engine/shapes/draw.cjs +1 -1
- package/dist/charts/engine/shapes/draw.cjs.map +1 -1
- package/dist/charts/engine/shapes/draw.d.cts +3 -1
- package/dist/charts/engine/shapes/draw.d.ts +3 -1
- package/dist/charts/engine/shapes/draw.js +31 -18
- package/dist/charts/engine/shapes/draw.js.map +1 -1
- package/dist/charts/engine/shapes/funnel.cjs +1 -1
- package/dist/charts/engine/shapes/funnel.cjs.map +1 -1
- package/dist/charts/engine/shapes/funnel.js +3 -3
- package/dist/charts/engine/shapes/funnel.js.map +1 -1
- package/dist/charts/engine/shapes/gauge.cjs +1 -1
- package/dist/charts/engine/shapes/gauge.cjs.map +1 -1
- package/dist/charts/engine/shapes/gauge.js +132 -95
- package/dist/charts/engine/shapes/gauge.js.map +1 -1
- package/dist/charts/engine/shapes/hit.cjs +1 -1
- package/dist/charts/engine/shapes/hit.cjs.map +1 -1
- package/dist/charts/engine/shapes/hit.d.cts +3 -1
- package/dist/charts/engine/shapes/hit.d.ts +3 -1
- package/dist/charts/engine/shapes/hit.js +29 -8
- package/dist/charts/engine/shapes/hit.js.map +1 -1
- package/dist/charts/engine/shapes/index.d.cts +4 -1
- package/dist/charts/engine/shapes/index.d.ts +4 -1
- package/dist/charts/engine/shapes/labels.cjs +2 -0
- package/dist/charts/engine/shapes/labels.cjs.map +1 -0
- package/dist/charts/engine/shapes/labels.d.cts +14 -0
- package/dist/charts/engine/shapes/labels.d.ts +14 -0
- package/dist/charts/engine/shapes/labels.js +146 -0
- package/dist/charts/engine/shapes/labels.js.map +1 -0
- package/dist/charts/engine/shapes/layout.cjs +2 -2
- package/dist/charts/engine/shapes/layout.cjs.map +1 -1
- package/dist/charts/engine/shapes/layout.d.cts +8 -3
- package/dist/charts/engine/shapes/layout.d.ts +8 -3
- package/dist/charts/engine/shapes/layout.js +200 -113
- package/dist/charts/engine/shapes/layout.js.map +1 -1
- package/dist/charts/engine/shapes/pie.cjs +1 -1
- package/dist/charts/engine/shapes/pie.cjs.map +1 -1
- package/dist/charts/engine/shapes/pie.js +2 -2
- package/dist/charts/engine/shapes/pie.js.map +1 -1
- package/dist/charts/engine/shapes/radar.cjs +1 -1
- package/dist/charts/engine/shapes/radar.cjs.map +1 -1
- package/dist/charts/engine/shapes/radar.d.cts +2 -2
- package/dist/charts/engine/shapes/radar.d.ts +2 -2
- package/dist/charts/engine/shapes/radar.js +50 -49
- package/dist/charts/engine/shapes/radar.js.map +1 -1
- package/dist/charts/engine/shapes/radialBar.cjs +2 -0
- package/dist/charts/engine/shapes/radialBar.cjs.map +1 -0
- package/dist/charts/engine/shapes/radialBar.d.cts +8 -0
- package/dist/charts/engine/shapes/radialBar.d.ts +8 -0
- package/dist/charts/engine/shapes/radialBar.js +155 -0
- package/dist/charts/engine/shapes/radialBar.js.map +1 -0
- package/dist/charts/engine/shapes/runtime.cjs +1 -1
- package/dist/charts/engine/shapes/runtime.cjs.map +1 -1
- package/dist/charts/engine/shapes/runtime.d.cts +9 -2
- package/dist/charts/engine/shapes/runtime.d.ts +9 -2
- package/dist/charts/engine/shapes/runtime.js +61 -51
- package/dist/charts/engine/shapes/runtime.js.map +1 -1
- package/dist/charts/engine/shapes/sankey.cjs +2 -0
- package/dist/charts/engine/shapes/sankey.cjs.map +1 -0
- package/dist/charts/engine/shapes/sankey.d.cts +29 -0
- package/dist/charts/engine/shapes/sankey.d.ts +29 -0
- package/dist/charts/engine/shapes/sankey.js +372 -0
- package/dist/charts/engine/shapes/sankey.js.map +1 -0
- package/dist/charts/engine/shapes/scene.cjs +1 -1
- package/dist/charts/engine/shapes/scene.cjs.map +1 -1
- package/dist/charts/engine/shapes/scene.d.cts +62 -8
- package/dist/charts/engine/shapes/scene.d.ts +62 -8
- package/dist/charts/engine/shapes/scene.js +33 -31
- package/dist/charts/engine/shapes/scene.js.map +1 -1
- package/dist/charts/engine/shapes/sunburst.cjs +2 -0
- package/dist/charts/engine/shapes/sunburst.cjs.map +1 -0
- package/dist/charts/engine/shapes/sunburst.d.cts +6 -0
- package/dist/charts/engine/shapes/sunburst.d.ts +6 -0
- package/dist/charts/engine/shapes/sunburst.js +261 -0
- package/dist/charts/engine/shapes/sunburst.js.map +1 -0
- package/dist/charts/engine/shapes/treemap.cjs +1 -1
- package/dist/charts/engine/shapes/treemap.cjs.map +1 -1
- package/dist/charts/engine/shapes/treemap.js +2 -2
- package/dist/charts/engine/shapes/treemap.js.map +1 -1
- package/dist/charts/engine/shapes/types.d.cts +439 -12
- package/dist/charts/engine/shapes/types.d.ts +439 -12
- package/dist/charts/engine/three-d/canvas2d.cjs +2 -0
- package/dist/charts/engine/three-d/canvas2d.cjs.map +1 -0
- package/dist/charts/engine/three-d/canvas2d.d.cts +4 -0
- package/dist/charts/engine/three-d/canvas2d.d.ts +4 -0
- package/dist/charts/engine/three-d/canvas2d.js +104 -0
- package/dist/charts/engine/three-d/canvas2d.js.map +1 -0
- package/dist/charts/engine/three-d/chart.cjs +2 -0
- package/dist/charts/engine/three-d/chart.cjs.map +1 -0
- package/dist/charts/engine/three-d/chart.d.cts +15 -0
- package/dist/charts/engine/three-d/chart.d.ts +15 -0
- package/dist/charts/engine/three-d/chart.js +621 -0
- package/dist/charts/engine/three-d/chart.js.map +1 -0
- package/dist/charts/engine/three-d/colormap.cjs +2 -0
- package/dist/charts/engine/three-d/colormap.cjs.map +1 -0
- package/dist/charts/engine/three-d/colormap.d.cts +16 -0
- package/dist/charts/engine/three-d/colormap.d.ts +16 -0
- package/dist/charts/engine/three-d/colormap.js +166 -0
- package/dist/charts/engine/three-d/colormap.js.map +1 -0
- package/dist/charts/engine/three-d/contours.cjs +2 -0
- package/dist/charts/engine/three-d/contours.cjs.map +1 -0
- package/dist/charts/engine/three-d/contours.d.cts +7 -0
- package/dist/charts/engine/three-d/contours.d.ts +7 -0
- package/dist/charts/engine/three-d/contours.js +47 -0
- package/dist/charts/engine/three-d/contours.js.map +1 -0
- package/dist/charts/engine/three-d/detect.cjs +2 -0
- package/dist/charts/engine/three-d/detect.cjs.map +1 -0
- package/dist/charts/engine/three-d/detect.d.cts +11 -0
- package/dist/charts/engine/three-d/detect.d.ts +11 -0
- package/dist/charts/engine/three-d/detect.js +35 -0
- package/dist/charts/engine/three-d/detect.js.map +1 -0
- package/dist/charts/engine/three-d/dom.cjs +2 -0
- package/dist/charts/engine/three-d/dom.cjs.map +1 -0
- package/dist/charts/engine/three-d/dom.d.cts +21 -0
- package/dist/charts/engine/three-d/dom.d.ts +21 -0
- package/dist/charts/engine/three-d/dom.js +98 -0
- package/dist/charts/engine/three-d/dom.js.map +1 -0
- package/dist/charts/engine/three-d/geometry.cjs +2 -0
- package/dist/charts/engine/three-d/geometry.cjs.map +1 -0
- package/dist/charts/engine/three-d/geometry.d.cts +76 -0
- package/dist/charts/engine/three-d/geometry.d.ts +76 -0
- package/dist/charts/engine/three-d/geometry.js +529 -0
- package/dist/charts/engine/three-d/geometry.js.map +1 -0
- package/dist/charts/engine/three-d/hover.cjs +2 -0
- package/dist/charts/engine/three-d/hover.cjs.map +1 -0
- package/dist/charts/engine/three-d/hover.d.cts +25 -0
- package/dist/charts/engine/three-d/hover.d.ts +25 -0
- package/dist/charts/engine/three-d/hover.js +131 -0
- package/dist/charts/engine/three-d/hover.js.map +1 -0
- package/dist/charts/engine/three-d/index.cjs +1 -0
- package/dist/charts/engine/three-d/index.d.cts +2 -0
- package/dist/charts/engine/three-d/index.d.ts +2 -0
- package/dist/charts/engine/three-d/index.js +2 -0
- package/dist/charts/engine/three-d/labels.cjs +2 -0
- package/dist/charts/engine/three-d/labels.cjs.map +1 -0
- package/dist/charts/engine/three-d/labels.d.cts +23 -0
- package/dist/charts/engine/three-d/labels.d.ts +23 -0
- package/dist/charts/engine/three-d/labels.js +136 -0
- package/dist/charts/engine/three-d/labels.js.map +1 -0
- package/dist/charts/engine/three-d/math.cjs +2 -0
- package/dist/charts/engine/three-d/math.cjs.map +1 -0
- package/dist/charts/engine/three-d/math.d.cts +84 -0
- package/dist/charts/engine/three-d/math.d.ts +84 -0
- package/dist/charts/engine/three-d/math.js +150 -0
- package/dist/charts/engine/three-d/math.js.map +1 -0
- package/dist/charts/engine/three-d/model.cjs +2 -0
- package/dist/charts/engine/three-d/model.cjs.map +1 -0
- package/dist/charts/engine/three-d/model.d.cts +130 -0
- package/dist/charts/engine/three-d/model.d.ts +130 -0
- package/dist/charts/engine/three-d/model.js +277 -0
- package/dist/charts/engine/three-d/model.js.map +1 -0
- package/dist/charts/engine/three-d/overlay.cjs +2 -0
- package/dist/charts/engine/three-d/overlay.cjs.map +1 -0
- package/dist/charts/engine/three-d/overlay.d.cts +72 -0
- package/dist/charts/engine/three-d/overlay.d.ts +72 -0
- package/dist/charts/engine/three-d/overlay.js +197 -0
- package/dist/charts/engine/three-d/overlay.js.map +1 -0
- package/dist/charts/engine/three-d/pick.cjs +2 -0
- package/dist/charts/engine/three-d/pick.cjs.map +1 -0
- package/dist/charts/engine/three-d/pick.d.cts +52 -0
- package/dist/charts/engine/three-d/pick.d.ts +52 -0
- package/dist/charts/engine/three-d/pick.js +220 -0
- package/dist/charts/engine/three-d/pick.js.map +1 -0
- package/dist/charts/engine/three-d/render-types.cjs +2 -0
- package/dist/charts/engine/three-d/render-types.cjs.map +1 -0
- package/dist/charts/engine/three-d/render-types.d.cts +82 -0
- package/dist/charts/engine/three-d/render-types.d.ts +82 -0
- package/dist/charts/engine/three-d/render-types.js +13 -0
- package/dist/charts/engine/three-d/render-types.js.map +1 -0
- package/dist/charts/engine/three-d/shaders.cjs +276 -0
- package/dist/charts/engine/three-d/shaders.cjs.map +1 -0
- package/dist/charts/engine/three-d/shaders.d.cts +26 -0
- package/dist/charts/engine/three-d/shaders.d.ts +26 -0
- package/dist/charts/engine/three-d/shaders.js +191 -0
- package/dist/charts/engine/three-d/shaders.js.map +1 -0
- package/dist/charts/engine/three-d/sort.cjs +2 -0
- package/dist/charts/engine/three-d/sort.cjs.map +1 -0
- package/dist/charts/engine/three-d/sort.d.cts +18 -0
- package/dist/charts/engine/three-d/sort.d.ts +18 -0
- package/dist/charts/engine/three-d/sort.js +71 -0
- package/dist/charts/engine/three-d/sort.js.map +1 -0
- package/dist/charts/engine/three-d/types.d.cts +588 -0
- package/dist/charts/engine/three-d/types.d.ts +588 -0
- package/dist/charts/engine/three-d/webgl.cjs +2 -0
- package/dist/charts/engine/three-d/webgl.cjs.map +1 -0
- package/dist/charts/engine/three-d/webgl.d.cts +10 -0
- package/dist/charts/engine/three-d/webgl.d.ts +10 -0
- package/dist/charts/engine/three-d/webgl.js +130 -0
- package/dist/charts/engine/three-d/webgl.js.map +1 -0
- package/dist/charts/engine/three-d/webgpu.cjs +2 -0
- package/dist/charts/engine/three-d/webgpu.cjs.map +1 -0
- package/dist/charts/engine/three-d/webgpu.d.cts +5 -0
- package/dist/charts/engine/three-d/webgpu.d.ts +5 -0
- package/dist/charts/engine/three-d/webgpu.js +249 -0
- package/dist/charts/engine/three-d/webgpu.js.map +1 -0
- package/dist/charts/engine/time.cjs +1 -1
- package/dist/charts/engine/time.cjs.map +1 -1
- package/dist/charts/engine/time.d.cts +13 -4
- package/dist/charts/engine/time.d.ts +13 -4
- package/dist/charts/engine/time.js +156 -91
- package/dist/charts/engine/time.js.map +1 -1
- package/dist/charts/engine/trading/chart.cjs +2 -0
- package/dist/charts/engine/trading/chart.cjs.map +1 -0
- package/dist/charts/engine/trading/chart.d.cts +3 -0
- package/dist/charts/engine/trading/chart.d.ts +3 -0
- package/dist/charts/engine/trading/chart.js +1507 -0
- package/dist/charts/engine/trading/chart.js.map +1 -0
- package/dist/charts/engine/trading/drawings.cjs +2 -0
- package/dist/charts/engine/trading/drawings.cjs.map +1 -0
- package/dist/charts/engine/trading/drawings.d.cts +57 -0
- package/dist/charts/engine/trading/drawings.d.ts +57 -0
- package/dist/charts/engine/trading/drawings.js +160 -0
- package/dist/charts/engine/trading/drawings.js.map +1 -0
- package/dist/charts/engine/trading/format.cjs +2 -0
- package/dist/charts/engine/trading/format.cjs.map +1 -0
- package/dist/charts/engine/trading/format.d.cts +60 -0
- package/dist/charts/engine/trading/format.d.ts +60 -0
- package/dist/charts/engine/trading/format.js +131 -0
- package/dist/charts/engine/trading/format.js.map +1 -0
- package/dist/charts/engine/trading/geometry.cjs +2 -0
- package/dist/charts/engine/trading/geometry.cjs.map +1 -0
- package/dist/charts/engine/trading/geometry.d.cts +55 -0
- package/dist/charts/engine/trading/geometry.d.ts +55 -0
- package/dist/charts/engine/trading/geometry.js +131 -0
- package/dist/charts/engine/trading/geometry.js.map +1 -0
- package/dist/charts/engine/trading/index.cjs +1 -0
- package/dist/charts/engine/trading/index.d.cts +3 -0
- package/dist/charts/engine/trading/index.d.ts +3 -0
- package/dist/charts/engine/trading/index.js +3 -0
- package/dist/charts/engine/trading/indicators.cjs +2 -0
- package/dist/charts/engine/trading/indicators.cjs.map +1 -0
- package/dist/charts/engine/trading/indicators.d.cts +105 -0
- package/dist/charts/engine/trading/indicators.d.ts +105 -0
- package/dist/charts/engine/trading/indicators.js +268 -0
- package/dist/charts/engine/trading/indicators.js.map +1 -0
- package/dist/charts/engine/trading/labels.cjs +2 -0
- package/dist/charts/engine/trading/labels.cjs.map +1 -0
- package/dist/charts/engine/trading/labels.d.cts +7 -0
- package/dist/charts/engine/trading/labels.d.ts +7 -0
- package/dist/charts/engine/trading/labels.js +91 -0
- package/dist/charts/engine/trading/labels.js.map +1 -0
- package/dist/charts/engine/trading/scale.cjs +2 -0
- package/dist/charts/engine/trading/scale.cjs.map +1 -0
- package/dist/charts/engine/trading/scale.d.cts +46 -0
- package/dist/charts/engine/trading/scale.d.ts +46 -0
- package/dist/charts/engine/trading/scale.js +100 -0
- package/dist/charts/engine/trading/scale.js.map +1 -0
- package/dist/charts/engine/trading/store.cjs +2 -0
- package/dist/charts/engine/trading/store.cjs.map +1 -0
- package/dist/charts/engine/trading/store.d.cts +62 -0
- package/dist/charts/engine/trading/store.d.ts +62 -0
- package/dist/charts/engine/trading/store.js +129 -0
- package/dist/charts/engine/trading/store.js.map +1 -0
- package/dist/charts/engine/trading/studies.cjs +2 -0
- package/dist/charts/engine/trading/studies.cjs.map +1 -0
- package/dist/charts/engine/trading/studies.d.cts +52 -0
- package/dist/charts/engine/trading/studies.d.ts +52 -0
- package/dist/charts/engine/trading/studies.js +254 -0
- package/dist/charts/engine/trading/studies.js.map +1 -0
- package/dist/charts/engine/trading/types.d.cts +656 -0
- package/dist/charts/engine/trading/types.d.ts +656 -0
- package/dist/charts/engine/types.d.cts +165 -14
- package/dist/charts/engine/types.d.ts +165 -14
- package/dist/charts/index.cjs +1 -1
- package/dist/charts/index.d.cts +7 -4
- package/dist/charts/index.d.ts +7 -4
- package/dist/charts/index.js +22 -11
- package/dist/charts/react/Chart.cjs +1 -1
- package/dist/charts/react/Chart.cjs.map +1 -1
- package/dist/charts/react/Chart.d.cts +4 -4
- package/dist/charts/react/Chart.d.ts +4 -4
- package/dist/charts/react/Chart.js +5 -1
- package/dist/charts/react/Chart.js.map +1 -1
- package/dist/charts/react/charts.cjs +1 -1
- package/dist/charts/react/charts.cjs.map +1 -1
- package/dist/charts/react/charts.d.cts +39 -1
- package/dist/charts/react/charts.d.ts +39 -1
- package/dist/charts/react/charts.js +303 -131
- package/dist/charts/react/charts.js.map +1 -1
- package/dist/charts/react/orderbook.cjs +2 -0
- package/dist/charts/react/orderbook.cjs.map +1 -0
- package/dist/charts/react/orderbook.d.cts +142 -0
- package/dist/charts/react/orderbook.d.ts +142 -0
- package/dist/charts/react/orderbook.js +182 -0
- package/dist/charts/react/orderbook.js.map +1 -0
- package/dist/charts/react/shapes.cjs +1 -1
- package/dist/charts/react/shapes.cjs.map +1 -1
- package/dist/charts/react/shapes.d.cts +291 -9
- package/dist/charts/react/shapes.d.ts +291 -9
- package/dist/charts/react/shapes.js +280 -93
- package/dist/charts/react/shapes.js.map +1 -1
- package/dist/charts/react/three-d.cjs +2 -0
- package/dist/charts/react/three-d.cjs.map +1 -0
- package/dist/charts/react/three-d.d.cts +151 -0
- package/dist/charts/react/three-d.d.ts +151 -0
- package/dist/charts/react/three-d.js +154 -0
- package/dist/charts/react/three-d.js.map +1 -0
- package/dist/charts/react/trading.cjs +2 -0
- package/dist/charts/react/trading.cjs.map +1 -0
- package/dist/charts/react/trading.d.cts +93 -0
- package/dist/charts/react/trading.d.ts +93 -0
- package/dist/charts/react/trading.js +95 -0
- package/dist/charts/react/trading.js.map +1 -0
- package/dist/charts/react/types.d.cts +132 -8
- package/dist/charts/react/types.d.ts +132 -8
- package/dist/core/contracts.cjs +1 -1
- package/dist/core/contracts.cjs.map +1 -1
- package/dist/core/contracts.js +1 -1
- package/dist/core/contracts.js.map +1 -1
- package/dist/native/charts/src/canvas.cjs +1 -1
- package/dist/native/charts/src/canvas.js +9 -3
- package/dist/native/charts/src/engine/axis.cjs +1 -1
- package/dist/native/charts/src/engine/axis.cjs.map +1 -1
- package/dist/native/charts/src/engine/axis.js +6 -6
- package/dist/native/charts/src/engine/axis.js.map +1 -1
- package/dist/native/charts/src/engine/controller.cjs +1 -1
- package/dist/native/charts/src/engine/controller.cjs.map +1 -1
- package/dist/native/charts/src/engine/controller.js +352 -292
- package/dist/native/charts/src/engine/controller.js.map +1 -1
- package/dist/native/charts/src/engine/data.cjs +1 -1
- package/dist/native/charts/src/engine/data.cjs.map +1 -1
- package/dist/native/charts/src/engine/data.js +63 -49
- package/dist/native/charts/src/engine/data.js.map +1 -1
- package/dist/native/charts/src/engine/format.cjs +1 -1
- package/dist/native/charts/src/engine/format.cjs.map +1 -1
- package/dist/native/charts/src/engine/format.js +46 -21
- package/dist/native/charts/src/engine/format.js.map +1 -1
- package/dist/native/charts/src/engine/labels.cjs +2 -0
- package/dist/native/charts/src/engine/labels.cjs.map +1 -0
- package/dist/native/charts/src/engine/labels.js +74 -0
- package/dist/native/charts/src/engine/labels.js.map +1 -0
- package/dist/native/charts/src/engine/layout.cjs +1 -1
- package/dist/native/charts/src/engine/layout.cjs.map +1 -1
- package/dist/native/charts/src/engine/layout.js +53 -12
- package/dist/native/charts/src/engine/layout.js.map +1 -1
- package/dist/native/charts/src/engine/locale.cjs +2 -0
- package/dist/native/charts/src/engine/locale.cjs.map +1 -0
- package/dist/native/charts/src/engine/locale.js +60 -0
- package/dist/native/charts/src/engine/locale.js.map +1 -0
- package/dist/native/charts/src/engine/model.cjs +1 -1
- package/dist/native/charts/src/engine/model.cjs.map +1 -1
- package/dist/native/charts/src/engine/model.js +223 -116
- package/dist/native/charts/src/engine/model.js.map +1 -1
- package/dist/native/charts/src/engine/overlay.cjs +1 -1
- package/dist/native/charts/src/engine/overlay.cjs.map +1 -1
- package/dist/native/charts/src/engine/overlay.js +46 -23
- package/dist/native/charts/src/engine/overlay.js.map +1 -1
- package/dist/native/charts/src/engine/presets.cjs +2 -2
- package/dist/native/charts/src/engine/presets.cjs.map +1 -1
- package/dist/native/charts/src/engine/presets.js +448 -33
- package/dist/native/charts/src/engine/presets.js.map +1 -1
- package/dist/native/charts/src/engine/scale.cjs +1 -1
- package/dist/native/charts/src/engine/scale.cjs.map +1 -1
- package/dist/native/charts/src/engine/scale.js +1 -1
- package/dist/native/charts/src/engine/scale.js.map +1 -1
- package/dist/native/charts/src/engine/scene.cjs +1 -1
- package/dist/native/charts/src/engine/scene.cjs.map +1 -1
- package/dist/native/charts/src/engine/scene.js +296 -167
- package/dist/native/charts/src/engine/scene.js.map +1 -1
- package/dist/native/charts/src/engine/shapes/bullet.cjs +2 -0
- package/dist/native/charts/src/engine/shapes/bullet.cjs.map +1 -0
- package/dist/native/charts/src/engine/shapes/bullet.js +255 -0
- package/dist/native/charts/src/engine/shapes/bullet.js.map +1 -0
- package/dist/native/charts/src/engine/shapes/calendar.cjs +2 -0
- package/dist/native/charts/src/engine/shapes/calendar.cjs.map +1 -0
- package/dist/native/charts/src/engine/shapes/calendar.js +364 -0
- package/dist/native/charts/src/engine/shapes/calendar.js.map +1 -0
- package/dist/native/charts/src/engine/shapes/canvas.cjs +2 -0
- package/dist/native/charts/src/engine/shapes/canvas.cjs.map +1 -0
- package/dist/native/charts/src/engine/shapes/canvas.js +168 -0
- package/dist/native/charts/src/engine/shapes/canvas.js.map +1 -0
- package/dist/native/charts/src/engine/shapes/draw.cjs +2 -0
- package/dist/native/charts/src/engine/shapes/draw.cjs.map +1 -0
- package/dist/native/charts/src/engine/shapes/draw.js +165 -0
- package/dist/native/charts/src/engine/shapes/draw.js.map +1 -0
- package/dist/native/charts/src/engine/shapes/funnel.cjs +2 -0
- package/dist/native/charts/src/engine/shapes/funnel.cjs.map +1 -0
- package/dist/native/charts/src/engine/shapes/funnel.js +149 -0
- package/dist/native/charts/src/engine/shapes/funnel.js.map +1 -0
- package/dist/native/charts/src/engine/shapes/gauge.cjs +2 -0
- package/dist/native/charts/src/engine/shapes/gauge.cjs.map +1 -0
- package/dist/native/charts/src/engine/shapes/gauge.js +210 -0
- package/dist/native/charts/src/engine/shapes/gauge.js.map +1 -0
- package/dist/native/charts/src/engine/shapes/hit.cjs +2 -0
- package/dist/native/charts/src/engine/shapes/hit.cjs.map +1 -0
- package/dist/native/charts/src/engine/shapes/hit.js +106 -0
- package/dist/native/charts/src/engine/shapes/hit.js.map +1 -0
- package/dist/native/charts/src/engine/shapes/labels.cjs +2 -0
- package/dist/native/charts/src/engine/shapes/labels.cjs.map +1 -0
- package/dist/native/charts/src/engine/shapes/labels.js +146 -0
- package/dist/native/charts/src/engine/shapes/labels.js.map +1 -0
- package/dist/native/charts/src/engine/shapes/layout.cjs +3 -0
- package/dist/native/charts/src/engine/shapes/layout.cjs.map +1 -0
- package/dist/native/charts/src/engine/shapes/layout.js +331 -0
- package/dist/native/charts/src/engine/shapes/layout.js.map +1 -0
- package/dist/native/charts/src/engine/shapes/pie.cjs +2 -0
- package/dist/native/charts/src/engine/shapes/pie.cjs.map +1 -0
- package/dist/native/charts/src/engine/shapes/pie.js +302 -0
- package/dist/native/charts/src/engine/shapes/pie.js.map +1 -0
- package/dist/native/charts/src/engine/shapes/radar.cjs +2 -0
- package/dist/native/charts/src/engine/shapes/radar.cjs.map +1 -0
- package/dist/native/charts/src/engine/shapes/radar.js +198 -0
- package/dist/native/charts/src/engine/shapes/radar.js.map +1 -0
- package/dist/native/charts/src/engine/shapes/radialBar.cjs +2 -0
- package/dist/native/charts/src/engine/shapes/radialBar.cjs.map +1 -0
- package/dist/native/charts/src/engine/shapes/radialBar.js +155 -0
- package/dist/native/charts/src/engine/shapes/radialBar.js.map +1 -0
- package/dist/native/charts/src/engine/shapes/runtime.cjs +2 -0
- package/dist/native/charts/src/engine/shapes/runtime.cjs.map +1 -0
- package/dist/native/charts/src/engine/shapes/runtime.js +107 -0
- package/dist/native/charts/src/engine/shapes/runtime.js.map +1 -0
- package/dist/native/charts/src/engine/shapes/sankey.cjs +2 -0
- package/dist/native/charts/src/engine/shapes/sankey.cjs.map +1 -0
- package/dist/native/charts/src/engine/shapes/sankey.js +372 -0
- package/dist/native/charts/src/engine/shapes/sankey.js.map +1 -0
- package/dist/native/charts/src/engine/shapes/scene.cjs +2 -0
- package/dist/native/charts/src/engine/shapes/scene.cjs.map +1 -0
- package/dist/native/charts/src/engine/shapes/scene.js +125 -0
- package/dist/native/charts/src/engine/shapes/scene.js.map +1 -0
- package/dist/native/charts/src/engine/shapes/sunburst.cjs +2 -0
- package/dist/native/charts/src/engine/shapes/sunburst.cjs.map +1 -0
- package/dist/native/charts/src/engine/shapes/sunburst.js +261 -0
- package/dist/native/charts/src/engine/shapes/sunburst.js.map +1 -0
- package/dist/native/charts/src/engine/shapes/treemap.cjs +2 -0
- package/dist/native/charts/src/engine/shapes/treemap.cjs.map +1 -0
- package/dist/native/charts/src/engine/shapes/treemap.js +213 -0
- package/dist/native/charts/src/engine/shapes/treemap.js.map +1 -0
- package/dist/native/charts/src/engine/time.cjs +1 -1
- package/dist/native/charts/src/engine/time.cjs.map +1 -1
- package/dist/native/charts/src/engine/time.js +156 -91
- package/dist/native/charts/src/engine/time.js.map +1 -1
- package/dist/native/components/Chart/ChartBase.cjs +1 -1
- package/dist/native/components/Chart/ChartBase.cjs.map +1 -1
- package/dist/native/components/Chart/ChartBase.d.cts +1 -1
- package/dist/native/components/Chart/ChartBase.d.ts +1 -1
- package/dist/native/components/Chart/ChartBase.js +110 -107
- package/dist/native/components/Chart/ChartBase.js.map +1 -1
- package/dist/native/components/Chart/charts.cjs +1 -1
- package/dist/native/components/Chart/charts.cjs.map +1 -1
- package/dist/native/components/Chart/charts.d.cts +6 -1
- package/dist/native/components/Chart/charts.d.ts +6 -1
- package/dist/native/components/Chart/charts.js +53 -29
- package/dist/native/components/Chart/charts.js.map +1 -1
- package/dist/native/components/Chart/index.cjs +1 -1
- package/dist/native/components/Chart/index.d.cts +1 -1
- package/dist/native/components/Chart/index.d.ts +1 -1
- package/dist/native/components/Chart/index.js +2 -2
- package/dist/native/components/Chart/scene.cjs +1 -1
- package/dist/native/components/Chart/scene.cjs.map +1 -1
- package/dist/native/components/Chart/scene.js +234 -217
- package/dist/native/components/Chart/scene.js.map +1 -1
- package/dist/native/components/Chart/types.d.cts +26 -3
- package/dist/native/components/Chart/types.d.ts +26 -3
- package/dist/native/components/Charts/charts.cjs +2 -0
- package/dist/native/components/Charts/charts.cjs.map +1 -0
- package/dist/native/components/Charts/charts.d.cts +41 -0
- package/dist/native/components/Charts/charts.d.ts +41 -0
- package/dist/native/components/Charts/charts.js +338 -0
- package/dist/native/components/Charts/charts.js.map +1 -0
- package/dist/native/components/Charts/index.cjs +1 -0
- package/dist/native/components/Charts/index.d.cts +2 -0
- package/dist/native/components/Charts/index.d.ts +2 -0
- package/dist/native/components/Charts/index.js +2 -0
- package/dist/native/components/Charts/types.d.cts +144 -0
- package/dist/native/components/Charts/types.d.ts +144 -0
- package/dist/native/components/ShapeChart/ShapeChartBase.cjs +2 -0
- package/dist/native/components/ShapeChart/ShapeChartBase.cjs.map +1 -0
- package/dist/native/components/ShapeChart/ShapeChartBase.d.cts +24 -0
- package/dist/native/components/ShapeChart/ShapeChartBase.d.ts +24 -0
- package/dist/native/components/ShapeChart/ShapeChartBase.js +271 -0
- package/dist/native/components/ShapeChart/ShapeChartBase.js.map +1 -0
- package/dist/native/components/ShapeChart/charts.cjs +2 -0
- package/dist/native/components/ShapeChart/charts.cjs.map +1 -0
- package/dist/native/components/ShapeChart/charts.d.cts +38 -0
- package/dist/native/components/ShapeChart/charts.d.ts +38 -0
- package/dist/native/components/ShapeChart/charts.js +387 -0
- package/dist/native/components/ShapeChart/charts.js.map +1 -0
- package/dist/native/components/ShapeChart/draw.cjs +2 -0
- package/dist/native/components/ShapeChart/draw.cjs.map +1 -0
- package/dist/native/components/ShapeChart/draw.d.cts +4 -0
- package/dist/native/components/ShapeChart/draw.d.ts +4 -0
- package/dist/native/components/ShapeChart/draw.js +104 -0
- package/dist/native/components/ShapeChart/draw.js.map +1 -0
- package/dist/native/components/ShapeChart/geometry.cjs +2 -0
- package/dist/native/components/ShapeChart/geometry.cjs.map +1 -0
- package/dist/native/components/ShapeChart/geometry.d.cts +71 -0
- package/dist/native/components/ShapeChart/geometry.d.ts +71 -0
- package/dist/native/components/ShapeChart/geometry.js +602 -0
- package/dist/native/components/ShapeChart/geometry.js.map +1 -0
- package/dist/native/components/ShapeChart/index.cjs +1 -0
- package/dist/native/components/ShapeChart/index.d.cts +2 -0
- package/dist/native/components/ShapeChart/index.d.ts +2 -0
- package/dist/native/components/ShapeChart/index.js +2 -0
- package/dist/native/components/ShapeChart/recorder.cjs +2 -0
- package/dist/native/components/ShapeChart/recorder.cjs.map +1 -0
- package/dist/native/components/ShapeChart/recorder.d.cts +106 -0
- package/dist/native/components/ShapeChart/recorder.d.ts +106 -0
- package/dist/native/components/ShapeChart/recorder.js +574 -0
- package/dist/native/components/ShapeChart/recorder.js.map +1 -0
- package/dist/native/components/ShapeChart/types.d.cts +509 -0
- package/dist/native/components/ShapeChart/types.d.ts +509 -0
- package/dist/native/index.cjs +1 -1
- package/dist/native/index.d.cts +2 -0
- package/dist/native/index.d.ts +2 -0
- package/dist/native/index.js +14 -10
- package/dist/native/manifest.d.cts +6 -4
- package/dist/native/manifest.d.ts +6 -4
- package/dist/native/source/components/Chart/ChartBase.tsx +8 -1
- package/dist/native/source/components/Chart/charts.tsx +42 -6
- package/dist/native/source/components/Chart/index.ts +1 -0
- package/dist/native/source/components/Chart/scene.tsx +154 -84
- package/dist/native/source/components/Chart/types.ts +31 -1
- package/dist/native/source/components/Charts/charts.tsx +493 -0
- package/dist/native/source/components/Charts/index.ts +14 -0
- package/dist/native/source/components/Charts/types.ts +207 -0
- package/dist/native/source/components/ShapeChart/ShapeChartBase.tsx +484 -0
- package/dist/native/source/components/ShapeChart/charts.tsx +605 -0
- package/dist/native/source/components/ShapeChart/draw.tsx +170 -0
- package/dist/native/source/components/ShapeChart/geometry.ts +1185 -0
- package/dist/native/source/components/ShapeChart/index.ts +15 -0
- package/dist/native/source/components/ShapeChart/recorder.ts +830 -0
- package/dist/native/source/components/ShapeChart/types.ts +564 -0
- package/dist/native/source/index.ts +2 -0
- package/dist/native/source/manifest.ts +30 -4
- package/dist/taro/charts.d.ts +209 -4
- package/dist/taro/index.d.ts +1 -0
- package/dist/taro/index.js +7517 -1856
- package/dist/taro/manifest.d.ts +1 -0
- package/dist/taro/shape-charts.d.ts +537 -0
- package/dist/uni/AreaChart.vue +68 -0
- package/dist/uni/AreaChart.vue.d.ts +120 -0
- package/dist/uni/Badge.vue.d.ts +1 -1
- package/dist/uni/BoxPlotChart.vue +66 -0
- package/dist/uni/BoxPlotChart.vue.d.ts +102 -0
- package/dist/uni/BubbleChart.vue +68 -0
- package/dist/uni/BubbleChart.vue.d.ts +106 -0
- package/dist/uni/BulletChart.vue +86 -0
- package/dist/uni/BulletChart.vue.d.ts +110 -0
- package/dist/uni/CalendarHeatmap.vue +92 -0
- package/dist/uni/CalendarHeatmap.vue.d.ts +129 -0
- package/dist/uni/CandlestickChart.vue +66 -0
- package/dist/uni/CandlestickChart.vue.d.ts +100 -0
- package/dist/uni/DonutChart.vue +72 -0
- package/dist/uni/DonutChart.vue.d.ts +114 -0
- package/dist/uni/FunnelChart.vue +67 -0
- package/dist/uni/FunnelChart.vue.d.ts +104 -0
- package/dist/uni/GanttChart.vue +67 -0
- package/dist/uni/GanttChart.vue.d.ts +123 -0
- package/dist/uni/GaugeChart.vue +77 -0
- package/dist/uni/GaugeChart.vue.d.ts +123 -0
- package/dist/uni/HeatmapChart.vue +66 -0
- package/dist/uni/HeatmapChart.vue.d.ts +114 -0
- package/dist/uni/HistogramChart.vue +66 -0
- package/dist/uni/HistogramChart.vue.d.ts +121 -0
- package/dist/uni/HorizontalBarChart.vue +68 -0
- package/dist/uni/HorizontalBarChart.vue.d.ts +127 -0
- package/dist/uni/Input.vue.d.ts +1 -1
- package/dist/uni/MixedChart.vue +68 -0
- package/dist/uni/MixedChart.vue.d.ts +106 -0
- package/dist/uni/NumberInput.vue.d.ts +1 -1
- package/dist/uni/PieChart.vue +72 -0
- package/dist/uni/PieChart.vue.d.ts +114 -0
- package/dist/uni/RadarChart.vue +67 -0
- package/dist/uni/RadarChart.vue.d.ts +110 -0
- package/dist/uni/RadialBarChart.vue +90 -0
- package/dist/uni/RadialBarChart.vue.d.ts +132 -0
- package/dist/uni/RangeAreaChart.vue +68 -0
- package/dist/uni/RangeAreaChart.vue.d.ts +102 -0
- package/dist/uni/ResponsiveGrid.vue.d.ts +1 -1
- package/dist/uni/SankeyChart.vue +88 -0
- package/dist/uni/SankeyChart.vue.d.ts +121 -0
- package/dist/uni/ShapeChart.vue +73 -0
- package/dist/uni/ShapeChart.vue.d.ts +54 -0
- package/dist/uni/Sparkline.vue +58 -0
- package/dist/uni/Sparkline.vue.d.ts +77 -0
- package/dist/uni/SunburstChart.vue +90 -0
- package/dist/uni/SunburstChart.vue.d.ts +114 -0
- package/dist/uni/Textarea.vue.d.ts +1 -1
- package/dist/uni/TimePicker.vue.d.ts +1 -1
- package/dist/uni/TreemapChart.vue +65 -0
- package/dist/uni/TreemapChart.vue.d.ts +100 -0
- package/dist/uni/WaterfallChart.vue +66 -0
- package/dist/uni/WaterfallChart.vue.d.ts +125 -0
- package/dist/uni/chart-types.d.ts +216 -2
- package/dist/uni/chart-types.js +174 -0
- package/dist/uni/charts-canvas.js +8 -3
- package/dist/uni/index.d.ts +26 -1
- package/dist/uni/index.js +26 -1
- package/dist/uni/manifest.d.ts +272 -0
- package/dist/uni/manifest.js +387 -0
- package/dist/uni/named-chart-options.d.ts +88 -0
- package/dist/uni/named-chart-options.js +156 -0
- package/dist/uni/shape-chart-canvas.d.ts +51 -0
- package/dist/uni/shape-chart-canvas.js +342 -0
- package/dist/uni/shape-chart-types.d.ts +381 -0
- package/dist/uni/shape-chart-types.js +261 -0
- package/dist/vue/components/Chart/AreaChart.vue.d.ts +124 -0
- package/dist/vue/components/Chart/AreaChart.vue.js +7 -0
- package/dist/vue/components/Chart/AreaChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/AreaChart.vue_vue_type_script_setup_true_lang.js +49 -0
- package/dist/vue/components/Chart/AreaChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/Bar3DChart.vue.d.ts +132 -0
- package/dist/vue/components/Chart/Bar3DChart.vue.js +7 -0
- package/dist/vue/components/Chart/Bar3DChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/Bar3DChart.vue_vue_type_script_setup_true_lang.js +55 -0
- package/dist/vue/components/Chart/Bar3DChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/BarChart.vue.d.ts +123 -0
- package/dist/vue/components/Chart/BarChart.vue.js +7 -0
- package/dist/vue/components/Chart/BarChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/BarChart.vue_vue_type_script_setup_true_lang.js +53 -0
- package/dist/vue/components/Chart/BarChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/BoxPlotChart.vue.d.ts +112 -0
- package/dist/vue/components/Chart/BoxPlotChart.vue.js +7 -0
- package/dist/vue/components/Chart/BoxPlotChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/BoxPlotChart.vue_vue_type_script_setup_true_lang.js +57 -0
- package/dist/vue/components/Chart/BoxPlotChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/BubbleChart.vue.d.ts +106 -0
- package/dist/vue/components/Chart/BubbleChart.vue.js +7 -0
- package/dist/vue/components/Chart/BubbleChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/BubbleChart.vue_vue_type_script_setup_true_lang.js +52 -0
- package/dist/vue/components/Chart/BubbleChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/BulletChart.vue.d.ts +117 -0
- package/dist/vue/components/Chart/BulletChart.vue.js +7 -0
- package/dist/vue/components/Chart/BulletChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/BulletChart.vue_vue_type_script_setup_true_lang.js +64 -0
- package/dist/vue/components/Chart/BulletChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/CalendarHeatmap.vue.d.ts +144 -0
- package/dist/vue/components/Chart/CalendarHeatmap.vue.js +7 -0
- package/dist/vue/components/Chart/CalendarHeatmap.vue.js.map +1 -0
- package/dist/vue/components/Chart/CalendarHeatmap.vue_vue_type_script_setup_true_lang.js +77 -0
- package/dist/vue/components/Chart/CalendarHeatmap.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/CandlestickChart.vue.d.ts +94 -0
- package/dist/vue/components/Chart/CandlestickChart.vue.js +7 -0
- package/dist/vue/components/Chart/CandlestickChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/CandlestickChart.vue_vue_type_script_setup_true_lang.js +44 -0
- package/dist/vue/components/Chart/CandlestickChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/Chart.vue.d.ts +103 -0
- package/dist/vue/components/Chart/Chart.vue.js +7 -0
- package/dist/vue/components/Chart/Chart.vue.js.map +1 -0
- package/dist/vue/components/Chart/Chart.vue_vue_type_script_setup_true_lang.js +47 -0
- package/dist/vue/components/Chart/Chart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/DepthChart.vue.d.ts +139 -0
- package/dist/vue/components/Chart/DepthChart.vue.js +7 -0
- package/dist/vue/components/Chart/DepthChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/DepthChart.vue_vue_type_script_setup_true_lang.js +42 -0
- package/dist/vue/components/Chart/DepthChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/DonutChart.vue.d.ts +104 -0
- package/dist/vue/components/Chart/DonutChart.vue.js +7 -0
- package/dist/vue/components/Chart/DonutChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/DonutChart.vue_vue_type_script_setup_true_lang.js +53 -0
- package/dist/vue/components/Chart/DonutChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/FunnelChart.vue.d.ts +105 -0
- package/dist/vue/components/Chart/FunnelChart.vue.js +7 -0
- package/dist/vue/components/Chart/FunnelChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/FunnelChart.vue_vue_type_script_setup_true_lang.js +58 -0
- package/dist/vue/components/Chart/FunnelChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/GanttChart.vue.d.ts +132 -0
- package/dist/vue/components/Chart/GanttChart.vue.js +7 -0
- package/dist/vue/components/Chart/GanttChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/GanttChart.vue_vue_type_script_setup_true_lang.js +98 -0
- package/dist/vue/components/Chart/GanttChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/GaugeChart.vue.d.ts +132 -0
- package/dist/vue/components/Chart/GaugeChart.vue.js +7 -0
- package/dist/vue/components/Chart/GaugeChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/GaugeChart.vue_vue_type_script_setup_true_lang.js +71 -0
- package/dist/vue/components/Chart/GaugeChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/HeatmapChart.vue.d.ts +125 -0
- package/dist/vue/components/Chart/HeatmapChart.vue.js +7 -0
- package/dist/vue/components/Chart/HeatmapChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/HeatmapChart.vue_vue_type_script_setup_true_lang.js +65 -0
- package/dist/vue/components/Chart/HeatmapChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/HistogramChart.vue.d.ts +132 -0
- package/dist/vue/components/Chart/HistogramChart.vue.js +7 -0
- package/dist/vue/components/Chart/HistogramChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/HistogramChart.vue_vue_type_script_setup_true_lang.js +66 -0
- package/dist/vue/components/Chart/HistogramChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/HorizontalBarChart.vue.d.ts +121 -0
- package/dist/vue/components/Chart/HorizontalBarChart.vue.js +7 -0
- package/dist/vue/components/Chart/HorizontalBarChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/HorizontalBarChart.vue_vue_type_script_setup_true_lang.js +55 -0
- package/dist/vue/components/Chart/HorizontalBarChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/Line3DChart.vue.d.ts +121 -0
- package/dist/vue/components/Chart/Line3DChart.vue.js +7 -0
- package/dist/vue/components/Chart/Line3DChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/Line3DChart.vue_vue_type_script_setup_true_lang.js +47 -0
- package/dist/vue/components/Chart/Line3DChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/LineChart.vue.d.ts +125 -0
- package/dist/vue/components/Chart/LineChart.vue.js +7 -0
- package/dist/vue/components/Chart/LineChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/LineChart.vue_vue_type_script_setup_true_lang.js +50 -0
- package/dist/vue/components/Chart/LineChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/MixedChart.vue.d.ts +103 -0
- package/dist/vue/components/Chart/MixedChart.vue.js +7 -0
- package/dist/vue/components/Chart/MixedChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/MixedChart.vue_vue_type_script_setup_true_lang.js +47 -0
- package/dist/vue/components/Chart/MixedChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/OrderBook.vue.d.ts +125 -0
- package/dist/vue/components/Chart/OrderBook.vue.js +7 -0
- package/dist/vue/components/Chart/OrderBook.vue.js.map +1 -0
- package/dist/vue/components/Chart/OrderBook.vue_vue_type_script_setup_true_lang.js +38 -0
- package/dist/vue/components/Chart/OrderBook.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/OrderBookHeatmap.vue.d.ts +128 -0
- package/dist/vue/components/Chart/OrderBookHeatmap.vue.js +7 -0
- package/dist/vue/components/Chart/OrderBookHeatmap.vue.js.map +1 -0
- package/dist/vue/components/Chart/OrderBookHeatmap.vue_vue_type_script_setup_true_lang.js +46 -0
- package/dist/vue/components/Chart/OrderBookHeatmap.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/PieChart.vue.d.ts +104 -0
- package/dist/vue/components/Chart/PieChart.vue.js +7 -0
- package/dist/vue/components/Chart/PieChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/PieChart.vue_vue_type_script_setup_true_lang.js +53 -0
- package/dist/vue/components/Chart/PieChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/QuadrantChart.vue.d.ts +186 -0
- package/dist/vue/components/Chart/QuadrantChart.vue.js +7 -0
- package/dist/vue/components/Chart/QuadrantChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/QuadrantChart.vue_vue_type_script_setup_true_lang.js +107 -0
- package/dist/vue/components/Chart/QuadrantChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/RadarChart.vue.d.ts +111 -0
- package/dist/vue/components/Chart/RadarChart.vue.js +7 -0
- package/dist/vue/components/Chart/RadarChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/RadarChart.vue_vue_type_script_setup_true_lang.js +61 -0
- package/dist/vue/components/Chart/RadarChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/RadialBarChart.vue.d.ts +147 -0
- package/dist/vue/components/Chart/RadialBarChart.vue.js +7 -0
- package/dist/vue/components/Chart/RadialBarChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/RadialBarChart.vue_vue_type_script_setup_true_lang.js +78 -0
- package/dist/vue/components/Chart/RadialBarChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/RangeAreaChart.vue.d.ts +106 -0
- package/dist/vue/components/Chart/RangeAreaChart.vue.js +7 -0
- package/dist/vue/components/Chart/RangeAreaChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/RangeAreaChart.vue_vue_type_script_setup_true_lang.js +51 -0
- package/dist/vue/components/Chart/RangeAreaChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/SankeyChart.vue.d.ts +132 -0
- package/dist/vue/components/Chart/SankeyChart.vue.js +7 -0
- package/dist/vue/components/Chart/SankeyChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/SankeyChart.vue_vue_type_script_setup_true_lang.js +71 -0
- package/dist/vue/components/Chart/SankeyChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/Scatter3DChart.vue.d.ts +121 -0
- package/dist/vue/components/Chart/Scatter3DChart.vue.js +7 -0
- package/dist/vue/components/Chart/Scatter3DChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/Scatter3DChart.vue_vue_type_script_setup_true_lang.js +47 -0
- package/dist/vue/components/Chart/Scatter3DChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/ScatterChart.vue.d.ts +94 -0
- package/dist/vue/components/Chart/ScatterChart.vue.js +7 -0
- package/dist/vue/components/Chart/ScatterChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/ScatterChart.vue_vue_type_script_setup_true_lang.js +44 -0
- package/dist/vue/components/Chart/ScatterChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/ShapeChart.vue.d.ts +39 -0
- package/dist/vue/components/Chart/ShapeChart.vue.js +7 -0
- package/dist/vue/components/Chart/ShapeChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/ShapeChart.vue_vue_type_script_setup_true_lang.js +43 -0
- package/dist/vue/components/Chart/ShapeChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/Sparkline.vue.d.ts +90 -0
- package/dist/vue/components/Chart/Sparkline.vue.js +7 -0
- package/dist/vue/components/Chart/Sparkline.vue.js.map +1 -0
- package/dist/vue/components/Chart/Sparkline.vue_vue_type_script_setup_true_lang.js +66 -0
- package/dist/vue/components/Chart/Sparkline.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/SunburstChart.vue.d.ts +123 -0
- package/dist/vue/components/Chart/SunburstChart.vue.js +7 -0
- package/dist/vue/components/Chart/SunburstChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/SunburstChart.vue_vue_type_script_setup_true_lang.js +68 -0
- package/dist/vue/components/Chart/SunburstChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/Surface3DChart.vue.d.ts +143 -0
- package/dist/vue/components/Chart/Surface3DChart.vue.js +7 -0
- package/dist/vue/components/Chart/Surface3DChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/Surface3DChart.vue_vue_type_script_setup_true_lang.js +60 -0
- package/dist/vue/components/Chart/Surface3DChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/TimeAndSales.vue.d.ts +114 -0
- package/dist/vue/components/Chart/TimeAndSales.vue.js +7 -0
- package/dist/vue/components/Chart/TimeAndSales.vue.js.map +1 -0
- package/dist/vue/components/Chart/TimeAndSales.vue_vue_type_script_setup_true_lang.js +46 -0
- package/dist/vue/components/Chart/TimeAndSales.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/TradingChart.vue.d.ts +160 -0
- package/dist/vue/components/Chart/TradingChart.vue.js +7 -0
- package/dist/vue/components/Chart/TradingChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/TradingChart.vue_vue_type_script_setup_true_lang.js +70 -0
- package/dist/vue/components/Chart/TradingChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/TreemapChart.vue.d.ts +97 -0
- package/dist/vue/components/Chart/TreemapChart.vue.js +7 -0
- package/dist/vue/components/Chart/TreemapChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/TreemapChart.vue_vue_type_script_setup_true_lang.js +54 -0
- package/dist/vue/components/Chart/TreemapChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/WaterfallChart.vue.d.ts +132 -0
- package/dist/vue/components/Chart/WaterfallChart.vue.js +7 -0
- package/dist/vue/components/Chart/WaterfallChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/WaterfallChart.vue_vue_type_script_setup_true_lang.js +68 -0
- package/dist/vue/components/Chart/WaterfallChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/cartesian.d.ts +47 -0
- package/dist/vue/components/Chart/cartesian.js +56 -0
- package/dist/vue/components/Chart/cartesian.js.map +1 -0
- package/dist/vue/components/Chart/engine.d.ts +35 -0
- package/dist/vue/components/Chart/engine.js +35 -0
- package/dist/vue/components/Chart/engine.js.map +1 -0
- package/dist/vue/components/Chart/index.d.ts +41 -0
- package/dist/vue/components/Chart/index.js +40 -0
- package/dist/vue/components/Chart/orderbook.d.ts +359 -0
- package/dist/vue/components/Chart/orderbook.js +126 -0
- package/dist/vue/components/Chart/orderbook.js.map +1 -0
- package/dist/vue/components/Chart/props.d.ts +188 -0
- package/dist/vue/components/Chart/props.js +92 -0
- package/dist/vue/components/Chart/props.js.map +1 -0
- package/dist/vue/components/Chart/shape.d.ts +41 -0
- package/dist/vue/components/Chart/shape.js +42 -0
- package/dist/vue/components/Chart/shape.js.map +1 -0
- package/dist/vue/components/Chart/three-d.d.ts +106 -0
- package/dist/vue/components/Chart/three-d.js +88 -0
- package/dist/vue/components/Chart/three-d.js.map +1 -0
- package/dist/vue/components/Chart/trading.d.ts +105 -0
- package/dist/vue/components/Chart/trading.js +55 -0
- package/dist/vue/components/Chart/trading.js.map +1 -0
- package/dist/vue/components/Chart/types.d.ts +137 -0
- package/dist/vue/global.d.ts +38 -0
- package/dist/vue/groups/charts.d.ts +1 -0
- package/dist/vue/groups/charts.js +87 -0
- package/dist/vue/groups/charts.js.map +1 -0
- package/dist/vue/index.d.ts +1 -0
- package/dist/vue/index.js +63 -23
- package/dist/vue/plugin.js +12 -10
- package/dist/vue/plugin.js.map +1 -1
- package/dist/weapp/area-chart/index.js +1 -0
- package/dist/weapp/area-chart/index.json +1 -0
- package/dist/weapp/area-chart/index.wxml +1 -0
- package/dist/weapp/area-chart/index.wxss +1 -0
- package/dist/weapp/box-plot-chart/index.js +1 -0
- package/dist/weapp/box-plot-chart/index.json +1 -0
- package/dist/weapp/box-plot-chart/index.wxml +1 -0
- package/dist/weapp/box-plot-chart/index.wxss +1 -0
- package/dist/weapp/bubble-chart/index.js +1 -0
- package/dist/weapp/bubble-chart/index.json +1 -0
- package/dist/weapp/bubble-chart/index.wxml +1 -0
- package/dist/weapp/bubble-chart/index.wxss +1 -0
- package/dist/weapp/bullet-chart/index.js +1 -0
- package/dist/weapp/bullet-chart/index.json +1 -0
- package/dist/weapp/bullet-chart/index.wxml +1 -0
- package/dist/weapp/bullet-chart/index.wxss +1 -0
- package/dist/weapp/calendar-heatmap/index.js +1 -0
- package/dist/weapp/calendar-heatmap/index.json +1 -0
- package/dist/weapp/calendar-heatmap/index.wxml +1 -0
- package/dist/weapp/calendar-heatmap/index.wxss +1 -0
- package/dist/weapp/candlestick-chart/index.js +1 -0
- package/dist/weapp/candlestick-chart/index.json +1 -0
- package/dist/weapp/candlestick-chart/index.wxml +1 -0
- package/dist/weapp/candlestick-chart/index.wxss +1 -0
- package/dist/weapp/charts/canvas.js +11436 -0
- package/dist/weapp/charts/core.d.ts +2 -0
- package/dist/weapp/charts/core.js +41 -0
- package/dist/weapp/controls.js +1433 -4478
- package/dist/weapp/donut-chart/index.js +1 -0
- package/dist/weapp/donut-chart/index.json +1 -0
- package/dist/weapp/donut-chart/index.wxml +1 -0
- package/dist/weapp/donut-chart/index.wxss +1 -0
- package/dist/weapp/funnel-chart/index.js +1 -0
- package/dist/weapp/funnel-chart/index.json +1 -0
- package/dist/weapp/funnel-chart/index.wxml +1 -0
- package/dist/weapp/funnel-chart/index.wxss +1 -0
- package/dist/weapp/gantt-chart/index.js +1 -0
- package/dist/weapp/gantt-chart/index.json +1 -0
- package/dist/weapp/gantt-chart/index.wxml +1 -0
- package/dist/weapp/gantt-chart/index.wxss +1 -0
- package/dist/weapp/gauge-chart/index.js +1 -0
- package/dist/weapp/gauge-chart/index.json +1 -0
- package/dist/weapp/gauge-chart/index.wxml +1 -0
- package/dist/weapp/gauge-chart/index.wxss +1 -0
- package/dist/weapp/heatmap-chart/index.js +1 -0
- package/dist/weapp/heatmap-chart/index.json +1 -0
- package/dist/weapp/heatmap-chart/index.wxml +1 -0
- package/dist/weapp/heatmap-chart/index.wxss +1 -0
- package/dist/weapp/histogram-chart/index.js +1 -0
- package/dist/weapp/histogram-chart/index.json +1 -0
- package/dist/weapp/histogram-chart/index.wxml +1 -0
- package/dist/weapp/histogram-chart/index.wxss +1 -0
- package/dist/weapp/horizontal-bar-chart/index.js +1 -0
- package/dist/weapp/horizontal-bar-chart/index.json +1 -0
- package/dist/weapp/horizontal-bar-chart/index.wxml +1 -0
- package/dist/weapp/horizontal-bar-chart/index.wxss +1 -0
- package/dist/weapp/mixed-chart/index.js +1 -0
- package/dist/weapp/mixed-chart/index.json +1 -0
- package/dist/weapp/mixed-chart/index.wxml +1 -0
- package/dist/weapp/mixed-chart/index.wxss +1 -0
- package/dist/weapp/pie-chart/index.js +1 -0
- package/dist/weapp/pie-chart/index.json +1 -0
- package/dist/weapp/pie-chart/index.wxml +1 -0
- package/dist/weapp/pie-chart/index.wxss +1 -0
- package/dist/weapp/radar-chart/index.js +1 -0
- package/dist/weapp/radar-chart/index.json +1 -0
- package/dist/weapp/radar-chart/index.wxml +1 -0
- package/dist/weapp/radar-chart/index.wxss +1 -0
- package/dist/weapp/radial-bar-chart/index.js +1 -0
- package/dist/weapp/radial-bar-chart/index.json +1 -0
- package/dist/weapp/radial-bar-chart/index.wxml +1 -0
- package/dist/weapp/radial-bar-chart/index.wxss +1 -0
- package/dist/weapp/range-area-chart/index.js +1 -0
- package/dist/weapp/range-area-chart/index.json +1 -0
- package/dist/weapp/range-area-chart/index.wxml +1 -0
- package/dist/weapp/range-area-chart/index.wxss +1 -0
- package/dist/weapp/sankey-chart/index.js +1 -0
- package/dist/weapp/sankey-chart/index.json +1 -0
- package/dist/weapp/sankey-chart/index.wxml +1 -0
- package/dist/weapp/sankey-chart/index.wxss +1 -0
- package/dist/weapp/shape-chart/index.js +1 -0
- package/dist/weapp/shape-chart/index.json +1 -0
- package/dist/weapp/shape-chart/index.wxml +1 -0
- package/dist/weapp/shape-chart/index.wxss +1 -0
- package/dist/weapp/sparkline/index.js +1 -0
- package/dist/weapp/sparkline/index.json +1 -0
- package/dist/weapp/sparkline/index.wxml +1 -0
- package/dist/weapp/sparkline/index.wxss +1 -0
- package/dist/weapp/sunburst-chart/index.js +1 -0
- package/dist/weapp/sunburst-chart/index.json +1 -0
- package/dist/weapp/sunburst-chart/index.wxml +1 -0
- package/dist/weapp/sunburst-chart/index.wxss +1 -0
- package/dist/weapp/treemap-chart/index.js +1 -0
- package/dist/weapp/treemap-chart/index.json +1 -0
- package/dist/weapp/treemap-chart/index.wxml +1 -0
- package/dist/weapp/treemap-chart/index.wxss +1 -0
- package/dist/weapp/types.d.ts +466 -0
- package/dist/weapp/waterfall-chart/index.js +1 -0
- package/dist/weapp/waterfall-chart/index.json +1 -0
- package/dist/weapp/waterfall-chart/index.wxml +1 -0
- package/dist/weapp/waterfall-chart/index.wxss +1 -0
- package/dist/web-components/components/chart/chart.d.ts +58 -0
- package/dist/web-components/components/chart/chart.js +55 -0
- package/dist/web-components/components/chart/chart.js.map +1 -0
- package/dist/web-components/components/chart/charts.d.ts +252 -0
- package/dist/web-components/components/chart/charts.js +201 -0
- package/dist/web-components/components/chart/charts.js.map +1 -0
- package/dist/web-components/components/chart/engine-element.d.ts +53 -0
- package/dist/web-components/components/chart/engine-element.js +77 -0
- package/dist/web-components/components/chart/engine-element.js.map +1 -0
- package/dist/web-components/components/chart/extended.d.ts +224 -0
- package/dist/web-components/components/chart/extended.js +183 -0
- package/dist/web-components/components/chart/extended.js.map +1 -0
- package/dist/web-components/components/chart/series.d.ts +7 -0
- package/dist/web-components/components/chart/series.js +14 -0
- package/dist/web-components/components/chart/series.js.map +1 -0
- package/dist/web-components/components/chart/shape-chart.d.ts +199 -0
- package/dist/web-components/components/chart/shape-chart.js +161 -0
- package/dist/web-components/components/chart/shape-chart.js.map +1 -0
- package/dist/web-components/components/chart/shapes-extended.d.ts +162 -0
- package/dist/web-components/components/chart/shapes-extended.js +156 -0
- package/dist/web-components/components/chart/shapes-extended.js.map +1 -0
- package/dist/web-components/components/chart-3d/chart-3d.d.ts +111 -0
- package/dist/web-components/components/chart-3d/chart-3d.js +97 -0
- package/dist/web-components/components/chart-3d/chart-3d.js.map +1 -0
- package/dist/web-components/components/order-book/order-book.d.ts +165 -0
- package/dist/web-components/components/order-book/order-book.js +174 -0
- package/dist/web-components/components/order-book/order-book.js.map +1 -0
- package/dist/web-components/components/trading-chart/trading-chart.d.ts +96 -0
- package/dist/web-components/components/trading-chart/trading-chart.js +96 -0
- package/dist/web-components/components/trading-chart/trading-chart.js.map +1 -0
- package/dist/web-components/elements/chart-3d.d.ts +2 -0
- package/dist/web-components/elements/chart-3d.js +13 -0
- package/dist/web-components/elements/chart-3d.js.map +1 -0
- package/dist/web-components/elements/chart.d.ts +7 -0
- package/dist/web-components/elements/chart.js +43 -0
- package/dist/web-components/elements/chart.js.map +1 -0
- package/dist/web-components/elements/order-book.d.ts +2 -0
- package/dist/web-components/elements/order-book.js +13 -0
- package/dist/web-components/elements/order-book.js.map +1 -0
- package/dist/web-components/elements/trading-chart.d.ts +2 -0
- package/dist/web-components/elements/trading-chart.js +8 -0
- package/dist/web-components/elements/trading-chart.js.map +1 -0
- package/dist/web-components/html-custom-data.json +1192 -29
- package/dist/web-components/types/react.d.ts +435 -0
- package/dist/web-components/types/solid.d.ts +321 -0
- package/dist/web-components/types/svelte.d.ts +321 -0
- package/dist/web-components/types/vue.d.ts +359 -0
- package/package.json +113 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Rgba } from '../color.cjs';
|
|
2
2
|
import { ChartTheme } from '../theme.cjs';
|
|
3
3
|
import { ChartPadding } from '../types.cjs';
|
|
4
|
-
import { ShapeChartType } from './types.cjs';
|
|
4
|
+
import { ShapeChartLabels, ShapeChartType, ShapeHoverEvent } from './types.cjs';
|
|
5
5
|
export declare const TAU: number;
|
|
6
6
|
/** Rectangle in CSS pixels */
|
|
7
7
|
export interface ShapeRect {
|
|
@@ -13,6 +13,12 @@ export interface ShapeRect {
|
|
|
13
13
|
interface NodeBase {
|
|
14
14
|
/** Index of the item the node belongs to (hover, dimming); none for decorations */
|
|
15
15
|
hit?: number;
|
|
16
|
+
/**
|
|
17
|
+
* Other items whose hover also emphasizes the node (the flows of a hovered
|
|
18
|
+
* sankey node, the ancestors of a hovered sunburst sector); hit testing
|
|
19
|
+
* only uses `hit`
|
|
20
|
+
*/
|
|
21
|
+
also?: readonly number[];
|
|
16
22
|
/** Opacity multiplier */
|
|
17
23
|
alpha?: number;
|
|
18
24
|
/** Offset applied while the node's item is hovered (pie slices pop out) */
|
|
@@ -60,6 +66,10 @@ export interface RectNode extends NodeBase {
|
|
|
60
66
|
radius: number;
|
|
61
67
|
fill: string;
|
|
62
68
|
brighten?: boolean;
|
|
69
|
+
/** Outline drawn inside the rectangle while its item is hovered */
|
|
70
|
+
hoverStroke?: string;
|
|
71
|
+
/** Distance (px) around the rectangle still picked by hit testing (default 0) */
|
|
72
|
+
hitPad?: number;
|
|
63
73
|
}
|
|
64
74
|
/** Stroked arc (gauge track / value) */
|
|
65
75
|
export interface ArcNode extends NodeBase {
|
|
@@ -72,6 +82,8 @@ export interface ArcNode extends NodeBase {
|
|
|
72
82
|
width: number;
|
|
73
83
|
color: string;
|
|
74
84
|
cap: "round" | "butt";
|
|
85
|
+
/** Distance (px) beyond the stroke still picked by hit testing (default 4) */
|
|
86
|
+
hitPad?: number;
|
|
75
87
|
}
|
|
76
88
|
/** Dot; without fill nor stroke it is only a hit area */
|
|
77
89
|
export interface CircleNode extends NodeBase {
|
|
@@ -108,6 +120,27 @@ export interface TextNode extends NodeBase {
|
|
|
108
120
|
indicator?: number;
|
|
109
121
|
hoverColor?: string;
|
|
110
122
|
hoverFont?: string;
|
|
123
|
+
/** Rotation around (x, y), radians clockwise */
|
|
124
|
+
rotate?: number;
|
|
125
|
+
/** Outline drawn behind the text so it reads over other marks */
|
|
126
|
+
halo?: string;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Sankey flow: a horizontal S-curve (cubic Bézier) of constant thickness
|
|
130
|
+
* from (x0, y0) to (x1, y1), filled with a gradient from `color0` to `color1`
|
|
131
|
+
*/
|
|
132
|
+
export interface LinkNode extends NodeBase {
|
|
133
|
+
kind: "link";
|
|
134
|
+
x0: number;
|
|
135
|
+
y0: number;
|
|
136
|
+
x1: number;
|
|
137
|
+
y1: number;
|
|
138
|
+
/** Thickness, in pixels */
|
|
139
|
+
width: number;
|
|
140
|
+
color0: string;
|
|
141
|
+
color1: string;
|
|
142
|
+
/** Opacity while the link (or one of its `also` items) is hovered */
|
|
143
|
+
activeAlpha?: number;
|
|
111
144
|
}
|
|
112
145
|
/** Radar: dashed guide from the center to the hovered indicator */
|
|
113
146
|
export interface GuideNode extends NodeBase {
|
|
@@ -118,7 +151,7 @@ export interface GuideNode extends NodeBase {
|
|
|
118
151
|
ends: [number, number][];
|
|
119
152
|
color: string;
|
|
120
153
|
}
|
|
121
|
-
export type ShapeNode = SectorNode | PolygonNode | RectNode | ArcNode | CircleNode | LineNode | TextNode | GuideNode;
|
|
154
|
+
export type ShapeNode = SectorNode | PolygonNode | RectNode | ArcNode | CircleNode | LineNode | TextNode | GuideNode | LinkNode;
|
|
122
155
|
/** A row of the default tooltip */
|
|
123
156
|
export interface ShapeTooltipRow {
|
|
124
157
|
name: string;
|
|
@@ -149,6 +182,10 @@ export interface ShapeItem {
|
|
|
149
182
|
x: number;
|
|
150
183
|
y: number;
|
|
151
184
|
}[];
|
|
185
|
+
/** Extra fields of the hover event (calendar date, sankey link ends) */
|
|
186
|
+
event?: Pick<ShapeHoverEvent, "date" | "source" | "target">;
|
|
187
|
+
/** Sunburst: path focused when the item is activated (click, Enter) */
|
|
188
|
+
drill?: string[];
|
|
152
189
|
}
|
|
153
190
|
/** What is hovered: an item (and a radar indicator) */
|
|
154
191
|
export interface ShapeHover {
|
|
@@ -179,6 +216,14 @@ export interface ShapeScene {
|
|
|
179
216
|
cx: number;
|
|
180
217
|
cy: number;
|
|
181
218
|
};
|
|
219
|
+
/**
|
|
220
|
+
* Arrow-key moves in a grid of items (calendar heatmap), in positions of
|
|
221
|
+
* `items`: `next` for Left / Right, `down` for Up / Down; no wrapping
|
|
222
|
+
*/
|
|
223
|
+
steps?: {
|
|
224
|
+
next: number;
|
|
225
|
+
down: number;
|
|
226
|
+
};
|
|
182
227
|
/** Radar geometry used by hit testing (and to keep the tooltip off the labels) */
|
|
183
228
|
radar?: {
|
|
184
229
|
cx: number;
|
|
@@ -194,6 +239,10 @@ export interface ShapeScene {
|
|
|
194
239
|
};
|
|
195
240
|
/** No data to draw (placeholder shown) */
|
|
196
241
|
empty: boolean;
|
|
242
|
+
/** Built-in texts of the chart's locale (accessible descriptions) */
|
|
243
|
+
labels?: ShapeChartLabels;
|
|
244
|
+
/** Resolved locale of the chart */
|
|
245
|
+
locale?: string;
|
|
197
246
|
}
|
|
198
247
|
/** Measures a text in a CSS font */
|
|
199
248
|
export type MeasureText = (text: string, font: string) => number;
|
|
@@ -209,23 +258,28 @@ export interface LayoutContext {
|
|
|
209
258
|
/** Displayed (animated) value of a key */
|
|
210
259
|
value(key: string, target: number): number;
|
|
211
260
|
format(value: number): string;
|
|
212
|
-
/** Formats a share (0-1): `percentFormat` or one decimal */
|
|
261
|
+
/** Formats a share (0-1): `percentFormat` or a locale percent with one decimal */
|
|
213
262
|
percent(share: number): string;
|
|
263
|
+
/** Built-in texts (locale and `texts` overrides) */
|
|
264
|
+
labels: ShapeChartLabels;
|
|
265
|
+
/** Resolved locale */
|
|
266
|
+
locale: string;
|
|
214
267
|
/** Color of the `i`-th mark (custom `color` or the palette) */
|
|
215
268
|
color(css: string | undefined, i: number): Rgba;
|
|
216
269
|
/** Drawing area, padding excluded */
|
|
217
270
|
area: ShapeRect;
|
|
271
|
+
/** Sunburst: names from the root to the focused node */
|
|
272
|
+
focus: readonly string[];
|
|
218
273
|
}
|
|
219
|
-
export type LayoutResult = Omit<ShapeScene, "type" | "width" | "height">;
|
|
274
|
+
export type LayoutResult = Omit<ShapeScene, "type" | "width" | "height" | "labels" | "locale">;
|
|
220
275
|
export declare const clamp: (v: number, lo: number, hi: number) => number;
|
|
221
276
|
/** Non-negative finite number */
|
|
222
277
|
export declare const positive: (v: number | undefined) => number;
|
|
223
278
|
export declare const finite: (v: number | undefined, fallback?: number) => number;
|
|
224
279
|
export declare const sum: (values: readonly number[]) => number;
|
|
225
280
|
export declare const easeOutCubic: (t: number) => number;
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
export declare const formatPercent: (p: number) => string;
|
|
281
|
+
/** Angle brought into (-π/2, π/2] so that text rotated by it reads left to right */
|
|
282
|
+
export declare const upright: (a: number) => number;
|
|
229
283
|
export declare const inset: (rect: ShapeRect, padding?: ChartPadding) => ShapeRect;
|
|
230
284
|
/** Shortens a text with an ellipsis so it fits in `max` pixels ("" if nothing fits) */
|
|
231
285
|
export declare const ellipsize: (text: string, max: number, font: string, measure: MeasureText) => string;
|
|
@@ -252,6 +306,6 @@ export declare const textOn: (fill: Rgba, backdrop?: Rgba) => string;
|
|
|
252
306
|
export declare const readableFill: (fill: Rgba, target?: number, limit?: number) => Rgba;
|
|
253
307
|
/** Resolves a custom color with the theme resolver (static parsing otherwise) */
|
|
254
308
|
export declare const resolveWith: (theme: ChartTheme, css: string | undefined, fallback: Rgba) => Rgba;
|
|
255
|
-
/** Placeholder of a chart without data: a muted ring and "No data" */
|
|
309
|
+
/** Placeholder of a chart without data: a muted ring and "No data" (localized) */
|
|
256
310
|
export declare const emptyLayout: (c: LayoutContext) => LayoutResult;
|
|
257
311
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Rgba } from '../color.js';
|
|
2
2
|
import { ChartTheme } from '../theme.js';
|
|
3
3
|
import { ChartPadding } from '../types.js';
|
|
4
|
-
import { ShapeChartType } from './types.js';
|
|
4
|
+
import { ShapeChartLabels, ShapeChartType, ShapeHoverEvent } from './types.js';
|
|
5
5
|
export declare const TAU: number;
|
|
6
6
|
/** Rectangle in CSS pixels */
|
|
7
7
|
export interface ShapeRect {
|
|
@@ -13,6 +13,12 @@ export interface ShapeRect {
|
|
|
13
13
|
interface NodeBase {
|
|
14
14
|
/** Index of the item the node belongs to (hover, dimming); none for decorations */
|
|
15
15
|
hit?: number;
|
|
16
|
+
/**
|
|
17
|
+
* Other items whose hover also emphasizes the node (the flows of a hovered
|
|
18
|
+
* sankey node, the ancestors of a hovered sunburst sector); hit testing
|
|
19
|
+
* only uses `hit`
|
|
20
|
+
*/
|
|
21
|
+
also?: readonly number[];
|
|
16
22
|
/** Opacity multiplier */
|
|
17
23
|
alpha?: number;
|
|
18
24
|
/** Offset applied while the node's item is hovered (pie slices pop out) */
|
|
@@ -60,6 +66,10 @@ export interface RectNode extends NodeBase {
|
|
|
60
66
|
radius: number;
|
|
61
67
|
fill: string;
|
|
62
68
|
brighten?: boolean;
|
|
69
|
+
/** Outline drawn inside the rectangle while its item is hovered */
|
|
70
|
+
hoverStroke?: string;
|
|
71
|
+
/** Distance (px) around the rectangle still picked by hit testing (default 0) */
|
|
72
|
+
hitPad?: number;
|
|
63
73
|
}
|
|
64
74
|
/** Stroked arc (gauge track / value) */
|
|
65
75
|
export interface ArcNode extends NodeBase {
|
|
@@ -72,6 +82,8 @@ export interface ArcNode extends NodeBase {
|
|
|
72
82
|
width: number;
|
|
73
83
|
color: string;
|
|
74
84
|
cap: "round" | "butt";
|
|
85
|
+
/** Distance (px) beyond the stroke still picked by hit testing (default 4) */
|
|
86
|
+
hitPad?: number;
|
|
75
87
|
}
|
|
76
88
|
/** Dot; without fill nor stroke it is only a hit area */
|
|
77
89
|
export interface CircleNode extends NodeBase {
|
|
@@ -108,6 +120,27 @@ export interface TextNode extends NodeBase {
|
|
|
108
120
|
indicator?: number;
|
|
109
121
|
hoverColor?: string;
|
|
110
122
|
hoverFont?: string;
|
|
123
|
+
/** Rotation around (x, y), radians clockwise */
|
|
124
|
+
rotate?: number;
|
|
125
|
+
/** Outline drawn behind the text so it reads over other marks */
|
|
126
|
+
halo?: string;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Sankey flow: a horizontal S-curve (cubic Bézier) of constant thickness
|
|
130
|
+
* from (x0, y0) to (x1, y1), filled with a gradient from `color0` to `color1`
|
|
131
|
+
*/
|
|
132
|
+
export interface LinkNode extends NodeBase {
|
|
133
|
+
kind: "link";
|
|
134
|
+
x0: number;
|
|
135
|
+
y0: number;
|
|
136
|
+
x1: number;
|
|
137
|
+
y1: number;
|
|
138
|
+
/** Thickness, in pixels */
|
|
139
|
+
width: number;
|
|
140
|
+
color0: string;
|
|
141
|
+
color1: string;
|
|
142
|
+
/** Opacity while the link (or one of its `also` items) is hovered */
|
|
143
|
+
activeAlpha?: number;
|
|
111
144
|
}
|
|
112
145
|
/** Radar: dashed guide from the center to the hovered indicator */
|
|
113
146
|
export interface GuideNode extends NodeBase {
|
|
@@ -118,7 +151,7 @@ export interface GuideNode extends NodeBase {
|
|
|
118
151
|
ends: [number, number][];
|
|
119
152
|
color: string;
|
|
120
153
|
}
|
|
121
|
-
export type ShapeNode = SectorNode | PolygonNode | RectNode | ArcNode | CircleNode | LineNode | TextNode | GuideNode;
|
|
154
|
+
export type ShapeNode = SectorNode | PolygonNode | RectNode | ArcNode | CircleNode | LineNode | TextNode | GuideNode | LinkNode;
|
|
122
155
|
/** A row of the default tooltip */
|
|
123
156
|
export interface ShapeTooltipRow {
|
|
124
157
|
name: string;
|
|
@@ -149,6 +182,10 @@ export interface ShapeItem {
|
|
|
149
182
|
x: number;
|
|
150
183
|
y: number;
|
|
151
184
|
}[];
|
|
185
|
+
/** Extra fields of the hover event (calendar date, sankey link ends) */
|
|
186
|
+
event?: Pick<ShapeHoverEvent, "date" | "source" | "target">;
|
|
187
|
+
/** Sunburst: path focused when the item is activated (click, Enter) */
|
|
188
|
+
drill?: string[];
|
|
152
189
|
}
|
|
153
190
|
/** What is hovered: an item (and a radar indicator) */
|
|
154
191
|
export interface ShapeHover {
|
|
@@ -179,6 +216,14 @@ export interface ShapeScene {
|
|
|
179
216
|
cx: number;
|
|
180
217
|
cy: number;
|
|
181
218
|
};
|
|
219
|
+
/**
|
|
220
|
+
* Arrow-key moves in a grid of items (calendar heatmap), in positions of
|
|
221
|
+
* `items`: `next` for Left / Right, `down` for Up / Down; no wrapping
|
|
222
|
+
*/
|
|
223
|
+
steps?: {
|
|
224
|
+
next: number;
|
|
225
|
+
down: number;
|
|
226
|
+
};
|
|
182
227
|
/** Radar geometry used by hit testing (and to keep the tooltip off the labels) */
|
|
183
228
|
radar?: {
|
|
184
229
|
cx: number;
|
|
@@ -194,6 +239,10 @@ export interface ShapeScene {
|
|
|
194
239
|
};
|
|
195
240
|
/** No data to draw (placeholder shown) */
|
|
196
241
|
empty: boolean;
|
|
242
|
+
/** Built-in texts of the chart's locale (accessible descriptions) */
|
|
243
|
+
labels?: ShapeChartLabels;
|
|
244
|
+
/** Resolved locale of the chart */
|
|
245
|
+
locale?: string;
|
|
197
246
|
}
|
|
198
247
|
/** Measures a text in a CSS font */
|
|
199
248
|
export type MeasureText = (text: string, font: string) => number;
|
|
@@ -209,23 +258,28 @@ export interface LayoutContext {
|
|
|
209
258
|
/** Displayed (animated) value of a key */
|
|
210
259
|
value(key: string, target: number): number;
|
|
211
260
|
format(value: number): string;
|
|
212
|
-
/** Formats a share (0-1): `percentFormat` or one decimal */
|
|
261
|
+
/** Formats a share (0-1): `percentFormat` or a locale percent with one decimal */
|
|
213
262
|
percent(share: number): string;
|
|
263
|
+
/** Built-in texts (locale and `texts` overrides) */
|
|
264
|
+
labels: ShapeChartLabels;
|
|
265
|
+
/** Resolved locale */
|
|
266
|
+
locale: string;
|
|
214
267
|
/** Color of the `i`-th mark (custom `color` or the palette) */
|
|
215
268
|
color(css: string | undefined, i: number): Rgba;
|
|
216
269
|
/** Drawing area, padding excluded */
|
|
217
270
|
area: ShapeRect;
|
|
271
|
+
/** Sunburst: names from the root to the focused node */
|
|
272
|
+
focus: readonly string[];
|
|
218
273
|
}
|
|
219
|
-
export type LayoutResult = Omit<ShapeScene, "type" | "width" | "height">;
|
|
274
|
+
export type LayoutResult = Omit<ShapeScene, "type" | "width" | "height" | "labels" | "locale">;
|
|
220
275
|
export declare const clamp: (v: number, lo: number, hi: number) => number;
|
|
221
276
|
/** Non-negative finite number */
|
|
222
277
|
export declare const positive: (v: number | undefined) => number;
|
|
223
278
|
export declare const finite: (v: number | undefined, fallback?: number) => number;
|
|
224
279
|
export declare const sum: (values: readonly number[]) => number;
|
|
225
280
|
export declare const easeOutCubic: (t: number) => number;
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
export declare const formatPercent: (p: number) => string;
|
|
281
|
+
/** Angle brought into (-π/2, π/2] so that text rotated by it reads left to right */
|
|
282
|
+
export declare const upright: (a: number) => number;
|
|
229
283
|
export declare const inset: (rect: ShapeRect, padding?: ChartPadding) => ShapeRect;
|
|
230
284
|
/** Shortens a text with an ellipsis so it fits in `max` pixels ("" if nothing fits) */
|
|
231
285
|
export declare const ellipsize: (text: string, max: number, font: string, measure: MeasureText) => string;
|
|
@@ -252,6 +306,6 @@ export declare const textOn: (fill: Rgba, backdrop?: Rgba) => string;
|
|
|
252
306
|
export declare const readableFill: (fill: Rgba, target?: number, limit?: number) => Rgba;
|
|
253
307
|
/** Resolves a custom color with the theme resolver (static parsing otherwise) */
|
|
254
308
|
export declare const resolveWith: (theme: ChartTheme, css: string | undefined, fallback: Rgba) => Rgba;
|
|
255
|
-
/** Placeholder of a chart without data: a muted ring and "No data" */
|
|
309
|
+
/** Placeholder of a chart without data: a muted ring and "No data" (localized) */
|
|
256
310
|
export declare const emptyLayout: (c: LayoutContext) => LayoutResult;
|
|
257
311
|
export {};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { mix as e, parseColor as t, toCss as n } from "../color.js";
|
|
2
2
|
import { font as r } from "../overlay.js";
|
|
3
|
-
import { formatCompact as i } from "../format.js";
|
|
4
3
|
//#region src/engine/shapes/scene.ts
|
|
5
|
-
var
|
|
4
|
+
var i = Math.PI * 2, a = (e, t) => {
|
|
6
5
|
let n = /(\d+(?:\.\d+)?)px/.exec(t);
|
|
7
6
|
return e.length * (n ? Number(n[1]) : 12) * .6;
|
|
8
|
-
},
|
|
7
|
+
}, o = (e, t, n) => e < t ? t : e > n ? n : e, s = (e) => typeof e == "number" && Number.isFinite(e) && e > 0 ? e : 0, c = (e, t = 0) => typeof e == "number" && Number.isFinite(e) ? e : t, l = (e) => {
|
|
9
8
|
let t = 0;
|
|
10
9
|
for (let n of e) t += n;
|
|
11
10
|
return t;
|
|
12
|
-
},
|
|
11
|
+
}, u = (e) => 1 - (1 - o(e, 0, 1)) ** 3, d = (e) => {
|
|
12
|
+
let t = e % i;
|
|
13
|
+
return t > Math.PI && (t -= i), t <= -Math.PI && (t += i), t > Math.PI / 2 ? t -= Math.PI : t <= -Math.PI / 2 && (t += Math.PI), t;
|
|
14
|
+
}, f = (e, t) => {
|
|
13
15
|
let n = t?.top ?? 8, r = t?.right ?? 8, i = t?.bottom ?? 8, a = t?.left ?? 8;
|
|
14
16
|
return {
|
|
15
17
|
x: e.x + a,
|
|
@@ -17,7 +19,7 @@ var a = Math.PI * 2, o = (e, t) => {
|
|
|
17
19
|
width: Math.max(0, e.width - a - r),
|
|
18
20
|
height: Math.max(0, e.height - n - i)
|
|
19
21
|
};
|
|
20
|
-
},
|
|
22
|
+
}, p = (e, t, n, r) => {
|
|
21
23
|
if (r(e, n) <= t) return e;
|
|
22
24
|
if (r("…", n) > t) return "";
|
|
23
25
|
let i = 0, a = e.length;
|
|
@@ -26,53 +28,53 @@ var a = Math.PI * 2, o = (e, t) => {
|
|
|
26
28
|
r(e.slice(0, o) + "…", n) <= t ? i = o : a = o - 1;
|
|
27
29
|
}
|
|
28
30
|
return i ? e.slice(0, i).trimEnd() + "…" : "";
|
|
29
|
-
},
|
|
31
|
+
}, m = (e) => {
|
|
30
32
|
let t = /* @__PURE__ */ new Map();
|
|
31
33
|
return e.map((e) => {
|
|
32
34
|
let n = (t.get(e) ?? 0) + 1;
|
|
33
35
|
return t.set(e, n), n === 1 ? e : `${e}#${n}`;
|
|
34
36
|
});
|
|
35
|
-
},
|
|
37
|
+
}, h = [
|
|
36
38
|
1,
|
|
37
39
|
1,
|
|
38
40
|
1,
|
|
39
41
|
.96
|
|
40
|
-
],
|
|
42
|
+
], g = [
|
|
41
43
|
15 / 255,
|
|
42
44
|
23 / 255,
|
|
43
45
|
42 / 255,
|
|
44
46
|
.88
|
|
45
|
-
],
|
|
46
|
-
let n =
|
|
47
|
+
], _ = (e) => e <= .04045 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4, v = (e) => .2126 * _(e[0]) + .7152 * _(e[1]) + .0722 * _(e[2]), y = (e, t) => {
|
|
48
|
+
let n = o(e[3], 0, 1);
|
|
47
49
|
return [
|
|
48
50
|
e[0] * n + t[0] * (1 - n),
|
|
49
51
|
e[1] * n + t[1] * (1 - n),
|
|
50
52
|
e[2] * n + t[2] * (1 - n),
|
|
51
53
|
1
|
|
52
54
|
];
|
|
53
|
-
},
|
|
54
|
-
let n =
|
|
55
|
+
}, b = (e, t) => {
|
|
56
|
+
let n = v(y(e, t)), r = v(t);
|
|
55
57
|
return (Math.max(n, r) + .05) / (Math.min(n, r) + .05);
|
|
56
|
-
},
|
|
58
|
+
}, x = [
|
|
57
59
|
1,
|
|
58
60
|
1,
|
|
59
61
|
1,
|
|
60
62
|
1
|
|
61
|
-
],
|
|
62
|
-
let r =
|
|
63
|
+
], S = (e, t = x) => {
|
|
64
|
+
let r = y(e, y(t, x)), i = b(h, r), a = b(g, r);
|
|
63
65
|
return i >= a ? {
|
|
64
|
-
ink:
|
|
65
|
-
css: n(
|
|
66
|
+
ink: h,
|
|
67
|
+
css: n(h),
|
|
66
68
|
contrast: i
|
|
67
69
|
} : {
|
|
68
|
-
ink:
|
|
69
|
-
css: n(
|
|
70
|
+
ink: g,
|
|
71
|
+
css: n(g),
|
|
70
72
|
contrast: a
|
|
71
73
|
};
|
|
72
|
-
},
|
|
73
|
-
let i =
|
|
74
|
+
}, C = (e, t) => S(e, t).css, w = (t, n = 4.5, r = .3) => {
|
|
75
|
+
let i = S(t);
|
|
74
76
|
if (i.contrast >= n) return t;
|
|
75
|
-
let a = i.ink ===
|
|
77
|
+
let a = i.ink === h ? [
|
|
76
78
|
0,
|
|
77
79
|
0,
|
|
78
80
|
0,
|
|
@@ -85,11 +87,11 @@ var a = Math.PI * 2, o = (e, t) => {
|
|
|
85
87
|
];
|
|
86
88
|
for (let o = .04; o <= r + 1e-9; o += .04) {
|
|
87
89
|
let r = e(t, a, o);
|
|
88
|
-
if (i =
|
|
90
|
+
if (i = S(r), i.contrast >= n) return r;
|
|
89
91
|
}
|
|
90
92
|
return e(t, a, r);
|
|
91
|
-
},
|
|
92
|
-
let { area: t, theme:
|
|
93
|
+
}, T = (e, n, r) => n ? e.resolve ? e.resolve(n, r) : t(n) ?? r : r, E = (e) => {
|
|
94
|
+
let { area: t, theme: a } = e, o = t.x + t.width / 2, s = t.y + t.height / 2, c = Math.max(0, Math.min(t.width, t.height) / 2 - 6);
|
|
93
95
|
return {
|
|
94
96
|
nodes: [{
|
|
95
97
|
kind: "sector",
|
|
@@ -98,17 +100,17 @@ var a = Math.PI * 2, o = (e, t) => {
|
|
|
98
100
|
r0: c * .66,
|
|
99
101
|
r1: c,
|
|
100
102
|
a0: 0,
|
|
101
|
-
a1:
|
|
103
|
+
a1: i,
|
|
102
104
|
pad: 0,
|
|
103
105
|
corner: 0,
|
|
104
|
-
fill: n(
|
|
106
|
+
fill: n(a.grid, .8)
|
|
105
107
|
}, {
|
|
106
108
|
kind: "text",
|
|
107
109
|
x: o,
|
|
108
110
|
y: s,
|
|
109
|
-
text:
|
|
110
|
-
font: r(
|
|
111
|
-
color: n(
|
|
111
|
+
text: e.labels.noData,
|
|
112
|
+
font: r(a, 12),
|
|
113
|
+
color: n(a.textMuted),
|
|
112
114
|
align: "center",
|
|
113
115
|
baseline: "middle"
|
|
114
116
|
}],
|
|
@@ -118,6 +120,6 @@ var a = Math.PI * 2, o = (e, t) => {
|
|
|
118
120
|
};
|
|
119
121
|
};
|
|
120
122
|
//#endregion
|
|
121
|
-
export {
|
|
123
|
+
export { i as TAU, o as clamp, b as contrastRatio, u as easeOutCubic, p as ellipsize, E as emptyLayout, a as estimateText, c as finite, S as inkOn, f as inset, y as over, s as positive, w as readableFill, v as relativeLuminance, T as resolveWith, l as sum, C as textOn, m as uniqueKeys, d as upright };
|
|
122
124
|
|
|
123
125
|
//# sourceMappingURL=scene.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scene.js","names":["TAU","estimateText","size","f","text","clamp","v","lo","hi","positive","finite","fallback","sum","s","values","easeOutCubic","t","defaultFormat","formatCompact","value","formatPercent","p","inset","top","padding","right","bottom","left","rect","ellipsize","measure","font","max","mid","uniqueKeys","seen","names","name","LIGHT_INK","DARK_INK","channel","relativeLuminance","c","over","a","contrastRatio","ink","fill","b","WHITE","inkOn","solid","backdrop","light","dark","toCss","textOn","readableFill","best","target","toward","limit","next","mix","resolveWith","css","theme","parseColor","emptyLayout","cx","area","cy","r1"],"sources":["../../../../../charts/src/engine/shapes/scene.ts"],"sourcesContent":["// Drawable scene of a shape chart: resolved geometry, colors and texts,\n// produced by the (DOM-free) layouts and consumed by draw / hit testing.\n\nimport { mix, parseColor, toCss, type Rgba } from \"../color\";\nimport { formatCompact } from \"../format\";\nimport { font } from \"../overlay\";\nimport type { ChartTheme } from \"../theme\";\nimport type { ChartPadding } from \"../types\";\nimport type { ShapeChartType } from \"./types\";\n\nexport const TAU = Math.PI * 2;\n\n/** Rectangle in CSS pixels */\nexport interface ShapeRect {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\ninterface NodeBase {\n /** Index of the item the node belongs to (hover, dimming); none for decorations */\n hit?: number;\n /** Opacity multiplier */\n alpha?: number;\n /** Offset applied while the node's item is hovered (pie slices pop out) */\n shift?: [number, number];\n}\n\n/** Annular sector (pie slice, donut segment, ring) */\nexport interface SectorNode extends NodeBase {\n kind: \"sector\";\n cx: number;\n cy: number;\n r0: number;\n r1: number;\n /** Canvas angles (radians, clockwise from 3 o'clock) */\n a0: number;\n a1: number;\n /** Gap with the neighbours, in pixels */\n pad: number;\n /** Corner radius, in pixels */\n corner: number;\n fill: string;\n}\n\n/** Polygon (radar grid / series, funnel stage); `hole` is cut out */\nexport interface PolygonNode extends NodeBase {\n kind: \"polygon\";\n /** Flat x, y list */\n points: number[];\n hole?: number[];\n fill?: string;\n stroke?: string;\n lineWidth?: number;\n /** Corner radius, in pixels */\n radius?: number;\n /** Fill / stroke width when hovered */\n hoverFill?: string;\n hoverLineWidth?: number;\n /** Lightens the shape when hovered */\n brighten?: boolean;\n}\n\nexport interface RectNode extends NodeBase {\n kind: \"rect\";\n x: number;\n y: number;\n width: number;\n height: number;\n radius: number;\n fill: string;\n brighten?: boolean;\n}\n\n/** Stroked arc (gauge track / value) */\nexport interface ArcNode extends NodeBase {\n kind: \"arc\";\n cx: number;\n cy: number;\n r: number;\n a0: number;\n a1: number;\n width: number;\n color: string;\n cap: \"round\" | \"butt\";\n}\n\n/** Dot; without fill nor stroke it is only a hit area */\nexport interface CircleNode extends NodeBase {\n kind: \"circle\";\n cx: number;\n cy: number;\n r: number;\n fill?: string;\n stroke?: string;\n lineWidth?: number;\n /** Radar: indicator of the vertex */\n indicator?: number;\n /** Radius and halo color when the vertex is hovered */\n hoverR?: number;\n halo?: string;\n}\n\nexport interface LineNode extends NodeBase {\n kind: \"line\";\n points: number[];\n color: string;\n width: number;\n dash?: number[];\n}\n\nexport interface TextNode extends NodeBase {\n kind: \"text\";\n x: number;\n y: number;\n text: string;\n font: string;\n color: string;\n align: \"left\" | \"center\" | \"right\";\n baseline: \"top\" | \"middle\" | \"bottom\" | \"alphabetic\";\n /** Radar: indicator of the label */\n indicator?: number;\n hoverColor?: string;\n hoverFont?: string;\n}\n\n/** Radar: dashed guide from the center to the hovered indicator */\nexport interface GuideNode extends NodeBase {\n kind: \"guide\";\n cx: number;\n cy: number;\n /** End of each spoke */\n ends: [number, number][];\n color: string;\n}\n\nexport type ShapeNode =\n | SectorNode\n | PolygonNode\n | RectNode\n | ArcNode\n | CircleNode\n | LineNode\n | TextNode\n | GuideNode;\n\n/** A row of the default tooltip */\nexport interface ShapeTooltipRow {\n name: string;\n value: string;\n color?: string;\n strong?: boolean;\n}\n\n/** Something the pointer / keyboard can focus */\nexport interface ShapeItem {\n index: number;\n name: string;\n value: number;\n percent: number;\n /** `percent` formatted for screen readers (`percentFormat`) */\n share?: string;\n color: string;\n path?: string[];\n /** Anchor of the tooltip when focused with the keyboard */\n x: number;\n y: number;\n /** Rows of the default tooltip */\n rows: ShapeTooltipRow[];\n /** Radar: one entry per indicator */\n indicators?: {\n name: string;\n value: number;\n percent: number;\n x: number;\n y: number;\n }[];\n}\n\n/** What is hovered: an item (and a radar indicator) */\nexport interface ShapeHover {\n index: number;\n indicator?: number;\n}\n\nexport interface ShapeLegendEntry {\n /** Index passed to `toggle` */\n index: number;\n name: string;\n color: string;\n hidden: boolean;\n}\n\nexport interface ShapeScene {\n type: ShapeChartType;\n /** Size of the whole drawing */\n width: number;\n height: number;\n nodes: ShapeNode[];\n /** Focusable items, in keyboard order */\n items: ShapeItem[];\n /** Opacity of the other marks while one is hovered */\n dim: number;\n /** Entry animation of funnels / treemaps: fade and scale around a point */\n enter?: { alpha: number; scale: number; cx: number; cy: number };\n /** Radar geometry used by hit testing (and to keep the tooltip off the labels) */\n radar?: {\n cx: number;\n cy: number;\n radius: number;\n angles: number[];\n series: { index: number; points: number[] }[];\n /** Boxes of the indicator labels */\n labels?: ShapeRect[];\n };\n /** No data to draw (placeholder shown) */\n empty: boolean;\n}\n\n/** Measures a text in a CSS font */\nexport type MeasureText = (text: string, font: string) => number;\n\n/** Approximate width of a text without a canvas (tests, SSR) */\nexport const estimateText: MeasureText = (text, f) => {\n const size = /(\\d+(?:\\.\\d+)?)px/.exec(f);\n return text.length * (size ? Number(size[1]) : 12) * 0.6;\n};\n\n/** What the layouts of every type get */\nexport interface LayoutContext {\n theme: ChartTheme;\n measure: MeasureText;\n hidden: ReadonlySet<number>;\n /** Entry progress, eased (1 when done) */\n enter: number;\n /** Displayed (animated) value of a key */\n value(key: string, target: number): number;\n format(value: number): string;\n /** Formats a share (0-1): `percentFormat` or one decimal */\n percent(share: number): string;\n /** Color of the `i`-th mark (custom `color` or the palette) */\n color(css: string | undefined, i: number): Rgba;\n /** Drawing area, padding excluded */\n area: ShapeRect;\n}\n\nexport type LayoutResult = Omit<ShapeScene, \"type\" | \"width\" | \"height\">;\n\nexport const clamp = (v: number, lo: number, hi: number) =>\n v < lo ? lo : v > hi ? hi : v;\n\n/** Non-negative finite number */\nexport const positive = (v: number | undefined) =>\n typeof v === \"number\" && Number.isFinite(v) && v > 0 ? v : 0;\n\nexport const finite = (v: number | undefined, fallback = 0) =>\n typeof v === \"number\" && Number.isFinite(v) ? v : fallback;\n\nexport const sum = (values: readonly number[]) => {\n let s = 0;\n for (const v of values) s += v;\n return s;\n};\n\nexport const easeOutCubic = (t: number) => 1 - Math.pow(1 - clamp(t, 0, 1), 3);\n\nexport const defaultFormat = (value: number) => formatCompact(value);\n\n/** Share 0-1 as a percent with one decimal: `0.4` -> `40.0%` */\nexport const formatPercent = (p: number) =>\n Number.isFinite(p) ? `${(p * 100).toFixed(1)}%` : \"–\";\n\nexport const inset = (rect: ShapeRect, padding?: ChartPadding): ShapeRect => {\n const top = padding?.top ?? 8;\n const right = padding?.right ?? 8;\n const bottom = padding?.bottom ?? 8;\n const left = padding?.left ?? 8;\n return {\n x: rect.x + left,\n y: rect.y + top,\n width: Math.max(0, rect.width - left - right),\n height: Math.max(0, rect.height - top - bottom),\n };\n};\n\n/** Shortens a text with an ellipsis so it fits in `max` pixels (\"\" if nothing fits) */\nexport const ellipsize = (\n text: string,\n max: number,\n font: string,\n measure: MeasureText,\n): string => {\n if (measure(text, font) <= max) return text;\n if (measure(\"…\", font) > max) return \"\";\n let lo = 0;\n let hi = text.length;\n while (lo < hi) {\n const mid = (lo + hi + 1) >> 1;\n if (measure(text.slice(0, mid) + \"…\", font) <= max) lo = mid;\n else hi = mid - 1;\n }\n return lo ? text.slice(0, lo).trimEnd() + \"…\" : \"\";\n};\n\n/** Stable keys of named values: the name, `name#2` for duplicates */\nexport const uniqueKeys = (names: readonly string[]) => {\n const seen = new Map<string, number>();\n return names.map((name) => {\n const n = (seen.get(name) ?? 0) + 1;\n seen.set(name, n);\n return n === 1 ? name : `${name}#${n}`;\n });\n};\n\nconst LIGHT_INK: Rgba = [1, 1, 1, 0.96];\nconst DARK_INK: Rgba = [15 / 255, 23 / 255, 42 / 255, 0.88];\n\nconst channel = (v: number) =>\n v <= 0.04045 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4);\n\n/** WCAG relative luminance of an opaque color */\nexport const relativeLuminance = (c: Rgba) =>\n 0.2126 * channel(c[0]) + 0.7152 * channel(c[1]) + 0.0722 * channel(c[2]);\n\n/** `top` composited over the opaque `bottom` */\nexport const over = (top: Rgba, bottom: Rgba): Rgba => {\n const a = clamp(top[3], 0, 1);\n return [\n top[0] * a + bottom[0] * (1 - a),\n top[1] * a + bottom[1] * (1 - a),\n top[2] * a + bottom[2] * (1 - a),\n 1,\n ];\n};\n\n/** WCAG contrast ratio (1-21) of `ink` drawn on the opaque `fill` */\nexport const contrastRatio = (ink: Rgba, fill: Rgba) => {\n const a = relativeLuminance(over(ink, fill));\n const b = relativeLuminance(fill);\n return (Math.max(a, b) + 0.05) / (Math.min(a, b) + 0.05);\n};\n\nconst WHITE: Rgba = [1, 1, 1, 1];\n\n/** Light or dark ink, whichever contrasts more with the fill, and its contrast */\nexport const inkOn = (\n fill: Rgba,\n backdrop: Rgba = WHITE,\n): { ink: Rgba; css: string; contrast: number } => {\n const solid = over(fill, over(backdrop, WHITE));\n const light = contrastRatio(LIGHT_INK, solid);\n const dark = contrastRatio(DARK_INK, solid);\n return light >= dark\n ? { ink: LIGHT_INK, css: toCss(LIGHT_INK), contrast: light }\n : { ink: DARK_INK, css: toCss(DARK_INK), contrast: dark };\n};\n\n/** Readable text color on a fill (WCAG contrast) */\nexport const textOn = (fill: Rgba, backdrop?: Rgba) =>\n inkOn(fill, backdrop).css;\n\n/**\n * Fill adjusted so that its best ink reaches `target` contrast: darkened\n * under white text, lightened under dark text (at most `limit` of the way)\n */\nexport const readableFill = (fill: Rgba, target = 4.5, limit = 0.3): Rgba => {\n let best = inkOn(fill);\n if (best.contrast >= target) return fill;\n const toward: Rgba =\n best.ink === LIGHT_INK ? [0, 0, 0, fill[3]] : [1, 1, 1, fill[3]];\n for (let t = 0.04; t <= limit + 1e-9; t += 0.04) {\n const next = mix(fill, toward, t);\n best = inkOn(next);\n if (best.contrast >= target) return next;\n }\n return mix(fill, toward, limit);\n};\n\n/** Resolves a custom color with the theme resolver (static parsing otherwise) */\nexport const resolveWith = (\n theme: ChartTheme,\n css: string | undefined,\n fallback: Rgba,\n): Rgba => {\n if (!css) return fallback;\n return theme.resolve\n ? theme.resolve(css, fallback)\n : (parseColor(css) ?? fallback);\n};\n\n/** Placeholder of a chart without data: a muted ring and \"No data\" */\nexport const emptyLayout = (c: LayoutContext): LayoutResult => {\n const { area, theme } = c;\n const cx = area.x + area.width / 2;\n const cy = area.y + area.height / 2;\n const r1 = Math.max(0, Math.min(area.width, area.height) / 2 - 6);\n return {\n nodes: [\n {\n kind: \"sector\",\n cx,\n cy,\n r0: r1 * 0.66,\n r1,\n a0: 0,\n a1: TAU,\n pad: 0,\n corner: 0,\n fill: toCss(theme.grid, 0.8),\n },\n {\n kind: \"text\",\n x: cx,\n y: cy,\n text: \"No data\",\n font: font(theme, 12),\n color: toCss(theme.textMuted),\n align: \"center\",\n baseline: \"middle\",\n },\n ],\n items: [],\n dim: 1,\n empty: true,\n };\n};\n"],"mappings":";;;;AAUA,IAAaA,IAAM,KAAK,KAAK,GAsNhBC,KAA6B,GAAM,MAAM;CACpD,IAAMC,IAAO,oBAAoB,KAAKC,CAAC;CACvC,OAAOC,EAAK,UAAUF,IAAO,OAAOA,EAAK,EAAE,IAAI,MAAM;AACvD,GAsBaG,KAAS,GAAW,GAAY,M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AAM,MAAM,EAAG;EAC7B,GACA;GACE,MAAM;GACN,GAAGG;GACH,GAAGE;GACH,MAAM;GACN,MAAMxC,EAAKmC,GAAO,EAAE;GACpB,OAAOX,EAAMW,EAAM,SAAS;GAC5B,OAAO;GACP,UAAU;EACZ,CACF;EACA,OAAO,CAAC;EACR,KAAK;EACL,OAAO;CACT;AACF"}
|
|
1
|
+
{"version":3,"file":"scene.js","names":["TAU","estimateText","size","f","text","clamp","v","lo","hi","positive","finite","fallback","sum","s","values","easeOutCubic","t","upright","r","a","inset","top","padding","right","bottom","left","rect","ellipsize","measure","font","max","mid","uniqueKeys","seen","names","name","LIGHT_INK","DARK_INK","channel","relativeLuminance","c","over","contrastRatio","ink","fill","b","WHITE","inkOn","solid","backdrop","light","dark","toCss","textOn","readableFill","best","target","toward","limit","next","mix","resolveWith","css","theme","parseColor","emptyLayout","cx","area","cy","r1"],"sources":["../../../../../charts/src/engine/shapes/scene.ts"],"sourcesContent":["// Drawable scene of a shape chart: resolved geometry, colors and texts,\n// produced by the (DOM-free) layouts and consumed by draw / hit testing.\n\nimport { mix, parseColor, toCss, type Rgba } from \"../color\";\n\nimport { font } from \"../overlay\";\nimport type { ChartTheme } from \"../theme\";\nimport type { ChartPadding } from \"../types\";\nimport type {\n ShapeChartLabels,\n ShapeChartType,\n ShapeHoverEvent,\n} from \"./types\";\n\nexport const TAU = Math.PI * 2;\n\n/** Rectangle in CSS pixels */\nexport interface ShapeRect {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\ninterface NodeBase {\n /** Index of the item the node belongs to (hover, dimming); none for decorations */\n hit?: number;\n /**\n * Other items whose hover also emphasizes the node (the flows of a hovered\n * sankey node, the ancestors of a hovered sunburst sector); hit testing\n * only uses `hit`\n */\n also?: readonly number[];\n /** Opacity multiplier */\n alpha?: number;\n /** Offset applied while the node's item is hovered (pie slices pop out) */\n shift?: [number, number];\n}\n\n/** Annular sector (pie slice, donut segment, ring) */\nexport interface SectorNode extends NodeBase {\n kind: \"sector\";\n cx: number;\n cy: number;\n r0: number;\n r1: number;\n /** Canvas angles (radians, clockwise from 3 o'clock) */\n a0: number;\n a1: number;\n /** Gap with the neighbours, in pixels */\n pad: number;\n /** Corner radius, in pixels */\n corner: number;\n fill: string;\n}\n\n/** Polygon (radar grid / series, funnel stage); `hole` is cut out */\nexport interface PolygonNode extends NodeBase {\n kind: \"polygon\";\n /** Flat x, y list */\n points: number[];\n hole?: number[];\n fill?: string;\n stroke?: string;\n lineWidth?: number;\n /** Corner radius, in pixels */\n radius?: number;\n /** Fill / stroke width when hovered */\n hoverFill?: string;\n hoverLineWidth?: number;\n /** Lightens the shape when hovered */\n brighten?: boolean;\n}\n\nexport interface RectNode extends NodeBase {\n kind: \"rect\";\n x: number;\n y: number;\n width: number;\n height: number;\n radius: number;\n fill: string;\n brighten?: boolean;\n /** Outline drawn inside the rectangle while its item is hovered */\n hoverStroke?: string;\n /** Distance (px) around the rectangle still picked by hit testing (default 0) */\n hitPad?: number;\n}\n\n/** Stroked arc (gauge track / value) */\nexport interface ArcNode extends NodeBase {\n kind: \"arc\";\n cx: number;\n cy: number;\n r: number;\n a0: number;\n a1: number;\n width: number;\n color: string;\n cap: \"round\" | \"butt\";\n /** Distance (px) beyond the stroke still picked by hit testing (default 4) */\n hitPad?: number;\n}\n\n/** Dot; without fill nor stroke it is only a hit area */\nexport interface CircleNode extends NodeBase {\n kind: \"circle\";\n cx: number;\n cy: number;\n r: number;\n fill?: string;\n stroke?: string;\n lineWidth?: number;\n /** Radar: indicator of the vertex */\n indicator?: number;\n /** Radius and halo color when the vertex is hovered */\n hoverR?: number;\n halo?: string;\n}\n\nexport interface LineNode extends NodeBase {\n kind: \"line\";\n points: number[];\n color: string;\n width: number;\n dash?: number[];\n}\n\nexport interface TextNode extends NodeBase {\n kind: \"text\";\n x: number;\n y: number;\n text: string;\n font: string;\n color: string;\n align: \"left\" | \"center\" | \"right\";\n baseline: \"top\" | \"middle\" | \"bottom\" | \"alphabetic\";\n /** Radar: indicator of the label */\n indicator?: number;\n hoverColor?: string;\n hoverFont?: string;\n /** Rotation around (x, y), radians clockwise */\n rotate?: number;\n /** Outline drawn behind the text so it reads over other marks */\n halo?: string;\n}\n\n/**\n * Sankey flow: a horizontal S-curve (cubic Bézier) of constant thickness\n * from (x0, y0) to (x1, y1), filled with a gradient from `color0` to `color1`\n */\nexport interface LinkNode extends NodeBase {\n kind: \"link\";\n x0: number;\n y0: number;\n x1: number;\n y1: number;\n /** Thickness, in pixels */\n width: number;\n color0: string;\n color1: string;\n /** Opacity while the link (or one of its `also` items) is hovered */\n activeAlpha?: number;\n}\n\n/** Radar: dashed guide from the center to the hovered indicator */\nexport interface GuideNode extends NodeBase {\n kind: \"guide\";\n cx: number;\n cy: number;\n /** End of each spoke */\n ends: [number, number][];\n color: string;\n}\n\nexport type ShapeNode =\n | SectorNode\n | PolygonNode\n | RectNode\n | ArcNode\n | CircleNode\n | LineNode\n | TextNode\n | GuideNode\n | LinkNode;\n\n/** A row of the default tooltip */\nexport interface ShapeTooltipRow {\n name: string;\n value: string;\n color?: string;\n strong?: boolean;\n}\n\n/** Something the pointer / keyboard can focus */\nexport interface ShapeItem {\n index: number;\n name: string;\n value: number;\n percent: number;\n /** `percent` formatted for screen readers (`percentFormat`) */\n share?: string;\n color: string;\n path?: string[];\n /** Anchor of the tooltip when focused with the keyboard */\n x: number;\n y: number;\n /** Rows of the default tooltip */\n rows: ShapeTooltipRow[];\n /** Radar: one entry per indicator */\n indicators?: {\n name: string;\n value: number;\n percent: number;\n x: number;\n y: number;\n }[];\n /** Extra fields of the hover event (calendar date, sankey link ends) */\n event?: Pick<ShapeHoverEvent, \"date\" | \"source\" | \"target\">;\n /** Sunburst: path focused when the item is activated (click, Enter) */\n drill?: string[];\n}\n\n/** What is hovered: an item (and a radar indicator) */\nexport interface ShapeHover {\n index: number;\n indicator?: number;\n}\n\nexport interface ShapeLegendEntry {\n /** Index passed to `toggle` */\n index: number;\n name: string;\n color: string;\n hidden: boolean;\n}\n\nexport interface ShapeScene {\n type: ShapeChartType;\n /** Size of the whole drawing */\n width: number;\n height: number;\n nodes: ShapeNode[];\n /** Focusable items, in keyboard order */\n items: ShapeItem[];\n /** Opacity of the other marks while one is hovered */\n dim: number;\n /** Entry animation of funnels / treemaps: fade and scale around a point */\n enter?: { alpha: number; scale: number; cx: number; cy: number };\n /**\n * Arrow-key moves in a grid of items (calendar heatmap), in positions of\n * `items`: `next` for Left / Right, `down` for Up / Down; no wrapping\n */\n steps?: { next: number; down: number };\n /** Radar geometry used by hit testing (and to keep the tooltip off the labels) */\n radar?: {\n cx: number;\n cy: number;\n radius: number;\n angles: number[];\n series: { index: number; points: number[] }[];\n /** Boxes of the indicator labels */\n labels?: ShapeRect[];\n };\n /** No data to draw (placeholder shown) */\n empty: boolean;\n /** Built-in texts of the chart's locale (accessible descriptions) */\n labels?: ShapeChartLabels;\n /** Resolved locale of the chart */\n locale?: string;\n}\n\n/** Measures a text in a CSS font */\nexport type MeasureText = (text: string, font: string) => number;\n\n/** Approximate width of a text without a canvas (tests, SSR) */\nexport const estimateText: MeasureText = (text, f) => {\n const size = /(\\d+(?:\\.\\d+)?)px/.exec(f);\n return text.length * (size ? Number(size[1]) : 12) * 0.6;\n};\n\n/** What the layouts of every type get */\nexport interface LayoutContext {\n theme: ChartTheme;\n measure: MeasureText;\n hidden: ReadonlySet<number>;\n /** Entry progress, eased (1 when done) */\n enter: number;\n /** Displayed (animated) value of a key */\n value(key: string, target: number): number;\n format(value: number): string;\n /** Formats a share (0-1): `percentFormat` or a locale percent with one decimal */\n percent(share: number): string;\n /** Built-in texts (locale and `texts` overrides) */\n labels: ShapeChartLabels;\n /** Resolved locale */\n locale: string;\n /** Color of the `i`-th mark (custom `color` or the palette) */\n color(css: string | undefined, i: number): Rgba;\n /** Drawing area, padding excluded */\n area: ShapeRect;\n /** Sunburst: names from the root to the focused node */\n focus: readonly string[];\n}\n\nexport type LayoutResult = Omit<\n ShapeScene,\n \"type\" | \"width\" | \"height\" | \"labels\" | \"locale\"\n>;\n\nexport const clamp = (v: number, lo: number, hi: number) =>\n v < lo ? lo : v > hi ? hi : v;\n\n/** Non-negative finite number */\nexport const positive = (v: number | undefined) =>\n typeof v === \"number\" && Number.isFinite(v) && v > 0 ? v : 0;\n\nexport const finite = (v: number | undefined, fallback = 0) =>\n typeof v === \"number\" && Number.isFinite(v) ? v : fallback;\n\nexport const sum = (values: readonly number[]) => {\n let s = 0;\n for (const v of values) s += v;\n return s;\n};\n\nexport const easeOutCubic = (t: number) => 1 - Math.pow(1 - clamp(t, 0, 1), 3);\n\n/** Angle brought into (-π/2, π/2] so that text rotated by it reads left to right */\nexport const upright = (a: number) => {\n let r = a % TAU;\n if (r > Math.PI) r -= TAU;\n if (r <= -Math.PI) r += TAU;\n if (r > Math.PI / 2) r -= Math.PI;\n else if (r <= -Math.PI / 2) r += Math.PI;\n return r;\n};\n\nexport const inset = (rect: ShapeRect, padding?: ChartPadding): ShapeRect => {\n const top = padding?.top ?? 8;\n const right = padding?.right ?? 8;\n const bottom = padding?.bottom ?? 8;\n const left = padding?.left ?? 8;\n return {\n x: rect.x + left,\n y: rect.y + top,\n width: Math.max(0, rect.width - left - right),\n height: Math.max(0, rect.height - top - bottom),\n };\n};\n\n/** Shortens a text with an ellipsis so it fits in `max` pixels (\"\" if nothing fits) */\nexport const ellipsize = (\n text: string,\n max: number,\n font: string,\n measure: MeasureText,\n): string => {\n if (measure(text, font) <= max) return text;\n if (measure(\"…\", font) > max) return \"\";\n let lo = 0;\n let hi = text.length;\n while (lo < hi) {\n const mid = (lo + hi + 1) >> 1;\n if (measure(text.slice(0, mid) + \"…\", font) <= max) lo = mid;\n else hi = mid - 1;\n }\n return lo ? text.slice(0, lo).trimEnd() + \"…\" : \"\";\n};\n\n/** Stable keys of named values: the name, `name#2` for duplicates */\nexport const uniqueKeys = (names: readonly string[]) => {\n const seen = new Map<string, number>();\n return names.map((name) => {\n const n = (seen.get(name) ?? 0) + 1;\n seen.set(name, n);\n return n === 1 ? name : `${name}#${n}`;\n });\n};\n\nconst LIGHT_INK: Rgba = [1, 1, 1, 0.96];\nconst DARK_INK: Rgba = [15 / 255, 23 / 255, 42 / 255, 0.88];\n\nconst channel = (v: number) =>\n v <= 0.04045 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4);\n\n/** WCAG relative luminance of an opaque color */\nexport const relativeLuminance = (c: Rgba) =>\n 0.2126 * channel(c[0]) + 0.7152 * channel(c[1]) + 0.0722 * channel(c[2]);\n\n/** `top` composited over the opaque `bottom` */\nexport const over = (top: Rgba, bottom: Rgba): Rgba => {\n const a = clamp(top[3], 0, 1);\n return [\n top[0] * a + bottom[0] * (1 - a),\n top[1] * a + bottom[1] * (1 - a),\n top[2] * a + bottom[2] * (1 - a),\n 1,\n ];\n};\n\n/** WCAG contrast ratio (1-21) of `ink` drawn on the opaque `fill` */\nexport const contrastRatio = (ink: Rgba, fill: Rgba) => {\n const a = relativeLuminance(over(ink, fill));\n const b = relativeLuminance(fill);\n return (Math.max(a, b) + 0.05) / (Math.min(a, b) + 0.05);\n};\n\nconst WHITE: Rgba = [1, 1, 1, 1];\n\n/** Light or dark ink, whichever contrasts more with the fill, and its contrast */\nexport const inkOn = (\n fill: Rgba,\n backdrop: Rgba = WHITE,\n): { ink: Rgba; css: string; contrast: number } => {\n const solid = over(fill, over(backdrop, WHITE));\n const light = contrastRatio(LIGHT_INK, solid);\n const dark = contrastRatio(DARK_INK, solid);\n return light >= dark\n ? { ink: LIGHT_INK, css: toCss(LIGHT_INK), contrast: light }\n : { ink: DARK_INK, css: toCss(DARK_INK), contrast: dark };\n};\n\n/** Readable text color on a fill (WCAG contrast) */\nexport const textOn = (fill: Rgba, backdrop?: Rgba) =>\n inkOn(fill, backdrop).css;\n\n/**\n * Fill adjusted so that its best ink reaches `target` contrast: darkened\n * under white text, lightened under dark text (at most `limit` of the way)\n */\nexport const readableFill = (fill: Rgba, target = 4.5, limit = 0.3): Rgba => {\n let best = inkOn(fill);\n if (best.contrast >= target) return fill;\n const toward: Rgba =\n best.ink === LIGHT_INK ? [0, 0, 0, fill[3]] : [1, 1, 1, fill[3]];\n for (let t = 0.04; t <= limit + 1e-9; t += 0.04) {\n const next = mix(fill, toward, t);\n best = inkOn(next);\n if (best.contrast >= target) return next;\n }\n return mix(fill, toward, limit);\n};\n\n/** Resolves a custom color with the theme resolver (static parsing otherwise) */\nexport const resolveWith = (\n theme: ChartTheme,\n css: string | undefined,\n fallback: Rgba,\n): Rgba => {\n if (!css) return fallback;\n return theme.resolve\n ? theme.resolve(css, fallback)\n : (parseColor(css) ?? fallback);\n};\n\n/** Placeholder of a chart without data: a muted ring and \"No data\" (localized) */\nexport const emptyLayout = (c: LayoutContext): LayoutResult => {\n const { area, theme } = c;\n const cx = area.x + area.width / 2;\n const cy = area.y + area.height / 2;\n const r1 = Math.max(0, Math.min(area.width, area.height) / 2 - 6);\n return {\n nodes: [\n {\n kind: \"sector\",\n cx,\n cy,\n r0: r1 * 0.66,\n r1,\n a0: 0,\n a1: TAU,\n pad: 0,\n corner: 0,\n fill: toCss(theme.grid, 0.8),\n },\n {\n kind: \"text\",\n x: cx,\n y: cy,\n text: c.labels.noData,\n font: font(theme, 12),\n color: toCss(theme.textMuted),\n align: \"center\",\n baseline: \"middle\",\n },\n ],\n items: [],\n dim: 1,\n empty: true,\n };\n};\n"],"mappings":";;;AAcA,IAAaA,IAAM,KAAK,KAAK,GAsQhBC,KAA6B,GAAM,MAAM;CACpD,IAAMC,IAAO,oBAAoB,KAAKC,CAAC;CACvC,OAAOC,EAAK,UAAUF,IAAO,OAAOA,EAAK,EAAE,IAAI,MAAM;AACvD,GA+BaG,KAAS,GAAW,GAAY,MAC3CC,IAAIC,IAAKA,IAAKD,IAAIE,IAAKA,IAAKF,GAGjBG,KAAY,MACvB,OAAOH,KAAM,YAAY,OAAO,SAASA,CAAC,KAAKA,IAAI,IAAIA,IAAI,GAEhDI,KAAU,GAAuB,IAAW,MACvD,OAAOJ,KAAM,YAAY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,EAAKkC,GAAO,EAAE;GACpB,OAAOX,EAAMW,EAAM,SAAS;GAC5B,OAAO;GACP,UAAU;EACZ,CACF;EACA,OAAO,CAAC;EACR,KAAK;EACL,OAAO;CACT;AACF"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("../color.cjs"),t=require("../overlay.cjs"),n=require("./labels.cjs"),r=require("./scene.cjs");var i=18,a=(e,t)=>{let n=0,i=(e,a,o)=>{let s=r.uniqueKeys(e.map(e=>e.name));return e.map((e,c)=>{let l=a?o:c,u={node:e,key:`${a?.key??``}/${s[c]}`,path:[...a?.path??[],e.name],top:l,index:n++,depth:(a?.depth??0)+1,target:0,parent:a,children:[]};return e.children?.length?(u.children=i(e.children,u,l),u.target=r.sum(u.children.map(e=>e.target))):u.target=t.has(l)?0:r.positive(e.value),u})};return i(e??[],null,0)},o=(e,t)=>{let n=e,r=null;for(let e of t){let t=n.find(t=>t.node.name===e&&t.children.length&&t.target>0);if(!t)break;r=t,n=t.children}return r},s=(e,t,n)=>o(a(e.data,n),t)?.path??[],c=e=>e.reduce((e,t)=>t.target>0?Math.max(e,t.children.length?c(t.children):t.depth):e,0),l=(e,t,n)=>{let i=r.sum(e.map(e=>e.target)),a=t?t.depth:0,o=0,s=1;if(t&&i>0){let n=0;for(let r=t;r;r=r.parent){let t=r.parent?r.parent.children:e;for(let e of t){if(e===r)break;n+=e.target}}o=n/i,s=o+t.target/i}let l=Math.max(1,c(t?t.children:e)-a);return{a0:o,a1:s,depth:a,levels:Math.min(typeof n==`number`&&n>=1?Math.floor(n):l,l)}},u=(e,t,n,r)=>{let i=a(e.data,t),s=e=>e.forEach(e=>{e.children.length?s(e.children):r.set(e.key,e.target)});s(i);let c=l(i,o(i,n),e.levels);r.set(`@a0`,c.a0),r.set(`@a1`,c.a1),r.set(`@d`,c.depth),r.set(`@levels`,c.levels)},d=(s,c)=>{let{theme:u,area:d,measure:f,hidden:p}=c,m=a(s.data,p),h=r.sum(m.map(e=>e.target)),g=new Map,_=e=>{let t=e.children.length?r.sum(e.children.map(_)):Math.max(0,c.value(e.key,e.target));return g.set(e,t),t},v=r.sum(m.map(_));if(h<=0&&v<=1e-9)return r.emptyLayout(c);let y=o(m,c.focus),b=l(m,y,s.levels),x=c.value(`@a0`,b.a0),S=c.value(`@a1`,b.a1);S-x>1e-6||(x=0,S=1);let C=c.value(`@d`,b.depth),w=d.x+d.width/2,T=d.y+d.height/2,E=Math.max(4,Math.min(d.width,d.height)/2-2),D=E*r.clamp(r.finite(s.innerRadius,.26),0,.8),O=Math.max(1,Math.floor((E-D)/i)),k=Math.max(1,c.value(`@levels`,b.levels)),A=(E-D)/Math.min(k,O),j=r.clamp(c.enter,0,1),M=r.finite(s.startAngle)*Math.PI/180-Math.PI/2,N=e=>M+r.clamp((e-x)/(S-x),0,1)*r.TAU*j,P=Math.max(0,r.finite(s.padAngle,1)),F=Math.max(0,r.finite(s.cornerRadius,2)),I=s.labels??`auto`,L=t.font(u,11),R=r.relativeLuminance(u.background)<.2,z=[],B=[],V=[],H=new Map,U=e=>[e.index,...e.children.flatMap(U)],W=e=>{let t=[];for(let n=e.parent;n;n=n.parent)t.push(n.index);return t},G=(e,t,n,i,a,o,s,c)=>{if(I===`none`)return;let l=n-t,u=a-i,d=(i+a)/2,p=(t+n)/2,m=f(e,L),h=0;if(I!==`radial`&&u>=15){let e=(u-11)/2-1,t=2*d*Math.acos(r.clamp(1-e/d,-1,1));h=Math.max(0,Math.min(l*d-8,t))}let g=0;I!==`tangential`&&l*(i+4)>=13&&(g=Math.max(0,u-10));let _=h>0&&(m<=h||h>=g||I===`tangential`),v=_?h:g;if(v<=0)return;let y=r.ellipsize(e,v,L,f);!y||y!==e&&y.length<4||B.push({kind:`text`,x:w+d*Math.cos(p),y:T+d*Math.sin(p),text:y,font:L,color:r.textOn(o),align:`center`,baseline:`middle`,rotate:r.upright(_?p+Math.PI/2:p),hit:s.index,also:c})},K=(t,n)=>{t.forEach((t,i)=>{let a=n?t.node.color?r.resolveWith(u,t.node.color,n):e.mix(n,u.background,.14+i%3*.06):c.color(t.node.color,t.top);H.set(t,a),t.children.length&&K(t.children,a)})};K(m,null);let q=new Map,J=(e,t)=>{let n=t;for(let t of e)q.set(t,n),t.children.length&&J(t.children,n),n+=(g.get(t)??0)/Math.max(1e-12,v)};J(m,0);let Y=t=>{for(let i of t){let t=g.get(i)??0;if(t<=1e-9)continue;let a=q.get(i)??0,o=a+t/Math.max(1e-12,v),s=N(a),l=N(o),d=i.depth-C,f=Math.max(D,D+(d-1)*A),p=Math.min(E,D+d*A);if(l-s>1e-4&&p-f>.5){let t=H.get(i)??u.primary,a=r.readableFill(R?e.mix(t,u.background,.12):t,3),o=[...W(i),...U(i).slice(1)];if(z.push({kind:`sector`,cx:w,cy:T,r0:f,r1:p,a0:s,a1:l,pad:P,corner:F,fill:e.toCss(a),hit:i.index,also:o}),G(i.node.name,s,l,f,p,a,i,o),i.target>0){let t=h>0?i.target/h:0,r=i.parent?.target??0,o=(f+p)/2,u=(s+l)/2;V.push({index:i.index,name:i.node.name,value:i.target,percent:t,share:c.percent(t),color:e.toCss(a),path:i.path,x:w+o*Math.cos(u),y:T+o*Math.sin(u),rows:[{name:c.labels.value,value:c.format(i.target)},{name:c.labels.share,value:c.percent(t)},...i.parent&&r>0?[{name:n.interpolate(c.labels.ofName,{name:i.parent.node.name}),value:c.percent(i.target/r)}]:[]],...i.children.length?{drill:i.path}:{}})}}i.children.length&&p<E-.5&&Y(i.children)}};Y(m),z.push(...B);let X=D-3;if(X>=14){let n=r.clamp(X*.3,12,24);if(y){let n=H.get(y)??u.primary,i=e.toCss(e.mix(n,u.background,.84)),a=e.toCss(n),o=y.children.flatMap(U);z.push({kind:`circle`,cx:w,cy:T,r:X,fill:i,stroke:e.toCss(n,.5),lineWidth:1,hit:y.index,also:o});let s=t.font(u,r.clamp(X*.2,11,14),600),l=r.ellipsize(y.node.name,X*1.6,s,f),d=c.format(y.target),p=X>=30,m=p?T-2:T+4,g=m-(p?18:12);X>=24&&z.push({kind:`line`,points:[w-5,g+3,w,g-2,w+5,g+3],color:e.toCss(u.textMuted),width:1.5,hit:y.index,also:o}),l&&z.push({kind:`text`,x:w,y:m,text:l,font:s,color:e.toCss(u.text),align:`center`,baseline:`middle`,hit:y.index,also:o}),p&&z.push({kind:`text`,x:w,y:T+16,text:r.ellipsize(d,X*1.6,t.font(u,12),f),font:t.font(u,12),color:e.toCss(u.textMuted),align:`center`,baseline:`middle`,hit:y.index,also:o});let _=h>0?y.target/h:0;V.push({index:y.index,name:y.node.name,value:y.target,percent:_,share:c.percent(_),color:a,path:y.path,x:w,y:T,rows:[{name:c.labels.value,value:c.format(y.target)},{name:c.labels.share,value:c.percent(_)}],drill:y.path.slice(0,-1)})}else if(h>0){let i=t.font(u,n,600),a=r.ellipsize(c.format(h),X*1.7,i,f);a&&z.push({kind:`text`,x:w,y:T,text:a,font:i,color:e.toCss(u.text),align:`center`,baseline:`middle`})}}return V.sort((e,t)=>e.index-t.index),{nodes:z,items:V,dim:.35,empty:!1}};exports.layoutSunburst=d,exports.resolveSunburstPath=s,exports.sunburstValues=u;
|
|
2
|
+
//# sourceMappingURL=sunburst.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sunburst.cjs","names":["uniqueKeys","sum","positive","emptyLayout","clamp","finite","TAU","font","relativeLuminance","ellipsize","textOn","upright","resolveWith","mix","readableFill","toCss","interpolate","require_color","require_overlay","require_labels","require_scene","MIN_RING","build","count","walk","keys","nodes","nd","t","parent","top","j","b","node","ch","hidden","data","focusOf","list","tree","found","name","path","next","resolveSunburstPath","o","deepest","d","view","total","depth","focus","a0","a1","f","p","siblings","s","below","levels","sunburstValues","visit","out","v","focusPath","layoutSunburst","shown","measureShown","shownTotal","target","w0","w1","cx","area","cy","R","R0","fit","ring","enter","start","angle","pad","corner","mode","labelFont","theme","dark","labels","items","colorOf","subtree","ancestors","label","span","thick","r1","r0","rm","m","full","measure","tangential","sag","chord","radial","useTangential","room","text","fill","color","parentColor","fracStart","place","from","sectors","f0","f1","rel","base","also","percent","rc","valueSize","css","nameFont","value","showValue","nameY","chevronY","valueFont","a"],"sources":["../../../../../charts/src/engine/shapes/sunburst.ts"],"sourcesContent":["// Sunburst layout: the hierarchy as concentric rings around a center circle.\n// Drilling into a node animates the angular window (the node's share of the\n// root) and the depth: its children open to the full circle while the\n// ancestors slide into the center. Labels follow the arc or the radius,\n// whichever fits.\n\nimport { mix, toCss, type Rgba } from \"../color\";\nimport { font } from \"../overlay\";\nimport { interpolate } from \"./labels\";\nimport {\n clamp,\n ellipsize,\n emptyLayout,\n finite,\n positive,\n readableFill,\n relativeLuminance,\n resolveWith,\n sum,\n TAU,\n textOn,\n uniqueKeys,\n upright,\n type LayoutContext,\n type LayoutResult,\n type ShapeItem,\n type ShapeNode,\n} from \"./scene\";\nimport type { SunburstChartOptions, TreemapNode } from \"./types\";\n\n/** Thinnest ring, in pixels (fewer levels are shown below) */\nconst MIN_RING = 18;\n\ninterface SNode {\n node: TreemapNode;\n key: string;\n path: string[];\n /** Index of the top-level ancestor (legend) */\n top: number;\n /** Depth-first index (hover `index`) */\n index: number;\n /** 1 for the top-level nodes */\n depth: number;\n target: number;\n parent: SNode | null;\n children: SNode[];\n}\n\n/** Tree with the target values; hidden top-level nodes count 0 */\nconst build = (\n data: readonly TreemapNode[],\n hidden: ReadonlySet<number>,\n): SNode[] => {\n let count = 0;\n const walk = (\n nodes: readonly TreemapNode[],\n parent: SNode | null,\n top: number,\n ): SNode[] => {\n const keys = uniqueKeys(nodes.map((nd) => nd.name));\n return nodes.map((node, j) => {\n const t = parent ? top : j;\n const b: SNode = {\n node,\n key: `${parent?.key ?? \"\"}/${keys[j]}`,\n path: [...(parent?.path ?? []), node.name],\n top: t,\n index: count++,\n depth: (parent?.depth ?? 0) + 1,\n target: 0,\n parent,\n children: [],\n };\n if (node.children?.length) {\n b.children = walk(node.children, b, t);\n b.target = sum(b.children.map((ch) => ch.target));\n } else b.target = hidden.has(t) ? 0 : positive(node.value);\n return b;\n });\n };\n return walk(data ?? [], null, 0);\n};\n\n/**\n * The deepest node of `path` that can be focused (a parent with a value),\n * `null` for the root\n */\nconst focusOf = (tree: SNode[], path: readonly string[]): SNode | null => {\n let list = tree;\n let found: SNode | null = null;\n for (const name of path) {\n const next = list.find(\n (b) => b.node.name === name && b.children.length && b.target > 0,\n );\n if (!next) break;\n found = next;\n list = next.children;\n }\n return found;\n};\n\n/** Valid part of a drill path (names from the root to a focusable parent) */\nexport const resolveSunburstPath = (\n o: SunburstChartOptions,\n path: readonly string[],\n hidden: ReadonlySet<number>,\n): string[] => focusOf(build(o.data, hidden), path)?.path ?? [];\n\nconst deepest = (list: readonly SNode[]): number =>\n list.reduce(\n (d, b) =>\n b.target > 0\n ? Math.max(d, b.children.length ? deepest(b.children) : b.depth)\n : d,\n 0,\n );\n\n/** Angular window of the focused node (shares of the root) and depths */\nconst view = (tree: SNode[], focus: SNode | null, levels?: number) => {\n const total = sum(tree.map((b) => b.target));\n const depth = focus ? focus.depth : 0;\n let a0 = 0;\n let a1 = 1;\n if (focus && total > 0) {\n // start: shares of the previous siblings of every ancestor\n let f = 0;\n for (let p: SNode | null = focus; p; p = p.parent) {\n const siblings: SNode[] = p.parent ? p.parent.children : tree;\n for (const s of siblings) {\n if (s === p) break;\n f += s.target;\n }\n }\n a0 = f / total;\n a1 = a0 + focus.target / total;\n }\n const below = Math.max(1, deepest(focus ? focus.children : tree) - depth);\n const wanted =\n typeof levels === \"number\" && levels >= 1 ? Math.floor(levels) : below;\n return { a0, a1, depth, levels: Math.min(wanted, below) };\n};\n\nexport const sunburstValues = (\n o: SunburstChartOptions,\n hidden: ReadonlySet<number>,\n focusPath: readonly string[],\n out: Map<string, number>,\n) => {\n const tree = build(o.data, hidden);\n const visit = (nodes: SNode[]) =>\n nodes.forEach((b) => {\n if (b.children.length) visit(b.children);\n else out.set(b.key, b.target);\n });\n visit(tree);\n const v = view(tree, focusOf(tree, focusPath), o.levels);\n out.set(\"@a0\", v.a0);\n out.set(\"@a1\", v.a1);\n out.set(\"@d\", v.depth);\n out.set(\"@levels\", v.levels);\n};\n\nexport const layoutSunburst = (\n o: SunburstChartOptions,\n c: LayoutContext,\n): LayoutResult => {\n const { theme, area, measure, hidden } = c;\n const tree = build(o.data, hidden);\n const total = sum(tree.map((b) => b.target));\n // displayed (animated) values\n const shown = new Map<SNode, number>();\n const measureShown = (b: SNode): number => {\n const v = b.children.length\n ? sum(b.children.map(measureShown))\n : Math.max(0, c.value(b.key, b.target));\n shown.set(b, v);\n return v;\n };\n const shownTotal = sum(tree.map(measureShown));\n if (total <= 0 && shownTotal <= 1e-9) return emptyLayout(c);\n\n const focus = focusOf(tree, c.focus);\n const target = view(tree, focus, o.levels);\n let w0 = c.value(\"@a0\", target.a0);\n let w1 = c.value(\"@a1\", target.a1);\n if (!(w1 - w0 > 1e-6)) {\n w0 = 0;\n w1 = 1;\n }\n const d = c.value(\"@d\", target.depth);\n const cx = area.x + area.width / 2;\n const cy = area.y + area.height / 2;\n const R = Math.max(4, Math.min(area.width, area.height) / 2 - 2);\n const R0 = R * clamp(finite(o.innerRadius, 0.26), 0, 0.8);\n const fit = Math.max(1, Math.floor((R - R0) / MIN_RING));\n const levels = Math.max(1, c.value(\"@levels\", target.levels));\n const ring = (R - R0) / Math.min(levels, fit);\n const enter = clamp(c.enter, 0, 1);\n const start = (finite(o.startAngle) * Math.PI) / 180 - Math.PI / 2;\n const angle = (f: number) =>\n start + clamp((f - w0) / (w1 - w0), 0, 1) * TAU * enter;\n const pad = Math.max(0, finite(o.padAngle, 1));\n const corner = Math.max(0, finite(o.cornerRadius, 2));\n const mode = o.labels ?? \"auto\";\n const labelFont = font(theme, 11);\n const dark = relativeLuminance(theme.background) < 0.2;\n\n const nodes: ShapeNode[] = [];\n const labels: ShapeNode[] = [];\n const items: ShapeItem[] = [];\n const colorOf = new Map<SNode, Rgba>();\n const subtree = (b: SNode): number[] => [\n b.index,\n ...b.children.flatMap(subtree),\n ];\n const ancestors = (b: SNode) => {\n const out: number[] = [];\n for (let p = b.parent; p; p = p.parent) out.push(p.index);\n return out;\n };\n\n const label = (\n name: string,\n a0: number,\n a1: number,\n r0: number,\n r1: number,\n fill: Rgba,\n b: SNode,\n also: number[],\n ) => {\n if (mode === \"none\") return;\n const span = a1 - a0;\n const thick = r1 - r0;\n const rm = (r0 + r1) / 2;\n const m = (a0 + a1) / 2;\n const size = 11;\n const full = measure(name, labelFont);\n // tangential: straight text across the middle of the sector, its sag kept in the ring\n let tangential = 0;\n if (mode !== \"radial\" && thick >= size + 4) {\n const sag = (thick - size) / 2 - 1;\n const chord = 2 * rm * Math.acos(clamp(1 - sag / rm, -1, 1));\n tangential = Math.max(0, Math.min(span * rm - 8, chord));\n }\n // radial: along the radius, the sector wide enough at its inner end\n let radial = 0;\n if (mode !== \"tangential\" && span * (r0 + 4) >= size + 2)\n radial = Math.max(0, thick - 10);\n const useTangential =\n tangential > 0 &&\n (full <= tangential || tangential >= radial || mode === \"tangential\");\n const room = useTangential ? tangential : radial;\n if (room <= 0) return;\n const text = ellipsize(name, room, labelFont, measure);\n if (!text || (text !== name && text.length < 4)) return;\n labels.push({\n kind: \"text\",\n x: cx + rm * Math.cos(m),\n y: cy + rm * Math.sin(m),\n text,\n font: labelFont,\n color: textOn(fill),\n align: \"center\",\n baseline: \"middle\",\n rotate: upright(useTangential ? m + Math.PI / 2 : m),\n hit: b.index,\n also,\n });\n };\n\n const visit = (list: SNode[], parentColor: Rgba | null) => {\n list.forEach((b, j) => {\n const color = parentColor\n ? b.node.color\n ? resolveWith(theme, b.node.color, parentColor)\n : mix(parentColor, theme.background, 0.14 + (j % 3) * 0.06)\n : c.color(b.node.color, b.top);\n colorOf.set(b, color);\n if (b.children.length) visit(b.children, color);\n });\n };\n visit(tree, null);\n\n // fractions from the displayed values\n const fracStart = new Map<SNode, number>();\n const place = (list: SNode[], from: number) => {\n let f = from;\n for (const b of list) {\n fracStart.set(b, f);\n if (b.children.length) place(b.children, f);\n f += (shown.get(b) ?? 0) / Math.max(1e-12, shownTotal);\n }\n };\n place(tree, 0);\n\n const sectors = (list: SNode[]) => {\n for (const b of list) {\n const v = shown.get(b) ?? 0;\n if (v <= 1e-9) continue;\n const f0 = fracStart.get(b) ?? 0;\n const f1 = f0 + v / Math.max(1e-12, shownTotal);\n const a0 = angle(f0);\n const a1 = angle(f1);\n const rel = b.depth - d;\n const r0 = Math.max(R0, R0 + (rel - 1) * ring);\n const r1 = Math.min(R, R0 + rel * ring);\n if (a1 - a0 > 1e-4 && r1 - r0 > 0.5) {\n const base = colorOf.get(b) ?? theme.primary;\n const fill = readableFill(\n dark ? mix(base, theme.background, 0.12) : base,\n 3,\n );\n const also = [...ancestors(b), ...subtree(b).slice(1)];\n nodes.push({\n kind: \"sector\",\n cx,\n cy,\n r0,\n r1,\n a0,\n a1,\n pad,\n corner,\n fill: toCss(fill),\n hit: b.index,\n also,\n });\n label(b.node.name, a0, a1, r0, r1, fill, b, also);\n if (b.target > 0) {\n const percent = total > 0 ? b.target / total : 0;\n const parent = b.parent?.target ?? 0;\n const rm = (r0 + r1) / 2;\n const m = (a0 + a1) / 2;\n items.push({\n index: b.index,\n name: b.node.name,\n value: b.target,\n percent,\n share: c.percent(percent),\n color: toCss(fill),\n path: b.path,\n x: cx + rm * Math.cos(m),\n y: cy + rm * Math.sin(m),\n rows: [\n { name: c.labels.value, value: c.format(b.target) },\n { name: c.labels.share, value: c.percent(percent) },\n ...(b.parent && parent > 0\n ? [\n {\n name: interpolate(c.labels.ofName, {\n name: b.parent.node.name,\n }),\n value: c.percent(b.target / parent),\n },\n ]\n : []),\n ],\n ...(b.children.length ? { drill: b.path } : {}),\n });\n }\n }\n if (b.children.length && r1 < R - 0.5) sectors(b.children);\n }\n };\n sectors(tree);\n nodes.push(...labels);\n\n // center: the focused node (click to go up) or the total\n const rc = R0 - 3;\n if (rc >= 14) {\n const valueSize = clamp(rc * 0.3, 12, 24);\n if (focus) {\n const base = colorOf.get(focus) ?? theme.primary;\n const fill = toCss(mix(base, theme.background, 0.84));\n const css = toCss(base);\n const also = focus.children.flatMap(subtree);\n nodes.push({\n kind: \"circle\",\n cx,\n cy,\n r: rc,\n fill,\n stroke: toCss(base, 0.5),\n lineWidth: 1,\n hit: focus.index,\n also,\n });\n const nameFont = font(theme, clamp(rc * 0.2, 11, 14), 600);\n const name = ellipsize(focus.node.name, rc * 1.6, nameFont, measure);\n const value = c.format(focus.target);\n const showValue = rc >= 30;\n const nameY = showValue ? cy - 2 : cy + 4;\n // chevron: \"go up\"\n const chevronY = nameY - (showValue ? 18 : 12);\n if (rc >= 24)\n nodes.push({\n kind: \"line\",\n points: [\n cx - 5,\n chevronY + 3,\n cx,\n chevronY - 2,\n cx + 5,\n chevronY + 3,\n ],\n color: toCss(theme.textMuted),\n width: 1.5,\n hit: focus.index,\n also,\n });\n if (name)\n nodes.push({\n kind: \"text\",\n x: cx,\n y: nameY,\n text: name,\n font: nameFont,\n color: toCss(theme.text),\n align: \"center\",\n baseline: \"middle\",\n hit: focus.index,\n also,\n });\n if (showValue)\n nodes.push({\n kind: \"text\",\n x: cx,\n y: cy + 16,\n text: ellipsize(value, rc * 1.6, font(theme, 12), measure),\n font: font(theme, 12),\n color: toCss(theme.textMuted),\n align: \"center\",\n baseline: \"middle\",\n hit: focus.index,\n also,\n });\n const percent = total > 0 ? focus.target / total : 0;\n items.push({\n index: focus.index,\n name: focus.node.name,\n value: focus.target,\n percent,\n share: c.percent(percent),\n color: css,\n path: focus.path,\n x: cx,\n y: cy,\n rows: [\n { name: c.labels.value, value: c.format(focus.target) },\n { name: c.labels.share, value: c.percent(percent) },\n ],\n drill: focus.path.slice(0, -1),\n });\n } else if (total > 0) {\n const valueFont = font(theme, valueSize, 600);\n const text = ellipsize(c.format(total), rc * 1.7, valueFont, measure);\n if (text)\n nodes.push({\n kind: \"text\",\n x: cx,\n y: cy,\n text,\n font: valueFont,\n color: toCss(theme.text),\n align: \"center\",\n baseline: \"middle\",\n });\n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/B,CAAE,QAAO,QAAO,IAAK,IAAM,MAAO,EAAM,CACjD"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { LayoutContext, LayoutResult } from './scene.cjs';
|
|
2
|
+
import { SunburstChartOptions } from './types.cjs';
|
|
3
|
+
/** Valid part of a drill path (names from the root to a focusable parent) */
|
|
4
|
+
export declare const resolveSunburstPath: (o: SunburstChartOptions, path: readonly string[], hidden: ReadonlySet<number>) => string[];
|
|
5
|
+
export declare const sunburstValues: (o: SunburstChartOptions, hidden: ReadonlySet<number>, focusPath: readonly string[], out: Map<string, number>) => void;
|
|
6
|
+
export declare const layoutSunburst: (o: SunburstChartOptions, c: LayoutContext) => LayoutResult;
|