@neural-charts/native 0.0.0-stage → 0.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -2
- package/THIRD-PARTY-NOTICES.md +15 -0
- package/docs/guide.md +783 -0
- package/library/annular-hit.d.ts +10 -0
- package/library/annular-hit.d.ts.map +1 -0
- package/library/annular-hit.js +43 -0
- package/library/annular-hit.js.map +1 -0
- package/library/chart-capabilities.d.ts +326 -0
- package/library/chart-capabilities.d.ts.map +1 -0
- package/library/chart-capabilities.js +39 -0
- package/library/chart-capabilities.js.map +1 -0
- package/library/circular-scene.d.ts +55 -0
- package/library/circular-scene.d.ts.map +1 -0
- package/library/circular-scene.js +39 -0
- package/library/circular-scene.js.map +1 -0
- package/library/comparison-render.d.ts +18 -0
- package/library/comparison-render.d.ts.map +1 -0
- package/library/comparison-render.js +33 -0
- package/library/comparison-render.js.map +1 -0
- package/library/comparison-scene.d.ts +40 -0
- package/library/comparison-scene.d.ts.map +1 -0
- package/library/comparison-scene.js +77 -0
- package/library/comparison-scene.js.map +1 -0
- package/library/composition-scene.d.ts +35 -0
- package/library/composition-scene.d.ts.map +1 -0
- package/library/composition-scene.js +55 -0
- package/library/composition-scene.js.map +1 -0
- package/library/contour-hit-index.d.ts +15 -0
- package/library/contour-hit-index.d.ts.map +1 -0
- package/library/contour-hit-index.js +75 -0
- package/library/contour-hit-index.js.map +1 -0
- package/library/contour-label-anchors.d.ts +9 -0
- package/library/contour-label-anchors.d.ts.map +1 -0
- package/library/contour-label-anchors.js +20 -0
- package/library/contour-label-anchors.js.map +1 -0
- package/library/contour-scene.d.ts +10 -0
- package/library/contour-scene.d.ts.map +1 -0
- package/library/contour-scene.js +76 -0
- package/library/contour-scene.js.map +1 -0
- package/library/contracts.d.ts +445 -0
- package/library/contracts.d.ts.map +1 -0
- package/library/contracts.js +2 -0
- package/library/contracts.js.map +1 -0
- package/library/dendrogram-scene.d.ts +7 -0
- package/library/dendrogram-scene.d.ts.map +1 -0
- package/library/dendrogram-scene.js +28 -0
- package/library/dendrogram-scene.js.map +1 -0
- package/library/empty-state.d.ts +8 -0
- package/library/empty-state.d.ts.map +1 -0
- package/library/empty-state.js +30 -0
- package/library/empty-state.js.map +1 -0
- package/library/heatmap-hit.d.ts +27 -0
- package/library/heatmap-hit.d.ts.map +1 -0
- package/library/heatmap-hit.js +56 -0
- package/library/heatmap-hit.js.map +1 -0
- package/library/heatmap-scene.d.ts +17 -0
- package/library/heatmap-scene.d.ts.map +1 -0
- package/library/heatmap-scene.js +85 -0
- package/library/heatmap-scene.js.map +1 -0
- package/library/index.d.ts +14 -0
- package/library/index.d.ts.map +1 -0
- package/library/index.js +4 -0
- package/library/index.js.map +1 -0
- package/library/interaction-content.d.ts +4 -0
- package/library/interaction-content.d.ts.map +1 -0
- package/library/interaction-content.js +28 -0
- package/library/interaction-content.js.map +1 -0
- package/library/interaction.d.ts +75 -0
- package/library/interaction.d.ts.map +1 -0
- package/library/interaction.js +523 -0
- package/library/interaction.js.map +1 -0
- package/library/marker-style.d.ts +24 -0
- package/library/marker-style.d.ts.map +1 -0
- package/library/marker-style.js +43 -0
- package/library/marker-style.js.map +1 -0
- package/library/parallel-scene.d.ts +11 -0
- package/library/parallel-scene.d.ts.map +1 -0
- package/library/parallel-scene.js +44 -0
- package/library/parallel-scene.js.map +1 -0
- package/library/path-validation.d.ts +3 -0
- package/library/path-validation.d.ts.map +1 -0
- package/library/path-validation.js +78 -0
- package/library/path-validation.js.map +1 -0
- package/library/pictorial-hit.d.ts +19 -0
- package/library/pictorial-hit.d.ts.map +1 -0
- package/library/pictorial-hit.js +73 -0
- package/library/pictorial-hit.js.map +1 -0
- package/library/pictorial-scene.d.ts +16 -0
- package/library/pictorial-scene.d.ts.map +1 -0
- package/library/pictorial-scene.js +73 -0
- package/library/pictorial-scene.js.map +1 -0
- package/library/point-label-placement.d.ts +34 -0
- package/library/point-label-placement.d.ts.map +1 -0
- package/library/point-label-placement.js +24 -0
- package/library/point-label-placement.js.map +1 -0
- package/library/polar-grid.d.ts +5 -0
- package/library/polar-grid.d.ts.map +1 -0
- package/library/polar-grid.js +28 -0
- package/library/polar-grid.js.map +1 -0
- package/library/polygon-hit.d.ts +18 -0
- package/library/polygon-hit.d.ts.map +1 -0
- package/library/polygon-hit.js +98 -0
- package/library/polygon-hit.js.map +1 -0
- package/library/profile-scene.d.ts +11 -0
- package/library/profile-scene.d.ts.map +1 -0
- package/library/profile-scene.js +51 -0
- package/library/profile-scene.js.map +1 -0
- package/library/relationship-hit-index.d.ts +12 -0
- package/library/relationship-hit-index.d.ts.map +1 -0
- package/library/relationship-hit-index.js +87 -0
- package/library/relationship-hit-index.js.map +1 -0
- package/library/relationship-scene.d.ts +12 -0
- package/library/relationship-scene.d.ts.map +1 -0
- package/library/relationship-scene.js +62 -0
- package/library/relationship-scene.js.map +1 -0
- package/library/scene-paint.d.ts +29 -0
- package/library/scene-paint.d.ts.map +1 -0
- package/library/scene-paint.js +123 -0
- package/library/scene-paint.js.map +1 -0
- package/library/scene-styles.d.ts +13 -0
- package/library/scene-styles.d.ts.map +1 -0
- package/library/scene-styles.js +135 -0
- package/library/scene-styles.js.map +1 -0
- package/library/scene.d.ts +49 -0
- package/library/scene.d.ts.map +1 -0
- package/library/scene.js +533 -0
- package/library/scene.js.map +1 -0
- package/library/temporal-hit-index.d.ts +13 -0
- package/library/temporal-hit-index.d.ts.map +1 -0
- package/library/temporal-hit-index.js +71 -0
- package/library/temporal-hit-index.js.map +1 -0
- package/library/temporal-scene.d.ts +6 -0
- package/library/temporal-scene.d.ts.map +1 -0
- package/library/temporal-scene.js +70 -0
- package/library/temporal-scene.js.map +1 -0
- package/library/tile-index.d.ts +11 -0
- package/library/tile-index.d.ts.map +1 -0
- package/library/tile-index.js +37 -0
- package/library/tile-index.js.map +1 -0
- package/library/tilemap-hit.d.ts +11 -0
- package/library/tilemap-hit.d.ts.map +1 -0
- package/library/tilemap-hit.js +63 -0
- package/library/tilemap-hit.js.map +1 -0
- package/library/tilemap-scene.d.ts +24 -0
- package/library/tilemap-scene.d.ts.map +1 -0
- package/library/tilemap-scene.js +125 -0
- package/library/tilemap-scene.js.map +1 -0
- package/library/uncertainty-scene.d.ts +11 -0
- package/library/uncertainty-scene.d.ts.map +1 -0
- package/library/uncertainty-scene.js +61 -0
- package/library/uncertainty-scene.js.map +1 -0
- package/library/venn-hit.d.ts +21 -0
- package/library/venn-hit.d.ts.map +1 -0
- package/library/venn-hit.js +37 -0
- package/library/venn-hit.js.map +1 -0
- package/library/venn-scene.d.ts +14 -0
- package/library/venn-scene.d.ts.map +1 -0
- package/library/venn-scene.js +84 -0
- package/library/venn-scene.js.map +1 -0
- package/library/wordcloud-scene.d.ts +19 -0
- package/library/wordcloud-scene.d.ts.map +1 -0
- package/library/wordcloud-scene.js +58 -0
- package/library/wordcloud-scene.js.map +1 -0
- package/native/activity.d.ts +14 -0
- package/native/activity.d.ts.map +1 -0
- package/native/activity.js +31 -0
- package/native/activity.js.map +1 -0
- package/native/bar-labels.d.ts +4 -0
- package/native/bar-labels.d.ts.map +1 -0
- package/native/bar-labels.js +16 -0
- package/native/bar-labels.js.map +1 -0
- package/native/bubble-entrance.d.ts +15 -0
- package/native/bubble-entrance.d.ts.map +1 -0
- package/native/bubble-entrance.js +27 -0
- package/native/bubble-entrance.js.map +1 -0
- package/native/chart-drilldown.d.ts +57 -0
- package/native/chart-drilldown.d.ts.map +1 -0
- package/native/chart-drilldown.js +118 -0
- package/native/chart-drilldown.js.map +1 -0
- package/native/chart-motion.d.ts +69 -0
- package/native/chart-motion.d.ts.map +1 -0
- package/native/chart-motion.js +165 -0
- package/native/chart-motion.js.map +1 -0
- package/native/chart-panels-options.d.ts +77 -0
- package/native/chart-panels-options.d.ts.map +1 -0
- package/native/chart-panels-options.js +2 -0
- package/native/chart-panels-options.js.map +1 -0
- package/native/chart-panels-state.d.ts +34 -0
- package/native/chart-panels-state.d.ts.map +1 -0
- package/native/chart-panels-state.js +198 -0
- package/native/chart-panels-state.js.map +1 -0
- package/native/chart-panels.d.ts +43 -0
- package/native/chart-panels.d.ts.map +1 -0
- package/native/chart-panels.js +107 -0
- package/native/chart-panels.js.map +1 -0
- package/native/chart-presentation.d.ts +40 -0
- package/native/chart-presentation.d.ts.map +1 -0
- package/native/chart-presentation.js +16 -0
- package/native/chart-presentation.js.map +1 -0
- package/native/chart-type.d.ts +65 -0
- package/native/chart-type.d.ts.map +1 -0
- package/native/chart-type.js +66 -0
- package/native/chart-type.js.map +1 -0
- package/native/chart.d.ts +571 -0
- package/native/chart.d.ts.map +1 -0
- package/native/chart.js +1417 -0
- package/native/chart.js.map +1 -0
- package/native/circular-options.d.ts +17 -0
- package/native/circular-options.d.ts.map +1 -0
- package/native/circular-options.js +2 -0
- package/native/circular-options.js.map +1 -0
- package/native/comparison-data.d.ts +64 -0
- package/native/comparison-data.d.ts.map +1 -0
- package/native/comparison-data.js +2 -0
- package/native/comparison-data.js.map +1 -0
- package/native/comparison-format.d.ts +16 -0
- package/native/comparison-format.d.ts.map +1 -0
- package/native/comparison-format.js +26 -0
- package/native/comparison-format.js.map +1 -0
- package/native/composition-options.d.ts +18 -0
- package/native/composition-options.d.ts.map +1 -0
- package/native/composition-options.js +2 -0
- package/native/composition-options.js.map +1 -0
- package/native/contour-data.d.ts +48 -0
- package/native/contour-data.d.ts.map +1 -0
- package/native/contour-data.js +2 -0
- package/native/contour-data.js.map +1 -0
- package/native/contour-format.d.ts +3 -0
- package/native/contour-format.d.ts.map +1 -0
- package/native/contour-format.js +11 -0
- package/native/contour-format.js.map +1 -0
- package/native/control-accessibility.d.ts +7 -0
- package/native/control-accessibility.d.ts.map +1 -0
- package/native/control-accessibility.js +9 -0
- package/native/control-accessibility.js.map +1 -0
- package/native/data-chart.d.ts +179 -0
- package/native/data-chart.d.ts.map +1 -0
- package/native/data-chart.js +415 -0
- package/native/data-chart.js.map +1 -0
- package/native/data-identities.d.ts +10 -0
- package/native/data-identities.d.ts.map +1 -0
- package/native/data-identities.js +50 -0
- package/native/data-identities.js.map +1 -0
- package/native/data-options.d.ts +566 -0
- package/native/data-options.d.ts.map +1 -0
- package/native/data-options.js +2 -0
- package/native/data-options.js.map +1 -0
- package/native/data-planning.d.ts +84 -0
- package/native/data-planning.d.ts.map +1 -0
- package/native/data-planning.js +174 -0
- package/native/data-planning.js.map +1 -0
- package/native/dendrogram-data.d.ts +27 -0
- package/native/dendrogram-data.d.ts.map +1 -0
- package/native/dendrogram-data.js +2 -0
- package/native/dendrogram-data.js.map +1 -0
- package/native/dendrogram-labels.d.ts +13 -0
- package/native/dendrogram-labels.d.ts.map +1 -0
- package/native/dendrogram-labels.js +12 -0
- package/native/dendrogram-labels.js.map +1 -0
- package/native/drilldown-options.d.ts +62 -0
- package/native/drilldown-options.d.ts.map +1 -0
- package/native/drilldown-options.js +2 -0
- package/native/drilldown-options.js.map +1 -0
- package/native/drilldown-state.d.ts +18 -0
- package/native/drilldown-state.d.ts.map +1 -0
- package/native/drilldown-state.js +130 -0
- package/native/drilldown-state.js.map +1 -0
- package/native/gauge-entrance.d.ts +8 -0
- package/native/gauge-entrance.d.ts.map +1 -0
- package/native/gauge-entrance.js +42 -0
- package/native/gauge-entrance.js.map +1 -0
- package/native/haptics.d.ts +21 -0
- package/native/haptics.d.ts.map +1 -0
- package/native/haptics.js +66 -0
- package/native/haptics.js.map +1 -0
- package/native/heatmap-data.d.ts +56 -0
- package/native/heatmap-data.d.ts.map +1 -0
- package/native/heatmap-data.js +2 -0
- package/native/heatmap-data.js.map +1 -0
- package/native/index.d.ts +26 -0
- package/native/index.d.ts.map +1 -0
- package/native/index.js +11 -0
- package/native/index.js.map +1 -0
- package/native/input-bridge.d.ts +32 -0
- package/native/input-bridge.d.ts.map +1 -0
- package/native/input-bridge.js +3 -0
- package/native/input-bridge.js.map +1 -0
- package/native/input-lease.d.ts +23 -0
- package/native/input-lease.d.ts.map +1 -0
- package/native/input-lease.js +28 -0
- package/native/input-lease.js.map +1 -0
- package/native/label-contrast.d.ts +7 -0
- package/native/label-contrast.d.ts.map +1 -0
- package/native/label-contrast.js +33 -0
- package/native/label-contrast.js.map +1 -0
- package/native/label-halo.d.ts +9 -0
- package/native/label-halo.d.ts.map +1 -0
- package/native/label-halo.js +23 -0
- package/native/label-halo.js.map +1 -0
- package/native/label-ink.d.ts +3 -0
- package/native/label-ink.d.ts.map +1 -0
- package/native/label-ink.js +6 -0
- package/native/label-ink.js.map +1 -0
- package/native/legend.d.ts +21 -0
- package/native/legend.d.ts.map +1 -0
- package/native/legend.js +66 -0
- package/native/legend.js.map +1 -0
- package/native/log-axis-labels.d.ts +6 -0
- package/native/log-axis-labels.d.ts.map +1 -0
- package/native/log-axis-labels.js +16 -0
- package/native/log-axis-labels.js.map +1 -0
- package/native/log-options.d.ts +5 -0
- package/native/log-options.d.ts.map +1 -0
- package/native/log-options.js +6 -0
- package/native/log-options.js.map +1 -0
- package/native/number-format.d.ts +5 -0
- package/native/number-format.d.ts.map +1 -0
- package/native/number-format.js +24 -0
- package/native/number-format.js.map +1 -0
- package/native/observation-format.d.ts +8 -0
- package/native/observation-format.d.ts.map +1 -0
- package/native/observation-format.js +80 -0
- package/native/observation-format.js.map +1 -0
- package/native/options-validation.d.ts +8 -0
- package/native/options-validation.d.ts.map +1 -0
- package/native/options-validation.js +612 -0
- package/native/options-validation.js.map +1 -0
- package/native/panel-viewport-contract.d.ts +15 -0
- package/native/panel-viewport-contract.d.ts.map +1 -0
- package/native/panel-viewport-contract.js +86 -0
- package/native/panel-viewport-contract.js.map +1 -0
- package/native/panel-viewport-sync.d.ts +27 -0
- package/native/panel-viewport-sync.d.ts.map +1 -0
- package/native/panel-viewport-sync.js +96 -0
- package/native/panel-viewport-sync.js.map +1 -0
- package/native/parallel-data.d.ts +49 -0
- package/native/parallel-data.d.ts.map +1 -0
- package/native/parallel-data.js +2 -0
- package/native/parallel-data.js.map +1 -0
- package/native/parallel-labels.d.ts +20 -0
- package/native/parallel-labels.d.ts.map +1 -0
- package/native/parallel-labels.js +54 -0
- package/native/parallel-labels.js.map +1 -0
- package/native/pictorial-data.d.ts +78 -0
- package/native/pictorial-data.d.ts.map +1 -0
- package/native/pictorial-data.js +2 -0
- package/native/pictorial-data.js.map +1 -0
- package/native/pictorial-format.d.ts +8 -0
- package/native/pictorial-format.d.ts.map +1 -0
- package/native/pictorial-format.js +14 -0
- package/native/pictorial-format.js.map +1 -0
- package/native/pictorial-options.d.ts +2 -0
- package/native/pictorial-options.d.ts.map +1 -0
- package/native/pictorial-options.js +61 -0
- package/native/pictorial-options.js.map +1 -0
- package/native/pictorial-paint.d.ts +19 -0
- package/native/pictorial-paint.d.ts.map +1 -0
- package/native/pictorial-paint.js +31 -0
- package/native/pictorial-paint.js.map +1 -0
- package/native/plan.d.ts +45 -0
- package/native/plan.d.ts.map +1 -0
- package/native/plan.js +109 -0
- package/native/plan.js.map +1 -0
- package/native/profile-data.d.ts +82 -0
- package/native/profile-data.d.ts.map +1 -0
- package/native/profile-data.js +2 -0
- package/native/profile-data.js.map +1 -0
- package/native/profile-labels.d.ts +5 -0
- package/native/profile-labels.d.ts.map +1 -0
- package/native/profile-labels.js +19 -0
- package/native/profile-labels.js.map +1 -0
- package/native/radial-entrance.d.ts +24 -0
- package/native/radial-entrance.d.ts.map +1 -0
- package/native/radial-entrance.js +25 -0
- package/native/radial-entrance.js.map +1 -0
- package/native/radial-layer.d.ts +26 -0
- package/native/radial-layer.d.ts.map +1 -0
- package/native/radial-layer.js +76 -0
- package/native/radial-layer.js.map +1 -0
- package/native/reference-labels.d.ts +21 -0
- package/native/reference-labels.d.ts.map +1 -0
- package/native/reference-labels.js +36 -0
- package/native/reference-labels.js.map +1 -0
- package/native/reference-options.d.ts +23 -0
- package/native/reference-options.d.ts.map +1 -0
- package/native/reference-options.js +58 -0
- package/native/reference-options.js.map +1 -0
- package/native/relationship-data.d.ts +63 -0
- package/native/relationship-data.d.ts.map +1 -0
- package/native/relationship-data.js +2 -0
- package/native/relationship-data.js.map +1 -0
- package/native/relationship-format.d.ts +13 -0
- package/native/relationship-format.d.ts.map +1 -0
- package/native/relationship-format.js +26 -0
- package/native/relationship-format.js.map +1 -0
- package/native/selection-outlines.d.ts +12 -0
- package/native/selection-outlines.d.ts.map +1 -0
- package/native/selection-outlines.js +20 -0
- package/native/selection-outlines.js.map +1 -0
- package/native/temporal-format.d.ts +29 -0
- package/native/temporal-format.d.ts.map +1 -0
- package/native/temporal-format.js +41 -0
- package/native/temporal-format.js.map +1 -0
- package/native/text-style.d.ts +16 -0
- package/native/text-style.d.ts.map +1 -0
- package/native/text-style.js +14 -0
- package/native/text-style.js.map +1 -0
- package/native/tilemap-color-axis.d.ts +23 -0
- package/native/tilemap-color-axis.d.ts.map +1 -0
- package/native/tilemap-color-axis.js +77 -0
- package/native/tilemap-color-axis.js.map +1 -0
- package/native/tilemap-data.d.ts +71 -0
- package/native/tilemap-data.d.ts.map +1 -0
- package/native/tilemap-data.js +2 -0
- package/native/tilemap-data.js.map +1 -0
- package/native/tilemap-format.d.ts +3 -0
- package/native/tilemap-format.d.ts.map +1 -0
- package/native/tilemap-format.js +14 -0
- package/native/tilemap-format.js.map +1 -0
- package/native/tilemap-selection.d.ts +12 -0
- package/native/tilemap-selection.d.ts.map +1 -0
- package/native/tilemap-selection.js +8 -0
- package/native/tilemap-selection.js.map +1 -0
- package/native/time-axis-labels.d.ts +5 -0
- package/native/time-axis-labels.d.ts.map +1 -0
- package/native/time-axis-labels.js +38 -0
- package/native/time-axis-labels.js.map +1 -0
- package/native/tooltip-layout.d.ts +16 -0
- package/native/tooltip-layout.d.ts.map +1 -0
- package/native/tooltip-layout.js +33 -0
- package/native/tooltip-layout.js.map +1 -0
- package/native/tooltip-metrics.d.ts +4 -0
- package/native/tooltip-metrics.d.ts.map +1 -0
- package/native/tooltip-metrics.js +11 -0
- package/native/tooltip-metrics.js.map +1 -0
- package/native/tooltip-motion.d.ts +35 -0
- package/native/tooltip-motion.d.ts.map +1 -0
- package/native/tooltip-motion.js +36 -0
- package/native/tooltip-motion.js.map +1 -0
- package/native/tooltip-occupancy.d.ts +21 -0
- package/native/tooltip-occupancy.d.ts.map +1 -0
- package/native/tooltip-occupancy.js +67 -0
- package/native/tooltip-occupancy.js.map +1 -0
- package/native/tooltip.d.ts +144 -0
- package/native/tooltip.d.ts.map +1 -0
- package/native/tooltip.js +146 -0
- package/native/tooltip.js.map +1 -0
- package/native/uncertainty-data.d.ts +110 -0
- package/native/uncertainty-data.d.ts.map +1 -0
- package/native/uncertainty-data.js +2 -0
- package/native/uncertainty-data.js.map +1 -0
- package/native/uncertainty-format.d.ts +3 -0
- package/native/uncertainty-format.d.ts.map +1 -0
- package/native/uncertainty-format.js +10 -0
- package/native/uncertainty-format.js.map +1 -0
- package/native/value-labels.d.ts +30 -0
- package/native/value-labels.d.ts.map +1 -0
- package/native/value-labels.js +206 -0
- package/native/value-labels.js.map +1 -0
- package/native/variwide-labels.d.ts +14 -0
- package/native/variwide-labels.d.ts.map +1 -0
- package/native/variwide-labels.js +22 -0
- package/native/variwide-labels.js.map +1 -0
- package/native/venn-data.d.ts +29 -0
- package/native/venn-data.d.ts.map +1 -0
- package/native/venn-data.js +2 -0
- package/native/venn-data.js.map +1 -0
- package/native/viewport-gestures.d.ts +32 -0
- package/native/viewport-gestures.d.ts.map +1 -0
- package/native/viewport-gestures.js +43 -0
- package/native/viewport-gestures.js.map +1 -0
- package/native/viewport-motion.d.ts +67 -0
- package/native/viewport-motion.d.ts.map +1 -0
- package/native/viewport-motion.js +182 -0
- package/native/viewport-motion.js.map +1 -0
- package/native/viewport-state.d.ts +20 -0
- package/native/viewport-state.d.ts.map +1 -0
- package/native/viewport-state.js +14 -0
- package/native/viewport-state.js.map +1 -0
- package/native/waterfall-appearance.d.ts +8 -0
- package/native/waterfall-appearance.d.ts.map +1 -0
- package/native/waterfall-appearance.js +18 -0
- package/native/waterfall-appearance.js.map +1 -0
- package/native/wordcloud-data.d.ts +40 -0
- package/native/wordcloud-data.d.ts.map +1 -0
- package/native/wordcloud-data.js +2 -0
- package/native/wordcloud-data.js.map +1 -0
- package/native/wordcloud-layer.d.ts +29 -0
- package/native/wordcloud-layer.d.ts.map +1 -0
- package/native/wordcloud-layer.js +58 -0
- package/native/wordcloud-layer.js.map +1 -0
- package/native/wordcloud-measurements.d.ts +47 -0
- package/native/wordcloud-measurements.d.ts.map +1 -0
- package/native/wordcloud-measurements.js +137 -0
- package/native/wordcloud-measurements.js.map +1 -0
- package/native/wordcloud-planning.d.ts +23 -0
- package/native/wordcloud-planning.d.ts.map +1 -0
- package/native/wordcloud-planning.js +25 -0
- package/native/wordcloud-planning.js.map +1 -0
- package/native/wordcloud-probes.d.ts +48 -0
- package/native/wordcloud-probes.d.ts.map +1 -0
- package/native/wordcloud-probes.js +111 -0
- package/native/wordcloud-probes.js.map +1 -0
- package/native/wordcloud-text-backend.d.ts +16 -0
- package/native/wordcloud-text-backend.d.ts.map +1 -0
- package/native/wordcloud-text-backend.js +3 -0
- package/native/wordcloud-text-backend.js.map +1 -0
- package/package.json +58 -4
package/native/chart.js
ADDED
|
@@ -0,0 +1,1417 @@
|
|
|
1
|
+
import { dendrogramLabels } from './dendrogram-labels.js';
|
|
2
|
+
import { controlAccessibilityState } from './control-accessibility.js';
|
|
3
|
+
import { parallelLabels } from './parallel-labels.js';
|
|
4
|
+
import { CHART_TOOLTIP_MOTION_FACTORY } from './tooltip-motion.js';
|
|
5
|
+
import { tooltipOccupancy } from './tooltip-occupancy.js';
|
|
6
|
+
import { chartCapabilities } from '../library/chart-capabilities.js';
|
|
7
|
+
import { forcedLabelLimit, nativeValueLabels } from './value-labels.js';
|
|
8
|
+
import { LabelHalo } from './label-halo.js';
|
|
9
|
+
import { chartEmptyState } from '../library/empty-state.js';
|
|
10
|
+
import { labelInk } from './label-ink.js';
|
|
11
|
+
import { Component, DestroyRef, ElementRef, computed, effect, inject, input, output, signal, untracked, viewChild } from '@angular/core';
|
|
12
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
13
|
+
import { Pressable, Text, View, ScrollView } from '@ng-native/components';
|
|
14
|
+
import { NativeGesture } from '@ng-native/components/gestures';
|
|
15
|
+
import { AnimatedStyle } from '@ng-native/components/animations';
|
|
16
|
+
import { WorkletStyle } from '@ng-native/components/reanimated';
|
|
17
|
+
import { CHART_MOTION_FACTORY } from "./chart-motion.js";
|
|
18
|
+
import { NativeRadialLayer } from "./radial-layer.js";
|
|
19
|
+
import { radialEntrance } from "./radial-entrance.js";
|
|
20
|
+
import { bubbleEntrance } from "./bubble-entrance.js";
|
|
21
|
+
import { WordCloudLayer } from './wordcloud-layer.js';
|
|
22
|
+
import { NativeTilemapColorAxis } from './tilemap-color-axis.js';
|
|
23
|
+
import { NativeLegend } from "./legend.js";
|
|
24
|
+
import { Accessibility, ColorScheme } from '@ng-native/device';
|
|
25
|
+
import { NgIcon } from '@ng-native/icons';
|
|
26
|
+
import { Gesture } from 'react-native-gesture-handler';
|
|
27
|
+
import { NativeChartSession } from '../library/interaction.js';
|
|
28
|
+
import { ownScene, sceneSvg, sceneTransform, sceneMotionSignature, sceneInteractionKey, sameScenePaint } from '../library/scene.js';
|
|
29
|
+
import { observationValue, observationUnit, directionalDetails } from './observation-format.js';
|
|
30
|
+
import { tilemapCircleOutline } from './tilemap-selection.js';
|
|
31
|
+
import { sectorSelectionOutline } from './selection-outlines.js';
|
|
32
|
+
import { NativeTooltip } from "./tooltip.js";
|
|
33
|
+
import { tooltipLayout } from "./tooltip-layout.js";
|
|
34
|
+
import { compactTooltipHeight } from "./tooltip-metrics.js";
|
|
35
|
+
import { transformPlanViewport } from './plan.js';
|
|
36
|
+
import { sameViewportValue } from './viewport-state.js';
|
|
37
|
+
import { viewportCanvas, viewportGestureRequest, viewportScaleLimit } from './viewport-gestures.js';
|
|
38
|
+
import { CHART_VIEWPORT_MOTION_FACTORY } from './viewport-motion.js';
|
|
39
|
+
import { nativeReferenceLabels } from './reference-labels.js';
|
|
40
|
+
import { pointOverrideColor } from '../library/scene-paint.js';
|
|
41
|
+
import { sameInteractionContent } from '../library/interaction-content.js';
|
|
42
|
+
import { chartNumberFormatter } from "./number-format.js";
|
|
43
|
+
import { variwideAxisLabels } from './variwide-labels.js';
|
|
44
|
+
import { barCategoryLabels } from "./bar-labels.js";
|
|
45
|
+
import { ChartHaptics } from "./haptics.js";
|
|
46
|
+
import { ChartActivity } from './activity.js';
|
|
47
|
+
import { inputLease, pointLease } from './input-lease.js';
|
|
48
|
+
import { resolveMarkerStyle, sameMarkerStyle, markerSvg } from '../library/marker-style.js';
|
|
49
|
+
import { nativeTextStyle, sameTextStyle } from './text-style.js';
|
|
50
|
+
import { CHART_INPUT_BRIDGE } from "./input-bridge.js";
|
|
51
|
+
import * as i0 from "@angular/core";
|
|
52
|
+
export class NativeChart {
|
|
53
|
+
controlAccessibilityState = controlAccessibilityState;
|
|
54
|
+
/** Measured plot only; emitted on dimension changes, never on pointer moves. */
|
|
55
|
+
viewportChange = output();
|
|
56
|
+
scene = input.required(/* @ts-ignore */
|
|
57
|
+
...(ngDevMode ? [{ debugName: "scene" }] : /* istanbul ignore next */ []));
|
|
58
|
+
viewportContext = input(undefined, /* @ts-ignore */
|
|
59
|
+
...(ngDevMode ? [{ debugName: "viewportContext" }] : /* istanbul ignore next */ []));
|
|
60
|
+
viewportRequest = output();
|
|
61
|
+
hapticsEnabled = input(true, /* @ts-ignore */
|
|
62
|
+
...(ngDevMode ? [{ debugName: "hapticsEnabled" }] : /* istanbul ignore next */ []));
|
|
63
|
+
showColorAxis = input(true, /* @ts-ignore */
|
|
64
|
+
...(ngDevMode ? [{ debugName: "showColorAxis" }] : /* istanbul ignore next */ []));
|
|
65
|
+
showLegend = input(true, /* @ts-ignore */
|
|
66
|
+
...(ngDevMode ? [{ debugName: "showLegend" }] : /* istanbul ignore next */ []));
|
|
67
|
+
legendPosition = input('top', /* @ts-ignore */
|
|
68
|
+
...(ngDevMode ? [{ debugName: "legendPosition" }] : /* istanbul ignore next */ []));
|
|
69
|
+
legendInteractive = input(false, /* @ts-ignore */
|
|
70
|
+
...(ngDevMode ? [{ debugName: "legendInteractive" }] : /* istanbul ignore next */ []));
|
|
71
|
+
showDendrogramAxis = input(true, /* @ts-ignore */
|
|
72
|
+
...(ngDevMode ? [{ debugName: "showDendrogramAxis" }] : /* istanbul ignore next */ []));
|
|
73
|
+
showParallelAxes = input(true, /* @ts-ignore */
|
|
74
|
+
...(ngDevMode ? [{ debugName: "showParallelAxes" }] : /* istanbul ignore next */ []));
|
|
75
|
+
showParallelNames = input(true, /* @ts-ignore */
|
|
76
|
+
...(ngDevMode ? [{ debugName: "showParallelNames" }] : /* istanbul ignore next */ []));
|
|
77
|
+
showParallelTicks = input(true, /* @ts-ignore */
|
|
78
|
+
...(ngDevMode ? [{ debugName: "showParallelTicks" }] : /* istanbul ignore next */ []));
|
|
79
|
+
showGrid = input(true, /* @ts-ignore */
|
|
80
|
+
...(ngDevMode ? [{ debugName: "showGrid" }] : /* istanbul ignore next */ []));
|
|
81
|
+
showXAxis = input(true, /* @ts-ignore */
|
|
82
|
+
...(ngDevMode ? [{ debugName: "showXAxis" }] : /* istanbul ignore next */ []));
|
|
83
|
+
showYAxis = input(true, /* @ts-ignore */
|
|
84
|
+
...(ngDevMode ? [{ debugName: "showYAxis" }] : /* istanbul ignore next */ []));
|
|
85
|
+
showSecondaryYAxis = input(/* @ts-ignore */
|
|
86
|
+
...(ngDevMode ? [undefined, { debugName: "showSecondaryYAxis" }] : /* istanbul ignore next */ []));
|
|
87
|
+
secondaryYAxisTitle = input('', /* @ts-ignore */
|
|
88
|
+
...(ngDevMode ? [{ debugName: "secondaryYAxisTitle" }] : /* istanbul ignore next */ []));
|
|
89
|
+
secondaryYAxisTitleStyle = input(/* @ts-ignore */
|
|
90
|
+
...(ngDevMode ? [undefined, { debugName: "secondaryYAxisTitleStyle" }] : /* istanbul ignore next */ []));
|
|
91
|
+
secondaryAxisVisible = computed(() => !!this.scene().secondaryGrid && (this.showSecondaryYAxis() ?? this.showYAxis()), /* @ts-ignore */
|
|
92
|
+
...(ngDevMode ? [{ debugName: "secondaryAxisVisible" }] : /* istanbul ignore next */ []));
|
|
93
|
+
xAxisTitle = input('', /* @ts-ignore */
|
|
94
|
+
...(ngDevMode ? [{ debugName: "xAxisTitle" }] : /* istanbul ignore next */ []));
|
|
95
|
+
yAxisTitle = input('', /* @ts-ignore */
|
|
96
|
+
...(ngDevMode ? [{ debugName: "yAxisTitle" }] : /* istanbul ignore next */ []));
|
|
97
|
+
titleStyle = input(/* @ts-ignore */
|
|
98
|
+
...(ngDevMode ? [undefined, { debugName: "titleStyle" }] : /* istanbul ignore next */ []));
|
|
99
|
+
subtitleStyle = input(/* @ts-ignore */
|
|
100
|
+
...(ngDevMode ? [undefined, { debugName: "subtitleStyle" }] : /* istanbul ignore next */ []));
|
|
101
|
+
xAxisTitleStyle = input(/* @ts-ignore */
|
|
102
|
+
...(ngDevMode ? [undefined, { debugName: "xAxisTitleStyle" }] : /* istanbul ignore next */ []));
|
|
103
|
+
yAxisTitleStyle = input(/* @ts-ignore */
|
|
104
|
+
...(ngDevMode ? [undefined, { debugName: "yAxisTitleStyle" }] : /* istanbul ignore next */ []));
|
|
105
|
+
locale = input('es', /* @ts-ignore */
|
|
106
|
+
...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
|
|
107
|
+
theme = input('system', /* @ts-ignore */
|
|
108
|
+
...(ngDevMode ? [{ debugName: "theme" }] : /* istanbul ignore next */ []));
|
|
109
|
+
tooltipMode = input('floating', /* @ts-ignore */
|
|
110
|
+
...(ngDevMode ? [{ debugName: "tooltipMode" }] : /* istanbul ignore next */ []));
|
|
111
|
+
tooltipContent = input('point', /* @ts-ignore */
|
|
112
|
+
...(ngDevMode ? [{ debugName: "tooltipContent" }] : /* istanbul ignore next */ []));
|
|
113
|
+
tooltipPinnable = input(false, /* @ts-ignore */
|
|
114
|
+
...(ngDevMode ? [{ debugName: "tooltipPinnable" }] : /* istanbul ignore next */ []));
|
|
115
|
+
tooltipTemplate = input(/* @ts-ignore */
|
|
116
|
+
...(ngDevMode ? [undefined, { debugName: "tooltipTemplate" }] : /* istanbul ignore next */ []));
|
|
117
|
+
labelFormatters = input(/* @ts-ignore */
|
|
118
|
+
...(ngDevMode ? [undefined, { debugName: "labelFormatters" }] : /* istanbul ignore next */ []));
|
|
119
|
+
dockedTooltipContext = computed(() => {
|
|
120
|
+
const state = this.state();
|
|
121
|
+
return state.active ? { $implicit: state.active, shared: state.shared, pinned: this.pinned(), scrubbing: state.scrubbing, unit: this.scene().unit, locale: this.locale() } : undefined;
|
|
122
|
+
}, /* @ts-ignore */
|
|
123
|
+
...(ngDevMode ? [{ debugName: "dockedTooltipContext" }] : /* istanbul ignore next */ []));
|
|
124
|
+
showCrosshair = input(false, /* @ts-ignore */
|
|
125
|
+
...(ngDevMode ? [{ debugName: "showCrosshair" }] : /* istanbul ignore next */ []));
|
|
126
|
+
showMarkers = input(true, /* @ts-ignore */
|
|
127
|
+
...(ngDevMode ? [{ debugName: "showMarkers" }] : /* istanbul ignore next */ []));
|
|
128
|
+
showDataLabels = input(true, /* @ts-ignore */
|
|
129
|
+
...(ngDevMode ? [{ debugName: "showDataLabels" }] : /* istanbul ignore next */ []));
|
|
130
|
+
dataLabelLayout = input('auto', /* @ts-ignore */
|
|
131
|
+
...(ngDevMode ? [{ debugName: "dataLabelLayout" }] : /* istanbul ignore next */ []));
|
|
132
|
+
axisLabelLayout = input('auto', /* @ts-ignore */
|
|
133
|
+
...(ngDevMode ? [{ debugName: "axisLabelLayout" }] : /* istanbul ignore next */ []));
|
|
134
|
+
showStackLabels = input(false, /* @ts-ignore */
|
|
135
|
+
...(ngDevMode ? [{ debugName: "showStackLabels" }] : /* istanbul ignore next */ []));
|
|
136
|
+
strokeWidth = input(2, /* @ts-ignore */
|
|
137
|
+
...(ngDevMode ? [{ debugName: "strokeWidth" }] : /* istanbul ignore next */ []));
|
|
138
|
+
markerSize = input(6, /* @ts-ignore */
|
|
139
|
+
...(ngDevMode ? [{ debugName: "markerSize" }] : /* istanbul ignore next */ []));
|
|
140
|
+
markerStyle = input(/* @ts-ignore */
|
|
141
|
+
...(ngDevMode ? [undefined, { debugName: "markerStyle" }] : /* istanbul ignore next */ []));
|
|
142
|
+
plotHeight = input(260, /* @ts-ignore */
|
|
143
|
+
...(ngDevMode ? [{ debugName: "plotHeight" }] : /* istanbul ignore next */ []));
|
|
144
|
+
/** Only the data area and X labels grow; surrounding content keeps its width. */
|
|
145
|
+
minPlotWidth = input(0, /* @ts-ignore */
|
|
146
|
+
...(ngDevMode ? [{ debugName: "minPlotWidth" }] : /* istanbul ignore next */ []));
|
|
147
|
+
interactionMode = input('explore', /* @ts-ignore */
|
|
148
|
+
...(ngDevMode ? [{ debugName: "interactionMode" }] : /* istanbul ignore next */ []));
|
|
149
|
+
selectionControls = input(true, /* @ts-ignore */
|
|
150
|
+
...(ngDevMode ? [{ debugName: "selectionControls" }] : /* istanbul ignore next */ []));
|
|
151
|
+
animationEnabled = input(true, /* @ts-ignore */
|
|
152
|
+
...(ngDevMode ? [{ debugName: "animationEnabled" }] : /* istanbul ignore next */ []));
|
|
153
|
+
animationDuration = input(1100, /* @ts-ignore */
|
|
154
|
+
...(ngDevMode ? [{ debugName: "animationDuration" }] : /* istanbul ignore next */ []));
|
|
155
|
+
animationKey = input(0, /* @ts-ignore */
|
|
156
|
+
...(ngDevMode ? [{ debugName: "animationKey" }] : /* istanbul ignore next */ []));
|
|
157
|
+
previousDrawing = signal(null, /* @ts-ignore */
|
|
158
|
+
...(ngDevMode ? [{ debugName: "previousDrawing" }] : /* istanbul ignore next */ []));
|
|
159
|
+
previousDrawingTimer = null;
|
|
160
|
+
visibilitySignature = computed(() => JSON.stringify((this.ownedScene().legend ?? []).map(item => [item.id, item.visible])), /* @ts-ignore */
|
|
161
|
+
...(ngDevMode ? [{ debugName: "visibilitySignature" }] : /* istanbul ignore next */ []));
|
|
162
|
+
motion = inject(CHART_MOTION_FACTORY)();
|
|
163
|
+
tooltipMotion = inject(CHART_TOOLTIP_MOTION_FACTORY)();
|
|
164
|
+
tooltipMotionStyles = this.tooltipMotion.styles;
|
|
165
|
+
viewportFactory = inject(CHART_VIEWPORT_MOTION_FACTORY);
|
|
166
|
+
viewportDriver = signal(null, /* @ts-ignore */
|
|
167
|
+
...(ngDevMode ? [{ debugName: "viewportDriver" }] : /* istanbul ignore next */ []));
|
|
168
|
+
viewportSnapshot = signal(null, /* @ts-ignore */
|
|
169
|
+
...(ngDevMode ? [{ debugName: "viewportSnapshot" }] : /* istanbul ignore next */ []));
|
|
170
|
+
viewportInteracting = signal(false, /* @ts-ignore */
|
|
171
|
+
...(ngDevMode ? [{ debugName: "viewportInteracting" }] : /* istanbul ignore next */ []));
|
|
172
|
+
viewportSession = null;
|
|
173
|
+
viewportFrame = null;
|
|
174
|
+
interactionChange = output();
|
|
175
|
+
legendChange = output();
|
|
176
|
+
state = signal({ active: null, selected: null, scrubbing: false }, /* @ts-ignore */
|
|
177
|
+
...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
|
|
178
|
+
pinned = computed(() => this.state().pinned === true, /* @ts-ignore */
|
|
179
|
+
...(ngDevMode ? [{ debugName: "pinned" }] : /* istanbul ignore next */ []));
|
|
180
|
+
viewport = signal(undefined, /* @ts-ignore */
|
|
181
|
+
...(ngDevMode ? [{ debugName: "viewport" }] : /* istanbul ignore next */ []));
|
|
182
|
+
plotScroller = viewChild('plotScroller', /* @ts-ignore */
|
|
183
|
+
...(ngDevMode ? [{ debugName: "plotScroller" }] : /* istanbul ignore next */ []));
|
|
184
|
+
visibleWidth = signal(0, /* @ts-ignore */
|
|
185
|
+
...(ngDevMode ? [{ debugName: "visibleWidth" }] : /* istanbul ignore next */ []));
|
|
186
|
+
scrollX = signal(0, /* @ts-ignore */
|
|
187
|
+
...(ngDevMode ? [{ debugName: "scrollX" }] : /* istanbul ignore next */ []));
|
|
188
|
+
bodyWidth = signal(0, /* @ts-ignore */
|
|
189
|
+
...(ngDevMode ? [{ debugName: "bodyWidth" }] : /* istanbul ignore next */ []));
|
|
190
|
+
effectiveLegendPosition = computed(() => {
|
|
191
|
+
const position = this.legendPosition();
|
|
192
|
+
return this.bodyWidth() >= 640 ? position : position === 'left' ? 'top' : position === 'right' ? 'bottom' : position;
|
|
193
|
+
}, /* @ts-ignore */
|
|
194
|
+
...(ngDevMode ? [{ debugName: "effectiveLegendPosition" }] : /* istanbul ignore next */ []));
|
|
195
|
+
scrollContentStyle = { flexGrow: 1 };
|
|
196
|
+
boundedMinimumWidth = computed(() => this.cartesian() || this.ownedScene().family === 'arcdiagram' || this.ownedScene().parallel?.coordinates === 'cartesian' ? Math.max(0, Math.min(1600, Number.isFinite(this.minPlotWidth()) ? this.minPlotWidth() : 0)) : 0, /* @ts-ignore */
|
|
197
|
+
...(ngDevMode ? [{ debugName: "boundedMinimumWidth" }] : /* istanbul ignore next */ []));
|
|
198
|
+
contentWidth = computed(() => Math.max(this.visibleWidth(), this.boundedMinimumWidth()), /* @ts-ignore */
|
|
199
|
+
...(ngDevMode ? [{ debugName: "contentWidth" }] : /* istanbul ignore next */ []));
|
|
200
|
+
scrolling = computed(() => this.visibleWidth() > 0 && this.contentWidth() > this.visibleWidth() + 1, /* @ts-ignore */
|
|
201
|
+
...(ngDevMode ? [{ debugName: "scrolling" }] : /* istanbul ignore next */ []));
|
|
202
|
+
hasViewportWindow = computed(() => { const value = this.viewportContext()?.model.value; return !!(value?.x || value?.y); }, /* @ts-ignore */
|
|
203
|
+
...(ngDevMode ? [{ debugName: "hasViewportWindow" }] : /* istanbul ignore next */ []));
|
|
204
|
+
emptyNodeWindow = computed(() => this.hasViewportWindow() && ['treegraph', 'organization'].includes(this.scene().family) && this.ownedScene().observations.length === 0 && this.legendItems().some(item => item.visible), /* @ts-ignore */
|
|
205
|
+
...(ngDevMode ? [{ debugName: "emptyNodeWindow" }] : /* istanbul ignore next */ []));
|
|
206
|
+
viewportAxes = computed(() => { const context = this.viewportContext(); return context ? viewportCanvas(this.ownedScene(), context, this.viewport() ?? { width: this.scene().width, height: this.boundedHeight() }) : { horizontal: false, vertical: false }; }, /* @ts-ignore */
|
|
207
|
+
...(ngDevMode ? [{ debugName: "viewportAxes" }] : /* istanbul ignore next */ []));
|
|
208
|
+
tooltipViewport = computed(() => ({ width: this.visibleWidth() || this.viewport()?.width || 300, height: this.viewport()?.height ?? this.boundedHeight() }), /* @ts-ignore */
|
|
209
|
+
...(ngDevMode ? [{ debugName: "tooltipViewport" }] : /* istanbul ignore next */ []));
|
|
210
|
+
ownedScene = computed(() => ownScene(this.scene()), /* @ts-ignore */
|
|
211
|
+
...(ngDevMode ? [{ debugName: "ownedScene" }] : /* istanbul ignore next */ []));
|
|
212
|
+
paintScene = computed(() => this.ownedScene(), { ...(ngDevMode ? { debugName: "paintScene" } : /* istanbul ignore next */ {}), equal: sameScenePaint });
|
|
213
|
+
legendItems = computed(() => {
|
|
214
|
+
const scene = this.ownedScene(), items = scene.legend ?? scene.series.map(s => ({ ...s, visible: true }));
|
|
215
|
+
const formatter = this.labelFormatters()?.legendLabel;
|
|
216
|
+
return formatter ? items.map(item => ({ ...item, name: formatter({ ...item, text: item.name }) ?? item.name })) : items;
|
|
217
|
+
}, /* @ts-ignore */
|
|
218
|
+
...(ngDevMode ? [{ debugName: "legendItems" }] : /* istanbul ignore next */ []));
|
|
219
|
+
activePoints = computed(() => this.state().shared?.points ?? (this.state().active ? [this.state().active] : []), /* @ts-ignore */
|
|
220
|
+
...(ngDevMode ? [{ debugName: "activePoints" }] : /* istanbul ignore next */ []));
|
|
221
|
+
activeMarkerPoints = computed(() => this.ownedScene().mixedRanges ? this.activePoints().filter(point => point.lowValue === undefined) : this.activePoints(), /* @ts-ignore */
|
|
222
|
+
...(ngDevMode ? [{ debugName: "activeMarkerPoints" }] : /* istanbul ignore next */ []));
|
|
223
|
+
geometryScene = computed(() => this.ownedScene(), { ...(ngDevMode ? { debugName: "geometryScene" } : /* istanbul ignore next */ {}), equal: (a, b) => sceneInteractionKey(a) === sceneInteractionKey(b) });
|
|
224
|
+
gridScene = computed(() => this.ownedScene(), { ...(ngDevMode ? { debugName: "gridScene" } : /* istanbul ignore next */ {}), equal: (a, b) => sceneInteractionKey(a) === sceneInteractionKey(b) && (a.referenceBands?.length ?? 0) === (b.referenceBands?.length ?? 0) && (a.referenceBands ?? []).every((band, index) => band.id === b.referenceBands?.[index]?.id && band.color === b.referenceBands[index].color && band.opacity === b.referenceBands[index].opacity) });
|
|
225
|
+
colorScheme = inject(ColorScheme);
|
|
226
|
+
dark = computed(() => this.theme() === 'system' ? this.colorScheme.current() === 'dark' : this.theme() === 'dark', /* @ts-ignore */
|
|
227
|
+
...(ngDevMode ? [{ debugName: "dark" }] : /* istanbul ignore next */ []));
|
|
228
|
+
ink = computed(() => this.dark() ? '#EDF2FA' : '#263449', /* @ts-ignore */
|
|
229
|
+
...(ngDevMode ? [{ debugName: "ink" }] : /* istanbul ignore next */ []));
|
|
230
|
+
muted = computed(() => this.dark() ? '#B5C5DB' : '#536174', /* @ts-ignore */
|
|
231
|
+
...(ngDevMode ? [{ debugName: "muted" }] : /* istanbul ignore next */ []));
|
|
232
|
+
titleAppearance = computed(() => nativeTextStyle(this.titleStyle(), { align: 'left', color: this.ink(), fontSize: 23, fontWeight: 600 }), { ...(ngDevMode ? { debugName: "titleAppearance" } : /* istanbul ignore next */ {}), equal: sameTextStyle });
|
|
233
|
+
subtitleAppearance = computed(() => nativeTextStyle(this.subtitleStyle(), { align: 'left', color: this.muted(), fontSize: 15, fontWeight: 400 }), { ...(ngDevMode ? { debugName: "subtitleAppearance" } : /* istanbul ignore next */ {}), equal: sameTextStyle });
|
|
234
|
+
xTitleAppearance = computed(() => nativeTextStyle(this.xAxisTitleStyle(), { align: 'center', color: this.muted(), fontSize: 12, fontWeight: 400 }), { ...(ngDevMode ? { debugName: "xTitleAppearance" } : /* istanbul ignore next */ {}), equal: sameTextStyle });
|
|
235
|
+
yTitleAppearance = computed(() => nativeTextStyle(this.yAxisTitleStyle(), { align: 'left', color: this.muted(), fontSize: 12, fontWeight: 400 }), { ...(ngDevMode ? { debugName: "yTitleAppearance" } : /* istanbul ignore next */ {}), equal: sameTextStyle });
|
|
236
|
+
markerAppearance = computed(() => resolveMarkerStyle(this.markerStyle()), { ...(ngDevMode ? { debugName: "markerAppearance" } : /* istanbul ignore next */ {}), equal: sameMarkerStyle });
|
|
237
|
+
activeMarkerSymbols = computed(() => {
|
|
238
|
+
const style = this.markerAppearance();
|
|
239
|
+
return new Map(this.activeMarkerPoints().map(point => { const override = pointOverrideColor(this.paintScene(), point.id), color = override ?? point.color, fill = override ?? style.fillColor ?? (this.dark() ? '#17263A' : '#FFFFFF'); return [point.id.seriesId, `<svg viewBox="0 0 14 14">${markerSvg(7, 7, 11, color, { ...style, fillColor: fill, borderColor: style.borderColor ?? color, borderWidth: 3 })}</svg>`]; }));
|
|
240
|
+
}, /* @ts-ignore */
|
|
241
|
+
...(ngDevMode ? [{ debugName: "activeMarkerSymbols" }] : /* istanbul ignore next */ []));
|
|
242
|
+
referenceDrawing = computed(() => this.renderActive() ? sceneSvg(this.paintScene(), this.dark() ? '#35465E' : '#DFE5ED', this.viewport(), false, { layer: 'references', surfaceColor: this.dark() ? '#101C2C' : '#FFFFFF' }) : '', /* @ts-ignore */
|
|
243
|
+
...(ngDevMode ? [{ debugName: "referenceDrawing" }] : /* istanbul ignore next */ []));
|
|
244
|
+
referenceLabels = computed(() => nativeReferenceLabels(this.ownedScene(), this.viewport() ?? { width: this.scene().width, height: this.boundedHeight() }, this.accessibility.fontScale(), { x: this.scrollX(), width: this.tooltipViewport().width }, this.dark() ? '#E7EEF9' : '#17212B', this.dark() ? '#101C2C' : '#FFFFFF'), /* @ts-ignore */
|
|
245
|
+
...(ngDevMode ? [{ debugName: "referenceLabels" }] : /* istanbul ignore next */ []));
|
|
246
|
+
cartesian = computed(() => chartCapabilities[this.scene().family]?.axes === 'cartesian', /* @ts-ignore */
|
|
247
|
+
...(ngDevMode ? [{ debugName: "cartesian" }] : /* istanbul ignore next */ []));
|
|
248
|
+
hasAxes = computed(() => this.cartesian() || !!this.ownedScene().polarGrid, /* @ts-ignore */
|
|
249
|
+
...(ngDevMode ? [{ debugName: "hasAxes" }] : /* istanbul ignore next */ []));
|
|
250
|
+
dendrogramAxisLabels = computed(() => this.showDendrogramAxis() ? dendrogramLabels(this.ownedScene(), this.viewport() ?? { width: this.scene().width, height: this.boundedHeight() }, this.accessibility.fontScale()) : [], /* @ts-ignore */
|
|
251
|
+
...(ngDevMode ? [{ debugName: "dendrogramAxisLabels" }] : /* istanbul ignore next */ []));
|
|
252
|
+
parallelAxisLabels = computed(() => parallelLabels(this.ownedScene(), this.viewport() ?? { width: this.scene().width, height: this.boundedHeight() }, this.accessibility.fontScale(), { axes: this.showParallelAxes(), names: this.showParallelNames(), ticks: this.showParallelTicks() }), /* @ts-ignore */
|
|
253
|
+
...(ngDevMode ? [{ debugName: "parallelAxisLabels" }] : /* istanbul ignore next */ []));
|
|
254
|
+
polarLabels = computed(() => {
|
|
255
|
+
const scene = this.ownedScene(), g = scene.polarGrid;
|
|
256
|
+
if (!g)
|
|
257
|
+
return [];
|
|
258
|
+
const t = this.transform(), width = this.viewport()?.width ?? scene.width, scale = this.accessibility.fontScale();
|
|
259
|
+
if (width < 180 || scale > 1.5)
|
|
260
|
+
return [];
|
|
261
|
+
const labels = [], stride = Math.max(1, Math.ceil(g.spokes.length / 12));
|
|
262
|
+
if (this.showXAxis())
|
|
263
|
+
for (let i = 0; i < g.spokes.length; i += stride) {
|
|
264
|
+
const p = g.spokes[i], dx = p.x - g.cx, dy = p.y - g.cy, x = p.x * t.sx + t.x, y = p.y * t.sy + t.y, w = 64;
|
|
265
|
+
labels.push({ id: 'category:' + p.id, left: Math.max(0, Math.min(width - w, x + (dx > 1 ? 5 : dx < -1 ? -w - 5 : -w / 2))), top: Math.max(0, y + (dy > 1 ? 5 : dy < -1 ? -23 : -9)), width: w, text: p.label });
|
|
266
|
+
}
|
|
267
|
+
if (this.showYAxis())
|
|
268
|
+
for (const [i, p] of g.rings.entries())
|
|
269
|
+
if (p.radius > 0)
|
|
270
|
+
labels.push({ id: 'ring:' + i, left: g.cx * t.sx + t.x + 4, top: (g.cy - p.radius) * t.sy + t.y + 2, width: 46, text: p.label });
|
|
271
|
+
return labels;
|
|
272
|
+
}, /* @ts-ignore */
|
|
273
|
+
...(ngDevMode ? [{ debugName: "polarLabels" }] : /* istanbul ignore next */ []));
|
|
274
|
+
barLabels = computed(() => barCategoryLabels(this.ownedScene()), /* @ts-ignore */
|
|
275
|
+
...(ngDevMode ? [{ debugName: "barLabels" }] : /* istanbul ignore next */ []));
|
|
276
|
+
temporalYAxis = computed(() => this.scene().family === 'flame' || this.scene().family === 'xrange' || this.scene().family === 'timeline', /* @ts-ignore */
|
|
277
|
+
...(ngDevMode ? [{ debugName: "temporalYAxis" }] : /* istanbul ignore next */ []));
|
|
278
|
+
horizontalBars = computed(() => this.scene().family === 'bar' || this.scene().family === 'bullet' && this.scene().bulletOrientation === 'horizontal', /* @ts-ignore */
|
|
279
|
+
...(ngDevMode ? [{ debugName: "horizontalBars" }] : /* istanbul ignore next */ []));
|
|
280
|
+
categoryYAxis = computed(() => this.horizontalBars() || this.temporalYAxis() || this.scene().family === 'heatmap', /* @ts-ignore */
|
|
281
|
+
...(ngDevMode ? [{ debugName: "categoryYAxis" }] : /* istanbul ignore next */ []));
|
|
282
|
+
valueAxisWidth = computed(() => {
|
|
283
|
+
const scale = Math.max(1, this.accessibility.fontScale());
|
|
284
|
+
if (this.axisLabelLayout() === 'truncate' || (this.axisLabelLayout() === 'auto' && !this.labelFormatters()?.yAxisLabel))
|
|
285
|
+
return Math.min(128, 38 * scale);
|
|
286
|
+
const labels = [...this.primaryYTicks(), ...(this.secondaryYTicks() ?? [])];
|
|
287
|
+
const longest = Math.max(0, ...labels.map(tick => tick.label.length));
|
|
288
|
+
return Math.min(128, Math.max(38 * scale, 12 + longest * 7 * scale));
|
|
289
|
+
}, /* @ts-ignore */
|
|
290
|
+
...(ngDevMode ? [{ debugName: "valueAxisWidth" }] : /* istanbul ignore next */ []));
|
|
291
|
+
primaryAxisWidth = computed(() => {
|
|
292
|
+
if (!this.categoryYAxis())
|
|
293
|
+
return this.valueAxisWidth();
|
|
294
|
+
const width = this.temporalYAxis() ? 72 : 90;
|
|
295
|
+
if (this.axisLabelLayout() !== 'all')
|
|
296
|
+
return width;
|
|
297
|
+
const maxLength = this.barLabels().reduce((max, label) => Math.max(max, this.axisLabel('y', label.label, label.id, 'category').length), 0);
|
|
298
|
+
return Math.min(160, Math.max(width, 18 + maxLength * 8 * Math.max(1, this.accessibility.fontScale())));
|
|
299
|
+
}, /* @ts-ignore */
|
|
300
|
+
...(ngDevMode ? [{ debugName: "primaryAxisWidth" }] : /* istanbul ignore next */ []));
|
|
301
|
+
displayedYAxis = computed(() => this.showYAxis() && (this.scene().family !== 'timeline' || !!this.scene().yLabels?.length), /* @ts-ignore */
|
|
302
|
+
...(ngDevMode ? [{ debugName: "displayedYAxis" }] : /* istanbul ignore next */ []));
|
|
303
|
+
displayedCategoryLabels = computed(() => {
|
|
304
|
+
const labels = this.barLabels(), height = this.categoryLabelHeight();
|
|
305
|
+
let last;
|
|
306
|
+
const visible = this.axisLabelLayout() !== 'auto' ? labels : labels.filter(label => { const y = this.mapY(label.y); if (last !== undefined && Math.abs(y - last) < height)
|
|
307
|
+
return false; last = y; return true; });
|
|
308
|
+
return this.labelFormatters()?.yAxisLabel ? visible.map(label => ({ ...label, label: this.axisLabel('y', label.label, label.id, 'category') })) : visible;
|
|
309
|
+
}, /* @ts-ignore */
|
|
310
|
+
...(ngDevMode ? [{ debugName: "displayedCategoryLabels" }] : /* istanbul ignore next */ []));
|
|
311
|
+
categoryLabelHeight = computed(() => Math.min(80, (this.accessibility.fontScale() > 1.5 ? 18 : 32) * this.accessibility.fontScale()), /* @ts-ignore */
|
|
312
|
+
...(ngDevMode ? [{ debugName: "categoryLabelHeight" }] : /* istanbul ignore next */ []));
|
|
313
|
+
radialLabels = computed(() => {
|
|
314
|
+
const scene = this.ownedScene(), layout = this.dataLabelLayout(), force = layout !== 'auto';
|
|
315
|
+
if (!this.showDataLabels() || !['pie', 'donut'].includes(scene.family) || (!force && scene.observations.length > 8))
|
|
316
|
+
return [];
|
|
317
|
+
return scene.observations.filter(p => force ? p.hit?.type === 'sector' && (p.percentage ?? 0) > 0 : (p.percentage ?? 0) >= 5).slice(0, forcedLabelLimit).map(p => {
|
|
318
|
+
const rgb = [1, 3, 5].map(i => parseInt(p.color.slice(i, i + 2), 16) / 255).map(v => v <= .04045 ? v / 12.92 : ((v + .055) / 1.055) ** 2.4);
|
|
319
|
+
const luminance = rgb[0] * .2126 + rgb[1] * .7152 + rgb[2] * .0722;
|
|
320
|
+
const value = p.percentage ?? 0, text = new Intl.NumberFormat(this.locale(), { maximumFractionDigits: 1 }).format(value) + '%';
|
|
321
|
+
const label = this.labelFormatters()?.dataLabel?.({ point: p, value, text }) ?? text;
|
|
322
|
+
const width = force ? (layout === 'truncate' ? 52 : Math.min(this.contentWidth() || scene.width, Math.max(52, label.length * 9 * Math.max(1, this.accessibility.fontScale()) + 8))) : undefined;
|
|
323
|
+
return { id: p.id.pointId, x: p.x, y: p.y, text: label, width, ink: luminance > .179 ? '#000000' : '#FFFFFF' };
|
|
324
|
+
});
|
|
325
|
+
}, /* @ts-ignore */
|
|
326
|
+
...(ngDevMode ? [{ debugName: "radialLabels" }] : /* istanbul ignore next */ []));
|
|
327
|
+
boundedHeight = computed(() => Math.max(180, Math.min(600, Number.isFinite(this.plotHeight()) ? this.plotHeight() : 260)), /* @ts-ignore */
|
|
328
|
+
...(ngDevMode ? [{ debugName: "boundedHeight" }] : /* istanbul ignore next */ []));
|
|
329
|
+
valueLabels = computed(() => nativeValueLabels(this.ownedScene(), this.viewport() ?? { width: this.scene().width, height: this.boundedHeight() }, value => this.formatNumber()(value), { locale: this.locale(), points: this.showDataLabels(), stacks: this.showStackLabels(), fontScale: this.accessibility.fontScale(), left: this.scrollX(), visibleWidth: this.tooltipViewport().width, surfaceColor: this.dark() ? '#101C2C' : '#FFFFFF', layout: this.dataLabelLayout(), markerSize: this.showMarkers() ? this.markerSize() : 0, pointFormatter: this.labelFormatters()?.dataLabel }), /* @ts-ignore */
|
|
330
|
+
...(ngDevMode ? [{ debugName: "valueLabels" }] : /* istanbul ignore next */ []));
|
|
331
|
+
plainAnnotations = computed(() => (this.ownedScene().annotations ?? []).filter(a => !a.box && !a.stackTotal), /* @ts-ignore */
|
|
332
|
+
...(ngDevMode ? [{ debugName: "plainAnnotations" }] : /* istanbul ignore next */ []));
|
|
333
|
+
emptyState = computed(() => chartEmptyState(this.ownedScene(), this.locale()), /* @ts-ignore */
|
|
334
|
+
...(ngDevMode ? [{ debugName: "emptyState" }] : /* istanbul ignore next */ []));
|
|
335
|
+
activeTilemapCircle = computed(() => this.scene().family === 'tilemap' ? tilemapCircleOutline(this.state().active?.hit, this.viewport() ?? { width: this.scene().width, height: this.boundedHeight() }, this.transform(), this.dark() ? '#F2F6FC' : '#172438') : undefined, /* @ts-ignore */
|
|
336
|
+
...(ngDevMode ? [{ debugName: "activeTilemapCircle" }] : /* istanbul ignore next */ []));
|
|
337
|
+
activeVennDrawing = computed(() => { const point = this.state().active, venn = this.ownedScene().venn; if (!venn || !point?.venn)
|
|
338
|
+
return undefined; const circles = venn.layout.circles.filter(c => c.radius > 0 && (c.bit & point.venn.mask) !== 0); if (!circles.length)
|
|
339
|
+
return undefined; const view = this.viewport() ?? { width: this.scene().width, height: this.boundedHeight() }, t = this.transform(), unit = Math.sqrt(t.sx * t.sy), ink = this.dark() ? '#F2F6FC' : '#172438'; return '<svg viewBox="0 0 ' + view.width + ' ' + view.height + '"><g transform="translate(' + t.x + ' ' + t.y + ') scale(' + t.sx + ' ' + t.sy + ')">' + circles.map(c => '<circle cx="' + c.cx + '" cy="' + c.cy + '" r="' + c.radius + '" fill="none" stroke="' + ink + '" stroke-width="' + 4 / unit + '"/><circle cx="' + c.cx + '" cy="' + c.cy + '" r="' + c.radius + '" fill="none" stroke="#FFFFFF" stroke-width="' + 1 / unit + '"/>').join('') + '</g></svg>'; }, /* @ts-ignore */
|
|
340
|
+
...(ngDevMode ? [{ debugName: "activeVennDrawing" }] : /* istanbul ignore next */ []));
|
|
341
|
+
activePolygonDrawing = computed(() => {
|
|
342
|
+
const point = this.state().active, h = point?.hit;
|
|
343
|
+
if (h?.type !== 'polygon' || point?.relationship?.type === 'link' || point?.regression?.type === 'fit')
|
|
344
|
+
return undefined;
|
|
345
|
+
const view = this.viewport() ?? { width: this.scene().width, height: this.boundedHeight() }, t = this.transform(), path = h.vertices.map((p, i) => (i ? 'L' : 'M') + p.x + ' ' + p.y).join('') + 'Z', unit = Math.sqrt(t.sx * t.sy), ink = this.dark() ? '#F2F6FC' : '#172438';
|
|
346
|
+
return '<svg viewBox="0 0 ' + view.width + ' ' + view.height + '"><g transform="translate(' + t.x + ' ' + t.y + ') scale(' + t.sx + ' ' + t.sy + ')"><path d="' + path + '" fill="none" stroke="' + ink + '" stroke-width="' + 4 / unit + '"/><path d="' + path + '" fill="none" stroke="#FFFFFF" stroke-width="' + 2 / unit + '"/></g></svg>';
|
|
347
|
+
}, /* @ts-ignore */
|
|
348
|
+
...(ngDevMode ? [{ debugName: "activePolygonDrawing" }] : /* istanbul ignore next */ []));
|
|
349
|
+
activeItemDrawing = computed(() => {
|
|
350
|
+
if (!['item', 'treegraph', 'networkgraph', 'packedbubble'].includes(this.scene().family))
|
|
351
|
+
return undefined;
|
|
352
|
+
const id = this.state().active?.id;
|
|
353
|
+
if (!id)
|
|
354
|
+
return undefined;
|
|
355
|
+
const circles = this.ownedScene().series.find(s => s.id === id.seriesId)?.circles?.filter(c => c.pointId === id.pointId);
|
|
356
|
+
if (!circles?.length)
|
|
357
|
+
return undefined;
|
|
358
|
+
const view = this.viewport() ?? { width: this.scene().width, height: this.boundedHeight() }, t = this.transform(), ink = this.dark() ? '#F2F6FC' : '#172438';
|
|
359
|
+
const sourceClip = this.ownedScene().clip, pad = 3 + 1 / Math.min(t.sx, t.sy), clip = sourceClip ? { x: sourceClip.x - pad, y: sourceClip.y - pad, width: sourceClip.width + 2 * pad, height: sourceClip.height + 2 * pad } : undefined, clipId = 'nc-active-circles', defs = clip ? '<defs><clipPath id="' + clipId + '"><rect x="' + (t.x + clip.x * t.sx) + '" y="' + (t.y + clip.y * t.sy) + '" width="' + clip.width * t.sx + '" height="' + clip.height * t.sy + '"/></clipPath></defs>' : '';
|
|
360
|
+
return '<svg viewBox="0 0 ' + view.width + ' ' + view.height + '">' + defs + '<g' + (clip ? ' clip-path="url(#' + clipId + ')"' : '') + '>' + circles.map(c => '<circle cx="' + (t.x + c.cx * t.sx) + '" cy="' + (t.y + c.cy * t.sy) + '" r="' + (c.radius * Math.sqrt(t.sx * t.sy) + 2) + '" fill="none" stroke="' + ink + '" stroke-width="2"/>').join('') + '</g></svg>';
|
|
361
|
+
}, /* @ts-ignore */
|
|
362
|
+
...(ngDevMode ? [{ debugName: "activeItemDrawing" }] : /* istanbul ignore next */ []));
|
|
363
|
+
activeSectorDrawing = computed(() => sectorSelectionOutline(this.state().active?.hit, this.viewport() ?? { width: this.scene().width, height: this.boundedHeight() }, this.transform(), this.dark() ? '#F2F6FC' : '#172438'), /* @ts-ignore */
|
|
364
|
+
...(ngDevMode ? [{ debugName: "activeSectorDrawing" }] : /* istanbul ignore next */ []));
|
|
365
|
+
activeTile = computed(() => { const id = this.state().active?.id; if (this.scene().family === 'wordcloud')
|
|
366
|
+
return id ? this.ownedScene().series.find(s => s.id === id.seriesId)?.textGlyphs?.find(word => word.pointId === id.pointId)?.bounds : undefined; if (this.scene().family !== 'treemap')
|
|
367
|
+
return undefined; return id ? this.ownedScene().series.find(s => s.id === id.seriesId)?.bars?.find(rect => rect.pointId === id.pointId) : undefined; }, /* @ts-ignore */
|
|
368
|
+
...(ngDevMode ? [{ debugName: "activeTile" }] : /* istanbul ignore next */ []));
|
|
369
|
+
tileLabels = computed(() => { const scene = this.ownedScene(); if (!['flame', 'dendrogram', 'dependencywheel', 'arcdiagram', 'chord', 'sankey', 'sunburst', 'treemap', 'treegraph', 'organization', 'networkgraph', 'packedbubble'].includes(scene.family) || !this.showDataLabels())
|
|
370
|
+
return []; const t = this.transform(), colors = new Map(scene.series.map(s => [s.id, s.color])); return (scene.annotations ?? []).flatMap(a => a.box ? [{ text: a.text, left: this.mapX(a.x - a.box.width / 2), top: this.mapY(a.y - a.box.height / 2), width: a.box.width * t.sx, height: a.box.height * t.sy, color: ['dendrogram', 'dependencywheel', 'arcdiagram', 'chord', 'sankey', 'treegraph', 'networkgraph'].includes(scene.family) ? this.ink() : scene.family === 'packedbubble' ? labelInk(colors.get(a.box.seriesId), this.dark() ? '#101C2C' : '#FFFFFF', .64) : labelInk(colors.get(a.box.seriesId)) }] : []); }, /* @ts-ignore */
|
|
371
|
+
...(ngDevMode ? [{ debugName: "tileLabels" }] : /* istanbul ignore next */ []));
|
|
372
|
+
transform = computed(() => sceneTransform(this.ownedScene(), this.viewport() ?? { width: this.scene().width, height: this.boundedHeight() }), /* @ts-ignore */
|
|
373
|
+
...(ngDevMode ? [{ debugName: "transform" }] : /* istanbul ignore next */ []));
|
|
374
|
+
expandedTooltip = signal(false, /* @ts-ignore */
|
|
375
|
+
...(ngDevMode ? [{ debugName: "expandedTooltip" }] : /* istanbul ignore next */ []));
|
|
376
|
+
pinnedOverlay = computed(() => this.pinned() && this.tooltipMode() === 'floating' && !this.expandedTooltip() && this.accessibility.fontScale() <= 1.5 && this.tooltipViewport().width >= 200 && (this.viewport()?.height ?? this.boundedHeight()) >= 220, /* @ts-ignore */
|
|
377
|
+
...(ngDevMode ? [{ debugName: "pinnedOverlay" }] : /* istanbul ignore next */ []));
|
|
378
|
+
pinnedBodyHeight = computed(() => Math.min(220, (this.viewport()?.height ?? this.boundedHeight()) - 88), /* @ts-ignore */
|
|
379
|
+
...(ngDevMode ? [{ debugName: "pinnedBodyHeight" }] : /* istanbul ignore next */ []));
|
|
380
|
+
pinnedWidth = computed(() => this.tooltipViewport().width - 16, /* @ts-ignore */
|
|
381
|
+
...(ngDevMode ? [{ debugName: "pinnedWidth" }] : /* istanbul ignore next */ []));
|
|
382
|
+
toggle = (value) => !value;
|
|
383
|
+
tooltipActive = computed(() => this.state().active, /* @ts-ignore */
|
|
384
|
+
...(ngDevMode ? [{ debugName: "tooltipActive" }] : /* istanbul ignore next */ []));
|
|
385
|
+
tooltipShared = computed(() => this.state().shared, /* @ts-ignore */
|
|
386
|
+
...(ngDevMode ? [{ debugName: "tooltipShared" }] : /* istanbul ignore next */ []));
|
|
387
|
+
tooltipDetails = computed(() => { const point = this.tooltipActive(); return point && !this.tooltipShared() ? directionalDetails(point, this.formatNumber(), this.locale(), this.ownedScene().unit, this.ownedScene().family, this.ownedScene().regression) : []; }, /* @ts-ignore */
|
|
388
|
+
...(ngDevMode ? [{ debugName: "tooltipDetails" }] : /* istanbul ignore next */ []));
|
|
389
|
+
tooltipHeight = computed(() => compactTooltipHeight(this.tooltipActive(), this.tooltipShared(), this.accessibility.fontScale(), this.ownedScene().family, this.tooltipDetails().length), /* @ts-ignore */
|
|
390
|
+
...(ngDevMode ? [{ debugName: "tooltipHeight" }] : /* istanbul ignore next */ []));
|
|
391
|
+
fullTextTooltip = computed(() => {
|
|
392
|
+
const state = this.state();
|
|
393
|
+
// Prefer readable, stable full-text details over alternating overlay/panel
|
|
394
|
+
// placement for the same long series names at consecutive observations.
|
|
395
|
+
return state.shared ? state.shared.rows.some(row => row.name.length > 48) : !!state.active && (state.active.label.length + state.active.seriesName.length > 80);
|
|
396
|
+
}, /* @ts-ignore */
|
|
397
|
+
...(ngDevMode ? [{ debugName: "fullTextTooltip" }] : /* istanbul ignore next */ []));
|
|
398
|
+
dockTooltip = computed(() => this.tooltipMode() === 'docked' || (this.tooltipMode() === 'floating' && !this.pinnedOverlay() && (this.pinned() || (this.scene().family === 'boxplot' && !!this.state().shared) || this.expandedTooltip() || this.fullTextTooltip() || (this.state().shared?.rows.length ?? 0) > 4 || this.tooltipViewport().width < 160 || this.accessibility.fontScale() > 1.5 || !!this.state().active && this.tooltipPosition().docked)), /* @ts-ignore */
|
|
399
|
+
...(ngDevMode ? [{ debugName: "dockTooltip" }] : /* istanbul ignore next */ []));
|
|
400
|
+
gaugeParts = computed(() => {
|
|
401
|
+
const scene = this.geometryScene();
|
|
402
|
+
if (scene.family !== 'gauge' || !scene.circular && !radialEntrance(scene, this.viewport() ?? { width: scene.width, height: this.boundedHeight() }))
|
|
403
|
+
return null;
|
|
404
|
+
return { base: scene.series.filter(series => series.id !== 'reading' && series.id !== 'target').map(series => series.id), reading: ['reading'], overlay: scene.series.filter(series => series.id === 'target').map(series => series.id) };
|
|
405
|
+
}, /* @ts-ignore */
|
|
406
|
+
...(ngDevMode ? [{ debugName: "gaugeParts" }] : /* istanbul ignore next */ []));
|
|
407
|
+
drawing = computed(() => this.renderActive() ? sceneSvg(this.paintScene(), this.dark() ? '#35465E' : '#DFE5ED', this.viewport(), false, { surfaceColor: this.dark() ? '#101C2C' : '#FFFFFF', showMarkers: this.showMarkers(), strokeWidth: this.strokeWidth(), markerSize: this.markerSize(), markerStyle: this.markerAppearance(), layer: 'series', seriesIds: this.gaugeParts()?.reading }) : '', /* @ts-ignore */
|
|
408
|
+
...(ngDevMode ? [{ debugName: "drawing" }] : /* istanbul ignore next */ []));
|
|
409
|
+
gridDrawing = computed(() => this.renderActive() ? this.gaugeParts() ? sceneSvg(this.paintScene(), this.dark() ? '#35465E' : '#DFE5ED', this.viewport(), false, { layer: 'series', seriesIds: this.gaugeParts().base }) : sceneSvg(this.gridScene(), this.dark() ? '#35465E' : '#DFE5ED', this.viewport(), this.showGrid(), { layer: 'grid', surfaceColor: this.dark() ? '#101C2C' : '#FFFFFF', parallelAxes: this.showParallelAxes(), parallelTicks: this.showParallelTicks() }) : '', /* @ts-ignore */
|
|
410
|
+
...(ngDevMode ? [{ debugName: "gridDrawing" }] : /* istanbul ignore next */ []));
|
|
411
|
+
gaugeOverlayDrawing = computed(() => this.renderActive() ? sceneSvg(this.paintScene(), this.dark() ? '#35465E' : '#DFE5ED', this.viewport(), false, { layer: 'series', seriesIds: this.gaugeParts()?.overlay ?? [] }) : '', /* @ts-ignore */
|
|
412
|
+
...(ngDevMode ? [{ debugName: "gaugeOverlayDrawing" }] : /* istanbul ignore next */ []));
|
|
413
|
+
motionStyles = computed(() => this.motion.styles(this.geometryScene(), this.viewport() ?? { width: this.geometryScene().width, height: this.boundedHeight() }), /* @ts-ignore */
|
|
414
|
+
...(ngDevMode ? [{ debugName: "motionStyles" }] : /* istanbul ignore next */ []));
|
|
415
|
+
radialLayout = computed(() => this.animationEnabled() && !this.accessibility.reduceMotion() ? radialEntrance(this.geometryScene(), this.viewport() ?? { width: this.geometryScene().width, height: this.boundedHeight() }) : undefined, /* @ts-ignore */
|
|
416
|
+
...(ngDevMode ? [{ debugName: "radialLayout" }] : /* istanbul ignore next */ []));
|
|
417
|
+
bubbleLayout = computed(() => this.animationEnabled() && !this.accessibility.reduceMotion() ? bubbleEntrance(this.paintScene(), this.viewport() ?? { width: this.geometryScene().width, height: this.boundedHeight() }) : undefined, /* @ts-ignore */
|
|
418
|
+
...(ngDevMode ? [{ debugName: "bubbleLayout" }] : /* istanbul ignore next */ []));
|
|
419
|
+
motionSignature = computed(() => this.animationEnabled() && !this.accessibility.reduceMotion() && this.animationDuration() > 0 ? sceneMotionSignature(this.ownedScene()) : '', /* @ts-ignore */
|
|
420
|
+
...(ngDevMode ? [{ debugName: "motionSignature" }] : /* istanbul ignore next */ []));
|
|
421
|
+
tooltipDensity = computed(() => tooltipOccupancy(this.ownedScene(), this.viewport() ?? { width: 300, height: this.boundedHeight() }, this.tooltipViewport().width, this.scrollX()), /* @ts-ignore */
|
|
422
|
+
...(ngDevMode ? [{ debugName: "tooltipDensity" }] : /* istanbul ignore next */ []));
|
|
423
|
+
tooltipPosition = computed(() => {
|
|
424
|
+
const point = this.state().active, view = this.tooltipViewport(), offset = this.scrollX();
|
|
425
|
+
// Idle/off tooltips do not need a density map, including during scrolling.
|
|
426
|
+
if (!point || this.tooltipMode() !== 'floating')
|
|
427
|
+
return { x: offset, y: 0, width: Math.max(0, view.width - 16), docked: false };
|
|
428
|
+
const height = this.tooltipHeight();
|
|
429
|
+
const group = this.state().shared, x = point ? this.mapX(!this.horizontalBars() && group ? group.coordinate : point.x) : 0, y = point ? this.mapY(this.horizontalBars() && group ? group.coordinate : point.y) : 0;
|
|
430
|
+
const layout = tooltipLayout(view, { x: x - offset, y }, height, this.tooltipDensity());
|
|
431
|
+
return { ...layout, x: layout.x + offset };
|
|
432
|
+
}, /* @ts-ignore */
|
|
433
|
+
...(ngDevMode ? [{ debugName: "tooltipPosition" }] : /* istanbul ignore next */ []));
|
|
434
|
+
mapX(x) { const t = this.transform(); return t.x + x * t.sx; }
|
|
435
|
+
axisLabel(axis, text, value, type) {
|
|
436
|
+
const formatters = this.labelFormatters(), formatter = axis === 'x' ? formatters?.xAxisLabel : formatters?.yAxisLabel;
|
|
437
|
+
return formatter?.({ axis, text, value, type }) ?? text;
|
|
438
|
+
}
|
|
439
|
+
primaryYTicks = computed(() => {
|
|
440
|
+
const ticks = this.scene().grid;
|
|
441
|
+
return this.labelFormatters()?.yAxisLabel ? ticks.map(tick => ({ ...tick, label: tick.label ? this.axisLabel('y', tick.label, tick.value, tick.type) : '' })) : ticks;
|
|
442
|
+
}, /* @ts-ignore */
|
|
443
|
+
...(ngDevMode ? [{ debugName: "primaryYTicks" }] : /* istanbul ignore next */ []));
|
|
444
|
+
secondaryYTicks = computed(() => this.scene().secondaryGrid?.map(tick => ({
|
|
445
|
+
...tick, label: this.axisLabel('secondaryY', this.secondaryTickLabel(tick.label), tick.value, tick.type),
|
|
446
|
+
})), /* @ts-ignore */
|
|
447
|
+
...(ngDevMode ? [{ debugName: "secondaryYTicks" }] : /* istanbul ignore next */ []));
|
|
448
|
+
formattedXLabels = computed(() => {
|
|
449
|
+
const labels = this.scene().labels;
|
|
450
|
+
return this.labelFormatters()?.xAxisLabel ? labels.map(tick => ({ ...tick, label: this.axisLabel('x', tick.label, tick.value, tick.type) })) : labels;
|
|
451
|
+
}, /* @ts-ignore */
|
|
452
|
+
...(ngDevMode ? [{ debugName: "formattedXLabels" }] : /* istanbul ignore next */ []));
|
|
453
|
+
weightedLabels = computed(() => {
|
|
454
|
+
const layout = this.axisLabelLayout(), ticks = variwideAxisLabels(this.ownedScene(), this.transform(), layout !== 'auto');
|
|
455
|
+
if (layout === 'auto' && !this.labelFormatters()?.xAxisLabel)
|
|
456
|
+
return ticks;
|
|
457
|
+
return ticks.map(tick => {
|
|
458
|
+
const label = this.axisLabel('x', tick.label, tick.id, 'category');
|
|
459
|
+
const width = layout === 'all' ? this.xTickWidthFor(label) : tick.width;
|
|
460
|
+
const left = layout === 'auto' ? tick.left : Math.max(0, Math.min((this.viewport()?.width ?? this.contentWidth()) - width, tick.left + (tick.width - width) / 2));
|
|
461
|
+
return { ...tick, label, width, left };
|
|
462
|
+
});
|
|
463
|
+
}, /* @ts-ignore */
|
|
464
|
+
...(ngDevMode ? [{ debugName: "weightedLabels" }] : /* istanbul ignore next */ []));
|
|
465
|
+
xLabelGap = computed(() => {
|
|
466
|
+
const scale = this.accessibility.fontScale();
|
|
467
|
+
return (this.scene().family === 'heatmap' || scale > 1.5 ? 48 : 24) * Math.max(1, scale);
|
|
468
|
+
}, /* @ts-ignore */
|
|
469
|
+
...(ngDevMode ? [{ debugName: "xLabelGap" }] : /* istanbul ignore next */ []));
|
|
470
|
+
displayedXLabels = computed(() => {
|
|
471
|
+
const labels = this.formattedXLabels(), gap = this.xLabelGap();
|
|
472
|
+
if (this.axisLabelLayout() !== 'auto')
|
|
473
|
+
return labels;
|
|
474
|
+
const sparse = this.scene().family !== 'heatmap' && this.accessibility.fontScale() <= 1.5 &&
|
|
475
|
+
labels.every((label, index) => index === 0 || Math.abs(this.mapX(label.x) - this.mapX(labels[index - 1].x)) >= gap);
|
|
476
|
+
if (sparse)
|
|
477
|
+
return labels;
|
|
478
|
+
const separation = Math.max(gap, this.xTickWidth());
|
|
479
|
+
let prior;
|
|
480
|
+
return labels.filter(label => {
|
|
481
|
+
const left = this.xTickLeft(label.x);
|
|
482
|
+
if (prior !== undefined && Math.abs(left - prior) < separation - .01)
|
|
483
|
+
return false;
|
|
484
|
+
prior = left;
|
|
485
|
+
return true;
|
|
486
|
+
});
|
|
487
|
+
}, /* @ts-ignore */
|
|
488
|
+
...(ngDevMode ? [{ debugName: "displayedXLabels" }] : /* istanbul ignore next */ []));
|
|
489
|
+
xTickWidth = computed(() => {
|
|
490
|
+
const width = this.viewport()?.width ?? this.contentWidth();
|
|
491
|
+
const slots = Math.min(this.scene().labels.length, Math.max(1, Math.floor(width / this.xLabelGap())));
|
|
492
|
+
return Math.max(0, Math.min(width, 80, Math.max(24, width / Math.max(1, slots))));
|
|
493
|
+
}, /* @ts-ignore */
|
|
494
|
+
...(ngDevMode ? [{ debugName: "xTickWidth" }] : /* istanbul ignore next */ []));
|
|
495
|
+
xTickWidthFor(label) {
|
|
496
|
+
if (this.axisLabelLayout() !== 'all')
|
|
497
|
+
return this.xTickWidth();
|
|
498
|
+
const width = this.viewport()?.width ?? this.contentWidth();
|
|
499
|
+
return Math.min(width, Math.max(this.xTickWidth(), Math.ceil(label.length * 8 * Math.max(1, this.accessibility.fontScale()) + 8)));
|
|
500
|
+
}
|
|
501
|
+
xTickLeft(x, labelWidth = this.xTickWidth()) {
|
|
502
|
+
const width = this.viewport()?.width ?? this.contentWidth();
|
|
503
|
+
return Math.max(0, Math.min(width - labelWidth, this.mapX(x) - labelWidth / 2));
|
|
504
|
+
}
|
|
505
|
+
mapY(y) { const t = this.transform(); return t.y + y * t.sy; }
|
|
506
|
+
secondaryTitleAppearance = computed(() => nativeTextStyle(this.secondaryYAxisTitleStyle(), { align: 'right', color: this.muted(), fontSize: 12, fontWeight: 400 }), { ...(ngDevMode ? { debugName: "secondaryTitleAppearance" } : /* istanbul ignore next */ {}), equal: sameTextStyle });
|
|
507
|
+
secondaryTickLabel(label) { return this.scene().mixedAxes && label.trim() && Number.isFinite(Number(label)) ? this.formatNumber()(Number(label)) : label; }
|
|
508
|
+
formatNumber = computed(() => chartNumberFormatter(this.locale()), /* @ts-ignore */
|
|
509
|
+
...(ngDevMode ? [{ debugName: "formatNumber" }] : /* istanbul ignore next */ []));
|
|
510
|
+
touchHint = computed(() => {
|
|
511
|
+
if (this.pinned())
|
|
512
|
+
return this.locale() === 'en' ? 'Tooltip pinned. Unpin to explore, or close the detail.' : 'Tooltip fijado. Desfija para explorar o cierra el detalle.';
|
|
513
|
+
const en = this.locale() === 'en';
|
|
514
|
+
const heatmap = this.ownedScene().heatmap;
|
|
515
|
+
if (heatmap) {
|
|
516
|
+
const status = heatmap.layout.status;
|
|
517
|
+
if (status === 'allMissing')
|
|
518
|
+
return en ? 'All supplied cells are unknown. Missing values are not zero.' : 'Todas las celdas aportadas son desconocidas. Los valores ausentes no son cero.';
|
|
519
|
+
if (status === 'noInk')
|
|
520
|
+
return en ? 'The matrix is transparent. Original values are retained.' : 'La matriz es transparente. Se conservan los valores originales.';
|
|
521
|
+
if (status === 'noSource')
|
|
522
|
+
return en ? 'No original matrix cells.' : 'No hay celdas originales en la matriz.';
|
|
523
|
+
}
|
|
524
|
+
const venn = this.ownedScene().venn;
|
|
525
|
+
if (venn) {
|
|
526
|
+
const status = venn.layout.status;
|
|
527
|
+
if (status === 'unknown')
|
|
528
|
+
return en ? 'Unknown intersections: circles are not drawn. Use Previous/Next for known values.' : 'Intersecciones desconocidas: no se dibujan círculos. Usa Anterior/Siguiente para los valores conocidos.';
|
|
529
|
+
if (status === 'allZero')
|
|
530
|
+
return en ? 'All measurements are zero. Use Previous and Next.' : 'Todas las medidas son cero. Usa Anterior y Siguiente.';
|
|
531
|
+
if (status === 'approximate')
|
|
532
|
+
return en ? 'Circle areas approximate these measurements; tooltips show original inclusive values.' : 'Los círculos aproximan estas medidas; los tooltips muestran valores inclusivos originales.';
|
|
533
|
+
if (status === 'exact')
|
|
534
|
+
return en ? 'Touch a region to read its original inclusive measurement.' : 'Toca una región para consultar su medida inclusiva original.';
|
|
535
|
+
}
|
|
536
|
+
if (!this.ownedScene().observations.length) {
|
|
537
|
+
const items = this.legendItems();
|
|
538
|
+
if (items.length > 0 && items.every(item => !item.visible)) {
|
|
539
|
+
const canRestore = this.showLegend() && this.legendInteractive() && !!this.ownedScene().legend;
|
|
540
|
+
return en ? 'All series are hidden.' + (canRestore ? ' Show one in the legend.' : '') : 'Todas las series están ocultas.' + (canRestore ? ' Activa una en la leyenda.' : '');
|
|
541
|
+
}
|
|
542
|
+
if (this.emptyNodeWindow()) {
|
|
543
|
+
const context = this.viewportContext(), canZoom = context?.controls || context?.pinch, canPan = context?.pan;
|
|
544
|
+
return (en ? 'No nodes in this region.' : 'No hay nodos en esta zona.') + (canZoom ? (en ? ' Zoom out or reset the view.' : ' Aleja o restablece la vista.') : canPan ? (en ? ' Pan to another region.' : ' Desplaza la vista a otra zona.') : '');
|
|
545
|
+
}
|
|
546
|
+
if (this.ownedScene().wordcloud) {
|
|
547
|
+
const words = this.ownedScene().wordcloud;
|
|
548
|
+
return words.status === 'measuring' ? (en ? 'Measuring text…' : 'Midiendo texto…') : words.layout.emptyReason === 'noSpace' ? (en ? 'No terms fit this plot at the requested sizes. Reduce font sizes or use a taller plot. Original weights are retained.' : 'Ningún término cabe con estos tamaños. Reduce la fuente o aumenta la altura. Se conservan los pesos originales.') : en ? 'No positive known term weights to display. Original terms are retained.' : 'No hay términos con peso positivo conocido. Se conservan los términos originales.';
|
|
549
|
+
}
|
|
550
|
+
if (this.ownedScene().tilemap?.layout.status === 'allMissing')
|
|
551
|
+
return en ? 'All source values are unknown. Original cell positions are preserved.' : 'Todos los valores originales son desconocidos. Se conservan las posiciones originales de las celdas.';
|
|
552
|
+
if (this.ownedScene().tilemap?.layout.status === 'noInk')
|
|
553
|
+
return en ? 'No cells can be drawn with these settings. Original values are preserved.' : 'No se pueden dibujar celdas con estas opciones. Se conservan los valores originales.';
|
|
554
|
+
if (this.scene().family === 'polygon' && this.ownedScene().series.some(s => !!s.areaPath))
|
|
555
|
+
return en ? 'No source vertices inside this window. Reset zoom to inspect them.' : 'No hay vértices de origen en esta ventana. Restablece el zoom para explorarlos.';
|
|
556
|
+
if (this.ownedScene().contour) {
|
|
557
|
+
const reason = this.ownedScene().contour.emptyReason;
|
|
558
|
+
return reason === 'outsideViewport' ? (en ? 'No isolines in this window. Zoom out or reset.' : 'No hay isolíneas en esta ventana. Aleja o restablece la vista.') : reason === 'missing' ? (en ? 'Unknown samples interrupt every available cell. Original values remain in the source data.' : 'Las muestras desconocidas interrumpen todas las celdas disponibles. Los valores originales se conservan.') : en ? 'No crossings at the requested levels. The original measurements are retained.' : 'No hay cruces en los niveles solicitados. Se conservan las medidas originales.';
|
|
559
|
+
}
|
|
560
|
+
return en ? 'No data to display' : 'No hay datos para mostrar';
|
|
561
|
+
}
|
|
562
|
+
if (['variablepie', 'item', 'pie', 'donut'].includes(this.scene().family) && this.ownedScene().observations.every(p => p.value === 0))
|
|
563
|
+
return en ? 'All values are zero. Use Previous and Next.' : 'Todos los valores son cero. Usa Anterior y Siguiente.';
|
|
564
|
+
if (this.scene().family === 'heatmap')
|
|
565
|
+
return en ? 'Touch a known cell to read its original value. The colour scale identifies unknown cells; absent coordinates remain empty.' : 'Toca una celda conocida para consultar su valor original. La escala de color identifica desconocidos; las coordenadas ausentes quedan vacías.';
|
|
566
|
+
if (this.scene().family === 'wordcloud')
|
|
567
|
+
return en ? 'Touch a word to read its original weight.' : 'Toca una palabra para consultar su peso original.';
|
|
568
|
+
if (this.scene().family === 'contour')
|
|
569
|
+
return en ? 'Touch an isoline to inspect its level and original corner samples.' : 'Toca una isolínea para consultar su nivel y las medidas originales de sus esquinas.';
|
|
570
|
+
return this.tooltipMode() === 'off' ? (en ? 'Explore with the navigation controls' : 'Explora con los controles de navegación') : (en ? 'Touch a point to see its value' : 'Toca un punto para ver su valor');
|
|
571
|
+
}, /* @ts-ignore */
|
|
572
|
+
...(ngDevMode ? [{ debugName: "touchHint" }] : /* istanbul ignore next */ []));
|
|
573
|
+
accessibilityHint = computed(() => {
|
|
574
|
+
const en = this.locale() === 'en';
|
|
575
|
+
if (!this.ownedScene().observations.length)
|
|
576
|
+
return this.touchHint();
|
|
577
|
+
if (this.pinned())
|
|
578
|
+
return en ? 'Tooltip pinned. Use Unpin tooltip to explore again.' : 'Tooltip fijado. Usa Desfijar tooltip para volver a explorar.';
|
|
579
|
+
if (this.inputBridge)
|
|
580
|
+
return en ? 'Use the arrow keys to change observation, and Home or End to jump to the first or last.' : 'Usa las flechas para cambiar de observación e Inicio o Fin para ir a la primera o la última.';
|
|
581
|
+
return en ? 'Swipe up or down to change observation. Previous and Next are also available.' : 'Desliza arriba o abajo para cambiar de observación. También puedes usar Anterior y Siguiente.';
|
|
582
|
+
}, /* @ts-ignore */
|
|
583
|
+
...(ngDevMode ? [{ debugName: "accessibilityHint" }] : /* istanbul ignore next */ []));
|
|
584
|
+
accessibilityValue = computed(() => {
|
|
585
|
+
const text = this.accessibilityValueText(this.state());
|
|
586
|
+
if (!this.inputBridge)
|
|
587
|
+
return { text };
|
|
588
|
+
return { ...(this.session?.navigationRange ?? { min: 0, max: 0, now: 0 }), text };
|
|
589
|
+
}, /* @ts-ignore */
|
|
590
|
+
...(ngDevMode ? [{ debugName: "accessibilityValue" }] : /* istanbul ignore next */ []));
|
|
591
|
+
accessibilityValueText(state) {
|
|
592
|
+
const p = state.active, en = this.locale() === 'en', format = this.formatNumber();
|
|
593
|
+
const empty = this.emptyState();
|
|
594
|
+
if (!p && empty && !this.emptyNodeWindow())
|
|
595
|
+
return empty.title + '. ' + empty.description;
|
|
596
|
+
if (!p && (this.ownedScene().heatmap || this.ownedScene().tilemap) && this.ownedScene().observations.length === 0)
|
|
597
|
+
return this.touchHint();
|
|
598
|
+
if (!p && this.ownedScene().contour && !this.ownedScene().observations.length)
|
|
599
|
+
return this.touchHint();
|
|
600
|
+
if (!p)
|
|
601
|
+
return this.ownedScene().observations.length ? (en ? 'No selection' : 'Sin selección') : this.emptyNodeWindow() ? (en ? 'No nodes in this region' : 'No hay nodos en esta zona') : (en ? 'No data' : 'Sin datos');
|
|
602
|
+
const shared = state.shared;
|
|
603
|
+
if (shared)
|
|
604
|
+
return shared.label + ', ' + shared.rows.map(row => row.name + ': ' + (row.point ? observationValue(row.point, this.scene().family, format, this.locale()) + ' ' + observationUnit(row.point, this.scene().family, this.scene().unit, this.scene().secondaryUnit) : en ? 'No value' : 'Sin dato')).join(', ');
|
|
605
|
+
return [p.label, this.scene().family === 'heatmap' || p.seriesName === p.label || p.seriesName === this.scene().unit ? '' : p.seriesName, observationValue(p, this.scene().family, format, this.locale()) + ' ' + observationUnit(p, this.scene().family, this.scene().unit, this.scene().secondaryUnit),
|
|
606
|
+
...(p.node && p.node.directed !== false ? [(en ? 'Incoming' : 'Entrantes') + ': ' + format(p.node.incoming), (en ? 'Outgoing' : 'Salientes') + ': ' + format(p.node.outgoing), (en ? 'Depth' : 'Profundidad') + ': ' + format(p.node.depth)] : []),
|
|
607
|
+
...directionalDetails(p, format, this.locale(), this.ownedScene().unit, this.ownedScene().family, this.ownedScene().regression),
|
|
608
|
+
...(p.xValue === undefined ? [] : [(this.xAxisTitle() || 'X') + ': ' + format(p.xValue)]),
|
|
609
|
+
...(p.sizeValue === undefined ? [] : [(en ? 'Size' : 'Tamaño') + ': ' + format(p.sizeValue)]),
|
|
610
|
+
...(p.percentage === undefined ? [] : [format(p.percentage) + '%']), ...(p.subtotal ? [(en ? 'Subtotal' : 'Subtotal') + (p.incomplete ? (en ? ' · incomplete known values' : ' · valores conocidos incompletos') : '')] : [])].filter(Boolean).join(', ');
|
|
611
|
+
}
|
|
612
|
+
actions = computed(() => this.pinned() ? [] : [{ name: 'increment', label: this.locale() === 'en' ? 'Next' : 'Siguiente' }, { name: 'decrement', label: this.locale() === 'en' ? 'Previous' : 'Anterior' }], /* @ts-ignore */
|
|
613
|
+
...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
|
|
614
|
+
missingSourceCount = computed(() => { const scene = this.ownedScene(); if (scene.family === 'bullet')
|
|
615
|
+
return (scene.bulletData ?? []).filter(point => point.visible && point.measure === null && typeof point.target !== 'number').length; if (scene.family === 'variwide')
|
|
616
|
+
return (scene.variwideData ?? []).filter(point => point.visible && (point.missingValue || point.missingWidth)).length; return (scene.intervals ?? scene.events ?? []).filter(point => point.visible && point.missing).length; }, /* @ts-ignore */
|
|
617
|
+
...(ngDevMode ? [{ debugName: "missingSourceCount" }] : /* istanbul ignore next */ []));
|
|
618
|
+
missingSourceLabel = computed(() => { const count = this.missingSourceCount(); if (this.scene().family === 'bullet' || this.scene().family === 'variwide')
|
|
619
|
+
return this.locale() === 'en' ? `${count} source items have unknown measurements or widths. Their original values are retained.` : `${count} datos originales tienen medidas o anchos desconocidos. Se conservan sus valores originales.`; return this.locale() === 'en' ? `${count} data ${count === 1 ? 'item has' : 'items have'} unknown coordinates and cannot be plotted.` : `${count} ${count === 1 ? 'dato tiene' : 'datos tienen'} coordenadas desconocidas y no ${count === 1 ? 'se puede' : 'se pueden'} dibujar.`; }, /* @ts-ignore */
|
|
620
|
+
...(ngDevMode ? [{ debugName: "missingSourceLabel" }] : /* istanbul ignore next */ []));
|
|
621
|
+
accessibility = inject(Accessibility);
|
|
622
|
+
activity = inject(ChartActivity);
|
|
623
|
+
active = input(true, /* @ts-ignore */
|
|
624
|
+
...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
625
|
+
/** Settle a remounted host's first frame; later motion remains enabled. */
|
|
626
|
+
skipEntrance = input(false, /* @ts-ignore */
|
|
627
|
+
...(ngDevMode ? [{ debugName: "skipEntrance" }] : /* istanbul ignore next */ []));
|
|
628
|
+
renderActive = computed(() => this.activity.active() && this.active(), /* @ts-ignore */
|
|
629
|
+
...(ngDevMode ? [{ debugName: "renderActive" }] : /* istanbul ignore next */ []));
|
|
630
|
+
destroyed = false;
|
|
631
|
+
hostInput;
|
|
632
|
+
acceptsInput() { return !this.destroyed && this.renderActive(); }
|
|
633
|
+
haptics = inject(ChartHaptics);
|
|
634
|
+
inputBridge = inject(CHART_INPUT_BRIDGE, { optional: true });
|
|
635
|
+
plot = viewChild('plot', { ...(ngDevMode ? { debugName: "plot" } : /* istanbul ignore next */ {}), read: ElementRef });
|
|
636
|
+
session = null;
|
|
637
|
+
width = 0;
|
|
638
|
+
height = 0;
|
|
639
|
+
pendingEntranceResize = false;
|
|
640
|
+
tooltipPanConsumed = false;
|
|
641
|
+
pointInput;
|
|
642
|
+
// Keep JS callbacks outside the gesture builder: the Worklets Babel plugin auto-transforms
|
|
643
|
+
// inline onStart/onEnd arrows and loses their lexical component `this` on Hermes.
|
|
644
|
+
onPanStart = (e) => { if (!this.viewportInteracting() && (e.numberOfPointers ?? 1) < 2)
|
|
645
|
+
this.begin(e.x, e.y); };
|
|
646
|
+
onPanUpdate = (e) => { if (!this.acceptsInput())
|
|
647
|
+
return; if (this.viewportInteracting() || (e.numberOfPointers ?? 1) > 1) {
|
|
648
|
+
this.session?.end(false);
|
|
649
|
+
return;
|
|
650
|
+
} this.move(e.x, e.y); };
|
|
651
|
+
onPanEnd = (e, success) => {
|
|
652
|
+
if (!this.acceptsInput())
|
|
653
|
+
return;
|
|
654
|
+
if (this.viewportInteracting() || (e.numberOfPointers ?? 1) > 1) {
|
|
655
|
+
this.session?.end(false);
|
|
656
|
+
return;
|
|
657
|
+
}
|
|
658
|
+
if (this.tooltipPanConsumed) {
|
|
659
|
+
this.tooltipPanConsumed = false;
|
|
660
|
+
this.session?.end(false);
|
|
661
|
+
return;
|
|
662
|
+
}
|
|
663
|
+
if (success) {
|
|
664
|
+
this.move(e.x, e.y);
|
|
665
|
+
this.session?.end(true);
|
|
666
|
+
}
|
|
667
|
+
else
|
|
668
|
+
this.session?.end(false);
|
|
669
|
+
};
|
|
670
|
+
onPanFinalize = (_event, success) => {
|
|
671
|
+
if (!this.acceptsInput())
|
|
672
|
+
return;
|
|
673
|
+
this.tooltipPanConsumed = false;
|
|
674
|
+
if (!success)
|
|
675
|
+
this.session?.end(false);
|
|
676
|
+
};
|
|
677
|
+
onTapEnd = (e, success) => {
|
|
678
|
+
if (success && !this.viewportInteracting())
|
|
679
|
+
this.tap(e.x, e.y);
|
|
680
|
+
};
|
|
681
|
+
scrollGesture = computed(() => Gesture.Native().enabled(!!this.viewportContext() && this.scrolling()).shouldActivateOnStart(false).disallowInterruption(false), /* @ts-ignore */
|
|
682
|
+
...(ngDevMode ? [{ debugName: "scrollGesture" }] : /* istanbul ignore next */ []));
|
|
683
|
+
viewportGesture = computed(() => {
|
|
684
|
+
const context = this.viewportContext(), driver = this.viewportDriver(), size = this.viewport();
|
|
685
|
+
if (!context || !driver || !size)
|
|
686
|
+
return undefined;
|
|
687
|
+
return driver.gesture(this.viewportGestureConfig(context, size), { begin: () => this.beginViewport(context), end: (frame, success, source) => this.endViewport(context, frame, success, source) }, this.scrollGesture());
|
|
688
|
+
}, /* @ts-ignore */
|
|
689
|
+
...(ngDevMode ? [{ debugName: "viewportGesture" }] : /* istanbul ignore next */ []));
|
|
690
|
+
gesture = computed(() => {
|
|
691
|
+
this.renderActive();
|
|
692
|
+
this.pointInput?.revoke();
|
|
693
|
+
const lease = pointLease({ start: this.onPanStart, move: this.onPanUpdate, end: this.onPanEnd, finalize: this.onPanFinalize, tap: this.onTapEnd });
|
|
694
|
+
this.pointInput = lease;
|
|
695
|
+
const pointGesture = Gesture.Race(Gesture.Pan().enabled(this.renderActive() && !this.pinned() && !this.scrolling() && this.interactionMode() === 'explore' && this.ownedScene().observations.length > 0).minDistance(8).maxPointers(1).runOnJS(true)
|
|
696
|
+
.onStart(lease.callbacks.start).onUpdate(lease.callbacks.move)
|
|
697
|
+
.onEnd(lease.callbacks.end).onFinalize(lease.callbacks.finalize), Gesture.Tap().enabled(this.renderActive() && !this.pinned() && this.ownedScene().observations.length > 0).maxDistance(8).runOnJS(true).onEnd(lease.callbacks.tap));
|
|
698
|
+
const viewportGesture = this.viewportGesture();
|
|
699
|
+
return viewportGesture ? Gesture.Simultaneous(pointGesture, viewportGesture) : pointGesture;
|
|
700
|
+
}, /* @ts-ignore */
|
|
701
|
+
...(ngDevMode ? [{ debugName: "gesture" }] : /* istanbul ignore next */ []));
|
|
702
|
+
constructor() {
|
|
703
|
+
effect(() => {
|
|
704
|
+
const context = this.viewportContext();
|
|
705
|
+
if (this.renderActive() && context && (context.pinch || context.pan)) {
|
|
706
|
+
if (!untracked(this.viewportDriver))
|
|
707
|
+
this.viewportDriver.set(this.viewportFactory());
|
|
708
|
+
}
|
|
709
|
+
else
|
|
710
|
+
untracked(() => { this.finishViewport(); this.viewportDriver()?.destroy(); this.viewportDriver.set(null); });
|
|
711
|
+
});
|
|
712
|
+
let previousContext, previousSize;
|
|
713
|
+
effect(() => {
|
|
714
|
+
const context = this.viewportContext(), size = this.viewport(), pinned = this.pinned();
|
|
715
|
+
const changed = context?.model !== previousContext?.model || context?.acknowledgment !== previousContext?.acknowledgment || context?.pinch !== previousContext?.pinch || context?.pan !== previousContext?.pan || size !== previousSize;
|
|
716
|
+
if (untracked(this.viewportInteracting) && (changed || pinned))
|
|
717
|
+
this.afterViewportPaint(() => this.finishViewport());
|
|
718
|
+
previousContext = context;
|
|
719
|
+
previousSize = size;
|
|
720
|
+
});
|
|
721
|
+
effect(() => { const maximum = Math.max(0, this.contentWidth() - this.visibleWidth()); if (untracked(this.scrollX) > maximum) {
|
|
722
|
+
untracked(() => this.scrollX.set(maximum));
|
|
723
|
+
this.plotScroller()?.scrollTo({ x: maximum, animated: false });
|
|
724
|
+
} });
|
|
725
|
+
effect(() => { if (!this.tooltipPinnable() || this.tooltipMode() === 'off')
|
|
726
|
+
untracked(() => this.session?.setPinned(false)); });
|
|
727
|
+
effect(() => { if (!this.state().active || this.tooltipMode() !== 'floating')
|
|
728
|
+
this.expandedTooltip.set(false); });
|
|
729
|
+
let tooltipSize = '', tooltipScroll = 0;
|
|
730
|
+
effect(() => {
|
|
731
|
+
const active = this.state().active;
|
|
732
|
+
if (!this.renderActive() || !active || this.tooltipMode() !== 'floating' || this.dockTooltip() || this.pinned()) {
|
|
733
|
+
this.tooltipMotion.hide();
|
|
734
|
+
return;
|
|
735
|
+
}
|
|
736
|
+
const position = this.tooltipPosition(), view = this.tooltipViewport(), scroll = this.scrollX();
|
|
737
|
+
const size = view.width + ':' + view.height, resized = size !== tooltipSize || scroll !== tooltipScroll;
|
|
738
|
+
tooltipSize = size;
|
|
739
|
+
tooltipScroll = scroll;
|
|
740
|
+
this.tooltipMotion.move(position.x, position.y, resized || !this.animationEnabled() || this.accessibility.reduceMotion() ? 0 : Math.min(180, this.animationDuration()));
|
|
741
|
+
});
|
|
742
|
+
let previousMotionScene, previousVisibility = '';
|
|
743
|
+
let previousSignature = '', previousKey, previousViewportGeneration, previousViewportRevision;
|
|
744
|
+
let wasSuspended = false;
|
|
745
|
+
const suspend = () => {
|
|
746
|
+
wasSuspended = true;
|
|
747
|
+
previousMotionScene = undefined;
|
|
748
|
+
previousSignature = '';
|
|
749
|
+
previousVisibility = '';
|
|
750
|
+
this.motion.finish();
|
|
751
|
+
this.tooltipMotion.hide();
|
|
752
|
+
this.clearPreviousDrawing();
|
|
753
|
+
this.finishViewport();
|
|
754
|
+
this.viewportDriver()?.destroy();
|
|
755
|
+
this.viewportDriver.set(null);
|
|
756
|
+
this.hostInput?.revoke();
|
|
757
|
+
this.gesture();
|
|
758
|
+
this.pointInput?.revoke();
|
|
759
|
+
const prior = this.session?.snapshot;
|
|
760
|
+
this.session?.destroy();
|
|
761
|
+
this.session = null;
|
|
762
|
+
const empty = { active: null, selected: null, scrubbing: false };
|
|
763
|
+
this.state.set(empty);
|
|
764
|
+
if (prior && (prior.active || prior.selected || prior.scrubbing || prior.pinned))
|
|
765
|
+
this.interactionChange.emit(empty);
|
|
766
|
+
this.drawing();
|
|
767
|
+
this.gridDrawing();
|
|
768
|
+
this.referenceDrawing();
|
|
769
|
+
this.gaugeOverlayDrawing();
|
|
770
|
+
};
|
|
771
|
+
inject(DestroyRef).onDestroy(this.activity.onSuspend(() => untracked(suspend)));
|
|
772
|
+
effect(() => {
|
|
773
|
+
if (!this.renderActive()) {
|
|
774
|
+
suspend();
|
|
775
|
+
return;
|
|
776
|
+
}
|
|
777
|
+
const viewport = this.viewport(), signature = this.motionSignature(), key = this.animationKey(), visibility = this.visibilitySignature();
|
|
778
|
+
const context = this.viewportContext(), windowChanged = !!context && context.generation === previousViewportGeneration && context.revision !== previousViewportRevision;
|
|
779
|
+
previousViewportGeneration = context?.generation;
|
|
780
|
+
previousViewportRevision = context?.revision;
|
|
781
|
+
const pendingResize = this.pendingEntranceResize;
|
|
782
|
+
this.pendingEntranceResize = false;
|
|
783
|
+
const replay = previousKey !== undefined && key !== previousKey;
|
|
784
|
+
previousKey = key;
|
|
785
|
+
if (replay)
|
|
786
|
+
untracked(() => this.session?.clear());
|
|
787
|
+
const duration = this.animationDuration(), enabled = this.animationEnabled() && !this.accessibility.reduceMotion() && duration > 0;
|
|
788
|
+
const scene = untracked(this.ownedScene), prior = previousMotionScene, visibilityChanged = previousVisibility !== '' && visibility !== previousVisibility;
|
|
789
|
+
previousMotionScene = scene;
|
|
790
|
+
previousVisibility = visibility;
|
|
791
|
+
this.clearPreviousDrawing();
|
|
792
|
+
if (wasSuspended) {
|
|
793
|
+
wasSuspended = false;
|
|
794
|
+
this.motion.finish();
|
|
795
|
+
previousSignature = signature;
|
|
796
|
+
return;
|
|
797
|
+
}
|
|
798
|
+
const dataChanged = previousSignature !== '' && signature !== previousSignature;
|
|
799
|
+
if (enabled && (visibilityChanged || dataChanged) && !replay && !windowChanged && viewport && prior && prior.family === scene.family && this.motion.update) {
|
|
800
|
+
const ms = Math.min(220, duration);
|
|
801
|
+
this.previousDrawing.set(sceneSvg(prior, this.dark() ? '#35465E' : '#DFE5ED', viewport, false, { surfaceColor: this.dark() ? '#101C2C' : '#FFFFFF', showMarkers: this.showMarkers(), strokeWidth: this.strokeWidth(), markerSize: this.markerSize(), markerStyle: this.markerAppearance(), layer: 'series' }));
|
|
802
|
+
this.motion.update(ms);
|
|
803
|
+
this.previousDrawingTimer = setTimeout(() => { this.previousDrawingTimer = null; this.previousDrawing.set(null); }, ms + 250);
|
|
804
|
+
previousSignature = signature;
|
|
805
|
+
return;
|
|
806
|
+
}
|
|
807
|
+
if (!enabled || scene.observations.length === 0) {
|
|
808
|
+
this.motion.finish();
|
|
809
|
+
previousSignature = signature;
|
|
810
|
+
previousKey = key;
|
|
811
|
+
return;
|
|
812
|
+
}
|
|
813
|
+
if (!viewport)
|
|
814
|
+
return;
|
|
815
|
+
if (this.skipEntrance() && previousSignature === '' && !replay) {
|
|
816
|
+
this.motion.finish();
|
|
817
|
+
previousSignature = signature;
|
|
818
|
+
return;
|
|
819
|
+
}
|
|
820
|
+
if (windowChanged && !replay) {
|
|
821
|
+
this.motion.finish();
|
|
822
|
+
previousSignature = signature;
|
|
823
|
+
return;
|
|
824
|
+
}
|
|
825
|
+
if (signature !== previousSignature || replay) {
|
|
826
|
+
const selected = this.session?.snapshot;
|
|
827
|
+
const retainsSelection = !replay && this.session?.scene.family === scene.family && selected?.selected && scene.observations.some(p => selected.shared ? p.group?.key === selected.shared.key : p.id.seriesId === selected.selected.seriesId && p.id.pointId === selected.selected.pointId);
|
|
828
|
+
// A retained tooltip describes the final projected datum, so settle its geometry.
|
|
829
|
+
if (retainsSelection)
|
|
830
|
+
this.motion.finish();
|
|
831
|
+
else
|
|
832
|
+
this.motion.start(duration);
|
|
833
|
+
previousSignature = signature;
|
|
834
|
+
}
|
|
835
|
+
// Native/web layout may commit a second size before the first paint. Restart only
|
|
836
|
+
// that pending entrance; a resize after it has begun still settles stale motion.
|
|
837
|
+
else if (pendingResize || this.motion.pending)
|
|
838
|
+
this.motion.start(duration);
|
|
839
|
+
else
|
|
840
|
+
this.motion.finish();
|
|
841
|
+
});
|
|
842
|
+
effect(onCleanup => {
|
|
843
|
+
const target = this.plot()?.nativeElement;
|
|
844
|
+
if (!target || !this.inputBridge)
|
|
845
|
+
return;
|
|
846
|
+
this.renderActive();
|
|
847
|
+
this.pinned();
|
|
848
|
+
const context = this.viewportContext(), driver = this.viewportDriver();
|
|
849
|
+
const lease = inputLease({
|
|
850
|
+
active: () => this.acceptsInput(),
|
|
851
|
+
enabled: () => this.acceptsInput() && !this.pinned(),
|
|
852
|
+
layout: (width, height) => this.resize(width, height),
|
|
853
|
+
begin: (x, y, width, height) => { this.resize(width, height); this.begin(x, y); },
|
|
854
|
+
consumeTap: (x, y, width, height) => { this.resize(width, height); return this.dismissFloatingTooltipAt(x, y); },
|
|
855
|
+
tap: (x, y, width, height) => { this.resize(width, height); this.tap(x, y); },
|
|
856
|
+
move: (x, y) => this.move(x, y), end: commit => this.session?.end(commit),
|
|
857
|
+
step: delta => this.step(delta), jump: edge => this.step(edge), clear: () => this.clear(),
|
|
858
|
+
...(context && driver && (context.pinch || context.pan) ? { viewport: { enabled: () => this.acceptsInput() && !this.pinned(), pinch: context.pinch, pan: context.pan,
|
|
859
|
+
begin: (frame, width, height) => { this.resize(width, height); this.beginViewport(context); driver.preview(frame, this.viewportGestureConfig(context, { width, height })); },
|
|
860
|
+
update: (frame) => { const size = this.viewport(); if (size && this.viewportSession === context && [frame.scale, frame.x, frame.y, frame.dx, frame.dy].every(Number.isFinite))
|
|
861
|
+
driver.preview(frame, this.viewportGestureConfig(context, size)); },
|
|
862
|
+
end: (frame, success) => this.endViewport(context, frame, success, Math.abs(frame.scale - 1) > .01 ? 'pinch' : 'pan'),
|
|
863
|
+
} } : {}),
|
|
864
|
+
});
|
|
865
|
+
const disconnect = this.inputBridge.connect(target, lease.callbacks, this.geometryScene());
|
|
866
|
+
this.hostInput = lease;
|
|
867
|
+
onCleanup(() => { lease.revoke(); if (this.hostInput === lease)
|
|
868
|
+
this.hostInput = undefined; disconnect(); });
|
|
869
|
+
});
|
|
870
|
+
effect(() => {
|
|
871
|
+
if (!this.renderActive()) {
|
|
872
|
+
const prior = this.session?.snapshot;
|
|
873
|
+
this.session?.destroy();
|
|
874
|
+
this.session = null;
|
|
875
|
+
const empty = { active: null, selected: null, scrubbing: false };
|
|
876
|
+
this.state.set(empty);
|
|
877
|
+
if (prior && (prior.active || prior.selected || prior.scrubbing || prior.pinned))
|
|
878
|
+
untracked(() => this.interactionChange.emit(empty));
|
|
879
|
+
return;
|
|
880
|
+
}
|
|
881
|
+
const scene = this.ownedScene(), content = this.tooltipContent();
|
|
882
|
+
if (this.session?.contentMode === content && this.session.updatePresentation(scene))
|
|
883
|
+
return;
|
|
884
|
+
const selected = this.session?.scene.family === scene.family ? this.session.snapshot.selected : null;
|
|
885
|
+
const selectedGroup = this.session?.scene.family === scene.family ? this.session.snapshot.shared?.key : undefined;
|
|
886
|
+
const previous = this.session?.snapshot;
|
|
887
|
+
this.session?.destroy();
|
|
888
|
+
const session = new NativeChartSession(scene, { request: fn => requestAnimationFrame(fn), cancel: handle => cancelAnimationFrame(handle) }, this.haptics.port(() => this.hapticsEnabled()), snapshot => {
|
|
889
|
+
untracked(() => { this.state.set(snapshot); this.interactionChange.emit(snapshot); });
|
|
890
|
+
}, selected, content, selectedGroup);
|
|
891
|
+
this.session = session;
|
|
892
|
+
this.state.set(session.snapshot);
|
|
893
|
+
if (previous && !sameInteractionContent(previous, session.snapshot))
|
|
894
|
+
untracked(() => this.interactionChange.emit(session.snapshot));
|
|
895
|
+
});
|
|
896
|
+
inject(DestroyRef).onDestroy(() => { this.destroyed = true; this.pointInput?.revoke(); this.finishViewport(); this.viewportDriver()?.destroy(); this.session?.destroy(); this.session = null; this.motion.stop(); this.tooltipMotion.destroy(); this.clearPreviousDrawing(); });
|
|
897
|
+
}
|
|
898
|
+
measure(event) {
|
|
899
|
+
this.resize(event.nativeEvent.layout.width, event.nativeEvent.layout.height);
|
|
900
|
+
}
|
|
901
|
+
measureScroll(event) {
|
|
902
|
+
const width = event.nativeEvent.layout.width;
|
|
903
|
+
if (Number.isFinite(width) && width > 0 && width !== untracked(this.visibleWidth))
|
|
904
|
+
this.visibleWidth.set(width);
|
|
905
|
+
}
|
|
906
|
+
measureBody(event) { const width = event.nativeEvent.layout.width; if (Number.isFinite(width) && width > 0)
|
|
907
|
+
this.bodyWidth.set(width); }
|
|
908
|
+
scrollPlot(event) {
|
|
909
|
+
const x = event.nativeEvent.contentOffset.x;
|
|
910
|
+
if (Number.isFinite(x))
|
|
911
|
+
this.scrollX.set(Math.max(0, Math.min(this.contentWidth() - this.visibleWidth(), x)));
|
|
912
|
+
}
|
|
913
|
+
resize(width, height) {
|
|
914
|
+
if (this.destroyed)
|
|
915
|
+
return;
|
|
916
|
+
if (!Number.isFinite(width) || !Number.isFinite(height) || width <= 0 || height <= 0)
|
|
917
|
+
return;
|
|
918
|
+
this.width = width;
|
|
919
|
+
this.height = height;
|
|
920
|
+
const previous = untracked(this.viewport);
|
|
921
|
+
if (previous?.width === width && previous?.height === height)
|
|
922
|
+
return;
|
|
923
|
+
// Capture this at measurement time: the queued frame can start before the
|
|
924
|
+
// signal effect runs, but this is still the entrance's initial layout.
|
|
925
|
+
this.pendingEntranceResize ||= this.motion.pending === true;
|
|
926
|
+
this.viewport.set({ width, height });
|
|
927
|
+
this.viewportChange.emit({ width, height });
|
|
928
|
+
this.session?.end(false);
|
|
929
|
+
}
|
|
930
|
+
begin(x, y) {
|
|
931
|
+
if (!this.acceptsInput())
|
|
932
|
+
return;
|
|
933
|
+
this.tooltipPanConsumed = this.dismissFloatingTooltipAt(x, y);
|
|
934
|
+
if (this.tooltipPanConsumed)
|
|
935
|
+
return;
|
|
936
|
+
this.pendingEntranceResize = false;
|
|
937
|
+
this.motion.finish();
|
|
938
|
+
if (this.width > 0 && this.height > 0 && !this.accessibility.screenReader()) {
|
|
939
|
+
const t = this.transform();
|
|
940
|
+
this.session?.begin((x - t.x) / t.sx, (y - t.y) / t.sy, 24 / Math.min(t.sx, t.sy));
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
tap(x, y) {
|
|
944
|
+
if (!this.acceptsInput())
|
|
945
|
+
return;
|
|
946
|
+
if (this.dismissFloatingTooltipAt(x, y))
|
|
947
|
+
return;
|
|
948
|
+
this.pendingEntranceResize = false;
|
|
949
|
+
this.motion.finish();
|
|
950
|
+
if (this.width > 0 && this.height > 0 && !this.accessibility.screenReader()) {
|
|
951
|
+
const t = this.transform();
|
|
952
|
+
this.session?.tap((x - t.x) / t.sx, (y - t.y) / t.sy, 24 / Math.min(t.sx, t.sy));
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
move(x, y) {
|
|
956
|
+
if (!this.acceptsInput())
|
|
957
|
+
return;
|
|
958
|
+
if (this.tooltipPanConsumed)
|
|
959
|
+
return;
|
|
960
|
+
if (this.width > 0 && this.height > 0) {
|
|
961
|
+
const t = this.transform();
|
|
962
|
+
this.session?.move((x - t.x) / t.sx, (y - t.y) / t.sy);
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
step(direction) {
|
|
966
|
+
if (!this.acceptsInput())
|
|
967
|
+
return;
|
|
968
|
+
this.pendingEntranceResize = false;
|
|
969
|
+
this.motion.finish();
|
|
970
|
+
this.session?.step(direction);
|
|
971
|
+
const active = this.session?.snapshot.active, width = this.visibleWidth();
|
|
972
|
+
if (!active || !this.scrolling())
|
|
973
|
+
return;
|
|
974
|
+
const x = this.mapX(active.x), current = this.scrollX(), next = Math.max(0, Math.min(this.contentWidth() - width, x < current + 24 ? x - 24 : x > current + width - 24 ? x - width + 24 : current));
|
|
975
|
+
if (next !== current) {
|
|
976
|
+
this.scrollX.set(next);
|
|
977
|
+
this.plotScroller()?.scrollTo({ x: next, animated: false });
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
zoomInAvailable = computed(() => { const context = this.viewportContext(); if (!context || this.pinned())
|
|
981
|
+
return false; const next = transformPlanViewport(context.model, { type: 'zoom', factor: 2 }); return next.status === 'ok' && !sameViewportValue(next.value, context.model.value); }, /* @ts-ignore */
|
|
982
|
+
...(ngDevMode ? [{ debugName: "zoomInAvailable" }] : /* istanbul ignore next */ []));
|
|
983
|
+
requestView(intent) { if (!this.acceptsInput())
|
|
984
|
+
return; const context = this.viewportContext(); if (!context || this.pinned())
|
|
985
|
+
return; this.motion.finish(); this.session?.clear(); this.viewportRequest.emit({ intent, source: 'controls', model: context.model }); }
|
|
986
|
+
viewportGestureConfig(context, size) {
|
|
987
|
+
const axes = viewportCanvas(this.ownedScene(), context, size);
|
|
988
|
+
return { width: size.width, height: size.height, maximumScale: viewportScaleLimit(context.model), horizontal: axes.horizontal, vertical: axes.vertical, pinch: context.pinch, pan: context.pan, enabled: !this.pinned() && this.ownedScene().observations.length > 0 };
|
|
989
|
+
}
|
|
990
|
+
beginViewport(context) {
|
|
991
|
+
if (!this.acceptsInput())
|
|
992
|
+
return;
|
|
993
|
+
if (this.viewportContext()?.model !== context.model || this.pinned()) {
|
|
994
|
+
this.viewportDriver()?.finish();
|
|
995
|
+
return;
|
|
996
|
+
}
|
|
997
|
+
this.motion.finish();
|
|
998
|
+
this.session?.end(false);
|
|
999
|
+
this.viewportSession = context;
|
|
1000
|
+
this.viewportSnapshot.set({ grid: this.gridDrawing(), series: this.drawing(), references: this.referenceDrawing() });
|
|
1001
|
+
this.viewportInteracting.set(true);
|
|
1002
|
+
this.afterViewportPaint(() => { if (this.viewportSession === context)
|
|
1003
|
+
this.viewportDriver()?.show(); });
|
|
1004
|
+
}
|
|
1005
|
+
endViewport(context, frame, success, source) {
|
|
1006
|
+
if (!this.acceptsInput())
|
|
1007
|
+
return;
|
|
1008
|
+
if (!success || this.viewportSession !== context || this.viewportContext()?.model !== context.model || this.pinned()) {
|
|
1009
|
+
this.finishViewport();
|
|
1010
|
+
return;
|
|
1011
|
+
}
|
|
1012
|
+
const size = this.viewport();
|
|
1013
|
+
if (!size) {
|
|
1014
|
+
this.finishViewport();
|
|
1015
|
+
return;
|
|
1016
|
+
}
|
|
1017
|
+
const request = viewportGestureRequest(this.ownedScene(), context, size, frame, source);
|
|
1018
|
+
if (!request) {
|
|
1019
|
+
this.finishViewport();
|
|
1020
|
+
return;
|
|
1021
|
+
}
|
|
1022
|
+
this.session?.clear();
|
|
1023
|
+
this.viewportRequest.emit(request);
|
|
1024
|
+
}
|
|
1025
|
+
afterViewportPaint(callback) {
|
|
1026
|
+
if (this.viewportFrame !== null)
|
|
1027
|
+
cancelAnimationFrame(this.viewportFrame);
|
|
1028
|
+
this.viewportFrame = requestAnimationFrame(() => { this.viewportFrame = requestAnimationFrame(() => { this.viewportFrame = null; callback(); }); });
|
|
1029
|
+
}
|
|
1030
|
+
finishViewport() {
|
|
1031
|
+
if (this.viewportFrame !== null) {
|
|
1032
|
+
cancelAnimationFrame(this.viewportFrame);
|
|
1033
|
+
this.viewportFrame = null;
|
|
1034
|
+
}
|
|
1035
|
+
this.viewportDriver()?.finish();
|
|
1036
|
+
this.viewportSession = null;
|
|
1037
|
+
this.viewportSnapshot.set(null);
|
|
1038
|
+
this.viewportInteracting.set(false);
|
|
1039
|
+
}
|
|
1040
|
+
panView(axis, direction) {
|
|
1041
|
+
const context = this.viewportContext();
|
|
1042
|
+
if (!context || this.pinned())
|
|
1043
|
+
return;
|
|
1044
|
+
const size = this.viewport() ?? { width: this.scene().width, height: this.boundedHeight() }, canvas = viewportCanvas(this.ownedScene(), context, size);
|
|
1045
|
+
const request = viewportGestureRequest(this.ownedScene(), context, size, { scale: 1, x: canvas.x + canvas.width / 2, y: canvas.y + canvas.height / 2, dx: axis === 'x' ? -direction * canvas.width * .25 : 0, dy: axis === 'y' ? -direction * canvas.height * .25 : 0 }, 'controls');
|
|
1046
|
+
if (request)
|
|
1047
|
+
this.requestView(request.intent);
|
|
1048
|
+
}
|
|
1049
|
+
toggleDetails() { if (!this.acceptsInput())
|
|
1050
|
+
return; if (!this.pinned())
|
|
1051
|
+
this.expandedTooltip.update(this.toggle); }
|
|
1052
|
+
togglePin() { if (!this.acceptsInput())
|
|
1053
|
+
return; if (this.tooltipPinnable() && this.tooltipMode() !== 'off')
|
|
1054
|
+
this.session?.setPinned(!this.session.snapshot.pinned); }
|
|
1055
|
+
toggleLegend(id) {
|
|
1056
|
+
if (!this.acceptsInput())
|
|
1057
|
+
return;
|
|
1058
|
+
const legend = this.ownedScene().legend;
|
|
1059
|
+
if (!this.legendInteractive() || !legend?.some(item => item.id === id))
|
|
1060
|
+
return;
|
|
1061
|
+
this.legendChange.emit(Object.freeze(legend.filter(item => item.id === id ? item.visible : !item.visible).map(item => item.id)));
|
|
1062
|
+
}
|
|
1063
|
+
clearPreviousDrawing() { if (this.previousDrawingTimer !== null) {
|
|
1064
|
+
clearTimeout(this.previousDrawingTimer);
|
|
1065
|
+
this.previousDrawingTimer = null;
|
|
1066
|
+
} this.previousDrawing.set(null); }
|
|
1067
|
+
clear() { if (!this.acceptsInput())
|
|
1068
|
+
return; this.session?.clear(); }
|
|
1069
|
+
dismissFloatingTooltipAt(x, y) {
|
|
1070
|
+
if (!this.state().active || this.tooltipMode() !== 'floating' || this.dockTooltip() || this.pinned())
|
|
1071
|
+
return false;
|
|
1072
|
+
const target = this.tooltipPosition(), height = this.tooltipHeight(), position = this.tooltipMotion.position() ?? target;
|
|
1073
|
+
if (x < position.x || x > position.x + target.width || y < position.y || y > position.y + height)
|
|
1074
|
+
return false;
|
|
1075
|
+
this.session?.clear();
|
|
1076
|
+
return true;
|
|
1077
|
+
}
|
|
1078
|
+
adjust(event) {
|
|
1079
|
+
if (event.nativeEvent.actionName === 'increment')
|
|
1080
|
+
this.step(1);
|
|
1081
|
+
if (event.nativeEvent.actionName === 'decrement')
|
|
1082
|
+
this.step(-1);
|
|
1083
|
+
}
|
|
1084
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: NativeChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1085
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.3", type: NativeChart, isStandalone: true, selector: "neu-c-scene, nc-native-chart", inputs: { scene: { classPropertyName: "scene", publicName: "scene", isSignal: true, isRequired: true, transformFunction: null }, viewportContext: { classPropertyName: "viewportContext", publicName: "viewportContext", isSignal: true, isRequired: false, transformFunction: null }, hapticsEnabled: { classPropertyName: "hapticsEnabled", publicName: "hapticsEnabled", isSignal: true, isRequired: false, transformFunction: null }, showColorAxis: { classPropertyName: "showColorAxis", publicName: "showColorAxis", isSignal: true, isRequired: false, transformFunction: null }, showLegend: { classPropertyName: "showLegend", publicName: "showLegend", isSignal: true, isRequired: false, transformFunction: null }, legendPosition: { classPropertyName: "legendPosition", publicName: "legendPosition", isSignal: true, isRequired: false, transformFunction: null }, legendInteractive: { classPropertyName: "legendInteractive", publicName: "legendInteractive", isSignal: true, isRequired: false, transformFunction: null }, showDendrogramAxis: { classPropertyName: "showDendrogramAxis", publicName: "showDendrogramAxis", isSignal: true, isRequired: false, transformFunction: null }, showParallelAxes: { classPropertyName: "showParallelAxes", publicName: "showParallelAxes", isSignal: true, isRequired: false, transformFunction: null }, showParallelNames: { classPropertyName: "showParallelNames", publicName: "showParallelNames", isSignal: true, isRequired: false, transformFunction: null }, showParallelTicks: { classPropertyName: "showParallelTicks", publicName: "showParallelTicks", isSignal: true, isRequired: false, transformFunction: null }, showGrid: { classPropertyName: "showGrid", publicName: "showGrid", isSignal: true, isRequired: false, transformFunction: null }, showXAxis: { classPropertyName: "showXAxis", publicName: "showXAxis", isSignal: true, isRequired: false, transformFunction: null }, showYAxis: { classPropertyName: "showYAxis", publicName: "showYAxis", isSignal: true, isRequired: false, transformFunction: null }, showSecondaryYAxis: { classPropertyName: "showSecondaryYAxis", publicName: "showSecondaryYAxis", isSignal: true, isRequired: false, transformFunction: null }, secondaryYAxisTitle: { classPropertyName: "secondaryYAxisTitle", publicName: "secondaryYAxisTitle", isSignal: true, isRequired: false, transformFunction: null }, secondaryYAxisTitleStyle: { classPropertyName: "secondaryYAxisTitleStyle", publicName: "secondaryYAxisTitleStyle", isSignal: true, isRequired: false, transformFunction: null }, xAxisTitle: { classPropertyName: "xAxisTitle", publicName: "xAxisTitle", isSignal: true, isRequired: false, transformFunction: null }, yAxisTitle: { classPropertyName: "yAxisTitle", publicName: "yAxisTitle", isSignal: true, isRequired: false, transformFunction: null }, titleStyle: { classPropertyName: "titleStyle", publicName: "titleStyle", isSignal: true, isRequired: false, transformFunction: null }, subtitleStyle: { classPropertyName: "subtitleStyle", publicName: "subtitleStyle", isSignal: true, isRequired: false, transformFunction: null }, xAxisTitleStyle: { classPropertyName: "xAxisTitleStyle", publicName: "xAxisTitleStyle", isSignal: true, isRequired: false, transformFunction: null }, yAxisTitleStyle: { classPropertyName: "yAxisTitleStyle", publicName: "yAxisTitleStyle", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null }, tooltipMode: { classPropertyName: "tooltipMode", publicName: "tooltipMode", isSignal: true, isRequired: false, transformFunction: null }, tooltipContent: { classPropertyName: "tooltipContent", publicName: "tooltipContent", isSignal: true, isRequired: false, transformFunction: null }, tooltipPinnable: { classPropertyName: "tooltipPinnable", publicName: "tooltipPinnable", isSignal: true, isRequired: false, transformFunction: null }, tooltipTemplate: { classPropertyName: "tooltipTemplate", publicName: "tooltipTemplate", isSignal: true, isRequired: false, transformFunction: null }, labelFormatters: { classPropertyName: "labelFormatters", publicName: "labelFormatters", isSignal: true, isRequired: false, transformFunction: null }, showCrosshair: { classPropertyName: "showCrosshair", publicName: "showCrosshair", isSignal: true, isRequired: false, transformFunction: null }, showMarkers: { classPropertyName: "showMarkers", publicName: "showMarkers", isSignal: true, isRequired: false, transformFunction: null }, showDataLabels: { classPropertyName: "showDataLabels", publicName: "showDataLabels", isSignal: true, isRequired: false, transformFunction: null }, dataLabelLayout: { classPropertyName: "dataLabelLayout", publicName: "dataLabelLayout", isSignal: true, isRequired: false, transformFunction: null }, axisLabelLayout: { classPropertyName: "axisLabelLayout", publicName: "axisLabelLayout", isSignal: true, isRequired: false, transformFunction: null }, showStackLabels: { classPropertyName: "showStackLabels", publicName: "showStackLabels", isSignal: true, isRequired: false, transformFunction: null }, strokeWidth: { classPropertyName: "strokeWidth", publicName: "strokeWidth", isSignal: true, isRequired: false, transformFunction: null }, markerSize: { classPropertyName: "markerSize", publicName: "markerSize", isSignal: true, isRequired: false, transformFunction: null }, markerStyle: { classPropertyName: "markerStyle", publicName: "markerStyle", isSignal: true, isRequired: false, transformFunction: null }, plotHeight: { classPropertyName: "plotHeight", publicName: "plotHeight", isSignal: true, isRequired: false, transformFunction: null }, minPlotWidth: { classPropertyName: "minPlotWidth", publicName: "minPlotWidth", isSignal: true, isRequired: false, transformFunction: null }, interactionMode: { classPropertyName: "interactionMode", publicName: "interactionMode", isSignal: true, isRequired: false, transformFunction: null }, selectionControls: { classPropertyName: "selectionControls", publicName: "selectionControls", isSignal: true, isRequired: false, transformFunction: null }, animationEnabled: { classPropertyName: "animationEnabled", publicName: "animationEnabled", isSignal: true, isRequired: false, transformFunction: null }, animationDuration: { classPropertyName: "animationDuration", publicName: "animationDuration", isSignal: true, isRequired: false, transformFunction: null }, animationKey: { classPropertyName: "animationKey", publicName: "animationKey", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, skipEntrance: { classPropertyName: "skipEntrance", publicName: "skipEntrance", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { viewportChange: "viewportChange", viewportRequest: "viewportRequest", interactionChange: "interactionChange", legendChange: "legendChange" }, host: { properties: { "style.backgroundColor": "dark() ? '#101C2C' : '#FFFFFF'" } }, viewQueries: [{ propertyName: "plotScroller", first: true, predicate: ["plotScroller"], descendants: true, isSignal: true }, { propertyName: "plot", first: true, predicate: ["plot"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: `
|
|
1086
|
+
@if(renderActive()){
|
|
1087
|
+
@if(scene().title){<text class="chart-title" testID="native-chart-title" [style.color]="titleAppearance().color" [style.textAlign]="titleAppearance().textAlign" [style.fontSize]="titleAppearance().fontSize" [style.fontWeight]="titleAppearance().fontWeight" [style.lineHeight.px]="titleAppearance().lineHeight" accessibilityRole="header">{{ scene().title }}</text>}
|
|
1088
|
+
@if(scene().description){<text class="description" testID="native-chart-subtitle" [style.color]="subtitleAppearance().color" [style.textAlign]="subtitleAppearance().textAlign" [style.fontSize]="subtitleAppearance().fontSize" [style.fontWeight]="subtitleAppearance().fontWeight" [style.lineHeight.px]="subtitleAppearance().lineHeight">{{ scene().description }}</text>}
|
|
1089
|
+
@if(missingSourceCount()){<text class="description" testID="chart-missing-source" [style.color]="muted()">{{missingSourceLabel()}}</text>}
|
|
1090
|
+
@if(scene().variwideLayout?.status==='no-positive-width'){<text class="description" testID="chart-empty-proportional" [style.color]="muted()">{{locale()==='en'?'No positive source widths: proportional areas cannot be drawn. Original values remain available.':'No hay anchos originales positivos: no se pueden dibujar áreas proporcionales. Se conservan los valores originales.'}}</text>}
|
|
1091
|
+
@if (showLegend() && scene().family!=='gauge' && effectiveLegendPosition() === 'top') {<nc-native-legend [items]="legendItems()" [interactive]="legendInteractive()&&!!ownedScene().legend" [locale]="locale()" [ink]="ink()" [muted]="muted()" (toggle)="toggleLegend($event)"/>}
|
|
1092
|
+
<view class="chart-body" testID="chart-layout-body" (layout)="measureBody($event)">
|
|
1093
|
+
@if(showLegend()&&scene().family!=='gauge'&&effectiveLegendPosition()==='left'){<nc-native-legend class="side-legend" testID="chart-side-legend" [items]="legendItems()" [vertical]="true" [maximumHeight]="boundedHeight()+40" [interactive]="legendInteractive()&&!!ownedScene().legend" [locale]="locale()" [ink]="ink()" [muted]="muted()" (toggle)="toggleLegend($event)"/>}
|
|
1094
|
+
<view class="chart-body-main">
|
|
1095
|
+
@if(hasAxes()&&showYAxis()&&yAxisTitle()||secondaryAxisVisible()&&secondaryYAxisTitle()){<view class="axis-titles">@if (hasAxes() && showYAxis() && yAxisTitle()) {<text class="axis-title" [style.flex]="1" testID="chart-y-axis-title" [style.color]="yTitleAppearance().color" [style.textAlign]="yTitleAppearance().textAlign" [style.fontSize]="yTitleAppearance().fontSize" [style.fontWeight]="yTitleAppearance().fontWeight" [style.lineHeight.px]="yTitleAppearance().lineHeight">{{ yAxisTitle() }}</text>}@if(secondaryAxisVisible()&&secondaryYAxisTitle()){<text class="axis-title" testID="chart-secondary-y-axis-title" [style.flex]="1" [style.color]="secondaryTitleAppearance().color" [style.textAlign]="secondaryTitleAppearance().textAlign" [style.fontSize]="secondaryTitleAppearance().fontSize" [style.fontWeight]="secondaryTitleAppearance().fontWeight" [style.lineHeight.px]="secondaryTitleAppearance().lineHeight">{{secondaryYAxisTitle()}}</text>}</view>}
|
|
1096
|
+
<view class="chart-frame" [style.height]="boundedHeight()+(cartesian()&&showXAxis()?40:0)">
|
|
1097
|
+
@if (cartesian() && displayedYAxis()) {
|
|
1098
|
+
<view class="y-axis" testID="chart-y-axis" [style.width]="primaryAxisWidth()" [class.bar-y-axis]="horizontalBars()||scene().family==='heatmap'" [class.temporal-y-axis]="temporalYAxis()" [accessible]="false">
|
|
1099
|
+
@if (categoryYAxis()) {
|
|
1100
|
+
@for (point of displayedCategoryLabels(); track point.id) {
|
|
1101
|
+
<view class="category-tick" [style.height]="categoryLabelHeight()" [style.width]="axisLabelLayout()==='all'?primaryAxisWidth()-18:undefined" [style.top]="mapY(point.y)-categoryLabelHeight()/2"><text class="category-label" [numberOfLines]="axisLabelLayout()==='truncate'||accessibility.fontScale()>1.5?1:2" [accessibilityLabel]="point.label" [style.color]="muted()">{{ point.label }}</text></view>
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
@for (tick of primaryYTicks(); track tick.y) {
|
|
1105
|
+
@if(tick.label){<text class="y-tick" [numberOfLines]="axisLabelLayout()==='truncate'?1:undefined" [style.width]="axisLabelLayout()==='truncate'?primaryAxisWidth()-12:undefined" [style.textAlign]="axisLabelLayout()==='truncate'?'right':undefined" [style.color]="muted()" [style.top]="mapY(tick.y)">{{ tick.label }}</text>}
|
|
1106
|
+
}
|
|
1107
|
+
</view>
|
|
1108
|
+
}
|
|
1109
|
+
<scroll-view #plotScroller class="plot-scroll" testID="chart-scroll-viewport" [horizontal]="true" [gesture]="scrollGesture()" [scrollEnabled]="scrolling()&&!viewportInteracting()" [nestedScrollEnabled]="true" [showsHorizontalScrollIndicator]="false" [showsVerticalScrollIndicator]="false" [scrollEventThrottle]="16" [contentContainerStyle]="scrollContentStyle" (layout)="measureScroll($event)" (scroll)="scrollPlot($event)" [accessibilityLabel]="locale()==='en'?'Chart data':'Datos de la gráfica'">
|
|
1110
|
+
<view class="plot-content" [style.width]="contentWidth()||undefined" [style.minWidth]="boundedMinimumWidth()">
|
|
1111
|
+
<view #plot class="plot" [style.height]="boundedHeight()" testID="native-chart-plot" (layout)="measure($event)" [gesture]="gesture()"
|
|
1112
|
+
[accessible]="true" accessibilityRole="adjustable"
|
|
1113
|
+
[accessibilityLabel]="scene().title || (locale()==='en'?'Chart':'Gráfica')" [accessibilityValue]="accessibilityValue()"
|
|
1114
|
+
[accessibilityState]="{disabled:pinned()||ownedScene().observations.length===0}"
|
|
1115
|
+
[accessibilityHint]="accessibilityHint()"
|
|
1116
|
+
[accessibilityActions]="actions()" (accessibilityAction)="adjust($event)">
|
|
1117
|
+
@if(viewportDriver()?.styles?.native;as viewportStyles){<view class="motion-layer" [collapsable]="false" [workletStyle]="viewportStyles.base"><ng-container [ngTemplateOutlet]="chartVisuals"/></view>}
|
|
1118
|
+
@else if(viewportDriver()?.styles?.browser;as viewportStyles){<view class="motion-layer" [animatedStyle]="viewportStyles.base"><ng-container [ngTemplateOutlet]="chartVisuals"/></view>}
|
|
1119
|
+
@else{<ng-container [ngTemplateOutlet]="chartVisuals"/>}
|
|
1120
|
+
<ng-template #chartVisuals>
|
|
1121
|
+
<view class="motion-layer" testID="chart-decorative-geometry" [collapsable]="false" [accessible]="false" [accessibilityElementsHidden]="true" importantForAccessibility="no-hide-descendants" pointerEvents="none">
|
|
1122
|
+
<ng-icon class="geometry grid-geometry" [svg]="gridDrawing()" />
|
|
1123
|
+
@if(previousDrawing();as previous){
|
|
1124
|
+
@if(motionStyles().native?.previous;as style){<view class="motion-layer" testID="chart-previous-geometry" [collapsable]="false" [workletStyle]="style" pointerEvents="none"><ng-icon class="geometry" [svg]="previous"/></view>}
|
|
1125
|
+
@else if(motionStyles().browser?.previous;as style){<view class="motion-layer" testID="chart-previous-geometry" [animatedStyle]="style" pointerEvents="none"><ng-icon class="geometry" [svg]="previous"/></view>}
|
|
1126
|
+
}
|
|
1127
|
+
@if(motionStyles().native;as styles){
|
|
1128
|
+
<view class="motion-layer motion-clip" [collapsable]="false" [workletStyle]="styles.clip" pointerEvents="none"><view class="motion-layer" testID="chart-current-geometry" [collapsable]="false" [workletStyle]="styles.geometry" pointerEvents="none"><ng-icon class="geometry" [svg]="drawing()" />@if(scene().family==='wordcloud'){<nc-wordcloud-layer [scene]="paintScene()" [viewport]="viewport()" [surface]="dark()?'#101C2C':'#FFFFFF'"/>}</view></view>
|
|
1129
|
+
}@else if(motionStyles().browser;as styles){
|
|
1130
|
+
<view class="motion-layer motion-clip" [animatedStyle]="styles.clip" pointerEvents="none"><view class="motion-layer" testID="chart-current-geometry" [animatedStyle]="styles.geometry" pointerEvents="none"><ng-icon class="geometry" [svg]="drawing()" />@if(scene().family==='wordcloud'){<nc-wordcloud-layer [scene]="paintScene()" [viewport]="viewport()" [surface]="dark()?'#101C2C':'#FFFFFF'"/>}</view></view>
|
|
1131
|
+
}
|
|
1132
|
+
@if(radialLayout();as radial){
|
|
1133
|
+
@if(motionStyles().native?.entranceVisibility;as visibility){<view class="motion-layer" [collapsable]="false" [workletStyle]="visibility" pointerEvents="none"><nc-chart-radial-layer [layout]="radial" [drawing]="drawing()" [native]="motionStyles().native?.radial"/></view>}
|
|
1134
|
+
@else if(motionStyles().browser?.entranceVisibility;as visibility){<view class="motion-layer" [animatedStyle]="visibility" pointerEvents="none"><nc-chart-radial-layer [layout]="radial" [drawing]="drawing()" [browser]="motionStyles().browser?.radial"/></view>}
|
|
1135
|
+
}
|
|
1136
|
+
@if(bubbleLayout();as bubbles){
|
|
1137
|
+
@if(motionStyles().native?.entranceVisibility;as visibility){<view class="motion-layer" [collapsable]="false" [workletStyle]="visibility" pointerEvents="none">@for(bubble of bubbles;track bubble.id){<view class="bubble-entrance" [collapsable]="false" [style.left]="bubble.left" [style.top]="bubble.top" [style.width]="bubble.size" [style.height]="bubble.size" [workletStyle]="motionStyles().native!.bubble!" pointerEvents="none"><ng-icon class="geometry" [svg]="bubble.drawing"/></view>}</view>}
|
|
1138
|
+
@else if(motionStyles().browser?.entranceVisibility;as visibility){<view class="motion-layer" [animatedStyle]="visibility" pointerEvents="none">@for(bubble of bubbles;track bubble.id){<view class="bubble-entrance" [style.left]="bubble.left" [style.top]="bubble.top" [style.width]="bubble.size" [style.height]="bubble.size" [animatedStyle]="motionStyles().browser!.bubble!" pointerEvents="none"><ng-icon class="geometry" [svg]="bubble.drawing"/></view>}</view>}
|
|
1139
|
+
}
|
|
1140
|
+
@if(gaugeParts()){<ng-icon class="geometry grid-geometry" [svg]="gaugeOverlayDrawing()"/>}
|
|
1141
|
+
@if(scene().references?.length||scene().bulletTargets?.length){<ng-icon class="geometry grid-geometry" testID="chart-reference-lines" [svg]="referenceDrawing()"/>}
|
|
1142
|
+
</view>
|
|
1143
|
+
@for(label of referenceLabels();track label.id){<text class="reference-label" [style.left]="label.x" [style.top]="label.y" [style.width]="label.width" [style.height]="label.height" [style.color]="label.color" [style.backgroundColor]="label.backgroundColor??'transparent'" [style.paddingLeft]="label.backgroundColor?6:0" [style.paddingRight]="label.backgroundColor?6:0" [style.borderRadius]="label.backgroundColor?3:0" [numberOfLines]="1" pointerEvents="none">{{label.text}}</text>}
|
|
1144
|
+
@if(activeTile();as tile){<view class="active-tile" testID="chart-active-tile" [style.left]="mapX(tile.x)" [style.top]="mapY(tile.y)" [style.width]="tile.width*transform().sx" [style.height]="tile.height*transform().sy" [style.borderColor]="dark()?'#FFFFFF':'#172438'" pointerEvents="none"/>}
|
|
1145
|
+
@if (state().active; as point) {
|
|
1146
|
+
@if (showCrosshair() && cartesian()) {
|
|
1147
|
+
@if (horizontalBars()) {
|
|
1148
|
+
<view class="crosshair horizontal" [style.top]="mapY(state().shared?.coordinate??point.y)" pointerEvents="none" />
|
|
1149
|
+
} @else {
|
|
1150
|
+
<view class="crosshair vertical" [style.left]="mapX(state().shared?.coordinate??point.x)" pointerEvents="none" />
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
@if(activeVennDrawing();as outline){<ng-icon class="geometry" testID="chart-active-sets" [svg]="outline" pointerEvents="none"/>}
|
|
1154
|
+
@if(activePolygonDrawing();as outline){<ng-icon class="geometry" testID="chart-active-polygon" [svg]="outline" pointerEvents="none"/>}
|
|
1155
|
+
@if(activeTilemapCircle();as outline){<ng-icon class="geometry" testID="chart-active-tile" [svg]="outline" pointerEvents="none"/>}
|
|
1156
|
+
@if(activeSectorDrawing();as outline){<ng-icon class="geometry" testID="chart-active-sector" [svg]="outline" pointerEvents="none"/>}
|
|
1157
|
+
@if(activeItemDrawing();as outline){<ng-icon class="geometry" testID="chart-active-item" [svg]="outline" pointerEvents="none"/>}
|
|
1158
|
+
@if((cartesian()&&scene().family!=='pictorial'&&scene().family!=='heatmap')||scene().family==='dendrogram'||scene().family==='parallel'||scene().family==='radar'||scene().family==='polar'||point.relationship?.type==='link'){@for(active of activeMarkerPoints();track active.id.seriesId){<view class="active-marker" testID="chart-active-marker" [style.left]="mapX(active.x)" [style.backgroundColor]="(scene().family==='line'||scene().family==='area'||scene().family==='areaspline'||scene().family==='spline'||scene().family==='mixed')?'transparent':dark()?'#17263A':'#FFFFFF'"
|
|
1159
|
+
[style.top]="mapY(active.y)" [style.borderWidth]="(scene().family==='line'||scene().family==='area'||scene().family==='areaspline'||scene().family==='spline'||scene().family==='mixed')?0:3" [style.borderColor]="active.color" pointerEvents="none">@if((scene().family==='line'||scene().family==='area'||scene().family==='areaspline'||scene().family==='spline'||scene().family==='mixed')){<ng-icon class="geometry" [svg]="activeMarkerSymbols().get(active.id.seriesId)!"/>}</view>}}
|
|
1160
|
+
@if(tooltipMode()==='floating' && !dockTooltip() && !pinned()){
|
|
1161
|
+
<ng-template #floatingContent><nc-native-tooltip [family]="scene().family" [point]="point" [shared]="state().shared" [detailRows]="tooltipDetails()" [compactHeight]="tooltipHeight()" [unit]="scene().unit" [secondaryUnit]="scene().secondaryUnit??''" [xTitle]="xAxisTitle()" [locale]="locale()" [dark]="dark()" /></ng-template>
|
|
1162
|
+
@if(tooltipMotionStyles.native;as style){<view class="floating-tooltip" [style.left]="0" [style.top]="0" [style.width]="tooltipPosition().width" [collapsable]="false" [workletStyle]="style" pointerEvents="none"><ng-container [ngTemplateOutlet]="floatingContent"/></view>}
|
|
1163
|
+
@else if(tooltipMotionStyles.browser;as style){<view class="floating-tooltip" [style.left]="0" [style.top]="0" [style.width]="tooltipPosition().width" [animatedStyle]="style" pointerEvents="none"><ng-container [ngTemplateOutlet]="floatingContent"/></view>}
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
<ng-template #dataLabels>
|
|
1167
|
+
@if(emptyState();as empty){<view class="plot-empty" testID="chart-empty-state" pointerEvents="none"><text class="empty-title" [ncLabelHalo]="ink()" [style.color]="ink()">{{empty.title}}</text><text class="empty-description" [ncLabelHalo]="muted()" [style.color]="muted()">{{empty.description}}</text></view>}
|
|
1168
|
+
@for(label of valueLabels();track label.id){<text class="value-label" testID="chart-value-label" [style.left]="label.x" [style.top]="label.y" [style.width]="label.width" [style.height]="label.height" [style.color]="label.ink??ink()" [ncLabelHalo]="label.ink??ink()" [numberOfLines]="1" [accessible]="false" pointerEvents="none">{{label.text}}</text>}
|
|
1169
|
+
@for(label of tileLabels();track $index){<view class="tile-label-box" [style.left]="label.left" [style.top]="label.top" [style.width]="label.width" [style.height]="label.height" [accessible]="false" pointerEvents="none"><text class="tile-label" [ncLabelHalo]="label.color" [numberOfLines]="1" [style.color]="label.color" [accessible]="false">{{label.text}}</text></view>}
|
|
1170
|
+
@for(annotation of plainAnnotations();track $index){
|
|
1171
|
+
<text class="annotation" [class.annotation-value]="annotation.role==='value'" [style.color]="ink()"
|
|
1172
|
+
[style.left]="mapX(annotation.x)" [style.top]="mapY(annotation.y)" pointerEvents="none">{{annotation.text}}</text>
|
|
1173
|
+
}
|
|
1174
|
+
@for(label of dendrogramAxisLabels();track label.id){<text class="polar-axis-label" [style.height]="label.height" [style.fontSize]="10" [style.color]="muted()" [style.left]="label.left" [style.top]="label.top" [style.width]="label.width" [numberOfLines]="1" [accessible]="false" pointerEvents="none">{{label.text}}</text>}
|
|
1175
|
+
@for(label of parallelAxisLabels();track label.id){<text class="polar-axis-label" [style.height]="label.height" [style.fontSize]="label.type==='tick'?10:11" [style.color]="ink()" [style.left]="label.left" [style.top]="label.top" [style.width]="label.width" [style.fontWeight]="label.type==='name'?600:400" [numberOfLines]="1" [accessible]="false" pointerEvents="none">{{label.text}}</text>}
|
|
1176
|
+
@for(label of polarLabels();track label.id){<text class="polar-axis-label" [style.color]="ink()" [style.left]="label.left" [style.top]="label.top" [style.width]="label.width" [numberOfLines]="1" [accessible]="false" pointerEvents="none">{{label.text}}</text>}
|
|
1177
|
+
@for(label of radialLabels();track label.id){
|
|
1178
|
+
<text class="radial-label" [numberOfLines]="dataLabelLayout()==='auto'?undefined:1" [style.width]="label.width" [style.marginLeft]="label.width===undefined?undefined:-label.width/2" [ncLabelHalo]="label.ink" [style.color]="label.ink" [style.left]="mapX(label.x)" [style.top]="mapY(label.y)" [accessible]="false" pointerEvents="none">{{label.text}}</text>
|
|
1179
|
+
}
|
|
1180
|
+
</ng-template>
|
|
1181
|
+
@if(motionStyles().native;as styles){<view class="motion-layer" [collapsable]="false" [workletStyle]="styles.labels" pointerEvents="none"><ng-container [ngTemplateOutlet]="dataLabels"/></view>}
|
|
1182
|
+
@else if(motionStyles().browser;as styles){<view class="motion-layer" [animatedStyle]="styles.labels" pointerEvents="none"><ng-container [ngTemplateOutlet]="dataLabels"/></view>}
|
|
1183
|
+
</ng-template>
|
|
1184
|
+
@if(viewportSnapshot();as snapshot){
|
|
1185
|
+
@if(viewportDriver()?.styles?.native;as viewportStyles){<view class="motion-layer" testID="chart-viewport-preview" [collapsable]="false" [workletStyle]="viewportStyles.preview" pointerEvents="none"><ng-icon class="geometry grid-geometry" [svg]="snapshot.grid"/><ng-icon class="geometry grid-geometry" [svg]="snapshot.series"/><ng-icon class="geometry grid-geometry" [svg]="snapshot.references"/></view>}
|
|
1186
|
+
@else if(viewportDriver()?.styles?.browser;as viewportStyles){<view class="motion-layer" testID="chart-viewport-preview" [animatedStyle]="viewportStyles.preview" pointerEvents="none"><ng-icon class="geometry grid-geometry" [svg]="snapshot.grid"/><ng-icon class="geometry grid-geometry" [svg]="snapshot.series"/><ng-icon class="geometry grid-geometry" [svg]="snapshot.references"/></view>}
|
|
1187
|
+
}
|
|
1188
|
+
</view>
|
|
1189
|
+
@if (cartesian() && showXAxis()) {<view class="x-axis" testID="chart-x-axis" [accessible]="false">
|
|
1190
|
+
@if(scene().family==='variwide'){@for(tick of weightedLabels();track tick.id){<text class="x-tick" testID="chart-weighted-x-label" [accessibilityLabel]="tick.label" [numberOfLines]="1" [style.color]="muted()" [style.width]="tick.width" [style.left]="tick.left">{{tick.label}}</text>}}@else{
|
|
1191
|
+
@for (tick of displayedXLabels(); track tick.x) {
|
|
1192
|
+
<text class="x-tick" [numberOfLines]="1" [style.color]="muted()" [style.width]="xTickWidthFor(tick.label)" [style.left]="xTickLeft(tick.x,xTickWidthFor(tick.label))">{{ tick.label }}</text>
|
|
1193
|
+
}}
|
|
1194
|
+
</view>}
|
|
1195
|
+
</view>
|
|
1196
|
+
</scroll-view>
|
|
1197
|
+
@if(secondaryAxisVisible()&&secondaryYTicks();as ticks){<view class="secondary-y-axis" testID="chart-secondary-y-axis" [style.width]="valueAxisWidth()" [accessible]="false">@for(tick of ticks;track tick.y){<text class="secondary-y-tick" [numberOfLines]="axisLabelLayout()==='truncate'?1:undefined" [style.width]="axisLabelLayout()==='truncate'?valueAxisWidth()-12:undefined" [style.color]="muted()" [style.top]="mapY(tick.y)">{{tick.label}}</text>}</view>}
|
|
1198
|
+
@if(pinnedOverlay()){@if(state().active;as point){
|
|
1199
|
+
<view class="floating-tooltip" testID="chart-tooltip-details" [style.left]="(cartesian()&&showYAxis()?primaryAxisWidth():0)+8" [style.top]="8" [style.width]="pinnedWidth()">
|
|
1200
|
+
<nc-native-tooltip [family]="scene().family" [point]="point" [shared]="state().shared" [detailRows]="tooltipDetails()" [pinned]="true" [allowScroll]="true" [maximumHeight]="pinnedBodyHeight()" [unit]="scene().unit" [secondaryUnit]="scene().secondaryUnit??''" [xTitle]="xAxisTitle()" [locale]="locale()" [dark]="dark()" (dismiss)="clear()" />
|
|
1201
|
+
</view>
|
|
1202
|
+
}}
|
|
1203
|
+
</view>
|
|
1204
|
+
@if(scrolling()){<text class="touch-hint" [style.color]="muted()">{{locale()==='en'?'Swipe horizontally to see more data. Tap a point for its value.':'Desliza horizontalmente para ver más datos. Toca un punto para ver su valor.'}}</text>}
|
|
1205
|
+
@if(ownedScene().heatmap??ownedScene().tilemap;as tilemap){@if(showColorAxis()){<nc-tilemap-color-axis [axis]="tilemap.colorAxis" [locale]="locale()" [ink]="ink()" [unit]="scene().unit" [missingCount]="tilemap.layout.missingCount"/>}}
|
|
1206
|
+
@if (hasAxes() && showXAxis() && xAxisTitle()) {<text class="axis-title x-title" testID="chart-x-axis-title" [style.color]="xTitleAppearance().color" [style.textAlign]="xTitleAppearance().textAlign" [style.fontSize]="xTitleAppearance().fontSize" [style.fontWeight]="xTitleAppearance().fontWeight" [style.lineHeight.px]="xTitleAppearance().lineHeight">{{ xAxisTitle() }}</text>}
|
|
1207
|
+
</view>
|
|
1208
|
+
@if(showLegend()&&scene().family!=='gauge'&&effectiveLegendPosition()==='right'){<nc-native-legend class="side-legend" testID="chart-side-legend" [items]="legendItems()" [vertical]="true" [maximumHeight]="boundedHeight()+40" [interactive]="legendInteractive()&&!!ownedScene().legend" [locale]="locale()" [ink]="ink()" [muted]="muted()" (toggle)="toggleLegend($event)"/>}
|
|
1209
|
+
</view>
|
|
1210
|
+
@if (showLegend() && scene().family!=='gauge' && effectiveLegendPosition() === 'bottom') {<nc-native-legend [items]="legendItems()" [interactive]="legendInteractive()&&!!ownedScene().legend" [locale]="locale()" [ink]="ink()" [muted]="muted()" (toggle)="toggleLegend($event)"/>}
|
|
1211
|
+
@if(viewportContext();as context){@if(context.controls){<view class="viewport-controls" [accessibilityLabel]="locale()==='en'?'Chart zoom':'Zoom de la gráfica'">
|
|
1212
|
+
<pressable class="control" [disabled]="!zoomInAvailable()" [accessibilityState]="controlAccessibilityState(!zoomInAvailable())" [style.opacity]="zoomInAvailable()?1:.45" accessibilityRole="button" [accessibilityLabel]="locale()==='en'?'Zoom in':'Ampliar gráfica'" [style.backgroundColor]="dark()?'#202E42':'#EDF2F8'" (press)="requestView({type:'zoom',factor:2})"><text class="control-label" [style.color]="ink()">+</text></pressable>
|
|
1213
|
+
<pressable class="control" [disabled]="pinned()||!hasViewportWindow()" [accessibilityState]="controlAccessibilityState(pinned()||!hasViewportWindow())" accessibilityRole="button" [accessibilityLabel]="locale()==='en'?'Zoom out':'Reducir gráfica'" [style.backgroundColor]="dark()?'#202E42':'#EDF2F8'" (press)="requestView({type:'zoom',factor:.5})"><text class="control-label" [style.color]="ink()">−</text></pressable>
|
|
1214
|
+
<pressable class="control" [disabled]="pinned()||!hasViewportWindow()" [accessibilityState]="controlAccessibilityState(pinned()||!hasViewportWindow())" accessibilityRole="button" [accessibilityLabel]="locale()==='en'?'Reset zoom':'Restablecer zoom'" [style.backgroundColor]="dark()?'#202E42':'#EDF2F8'" (press)="requestView({type:'reset'})"><text class="control-label" [style.color]="ink()">{{locale()==='en'?'Reset':'Restablecer'}}</text></pressable>
|
|
1215
|
+
@if(context.pan&&hasViewportWindow()){
|
|
1216
|
+
@if(viewportAxes().horizontal){@for(direction of [-1,1];track direction){<pressable class="control" [disabled]="pinned()" [accessibilityState]="controlAccessibilityState(pinned())" accessibilityRole="button" [accessibilityLabel]="locale()==='en'?(direction===-1?'Pan left':'Pan right'):(direction===-1?'Desplazar a la izquierda':'Desplazar a la derecha')" [style.backgroundColor]="dark()?'#202E42':'#EDF2F8'" (press)="panView('x',direction)"><text class="control-label" [style.color]="ink()">{{direction===-1?'←':'→'}}</text></pressable>}}
|
|
1217
|
+
@if(viewportAxes().vertical){@for(direction of [-1,1];track direction){<pressable class="control" [disabled]="pinned()" [accessibilityState]="controlAccessibilityState(pinned())" accessibilityRole="button" [accessibilityLabel]="locale()==='en'?(direction===-1?'Pan up':'Pan down'):(direction===-1?'Desplazar hacia arriba':'Desplazar hacia abajo')" [style.backgroundColor]="dark()?'#202E42':'#EDF2F8'" (press)="panView('y',direction)"><text class="control-label" [style.color]="ink()">{{direction===-1?'↑':'↓'}}</text></pressable>}}
|
|
1218
|
+
}
|
|
1219
|
+
</view>}}
|
|
1220
|
+
@if(selectionControls() || (state().active && (tooltipMode()==='floating'||(tooltipPinnable()&&tooltipMode()!=='off')))){
|
|
1221
|
+
<view class="controls">
|
|
1222
|
+
@if(selectionControls()){
|
|
1223
|
+
<pressable class="control" [disabled]="pinned()||ownedScene().observations.length===0" [accessibilityState]="controlAccessibilityState(pinned()||ownedScene().observations.length===0)" [style.opacity]="pinned()||ownedScene().observations.length===0?0.45:1" [style.backgroundColor]="dark()?'#202E42':'#EDF2F8'" accessibilityRole="button" [accessibilityLabel]="locale()==='en'?'Previous observation':'Observación anterior'" (press)="step(-1)"><text class="control-label" [style.color]="ink()">{{locale()==='en'?'Previous':'Anterior'}}</text></pressable>
|
|
1224
|
+
<pressable class="control" [disabled]="pinned()||ownedScene().observations.length===0" [accessibilityState]="controlAccessibilityState(pinned()||ownedScene().observations.length===0)" [style.opacity]="pinned()||ownedScene().observations.length===0?0.45:1" [style.backgroundColor]="dark()?'#202E42':'#EDF2F8'" accessibilityRole="button" [accessibilityLabel]="locale()==='en'?'Next observation':'Observación siguiente'" (press)="step(1)"><text class="control-label" [style.color]="ink()">{{locale()==='en'?'Next':'Siguiente'}}</text></pressable>
|
|
1225
|
+
<pressable class="control" [disabled]="ownedScene().observations.length===0" [accessibilityState]="controlAccessibilityState(ownedScene().observations.length===0)" [style.backgroundColor]="dark()?'#202E42':'#EDF2F8'" accessibilityRole="button" [accessibilityLabel]="locale()==='en'?'Clear selection':'Limpiar selección'" (press)="clear()"><text class="control-label" [style.color]="ink()">{{locale()==='en'?'Clear':'Limpiar'}}</text></pressable>
|
|
1226
|
+
}
|
|
1227
|
+
@if(state().active && tooltipMode()==='floating'){
|
|
1228
|
+
<pressable class="control" [disabled]="pinned()" [style.opacity]="pinned()?0.45:1" accessibilityRole="button" [accessibilityState]="{expanded:expandedTooltip(),disabled:pinned()}" [accessibilityLabel]="locale()==='en'?(expandedTooltip()?'Collapse tooltip details':'Read full tooltip'):(expandedTooltip()?'Contraer detalles del tooltip':'Leer tooltip completo')" [style.backgroundColor]="dark()?'#202E42':'#EDF2F8'" (press)="toggleDetails()"><text class="control-label" [style.color]="ink()">{{locale()==='en'?(expandedTooltip()?'Collapse':'Details'):(expandedTooltip()?'Contraer':'Detalles')}}</text></pressable>
|
|
1229
|
+
}
|
|
1230
|
+
@if(state().active && tooltipPinnable() && tooltipMode()!=='off'){
|
|
1231
|
+
<pressable class="control" accessibilityRole="button" [accessibilityState]="{selected:pinned()}" [accessibilityLabel]="locale()==='en'?(pinned()?'Unpin tooltip':'Pin tooltip'):(pinned()?'Desfijar tooltip':'Fijar tooltip')" [style.backgroundColor]="dark()?'#202E42':'#EDF2F8'" (press)="togglePin()"><text class="control-label" [style.color]="ink()">{{locale()==='en'?(pinned()?'Unpin':'Pin'):(pinned()?'Desfijar':'Fijar')}}</text></pressable>
|
|
1232
|
+
}
|
|
1233
|
+
</view>}
|
|
1234
|
+
@if(dockTooltip()) {<view class="details" testID="chart-tooltip-details" [style.backgroundColor]="dark()?'#202E42':'#F1F5FA'">
|
|
1235
|
+
@if (state().active; as point) {
|
|
1236
|
+
@if(tooltipMode()==='docked' && tooltipTemplate();as template){
|
|
1237
|
+
<ng-container [ngTemplateOutlet]="template" [ngTemplateOutletContext]="dockedTooltipContext() ?? null"/>
|
|
1238
|
+
}@else{
|
|
1239
|
+
<nc-native-tooltip [family]="scene().family" [point]="point" [shared]="state().shared" [detailRows]="tooltipDetails()" [pinned]="pinned()" [allowScroll]="true" [unit]="scene().unit" [secondaryUnit]="scene().secondaryUnit??''" [xTitle]="xAxisTitle()" [locale]="locale()" [dark]="dark()" (dismiss)="clear()" />
|
|
1240
|
+
}
|
|
1241
|
+
<text class="detail-status" [style.color]="muted()">{{pinned()?(locale()==='en'?'Pinned · Unpin to explore':'Fijado · Desfija para explorar'):(locale()==='en'?(state().scrubbing?'Exploring':'Selected'):(state().scrubbing ? 'Explorando' : 'Seleccionado')) }}</text>
|
|
1242
|
+
} @else {
|
|
1243
|
+
<text class="detail-label" [style.color]="ink()">{{locale()==='en'?'Explore the data':'Explora los datos'}}</text>
|
|
1244
|
+
<text class="detail-value" [style.color]="ink()">{{locale()==='en'?'Touch a point':'Toca un punto'}}</text>
|
|
1245
|
+
<text class="detail-status" [style.color]="muted()">{{locale()==='en'?'Or use the accessible controls':'O utiliza los controles accesibles'}}</text>
|
|
1246
|
+
}
|
|
1247
|
+
</view>} @else {<text class="touch-hint" [style.color]="muted()">{{touchHint()}}</text>}}
|
|
1248
|
+
`, isInline: true, styles: ["\n :host { display: flex; flex-direction: column; min-width: 0; gap: 12px; padding: 18px; }\n text { color: #263449; font-size: 15px; }\n .chart-title { font-size: 23px; font-weight: 600; }\n .description { color: #536174; line-height: 22px; }\n .axis-titles {flex-direction:row;gap:12px;justify-content:space-between;}\n .axis-title {font-size:12px;color:#536174;}\n .x-title {text-align:center;}\n .chart-body {flex-direction:row;gap:16px;min-width:0;align-items:flex-start;}\n .chart-body-main {flex:1;min-width:0;gap:12px;}\n .side-legend {width:180px;flex-shrink:0;}\n .chart-frame { flex-direction: row; height: 232px; margin-top: 20px; }\n @media (orientation: landscape) and (max-height: 500px) {\n :host {padding:4px;gap:4px;}\n .chart-body-main {gap:4px;}\n .chart-frame {margin-top:0;}\n }\n .secondary-y-axis {width:38px;}\n .secondary-y-tick {position:absolute;font-size:11px;margin-top:-7px;left:4px;}\n .y-axis { width: 38px; }\n .bar-y-axis { width: 90px; }\n .temporal-y-axis {width:72px;}\n .y-tick { position: absolute; right: 9px; margin-top: -9px; font-size: 12px; color: #536174; }\n .category-tick {position:absolute;right:9px;width:72px;justify-content:center;}\n .category-label {font-size:12px;text-align:right;line-height:14px;}\n .plot-scroll {flex:1;min-width:0;}\n .plot-content {flex-grow:1;min-width:0;}\n .plot { flex-shrink:0; overflow: hidden; }\n .floating-tooltip{position:absolute;z-index:4;}\n .value-label{position:absolute;font-size:12px;line-height:18px;text-align:center;}\n .plot-empty{position:absolute;left:12px;right:12px;top:38%;padding:10px;align-items:center;gap:4px;}.empty-title{font-size:14px;font-weight:600;text-align:center;}.empty-description{font-size:12px;text-align:center;}\n .active-tile{position:absolute;border-width:2px;} .tile-label-box{position:absolute;overflow:hidden;justify-content:center;padding-left:4px;padding-right:4px;} .tile-label{font-size:12px;line-height:16px;text-align:center;}\n .annotation{position:absolute;width:160px;margin-left:-80px;text-align:center;font-size:13px;}\n .annotation-value{font-size:28px;font-weight:600;margin-top:-18px;}\n .touch-hint{font-size:12px;}\n .reference-label{position:absolute;font-size:12px;line-height:18px;}\n .radial-label{position:absolute;width:52px;margin-left:-26px;margin-top:-8px;text-align:center;font-size:13px;font-weight:600;}\n .geometry { width: 100%; height: 100%; }\n .grid-geometry,.motion-layer {position:absolute;left:0;top:0;width:100%;height:100%;}\n .motion-clip {overflow:hidden;}\n .bubble-entrance{position:absolute;}\n .crosshair { position: absolute; background-color: #8C99AC; }\n .vertical { width: 1px; top: 0; bottom: 0; }\n .horizontal { height: 1px; left: 0; right: 0; }\n .polar-axis-label {position:absolute;font-size:11px;line-height:16px;text-align:center;}\n .active-marker { position: absolute; width: 14px; height: 14px; border-radius: 7px; border-width: 3px; background-color: #FFFFFF; margin-left: -7px; margin-top: -7px; }\n .x-axis { height:28px;margin-top:12px;flex-shrink:0; }\n .x-tick { position:absolute;text-align:center;font-size:12px;color:#536174; }\n .details { background-color: #F1F5FA; border-radius: 12px; padding: 18px; gap: 5px; min-height: 115px; }\n .detail-label { font-weight: 600; }\n .detail-value { font-size: 23px; font-weight: 600; }\n .detail-status { color: #536174; font-size: 13px; }\n .controls { flex-direction: row; flex-wrap: wrap; gap: 8px; margin-top: 8px; }\n .viewport-controls {flex-direction:row;flex-wrap:wrap;gap:8px;}.viewport-controls .control{min-width:44px;}\n .control { min-width: 72px; min-height: 48px; padding: 8px 10px; align-items: center; justify-content: center; border-radius: 6px; background-color: #EDF2F8; }\n .control-label { font-size: 13px; font-weight: 500; }\n .control:active { background-color: #D8E3F2; }\n @media (min-width: 700px) { .chart-frame { height: 330px; } }\n @media (prefers-color-scheme: dark) {\n text { color: #EDF2FA; }\n .description, .detail-status, .x-tick, .y-tick, .axis-title { color: #AFBDD1; }\n .details, .control { background-color: #202E42; }\n .active-marker { background-color: #152033; }\n .control:active { background-color: #31435D; }\n }\n "], dependencies: [{ kind: "directive", type: LabelHalo, selector: "[ncLabelHalo]", inputs: ["ncLabelHalo"] }, { kind: "component", type: WordCloudLayer, selector: "nc-wordcloud-layer", inputs: ["scene", "viewport", "surface"] }, { kind: "directive", type: View, selector: "view" }, { kind: "directive", type: Text, selector: "text", inputs: ["numberOfLines", "ellipsizeMode", "selectable", "selectionColor", "allowFontScaling", "maxFontSizeMultiplier", "dynamicTypeRamp", "adjustsFontSizeToFit", "minimumFontScale", "lineBreakStrategyIOS", "textBreakStrategy", "dataDetectorType", "android_hyphenationFrequency", "pressable", "suppressHighlighting"], exportAs: ["text"] }, { kind: "directive", type: Pressable, selector: "pressable", exportAs: ["pressable"] }, { kind: "component", type: ScrollView, selector: "scroll-view", inputs: ["contentContainerStyle", "contentContainerClass", "horizontal", "contentOffset", "maintainVisibleContentPosition", "keyboardShouldPersistTaps", "nestedScrollEnabled", "stickyHeaderIndices"], outputs: ["contentSizeChange"], exportAs: ["scrollView"] }, { kind: "directive", type: NativeGesture, selector: "[gesture]" }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "color", "strokeWidth", "accessibilityLabel"] }, { kind: "component", type: NativeTooltip, selector: "nc-native-tooltip", inputs: ["point", "compactHeight", "detailRows", "shared", "allowScroll", "pinned", "maximumHeight", "unit", "secondaryUnit", "xTitle", "locale", "dark", "family"], outputs: ["dismiss", "measured"] }, { kind: "component", type: NativeLegend, selector: "nc-native-legend", inputs: ["items", "interactive", "vertical", "maximumHeight", "locale", "ink", "muted"], outputs: ["toggle"] }, { kind: "component", type: NativeTilemapColorAxis, selector: "nc-tilemap-color-axis", inputs: ["axis", "locale", "ink", "unit", "missingCount"] }, { kind: "component", type: NativeRadialLayer, selector: "nc-chart-radial-layer", inputs: ["layout", "drawing", "native", "browser"] }, { kind: "directive", type: AnimatedStyle, selector: "[animatedStyle]" }, { kind: "directive", type: WorkletStyle, selector: "[workletStyle]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
1249
|
+
}
|
|
1250
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: NativeChart, decorators: [{
|
|
1251
|
+
type: Component,
|
|
1252
|
+
args: [{ selector: 'neu-c-scene, nc-native-chart', host: { '[style.backgroundColor]': "dark() ? '#101C2C' : '#FFFFFF'" }, imports: [LabelHalo, WordCloudLayer, View, Text, Pressable, ScrollView, NativeGesture, NgIcon, NativeTooltip, NativeLegend, NativeTilemapColorAxis, NativeRadialLayer, AnimatedStyle, WorkletStyle, NgTemplateOutlet], template: `
|
|
1253
|
+
@if(renderActive()){
|
|
1254
|
+
@if(scene().title){<text class="chart-title" testID="native-chart-title" [style.color]="titleAppearance().color" [style.textAlign]="titleAppearance().textAlign" [style.fontSize]="titleAppearance().fontSize" [style.fontWeight]="titleAppearance().fontWeight" [style.lineHeight.px]="titleAppearance().lineHeight" accessibilityRole="header">{{ scene().title }}</text>}
|
|
1255
|
+
@if(scene().description){<text class="description" testID="native-chart-subtitle" [style.color]="subtitleAppearance().color" [style.textAlign]="subtitleAppearance().textAlign" [style.fontSize]="subtitleAppearance().fontSize" [style.fontWeight]="subtitleAppearance().fontWeight" [style.lineHeight.px]="subtitleAppearance().lineHeight">{{ scene().description }}</text>}
|
|
1256
|
+
@if(missingSourceCount()){<text class="description" testID="chart-missing-source" [style.color]="muted()">{{missingSourceLabel()}}</text>}
|
|
1257
|
+
@if(scene().variwideLayout?.status==='no-positive-width'){<text class="description" testID="chart-empty-proportional" [style.color]="muted()">{{locale()==='en'?'No positive source widths: proportional areas cannot be drawn. Original values remain available.':'No hay anchos originales positivos: no se pueden dibujar áreas proporcionales. Se conservan los valores originales.'}}</text>}
|
|
1258
|
+
@if (showLegend() && scene().family!=='gauge' && effectiveLegendPosition() === 'top') {<nc-native-legend [items]="legendItems()" [interactive]="legendInteractive()&&!!ownedScene().legend" [locale]="locale()" [ink]="ink()" [muted]="muted()" (toggle)="toggleLegend($event)"/>}
|
|
1259
|
+
<view class="chart-body" testID="chart-layout-body" (layout)="measureBody($event)">
|
|
1260
|
+
@if(showLegend()&&scene().family!=='gauge'&&effectiveLegendPosition()==='left'){<nc-native-legend class="side-legend" testID="chart-side-legend" [items]="legendItems()" [vertical]="true" [maximumHeight]="boundedHeight()+40" [interactive]="legendInteractive()&&!!ownedScene().legend" [locale]="locale()" [ink]="ink()" [muted]="muted()" (toggle)="toggleLegend($event)"/>}
|
|
1261
|
+
<view class="chart-body-main">
|
|
1262
|
+
@if(hasAxes()&&showYAxis()&&yAxisTitle()||secondaryAxisVisible()&&secondaryYAxisTitle()){<view class="axis-titles">@if (hasAxes() && showYAxis() && yAxisTitle()) {<text class="axis-title" [style.flex]="1" testID="chart-y-axis-title" [style.color]="yTitleAppearance().color" [style.textAlign]="yTitleAppearance().textAlign" [style.fontSize]="yTitleAppearance().fontSize" [style.fontWeight]="yTitleAppearance().fontWeight" [style.lineHeight.px]="yTitleAppearance().lineHeight">{{ yAxisTitle() }}</text>}@if(secondaryAxisVisible()&&secondaryYAxisTitle()){<text class="axis-title" testID="chart-secondary-y-axis-title" [style.flex]="1" [style.color]="secondaryTitleAppearance().color" [style.textAlign]="secondaryTitleAppearance().textAlign" [style.fontSize]="secondaryTitleAppearance().fontSize" [style.fontWeight]="secondaryTitleAppearance().fontWeight" [style.lineHeight.px]="secondaryTitleAppearance().lineHeight">{{secondaryYAxisTitle()}}</text>}</view>}
|
|
1263
|
+
<view class="chart-frame" [style.height]="boundedHeight()+(cartesian()&&showXAxis()?40:0)">
|
|
1264
|
+
@if (cartesian() && displayedYAxis()) {
|
|
1265
|
+
<view class="y-axis" testID="chart-y-axis" [style.width]="primaryAxisWidth()" [class.bar-y-axis]="horizontalBars()||scene().family==='heatmap'" [class.temporal-y-axis]="temporalYAxis()" [accessible]="false">
|
|
1266
|
+
@if (categoryYAxis()) {
|
|
1267
|
+
@for (point of displayedCategoryLabels(); track point.id) {
|
|
1268
|
+
<view class="category-tick" [style.height]="categoryLabelHeight()" [style.width]="axisLabelLayout()==='all'?primaryAxisWidth()-18:undefined" [style.top]="mapY(point.y)-categoryLabelHeight()/2"><text class="category-label" [numberOfLines]="axisLabelLayout()==='truncate'||accessibility.fontScale()>1.5?1:2" [accessibilityLabel]="point.label" [style.color]="muted()">{{ point.label }}</text></view>
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
@for (tick of primaryYTicks(); track tick.y) {
|
|
1272
|
+
@if(tick.label){<text class="y-tick" [numberOfLines]="axisLabelLayout()==='truncate'?1:undefined" [style.width]="axisLabelLayout()==='truncate'?primaryAxisWidth()-12:undefined" [style.textAlign]="axisLabelLayout()==='truncate'?'right':undefined" [style.color]="muted()" [style.top]="mapY(tick.y)">{{ tick.label }}</text>}
|
|
1273
|
+
}
|
|
1274
|
+
</view>
|
|
1275
|
+
}
|
|
1276
|
+
<scroll-view #plotScroller class="plot-scroll" testID="chart-scroll-viewport" [horizontal]="true" [gesture]="scrollGesture()" [scrollEnabled]="scrolling()&&!viewportInteracting()" [nestedScrollEnabled]="true" [showsHorizontalScrollIndicator]="false" [showsVerticalScrollIndicator]="false" [scrollEventThrottle]="16" [contentContainerStyle]="scrollContentStyle" (layout)="measureScroll($event)" (scroll)="scrollPlot($event)" [accessibilityLabel]="locale()==='en'?'Chart data':'Datos de la gráfica'">
|
|
1277
|
+
<view class="plot-content" [style.width]="contentWidth()||undefined" [style.minWidth]="boundedMinimumWidth()">
|
|
1278
|
+
<view #plot class="plot" [style.height]="boundedHeight()" testID="native-chart-plot" (layout)="measure($event)" [gesture]="gesture()"
|
|
1279
|
+
[accessible]="true" accessibilityRole="adjustable"
|
|
1280
|
+
[accessibilityLabel]="scene().title || (locale()==='en'?'Chart':'Gráfica')" [accessibilityValue]="accessibilityValue()"
|
|
1281
|
+
[accessibilityState]="{disabled:pinned()||ownedScene().observations.length===0}"
|
|
1282
|
+
[accessibilityHint]="accessibilityHint()"
|
|
1283
|
+
[accessibilityActions]="actions()" (accessibilityAction)="adjust($event)">
|
|
1284
|
+
@if(viewportDriver()?.styles?.native;as viewportStyles){<view class="motion-layer" [collapsable]="false" [workletStyle]="viewportStyles.base"><ng-container [ngTemplateOutlet]="chartVisuals"/></view>}
|
|
1285
|
+
@else if(viewportDriver()?.styles?.browser;as viewportStyles){<view class="motion-layer" [animatedStyle]="viewportStyles.base"><ng-container [ngTemplateOutlet]="chartVisuals"/></view>}
|
|
1286
|
+
@else{<ng-container [ngTemplateOutlet]="chartVisuals"/>}
|
|
1287
|
+
<ng-template #chartVisuals>
|
|
1288
|
+
<view class="motion-layer" testID="chart-decorative-geometry" [collapsable]="false" [accessible]="false" [accessibilityElementsHidden]="true" importantForAccessibility="no-hide-descendants" pointerEvents="none">
|
|
1289
|
+
<ng-icon class="geometry grid-geometry" [svg]="gridDrawing()" />
|
|
1290
|
+
@if(previousDrawing();as previous){
|
|
1291
|
+
@if(motionStyles().native?.previous;as style){<view class="motion-layer" testID="chart-previous-geometry" [collapsable]="false" [workletStyle]="style" pointerEvents="none"><ng-icon class="geometry" [svg]="previous"/></view>}
|
|
1292
|
+
@else if(motionStyles().browser?.previous;as style){<view class="motion-layer" testID="chart-previous-geometry" [animatedStyle]="style" pointerEvents="none"><ng-icon class="geometry" [svg]="previous"/></view>}
|
|
1293
|
+
}
|
|
1294
|
+
@if(motionStyles().native;as styles){
|
|
1295
|
+
<view class="motion-layer motion-clip" [collapsable]="false" [workletStyle]="styles.clip" pointerEvents="none"><view class="motion-layer" testID="chart-current-geometry" [collapsable]="false" [workletStyle]="styles.geometry" pointerEvents="none"><ng-icon class="geometry" [svg]="drawing()" />@if(scene().family==='wordcloud'){<nc-wordcloud-layer [scene]="paintScene()" [viewport]="viewport()" [surface]="dark()?'#101C2C':'#FFFFFF'"/>}</view></view>
|
|
1296
|
+
}@else if(motionStyles().browser;as styles){
|
|
1297
|
+
<view class="motion-layer motion-clip" [animatedStyle]="styles.clip" pointerEvents="none"><view class="motion-layer" testID="chart-current-geometry" [animatedStyle]="styles.geometry" pointerEvents="none"><ng-icon class="geometry" [svg]="drawing()" />@if(scene().family==='wordcloud'){<nc-wordcloud-layer [scene]="paintScene()" [viewport]="viewport()" [surface]="dark()?'#101C2C':'#FFFFFF'"/>}</view></view>
|
|
1298
|
+
}
|
|
1299
|
+
@if(radialLayout();as radial){
|
|
1300
|
+
@if(motionStyles().native?.entranceVisibility;as visibility){<view class="motion-layer" [collapsable]="false" [workletStyle]="visibility" pointerEvents="none"><nc-chart-radial-layer [layout]="radial" [drawing]="drawing()" [native]="motionStyles().native?.radial"/></view>}
|
|
1301
|
+
@else if(motionStyles().browser?.entranceVisibility;as visibility){<view class="motion-layer" [animatedStyle]="visibility" pointerEvents="none"><nc-chart-radial-layer [layout]="radial" [drawing]="drawing()" [browser]="motionStyles().browser?.radial"/></view>}
|
|
1302
|
+
}
|
|
1303
|
+
@if(bubbleLayout();as bubbles){
|
|
1304
|
+
@if(motionStyles().native?.entranceVisibility;as visibility){<view class="motion-layer" [collapsable]="false" [workletStyle]="visibility" pointerEvents="none">@for(bubble of bubbles;track bubble.id){<view class="bubble-entrance" [collapsable]="false" [style.left]="bubble.left" [style.top]="bubble.top" [style.width]="bubble.size" [style.height]="bubble.size" [workletStyle]="motionStyles().native!.bubble!" pointerEvents="none"><ng-icon class="geometry" [svg]="bubble.drawing"/></view>}</view>}
|
|
1305
|
+
@else if(motionStyles().browser?.entranceVisibility;as visibility){<view class="motion-layer" [animatedStyle]="visibility" pointerEvents="none">@for(bubble of bubbles;track bubble.id){<view class="bubble-entrance" [style.left]="bubble.left" [style.top]="bubble.top" [style.width]="bubble.size" [style.height]="bubble.size" [animatedStyle]="motionStyles().browser!.bubble!" pointerEvents="none"><ng-icon class="geometry" [svg]="bubble.drawing"/></view>}</view>}
|
|
1306
|
+
}
|
|
1307
|
+
@if(gaugeParts()){<ng-icon class="geometry grid-geometry" [svg]="gaugeOverlayDrawing()"/>}
|
|
1308
|
+
@if(scene().references?.length||scene().bulletTargets?.length){<ng-icon class="geometry grid-geometry" testID="chart-reference-lines" [svg]="referenceDrawing()"/>}
|
|
1309
|
+
</view>
|
|
1310
|
+
@for(label of referenceLabels();track label.id){<text class="reference-label" [style.left]="label.x" [style.top]="label.y" [style.width]="label.width" [style.height]="label.height" [style.color]="label.color" [style.backgroundColor]="label.backgroundColor??'transparent'" [style.paddingLeft]="label.backgroundColor?6:0" [style.paddingRight]="label.backgroundColor?6:0" [style.borderRadius]="label.backgroundColor?3:0" [numberOfLines]="1" pointerEvents="none">{{label.text}}</text>}
|
|
1311
|
+
@if(activeTile();as tile){<view class="active-tile" testID="chart-active-tile" [style.left]="mapX(tile.x)" [style.top]="mapY(tile.y)" [style.width]="tile.width*transform().sx" [style.height]="tile.height*transform().sy" [style.borderColor]="dark()?'#FFFFFF':'#172438'" pointerEvents="none"/>}
|
|
1312
|
+
@if (state().active; as point) {
|
|
1313
|
+
@if (showCrosshair() && cartesian()) {
|
|
1314
|
+
@if (horizontalBars()) {
|
|
1315
|
+
<view class="crosshair horizontal" [style.top]="mapY(state().shared?.coordinate??point.y)" pointerEvents="none" />
|
|
1316
|
+
} @else {
|
|
1317
|
+
<view class="crosshair vertical" [style.left]="mapX(state().shared?.coordinate??point.x)" pointerEvents="none" />
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
@if(activeVennDrawing();as outline){<ng-icon class="geometry" testID="chart-active-sets" [svg]="outline" pointerEvents="none"/>}
|
|
1321
|
+
@if(activePolygonDrawing();as outline){<ng-icon class="geometry" testID="chart-active-polygon" [svg]="outline" pointerEvents="none"/>}
|
|
1322
|
+
@if(activeTilemapCircle();as outline){<ng-icon class="geometry" testID="chart-active-tile" [svg]="outline" pointerEvents="none"/>}
|
|
1323
|
+
@if(activeSectorDrawing();as outline){<ng-icon class="geometry" testID="chart-active-sector" [svg]="outline" pointerEvents="none"/>}
|
|
1324
|
+
@if(activeItemDrawing();as outline){<ng-icon class="geometry" testID="chart-active-item" [svg]="outline" pointerEvents="none"/>}
|
|
1325
|
+
@if((cartesian()&&scene().family!=='pictorial'&&scene().family!=='heatmap')||scene().family==='dendrogram'||scene().family==='parallel'||scene().family==='radar'||scene().family==='polar'||point.relationship?.type==='link'){@for(active of activeMarkerPoints();track active.id.seriesId){<view class="active-marker" testID="chart-active-marker" [style.left]="mapX(active.x)" [style.backgroundColor]="(scene().family==='line'||scene().family==='area'||scene().family==='areaspline'||scene().family==='spline'||scene().family==='mixed')?'transparent':dark()?'#17263A':'#FFFFFF'"
|
|
1326
|
+
[style.top]="mapY(active.y)" [style.borderWidth]="(scene().family==='line'||scene().family==='area'||scene().family==='areaspline'||scene().family==='spline'||scene().family==='mixed')?0:3" [style.borderColor]="active.color" pointerEvents="none">@if((scene().family==='line'||scene().family==='area'||scene().family==='areaspline'||scene().family==='spline'||scene().family==='mixed')){<ng-icon class="geometry" [svg]="activeMarkerSymbols().get(active.id.seriesId)!"/>}</view>}}
|
|
1327
|
+
@if(tooltipMode()==='floating' && !dockTooltip() && !pinned()){
|
|
1328
|
+
<ng-template #floatingContent><nc-native-tooltip [family]="scene().family" [point]="point" [shared]="state().shared" [detailRows]="tooltipDetails()" [compactHeight]="tooltipHeight()" [unit]="scene().unit" [secondaryUnit]="scene().secondaryUnit??''" [xTitle]="xAxisTitle()" [locale]="locale()" [dark]="dark()" /></ng-template>
|
|
1329
|
+
@if(tooltipMotionStyles.native;as style){<view class="floating-tooltip" [style.left]="0" [style.top]="0" [style.width]="tooltipPosition().width" [collapsable]="false" [workletStyle]="style" pointerEvents="none"><ng-container [ngTemplateOutlet]="floatingContent"/></view>}
|
|
1330
|
+
@else if(tooltipMotionStyles.browser;as style){<view class="floating-tooltip" [style.left]="0" [style.top]="0" [style.width]="tooltipPosition().width" [animatedStyle]="style" pointerEvents="none"><ng-container [ngTemplateOutlet]="floatingContent"/></view>}
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
<ng-template #dataLabels>
|
|
1334
|
+
@if(emptyState();as empty){<view class="plot-empty" testID="chart-empty-state" pointerEvents="none"><text class="empty-title" [ncLabelHalo]="ink()" [style.color]="ink()">{{empty.title}}</text><text class="empty-description" [ncLabelHalo]="muted()" [style.color]="muted()">{{empty.description}}</text></view>}
|
|
1335
|
+
@for(label of valueLabels();track label.id){<text class="value-label" testID="chart-value-label" [style.left]="label.x" [style.top]="label.y" [style.width]="label.width" [style.height]="label.height" [style.color]="label.ink??ink()" [ncLabelHalo]="label.ink??ink()" [numberOfLines]="1" [accessible]="false" pointerEvents="none">{{label.text}}</text>}
|
|
1336
|
+
@for(label of tileLabels();track $index){<view class="tile-label-box" [style.left]="label.left" [style.top]="label.top" [style.width]="label.width" [style.height]="label.height" [accessible]="false" pointerEvents="none"><text class="tile-label" [ncLabelHalo]="label.color" [numberOfLines]="1" [style.color]="label.color" [accessible]="false">{{label.text}}</text></view>}
|
|
1337
|
+
@for(annotation of plainAnnotations();track $index){
|
|
1338
|
+
<text class="annotation" [class.annotation-value]="annotation.role==='value'" [style.color]="ink()"
|
|
1339
|
+
[style.left]="mapX(annotation.x)" [style.top]="mapY(annotation.y)" pointerEvents="none">{{annotation.text}}</text>
|
|
1340
|
+
}
|
|
1341
|
+
@for(label of dendrogramAxisLabels();track label.id){<text class="polar-axis-label" [style.height]="label.height" [style.fontSize]="10" [style.color]="muted()" [style.left]="label.left" [style.top]="label.top" [style.width]="label.width" [numberOfLines]="1" [accessible]="false" pointerEvents="none">{{label.text}}</text>}
|
|
1342
|
+
@for(label of parallelAxisLabels();track label.id){<text class="polar-axis-label" [style.height]="label.height" [style.fontSize]="label.type==='tick'?10:11" [style.color]="ink()" [style.left]="label.left" [style.top]="label.top" [style.width]="label.width" [style.fontWeight]="label.type==='name'?600:400" [numberOfLines]="1" [accessible]="false" pointerEvents="none">{{label.text}}</text>}
|
|
1343
|
+
@for(label of polarLabels();track label.id){<text class="polar-axis-label" [style.color]="ink()" [style.left]="label.left" [style.top]="label.top" [style.width]="label.width" [numberOfLines]="1" [accessible]="false" pointerEvents="none">{{label.text}}</text>}
|
|
1344
|
+
@for(label of radialLabels();track label.id){
|
|
1345
|
+
<text class="radial-label" [numberOfLines]="dataLabelLayout()==='auto'?undefined:1" [style.width]="label.width" [style.marginLeft]="label.width===undefined?undefined:-label.width/2" [ncLabelHalo]="label.ink" [style.color]="label.ink" [style.left]="mapX(label.x)" [style.top]="mapY(label.y)" [accessible]="false" pointerEvents="none">{{label.text}}</text>
|
|
1346
|
+
}
|
|
1347
|
+
</ng-template>
|
|
1348
|
+
@if(motionStyles().native;as styles){<view class="motion-layer" [collapsable]="false" [workletStyle]="styles.labels" pointerEvents="none"><ng-container [ngTemplateOutlet]="dataLabels"/></view>}
|
|
1349
|
+
@else if(motionStyles().browser;as styles){<view class="motion-layer" [animatedStyle]="styles.labels" pointerEvents="none"><ng-container [ngTemplateOutlet]="dataLabels"/></view>}
|
|
1350
|
+
</ng-template>
|
|
1351
|
+
@if(viewportSnapshot();as snapshot){
|
|
1352
|
+
@if(viewportDriver()?.styles?.native;as viewportStyles){<view class="motion-layer" testID="chart-viewport-preview" [collapsable]="false" [workletStyle]="viewportStyles.preview" pointerEvents="none"><ng-icon class="geometry grid-geometry" [svg]="snapshot.grid"/><ng-icon class="geometry grid-geometry" [svg]="snapshot.series"/><ng-icon class="geometry grid-geometry" [svg]="snapshot.references"/></view>}
|
|
1353
|
+
@else if(viewportDriver()?.styles?.browser;as viewportStyles){<view class="motion-layer" testID="chart-viewport-preview" [animatedStyle]="viewportStyles.preview" pointerEvents="none"><ng-icon class="geometry grid-geometry" [svg]="snapshot.grid"/><ng-icon class="geometry grid-geometry" [svg]="snapshot.series"/><ng-icon class="geometry grid-geometry" [svg]="snapshot.references"/></view>}
|
|
1354
|
+
}
|
|
1355
|
+
</view>
|
|
1356
|
+
@if (cartesian() && showXAxis()) {<view class="x-axis" testID="chart-x-axis" [accessible]="false">
|
|
1357
|
+
@if(scene().family==='variwide'){@for(tick of weightedLabels();track tick.id){<text class="x-tick" testID="chart-weighted-x-label" [accessibilityLabel]="tick.label" [numberOfLines]="1" [style.color]="muted()" [style.width]="tick.width" [style.left]="tick.left">{{tick.label}}</text>}}@else{
|
|
1358
|
+
@for (tick of displayedXLabels(); track tick.x) {
|
|
1359
|
+
<text class="x-tick" [numberOfLines]="1" [style.color]="muted()" [style.width]="xTickWidthFor(tick.label)" [style.left]="xTickLeft(tick.x,xTickWidthFor(tick.label))">{{ tick.label }}</text>
|
|
1360
|
+
}}
|
|
1361
|
+
</view>}
|
|
1362
|
+
</view>
|
|
1363
|
+
</scroll-view>
|
|
1364
|
+
@if(secondaryAxisVisible()&&secondaryYTicks();as ticks){<view class="secondary-y-axis" testID="chart-secondary-y-axis" [style.width]="valueAxisWidth()" [accessible]="false">@for(tick of ticks;track tick.y){<text class="secondary-y-tick" [numberOfLines]="axisLabelLayout()==='truncate'?1:undefined" [style.width]="axisLabelLayout()==='truncate'?valueAxisWidth()-12:undefined" [style.color]="muted()" [style.top]="mapY(tick.y)">{{tick.label}}</text>}</view>}
|
|
1365
|
+
@if(pinnedOverlay()){@if(state().active;as point){
|
|
1366
|
+
<view class="floating-tooltip" testID="chart-tooltip-details" [style.left]="(cartesian()&&showYAxis()?primaryAxisWidth():0)+8" [style.top]="8" [style.width]="pinnedWidth()">
|
|
1367
|
+
<nc-native-tooltip [family]="scene().family" [point]="point" [shared]="state().shared" [detailRows]="tooltipDetails()" [pinned]="true" [allowScroll]="true" [maximumHeight]="pinnedBodyHeight()" [unit]="scene().unit" [secondaryUnit]="scene().secondaryUnit??''" [xTitle]="xAxisTitle()" [locale]="locale()" [dark]="dark()" (dismiss)="clear()" />
|
|
1368
|
+
</view>
|
|
1369
|
+
}}
|
|
1370
|
+
</view>
|
|
1371
|
+
@if(scrolling()){<text class="touch-hint" [style.color]="muted()">{{locale()==='en'?'Swipe horizontally to see more data. Tap a point for its value.':'Desliza horizontalmente para ver más datos. Toca un punto para ver su valor.'}}</text>}
|
|
1372
|
+
@if(ownedScene().heatmap??ownedScene().tilemap;as tilemap){@if(showColorAxis()){<nc-tilemap-color-axis [axis]="tilemap.colorAxis" [locale]="locale()" [ink]="ink()" [unit]="scene().unit" [missingCount]="tilemap.layout.missingCount"/>}}
|
|
1373
|
+
@if (hasAxes() && showXAxis() && xAxisTitle()) {<text class="axis-title x-title" testID="chart-x-axis-title" [style.color]="xTitleAppearance().color" [style.textAlign]="xTitleAppearance().textAlign" [style.fontSize]="xTitleAppearance().fontSize" [style.fontWeight]="xTitleAppearance().fontWeight" [style.lineHeight.px]="xTitleAppearance().lineHeight">{{ xAxisTitle() }}</text>}
|
|
1374
|
+
</view>
|
|
1375
|
+
@if(showLegend()&&scene().family!=='gauge'&&effectiveLegendPosition()==='right'){<nc-native-legend class="side-legend" testID="chart-side-legend" [items]="legendItems()" [vertical]="true" [maximumHeight]="boundedHeight()+40" [interactive]="legendInteractive()&&!!ownedScene().legend" [locale]="locale()" [ink]="ink()" [muted]="muted()" (toggle)="toggleLegend($event)"/>}
|
|
1376
|
+
</view>
|
|
1377
|
+
@if (showLegend() && scene().family!=='gauge' && effectiveLegendPosition() === 'bottom') {<nc-native-legend [items]="legendItems()" [interactive]="legendInteractive()&&!!ownedScene().legend" [locale]="locale()" [ink]="ink()" [muted]="muted()" (toggle)="toggleLegend($event)"/>}
|
|
1378
|
+
@if(viewportContext();as context){@if(context.controls){<view class="viewport-controls" [accessibilityLabel]="locale()==='en'?'Chart zoom':'Zoom de la gráfica'">
|
|
1379
|
+
<pressable class="control" [disabled]="!zoomInAvailable()" [accessibilityState]="controlAccessibilityState(!zoomInAvailable())" [style.opacity]="zoomInAvailable()?1:.45" accessibilityRole="button" [accessibilityLabel]="locale()==='en'?'Zoom in':'Ampliar gráfica'" [style.backgroundColor]="dark()?'#202E42':'#EDF2F8'" (press)="requestView({type:'zoom',factor:2})"><text class="control-label" [style.color]="ink()">+</text></pressable>
|
|
1380
|
+
<pressable class="control" [disabled]="pinned()||!hasViewportWindow()" [accessibilityState]="controlAccessibilityState(pinned()||!hasViewportWindow())" accessibilityRole="button" [accessibilityLabel]="locale()==='en'?'Zoom out':'Reducir gráfica'" [style.backgroundColor]="dark()?'#202E42':'#EDF2F8'" (press)="requestView({type:'zoom',factor:.5})"><text class="control-label" [style.color]="ink()">−</text></pressable>
|
|
1381
|
+
<pressable class="control" [disabled]="pinned()||!hasViewportWindow()" [accessibilityState]="controlAccessibilityState(pinned()||!hasViewportWindow())" accessibilityRole="button" [accessibilityLabel]="locale()==='en'?'Reset zoom':'Restablecer zoom'" [style.backgroundColor]="dark()?'#202E42':'#EDF2F8'" (press)="requestView({type:'reset'})"><text class="control-label" [style.color]="ink()">{{locale()==='en'?'Reset':'Restablecer'}}</text></pressable>
|
|
1382
|
+
@if(context.pan&&hasViewportWindow()){
|
|
1383
|
+
@if(viewportAxes().horizontal){@for(direction of [-1,1];track direction){<pressable class="control" [disabled]="pinned()" [accessibilityState]="controlAccessibilityState(pinned())" accessibilityRole="button" [accessibilityLabel]="locale()==='en'?(direction===-1?'Pan left':'Pan right'):(direction===-1?'Desplazar a la izquierda':'Desplazar a la derecha')" [style.backgroundColor]="dark()?'#202E42':'#EDF2F8'" (press)="panView('x',direction)"><text class="control-label" [style.color]="ink()">{{direction===-1?'←':'→'}}</text></pressable>}}
|
|
1384
|
+
@if(viewportAxes().vertical){@for(direction of [-1,1];track direction){<pressable class="control" [disabled]="pinned()" [accessibilityState]="controlAccessibilityState(pinned())" accessibilityRole="button" [accessibilityLabel]="locale()==='en'?(direction===-1?'Pan up':'Pan down'):(direction===-1?'Desplazar hacia arriba':'Desplazar hacia abajo')" [style.backgroundColor]="dark()?'#202E42':'#EDF2F8'" (press)="panView('y',direction)"><text class="control-label" [style.color]="ink()">{{direction===-1?'↑':'↓'}}</text></pressable>}}
|
|
1385
|
+
}
|
|
1386
|
+
</view>}}
|
|
1387
|
+
@if(selectionControls() || (state().active && (tooltipMode()==='floating'||(tooltipPinnable()&&tooltipMode()!=='off')))){
|
|
1388
|
+
<view class="controls">
|
|
1389
|
+
@if(selectionControls()){
|
|
1390
|
+
<pressable class="control" [disabled]="pinned()||ownedScene().observations.length===0" [accessibilityState]="controlAccessibilityState(pinned()||ownedScene().observations.length===0)" [style.opacity]="pinned()||ownedScene().observations.length===0?0.45:1" [style.backgroundColor]="dark()?'#202E42':'#EDF2F8'" accessibilityRole="button" [accessibilityLabel]="locale()==='en'?'Previous observation':'Observación anterior'" (press)="step(-1)"><text class="control-label" [style.color]="ink()">{{locale()==='en'?'Previous':'Anterior'}}</text></pressable>
|
|
1391
|
+
<pressable class="control" [disabled]="pinned()||ownedScene().observations.length===0" [accessibilityState]="controlAccessibilityState(pinned()||ownedScene().observations.length===0)" [style.opacity]="pinned()||ownedScene().observations.length===0?0.45:1" [style.backgroundColor]="dark()?'#202E42':'#EDF2F8'" accessibilityRole="button" [accessibilityLabel]="locale()==='en'?'Next observation':'Observación siguiente'" (press)="step(1)"><text class="control-label" [style.color]="ink()">{{locale()==='en'?'Next':'Siguiente'}}</text></pressable>
|
|
1392
|
+
<pressable class="control" [disabled]="ownedScene().observations.length===0" [accessibilityState]="controlAccessibilityState(ownedScene().observations.length===0)" [style.backgroundColor]="dark()?'#202E42':'#EDF2F8'" accessibilityRole="button" [accessibilityLabel]="locale()==='en'?'Clear selection':'Limpiar selección'" (press)="clear()"><text class="control-label" [style.color]="ink()">{{locale()==='en'?'Clear':'Limpiar'}}</text></pressable>
|
|
1393
|
+
}
|
|
1394
|
+
@if(state().active && tooltipMode()==='floating'){
|
|
1395
|
+
<pressable class="control" [disabled]="pinned()" [style.opacity]="pinned()?0.45:1" accessibilityRole="button" [accessibilityState]="{expanded:expandedTooltip(),disabled:pinned()}" [accessibilityLabel]="locale()==='en'?(expandedTooltip()?'Collapse tooltip details':'Read full tooltip'):(expandedTooltip()?'Contraer detalles del tooltip':'Leer tooltip completo')" [style.backgroundColor]="dark()?'#202E42':'#EDF2F8'" (press)="toggleDetails()"><text class="control-label" [style.color]="ink()">{{locale()==='en'?(expandedTooltip()?'Collapse':'Details'):(expandedTooltip()?'Contraer':'Detalles')}}</text></pressable>
|
|
1396
|
+
}
|
|
1397
|
+
@if(state().active && tooltipPinnable() && tooltipMode()!=='off'){
|
|
1398
|
+
<pressable class="control" accessibilityRole="button" [accessibilityState]="{selected:pinned()}" [accessibilityLabel]="locale()==='en'?(pinned()?'Unpin tooltip':'Pin tooltip'):(pinned()?'Desfijar tooltip':'Fijar tooltip')" [style.backgroundColor]="dark()?'#202E42':'#EDF2F8'" (press)="togglePin()"><text class="control-label" [style.color]="ink()">{{locale()==='en'?(pinned()?'Unpin':'Pin'):(pinned()?'Desfijar':'Fijar')}}</text></pressable>
|
|
1399
|
+
}
|
|
1400
|
+
</view>}
|
|
1401
|
+
@if(dockTooltip()) {<view class="details" testID="chart-tooltip-details" [style.backgroundColor]="dark()?'#202E42':'#F1F5FA'">
|
|
1402
|
+
@if (state().active; as point) {
|
|
1403
|
+
@if(tooltipMode()==='docked' && tooltipTemplate();as template){
|
|
1404
|
+
<ng-container [ngTemplateOutlet]="template" [ngTemplateOutletContext]="dockedTooltipContext() ?? null"/>
|
|
1405
|
+
}@else{
|
|
1406
|
+
<nc-native-tooltip [family]="scene().family" [point]="point" [shared]="state().shared" [detailRows]="tooltipDetails()" [pinned]="pinned()" [allowScroll]="true" [unit]="scene().unit" [secondaryUnit]="scene().secondaryUnit??''" [xTitle]="xAxisTitle()" [locale]="locale()" [dark]="dark()" (dismiss)="clear()" />
|
|
1407
|
+
}
|
|
1408
|
+
<text class="detail-status" [style.color]="muted()">{{pinned()?(locale()==='en'?'Pinned · Unpin to explore':'Fijado · Desfija para explorar'):(locale()==='en'?(state().scrubbing?'Exploring':'Selected'):(state().scrubbing ? 'Explorando' : 'Seleccionado')) }}</text>
|
|
1409
|
+
} @else {
|
|
1410
|
+
<text class="detail-label" [style.color]="ink()">{{locale()==='en'?'Explore the data':'Explora los datos'}}</text>
|
|
1411
|
+
<text class="detail-value" [style.color]="ink()">{{locale()==='en'?'Touch a point':'Toca un punto'}}</text>
|
|
1412
|
+
<text class="detail-status" [style.color]="muted()">{{locale()==='en'?'Or use the accessible controls':'O utiliza los controles accesibles'}}</text>
|
|
1413
|
+
}
|
|
1414
|
+
</view>} @else {<text class="touch-hint" [style.color]="muted()">{{touchHint()}}</text>}}
|
|
1415
|
+
`, styles: ["\n :host { display: flex; flex-direction: column; min-width: 0; gap: 12px; padding: 18px; }\n text { color: #263449; font-size: 15px; }\n .chart-title { font-size: 23px; font-weight: 600; }\n .description { color: #536174; line-height: 22px; }\n .axis-titles {flex-direction:row;gap:12px;justify-content:space-between;}\n .axis-title {font-size:12px;color:#536174;}\n .x-title {text-align:center;}\n .chart-body {flex-direction:row;gap:16px;min-width:0;align-items:flex-start;}\n .chart-body-main {flex:1;min-width:0;gap:12px;}\n .side-legend {width:180px;flex-shrink:0;}\n .chart-frame { flex-direction: row; height: 232px; margin-top: 20px; }\n @media (orientation: landscape) and (max-height: 500px) {\n :host {padding:4px;gap:4px;}\n .chart-body-main {gap:4px;}\n .chart-frame {margin-top:0;}\n }\n .secondary-y-axis {width:38px;}\n .secondary-y-tick {position:absolute;font-size:11px;margin-top:-7px;left:4px;}\n .y-axis { width: 38px; }\n .bar-y-axis { width: 90px; }\n .temporal-y-axis {width:72px;}\n .y-tick { position: absolute; right: 9px; margin-top: -9px; font-size: 12px; color: #536174; }\n .category-tick {position:absolute;right:9px;width:72px;justify-content:center;}\n .category-label {font-size:12px;text-align:right;line-height:14px;}\n .plot-scroll {flex:1;min-width:0;}\n .plot-content {flex-grow:1;min-width:0;}\n .plot { flex-shrink:0; overflow: hidden; }\n .floating-tooltip{position:absolute;z-index:4;}\n .value-label{position:absolute;font-size:12px;line-height:18px;text-align:center;}\n .plot-empty{position:absolute;left:12px;right:12px;top:38%;padding:10px;align-items:center;gap:4px;}.empty-title{font-size:14px;font-weight:600;text-align:center;}.empty-description{font-size:12px;text-align:center;}\n .active-tile{position:absolute;border-width:2px;} .tile-label-box{position:absolute;overflow:hidden;justify-content:center;padding-left:4px;padding-right:4px;} .tile-label{font-size:12px;line-height:16px;text-align:center;}\n .annotation{position:absolute;width:160px;margin-left:-80px;text-align:center;font-size:13px;}\n .annotation-value{font-size:28px;font-weight:600;margin-top:-18px;}\n .touch-hint{font-size:12px;}\n .reference-label{position:absolute;font-size:12px;line-height:18px;}\n .radial-label{position:absolute;width:52px;margin-left:-26px;margin-top:-8px;text-align:center;font-size:13px;font-weight:600;}\n .geometry { width: 100%; height: 100%; }\n .grid-geometry,.motion-layer {position:absolute;left:0;top:0;width:100%;height:100%;}\n .motion-clip {overflow:hidden;}\n .bubble-entrance{position:absolute;}\n .crosshair { position: absolute; background-color: #8C99AC; }\n .vertical { width: 1px; top: 0; bottom: 0; }\n .horizontal { height: 1px; left: 0; right: 0; }\n .polar-axis-label {position:absolute;font-size:11px;line-height:16px;text-align:center;}\n .active-marker { position: absolute; width: 14px; height: 14px; border-radius: 7px; border-width: 3px; background-color: #FFFFFF; margin-left: -7px; margin-top: -7px; }\n .x-axis { height:28px;margin-top:12px;flex-shrink:0; }\n .x-tick { position:absolute;text-align:center;font-size:12px;color:#536174; }\n .details { background-color: #F1F5FA; border-radius: 12px; padding: 18px; gap: 5px; min-height: 115px; }\n .detail-label { font-weight: 600; }\n .detail-value { font-size: 23px; font-weight: 600; }\n .detail-status { color: #536174; font-size: 13px; }\n .controls { flex-direction: row; flex-wrap: wrap; gap: 8px; margin-top: 8px; }\n .viewport-controls {flex-direction:row;flex-wrap:wrap;gap:8px;}.viewport-controls .control{min-width:44px;}\n .control { min-width: 72px; min-height: 48px; padding: 8px 10px; align-items: center; justify-content: center; border-radius: 6px; background-color: #EDF2F8; }\n .control-label { font-size: 13px; font-weight: 500; }\n .control:active { background-color: #D8E3F2; }\n @media (min-width: 700px) { .chart-frame { height: 330px; } }\n @media (prefers-color-scheme: dark) {\n text { color: #EDF2FA; }\n .description, .detail-status, .x-tick, .y-tick, .axis-title { color: #AFBDD1; }\n .details, .control { background-color: #202E42; }\n .active-marker { background-color: #152033; }\n .control:active { background-color: #31435D; }\n }\n "] }]
|
|
1416
|
+
}], ctorParameters: () => [], propDecorators: { viewportChange: [{ type: i0.Output, args: ["viewportChange"] }], scene: [{ type: i0.Input, args: [{ isSignal: true, alias: "scene", required: true }] }], viewportContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewportContext", required: false }] }], viewportRequest: [{ type: i0.Output, args: ["viewportRequest"] }], hapticsEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "hapticsEnabled", required: false }] }], showColorAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "showColorAxis", required: false }] }], showLegend: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLegend", required: false }] }], legendPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendPosition", required: false }] }], legendInteractive: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendInteractive", required: false }] }], showDendrogramAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDendrogramAxis", required: false }] }], showParallelAxes: [{ type: i0.Input, args: [{ isSignal: true, alias: "showParallelAxes", required: false }] }], showParallelNames: [{ type: i0.Input, args: [{ isSignal: true, alias: "showParallelNames", required: false }] }], showParallelTicks: [{ type: i0.Input, args: [{ isSignal: true, alias: "showParallelTicks", required: false }] }], showGrid: [{ type: i0.Input, args: [{ isSignal: true, alias: "showGrid", required: false }] }], showXAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "showXAxis", required: false }] }], showYAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "showYAxis", required: false }] }], showSecondaryYAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSecondaryYAxis", required: false }] }], secondaryYAxisTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryYAxisTitle", required: false }] }], secondaryYAxisTitleStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryYAxisTitleStyle", required: false }] }], xAxisTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "xAxisTitle", required: false }] }], yAxisTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "yAxisTitle", required: false }] }], titleStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleStyle", required: false }] }], subtitleStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "subtitleStyle", required: false }] }], xAxisTitleStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "xAxisTitleStyle", required: false }] }], yAxisTitleStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "yAxisTitleStyle", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], theme: [{ type: i0.Input, args: [{ isSignal: true, alias: "theme", required: false }] }], tooltipMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipMode", required: false }] }], tooltipContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipContent", required: false }] }], tooltipPinnable: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipPinnable", required: false }] }], tooltipTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipTemplate", required: false }] }], labelFormatters: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelFormatters", required: false }] }], showCrosshair: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCrosshair", required: false }] }], showMarkers: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMarkers", required: false }] }], showDataLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDataLabels", required: false }] }], dataLabelLayout: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataLabelLayout", required: false }] }], axisLabelLayout: [{ type: i0.Input, args: [{ isSignal: true, alias: "axisLabelLayout", required: false }] }], showStackLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "showStackLabels", required: false }] }], strokeWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "strokeWidth", required: false }] }], markerSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "markerSize", required: false }] }], markerStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "markerStyle", required: false }] }], plotHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "plotHeight", required: false }] }], minPlotWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minPlotWidth", required: false }] }], interactionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactionMode", required: false }] }], selectionControls: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionControls", required: false }] }], animationEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "animationEnabled", required: false }] }], animationDuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "animationDuration", required: false }] }], animationKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "animationKey", required: false }] }], interactionChange: [{ type: i0.Output, args: ["interactionChange"] }], legendChange: [{ type: i0.Output, args: ["legendChange"] }], plotScroller: [{ type: i0.ViewChild, args: ['plotScroller', { isSignal: true }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], skipEntrance: [{ type: i0.Input, args: [{ isSignal: true, alias: "skipEntrance", required: false }] }], plot: [{ type: i0.ViewChild, args: ['plot', { ...{ read: ElementRef }, isSignal: true }] }] } });
|
|
1417
|
+
//# sourceMappingURL=chart.js.map
|