minerva-design 1.2.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 +16 -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 +10 -2
- package/dist/charts/canvas.d.ts +10 -2
- package/dist/charts/core.cjs +1 -1
- package/dist/charts/core.d.cts +9 -3
- package/dist/charts/core.d.ts +9 -3
- package/dist/charts/core.js +19 -6
- 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 +161 -99
- package/dist/charts/engine/canvas.js.map +1 -1
- package/dist/charts/engine/chart.cjs +1 -2
- 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 +390 -349
- 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.d.cts +17 -0
- package/dist/charts/engine/color.d.ts +17 -0
- package/dist/charts/engine/color.js +27 -3
- package/dist/charts/engine/color.js.map +1 -1
- package/dist/charts/engine/controller.cjs +2 -2
- package/dist/charts/engine/controller.cjs.map +1 -1
- package/dist/charts/engine/controller.d.cts +17 -2
- package/dist/charts/engine/controller.d.ts +17 -2
- package/dist/charts/engine/controller.js +404 -280
- package/dist/charts/engine/controller.js.map +1 -1
- package/dist/charts/engine/curve.cjs +2 -0
- package/dist/charts/engine/curve.cjs.map +1 -0
- package/dist/charts/engine/curve.d.cts +15 -0
- package/dist/charts/engine/curve.d.ts +15 -0
- package/dist/charts/engine/curve.js +56 -0
- package/dist/charts/engine/curve.js.map +1 -0
- package/dist/charts/engine/data.cjs +1 -1
- package/dist/charts/engine/data.cjs.map +1 -1
- package/dist/charts/engine/data.d.cts +21 -2
- package/dist/charts/engine/data.d.ts +21 -2
- package/dist/charts/engine/data.js +117 -43
- package/dist/charts/engine/data.js.map +1 -1
- package/dist/charts/engine/dom.cjs +1 -1
- package/dist/charts/engine/dom.cjs.map +1 -1
- package/dist/charts/engine/dom.d.cts +5 -3
- package/dist/charts/engine/dom.d.ts +5 -3
- package/dist/charts/engine/dom.js +27 -22
- package/dist/charts/engine/dom.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 +290 -62
- 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 +68 -3
- package/dist/charts/engine/model.d.ts +68 -3
- package/dist/charts/engine/model.js +332 -108
- 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 -0
- package/dist/charts/engine/overlay.d.ts +18 -0
- package/dist/charts/engine/overlay.js +138 -102
- 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 +319 -5
- package/dist/charts/engine/presets.d.ts +319 -5
- package/dist/charts/engine/presets.js +463 -38
- package/dist/charts/engine/presets.js.map +1 -1
- package/dist/charts/engine/renderers/canvas2d.cjs +1 -1
- package/dist/charts/engine/renderers/canvas2d.cjs.map +1 -1
- package/dist/charts/engine/renderers/canvas2d.js +149 -111
- package/dist/charts/engine/renderers/canvas2d.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/range.cjs +1 -1
- package/dist/charts/engine/renderers/range.cjs.map +1 -1
- package/dist/charts/engine/renderers/range.js +4 -4
- package/dist/charts/engine/renderers/range.js.map +1 -1
- package/dist/charts/engine/renderers/shaders.cjs +180 -20
- package/dist/charts/engine/renderers/shaders.cjs.map +1 -1
- package/dist/charts/engine/renderers/shaders.d.cts +18 -2
- package/dist/charts/engine/renderers/shaders.d.ts +18 -2
- package/dist/charts/engine/renderers/shaders.js +176 -20
- package/dist/charts/engine/renderers/shaders.js.map +1 -1
- package/dist/charts/engine/renderers/types.cjs.map +1 -1
- package/dist/charts/engine/renderers/types.d.cts +11 -4
- package/dist/charts/engine/renderers/types.d.ts +11 -4
- package/dist/charts/engine/renderers/types.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 +62 -90
- package/dist/charts/engine/renderers/webgl2.js.map +1 -1
- package/dist/charts/engine/renderers/webgpu.cjs +1 -1
- package/dist/charts/engine/renderers/webgpu.cjs.map +1 -1
- package/dist/charts/engine/renderers/webgpu.js +18 -15
- package/dist/charts/engine/renderers/webgpu.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 +32 -9
- package/dist/charts/engine/scene.d.ts +32 -9
- package/dist/charts/engine/scene.js +363 -122
- 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 +2 -0
- package/dist/charts/engine/shapes/canvas.cjs.map +1 -0
- package/dist/charts/engine/shapes/canvas.d.cts +65 -0
- package/dist/charts/engine/shapes/canvas.d.ts +65 -0
- package/dist/charts/engine/shapes/canvas.js +168 -0
- package/dist/charts/engine/shapes/canvas.js.map +1 -0
- package/dist/charts/engine/shapes/chart.cjs +2 -0
- package/dist/charts/engine/shapes/chart.cjs.map +1 -0
- package/dist/charts/engine/shapes/chart.d.cts +7 -0
- package/dist/charts/engine/shapes/chart.d.ts +7 -0
- package/dist/charts/engine/shapes/chart.js +292 -0
- package/dist/charts/engine/shapes/chart.js.map +1 -0
- package/dist/charts/engine/shapes/draw.cjs +2 -0
- package/dist/charts/engine/shapes/draw.cjs.map +1 -0
- package/dist/charts/engine/shapes/draw.d.cts +22 -0
- package/dist/charts/engine/shapes/draw.d.ts +22 -0
- package/dist/charts/engine/shapes/draw.js +165 -0
- package/dist/charts/engine/shapes/draw.js.map +1 -0
- package/dist/charts/engine/shapes/funnel.cjs +2 -0
- package/dist/charts/engine/shapes/funnel.cjs.map +1 -0
- package/dist/charts/engine/shapes/funnel.d.cts +6 -0
- package/dist/charts/engine/shapes/funnel.d.ts +6 -0
- package/dist/charts/engine/shapes/funnel.js +149 -0
- package/dist/charts/engine/shapes/funnel.js.map +1 -0
- package/dist/charts/engine/shapes/gauge.cjs +2 -0
- package/dist/charts/engine/shapes/gauge.cjs.map +1 -0
- package/dist/charts/engine/shapes/gauge.d.cts +7 -0
- package/dist/charts/engine/shapes/gauge.d.ts +7 -0
- package/dist/charts/engine/shapes/gauge.js +210 -0
- package/dist/charts/engine/shapes/gauge.js.map +1 -0
- package/dist/charts/engine/shapes/hit.cjs +2 -0
- package/dist/charts/engine/shapes/hit.cjs.map +1 -0
- package/dist/charts/engine/shapes/hit.d.cts +30 -0
- package/dist/charts/engine/shapes/hit.d.ts +30 -0
- package/dist/charts/engine/shapes/hit.js +145 -0
- package/dist/charts/engine/shapes/hit.js.map +1 -0
- package/dist/charts/engine/shapes/index.d.cts +12 -0
- package/dist/charts/engine/shapes/index.d.ts +12 -0
- 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 +3 -0
- package/dist/charts/engine/shapes/layout.cjs.map +1 -0
- package/dist/charts/engine/shapes/layout.d.cts +93 -0
- package/dist/charts/engine/shapes/layout.d.ts +93 -0
- package/dist/charts/engine/shapes/layout.js +353 -0
- package/dist/charts/engine/shapes/layout.js.map +1 -0
- package/dist/charts/engine/shapes/pie.cjs +2 -0
- package/dist/charts/engine/shapes/pie.cjs.map +1 -0
- package/dist/charts/engine/shapes/pie.d.cts +20 -0
- package/dist/charts/engine/shapes/pie.d.ts +20 -0
- package/dist/charts/engine/shapes/pie.js +302 -0
- package/dist/charts/engine/shapes/pie.js.map +1 -0
- package/dist/charts/engine/shapes/radar.cjs +2 -0
- package/dist/charts/engine/shapes/radar.cjs.map +1 -0
- package/dist/charts/engine/shapes/radar.d.cts +8 -0
- package/dist/charts/engine/shapes/radar.d.ts +8 -0
- package/dist/charts/engine/shapes/radar.js +198 -0
- package/dist/charts/engine/shapes/radar.js.map +1 -0
- 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 +2 -0
- package/dist/charts/engine/shapes/runtime.cjs.map +1 -0
- package/dist/charts/engine/shapes/runtime.d.cts +36 -0
- package/dist/charts/engine/shapes/runtime.d.ts +36 -0
- package/dist/charts/engine/shapes/runtime.js +107 -0
- package/dist/charts/engine/shapes/runtime.js.map +1 -0
- 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 +2 -0
- package/dist/charts/engine/shapes/scene.cjs.map +1 -0
- package/dist/charts/engine/shapes/scene.d.cts +311 -0
- package/dist/charts/engine/shapes/scene.d.ts +311 -0
- package/dist/charts/engine/shapes/scene.js +125 -0
- package/dist/charts/engine/shapes/scene.js.map +1 -0
- 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 +2 -0
- package/dist/charts/engine/shapes/treemap.cjs.map +1 -0
- package/dist/charts/engine/shapes/treemap.d.cts +14 -0
- package/dist/charts/engine/shapes/treemap.d.ts +14 -0
- package/dist/charts/engine/shapes/treemap.js +213 -0
- package/dist/charts/engine/shapes/treemap.js.map +1 -0
- package/dist/charts/engine/shapes/types.d.cts +719 -0
- package/dist/charts/engine/shapes/types.d.ts +719 -0
- package/dist/charts/engine/signature.cjs +2 -0
- package/dist/charts/engine/signature.cjs.map +1 -0
- package/dist/charts/engine/signature.d.cts +9 -0
- package/dist/charts/engine/signature.d.ts +9 -0
- package/dist/charts/engine/signature.js +13 -0
- package/dist/charts/engine/signature.js.map +1 -0
- package/dist/charts/engine/theme.cjs +1 -1
- package/dist/charts/engine/theme.cjs.map +1 -1
- package/dist/charts/engine/theme.d.cts +10 -1
- package/dist/charts/engine/theme.d.ts +10 -1
- package/dist/charts/engine/theme.js +40 -16
- package/dist/charts/engine/theme.js.map +1 -1
- 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 +227 -15
- package/dist/charts/engine/types.d.ts +227 -15
- package/dist/charts/index.cjs +1 -1
- package/dist/charts/index.d.cts +7 -2
- package/dist/charts/index.d.ts +7 -2
- package/dist/charts/index.js +22 -8
- package/dist/charts/react/Chart.cjs +1 -1
- package/dist/charts/react/Chart.cjs.map +1 -1
- package/dist/charts/react/Chart.d.cts +11 -4
- package/dist/charts/react/Chart.d.ts +11 -4
- package/dist/charts/react/Chart.js +70 -47
- 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 +48 -2
- package/dist/charts/react/charts.d.ts +48 -2
- package/dist/charts/react/charts.js +371 -76
- 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 +2 -0
- package/dist/charts/react/shapes.cjs.map +1 -0
- package/dist/charts/react/shapes.d.cts +537 -0
- package/dist/charts/react/shapes.d.ts +537 -0
- package/dist/charts/react/shapes.js +429 -0
- package/dist/charts/react/shapes.js.map +1 -0
- 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 +200 -7
- package/dist/charts/react/types.d.ts +200 -7
- 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/color.cjs +1 -1
- package/dist/native/charts/src/engine/color.cjs.map +1 -1
- package/dist/native/charts/src/engine/color.js +12 -3
- package/dist/native/charts/src/engine/color.js.map +1 -1
- package/dist/native/charts/src/engine/controller.cjs +2 -2
- package/dist/native/charts/src/engine/controller.cjs.map +1 -1
- package/dist/native/charts/src/engine/controller.js +418 -294
- package/dist/native/charts/src/engine/controller.js.map +1 -1
- package/dist/native/charts/src/engine/curve.cjs +2 -0
- package/dist/native/charts/src/engine/curve.cjs.map +1 -0
- package/dist/native/charts/src/engine/curve.js +56 -0
- package/dist/native/charts/src/engine/curve.js.map +1 -0
- 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 +117 -43
- 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 +335 -111
- 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 +54 -31
- 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 +456 -34
- 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 +369 -128
- 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/theme.cjs.map +1 -1
- package/dist/native/charts/src/engine/theme.js.map +1 -1
- 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 +244 -215
- 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 +204 -100
- 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 +8032 -1891
- 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 +10 -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 +1428 -3732
- 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
package/dist/charts/canvas.d.cts
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
export { createCanvasChart, drawScene, type CanvasChartConfig, type CanvasChartInstance, type ChartCanvas, type ChartTouch, } from './engine/canvas.cjs';
|
|
2
2
|
export { createChartController, scenePrimitives, type ChartAreaPrimitive, type ChartBarPrimitive, type ChartController, type ChartControllerConfig, type ChartControllerEventMap, type ChartDotPrimitive, type ChartHoverLayout, type ChartLegendEntry, type ChartLegendLayout, type ChartLinePrimitive, type ChartPointerOptions, type ChartPrimitive, type ChartPrimitiveOptions, type ChartScene, type ChartTooltipLayout, } from './engine/controller.cjs';
|
|
3
|
-
export { formatCompact } from './engine/format.cjs';
|
|
4
|
-
export {
|
|
3
|
+
export { formatCompact, formatValue } from './engine/format.cjs';
|
|
4
|
+
export { chartAriaLabel } from './engine/labels.cjs';
|
|
5
|
+
export { drawPrimitives } from './engine/canvas.cjs';
|
|
6
|
+
export { lineOf as annotationLine, rectOf as annotationRect, textBox as annotationTextBox, } from './engine/overlay.cjs';
|
|
7
|
+
export { toData, toScreen } from './engine/layout.cjs';
|
|
8
|
+
export { binValues, boxplotData, boxplotStats, bubbleSeries, ganttSeries, histogramSeries, quantiles, waterfallSeries, type BinOptions, type BoxplotGroup, type BoxplotStats, type BoxplotStatsOptions, type BubbleOptions, type GanttOptions, type GanttSeries, type GanttTask, type HistogramBinning, type HistogramBins, type HistogramSeriesOptions, type WaterfallOptions, type WaterfallStep, boxplotSeries, rangeAreaSeries, areaSeries, barSeries, candlestickSeries, DEFAULT_QUADRANT_COLORS, heatmapChartOptions, lineSeries, quadrantCenter, quadrantChartOptions, quadrantOf, scatterSeries, sparklineOptions, withSeriesType, type LineSeriesOptions, type HeatmapCell, type HeatmapConfig, type QuadrantAxisLabels, type QuadrantConfig, type QuadrantCorner, type QuadrantPoint, type QuadrantRegion, type QuadrantRegions, type SparklineConfig, } from './engine/presets.cjs';
|
|
5
9
|
export { toCss } from './engine/color.cjs';
|
|
6
10
|
export type { ChartThemeInput } from './engine/theme.cjs';
|
|
7
11
|
export type * from './engine/types.cjs';
|
|
12
|
+
export { createCanvasShapeChart, type CanvasShapeChartConfig, type CanvasShapeChartInstance, } from './engine/shapes/canvas.cjs';
|
|
13
|
+
export { drawShapeScene } from './engine/shapes/draw.cjs';
|
|
14
|
+
export { calendarStrips } from './engine/shapes/calendar.cjs';
|
|
15
|
+
export type * from './engine/shapes/types.cjs';
|
package/dist/charts/canvas.d.ts
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
export { createCanvasChart, drawScene, type CanvasChartConfig, type CanvasChartInstance, type ChartCanvas, type ChartTouch, } from './engine/canvas.js';
|
|
2
2
|
export { createChartController, scenePrimitives, type ChartAreaPrimitive, type ChartBarPrimitive, type ChartController, type ChartControllerConfig, type ChartControllerEventMap, type ChartDotPrimitive, type ChartHoverLayout, type ChartLegendEntry, type ChartLegendLayout, type ChartLinePrimitive, type ChartPointerOptions, type ChartPrimitive, type ChartPrimitiveOptions, type ChartScene, type ChartTooltipLayout, } from './engine/controller.js';
|
|
3
|
-
export { formatCompact } from './engine/format.js';
|
|
4
|
-
export {
|
|
3
|
+
export { formatCompact, formatValue } from './engine/format.js';
|
|
4
|
+
export { chartAriaLabel } from './engine/labels.js';
|
|
5
|
+
export { drawPrimitives } from './engine/canvas.js';
|
|
6
|
+
export { lineOf as annotationLine, rectOf as annotationRect, textBox as annotationTextBox, } from './engine/overlay.js';
|
|
7
|
+
export { toData, toScreen } from './engine/layout.js';
|
|
8
|
+
export { binValues, boxplotData, boxplotStats, bubbleSeries, ganttSeries, histogramSeries, quantiles, waterfallSeries, type BinOptions, type BoxplotGroup, type BoxplotStats, type BoxplotStatsOptions, type BubbleOptions, type GanttOptions, type GanttSeries, type GanttTask, type HistogramBinning, type HistogramBins, type HistogramSeriesOptions, type WaterfallOptions, type WaterfallStep, boxplotSeries, rangeAreaSeries, areaSeries, barSeries, candlestickSeries, DEFAULT_QUADRANT_COLORS, heatmapChartOptions, lineSeries, quadrantCenter, quadrantChartOptions, quadrantOf, scatterSeries, sparklineOptions, withSeriesType, type LineSeriesOptions, type HeatmapCell, type HeatmapConfig, type QuadrantAxisLabels, type QuadrantConfig, type QuadrantCorner, type QuadrantPoint, type QuadrantRegion, type QuadrantRegions, type SparklineConfig, } from './engine/presets.js';
|
|
5
9
|
export { toCss } from './engine/color.js';
|
|
6
10
|
export type { ChartThemeInput } from './engine/theme.js';
|
|
7
11
|
export type * from './engine/types.js';
|
|
12
|
+
export { createCanvasShapeChart, type CanvasShapeChartConfig, type CanvasShapeChartInstance, } from './engine/shapes/canvas.js';
|
|
13
|
+
export { drawShapeScene } from './engine/shapes/draw.js';
|
|
14
|
+
export { calendarStrips } from './engine/shapes/calendar.js';
|
|
15
|
+
export type * from './engine/shapes/types.js';
|
package/dist/charts/core.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./engine/format.cjs"),t=require("./engine/chart.cjs"),n=require("./engine/presets.cjs"),r=require("./engine/
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./engine/format.cjs"),t=require("./engine/chart.cjs"),n=require("./engine/presets.cjs"),r=require("./engine/shapes/chart.cjs"),i=require("./engine/trading/indicators.cjs"),a=require("./engine/trading/chart.cjs"),o=require("./engine/orderbook/book.cjs"),s=require("./engine/orderbook/depth.cjs"),c=require("./engine/orderbook/heatmap.cjs"),l=require("./engine/orderbook/ladder.cjs"),u=require("./engine/orderbook/tape.cjs"),d=require("./engine/three-d/chart.cjs"),f=require("./engine/shapes/canvas.cjs"),p=require("./engine/controller.cjs"),m=require("./engine/canvas.cjs");require("./engine/trading/index.cjs"),require("./engine/orderbook/index.cjs"),require("./engine/three-d/index.cjs"),exports.areaSeries=n.areaSeries,exports.atr=i.atr,exports.barSeries=n.barSeries,exports.binValues=n.binValues,exports.bollinger=i.bollinger,exports.boxplotData=n.boxplotData,exports.boxplotSeries=n.boxplotSeries,exports.boxplotStats=n.boxplotStats,exports.bubbleSeries=n.bubbleSeries,exports.candlestickSeries=n.candlestickSeries,exports.createCanvasChart=m.createCanvasChart,exports.createCanvasShapeChart=f.createCanvasShapeChart,exports.createChart=t.createChart,exports.createChart3D=d.createChart3D,exports.createChartController=p.createChartController,exports.createDepthChart=s.createDepthChart,exports.createOrderBook=l.createOrderBook,exports.createOrderBookHeatmap=c.createOrderBookHeatmap,exports.createOrderBookStore=o.createOrderBookStore,exports.createShapeChart=r.createShapeChart,exports.createTimeAndSales=u.createTimeAndSales,exports.createTradingChart=a.createTradingChart,exports.ema=i.ema,exports.formatCompact=e.formatCompact,exports.formatValue=e.formatValue,exports.ganttSeries=n.ganttSeries,exports.heatmapChartOptions=n.heatmapChartOptions,exports.heikinAshi=i.heikinAshi,exports.histogramSeries=n.histogramSeries,exports.kdj=i.kdj,exports.lineSeries=n.lineSeries,exports.macd=i.macd,exports.quadrantCenter=n.quadrantCenter,exports.quadrantChartOptions=n.quadrantChartOptions,exports.quadrantOf=n.quadrantOf,exports.quantiles=n.quantiles,exports.rangeAreaSeries=n.rangeAreaSeries,exports.resampleBars=i.resampleBars,exports.rsi=i.rsi,exports.scatterSeries=n.scatterSeries,exports.scenePrimitives=p.scenePrimitives,exports.sma=i.sma,exports.sparklineOptions=n.sparklineOptions,exports.vwap=i.vwap,exports.waterfallSeries=n.waterfallSeries,exports.withSeriesType=n.withSeriesType,exports.wma=i.wma;
|
package/dist/charts/core.d.cts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
export { createChart } from './engine/chart.cjs';
|
|
2
|
+
export { createShapeChart } from './engine/shapes/chart.cjs';
|
|
3
|
+
export { createCanvasShapeChart, type CanvasShapeChartConfig, type CanvasShapeChartInstance, } from './engine/shapes/canvas.cjs';
|
|
4
|
+
export type { BulletChartOptions, BulletDatum, CalendarDate, CalendarDatum, CalendarHeatmapOptions, FunnelChartOptions, GaugeBand, GaugeChartOptions, PieChartOptions, RadarChartOptions, RadarIndicator, RadarSeries, RadialBarChartOptions, RadialBarDatum, SankeyChartOptions, SankeyLink, SankeyNode, ShapeChartCommonOptions, ShapeChartEventMap, ShapeChartInstance, ShapeChartLabels, ShapeChartOptions, ShapeChartType, ShapeDatum, ShapeDrillEvent, ShapeHoverEvent, ShapeLegendOptions, ShapeTooltipOptions, ShapeToggleEvent, SunburstChartOptions, TreemapChartOptions, TreemapNode, } from './engine/shapes/types.cjs';
|
|
2
5
|
export { createCanvasChart, type CanvasChartConfig, type CanvasChartInstance, type ChartCanvas, type ChartTouch, } from './engine/canvas.cjs';
|
|
3
6
|
export { createChartController, scenePrimitives, type ChartAreaPrimitive, type ChartBarPrimitive, type ChartController, type ChartControllerConfig, type ChartControllerEventMap, type ChartDotPrimitive, type ChartHoverLayout, type ChartLegendEntry, type ChartLegendLayout, type ChartLinePrimitive, type ChartPointerOptions, type ChartPrimitive, type ChartPrimitiveOptions, type ChartScene, type ChartTooltipLayout, } from './engine/controller.cjs';
|
|
4
|
-
export { formatCompact } from './engine/format.cjs';
|
|
5
|
-
export
|
|
7
|
+
export { formatCompact, formatValue } from './engine/format.cjs';
|
|
8
|
+
export * from './engine/trading/index.cjs';
|
|
9
|
+
export * from './engine/orderbook/index.cjs';
|
|
10
|
+
export * from './engine/three-d/index.cjs';
|
|
11
|
+
export { areaSeries, barSeries, binValues, boxplotData, boxplotSeries, boxplotStats, bubbleSeries, candlestickSeries, ganttSeries, histogramSeries, lineSeries, quantiles, rangeAreaSeries, scatterSeries, waterfallSeries, withSeriesType, type LineSeriesOptions, type BinOptions, type BoxplotGroup, type BoxplotStats, type BoxplotStatsOptions, type BubbleOptions, type GanttOptions, type GanttSeries, type GanttTask, type HistogramBinning, type HistogramBins, type HistogramSeriesOptions, type WaterfallOptions, type WaterfallStep, heatmapChartOptions, quadrantCenter, quadrantChartOptions, quadrantOf, sparklineOptions, type HeatmapCell, type HeatmapConfig, type QuadrantAxisLabels, type QuadrantConfig, type QuadrantCorner, type QuadrantPoint, type QuadrantRegion, type QuadrantRegions, type SparklineConfig, } from './engine/presets.cjs';
|
|
6
12
|
export type { ChartThemeInput } from './engine/theme.cjs';
|
|
7
|
-
export type { ChartAnnotation, ChartAxisOptions, ChartAxisType, ChartColumnData, ChartDragEvent, ChartEventMap, ChartHoverEvent, ChartHoverItem, ChartInstance, ChartInteractionOptions, ChartLabelPosition, ChartLegendOptions, ChartLineAnnotation, ChartOptions, ChartPadding, ChartPlotClickEvent, ChartPointDatum, ChartRect, ChartRectAnnotation, ChartRendererKind, ChartRendererPreference, ChartSeries, ChartSeriesData, ChartSeriesType, ChartTextAnnotation, ChartTooltipOptions, ChartView, ChartXValue, } from './engine/types.cjs';
|
|
13
|
+
export type { ChartAnnotation, ChartAxisOptions, ChartAxisType, ChartColumnData, ChartCurve, ChartDragEvent, ChartEventMap, ChartHoverEvent, ChartHoverItem, ChartInstance, ChartInteractionOptions, ChartLabelPosition, ChartLabels, ChartLegendOptions, ChartLineAnnotation, ChartOptions, ChartOrientation, ChartPadding, ChartPlotClickEvent, ChartPointDatum, ChartRect, ChartRectAnnotation, ChartRendererKind, ChartRendererPreference, ChartSeries, ChartSeriesData, ChartSeriesType, ChartTextAnnotation, ChartTimeZone, ChartTooltipLabels, ChartTooltipOptions, ChartView, ChartXValue, } from './engine/types.cjs';
|
package/dist/charts/core.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
export { createChart } from './engine/chart.js';
|
|
2
|
+
export { createShapeChart } from './engine/shapes/chart.js';
|
|
3
|
+
export { createCanvasShapeChart, type CanvasShapeChartConfig, type CanvasShapeChartInstance, } from './engine/shapes/canvas.js';
|
|
4
|
+
export type { BulletChartOptions, BulletDatum, CalendarDate, CalendarDatum, CalendarHeatmapOptions, FunnelChartOptions, GaugeBand, GaugeChartOptions, PieChartOptions, RadarChartOptions, RadarIndicator, RadarSeries, RadialBarChartOptions, RadialBarDatum, SankeyChartOptions, SankeyLink, SankeyNode, ShapeChartCommonOptions, ShapeChartEventMap, ShapeChartInstance, ShapeChartLabels, ShapeChartOptions, ShapeChartType, ShapeDatum, ShapeDrillEvent, ShapeHoverEvent, ShapeLegendOptions, ShapeTooltipOptions, ShapeToggleEvent, SunburstChartOptions, TreemapChartOptions, TreemapNode, } from './engine/shapes/types.js';
|
|
2
5
|
export { createCanvasChart, type CanvasChartConfig, type CanvasChartInstance, type ChartCanvas, type ChartTouch, } from './engine/canvas.js';
|
|
3
6
|
export { createChartController, scenePrimitives, type ChartAreaPrimitive, type ChartBarPrimitive, type ChartController, type ChartControllerConfig, type ChartControllerEventMap, type ChartDotPrimitive, type ChartHoverLayout, type ChartLegendEntry, type ChartLegendLayout, type ChartLinePrimitive, type ChartPointerOptions, type ChartPrimitive, type ChartPrimitiveOptions, type ChartScene, type ChartTooltipLayout, } from './engine/controller.js';
|
|
4
|
-
export { formatCompact } from './engine/format.js';
|
|
5
|
-
export
|
|
7
|
+
export { formatCompact, formatValue } from './engine/format.js';
|
|
8
|
+
export * from './engine/trading/index.js';
|
|
9
|
+
export * from './engine/orderbook/index.js';
|
|
10
|
+
export * from './engine/three-d/index.js';
|
|
11
|
+
export { areaSeries, barSeries, binValues, boxplotData, boxplotSeries, boxplotStats, bubbleSeries, candlestickSeries, ganttSeries, histogramSeries, lineSeries, quantiles, rangeAreaSeries, scatterSeries, waterfallSeries, withSeriesType, type LineSeriesOptions, type BinOptions, type BoxplotGroup, type BoxplotStats, type BoxplotStatsOptions, type BubbleOptions, type GanttOptions, type GanttSeries, type GanttTask, type HistogramBinning, type HistogramBins, type HistogramSeriesOptions, type WaterfallOptions, type WaterfallStep, heatmapChartOptions, quadrantCenter, quadrantChartOptions, quadrantOf, sparklineOptions, type HeatmapCell, type HeatmapConfig, type QuadrantAxisLabels, type QuadrantConfig, type QuadrantCorner, type QuadrantPoint, type QuadrantRegion, type QuadrantRegions, type SparklineConfig, } from './engine/presets.js';
|
|
6
12
|
export type { ChartThemeInput } from './engine/theme.js';
|
|
7
|
-
export type { ChartAnnotation, ChartAxisOptions, ChartAxisType, ChartColumnData, ChartDragEvent, ChartEventMap, ChartHoverEvent, ChartHoverItem, ChartInstance, ChartInteractionOptions, ChartLabelPosition, ChartLegendOptions, ChartLineAnnotation, ChartOptions, ChartPadding, ChartPlotClickEvent, ChartPointDatum, ChartRect, ChartRectAnnotation, ChartRendererKind, ChartRendererPreference, ChartSeries, ChartSeriesData, ChartSeriesType, ChartTextAnnotation, ChartTooltipOptions, ChartView, ChartXValue, } from './engine/types.js';
|
|
13
|
+
export type { ChartAnnotation, ChartAxisOptions, ChartAxisType, ChartColumnData, ChartCurve, ChartDragEvent, ChartEventMap, ChartHoverEvent, ChartHoverItem, ChartInstance, ChartInteractionOptions, ChartLabelPosition, ChartLabels, ChartLegendOptions, ChartLineAnnotation, ChartOptions, ChartOrientation, ChartPadding, ChartPlotClickEvent, ChartPointDatum, ChartRect, ChartRectAnnotation, ChartRendererKind, ChartRendererPreference, ChartSeries, ChartSeriesData, ChartSeriesType, ChartTextAnnotation, ChartTimeZone, ChartTooltipLabels, ChartTooltipOptions, ChartView, ChartXValue, } from './engine/types.js';
|
package/dist/charts/core.js
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
import { formatCompact as e } from "./engine/format.js";
|
|
2
|
-
import { createChart as
|
|
3
|
-
import { quadrantCenter as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { formatCompact as e, formatValue as t } from "./engine/format.js";
|
|
2
|
+
import { createChart as n } from "./engine/chart.js";
|
|
3
|
+
import { areaSeries as r, barSeries as i, binValues as a, boxplotData as o, boxplotSeries as s, boxplotStats as c, bubbleSeries as l, candlestickSeries as u, ganttSeries as d, heatmapChartOptions as f, histogramSeries as p, lineSeries as m, quadrantCenter as h, quadrantChartOptions as g, quadrantOf as _, quantiles as v, rangeAreaSeries as y, scatterSeries as b, sparklineOptions as x, waterfallSeries as S, withSeriesType as C } from "./engine/presets.js";
|
|
4
|
+
import { createShapeChart as w } from "./engine/shapes/chart.js";
|
|
5
|
+
import { atr as T, bollinger as E, ema as D, heikinAshi as O, kdj as k, macd as A, resampleBars as j, rsi as M, sma as N, vwap as P, wma as F } from "./engine/trading/indicators.js";
|
|
6
|
+
import { createTradingChart as I } from "./engine/trading/chart.js";
|
|
7
|
+
import { createOrderBookStore as L } from "./engine/orderbook/book.js";
|
|
8
|
+
import { createDepthChart as R } from "./engine/orderbook/depth.js";
|
|
9
|
+
import { createOrderBookHeatmap as z } from "./engine/orderbook/heatmap.js";
|
|
10
|
+
import { createOrderBook as B } from "./engine/orderbook/ladder.js";
|
|
11
|
+
import { createTimeAndSales as V } from "./engine/orderbook/tape.js";
|
|
12
|
+
import { createChart3D as H } from "./engine/three-d/chart.js";
|
|
13
|
+
import { createCanvasShapeChart as U } from "./engine/shapes/canvas.js";
|
|
14
|
+
import { createChartController as W, scenePrimitives as G } from "./engine/controller.js";
|
|
15
|
+
import { createCanvasChart as K } from "./engine/canvas.js";
|
|
16
|
+
import "./engine/trading/index.js";
|
|
17
|
+
import "./engine/orderbook/index.js";
|
|
18
|
+
import "./engine/three-d/index.js";
|
|
19
|
+
export { r as areaSeries, T as atr, i as barSeries, a as binValues, E as bollinger, o as boxplotData, s as boxplotSeries, c as boxplotStats, l as bubbleSeries, u as candlestickSeries, K as createCanvasChart, U as createCanvasShapeChart, n as createChart, H as createChart3D, W as createChartController, R as createDepthChart, B as createOrderBook, z as createOrderBookHeatmap, L as createOrderBookStore, w as createShapeChart, V as createTimeAndSales, I as createTradingChart, D as ema, e as formatCompact, t as formatValue, d as ganttSeries, f as heatmapChartOptions, O as heikinAshi, p as histogramSeries, k as kdj, m as lineSeries, A as macd, h as quadrantCenter, g as quadrantChartOptions, _ as quadrantOf, v as quantiles, y as rangeAreaSeries, j as resampleBars, M as rsi, b as scatterSeries, G as scenePrimitives, N as sma, x as sparklineOptions, P as vwap, S as waterfallSeries, C as withSeriesType, F as wma };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./scale.cjs"),t=require("./format.cjs"),n=require("./time.cjs");var r=(r,i,a)=>{let[o,s]=i[0]<=i[1]?i:[i[1],i[0]];if(r.type===`category`){let e=r.categories.length,t=Math.max(0,Math.ceil(o-1e-9)),n=Math.min(e-1,Math.floor(s+1e-9)),i=Math.max(0,n-t+1),c=Math.max(1,Math.ceil(i/Math.max(1,a))),l=[];for(let e=t-t%c;e<=n;e+=c)e>=t&&l.push(e);let u=e=>{let t=Math.round(e);return r.format?r.format(t):r.categories[t]??String(t)};return{values:l,labels:l.map(u),formatValue:u}}if(r.type===`time`){let
|
|
1
|
+
const e=require("./scale.cjs"),t=require("./format.cjs"),n=require("./time.cjs");var r=(r,i,a)=>{let[o,s]=i[0]<=i[1]?i:[i[1],i[0]];if(r.type===`category`){let e=r.categories.length,t=Math.max(0,Math.ceil(o-1e-9)),n=Math.min(e-1,Math.floor(s+1e-9)),i=Math.max(0,n-t+1),c=Math.max(1,Math.ceil(i/Math.max(1,a))),l=[];for(let e=t-t%c;e<=n;e+=c)e>=t&&l.push(e);let u=e=>{let t=Math.round(e);return r.format?r.format(t):r.categories[t]??String(t)};return{values:l,labels:l.map(u),formatValue:u}}if(r.type===`time`){let{locale:e,timeZone:t=`local`}=r,i=n.timeTicks(o,s,a,e,t),c=i.unit===`day`||i.unit===`month`||i.unit===`year`?`day`:i.unit,l=r.format??(r=>n.formatTime(r,c,e,t));return{values:i.values,labels:i.values.map(r.format??i.format),formatValue:l}}let c=e.linearTicks(o,s,a),l=e.tickStep(o,s,a),u=r.format??t.tickFormatter(l,Math.max(Math.abs(o),Math.abs(s)),r.locale);return{values:c,labels:c.map(u),formatValue:r.format??(e=>t.formatValue(e,r.locale))}};exports.axisTicks=r;
|
|
2
2
|
//# sourceMappingURL=axis.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axis.cjs","names":["timeTicks","formatTime","linearTicks","tickStep","tickFormatter","formatValue","require_scale","require_format","require_time","axisTicks","min","max","range","axis","n","first","last","visible","step","count","values","i","name","v","ticks","unit","full","tick"],"sources":["../../../../charts/src/engine/axis.ts"],"sourcesContent":["// Ticks and value labels of an axis for its visible range.\n\nimport { formatValue, tickFormatter } from \"./format\";\nimport type { AxisModel } from \"./model\";\nimport { linearTicks, tickStep } from \"./scale\";\nimport { formatTime, timeTicks, type TimeUnit } from \"./time\";\nimport type { Range } from \"./viewport\";\n\nexport interface AxisTicks {\n values: number[];\n labels: string[];\n /** Full label of any value (tooltips) */\n formatValue: (value: number) => string;\n}\n\n/**\n * @param count approximate number of ticks (numeric / time axes) or the\n * maximum number of labels (category axes)\n */\nexport const axisTicks = (\n axis: AxisModel,\n range: Range,\n count: number,\n): AxisTicks => {\n const [min, max] = range[0] <= range[1] ? range : [range[1], range[0]];\n if (axis.type === \"category\") {\n const n = axis.categories.length;\n const first = Math.max(0, Math.ceil(min - 1e-9));\n const last = Math.min(n - 1, Math.floor(max + 1e-9));\n const visible = Math.max(0, last - first + 1);\n const step = Math.max(1, Math.ceil(visible / Math.max(1, count)));\n const values: number[] = [];\n for (let i = first - (first % step); i <= last; i += step) {\n if (i >= first) values.push(i);\n }\n const name = (v: number) => {\n const i = Math.round(v);\n return axis.format ? axis.format(i) : (axis.categories[i] ?? String(i));\n };\n return { values, labels: values.map(name), formatValue: name };\n }\n if (axis.type === \"time\") {\n const ticks = timeTicks(min, max, count);\n const unit: TimeUnit =\n ticks.unit === \"day\" || ticks.unit === \"month\" || ticks.unit === \"year\"\n ? \"day\"\n : ticks.unit;\n const full
|
|
1
|
+
{"version":3,"file":"axis.cjs","names":["timeTicks","formatTime","linearTicks","tickStep","tickFormatter","formatValue","require_scale","require_format","require_time","axisTicks","min","max","range","axis","n","first","last","visible","step","count","values","i","name","v","ticks","locale","timeZone","unit","full","tick","value"],"sources":["../../../../charts/src/engine/axis.ts"],"sourcesContent":["// Ticks and value labels of an axis for its visible range.\n\nimport { formatValue, tickFormatter } from \"./format\";\nimport type { AxisModel } from \"./model\";\nimport { linearTicks, tickStep } from \"./scale\";\nimport { formatTime, timeTicks, type TimeUnit } from \"./time\";\nimport type { Range } from \"./viewport\";\n\nexport interface AxisTicks {\n values: number[];\n labels: string[];\n /** Full label of any value (tooltips) */\n formatValue: (value: number) => string;\n}\n\n/**\n * @param count approximate number of ticks (numeric / time axes) or the\n * maximum number of labels (category axes)\n */\nexport const axisTicks = (\n axis: AxisModel,\n range: Range,\n count: number,\n): AxisTicks => {\n const [min, max] = range[0] <= range[1] ? range : [range[1], range[0]];\n if (axis.type === \"category\") {\n const n = axis.categories.length;\n const first = Math.max(0, Math.ceil(min - 1e-9));\n const last = Math.min(n - 1, Math.floor(max + 1e-9));\n const visible = Math.max(0, last - first + 1);\n const step = Math.max(1, Math.ceil(visible / Math.max(1, count)));\n const values: number[] = [];\n for (let i = first - (first % step); i <= last; i += step) {\n if (i >= first) values.push(i);\n }\n const name = (v: number) => {\n const i = Math.round(v);\n return axis.format ? axis.format(i) : (axis.categories[i] ?? String(i));\n };\n return { values, labels: values.map(name), formatValue: name };\n }\n if (axis.type === \"time\") {\n const { locale, timeZone = \"local\" } = axis;\n const ticks = timeTicks(min, max, count, locale, timeZone);\n const unit: TimeUnit =\n ticks.unit === \"day\" || ticks.unit === \"month\" || ticks.unit === \"year\"\n ? \"day\"\n : ticks.unit;\n const full =\n axis.format ?? ((v: number) => formatTime(v, unit, locale, timeZone));\n return {\n values: ticks.values,\n labels: ticks.values.map(axis.format ?? ticks.format),\n formatValue: full,\n };\n }\n const values = linearTicks(min, max, count);\n const step = tickStep(min, max, count);\n const tick =\n axis.format ??\n tickFormatter(step, Math.max(Math.abs(min), Math.abs(max)), axis.locale);\n return {\n values,\n labels: values.map(tick),\n formatValue:\n axis.format ?? ((value: number) => formatValue(value, axis.locale)),\n };\n};\n"],"mappings":"iFAmBA,IAAaS,GACX,EACA,EACA,IACc,CACd,GAAM,CAACC,EAAKC,GAAOC,EAAM,IAAMA,EAAM,GAAKA,EAAQ,CAACA,EAAM,GAAIA,EAAM,EAAE,EACrE,GAAIC,EAAK,OAAS,WAAY,CAC5B,IAAMC,EAAID,EAAK,WAAW,OACpBE,EAAQ,KAAK,IAAI,EAAG,KAAK,KAAKL,EAAM,IAAI,CAAC,EACzCM,EAAO,KAAK,IAAIF,EAAI,EAAG,KAAK,MAAMH,EAAM,IAAI,CAAC,EAC7CM,EAAU,KAAK,IAAI,EAAGD,EAAOD,EAAQ,CAAC,EACtCG,EAAO,KAAK,IAAI,EAAG,KAAK,KAAKD,EAAU,KAAK,IAAI,EAAGE,CAAK,CAAC,CAAC,EAC1DC,EAAmB,CAAC,EAC1B,IAAK,IAAIC,EAAIN,EAASA,EAAQG,EAAOG,GAAKL,EAAM,GAAKE,EAC/CG,GAAKN,GAAOK,EAAO,KAAKC,CAAC,EAE/B,IAAMC,EAAQ,GAAc,CAC1B,IAAMD,EAAI,KAAK,MAAME,CAAC,EACtB,OAAOV,EAAK,OAASA,EAAK,OAAOQ,CAAC,EAAKR,EAAK,WAAWQ,IAAM,OAAOA,CAAC,CACvE,EACA,MAAO,CAAE,SAAQ,OAAQD,EAAO,IAAIE,CAAI,EAAG,YAAaA,CAAK,CAC/D,CACA,GAAIT,EAAK,OAAS,OAAQ,CACxB,GAAM,CAAE,SAAQ,WAAW,SAAYA,EACjCW,EAAQxB,EAAAA,UAAUU,EAAKC,EAAKQ,EAAOM,EAAQC,CAAQ,EACnDC,EACJH,EAAM,OAAS,OAASA,EAAM,OAAS,SAAWA,EAAM,OAAS,OAC7D,MACAA,EAAM,KACNI,EACJf,EAAK,SAAY,GAAcZ,EAAAA,WAAWsB,EAAGI,EAAMF,EAAQC,CAAQ,GACrE,MAAO,CACL,OAAQF,EAAM,OACd,OAAQA,EAAM,OAAO,IAAIX,EAAK,QAAUW,EAAM,MAAM,EACpD,YAAaI,CACf,CACF,CACA,IAAMR,EAASlB,EAAAA,YAAYQ,EAAKC,EAAKQ,CAAK,EACpCD,EAAOf,EAAAA,SAASO,EAAKC,EAAKQ,CAAK,EAC/BU,EACJhB,EAAK,QACLT,EAAAA,cAAcc,EAAM,KAAK,IAAI,KAAK,IAAIR,CAAG,EAAG,KAAK,IAAIC,CAAG,CAAC,EAAGE,EAAK,MAAM,EACzE,MAAO,CACL,SACA,OAAQO,EAAO,IAAIS,CAAI,EACvB,YACEhB,EAAK,SAAY,GAAkBR,EAAAA,YAAYyB,EAAOjB,EAAK,MAAM,EACrE,CACF"}
|
|
@@ -18,18 +18,18 @@ var o = (o, s, c) => {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
if (o.type === "time") {
|
|
21
|
-
let e = a(l, u, c
|
|
21
|
+
let { locale: e, timeZone: t = "local" } = o, n = a(l, u, c, e, t), r = n.unit === "day" || n.unit === "month" || n.unit === "year" ? "day" : n.unit, s = o.format ?? ((n) => i(n, r, e, t));
|
|
22
22
|
return {
|
|
23
|
-
values:
|
|
24
|
-
labels:
|
|
25
|
-
formatValue:
|
|
23
|
+
values: n.values,
|
|
24
|
+
labels: n.values.map(o.format ?? n.format),
|
|
25
|
+
formatValue: s
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
let d = e(l, u, c), f = t(l, u, c), p = o.format ?? r(f, Math.max(Math.abs(l), Math.abs(u)));
|
|
28
|
+
let d = e(l, u, c), f = t(l, u, c), p = o.format ?? r(f, Math.max(Math.abs(l), Math.abs(u)), o.locale);
|
|
29
29
|
return {
|
|
30
30
|
values: d,
|
|
31
31
|
labels: d.map(p),
|
|
32
|
-
formatValue: o.format ?? n
|
|
32
|
+
formatValue: o.format ?? ((e) => n(e, o.locale))
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
35
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axis.js","names":["axisTicks","min","max","range","axis","n","first","last","visible","step","count","values","i","name","v","ticks","timeTicks","unit","full","formatTime","linearTicks","tickStep","tick","tickFormatter","formatValue"],"sources":["../../../../charts/src/engine/axis.ts"],"sourcesContent":["// Ticks and value labels of an axis for its visible range.\n\nimport { formatValue, tickFormatter } from \"./format\";\nimport type { AxisModel } from \"./model\";\nimport { linearTicks, tickStep } from \"./scale\";\nimport { formatTime, timeTicks, type TimeUnit } from \"./time\";\nimport type { Range } from \"./viewport\";\n\nexport interface AxisTicks {\n values: number[];\n labels: string[];\n /** Full label of any value (tooltips) */\n formatValue: (value: number) => string;\n}\n\n/**\n * @param count approximate number of ticks (numeric / time axes) or the\n * maximum number of labels (category axes)\n */\nexport const axisTicks = (\n axis: AxisModel,\n range: Range,\n count: number,\n): AxisTicks => {\n const [min, max] = range[0] <= range[1] ? range : [range[1], range[0]];\n if (axis.type === \"category\") {\n const n = axis.categories.length;\n const first = Math.max(0, Math.ceil(min - 1e-9));\n const last = Math.min(n - 1, Math.floor(max + 1e-9));\n const visible = Math.max(0, last - first + 1);\n const step = Math.max(1, Math.ceil(visible / Math.max(1, count)));\n const values: number[] = [];\n for (let i = first - (first % step); i <= last; i += step) {\n if (i >= first) values.push(i);\n }\n const name = (v: number) => {\n const i = Math.round(v);\n return axis.format ? axis.format(i) : (axis.categories[i] ?? String(i));\n };\n return { values, labels: values.map(name), formatValue: name };\n }\n if (axis.type === \"time\") {\n const ticks = timeTicks(min, max, count);\n const unit: TimeUnit =\n ticks.unit === \"day\" || ticks.unit === \"month\" || ticks.unit === \"year\"\n ? \"day\"\n : ticks.unit;\n const full
|
|
1
|
+
{"version":3,"file":"axis.js","names":["axisTicks","min","max","range","axis","n","first","last","visible","step","count","values","i","name","v","ticks","timeTicks","locale","timeZone","unit","full","formatTime","linearTicks","tickStep","tick","tickFormatter","formatValue","value"],"sources":["../../../../charts/src/engine/axis.ts"],"sourcesContent":["// Ticks and value labels of an axis for its visible range.\n\nimport { formatValue, tickFormatter } from \"./format\";\nimport type { AxisModel } from \"./model\";\nimport { linearTicks, tickStep } from \"./scale\";\nimport { formatTime, timeTicks, type TimeUnit } from \"./time\";\nimport type { Range } from \"./viewport\";\n\nexport interface AxisTicks {\n values: number[];\n labels: string[];\n /** Full label of any value (tooltips) */\n formatValue: (value: number) => string;\n}\n\n/**\n * @param count approximate number of ticks (numeric / time axes) or the\n * maximum number of labels (category axes)\n */\nexport const axisTicks = (\n axis: AxisModel,\n range: Range,\n count: number,\n): AxisTicks => {\n const [min, max] = range[0] <= range[1] ? range : [range[1], range[0]];\n if (axis.type === \"category\") {\n const n = axis.categories.length;\n const first = Math.max(0, Math.ceil(min - 1e-9));\n const last = Math.min(n - 1, Math.floor(max + 1e-9));\n const visible = Math.max(0, last - first + 1);\n const step = Math.max(1, Math.ceil(visible / Math.max(1, count)));\n const values: number[] = [];\n for (let i = first - (first % step); i <= last; i += step) {\n if (i >= first) values.push(i);\n }\n const name = (v: number) => {\n const i = Math.round(v);\n return axis.format ? axis.format(i) : (axis.categories[i] ?? String(i));\n };\n return { values, labels: values.map(name), formatValue: name };\n }\n if (axis.type === \"time\") {\n const { locale, timeZone = \"local\" } = axis;\n const ticks = timeTicks(min, max, count, locale, timeZone);\n const unit: TimeUnit =\n ticks.unit === \"day\" || ticks.unit === \"month\" || ticks.unit === \"year\"\n ? \"day\"\n : ticks.unit;\n const full =\n axis.format ?? ((v: number) => formatTime(v, unit, locale, timeZone));\n return {\n values: ticks.values,\n labels: ticks.values.map(axis.format ?? ticks.format),\n formatValue: full,\n };\n }\n const values = linearTicks(min, max, count);\n const step = tickStep(min, max, count);\n const tick =\n axis.format ??\n tickFormatter(step, Math.max(Math.abs(min), Math.abs(max)), axis.locale);\n return {\n values,\n labels: values.map(tick),\n formatValue:\n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,IAAIX,EAAK,UAAUW,EAAM,MAAM;GACpD,aAAaK;EACf;CACF;CACA,IAAMT,IAASW,EAAYrB,GAAKC,GAAKQ,CAAK,GACpCD,IAAOc,EAAStB,GAAKC,GAAKQ,CAAK,GAC/Bc,IACJpB,EAAK,UACLqB,EAAchB,GAAM,KAAK,IAAI,KAAK,IAAIR,CAAG,GAAG,KAAK,IAAIC,CAAG,CAAC,GAAGE,EAAK,MAAM;CACzE,OAAO;EACL;EACA,QAAQO,EAAO,IAAIa,CAAI;EACvB,aACEpB,EAAK,YAAY,MAAkBsB,EAAYC,GAAOvB,EAAK,MAAM;CACrE;AACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./color.cjs"),t=require("./items.cjs"),n=require("./overlay.cjs"),r=require("./renderers/canvas2d.cjs"),i=require("./controller.cjs");var
|
|
1
|
+
const e=require("./color.cjs"),t=require("./items.cjs"),n=require("./overlay.cjs"),r=require("./renderers/canvas2d.cjs"),i=require("./signature.cjs"),a=require("./controller.cjs");var o=e=>(e[0]+e[1])/2,s=(e,t,n,r,i,a)=>{e.beginPath(),e.moveTo(t+a,n),e.lineTo(t+r-a,n),e.arcTo(t+r,n,t+r,n+a,a),e.lineTo(t+r,n+i-a),e.arcTo(t+r,n+i,t+r-a,n+i,a),e.lineTo(t+a,n+i),e.arcTo(t,n+i,t,n+i-a,a),e.lineTo(t,n+a),e.arcTo(t,n,t+a,n,a),e.closePath()},c=(e,t,n)=>{e.save(),e.beginPath(),e.rect(n.x,n.y,n.width,n.height),e.clip(),e.lineJoin=`round`,e.lineCap=`round`;for(let n of t)if(n.kind===`area`)e.globalAlpha=n.opacity,e.fillStyle=n.color,n.segments.forEach((t,r)=>{let i=n.bottoms?.[r],a=t.length/2;if(!(a<2)){e.beginPath();for(let n=0;n<a;n++)n===0?e.moveTo(t[0],t[1]):e.lineTo(t[n*2],t[n*2+1]);for(let r=a-1;r>=0;r--){let a=i?i[r]:n.baseline;n.horizontal?e.lineTo(a,t[r*2+1]):e.lineTo(t[r*2],a)}e.closePath(),e.fill()}}),e.globalAlpha=1;else if(n.kind===`line`){e.strokeStyle=n.color,e.lineWidth=n.width,e.beginPath();for(let t of n.segments)for(let n=0;n<t.length;n+=2)n===0?e.moveTo(t[0],t[1]):e.lineTo(t[n],t[n+1]);e.stroke()}else if(n.kind===`bars`){e.globalAlpha=n.opacity??1;let t=n.radius??0;for(let r=0;r<n.rects.length;r+=4){let[i,a,o,c]=[n.rects[r],n.rects[r+1],n.rects[r+2],n.rects[r+3]];e.fillStyle=n.colors?.[r/4]??n.color;let l=Math.min(t,o/2,c/2);l>.5?(s(e,i,a,o,c,l),e.fill()):e.fillRect(i,a,o,c)}e.globalAlpha=1}else{e.globalAlpha=n.opacity;for(let t=0;t<n.dots.length;t+=3)e.fillStyle=n.colors[t/3]??`#888`,e.beginPath(),e.arc(n.dots[t],n.dots[t+1],n.dots[t+2]/2,0,Math.PI*2),e.fill();e.globalAlpha=1}e.restore()},l=(t,i,o,l,u,d=r.createCanvas2dPainter(t))=>{let{width:f,height:p,theme:m,model:h,view:g,layout:_}=i,{plot:v,scales:y}=_,b=u;if(t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,Math.ceil(f*b),Math.ceil(p*b)),t.setTransform(b,0,0,b,0,0),n.drawBackground(t,{width:f,height:p,scales:y,x:h.x,y:h.y,xTicks:_.xTicks,yTicks:_.yTicks,y2:h.y2,y2Ticks:_.y2Ticks,theme:m,annotations:i.annotations}),i.legend){t.font=n.font(m,12),t.textBaseline=`middle`,t.textAlign=`left`;for(let n of i.legend.entries){let r=n.box.y+n.box.height/2;if(t.globalAlpha=n.hidden?.45:1,t.fillStyle=n.color,n.shape===`dot`?(t.beginPath(),t.arc(n.box.x+5,r,4,0,Math.PI*2),t.fill()):n.shape===`line`?t.fillRect(n.box.x,r-1,10,2):t.fillRect(n.box.x+1,r-4,8,8),t.fillStyle=e.toCss(m.textMuted),t.fillText(n.name,n.box.x+14,r),n.hidden){let e=n.box.width-22;t.fillRect(n.box.x+14,r,e,1)}}t.globalAlpha=1}for(let n of i.hover?.marks??[])n.kind===`band`&&(s(t,n.x,n.y,n.width,n.height,6),t.fillStyle=e.toCss(m.text,.06),t.fill());y.horizontal?c(t,a.scenePrimitives(i),v):x();function x(){let e=(e,t,n)=>{let r=2/(e[1]-e[0]),i=(t-e[0])*r-1;return n?[-r,-i]:[r,i]},[t,n]=e(g.x,l.x,h.x.reverse),[r,i]=e(g.y,l.y,h.y.reverse);d.paint(o,{transform:{xScale:t,xOffset:n,yScale:r,yOffset:i},width:Math.max(1,Math.round(v.width*b)),height:Math.max(1,Math.round(v.height*b)),dpr:b},Math.round(v.x*b),Math.round(v.y*b))}if(t.setTransform(b,0,0,b,0,0),n.drawForeground(t,{width:f,height:p,scales:y,theme:m,annotations:i.annotations,pointLabels:[],clear:!1}),i.pointLabels.length){t.save(),t.font=n.font(m),t.textAlign=`left`,t.textBaseline=`middle`,t.lineWidth=3,t.lineJoin=`round`,t.strokeStyle=e.toCss(m.background,.9),t.fillStyle=e.toCss(m.text,.85);for(let{label:e,box:n}of i.pointLabels)t.strokeText(e.text,n.x,n.y+n.height/2),t.fillText(e.text,n.x,n.y+n.height/2);t.restore()}let S=i.hover;if(S){if(S.crosshairX!==null){t.save(),t.strokeStyle=e.toCss(m.textMuted,.55),t.lineWidth=1,t.setLineDash([3,3]),t.beginPath();let n=Math.round(S.crosshairX)+.5;t.moveTo(n,v.y),t.lineTo(n,v.y+v.height),t.stroke(),t.restore()}if(S.crosshairY!==null){t.save(),t.strokeStyle=e.toCss(m.textMuted,.55),t.lineWidth=1,t.setLineDash([3,3]),t.beginPath();let n=Math.round(S.crosshairY)+.5;t.moveTo(v.x,n),t.lineTo(v.x+v.width,n),t.stroke(),t.restore()}for(let n of S.marks)if(n.kind!==`band`){if(n.kind===`cell`){s(t,n.x,n.y,n.width,n.height,3),t.lineWidth=3,t.strokeStyle=e.toCss(m.background),t.stroke(),t.lineWidth=1.5,t.strokeStyle=e.toCss(m.text,.55),t.stroke();continue}t.beginPath(),t.arc(n.x,n.y,n.size/2+4,0,Math.PI*2),t.fillStyle=n.halo,t.fill(),t.beginPath(),t.arc(n.x,n.y,n.size/2-1,0,Math.PI*2),t.fillStyle=n.color,t.fill(),t.lineWidth=2,t.strokeStyle=e.toCss(m.background),t.stroke()}}if(i.dragging){let n=i.dragging;t.beginPath(),t.arc(n.x,n.y,n.size/2,0,Math.PI*2),t.fillStyle=n.color,t.globalAlpha=.85,t.fill(),t.globalAlpha=1,t.lineWidth=2,t.strokeStyle=e.toCss(m.background),t.stroke()}let C=S?.tooltip;if(C){let{box:r,lineHeight:i,padding:a}=C;t.save(),t.shadowColor=`rgba(15, 23, 42, 0.18)`,t.shadowBlur=16,t.shadowOffsetY=6,s(t,r.x,r.y,r.width,r.height,8),t.fillStyle=e.toCss(m.background),t.fill(),t.restore(),s(t,r.x+.5,r.y+.5,r.width-1,r.height-1,8),t.strokeStyle=e.toCss(m.axis,.6),t.lineWidth=1,t.stroke(),t.textBaseline=`middle`;let o=r.y+a+i/2,c=r.x+a+2,l=r.x+r.width-a-2;if(C.text){t.font=n.font(m,12),t.fillStyle=e.toCss(m.text),t.textAlign=`left`;for(let e of C.text)t.fillText(e,c,o),o+=i}else{let{content:r}=C,a=c;r.titleColor&&(t.fillStyle=r.titleColor,t.beginPath(),t.arc(a+4,o,4,0,Math.PI*2),t.fill(),a+=14),t.font=n.font(m,12,600),t.fillStyle=e.toCss(m.text),t.textAlign=`left`,t.fillText(r.title,a,o),o+=i;for(let s of r.rows)a=c,s.color&&(t.fillStyle=s.color,t.beginPath(),t.arc(a+4,o,4,0,Math.PI*2),t.fill(),a+=14),t.font=n.font(m,12),t.textAlign=`left`,t.fillStyle=e.toCss(m.textMuted),t.fillText(s.name,a,o),t.font=n.font(m,12,600),t.textAlign=`right`,t.fillStyle=e.toCss(m.text),t.fillText(s.value,l,o),o+=i}}},u=e=>{let{canvas:n}=e,s=n.getContext(`2d`),c=e.width,u=e.height,d=e.pixelRatio??1,f=!1,p=null,m=[],h=null,g=``,_=e.options,v=new WeakMap,y=0,b=e=>{let t=v.get(e);return t===void 0&&v.set(e,t=++y),t},x={x:0,y:0},S=0,C=``,w=(e,t)=>s?(t!==C&&(s.font=t,C=t),s.measureText(e).width):e.length*6.5,T=s?r.createCanvas2dPainter(s):null,E=globalThis,D=()=>{if(p=null,f||!s||!T)return;let e=k.getScene();if(!e)return;let r=Math.max(1,Math.round(c*d)),a=Math.max(1,Math.round(u*d));if(n.width!==r&&(n.width=r),n.height!==a&&(n.height=a),C=``,h!==e.model){h=e.model;let n=i.itemsSignature(e.model,b(e.theme),e=>_.series[e]?.stack);n!==g&&(g=n,x={x:o(e.model.base.x),y:o(e.model.base.y)},m=t.buildItems(e.model,x,++S))}l(s,e,m,x,d,T),C=``},O=()=>{f||p!==null||(p=n.requestAnimationFrame?n.requestAnimationFrame(D):E.requestAnimationFrame?E.requestAnimationFrame(D):setTimeout(D,16))},k=a.createChartController({options:e.options,theme:e.theme,measureText:w,onInvalidate:O});k.setSize(c,u);let A=(e,t)=>({id:e.identifier??t,touch:!0});return{setOptions:e=>{_=e,k.setOptions(e)},setTheme:e=>k.setTheme(e),resize(e,t,n){c=e,u=t,n&&(d=n),k.setSize(e,t),O()},render(){p!==null&&(n.cancelAnimationFrame?n.cancelAnimationFrame(p):E.cancelAnimationFrame?E.cancelAnimationFrame(p):clearTimeout(p)),D()},touchStart(e){e.forEach((e,t)=>k.pointerDown(e.x,e.y,A(e,t)))},touchMove(e){e.forEach((e,t)=>k.pointerMove(e.x,e.y,A(e,t)))},touchEnd(e){e.forEach((e,t)=>k.pointerUp(e.x,e.y,A(e,t)))},touchCancel(e=[{x:0,y:0}]){e.forEach((e,t)=>k.pointerCancel(A(e,t)))},pointerDown:(e,t,n)=>k.pointerDown(e,t,n),pointerMove:(e,t,n)=>k.pointerMove(e,t,n),pointerUp:(e,t,n)=>k.pointerUp(e,t,n),pointerLeave:()=>k.pointerLeave(),zoomAt:(e,t,n)=>k.zoomAt(e,t,n),resetZoom:()=>k.resetZoom(),getView:()=>k.getView(),setView:e=>k.setView(e),toggleSeries:e=>k.toggleSeries(e),clearHover:()=>k.clearHover(),getPlotRect:()=>k.getPlotRect(),toPixel:(e,t)=>k.toPixel(e,t),fromPixel:(e,t)=>k.fromPixel(e,t),getController:()=>k,on:(e,t)=>k.on(e,t),destroy(){f||(f=!0,p!==null&&(n.cancelAnimationFrame?n.cancelAnimationFrame(p):E.cancelAnimationFrame?E.cancelAnimationFrame(p):clearTimeout(p)),T?.destroy(),k.destroy())}}};exports.createCanvasChart=u,exports.drawPrimitives=c,exports.drawScene=l;
|
|
2
2
|
//# sourceMappingURL=canvas.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas.cjs","names":["createCanvas2dPainter","font","toCss","buildItems","createChartController","require_color","require_items","require_overlay","require_canvas2d","require_controller","mid","r","roundedRect","ctx","x","y","w","h","drawScene","scene","layout","dpr","pixelRatio","width","height","model","theme","e","cy","scale","s","range","offset","o","reverse","xScale","xOffset","view","origin","yScale","yOffset","painter","items","plot","label","box","hover","cx","mark","d","tip","padding","lineHeight","left","right","line","content","row","createCanvasChart","config","canvas","destroyed","frameId","itemsModel","version","fontSet","measureText","f","text","g","render","controller","pw","ph","schedule","touchOptions","t","i","ratio","touches","v","id","type","listener"],"sources":["../../../../charts/src/engine/canvas.ts"],"sourcesContent":["// createCanvasChart: a whole chart drawn on one 2D canvas without any DOM:\n// WeChat / Alipay / ByteDance mini-programs (`<canvas type=\"2d\">`), Taro,\n// uni-app, OffscreenCanvas, or a plain browser canvas. The host forwards\n// touches / pointer events; everything else is handled here.\n\nimport { toCss } from \"./color\";\nimport {\n createChartController,\n type ChartController,\n type ChartControllerEventMap,\n type ChartPointerOptions,\n type ChartScene,\n} from \"./controller\";\nimport { buildItems, type Origin } from \"./items\";\nimport { drawBackground, drawForeground, font } from \"./overlay\";\nimport { createCanvas2dPainter } from \"./renderers/canvas2d\";\nimport type { RenderItem } from \"./renderers/types\";\nimport type { ChartThemeInput } from \"./theme\";\nimport type { ChartOptions, ChartRect, ChartView } from \"./types\";\n\n/**\n * The canvas a chart draws on: a browser `HTMLCanvasElement`, an\n * `OffscreenCanvas` or the node of a mini-program `<canvas type=\"2d\">`\n * (`SelectorQuery.fields({ node: true })`)\n */\nexport interface ChartCanvas {\n width: number;\n height: number;\n getContext(type: \"2d\"): unknown;\n /** Mini-program canvases schedule their frames themselves */\n requestAnimationFrame?: (callback: () => void) => number;\n cancelAnimationFrame?: (id: number) => void;\n}\n\n/** A touch point relative to the canvas (`x` / `y`) with its identifier */\nexport interface ChartTouch {\n x: number;\n y: number;\n identifier?: number;\n}\n\nexport interface CanvasChartConfig {\n canvas: ChartCanvas;\n /** Size of the canvas in CSS pixels (rpx converted by the host) */\n width: number;\n height: number;\n /**\n * Device pixel ratio (`wx.getWindowInfo().pixelRatio` in mini-programs)\n * @default 1\n */\n pixelRatio?: number;\n options: ChartOptions;\n /** Colors and fonts: values of the Minerva CSS variables */\n theme?: ChartThemeInput;\n}\n\nexport interface CanvasChartInstance {\n setOptions(options: ChartOptions): void;\n setTheme(theme: ChartThemeInput | undefined): void;\n /** New CSS size (and pixel ratio) of the canvas */\n resize(width: number, height: number, pixelRatio?: number): void;\n /** Draws now (frames are otherwise scheduled automatically) */\n render(): void;\n /** Touch handlers: pass the `touches` / `changedTouches` of the event */\n touchStart(touches: readonly ChartTouch[]): void;\n touchMove(touches: readonly ChartTouch[]): void;\n touchEnd(changedTouches: readonly ChartTouch[]): void;\n touchCancel(changedTouches?: readonly ChartTouch[]): void;\n /** Mouse / pen handlers (H5, desktop mini-programs) */\n pointerDown(x: number, y: number, options?: ChartPointerOptions): void;\n pointerMove(x: number, y: number, options?: ChartPointerOptions): void;\n pointerUp(x: number, y: number, options?: ChartPointerOptions): void;\n pointerLeave(): void;\n /** Zooms around a pixel (factor < 1 zooms in) */\n zoomAt(x: number, y: number, factor: number): void;\n resetZoom(): void;\n getView(): ChartView;\n setView(view: Partial<ChartView>): void;\n toggleSeries(id: string): void;\n clearHover(): void;\n getPlotRect(): ChartRect | null;\n toPixel(x: number, y: number): { x: number; y: number } | null;\n fromPixel(x: number, y: number): { x: number; y: number } | null;\n /** The platform-free controller (scene, gestures) */\n getController(): ChartController;\n on<K extends keyof ChartControllerEventMap>(\n type: K,\n listener: (event: ChartControllerEventMap[K]) => void,\n ): () => void;\n destroy(): void;\n}\n\nconst mid = (r: [number, number]) => (r[0] + r[1]) / 2;\n\nconst roundedRect = (\n ctx: CanvasRenderingContext2D,\n x: number,\n y: number,\n w: number,\n h: number,\n r: number,\n) => {\n ctx.beginPath();\n ctx.moveTo(x + r, y);\n ctx.lineTo(x + w - r, y);\n ctx.arcTo(x + w, y, x + w, y + r, r);\n ctx.lineTo(x + w, y + h - r);\n ctx.arcTo(x + w, y + h, x + w - r, y + h, r);\n ctx.lineTo(x + r, y + h);\n ctx.arcTo(x, y + h, x, y + h - r, r);\n ctx.lineTo(x, y + r);\n ctx.arcTo(x, y, x + r, y, r);\n ctx.closePath();\n};\n\n/** Draws a scene (legend, axes, data, labels, hover) on a 2D context */\nexport const drawScene = (\n ctx: CanvasRenderingContext2D,\n scene: ChartScene,\n items: readonly RenderItem[],\n origin: Origin,\n pixelRatio: number,\n painter = createCanvas2dPainter(ctx),\n) => {\n const { width, height, theme, model, view, layout } = scene;\n const { plot, scales } = layout;\n const dpr = pixelRatio;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, Math.ceil(width * dpr), Math.ceil(height * dpr));\n ctx.setTransform(dpr, 0, 0, dpr, 0, 0);\n drawBackground(ctx, {\n width,\n height,\n scales,\n x: model.x,\n y: model.y,\n xTicks: layout.xTicks,\n yTicks: layout.yTicks,\n theme,\n annotations: scene.annotations,\n });\n\n // legend\n if (scene.legend) {\n ctx.font = font(theme, 12);\n ctx.textBaseline = \"middle\";\n ctx.textAlign = \"left\";\n for (const e of scene.legend.entries) {\n const cy = e.box.y + e.box.height / 2;\n ctx.globalAlpha = e.hidden ? 0.45 : 1;\n ctx.fillStyle = e.color;\n if (e.shape === \"dot\") {\n ctx.beginPath();\n ctx.arc(e.box.x + 5, cy, 4, 0, Math.PI * 2);\n ctx.fill();\n } else if (e.shape === \"line\") {\n ctx.fillRect(e.box.x, cy - 1, 10, 2);\n } else {\n ctx.fillRect(e.box.x + 1, cy - 4, 8, 8);\n }\n ctx.fillStyle = toCss(theme.textMuted);\n ctx.fillText(e.name, e.box.x + 14, cy);\n if (e.hidden) {\n const w = e.box.width - 22;\n ctx.fillRect(e.box.x + 14, cy, w, 1);\n }\n }\n ctx.globalAlpha = 1;\n }\n\n // data\n const scale = (range: [number, number], o: number, reverse: boolean) => {\n const s = 2 / (range[1] - range[0]);\n const offset = (o - range[0]) * s - 1;\n return reverse ? [-s, -offset] : [s, offset];\n };\n const [xScale, xOffset] = scale(view.x, origin.x, model.x.reverse);\n const [yScale, yOffset] = scale(view.y, origin.y, model.y.reverse);\n painter.paint(\n items,\n {\n transform: { xScale, xOffset, yScale, yOffset },\n width: Math.max(1, Math.round(plot.width * dpr)),\n height: Math.max(1, Math.round(plot.height * dpr)),\n dpr,\n },\n Math.round(plot.x * dpr),\n Math.round(plot.y * dpr),\n );\n\n ctx.setTransform(dpr, 0, 0, dpr, 0, 0);\n drawForeground(ctx, {\n width,\n height,\n scales,\n theme,\n annotations: scene.annotations,\n pointLabels: [],\n clear: false,\n });\n // dot labels placed by the scene\n if (scene.pointLabels.length) {\n ctx.save();\n ctx.font = font(theme);\n ctx.textAlign = \"left\";\n ctx.textBaseline = \"middle\";\n ctx.lineWidth = 3;\n ctx.lineJoin = \"round\";\n ctx.strokeStyle = toCss(theme.background, 0.9);\n ctx.fillStyle = toCss(theme.text, 0.85);\n for (const { label, box } of scene.pointLabels) {\n ctx.strokeText(label.text, box.x, box.y + box.height / 2);\n ctx.fillText(label.text, box.x, box.y + box.height / 2);\n }\n ctx.restore();\n }\n\n // hover\n const hover = scene.hover;\n if (hover) {\n if (hover.crosshairX !== null) {\n ctx.save();\n ctx.strokeStyle = toCss(theme.textMuted, 0.55);\n ctx.lineWidth = 1;\n ctx.setLineDash([3, 3]);\n ctx.beginPath();\n const cx = Math.round(hover.crosshairX) + 0.5;\n ctx.moveTo(cx, plot.y);\n ctx.lineTo(cx, plot.y + plot.height);\n ctx.stroke();\n ctx.restore();\n }\n for (const mark of hover.marks) {\n if (mark.kind === \"bar\") {\n ctx.fillStyle = toCss(theme.text, 0.08);\n ctx.fillRect(mark.x - 2, mark.y - 2, mark.width + 4, mark.height + 2);\n continue;\n }\n ctx.beginPath();\n ctx.arc(mark.x, mark.y, mark.size / 2, 0, Math.PI * 2);\n ctx.fillStyle = mark.color;\n ctx.fill();\n ctx.lineWidth = 2;\n ctx.strokeStyle = toCss(theme.background);\n ctx.stroke();\n }\n }\n if (scene.dragging) {\n const d = scene.dragging;\n ctx.beginPath();\n ctx.arc(d.x, d.y, d.size / 2, 0, Math.PI * 2);\n ctx.fillStyle = d.color;\n ctx.globalAlpha = 0.85;\n ctx.fill();\n ctx.globalAlpha = 1;\n ctx.lineWidth = 2;\n ctx.strokeStyle = toCss(theme.background);\n ctx.stroke();\n }\n const tip = hover?.tooltip;\n if (tip) {\n const { box, lineHeight, padding } = tip;\n ctx.save();\n ctx.shadowColor = \"rgba(15, 23, 42, 0.18)\";\n ctx.shadowBlur = 16;\n ctx.shadowOffsetY = 6;\n roundedRect(ctx, box.x, box.y, box.width, box.height, 8);\n ctx.fillStyle = toCss(theme.background);\n ctx.fill();\n ctx.restore();\n roundedRect(\n ctx,\n box.x + 0.5,\n box.y + 0.5,\n box.width - 1,\n box.height - 1,\n 8,\n );\n ctx.strokeStyle = toCss(theme.axis);\n ctx.lineWidth = 1;\n ctx.stroke();\n ctx.textBaseline = \"middle\";\n let y = box.y + padding + lineHeight / 2;\n const left = box.x + padding + 2;\n const right = box.x + box.width - padding - 2;\n if (tip.text) {\n ctx.font = font(theme, 12);\n ctx.fillStyle = toCss(theme.text);\n ctx.textAlign = \"left\";\n for (const line of tip.text) {\n ctx.fillText(line, left, y);\n y += lineHeight;\n }\n } else {\n const { content } = tip;\n let x = left;\n if (content.titleColor) {\n ctx.fillStyle = content.titleColor;\n ctx.beginPath();\n ctx.arc(x + 4, y, 4, 0, Math.PI * 2);\n ctx.fill();\n x += 14;\n }\n ctx.font = font(theme, 12, 600);\n ctx.fillStyle = toCss(theme.text);\n ctx.textAlign = \"left\";\n ctx.fillText(content.title, x, y);\n y += lineHeight;\n for (const row of content.rows) {\n x = left;\n if (row.color) {\n ctx.fillStyle = row.color;\n ctx.beginPath();\n ctx.arc(x + 4, y, 4, 0, Math.PI * 2);\n ctx.fill();\n x += 14;\n }\n ctx.font = font(theme, 12);\n ctx.textAlign = \"left\";\n ctx.fillStyle = toCss(theme.textMuted);\n ctx.fillText(row.name, x, y);\n ctx.font = font(theme, 12, 600);\n ctx.textAlign = \"right\";\n ctx.fillStyle = toCss(theme.text);\n ctx.fillText(row.value, right, y);\n y += lineHeight;\n }\n }\n }\n};\n\n/**\n * Creates a chart drawn on a 2D canvas: line, area, bar and scatter series,\n * annotations, legend and tooltip, tap / drag / pinch gestures. Works\n * without a DOM (mini-programs); see `createChart` for the GPU version of\n * the web.\n */\nexport const createCanvasChart = (\n config: CanvasChartConfig,\n): CanvasChartInstance => {\n const { canvas } = config;\n const ctx = canvas.getContext(\"2d\") as CanvasRenderingContext2D | null;\n let width = config.width;\n let height = config.height;\n let dpr = config.pixelRatio ?? 1;\n let destroyed = false;\n let frameId: number | null = null;\n let items: RenderItem[] = [];\n let itemsModel: unknown = null;\n let origin: Origin = { x: 0, y: 0 };\n let version = 0;\n let fontSet = \"\";\n\n const measureText = (text: string, f: string) => {\n if (!ctx) return text.length * 6.5;\n if (f !== fontSet) {\n ctx.font = f;\n fontSet = f;\n }\n return ctx.measureText(text).width;\n };\n\n const painter = ctx ? createCanvas2dPainter(ctx) : null;\n\n const g = globalThis as {\n requestAnimationFrame?: (cb: () => void) => number;\n cancelAnimationFrame?: (id: number) => void;\n };\n\n const render = () => {\n frameId = null;\n if (destroyed || !ctx || !painter) return;\n const scene = controller.getScene();\n if (!scene) return;\n const pw = Math.max(1, Math.round(width * dpr));\n const ph = Math.max(1, Math.round(height * dpr));\n if (canvas.width !== pw) canvas.width = pw;\n if (canvas.height !== ph) canvas.height = ph;\n fontSet = \"\";\n if (itemsModel !== scene.model) {\n itemsModel = scene.model;\n origin = { x: mid(scene.model.base.x), y: mid(scene.model.base.y) };\n items = buildItems(scene.model, origin, ++version);\n }\n drawScene(ctx, scene, items, origin, dpr, painter);\n fontSet = \"\";\n };\n\n const schedule = () => {\n if (destroyed || frameId !== null) return;\n if (canvas.requestAnimationFrame)\n frameId = canvas.requestAnimationFrame(render);\n else if (g.requestAnimationFrame) frameId = g.requestAnimationFrame(render);\n else frameId = setTimeout(render, 16) as unknown as number;\n };\n\n const controller = createChartController({\n options: config.options,\n theme: config.theme,\n measureText,\n onInvalidate: schedule,\n });\n controller.setSize(width, height);\n\n const touchOptions = (t: ChartTouch, i: number): ChartPointerOptions => ({\n id: t.identifier ?? i,\n touch: true,\n });\n\n return {\n setOptions: (o) => controller.setOptions(o),\n setTheme: (t) => controller.setTheme(t),\n resize(w, h, ratio) {\n width = w;\n height = h;\n if (ratio) dpr = ratio;\n controller.setSize(w, h);\n schedule();\n },\n render() {\n if (frameId !== null) {\n if (canvas.cancelAnimationFrame) canvas.cancelAnimationFrame(frameId);\n else if (g.cancelAnimationFrame) g.cancelAnimationFrame(frameId);\n else clearTimeout(frameId);\n }\n render();\n },\n touchStart(touches) {\n touches.forEach((t, i) =>\n controller.pointerDown(t.x, t.y, touchOptions(t, i)),\n );\n },\n touchMove(touches) {\n touches.forEach((t, i) =>\n controller.pointerMove(t.x, t.y, touchOptions(t, i)),\n );\n },\n touchEnd(touches) {\n touches.forEach((t, i) =>\n controller.pointerUp(t.x, t.y, touchOptions(t, i)),\n );\n },\n touchCancel(touches = [{ x: 0, y: 0 }]) {\n touches.forEach((t, i) => controller.pointerCancel(touchOptions(t, i)));\n },\n pointerDown: (x, y, o) => controller.pointerDown(x, y, o),\n pointerMove: (x, y, o) => controller.pointerMove(x, y, o),\n pointerUp: (x, y, o) => controller.pointerUp(x, y, o),\n pointerLeave: () => controller.pointerLeave(),\n zoomAt: (x, y, f) => controller.zoomAt(x, y, f),\n resetZoom: () => controller.resetZoom(),\n getView: () => controller.getView(),\n setView: (v) => controller.setView(v),\n toggleSeries: (id) => controller.toggleSeries(id),\n clearHover: () => controller.clearHover(),\n getPlotRect: () => controller.getPlotRect(),\n toPixel: (x, y) => controller.toPixel(x, y),\n fromPixel: (x, y) => controller.fromPixel(x, y),\n getController: () => controller,\n on: (type, listener) => controller.on(type, listener),\n destroy() {\n if (destroyed) return;\n destroyed = true;\n if (frameId !== null) {\n if (canvas.cancelAnimationFrame) canvas.cancelAnimationFrame(frameId);\n else if (g.cancelAnimationFrame) g.cancelAnimationFrame(frameId);\n else clearTimeout(frameId);\n }\n painter?.destroy();\n controller.destroy();\n },\n };\n};\n"],"mappings":"uJA4FA,IAAMU,EAAO,IAAyBC,EAAE,GAAKA,EAAE,IAAM,EAE/CC,GACJ,EACA,EACA,EACA,EACA,EACA,IACG,CACHC,EAAI,UAAU,EACdA,EAAI,OAAOC,EAAIH,EAAGI,CAAC,EACnBF,EAAI,OAAOC,EAAIE,EAAIL,EAAGI,CAAC,EACvBF,EAAI,MAAMC,EAAIE,EAAGD,EAAGD,EAAIE,EAAGD,EAAIJ,EAAGA,CAAC,EACnCE,EAAI,OAAOC,EAAIE,EAAGD,EAAIE,EAAIN,CAAC,EAC3BE,EAAI,MAAMC,EAAIE,EAAGD,EAAIE,EAAGH,EAAIE,EAAIL,EAAGI,EAAIE,EAAGN,CAAC,EAC3CE,EAAI,OAAOC,EAAIH,EAAGI,EAAIE,CAAC,EACvBJ,EAAI,MAAMC,EAAGC,EAAIE,EAAGH,EAAGC,EAAIE,EAAIN,EAAG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QAAS,EAAG,EAAG,IAAMA,EAAW,OAAOzD,EAAGC,EAAGoD,CAAC,EAC9C,cAAiBI,EAAW,UAAU,EACtC,YAAeA,EAAW,QAAQ,EAClC,QAAU,GAAMA,EAAW,QAAQS,CAAC,EACpC,aAAe,GAAOT,EAAW,aAAaU,CAAE,EAChD,eAAkBV,EAAW,WAAW,EACxC,gBAAmBA,EAAW,YAAY,EAC1C,SAAU,EAAG,IAAMA,EAAW,QAAQzD,EAAGC,CAAC,EAC1C,WAAY,EAAG,IAAMwD,EAAW,UAAUzD,EAAGC,CAAC,EAC9C,kBAAqBwD,EACrB,IAAK,EAAM,IAAaA,EAAW,GAAGW,EAAMC,CAAQ,EACpD,SAAU,CACJtB,IACJ,EAAY,GACRC,IAAY,OACVF,EAAO,qBAAsBA,EAAO,qBAAqBE,CAAO,EAC3DO,EAAE,qBAAsBA,EAAE,qBAAqBP,CAAO,EAC1D,aAAaA,CAAO,GAE3BrB,GAAS,QAAQ,EACjB8B,EAAW,QAAQ,EACrB,CACF,CACF"}
|
|
1
|
+
{"version":3,"file":"canvas.cjs","names":["createCanvas2dPainter","font","toCss","scenePrimitives","itemsSignature","buildItems","createChartController","require_color","require_items","require_overlay","require_canvas2d","require_signature","require_controller","mid","r","roundedRect","ctx","x","y","w","h","drawPrimitives","plot","p","primitives","bottoms","k","n","run","i","b","radius","drawScene","scene","layout","dpr","pixelRatio","width","height","model","theme","e","cy","mark","scales","paintData","scale","s","range","offset","o","reverse","xScale","xOffset","view","origin","yScale","yOffset","painter","items","label","box","hover","cx","d","tip","padding","lineHeight","left","right","line","content","row","createCanvasChart","config","canvas","destroyed","frameId","itemsModel","itemsKey","options","themeIds","themeCount","themeId","id","version","fontSet","measureText","f","text","g","render","controller","pw","ph","key","index","schedule","touchOptions","t","ratio","touches","v","type","listener"],"sources":["../../../../charts/src/engine/canvas.ts"],"sourcesContent":["// createCanvasChart: a whole chart drawn on one 2D canvas without any DOM:\n// WeChat / Alipay / ByteDance mini-programs (`<canvas type=\"2d\">`), Taro,\n// uni-app, OffscreenCanvas, or a plain browser canvas. The host forwards\n// touches / pointer events; everything else is handled here.\n\nimport { toCss } from \"./color\";\nimport {\n createChartController,\n scenePrimitives,\n type ChartController,\n type ChartControllerEventMap,\n type ChartPointerOptions,\n type ChartPrimitive,\n type ChartScene,\n} from \"./controller\";\nimport { buildItems, type Origin } from \"./items\";\nimport { drawBackground, drawForeground, font } from \"./overlay\";\nimport { createCanvas2dPainter } from \"./renderers/canvas2d\";\nimport type { RenderItem } from \"./renderers/types\";\nimport { itemsSignature } from \"./signature\";\nimport type { ChartThemeInput } from \"./theme\";\nimport type { ChartOptions, ChartRect, ChartView } from \"./types\";\n\n/**\n * The canvas a chart draws on: a browser `HTMLCanvasElement`, an\n * `OffscreenCanvas` or the node of a mini-program `<canvas type=\"2d\">`\n * (`SelectorQuery.fields({ node: true })`)\n */\nexport interface ChartCanvas {\n width: number;\n height: number;\n getContext(type: \"2d\"): unknown;\n /** Mini-program canvases schedule their frames themselves */\n requestAnimationFrame?: (callback: () => void) => number;\n cancelAnimationFrame?: (id: number) => void;\n}\n\n/** A touch point relative to the canvas (`x` / `y`) with its identifier */\nexport interface ChartTouch {\n x: number;\n y: number;\n identifier?: number;\n}\n\nexport interface CanvasChartConfig {\n canvas: ChartCanvas;\n /** Size of the canvas in CSS pixels (rpx converted by the host) */\n width: number;\n height: number;\n /**\n * Device pixel ratio (`wx.getWindowInfo().pixelRatio` in mini-programs)\n * @default 1\n */\n pixelRatio?: number;\n options: ChartOptions;\n /** Colors and fonts: values of the Minerva CSS variables */\n theme?: ChartThemeInput;\n}\n\nexport interface CanvasChartInstance {\n setOptions(options: ChartOptions): void;\n setTheme(theme: ChartThemeInput | undefined): void;\n /** New CSS size (and pixel ratio) of the canvas */\n resize(width: number, height: number, pixelRatio?: number): void;\n /** Draws now (frames are otherwise scheduled automatically) */\n render(): void;\n /** Touch handlers: pass the `touches` / `changedTouches` of the event */\n touchStart(touches: readonly ChartTouch[]): void;\n touchMove(touches: readonly ChartTouch[]): void;\n touchEnd(changedTouches: readonly ChartTouch[]): void;\n touchCancel(changedTouches?: readonly ChartTouch[]): void;\n /** Mouse / pen handlers (H5, desktop mini-programs) */\n pointerDown(x: number, y: number, options?: ChartPointerOptions): void;\n pointerMove(x: number, y: number, options?: ChartPointerOptions): void;\n pointerUp(x: number, y: number, options?: ChartPointerOptions): void;\n pointerLeave(): void;\n /** Zooms around a pixel (factor < 1 zooms in) */\n zoomAt(x: number, y: number, factor: number): void;\n resetZoom(): void;\n getView(): ChartView;\n setView(view: Partial<ChartView>): void;\n toggleSeries(id: string): void;\n clearHover(): void;\n getPlotRect(): ChartRect | null;\n toPixel(x: number, y: number): { x: number; y: number } | null;\n fromPixel(x: number, y: number): { x: number; y: number } | null;\n /** The platform-free controller (scene, gestures) */\n getController(): ChartController;\n on<K extends keyof ChartControllerEventMap>(\n type: K,\n listener: (event: ChartControllerEventMap[K]) => void,\n ): () => void;\n destroy(): void;\n}\n\nconst mid = (r: [number, number]) => (r[0] + r[1]) / 2;\n\nconst roundedRect = (\n ctx: CanvasRenderingContext2D,\n x: number,\n y: number,\n w: number,\n h: number,\n r: number,\n) => {\n ctx.beginPath();\n ctx.moveTo(x + r, y);\n ctx.lineTo(x + w - r, y);\n ctx.arcTo(x + w, y, x + w, y + r, r);\n ctx.lineTo(x + w, y + h - r);\n ctx.arcTo(x + w, y + h, x + w - r, y + h, r);\n ctx.lineTo(x + r, y + h);\n ctx.arcTo(x, y + h, x, y + h - r, r);\n ctx.lineTo(x, y + r);\n ctx.arcTo(x, y, x + r, y, r);\n ctx.closePath();\n};\n\n/**\n * Draws the shapes of `scenePrimitives` (CSS pixels of the chart) clipped to\n * the plot: the data of horizontal charts\n */\nexport const drawPrimitives = (\n ctx: CanvasRenderingContext2D,\n primitives: readonly ChartPrimitive[],\n plot: { x: number; y: number; width: number; height: number },\n) => {\n ctx.save();\n ctx.beginPath();\n ctx.rect(plot.x, plot.y, plot.width, plot.height);\n ctx.clip();\n ctx.lineJoin = \"round\";\n ctx.lineCap = \"round\";\n for (const p of primitives) {\n if (p.kind === \"area\") {\n ctx.globalAlpha = p.opacity;\n ctx.fillStyle = p.color;\n p.segments.forEach((run, k) => {\n const bottoms = p.bottoms?.[k];\n const n = run.length / 2;\n if (n < 2) return;\n ctx.beginPath();\n for (let i = 0; i < n; i++) {\n if (i === 0) ctx.moveTo(run[0], run[1]);\n else ctx.lineTo(run[i * 2], run[i * 2 + 1]);\n }\n // back along the bottom edge (or the baseline)\n for (let i = n - 1; i >= 0; i--) {\n const b = bottoms ? bottoms[i] : p.baseline;\n if (p.horizontal) ctx.lineTo(b, run[i * 2 + 1]);\n else ctx.lineTo(run[i * 2], b);\n }\n ctx.closePath();\n ctx.fill();\n });\n ctx.globalAlpha = 1;\n } else if (p.kind === \"line\") {\n ctx.strokeStyle = p.color;\n ctx.lineWidth = p.width;\n ctx.beginPath();\n for (const run of p.segments) {\n for (let i = 0; i < run.length; i += 2) {\n if (i === 0) ctx.moveTo(run[0], run[1]);\n else ctx.lineTo(run[i], run[i + 1]);\n }\n }\n ctx.stroke();\n } else if (p.kind === \"bars\") {\n ctx.globalAlpha = p.opacity ?? 1;\n const r = p.radius ?? 0;\n for (let k = 0; k < p.rects.length; k += 4) {\n const [x, y, w, h] = [\n p.rects[k],\n p.rects[k + 1],\n p.rects[k + 2],\n p.rects[k + 3],\n ];\n ctx.fillStyle = p.colors?.[k / 4] ?? p.color;\n const radius = Math.min(r, w / 2, h / 2);\n if (radius > 0.5) {\n roundedRect(ctx, x, y, w, h, radius);\n ctx.fill();\n } else {\n ctx.fillRect(x, y, w, h);\n }\n }\n ctx.globalAlpha = 1;\n } else {\n ctx.globalAlpha = p.opacity;\n for (let k = 0; k < p.dots.length; k += 3) {\n ctx.fillStyle = p.colors[k / 3] ?? \"#888\";\n ctx.beginPath();\n ctx.arc(p.dots[k], p.dots[k + 1], p.dots[k + 2] / 2, 0, Math.PI * 2);\n ctx.fill();\n }\n ctx.globalAlpha = 1;\n }\n }\n ctx.restore();\n};\n\n/** Draws a scene (legend, axes, data, labels, hover) on a 2D context */\nexport const drawScene = (\n ctx: CanvasRenderingContext2D,\n scene: ChartScene,\n items: readonly RenderItem[],\n origin: Origin,\n pixelRatio: number,\n painter = createCanvas2dPainter(ctx),\n) => {\n const { width, height, theme, model, view, layout } = scene;\n const { plot, scales } = layout;\n const dpr = pixelRatio;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, Math.ceil(width * dpr), Math.ceil(height * dpr));\n ctx.setTransform(dpr, 0, 0, dpr, 0, 0);\n drawBackground(ctx, {\n width,\n height,\n scales,\n x: model.x,\n y: model.y,\n xTicks: layout.xTicks,\n yTicks: layout.yTicks,\n y2: model.y2,\n y2Ticks: layout.y2Ticks,\n theme,\n annotations: scene.annotations,\n });\n\n // legend\n if (scene.legend) {\n ctx.font = font(theme, 12);\n ctx.textBaseline = \"middle\";\n ctx.textAlign = \"left\";\n for (const e of scene.legend.entries) {\n const cy = e.box.y + e.box.height / 2;\n ctx.globalAlpha = e.hidden ? 0.45 : 1;\n ctx.fillStyle = e.color;\n if (e.shape === \"dot\") {\n ctx.beginPath();\n ctx.arc(e.box.x + 5, cy, 4, 0, Math.PI * 2);\n ctx.fill();\n } else if (e.shape === \"line\") {\n ctx.fillRect(e.box.x, cy - 1, 10, 2);\n } else {\n ctx.fillRect(e.box.x + 1, cy - 4, 8, 8);\n }\n ctx.fillStyle = toCss(theme.textMuted);\n ctx.fillText(e.name, e.box.x + 14, cy);\n if (e.hidden) {\n const w = e.box.width - 22;\n ctx.fillRect(e.box.x + 14, cy, w, 1);\n }\n }\n ctx.globalAlpha = 1;\n }\n\n // hover band of bars, below the data\n for (const mark of scene.hover?.marks ?? []) {\n if (mark.kind !== \"band\") continue;\n roundedRect(ctx, mark.x, mark.y, mark.width, mark.height, 6);\n ctx.fillStyle = toCss(theme.text, 0.06);\n ctx.fill();\n }\n\n // data (horizontal charts: as shapes, the painter draws vertical charts)\n if (scales.horizontal) {\n drawPrimitives(ctx, scenePrimitives(scene), plot);\n } else {\n paintData();\n }\n function paintData() {\n const scale = (range: [number, number], o: number, reverse: boolean) => {\n const s = 2 / (range[1] - range[0]);\n const offset = (o - range[0]) * s - 1;\n return reverse ? [-s, -offset] : [s, offset];\n };\n const [xScale, xOffset] = scale(view.x, origin.x, model.x.reverse);\n const [yScale, yOffset] = scale(view.y, origin.y, model.y.reverse);\n painter.paint(\n items,\n {\n transform: { xScale, xOffset, yScale, yOffset },\n width: Math.max(1, Math.round(plot.width * dpr)),\n height: Math.max(1, Math.round(plot.height * dpr)),\n dpr,\n },\n Math.round(plot.x * dpr),\n Math.round(plot.y * dpr),\n );\n }\n\n ctx.setTransform(dpr, 0, 0, dpr, 0, 0);\n drawForeground(ctx, {\n width,\n height,\n scales,\n theme,\n annotations: scene.annotations,\n pointLabels: [],\n clear: false,\n });\n // dot labels placed by the scene\n if (scene.pointLabels.length) {\n ctx.save();\n ctx.font = font(theme);\n ctx.textAlign = \"left\";\n ctx.textBaseline = \"middle\";\n ctx.lineWidth = 3;\n ctx.lineJoin = \"round\";\n ctx.strokeStyle = toCss(theme.background, 0.9);\n ctx.fillStyle = toCss(theme.text, 0.85);\n for (const { label, box } of scene.pointLabels) {\n ctx.strokeText(label.text, box.x, box.y + box.height / 2);\n ctx.fillText(label.text, box.x, box.y + box.height / 2);\n }\n ctx.restore();\n }\n\n // hover\n const hover = scene.hover;\n if (hover) {\n if (hover.crosshairX !== null) {\n ctx.save();\n ctx.strokeStyle = toCss(theme.textMuted, 0.55);\n ctx.lineWidth = 1;\n ctx.setLineDash([3, 3]);\n ctx.beginPath();\n const cx = Math.round(hover.crosshairX) + 0.5;\n ctx.moveTo(cx, plot.y);\n ctx.lineTo(cx, plot.y + plot.height);\n ctx.stroke();\n ctx.restore();\n }\n if (hover.crosshairY !== null) {\n ctx.save();\n ctx.strokeStyle = toCss(theme.textMuted, 0.55);\n ctx.lineWidth = 1;\n ctx.setLineDash([3, 3]);\n ctx.beginPath();\n const cy = Math.round(hover.crosshairY) + 0.5;\n ctx.moveTo(plot.x, cy);\n ctx.lineTo(plot.x + plot.width, cy);\n ctx.stroke();\n ctx.restore();\n }\n for (const mark of hover.marks) {\n if (mark.kind === \"band\") continue;\n if (mark.kind === \"cell\") {\n roundedRect(ctx, mark.x, mark.y, mark.width, mark.height, 3);\n ctx.lineWidth = 3;\n ctx.strokeStyle = toCss(theme.background);\n ctx.stroke();\n ctx.lineWidth = 1.5;\n ctx.strokeStyle = toCss(theme.text, 0.55);\n ctx.stroke();\n continue;\n }\n ctx.beginPath();\n ctx.arc(mark.x, mark.y, mark.size / 2 + 4, 0, Math.PI * 2);\n ctx.fillStyle = mark.halo;\n ctx.fill();\n ctx.beginPath();\n ctx.arc(mark.x, mark.y, mark.size / 2 - 1, 0, Math.PI * 2);\n ctx.fillStyle = mark.color;\n ctx.fill();\n ctx.lineWidth = 2;\n ctx.strokeStyle = toCss(theme.background);\n ctx.stroke();\n }\n }\n if (scene.dragging) {\n const d = scene.dragging;\n ctx.beginPath();\n ctx.arc(d.x, d.y, d.size / 2, 0, Math.PI * 2);\n ctx.fillStyle = d.color;\n ctx.globalAlpha = 0.85;\n ctx.fill();\n ctx.globalAlpha = 1;\n ctx.lineWidth = 2;\n ctx.strokeStyle = toCss(theme.background);\n ctx.stroke();\n }\n const tip = hover?.tooltip;\n if (tip) {\n const { box, lineHeight, padding } = tip;\n ctx.save();\n ctx.shadowColor = \"rgba(15, 23, 42, 0.18)\";\n ctx.shadowBlur = 16;\n ctx.shadowOffsetY = 6;\n roundedRect(ctx, box.x, box.y, box.width, box.height, 8);\n ctx.fillStyle = toCss(theme.background);\n ctx.fill();\n ctx.restore();\n roundedRect(\n ctx,\n box.x + 0.5,\n box.y + 0.5,\n box.width - 1,\n box.height - 1,\n 8,\n );\n ctx.strokeStyle = toCss(theme.axis, 0.6);\n ctx.lineWidth = 1;\n ctx.stroke();\n ctx.textBaseline = \"middle\";\n let y = box.y + padding + lineHeight / 2;\n const left = box.x + padding + 2;\n const right = box.x + box.width - padding - 2;\n if (tip.text) {\n ctx.font = font(theme, 12);\n ctx.fillStyle = toCss(theme.text);\n ctx.textAlign = \"left\";\n for (const line of tip.text) {\n ctx.fillText(line, left, y);\n y += lineHeight;\n }\n } else {\n const { content } = tip;\n let x = left;\n if (content.titleColor) {\n ctx.fillStyle = content.titleColor;\n ctx.beginPath();\n ctx.arc(x + 4, y, 4, 0, Math.PI * 2);\n ctx.fill();\n x += 14;\n }\n ctx.font = font(theme, 12, 600);\n ctx.fillStyle = toCss(theme.text);\n ctx.textAlign = \"left\";\n ctx.fillText(content.title, x, y);\n y += lineHeight;\n for (const row of content.rows) {\n x = left;\n if (row.color) {\n ctx.fillStyle = row.color;\n ctx.beginPath();\n ctx.arc(x + 4, y, 4, 0, Math.PI * 2);\n ctx.fill();\n x += 14;\n }\n ctx.font = font(theme, 12);\n ctx.textAlign = \"left\";\n ctx.fillStyle = toCss(theme.textMuted);\n ctx.fillText(row.name, x, y);\n ctx.font = font(theme, 12, 600);\n ctx.textAlign = \"right\";\n ctx.fillStyle = toCss(theme.text);\n ctx.fillText(row.value, right, y);\n y += lineHeight;\n }\n }\n }\n};\n\n/**\n * Creates a chart drawn on a 2D canvas: line, area, bar and scatter series,\n * annotations, legend and tooltip, tap / drag / pinch gestures. Works\n * without a DOM (mini-programs); see `createChart` for the GPU version of\n * the web.\n */\nexport const createCanvasChart = (\n config: CanvasChartConfig,\n): CanvasChartInstance => {\n const { canvas } = config;\n const ctx = canvas.getContext(\"2d\") as CanvasRenderingContext2D | null;\n let width = config.width;\n let height = config.height;\n let dpr = config.pixelRatio ?? 1;\n let destroyed = false;\n let frameId: number | null = null;\n let items: RenderItem[] = [];\n let itemsModel: unknown = null;\n let itemsKey = \"\";\n let options = config.options;\n /** Ids of the themes seen (the controller replaces its theme on changes) */\n const themeIds = new WeakMap<object, number>();\n let themeCount = 0;\n const themeId = (theme: object) => {\n let id = themeIds.get(theme);\n if (id === undefined) themeIds.set(theme, (id = ++themeCount));\n return id;\n };\n let origin: Origin = { x: 0, y: 0 };\n let version = 0;\n let fontSet = \"\";\n\n const measureText = (text: string, f: string) => {\n if (!ctx) return text.length * 6.5;\n if (f !== fontSet) {\n ctx.font = f;\n fontSet = f;\n }\n return ctx.measureText(text).width;\n };\n\n const painter = ctx ? createCanvas2dPainter(ctx) : null;\n\n const g = globalThis as {\n requestAnimationFrame?: (cb: () => void) => number;\n cancelAnimationFrame?: (id: number) => void;\n };\n\n const render = () => {\n frameId = null;\n if (destroyed || !ctx || !painter) return;\n const scene = controller.getScene();\n if (!scene) return;\n const pw = Math.max(1, Math.round(width * dpr));\n const ph = Math.max(1, Math.round(height * dpr));\n if (canvas.width !== pw) canvas.width = pw;\n if (canvas.height !== ph) canvas.height = ph;\n fontSet = \"\";\n if (itemsModel !== scene.model) {\n itemsModel = scene.model;\n // a new model (any setOptions) keeps the items when nothing they\n // depend on changed\n const key = itemsSignature(\n scene.model,\n themeId(scene.theme),\n (index) => options.series[index]?.stack,\n );\n if (key !== itemsKey) {\n itemsKey = key;\n origin = { x: mid(scene.model.base.x), y: mid(scene.model.base.y) };\n items = buildItems(scene.model, origin, ++version);\n }\n }\n drawScene(ctx, scene, items, origin, dpr, painter);\n fontSet = \"\";\n };\n\n const schedule = () => {\n if (destroyed || frameId !== null) return;\n if (canvas.requestAnimationFrame)\n frameId = canvas.requestAnimationFrame(render);\n else if (g.requestAnimationFrame) frameId = g.requestAnimationFrame(render);\n else frameId = setTimeout(render, 16) as unknown as number;\n };\n\n const controller = createChartController({\n options: config.options,\n theme: config.theme,\n measureText,\n onInvalidate: schedule,\n });\n controller.setSize(width, height);\n\n const touchOptions = (t: ChartTouch, i: number): ChartPointerOptions => ({\n id: t.identifier ?? i,\n touch: true,\n });\n\n return {\n setOptions: (o) => {\n options = o;\n controller.setOptions(o);\n },\n setTheme: (t) => controller.setTheme(t),\n resize(w, h, ratio) {\n width = w;\n height = h;\n if (ratio) dpr = ratio;\n controller.setSize(w, h);\n schedule();\n },\n render() {\n if (frameId !== null) {\n if (canvas.cancelAnimationFrame) canvas.cancelAnimationFrame(frameId);\n else if (g.cancelAnimationFrame) g.cancelAnimationFrame(frameId);\n else clearTimeout(frameId);\n }\n render();\n },\n touchStart(touches) {\n touches.forEach((t, i) =>\n controller.pointerDown(t.x, t.y, touchOptions(t, i)),\n );\n },\n touchMove(touches) {\n touches.forEach((t, i) =>\n controller.pointerMove(t.x, t.y, touchOptions(t, i)),\n );\n },\n touchEnd(touches) {\n touches.forEach((t, i) =>\n controller.pointerUp(t.x, t.y, touchOptions(t, i)),\n );\n },\n touchCancel(touches = [{ x: 0, y: 0 }]) {\n touches.forEach((t, i) => controller.pointerCancel(touchOptions(t, i)));\n },\n pointerDown: (x, y, o) => controller.pointerDown(x, y, o),\n pointerMove: (x, y, o) => controller.pointerMove(x, y, o),\n pointerUp: (x, y, o) => controller.pointerUp(x, y, o),\n pointerLeave: () => controller.pointerLeave(),\n zoomAt: (x, y, f) => controller.zoomAt(x, y, f),\n resetZoom: () => controller.resetZoom(),\n getView: () => controller.getView(),\n setView: (v) => controller.setView(v),\n toggleSeries: (id) => controller.toggleSeries(id),\n clearHover: () => controller.clearHover(),\n getPlotRect: () => controller.getPlotRect(),\n toPixel: (x, y) => controller.toPixel(x, y),\n fromPixel: (x, y) => controller.fromPixel(x, y),\n getController: () => controller,\n on: (type, listener) => controller.on(type, listener),\n destroy() {\n if (destroyed) return;\n destroyed = true;\n if (frameId !== null) {\n if (canvas.cancelAnimationFrame) canvas.cancelAnimationFrame(frameId);\n else if (g.cancelAnimationFrame) g.cancelAnimationFrame(frameId);\n else clearTimeout(frameId);\n }\n painter?.destroy();\n controller.destroy();\n },\n };\n};\n"],"mappings":"oLA+FA,IAAMa,EAAO,IAAyBC,EAAE,GAAKA,EAAE,IAAM,EAE/CC,GACJ,EACA,EACA,EACA,EACA,EACA,IACG,CACHC,EAAI,UAAU,EACdA,EAAI,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ACnD,CACF,EACA,YAAY,EAAU,CAAC,CAAE,EAAG,EAAG,EAAG,CAAE,CAAC,EAAG,CACtCwE,EAAQ,SAAS,EAAG,IAAMT,EAAW,cAAcM,EAAaC,EAAGtE,CAAC,CAAC,CAAC,CACxE,EACA,aAAc,EAAG,EAAG,IAAM+D,EAAW,YAAY3E,EAAGC,EAAGgC,CAAC,EACxD,aAAc,EAAG,EAAG,IAAM0C,EAAW,YAAY3E,EAAGC,EAAGgC,CAAC,EACxD,WAAY,EAAG,EAAG,IAAM0C,EAAW,UAAU3E,EAAGC,EAAGgC,CAAC,EACpD,iBAAoB0C,EAAW,aAAa,EAC5C,QAAS,EAAG,EAAG,IAAMA,EAAW,OAAO3E,EAAGC,EAAGsE,CAAC,EAC9C,cAAiBI,EAAW,UAAU,EACtC,YAAeA,EAAW,QAAQ,EAClC,QAAU,GAAMA,EAAW,QAAQU,CAAC,EACpC,aAAe,GAAOV,EAAW,aAAaR,CAAE,EAChD,eAAkBQ,EAAW,WAAW,EACxC,gBAAmBA,EAAW,YAAY,EAC1C,SAAU,EAAG,IAAMA,EAAW,QAAQ3E,EAAGC,CAAC,EAC1C,WAAY,EAAG,IAAM0E,EAAW,UAAU3E,EAAGC,CAAC,EAC9C,kBAAqB0E,EACrB,IAAK,EAAM,IAAaA,EAAW,GAAGW,EAAMC,CAAQ,EACpD,SAAU,CACJ5B,IACJ,EAAY,GACRC,IAAY,OACVF,EAAO,qBAAsBA,EAAO,qBAAqBE,CAAO,EAC3Da,EAAE,qBAAsBA,EAAE,qBAAqBb,CAAO,EAC1D,aAAaA,CAAO,GAE3BnB,GAAS,QAAQ,EACjBkC,EAAW,QAAQ,EACrB,CACF,CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartController, ChartControllerEventMap, ChartPointerOptions, ChartScene } from './controller.cjs';
|
|
1
|
+
import { ChartController, ChartControllerEventMap, ChartPointerOptions, ChartPrimitive, ChartScene } from './controller.cjs';
|
|
2
2
|
import { Origin } from './items.cjs';
|
|
3
3
|
import { RenderItem } from './renderers/types.cjs';
|
|
4
4
|
import { ChartThemeInput } from './theme.cjs';
|
|
@@ -74,6 +74,16 @@ export interface CanvasChartInstance {
|
|
|
74
74
|
on<K extends keyof ChartControllerEventMap>(type: K, listener: (event: ChartControllerEventMap[K]) => void): () => void;
|
|
75
75
|
destroy(): void;
|
|
76
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Draws the shapes of `scenePrimitives` (CSS pixels of the chart) clipped to
|
|
79
|
+
* the plot: the data of horizontal charts
|
|
80
|
+
*/
|
|
81
|
+
export declare const drawPrimitives: (ctx: CanvasRenderingContext2D, primitives: readonly ChartPrimitive[], plot: {
|
|
82
|
+
x: number;
|
|
83
|
+
y: number;
|
|
84
|
+
width: number;
|
|
85
|
+
height: number;
|
|
86
|
+
}) => void;
|
|
77
87
|
/** Draws a scene (legend, axes, data, labels, hover) on a 2D context */
|
|
78
88
|
export declare const drawScene: (ctx: CanvasRenderingContext2D, scene: ChartScene, items: readonly RenderItem[], origin: Origin, pixelRatio: number, painter?: import('./renderers/canvas2d.cjs').Canvas2dPainter) => void;
|
|
79
89
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartController, ChartControllerEventMap, ChartPointerOptions, ChartScene } from './controller.js';
|
|
1
|
+
import { ChartController, ChartControllerEventMap, ChartPointerOptions, ChartPrimitive, ChartScene } from './controller.js';
|
|
2
2
|
import { Origin } from './items.js';
|
|
3
3
|
import { RenderItem } from './renderers/types.js';
|
|
4
4
|
import { ChartThemeInput } from './theme.js';
|
|
@@ -74,6 +74,16 @@ export interface CanvasChartInstance {
|
|
|
74
74
|
on<K extends keyof ChartControllerEventMap>(type: K, listener: (event: ChartControllerEventMap[K]) => void): () => void;
|
|
75
75
|
destroy(): void;
|
|
76
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Draws the shapes of `scenePrimitives` (CSS pixels of the chart) clipped to
|
|
79
|
+
* the plot: the data of horizontal charts
|
|
80
|
+
*/
|
|
81
|
+
export declare const drawPrimitives: (ctx: CanvasRenderingContext2D, primitives: readonly ChartPrimitive[], plot: {
|
|
82
|
+
x: number;
|
|
83
|
+
y: number;
|
|
84
|
+
width: number;
|
|
85
|
+
height: number;
|
|
86
|
+
}) => void;
|
|
77
87
|
/** Draws a scene (legend, axes, data, labels, hover) on a 2D context */
|
|
78
88
|
export declare const drawScene: (ctx: CanvasRenderingContext2D, scene: ChartScene, items: readonly RenderItem[], origin: Origin, pixelRatio: number, painter?: import('./renderers/canvas2d.js').Canvas2dPainter) => void;
|
|
79
89
|
/**
|