@aquera/nile-visualization 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/index.d.ts +57 -2
- package/dist/src/index.js +31 -0
- package/dist/src/internal/highcharts-provider.js +90 -0
- package/dist/src/internal/separated-chart-config.d.ts +5 -0
- package/dist/src/internal/separated-chart-config.js +16 -0
- package/dist/src/internal/types/ai-config.type.d.ts +9 -0
- package/dist/src/internal/types/ai-config.type.js +2 -0
- package/dist/src/internal/types/all-chart-config.type.d.ts +8 -0
- package/dist/src/internal/types/all-chart-config.type.js +2 -0
- package/dist/src/internal/types/aq-config.type.d.ts +13 -0
- package/dist/src/internal/types/aq-config.type.js +2 -0
- package/dist/src/internal/types/chart-anomaly-config.type.d.ts +13 -0
- package/dist/src/internal/types/chart-anomaly-config.type.js +2 -0
- package/dist/src/internal/types/chart-area-config.type.d.ts +17 -0
- package/dist/src/internal/types/chart-area-config.type.js +2 -0
- package/dist/src/internal/types/chart-area-negative-config.type.d.ts +13 -0
- package/dist/src/internal/types/chart-area-negative-config.type.js +2 -0
- package/dist/src/internal/types/chart-area-range-config.type.d.ts +12 -0
- package/dist/src/internal/types/chart-area-range-config.type.js +2 -0
- package/dist/src/internal/types/chart-area-spline-config.type.d.ts +13 -0
- package/dist/src/internal/types/chart-area-spline-config.type.js +2 -0
- package/dist/src/internal/types/chart-bar-config.type.d.ts +12 -0
- package/dist/src/internal/types/chart-bar-config.type.js +2 -0
- package/dist/src/internal/types/chart-bellcurve-config.type.d.ts +19 -0
- package/dist/src/internal/types/chart-bellcurve-config.type.js +2 -0
- package/dist/src/internal/types/chart-boxplot-config.type.d.ts +15 -0
- package/dist/src/internal/types/chart-boxplot-config.type.js +2 -0
- package/dist/src/internal/types/chart-bubble-config.type.d.ts +12 -0
- package/dist/src/internal/types/chart-bubble-config.type.js +2 -0
- package/dist/src/internal/types/chart-cluster-config.type.d.ts +15 -0
- package/dist/src/internal/types/chart-cluster-config.type.js +2 -0
- package/dist/src/internal/types/chart-column-config.type.d.ts +12 -0
- package/dist/src/internal/types/chart-column-config.type.js +2 -0
- package/dist/src/internal/types/chart-column-drilldown-config.type.d.ts +13 -0
- package/dist/src/internal/types/chart-column-drilldown-config.type.js +2 -0
- package/dist/src/internal/types/chart-column-pyramid-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-column-pyramid-config.type.js +2 -0
- package/dist/src/internal/types/chart-column-range-config.type.d.ts +12 -0
- package/dist/src/internal/types/chart-column-range-config.type.js +2 -0
- package/dist/src/internal/types/chart-config.type.d.ts +16 -0
- package/dist/src/internal/types/chart-config.type.js +2 -0
- package/dist/src/internal/types/chart-donut-config.type.d.ts +14 -0
- package/dist/src/internal/types/chart-donut-config.type.js +2 -0
- package/dist/src/internal/types/chart-dumbbell-config.type.d.ts +16 -0
- package/dist/src/internal/types/chart-dumbbell-config.type.js +2 -0
- package/dist/src/internal/types/chart-dumbbell-lower-config.type.d.ts +5 -0
- package/dist/src/internal/types/chart-dumbbell-lower-config.type.js +2 -0
- package/dist/src/internal/types/chart-dumbbell-upper-config.type.d.ts +5 -0
- package/dist/src/internal/types/chart-dumbbell-upper-config.type.js +2 -0
- package/dist/src/internal/types/chart-euler-config.type.d.ts +10 -0
- package/dist/src/internal/types/chart-euler-config.type.js +2 -0
- package/dist/src/internal/types/chart-fan-config.type.d.ts +17 -0
- package/dist/src/internal/types/chart-fan-config.type.js +2 -0
- package/dist/src/internal/types/chart-flame-config.type.d.ts +14 -0
- package/dist/src/internal/types/chart-flame-config.type.js +2 -0
- package/dist/src/internal/types/chart-funnel-config.type.d.ts +12 -0
- package/dist/src/internal/types/chart-funnel-config.type.js +2 -0
- package/dist/src/internal/types/chart-gauge-config.type.d.ts +14 -0
- package/dist/src/internal/types/chart-gauge-config.type.js +2 -0
- package/dist/src/internal/types/chart-histogram-config.type.d.ts +19 -0
- package/dist/src/internal/types/chart-histogram-config.type.js +2 -0
- package/dist/src/internal/types/chart-kpi-config.type.d.ts +21 -0
- package/dist/src/internal/types/chart-kpi-config.type.js +2 -0
- package/dist/src/internal/types/chart-line-config.type.d.ts +12 -0
- package/dist/src/internal/types/chart-line-config.type.js +2 -0
- package/dist/src/internal/types/chart-lollipop-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-lollipop-config.type.js +2 -0
- package/dist/src/internal/types/chart-pie-config.type.d.ts +13 -0
- package/dist/src/internal/types/chart-pie-config.type.js +2 -0
- package/dist/src/internal/types/chart-polygon-config.type.d.ts +12 -0
- package/dist/src/internal/types/chart-polygon-config.type.js +2 -0
- package/dist/src/internal/types/chart-radar-config.type.d.ts +12 -0
- package/dist/src/internal/types/chart-radar-config.type.js +2 -0
- package/dist/src/internal/types/chart-radial-bar-config.type.d.ts +16 -0
- package/dist/src/internal/types/chart-radial-bar-config.type.js +2 -0
- package/dist/src/internal/types/chart-scatter-config.type.d.ts +12 -0
- package/dist/src/internal/types/chart-scatter-config.type.js +2 -0
- package/dist/src/internal/types/chart-spiderweb-config.type.d.ts +12 -0
- package/dist/src/internal/types/chart-spiderweb-config.type.js +2 -0
- package/dist/src/internal/types/chart-spline-config.type.d.ts +12 -0
- package/dist/src/internal/types/chart-spline-config.type.js +2 -0
- package/dist/src/internal/types/chart-stacked-config.type.d.ts +15 -0
- package/dist/src/internal/types/chart-stacked-config.type.js +2 -0
- package/dist/src/internal/types/chart-timeline-config.type.d.ts +15 -0
- package/dist/src/internal/types/chart-timeline-config.type.js +2 -0
- package/dist/src/internal/types/chart-trendline-config.type.d.ts +13 -0
- package/dist/src/internal/types/chart-trendline-config.type.js +2 -0
- package/dist/src/internal/types/chart-variable-pie-config.type.d.ts +13 -0
- package/dist/src/internal/types/chart-variable-pie-config.type.js +2 -0
- package/dist/src/internal/types/chart-vector-config.type.d.ts +13 -0
- package/dist/src/internal/types/chart-vector-config.type.js +2 -0
- package/dist/src/internal/types/chart-waterfall-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-waterfall-config.type.js +2 -0
- package/dist/src/internal/types/chart-xrange-config.type.d.ts +13 -0
- package/dist/src/internal/types/chart-xrange-config.type.js +2 -0
- package/dist/src/internal/types/index.d.ts +50 -0
- package/dist/src/internal/types/index.js +2 -0
- package/dist/src/internal/types/nile-ai-widgets-config-input.type.d.ts +23 -0
- package/dist/src/internal/types/nile-ai-widgets-config-input.type.js +2 -0
- package/dist/src/internal/types/nile-chart-config-input.type.d.ts +7 -0
- package/dist/src/internal/types/nile-chart-config-input.type.js +2 -0
- package/dist/src/internal/types/primitive-chart-config.type.d.ts +32 -0
- package/dist/src/internal/types/primitive-chart-config.type.js +2 -0
- package/dist/src/internal/types/separated-chart-config-input.type.d.ts +7 -0
- package/dist/src/internal/types/separated-chart-config-input.type.js +2 -0
- package/dist/src/internal/types/switchable-config.type.d.ts +8 -0
- package/dist/src/internal/types/switchable-config.type.js +2 -0
- package/dist/src/nile-ai-panel/index.d.ts +1 -0
- package/dist/src/nile-ai-panel/nile-ai-panel.d.ts +8 -1
- package/dist/src/nile-ai-panel/nile-ai-panel.js +34 -0
- package/dist/src/nile-ai-sender/index.d.ts +1 -0
- package/dist/src/nile-ai-sender/nile-ai-sender.d.ts +8 -1
- package/dist/src/nile-ai-sender/nile-ai-sender.js +30 -0
- package/dist/src/nile-anomaly-chart/nile-anomaly-chart.d.ts +6 -0
- package/dist/src/nile-anomaly-chart/nile-anomaly-chart.js +41 -0
- package/dist/src/nile-area-chart/nile-area-chart.d.ts +6 -0
- package/dist/src/nile-area-chart/nile-area-chart.js +41 -0
- package/dist/src/nile-area-negative-chart/index.d.ts +2 -0
- package/dist/src/nile-area-negative-chart/index.js +2 -0
- package/dist/src/nile-area-negative-chart/nile-area-negative-chart.css.d.ts +1 -0
- package/dist/src/nile-area-negative-chart/nile-area-negative-chart.css.js +28 -0
- package/dist/src/nile-area-negative-chart/nile-area-negative-chart.d.ts +42 -0
- package/dist/src/nile-area-negative-chart/nile-area-negative-chart.js +178 -0
- package/dist/src/nile-area-range-chart/index.d.ts +2 -0
- package/dist/src/nile-area-range-chart/index.js +2 -0
- package/dist/src/nile-area-range-chart/nile-area-range-chart.css.d.ts +1 -0
- package/dist/src/nile-area-range-chart/nile-area-range-chart.css.js +28 -0
- package/dist/src/nile-area-range-chart/nile-area-range-chart.d.ts +41 -0
- package/dist/src/nile-area-range-chart/nile-area-range-chart.js +173 -0
- package/dist/src/nile-area-spline-chart/index.d.ts +2 -0
- package/dist/src/nile-area-spline-chart/index.js +2 -0
- package/dist/src/nile-area-spline-chart/nile-area-spline-chart.css.d.ts +1 -0
- package/dist/src/nile-area-spline-chart/nile-area-spline-chart.css.js +28 -0
- package/dist/src/nile-area-spline-chart/nile-area-spline-chart.d.ts +41 -0
- package/dist/src/nile-area-spline-chart/nile-area-spline-chart.js +174 -0
- package/dist/src/nile-bar-chart/nile-bar-chart.d.ts +6 -0
- package/dist/src/nile-bar-chart/nile-bar-chart.js +40 -1
- package/dist/src/nile-bellcurve-chart/index.d.ts +2 -0
- package/dist/src/nile-bellcurve-chart/index.js +2 -0
- package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.css.d.ts +1 -0
- package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.css.js +28 -0
- package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.d.ts +49 -0
- package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.js +258 -0
- package/dist/src/nile-boxplot-chart/index.d.ts +2 -0
- package/dist/src/nile-boxplot-chart/index.js +2 -0
- package/dist/src/nile-boxplot-chart/nile-boxplot-chart.css.d.ts +1 -0
- package/dist/src/nile-boxplot-chart/nile-boxplot-chart.css.js +28 -0
- package/dist/src/nile-boxplot-chart/nile-boxplot-chart.d.ts +58 -0
- package/dist/src/nile-boxplot-chart/nile-boxplot-chart.js +235 -0
- package/dist/src/nile-bubble-chart/nile-bubble-chart.d.ts +6 -0
- package/dist/src/nile-bubble-chart/nile-bubble-chart.js +39 -0
- package/dist/src/nile-chart/index.d.ts +3 -1
- package/dist/src/nile-chart/index.js +1 -0
- package/dist/src/nile-chart/nile-chart-config-builder.d.ts +4 -0
- package/dist/src/nile-chart/nile-chart-config-builder.js +13 -0
- package/dist/src/nile-chart/nile-chart-config.d.ts +76 -2
- package/dist/src/nile-chart/nile-chart.d.ts +16 -2
- package/dist/src/nile-chart/nile-chart.js +144 -14
- package/dist/src/nile-cluster-chart/index.d.ts +2 -0
- package/dist/src/nile-cluster-chart/index.js +2 -0
- package/dist/src/nile-cluster-chart/nile-cluster-chart.css.d.ts +1 -0
- package/dist/src/nile-cluster-chart/nile-cluster-chart.css.js +28 -0
- package/dist/src/nile-cluster-chart/nile-cluster-chart.d.ts +46 -0
- package/dist/src/nile-cluster-chart/nile-cluster-chart.js +196 -0
- package/dist/src/nile-column-chart/nile-column-chart.d.ts +6 -0
- package/dist/src/nile-column-chart/nile-column-chart.js +39 -0
- package/dist/src/nile-column-drilldown-chart/index.d.ts +2 -0
- package/dist/src/nile-column-drilldown-chart/index.js +2 -0
- package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.css.d.ts +1 -0
- package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.css.js +28 -0
- package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.d.ts +49 -0
- package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.js +186 -0
- package/dist/src/nile-column-pyramid-chart/index.d.ts +2 -0
- package/dist/src/nile-column-pyramid-chart/index.js +2 -0
- package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.css.d.ts +1 -0
- package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.css.js +28 -0
- package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.d.ts +39 -0
- package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.js +155 -0
- package/dist/src/nile-column-range-chart/index.d.ts +2 -0
- package/dist/src/nile-column-range-chart/index.js +2 -0
- package/dist/src/nile-column-range-chart/nile-column-range-chart.css.d.ts +1 -0
- package/dist/src/nile-column-range-chart/nile-column-range-chart.css.js +28 -0
- package/dist/src/nile-column-range-chart/nile-column-range-chart.d.ts +40 -0
- package/dist/src/nile-column-range-chart/nile-column-range-chart.js +169 -0
- package/dist/src/nile-donut-chart/nile-donut-chart.d.ts +6 -0
- package/dist/src/nile-donut-chart/nile-donut-chart.js +43 -0
- package/dist/src/nile-dumbbell-chart/index.d.ts +2 -0
- package/dist/src/nile-dumbbell-chart/index.js +2 -0
- package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.css.d.ts +1 -0
- package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.css.js +28 -0
- package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.d.ts +50 -0
- package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.js +217 -0
- package/dist/src/nile-dumbbell-lower-chart/index.d.ts +1 -0
- package/dist/src/nile-dumbbell-lower-chart/index.js +2 -0
- package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.css.d.ts +1 -0
- package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.css.js +28 -0
- package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.d.ts +40 -0
- package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.js +214 -0
- package/dist/src/nile-dumbbell-upper-chart/index.d.ts +1 -0
- package/dist/src/nile-dumbbell-upper-chart/index.js +2 -0
- package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.css.d.ts +1 -0
- package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.css.js +28 -0
- package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.d.ts +40 -0
- package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.js +214 -0
- package/dist/src/nile-euler-chart/index.d.ts +2 -0
- package/dist/src/nile-euler-chart/index.js +2 -0
- package/dist/src/nile-euler-chart/nile-euler-chart.css.d.ts +1 -0
- package/dist/src/nile-euler-chart/nile-euler-chart.css.js +28 -0
- package/dist/src/nile-euler-chart/nile-euler-chart.d.ts +38 -0
- package/dist/src/nile-euler-chart/nile-euler-chart.js +149 -0
- package/dist/src/nile-fan-chart/index.d.ts +2 -0
- package/dist/src/nile-fan-chart/index.js +2 -0
- package/dist/src/nile-fan-chart/nile-fan-chart.css.d.ts +1 -0
- package/dist/src/nile-fan-chart/nile-fan-chart.css.js +28 -0
- package/dist/src/nile-fan-chart/nile-fan-chart.d.ts +65 -0
- package/dist/src/nile-fan-chart/nile-fan-chart.js +257 -0
- package/dist/src/nile-flame-chart/index.d.ts +2 -0
- package/dist/src/nile-flame-chart/index.js +2 -0
- package/dist/src/nile-flame-chart/nile-flame-chart.css.d.ts +1 -0
- package/dist/src/nile-flame-chart/nile-flame-chart.css.js +28 -0
- package/dist/src/nile-flame-chart/nile-flame-chart.d.ts +60 -0
- package/dist/src/nile-flame-chart/nile-flame-chart.js +311 -0
- package/dist/src/nile-funnel-chart/index.d.ts +2 -0
- package/dist/src/nile-funnel-chart/index.js +2 -0
- package/dist/src/nile-funnel-chart/nile-funnel-chart.css.d.ts +1 -0
- package/dist/src/nile-funnel-chart/nile-funnel-chart.css.js +28 -0
- package/dist/src/nile-funnel-chart/nile-funnel-chart.d.ts +42 -0
- package/dist/src/nile-funnel-chart/nile-funnel-chart.js +189 -0
- package/dist/src/nile-gauge-chart/nile-gauge-chart.d.ts +6 -0
- package/dist/src/nile-gauge-chart/nile-gauge-chart.js +43 -0
- package/dist/src/nile-histogram-chart/index.d.ts +2 -0
- package/dist/src/nile-histogram-chart/index.js +2 -0
- package/dist/src/nile-histogram-chart/nile-histogram-chart.css.d.ts +1 -0
- package/dist/src/nile-histogram-chart/nile-histogram-chart.css.js +28 -0
- package/dist/src/nile-histogram-chart/nile-histogram-chart.d.ts +53 -0
- package/dist/src/nile-histogram-chart/nile-histogram-chart.js +263 -0
- package/dist/src/nile-inverted-area-chart/index.d.ts +2 -0
- package/dist/src/nile-inverted-area-chart/index.js +2 -0
- package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.css.d.ts +1 -0
- package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.css.js +28 -0
- package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.d.ts +40 -0
- package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.js +173 -0
- package/dist/src/nile-kpi-chart/index.d.ts +1 -1
- package/dist/src/nile-kpi-chart/nile-kpi-chart.d.ts +32 -0
- package/dist/src/nile-kpi-chart/nile-kpi-chart.js +60 -0
- package/dist/src/nile-line-chart/nile-line-chart.d.ts +6 -0
- package/dist/src/nile-line-chart/nile-line-chart.js +39 -0
- package/dist/src/nile-lollipop-chart/index.d.ts +2 -0
- package/dist/src/nile-lollipop-chart/index.js +2 -0
- package/dist/src/nile-lollipop-chart/nile-lollipop-chart.css.d.ts +1 -0
- package/dist/src/nile-lollipop-chart/nile-lollipop-chart.css.js +28 -0
- package/dist/src/nile-lollipop-chart/nile-lollipop-chart.d.ts +39 -0
- package/dist/src/nile-lollipop-chart/nile-lollipop-chart.js +174 -0
- package/dist/src/nile-pie-chart/nile-pie-chart.d.ts +6 -0
- package/dist/src/nile-pie-chart/nile-pie-chart.js +41 -0
- package/dist/src/nile-polygon-chart/index.d.ts +2 -0
- package/dist/src/nile-polygon-chart/index.js +2 -0
- package/dist/src/nile-polygon-chart/nile-polygon-chart.css.d.ts +1 -0
- package/dist/src/nile-polygon-chart/nile-polygon-chart.css.js +28 -0
- package/dist/src/nile-polygon-chart/nile-polygon-chart.d.ts +41 -0
- package/dist/src/nile-polygon-chart/nile-polygon-chart.js +167 -0
- package/dist/src/nile-radar-chart/nile-radar-chart.d.ts +6 -0
- package/dist/src/nile-radar-chart/nile-radar-chart.js +39 -0
- package/dist/src/nile-radial-bar-chart/index.d.ts +2 -0
- package/dist/src/nile-radial-bar-chart/index.js +2 -0
- package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.css.d.ts +1 -0
- package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.css.js +28 -0
- package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.d.ts +42 -0
- package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.js +191 -0
- package/dist/src/nile-scatter-chart/nile-scatter-chart.d.ts +6 -0
- package/dist/src/nile-scatter-chart/nile-scatter-chart.js +39 -0
- package/dist/src/nile-spiderweb-chart/index.d.ts +2 -0
- package/dist/src/nile-spiderweb-chart/index.js +2 -0
- package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.css.d.ts +1 -0
- package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.css.js +28 -0
- package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.d.ts +46 -0
- package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.js +191 -0
- package/dist/src/nile-spline-chart/nile-spline-chart.d.ts +6 -0
- package/dist/src/nile-spline-chart/nile-spline-chart.js +39 -0
- package/dist/src/nile-stacked-chart/index.d.ts +2 -0
- package/dist/src/nile-stacked-chart/index.js +2 -0
- package/dist/src/nile-stacked-chart/nile-stacked-chart.css.d.ts +1 -0
- package/dist/src/nile-stacked-chart/nile-stacked-chart.css.js +28 -0
- package/dist/src/nile-stacked-chart/nile-stacked-chart.d.ts +47 -0
- package/dist/src/nile-stacked-chart/nile-stacked-chart.js +216 -0
- package/dist/src/nile-timeline-chart/index.d.ts +2 -0
- package/dist/src/nile-timeline-chart/index.js +2 -0
- package/dist/src/nile-timeline-chart/nile-timeline-chart.css.d.ts +1 -0
- package/dist/src/nile-timeline-chart/nile-timeline-chart.css.js +28 -0
- package/dist/src/nile-timeline-chart/nile-timeline-chart.d.ts +58 -0
- package/dist/src/nile-timeline-chart/nile-timeline-chart.js +239 -0
- package/dist/src/nile-trendline-chart/nile-trendline-chart.d.ts +6 -0
- package/dist/src/nile-trendline-chart/nile-trendline-chart.js +41 -0
- package/dist/src/nile-variable-pie-chart/index.d.ts +2 -0
- package/dist/src/nile-variable-pie-chart/index.js +2 -0
- package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.css.d.ts +1 -0
- package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.css.js +28 -0
- package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.d.ts +42 -0
- package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.js +180 -0
- package/dist/src/nile-vector-chart/index.d.ts +2 -0
- package/dist/src/nile-vector-chart/index.js +2 -0
- package/dist/src/nile-vector-chart/nile-vector-chart.css.d.ts +1 -0
- package/dist/src/nile-vector-chart/nile-vector-chart.css.js +28 -0
- package/dist/src/nile-vector-chart/nile-vector-chart.d.ts +44 -0
- package/dist/src/nile-vector-chart/nile-vector-chart.js +181 -0
- package/dist/src/nile-waterfall-chart/nile-waterfall-chart.d.ts +6 -0
- package/dist/src/nile-waterfall-chart/nile-waterfall-chart.js +37 -0
- package/dist/src/nile-xrange-chart/index.d.ts +2 -0
- package/dist/src/nile-xrange-chart/index.js +2 -0
- package/dist/src/nile-xrange-chart/nile-xrange-chart.css.d.ts +1 -0
- package/dist/src/nile-xrange-chart/nile-xrange-chart.css.js +28 -0
- package/dist/src/nile-xrange-chart/nile-xrange-chart.d.ts +44 -0
- package/dist/src/nile-xrange-chart/nile-xrange-chart.js +193 -0
- package/package.json +12 -1
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { customElement, property, query } from 'lit/decorators.js';
|
|
3
|
+
import { html } from 'lit';
|
|
4
|
+
import { getHighcharts } from '../internal/highcharts-provider.js';
|
|
5
|
+
import NileElement from '../internal/nile-element.js';
|
|
6
|
+
import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
|
|
7
|
+
import { deepMerge } from '../internal/utils.js';
|
|
8
|
+
import { styles } from './nile-histogram-chart.css.js';
|
|
9
|
+
/** Stable id linking the hidden source series to the histogram series. */
|
|
10
|
+
const HISTOGRAM_BASE_ID = 'nile-histogram-base';
|
|
11
|
+
let NileHistogramChart = class NileHistogramChart extends NileElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this._hc = null;
|
|
15
|
+
this.chart = null;
|
|
16
|
+
this.resizeObserver = null;
|
|
17
|
+
/** Full chart configuration. Accepts separated `{ chart, aq }` input. */
|
|
18
|
+
this.config = null;
|
|
19
|
+
this.chartTitle = '';
|
|
20
|
+
this.chartSubtitle = '';
|
|
21
|
+
/** Raw numeric observations; each value is binned into the histogram. */
|
|
22
|
+
this.data = [];
|
|
23
|
+
this.options = {};
|
|
24
|
+
this.loading = false;
|
|
25
|
+
this.height = '400px';
|
|
26
|
+
this.xAxisTitle = '';
|
|
27
|
+
this.yAxisTitle = '';
|
|
28
|
+
this.histogramSeriesName = '';
|
|
29
|
+
this.sourceSeriesName = '';
|
|
30
|
+
/** Bar fill color for the histogram series. */
|
|
31
|
+
this.histogramColor = '#3b82f6';
|
|
32
|
+
/**
|
|
33
|
+
* Bin rule: a positive integer, or `square-root` (default), `sturges`, or `rice`.
|
|
34
|
+
* Ignored when `binWidth` is set.
|
|
35
|
+
*/
|
|
36
|
+
this.binsNumber = 'square-root';
|
|
37
|
+
/** Fixed bin width; when > 0, overrides `binsNumber`. */
|
|
38
|
+
this.binWidth = 0;
|
|
39
|
+
this.showLegend = true;
|
|
40
|
+
}
|
|
41
|
+
/** Apply `{ chart, aq }` config to individual properties. */
|
|
42
|
+
applyConfig(cfg) {
|
|
43
|
+
applySeparatedChartConfig(this, cfg);
|
|
44
|
+
}
|
|
45
|
+
connectedCallback() {
|
|
46
|
+
super.connectedCallback();
|
|
47
|
+
if (this.config)
|
|
48
|
+
this.applyConfig(this.config);
|
|
49
|
+
}
|
|
50
|
+
disconnectedCallback() {
|
|
51
|
+
super.disconnectedCallback();
|
|
52
|
+
this.destroyChart();
|
|
53
|
+
this.resizeObserver?.disconnect();
|
|
54
|
+
this.resizeObserver = null;
|
|
55
|
+
}
|
|
56
|
+
firstUpdated() {
|
|
57
|
+
this.initChart();
|
|
58
|
+
this.setupResizeObserver();
|
|
59
|
+
}
|
|
60
|
+
updated(changedProperties) {
|
|
61
|
+
if (changedProperties.has('config') && this.config) {
|
|
62
|
+
this.applyConfig(this.config);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const props = [
|
|
66
|
+
'data',
|
|
67
|
+
'chartTitle',
|
|
68
|
+
'chartSubtitle',
|
|
69
|
+
'options',
|
|
70
|
+
'height',
|
|
71
|
+
'xAxisTitle',
|
|
72
|
+
'yAxisTitle',
|
|
73
|
+
'histogramSeriesName',
|
|
74
|
+
'sourceSeriesName',
|
|
75
|
+
'histogramColor',
|
|
76
|
+
'binsNumber',
|
|
77
|
+
'binWidth',
|
|
78
|
+
'showLegend',
|
|
79
|
+
'loading',
|
|
80
|
+
];
|
|
81
|
+
if (!props.some(p => changedProperties.has(p)))
|
|
82
|
+
return;
|
|
83
|
+
if (this.loading) {
|
|
84
|
+
this.destroyChart();
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
if (this.chart) {
|
|
88
|
+
this.chart.update(this.buildOptions(), true, true);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
this.initChart();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
setupResizeObserver() {
|
|
95
|
+
if (!this.chartContainer)
|
|
96
|
+
return;
|
|
97
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
98
|
+
this.chart?.reflow();
|
|
99
|
+
});
|
|
100
|
+
this.resizeObserver.observe(this.chartContainer);
|
|
101
|
+
}
|
|
102
|
+
resolveBinsNumber() {
|
|
103
|
+
const raw = (this.binsNumber || 'square-root').trim().toLowerCase();
|
|
104
|
+
if (/^\d+$/.test(raw)) {
|
|
105
|
+
const n = parseInt(raw, 10);
|
|
106
|
+
return n > 0 ? n : 'square-root';
|
|
107
|
+
}
|
|
108
|
+
if (raw === 'sturges' || raw === 'rice' || raw === 'square-root')
|
|
109
|
+
return raw;
|
|
110
|
+
return 'square-root';
|
|
111
|
+
}
|
|
112
|
+
buildOptions() {
|
|
113
|
+
const self = this;
|
|
114
|
+
const bw = this.binWidth > 0 ? this.binWidth : undefined;
|
|
115
|
+
const scatterData = this.data.map(x => [x, 0]);
|
|
116
|
+
return deepMerge({
|
|
117
|
+
chart: { height: this.height },
|
|
118
|
+
title: { text: this.chartTitle || undefined },
|
|
119
|
+
subtitle: { text: this.chartSubtitle || undefined },
|
|
120
|
+
legend: { enabled: this.showLegend },
|
|
121
|
+
xAxis: [
|
|
122
|
+
{
|
|
123
|
+
title: { text: this.xAxisTitle || undefined },
|
|
124
|
+
gridLineWidth: 1,
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
yAxis: [
|
|
128
|
+
{
|
|
129
|
+
title: { text: this.yAxisTitle || 'Count' },
|
|
130
|
+
min: 0,
|
|
131
|
+
gridLineWidth: 1,
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
tooltip: {
|
|
135
|
+
headerFormat: '',
|
|
136
|
+
pointFormat: '<span style="color:{point.color}">●</span> <b>{point.x:.1f} – {point.x2:.1f}</b><br/>Count: <b>{point.y}</b>',
|
|
137
|
+
},
|
|
138
|
+
plotOptions: {
|
|
139
|
+
histogram: {
|
|
140
|
+
borderWidth: 0,
|
|
141
|
+
borderRadius: 2,
|
|
142
|
+
color: this.histogramColor,
|
|
143
|
+
cursor: 'pointer',
|
|
144
|
+
point: {
|
|
145
|
+
events: {
|
|
146
|
+
click() {
|
|
147
|
+
self.emit('nile-chart-click', {
|
|
148
|
+
point: this,
|
|
149
|
+
x: this.x,
|
|
150
|
+
x2: this.x2,
|
|
151
|
+
value: this.y,
|
|
152
|
+
seriesName: this.series.name,
|
|
153
|
+
});
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
scatter: {
|
|
159
|
+
marker: { enabled: false, radius: 0 },
|
|
160
|
+
enableMouseTracking: false,
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
series: [
|
|
164
|
+
{
|
|
165
|
+
type: 'scatter',
|
|
166
|
+
id: HISTOGRAM_BASE_ID,
|
|
167
|
+
name: this.sourceSeriesName || 'Observations',
|
|
168
|
+
data: scatterData,
|
|
169
|
+
xAxis: 0,
|
|
170
|
+
yAxis: 0,
|
|
171
|
+
visible: false,
|
|
172
|
+
showInLegend: false,
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
type: 'histogram',
|
|
176
|
+
name: this.histogramSeriesName || 'Distribution',
|
|
177
|
+
baseSeries: HISTOGRAM_BASE_ID,
|
|
178
|
+
xAxis: 0,
|
|
179
|
+
yAxis: 0,
|
|
180
|
+
binsNumber: bw ? undefined : this.resolveBinsNumber(),
|
|
181
|
+
binWidth: bw,
|
|
182
|
+
color: this.histogramColor,
|
|
183
|
+
zIndex: 1,
|
|
184
|
+
},
|
|
185
|
+
],
|
|
186
|
+
credits: { enabled: false },
|
|
187
|
+
}, this.options);
|
|
188
|
+
}
|
|
189
|
+
async initChart() {
|
|
190
|
+
if (this.loading || !this.chartContainer)
|
|
191
|
+
return;
|
|
192
|
+
if (!this._hc)
|
|
193
|
+
this._hc = await getHighcharts();
|
|
194
|
+
this.chart = this._hc.chart(this.chartContainer, this.buildOptions());
|
|
195
|
+
this.emit('nile-chart-ready', { chart: this.chart });
|
|
196
|
+
}
|
|
197
|
+
destroyChart() {
|
|
198
|
+
if (this.chart) {
|
|
199
|
+
this.chart.destroy();
|
|
200
|
+
this.chart = null;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
render() {
|
|
204
|
+
if (this.loading) {
|
|
205
|
+
return html `<div class="chart-loading" style="height:${this.height}">Loading...</div>`;
|
|
206
|
+
}
|
|
207
|
+
return html `<div class="chart-container"></div>`;
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
NileHistogramChart.styles = styles;
|
|
211
|
+
__decorate([
|
|
212
|
+
query('.chart-container')
|
|
213
|
+
], NileHistogramChart.prototype, "chartContainer", void 0);
|
|
214
|
+
__decorate([
|
|
215
|
+
property({ type: Object })
|
|
216
|
+
], NileHistogramChart.prototype, "config", void 0);
|
|
217
|
+
__decorate([
|
|
218
|
+
property({ type: String, attribute: 'chart-title' })
|
|
219
|
+
], NileHistogramChart.prototype, "chartTitle", void 0);
|
|
220
|
+
__decorate([
|
|
221
|
+
property({ type: String, attribute: 'chart-subtitle' })
|
|
222
|
+
], NileHistogramChart.prototype, "chartSubtitle", void 0);
|
|
223
|
+
__decorate([
|
|
224
|
+
property({ type: Array })
|
|
225
|
+
], NileHistogramChart.prototype, "data", void 0);
|
|
226
|
+
__decorate([
|
|
227
|
+
property({ type: Object })
|
|
228
|
+
], NileHistogramChart.prototype, "options", void 0);
|
|
229
|
+
__decorate([
|
|
230
|
+
property({ type: Boolean, reflect: true })
|
|
231
|
+
], NileHistogramChart.prototype, "loading", void 0);
|
|
232
|
+
__decorate([
|
|
233
|
+
property({ type: String })
|
|
234
|
+
], NileHistogramChart.prototype, "height", void 0);
|
|
235
|
+
__decorate([
|
|
236
|
+
property({ type: String, attribute: 'x-axis-title' })
|
|
237
|
+
], NileHistogramChart.prototype, "xAxisTitle", void 0);
|
|
238
|
+
__decorate([
|
|
239
|
+
property({ type: String, attribute: 'y-axis-title' })
|
|
240
|
+
], NileHistogramChart.prototype, "yAxisTitle", void 0);
|
|
241
|
+
__decorate([
|
|
242
|
+
property({ type: String, attribute: 'histogram-name' })
|
|
243
|
+
], NileHistogramChart.prototype, "histogramSeriesName", void 0);
|
|
244
|
+
__decorate([
|
|
245
|
+
property({ type: String, attribute: 'source-name' })
|
|
246
|
+
], NileHistogramChart.prototype, "sourceSeriesName", void 0);
|
|
247
|
+
__decorate([
|
|
248
|
+
property({ type: String, attribute: 'histogram-color' })
|
|
249
|
+
], NileHistogramChart.prototype, "histogramColor", void 0);
|
|
250
|
+
__decorate([
|
|
251
|
+
property({ type: String, attribute: 'bins-number' })
|
|
252
|
+
], NileHistogramChart.prototype, "binsNumber", void 0);
|
|
253
|
+
__decorate([
|
|
254
|
+
property({ type: Number, attribute: 'bin-width' })
|
|
255
|
+
], NileHistogramChart.prototype, "binWidth", void 0);
|
|
256
|
+
__decorate([
|
|
257
|
+
property({ type: Boolean, attribute: 'show-legend' })
|
|
258
|
+
], NileHistogramChart.prototype, "showLegend", void 0);
|
|
259
|
+
NileHistogramChart = __decorate([
|
|
260
|
+
customElement('nile-histogram-chart')
|
|
261
|
+
], NileHistogramChart);
|
|
262
|
+
export { NileHistogramChart };
|
|
263
|
+
//# sourceMappingURL=nile-histogram-chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const styles = css `
|
|
3
|
+
:host {
|
|
4
|
+
display: block;
|
|
5
|
+
width: 100%;
|
|
6
|
+
position: relative;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:host([hidden]) {
|
|
10
|
+
display: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.chart-container {
|
|
14
|
+
width: 100%;
|
|
15
|
+
min-height: var(--nile-height-200px, var(--ng-height-200px));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.chart-loading {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
min-height: inherit;
|
|
23
|
+
color: var(--nile-colors-neutral-700, var(--ng-colors-text-secondary-700));
|
|
24
|
+
font-family: var(--nile-font-family-serif, var(--ng-font-family-body));
|
|
25
|
+
font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
28
|
+
//# sourceMappingURL=nile-inverted-area-chart.css.js.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
|
|
2
|
+
import type Highcharts from 'highcharts';
|
|
3
|
+
import NileElement from '../internal/nile-element.js';
|
|
4
|
+
import type { SeparatedChartConfigInputType } from '../internal/types/index.js';
|
|
5
|
+
export interface InvertedAreaChartSeriesData {
|
|
6
|
+
name: string;
|
|
7
|
+
data: number[];
|
|
8
|
+
color?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class NileInvertedAreaChart extends NileElement {
|
|
11
|
+
static styles: CSSResultGroup;
|
|
12
|
+
private _hc;
|
|
13
|
+
private chart;
|
|
14
|
+
private resizeObserver;
|
|
15
|
+
private chartContainer;
|
|
16
|
+
config: SeparatedChartConfigInputType | null;
|
|
17
|
+
chartTitle: string;
|
|
18
|
+
chartSubtitle: string;
|
|
19
|
+
data: InvertedAreaChartSeriesData[];
|
|
20
|
+
categories: string[];
|
|
21
|
+
options: Highcharts.Options;
|
|
22
|
+
loading: boolean;
|
|
23
|
+
height: string;
|
|
24
|
+
yAxisTitle: string;
|
|
25
|
+
stacked: boolean;
|
|
26
|
+
connectedCallback(): void;
|
|
27
|
+
disconnectedCallback(): void;
|
|
28
|
+
protected firstUpdated(): void;
|
|
29
|
+
protected updated(changedProperties: PropertyValues): void;
|
|
30
|
+
private setupResizeObserver;
|
|
31
|
+
private buildOptions;
|
|
32
|
+
private initChart;
|
|
33
|
+
private destroyChart;
|
|
34
|
+
render(): TemplateResult;
|
|
35
|
+
}
|
|
36
|
+
declare global {
|
|
37
|
+
interface HTMLElementTagNameMap {
|
|
38
|
+
'nile-inverted-area-chart': NileInvertedAreaChart;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { customElement, property, query } from 'lit/decorators.js';
|
|
3
|
+
import { html } from 'lit';
|
|
4
|
+
import NileElement from '../internal/nile-element.js';
|
|
5
|
+
import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
|
|
6
|
+
import { getHighcharts } from '../internal/highcharts-provider.js';
|
|
7
|
+
import { deepMerge } from '../internal/utils.js';
|
|
8
|
+
import { styles } from './nile-inverted-area-chart.css';
|
|
9
|
+
let NileInvertedAreaChart = class NileInvertedAreaChart extends NileElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this._hc = null;
|
|
13
|
+
this.chart = null;
|
|
14
|
+
this.resizeObserver = null;
|
|
15
|
+
this.config = null;
|
|
16
|
+
this.chartTitle = '';
|
|
17
|
+
this.chartSubtitle = '';
|
|
18
|
+
this.data = [];
|
|
19
|
+
this.categories = [];
|
|
20
|
+
this.options = {};
|
|
21
|
+
this.loading = false;
|
|
22
|
+
this.height = '400px';
|
|
23
|
+
this.yAxisTitle = '';
|
|
24
|
+
this.stacked = false;
|
|
25
|
+
}
|
|
26
|
+
connectedCallback() {
|
|
27
|
+
super.connectedCallback();
|
|
28
|
+
if (this.config)
|
|
29
|
+
applySeparatedChartConfig(this, this.config);
|
|
30
|
+
}
|
|
31
|
+
disconnectedCallback() {
|
|
32
|
+
super.disconnectedCallback();
|
|
33
|
+
this.destroyChart();
|
|
34
|
+
this.resizeObserver?.disconnect();
|
|
35
|
+
this.resizeObserver = null;
|
|
36
|
+
}
|
|
37
|
+
firstUpdated() {
|
|
38
|
+
this.initChart();
|
|
39
|
+
this.setupResizeObserver();
|
|
40
|
+
}
|
|
41
|
+
updated(changedProperties) {
|
|
42
|
+
if (changedProperties.has('config') && this.config) {
|
|
43
|
+
applySeparatedChartConfig(this, this.config);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const props = [
|
|
47
|
+
'data',
|
|
48
|
+
'categories',
|
|
49
|
+
'chartTitle',
|
|
50
|
+
'chartSubtitle',
|
|
51
|
+
'options',
|
|
52
|
+
'height',
|
|
53
|
+
'yAxisTitle',
|
|
54
|
+
'stacked',
|
|
55
|
+
'loading',
|
|
56
|
+
];
|
|
57
|
+
if (!props.some(p => changedProperties.has(p)))
|
|
58
|
+
return;
|
|
59
|
+
if (this.loading) {
|
|
60
|
+
this.destroyChart();
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
if (this.chart) {
|
|
64
|
+
this.chart.update(this.buildOptions(), true, true);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
this.initChart();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
setupResizeObserver() {
|
|
71
|
+
if (!this.chartContainer)
|
|
72
|
+
return;
|
|
73
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
74
|
+
this.chart?.reflow();
|
|
75
|
+
});
|
|
76
|
+
this.resizeObserver.observe(this.chartContainer);
|
|
77
|
+
}
|
|
78
|
+
buildOptions() {
|
|
79
|
+
const self = this;
|
|
80
|
+
return deepMerge({
|
|
81
|
+
chart: { type: 'area', inverted: true, height: this.height },
|
|
82
|
+
title: { text: this.chartTitle || undefined },
|
|
83
|
+
subtitle: { text: this.chartSubtitle || undefined },
|
|
84
|
+
xAxis: { categories: this.categories },
|
|
85
|
+
yAxis: { title: { text: this.yAxisTitle || undefined } },
|
|
86
|
+
tooltip: { shared: true },
|
|
87
|
+
plotOptions: {
|
|
88
|
+
area: { stacking: this.stacked ? 'normal' : undefined, fillOpacity: 0.25 },
|
|
89
|
+
series: {
|
|
90
|
+
cursor: 'pointer',
|
|
91
|
+
point: {
|
|
92
|
+
events: {
|
|
93
|
+
click() {
|
|
94
|
+
self.emit('nile-chart-click', {
|
|
95
|
+
point: this,
|
|
96
|
+
category: this.category,
|
|
97
|
+
value: this.y,
|
|
98
|
+
seriesName: this.series.name,
|
|
99
|
+
});
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
series: this.data.map(s => ({
|
|
106
|
+
type: 'area',
|
|
107
|
+
name: s.name,
|
|
108
|
+
data: s.data,
|
|
109
|
+
color: s.color,
|
|
110
|
+
})),
|
|
111
|
+
credits: { enabled: false },
|
|
112
|
+
}, this.options);
|
|
113
|
+
}
|
|
114
|
+
async initChart() {
|
|
115
|
+
if (this.loading || !this.chartContainer)
|
|
116
|
+
return;
|
|
117
|
+
if (!this._hc)
|
|
118
|
+
this._hc = await getHighcharts();
|
|
119
|
+
this.chart = this._hc.chart(this.chartContainer, this.buildOptions());
|
|
120
|
+
this.emit('nile-chart-ready', { chart: this.chart });
|
|
121
|
+
}
|
|
122
|
+
destroyChart() {
|
|
123
|
+
if (this.chart) {
|
|
124
|
+
this.chart.destroy();
|
|
125
|
+
this.chart = null;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
render() {
|
|
129
|
+
if (this.loading) {
|
|
130
|
+
return html `<div class="chart-loading" style="height:${this.height}">Loading...</div>`;
|
|
131
|
+
}
|
|
132
|
+
return html `<div class="chart-container"></div>`;
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
NileInvertedAreaChart.styles = styles;
|
|
136
|
+
__decorate([
|
|
137
|
+
query('.chart-container')
|
|
138
|
+
], NileInvertedAreaChart.prototype, "chartContainer", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
property({ type: Object })
|
|
141
|
+
], NileInvertedAreaChart.prototype, "config", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
property({ type: String, attribute: 'chart-title' })
|
|
144
|
+
], NileInvertedAreaChart.prototype, "chartTitle", void 0);
|
|
145
|
+
__decorate([
|
|
146
|
+
property({ type: String, attribute: 'chart-subtitle' })
|
|
147
|
+
], NileInvertedAreaChart.prototype, "chartSubtitle", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
property({ type: Array })
|
|
150
|
+
], NileInvertedAreaChart.prototype, "data", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
property({ type: Array })
|
|
153
|
+
], NileInvertedAreaChart.prototype, "categories", void 0);
|
|
154
|
+
__decorate([
|
|
155
|
+
property({ type: Object })
|
|
156
|
+
], NileInvertedAreaChart.prototype, "options", void 0);
|
|
157
|
+
__decorate([
|
|
158
|
+
property({ type: Boolean, reflect: true })
|
|
159
|
+
], NileInvertedAreaChart.prototype, "loading", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
property({ type: String })
|
|
162
|
+
], NileInvertedAreaChart.prototype, "height", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
property({ type: String, attribute: 'y-axis-title' })
|
|
165
|
+
], NileInvertedAreaChart.prototype, "yAxisTitle", void 0);
|
|
166
|
+
__decorate([
|
|
167
|
+
property({ type: Boolean })
|
|
168
|
+
], NileInvertedAreaChart.prototype, "stacked", void 0);
|
|
169
|
+
NileInvertedAreaChart = __decorate([
|
|
170
|
+
customElement('nile-inverted-area-chart')
|
|
171
|
+
], NileInvertedAreaChart);
|
|
172
|
+
export { NileInvertedAreaChart };
|
|
173
|
+
//# sourceMappingURL=nile-inverted-area-chart.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { NileKpiChart } from './nile-kpi-chart.js';
|
|
2
|
-
export type { KpiConfig, TrendDirection, KpiVariant } from './nile-kpi-chart.js';
|
|
2
|
+
export type { ChartKpiSeparatedPayload, KpiConfig, NileKpiConfigInputType, TrendDirection, KpiVariant, } from './nile-kpi-chart.js';
|
|
@@ -1,8 +1,35 @@
|
|
|
1
1
|
import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
|
|
2
2
|
import type Highcharts from 'highcharts';
|
|
3
3
|
import NileElement from '../internal/nile-element.js';
|
|
4
|
+
import type { AqConfigType } from '../internal/types/aq-config.type.js';
|
|
4
5
|
export type TrendDirection = 'up' | 'down' | 'neutral';
|
|
5
6
|
export type KpiVariant = 'default' | 'card' | 'gauge';
|
|
7
|
+
/** `chart` slice for `<nile-kpi-chart>.config` (discriminated by `type: 'kpi'`). */
|
|
8
|
+
export interface ChartKpiSeparatedPayload {
|
|
9
|
+
type: 'kpi';
|
|
10
|
+
variant?: KpiVariant;
|
|
11
|
+
label?: string;
|
|
12
|
+
value?: string | number;
|
|
13
|
+
prefix?: string;
|
|
14
|
+
suffix?: string;
|
|
15
|
+
trendValue?: number | null;
|
|
16
|
+
trendDirection?: TrendDirection;
|
|
17
|
+
trendLabel?: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
sparkline?: number[];
|
|
20
|
+
sparklineColor?: string;
|
|
21
|
+
gaugeValue?: number;
|
|
22
|
+
gaugeMin?: number;
|
|
23
|
+
gaugeMax?: number;
|
|
24
|
+
gaugeColor?: string;
|
|
25
|
+
loading?: boolean;
|
|
26
|
+
options?: Highcharts.Options;
|
|
27
|
+
}
|
|
28
|
+
/** Separated `{ chart, aq }` input for `<nile-kpi-chart>`. */
|
|
29
|
+
export interface NileKpiConfigInputType {
|
|
30
|
+
chart: ChartKpiSeparatedPayload;
|
|
31
|
+
aq?: AqConfigType;
|
|
32
|
+
}
|
|
6
33
|
export interface KpiConfig {
|
|
7
34
|
label: string;
|
|
8
35
|
value: number | string;
|
|
@@ -24,6 +51,8 @@ export declare class NileKpiChart extends NileElement {
|
|
|
24
51
|
private resizeObserver;
|
|
25
52
|
private sparklineContainer;
|
|
26
53
|
private gaugeContainer;
|
|
54
|
+
/** Full configuration: `{ chart, aq }` (same convention as other Nile charts). */
|
|
55
|
+
config: NileKpiConfigInputType | null;
|
|
27
56
|
/** Display variant: default (flat), card (bordered container), gauge (Highcharts solid gauge). */
|
|
28
57
|
variant: KpiVariant;
|
|
29
58
|
/** Label displayed above the value. */
|
|
@@ -58,6 +87,9 @@ export declare class NileKpiChart extends NileElement {
|
|
|
58
87
|
loading: boolean;
|
|
59
88
|
/** Highcharts options override for the sparkline or gauge. */
|
|
60
89
|
options: Highcharts.Options;
|
|
90
|
+
/** Apply `{ chart, aq }` to individual properties. */
|
|
91
|
+
private applyConfig;
|
|
92
|
+
connectedCallback(): void;
|
|
61
93
|
disconnectedCallback(): void;
|
|
62
94
|
protected firstUpdated(): void;
|
|
63
95
|
protected updated(changedProperties: PropertyValues): void;
|
|
@@ -11,6 +11,8 @@ let NileKpiChart = class NileKpiChart extends NileElement {
|
|
|
11
11
|
this.sparklineChart = null;
|
|
12
12
|
this.gaugeChart = null;
|
|
13
13
|
this.resizeObserver = null;
|
|
14
|
+
/** Full configuration: `{ chart, aq }` (same convention as other Nile charts). */
|
|
15
|
+
this.config = null;
|
|
14
16
|
/** Display variant: default (flat), card (bordered container), gauge (Highcharts solid gauge). */
|
|
15
17
|
this.variant = 'default';
|
|
16
18
|
/** Label displayed above the value. */
|
|
@@ -46,6 +48,57 @@ let NileKpiChart = class NileKpiChart extends NileElement {
|
|
|
46
48
|
/** Highcharts options override for the sparkline or gauge. */
|
|
47
49
|
this.options = {};
|
|
48
50
|
}
|
|
51
|
+
/** Apply `{ chart, aq }` to individual properties. */
|
|
52
|
+
applyConfig(cfg) {
|
|
53
|
+
const { chart: c, aq } = cfg;
|
|
54
|
+
if (c) {
|
|
55
|
+
if (c.variant !== undefined)
|
|
56
|
+
this.variant = c.variant;
|
|
57
|
+
if (c.label !== undefined)
|
|
58
|
+
this.label = c.label;
|
|
59
|
+
if (c.value !== undefined)
|
|
60
|
+
this.value = c.value;
|
|
61
|
+
if (c.prefix !== undefined)
|
|
62
|
+
this.prefix = c.prefix;
|
|
63
|
+
if (c.suffix !== undefined)
|
|
64
|
+
this.suffix = c.suffix;
|
|
65
|
+
if (c.trendValue !== undefined)
|
|
66
|
+
this.trendValue = c.trendValue;
|
|
67
|
+
if (c.trendDirection !== undefined)
|
|
68
|
+
this.trendDirection = c.trendDirection;
|
|
69
|
+
if (c.trendLabel !== undefined)
|
|
70
|
+
this.trendLabel = c.trendLabel;
|
|
71
|
+
if (c.description !== undefined)
|
|
72
|
+
this.description = c.description;
|
|
73
|
+
if (c.sparkline !== undefined)
|
|
74
|
+
this.sparkline = c.sparkline;
|
|
75
|
+
if (c.sparklineColor !== undefined)
|
|
76
|
+
this.sparklineColor = c.sparklineColor;
|
|
77
|
+
if (c.gaugeValue !== undefined)
|
|
78
|
+
this.gaugeValue = c.gaugeValue;
|
|
79
|
+
if (c.gaugeMin !== undefined)
|
|
80
|
+
this.gaugeMin = c.gaugeMin;
|
|
81
|
+
if (c.gaugeMax !== undefined)
|
|
82
|
+
this.gaugeMax = c.gaugeMax;
|
|
83
|
+
if (c.gaugeColor !== undefined)
|
|
84
|
+
this.gaugeColor = c.gaugeColor;
|
|
85
|
+
if (c.loading !== undefined)
|
|
86
|
+
this.loading = c.loading;
|
|
87
|
+
if (c.options !== undefined)
|
|
88
|
+
this.options = c.options;
|
|
89
|
+
}
|
|
90
|
+
if (aq) {
|
|
91
|
+
if (aq.chartTitle != null)
|
|
92
|
+
this.label = aq.chartTitle;
|
|
93
|
+
if (aq.chartSubtitle != null)
|
|
94
|
+
this.description = aq.chartSubtitle;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
connectedCallback() {
|
|
98
|
+
super.connectedCallback();
|
|
99
|
+
if (this.config)
|
|
100
|
+
this.applyConfig(this.config);
|
|
101
|
+
}
|
|
49
102
|
disconnectedCallback() {
|
|
50
103
|
super.disconnectedCallback();
|
|
51
104
|
this.destroyCharts();
|
|
@@ -58,6 +111,10 @@ let NileKpiChart = class NileKpiChart extends NileElement {
|
|
|
58
111
|
this.setupResizeObserver();
|
|
59
112
|
}
|
|
60
113
|
updated(changedProperties) {
|
|
114
|
+
if (changedProperties.has('config') && this.config) {
|
|
115
|
+
this.applyConfig(this.config);
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
61
118
|
const sparklineProps = ['sparkline', 'sparklineColor', 'options'];
|
|
62
119
|
if (sparklineProps.some(p => changedProperties.has(p))) {
|
|
63
120
|
if (this.sparklineChart) {
|
|
@@ -277,6 +334,9 @@ __decorate([
|
|
|
277
334
|
__decorate([
|
|
278
335
|
query('.kpi-gauge-container')
|
|
279
336
|
], NileKpiChart.prototype, "gaugeContainer", void 0);
|
|
337
|
+
__decorate([
|
|
338
|
+
property({ type: Object })
|
|
339
|
+
], NileKpiChart.prototype, "config", void 0);
|
|
280
340
|
__decorate([
|
|
281
341
|
property({ type: String, reflect: true })
|
|
282
342
|
], NileKpiChart.prototype, "variant", void 0);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
|
|
2
2
|
import type Highcharts from 'highcharts';
|
|
3
3
|
import NileElement from '../internal/nile-element.js';
|
|
4
|
+
import type { NileChartConfigInputType } from '../internal/types/index.js';
|
|
4
5
|
export interface LineChartSeriesData {
|
|
5
6
|
name: string;
|
|
6
7
|
data: number[];
|
|
@@ -12,6 +13,8 @@ export declare class NileLineChart extends NileElement {
|
|
|
12
13
|
private chart;
|
|
13
14
|
private resizeObserver;
|
|
14
15
|
private chartContainer;
|
|
16
|
+
/** Full chart configuration. Accepts separated { chart, aq } input. */
|
|
17
|
+
config: NileChartConfigInputType | null;
|
|
15
18
|
chartTitle: string;
|
|
16
19
|
chartSubtitle: string;
|
|
17
20
|
data: LineChartSeriesData[];
|
|
@@ -20,6 +23,9 @@ export declare class NileLineChart extends NileElement {
|
|
|
20
23
|
loading: boolean;
|
|
21
24
|
height: string;
|
|
22
25
|
yAxisTitle: string;
|
|
26
|
+
/** Apply { chart, aq } config to individual properties. */
|
|
27
|
+
private applyConfig;
|
|
28
|
+
connectedCallback(): void;
|
|
23
29
|
disconnectedCallback(): void;
|
|
24
30
|
protected firstUpdated(): void;
|
|
25
31
|
protected updated(changedProperties: PropertyValues): void;
|