@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,7 @@
|
|
|
1
|
+
import type { AqConfigType } from './aq-config.type.js';
|
|
2
|
+
import type { PrimitiveChartConfigType } from './primitive-chart-config.type.js';
|
|
3
|
+
/** Input for primitive `<nile-*-chart>` tags that use `el.config = { chart, aq }`. */
|
|
4
|
+
export interface SeparatedChartConfigInputType {
|
|
5
|
+
chart: PrimitiveChartConfigType;
|
|
6
|
+
aq?: AqConfigType;
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ChartType, SwitchAggregation } from '../../nile-chart/nile-chart-config.js';
|
|
2
|
+
/** Config for chart type switching UI. */
|
|
3
|
+
export interface SwitchableConfigType {
|
|
4
|
+
/** Chart types the user can switch to. */
|
|
5
|
+
types?: ChartType[];
|
|
6
|
+
/** How to aggregate bar data when converting to pie. Default: 'by-category'. */
|
|
7
|
+
aggregation?: SwitchAggregation;
|
|
8
|
+
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import type { CSSResultGroup, TemplateResult } from 'lit';
|
|
1
|
+
import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
|
|
2
2
|
import NileElement from '../internal/nile-element.js';
|
|
3
|
+
import type { NileAiPanelConfigInputType } from '../internal/types/nile-ai-widgets-config-input.type.js';
|
|
3
4
|
import '../nile-ai-sender/index.js';
|
|
4
5
|
export declare class NileAiPanel extends NileElement {
|
|
5
6
|
static styles: CSSResultGroup;
|
|
7
|
+
/** Full configuration: `{ chart, aq }` (same convention as Nile charts). */
|
|
8
|
+
config: NileAiPanelConfigInputType | null;
|
|
6
9
|
/** Placeholder text passed to nile-ai-sender. */
|
|
7
10
|
placeholder: string;
|
|
8
11
|
/** Welcome message shown when the panel opens. */
|
|
@@ -10,6 +13,10 @@ export declare class NileAiPanel extends NileElement {
|
|
|
10
13
|
private messages;
|
|
11
14
|
private loading;
|
|
12
15
|
private messagesEl;
|
|
16
|
+
/** Apply `{ chart, aq }` to individual properties. */
|
|
17
|
+
private applyConfig;
|
|
18
|
+
connectedCallback(): void;
|
|
19
|
+
protected updated(changedProperties: PropertyValues): void;
|
|
13
20
|
/** Add a user message to the conversation. */
|
|
14
21
|
addUserMessage(text: string): void;
|
|
15
22
|
/** Add an assistant response to the conversation. */
|
|
@@ -7,6 +7,8 @@ import '../nile-ai-sender/index.js';
|
|
|
7
7
|
let NileAiPanel = class NileAiPanel extends NileElement {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
10
|
+
/** Full configuration: `{ chart, aq }` (same convention as Nile charts). */
|
|
11
|
+
this.config = null;
|
|
10
12
|
/** Placeholder text passed to nile-ai-sender. */
|
|
11
13
|
this.placeholder = 'Ask about this chart...';
|
|
12
14
|
/** Welcome message shown when the panel opens. */
|
|
@@ -14,6 +16,35 @@ let NileAiPanel = class NileAiPanel extends NileElement {
|
|
|
14
16
|
this.messages = [];
|
|
15
17
|
this.loading = false;
|
|
16
18
|
}
|
|
19
|
+
/** Apply `{ chart, aq }` to individual properties. */
|
|
20
|
+
applyConfig(cfg) {
|
|
21
|
+
const { chart: c, aq } = cfg;
|
|
22
|
+
if (aq) {
|
|
23
|
+
if (aq.ai?.placeholder != null)
|
|
24
|
+
this.placeholder = aq.ai.placeholder;
|
|
25
|
+
if (aq.ai?.welcomeMessage != null)
|
|
26
|
+
this.welcomeMessage = aq.ai.welcomeMessage;
|
|
27
|
+
}
|
|
28
|
+
if (c) {
|
|
29
|
+
const p = c;
|
|
30
|
+
if (p.placeholder !== undefined)
|
|
31
|
+
this.placeholder = p.placeholder;
|
|
32
|
+
if (p.welcomeMessage !== undefined)
|
|
33
|
+
this.welcomeMessage = p.welcomeMessage;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
connectedCallback() {
|
|
37
|
+
super.connectedCallback();
|
|
38
|
+
if (this.config)
|
|
39
|
+
this.applyConfig(this.config);
|
|
40
|
+
}
|
|
41
|
+
updated(changedProperties) {
|
|
42
|
+
if (changedProperties.has('config') && this.config) {
|
|
43
|
+
this.applyConfig(this.config);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
super.updated(changedProperties);
|
|
47
|
+
}
|
|
17
48
|
/** Add a user message to the conversation. */
|
|
18
49
|
addUserMessage(text) {
|
|
19
50
|
this.messages = [...this.messages, { role: 'user', text }];
|
|
@@ -76,6 +107,9 @@ let NileAiPanel = class NileAiPanel extends NileElement {
|
|
|
76
107
|
}
|
|
77
108
|
};
|
|
78
109
|
NileAiPanel.styles = styles;
|
|
110
|
+
__decorate([
|
|
111
|
+
property({ type: Object })
|
|
112
|
+
], NileAiPanel.prototype, "config", void 0);
|
|
79
113
|
__decorate([
|
|
80
114
|
property({ type: String })
|
|
81
115
|
], NileAiPanel.prototype, "placeholder", void 0);
|
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
import type { CSSResultGroup, TemplateResult } from 'lit';
|
|
1
|
+
import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
|
|
2
2
|
import NileElement from '../internal/nile-element.js';
|
|
3
|
+
import type { NileAiSenderConfigInputType } from '../internal/types/nile-ai-widgets-config-input.type.js';
|
|
3
4
|
export declare class NileAiSender extends NileElement {
|
|
4
5
|
static styles: CSSResultGroup;
|
|
6
|
+
/** Full configuration: `{ chart, aq }` (same convention as Nile charts). */
|
|
7
|
+
config: NileAiSenderConfigInputType | null;
|
|
5
8
|
/** Placeholder text for the input. */
|
|
6
9
|
placeholder: string;
|
|
7
10
|
/** Whether the input is disabled. */
|
|
8
11
|
disabled: boolean;
|
|
9
12
|
private value;
|
|
10
13
|
private inputEl;
|
|
14
|
+
/** Apply `{ chart, aq }` to individual properties. */
|
|
15
|
+
private applyConfig;
|
|
16
|
+
connectedCallback(): void;
|
|
17
|
+
protected updated(changedProperties: PropertyValues): void;
|
|
11
18
|
private handleInput;
|
|
12
19
|
private handleKeyDown;
|
|
13
20
|
private send;
|
|
@@ -6,12 +6,39 @@ import { styles } from './nile-ai-sender.css.js';
|
|
|
6
6
|
let NileAiSender = class NileAiSender extends NileElement {
|
|
7
7
|
constructor() {
|
|
8
8
|
super(...arguments);
|
|
9
|
+
/** Full configuration: `{ chart, aq }` (same convention as Nile charts). */
|
|
10
|
+
this.config = null;
|
|
9
11
|
/** Placeholder text for the input. */
|
|
10
12
|
this.placeholder = 'Ask about this chart...';
|
|
11
13
|
/** Whether the input is disabled. */
|
|
12
14
|
this.disabled = false;
|
|
13
15
|
this.value = '';
|
|
14
16
|
}
|
|
17
|
+
/** Apply `{ chart, aq }` to individual properties. */
|
|
18
|
+
applyConfig(cfg) {
|
|
19
|
+
const { chart: c, aq } = cfg;
|
|
20
|
+
if (aq?.ai?.placeholder != null)
|
|
21
|
+
this.placeholder = aq.ai.placeholder;
|
|
22
|
+
if (c) {
|
|
23
|
+
const s = c;
|
|
24
|
+
if (s.placeholder !== undefined)
|
|
25
|
+
this.placeholder = s.placeholder;
|
|
26
|
+
if (s.disabled !== undefined)
|
|
27
|
+
this.disabled = s.disabled;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
connectedCallback() {
|
|
31
|
+
super.connectedCallback();
|
|
32
|
+
if (this.config)
|
|
33
|
+
this.applyConfig(this.config);
|
|
34
|
+
}
|
|
35
|
+
updated(changedProperties) {
|
|
36
|
+
if (changedProperties.has('config') && this.config) {
|
|
37
|
+
this.applyConfig(this.config);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
super.updated(changedProperties);
|
|
41
|
+
}
|
|
15
42
|
handleInput(e) {
|
|
16
43
|
this.value = e.target.value;
|
|
17
44
|
}
|
|
@@ -58,6 +85,9 @@ let NileAiSender = class NileAiSender extends NileElement {
|
|
|
58
85
|
}
|
|
59
86
|
};
|
|
60
87
|
NileAiSender.styles = styles;
|
|
88
|
+
__decorate([
|
|
89
|
+
property({ type: Object })
|
|
90
|
+
], NileAiSender.prototype, "config", void 0);
|
|
61
91
|
__decorate([
|
|
62
92
|
property({ type: String })
|
|
63
93
|
], NileAiSender.prototype, "placeholder", 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 AnomalySeriesData {
|
|
5
6
|
name: string;
|
|
6
7
|
data: number[];
|
|
@@ -20,6 +21,8 @@ export declare class NileAnomalyChart extends NileElement {
|
|
|
20
21
|
private chart;
|
|
21
22
|
private resizeObserver;
|
|
22
23
|
private chartContainer;
|
|
24
|
+
/** Full chart configuration. Accepts separated { chart, aq } input. */
|
|
25
|
+
config: NileChartConfigInputType | null;
|
|
23
26
|
/** The chart title displayed above the chart. */
|
|
24
27
|
chartTitle: string;
|
|
25
28
|
/** The subtitle displayed below the title. */
|
|
@@ -38,6 +41,9 @@ export declare class NileAnomalyChart extends NileElement {
|
|
|
38
41
|
height: string;
|
|
39
42
|
/** Y-axis title text. */
|
|
40
43
|
yAxisTitle: string;
|
|
44
|
+
/** Apply { chart, aq } config to individual properties. */
|
|
45
|
+
private applyConfig;
|
|
46
|
+
connectedCallback(): void;
|
|
41
47
|
disconnectedCallback(): void;
|
|
42
48
|
protected firstUpdated(): void;
|
|
43
49
|
protected updated(changedProperties: PropertyValues): void;
|
|
@@ -11,6 +11,8 @@ let NileAnomalyChart = class NileAnomalyChart extends NileElement {
|
|
|
11
11
|
this._hc = null;
|
|
12
12
|
this.chart = null;
|
|
13
13
|
this.resizeObserver = null;
|
|
14
|
+
/** Full chart configuration. Accepts separated { chart, aq } input. */
|
|
15
|
+
this.config = null;
|
|
14
16
|
/** The chart title displayed above the chart. */
|
|
15
17
|
this.chartTitle = '';
|
|
16
18
|
/** The subtitle displayed below the title. */
|
|
@@ -30,6 +32,38 @@ let NileAnomalyChart = class NileAnomalyChart extends NileElement {
|
|
|
30
32
|
/** Y-axis title text. */
|
|
31
33
|
this.yAxisTitle = '';
|
|
32
34
|
}
|
|
35
|
+
/** Apply { chart, aq } config to individual properties. */
|
|
36
|
+
applyConfig(cfg) {
|
|
37
|
+
const { chart: c, aq } = cfg;
|
|
38
|
+
if (c) {
|
|
39
|
+
const anom = c;
|
|
40
|
+
if (anom.data)
|
|
41
|
+
this.data = anom.data;
|
|
42
|
+
if (anom.categories)
|
|
43
|
+
this.categories = anom.categories;
|
|
44
|
+
if (anom.yAxisTitle)
|
|
45
|
+
this.yAxisTitle = anom.yAxisTitle;
|
|
46
|
+
if (anom.height)
|
|
47
|
+
this.height = anom.height;
|
|
48
|
+
if (anom.loading !== undefined)
|
|
49
|
+
this.loading = anom.loading;
|
|
50
|
+
if (anom.options)
|
|
51
|
+
this.options = anom.options;
|
|
52
|
+
if (anom.anomaly)
|
|
53
|
+
this.anomaly = anom.anomaly;
|
|
54
|
+
}
|
|
55
|
+
if (aq) {
|
|
56
|
+
if (aq.chartTitle)
|
|
57
|
+
this.chartTitle = aq.chartTitle;
|
|
58
|
+
if (aq.chartSubtitle)
|
|
59
|
+
this.chartSubtitle = aq.chartSubtitle;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
connectedCallback() {
|
|
63
|
+
super.connectedCallback();
|
|
64
|
+
if (this.config)
|
|
65
|
+
this.applyConfig(this.config);
|
|
66
|
+
}
|
|
33
67
|
disconnectedCallback() {
|
|
34
68
|
super.disconnectedCallback();
|
|
35
69
|
this.destroyChart();
|
|
@@ -41,6 +75,10 @@ let NileAnomalyChart = class NileAnomalyChart extends NileElement {
|
|
|
41
75
|
this.setupResizeObserver();
|
|
42
76
|
}
|
|
43
77
|
updated(changedProperties) {
|
|
78
|
+
if (changedProperties.has('config') && this.config) {
|
|
79
|
+
this.applyConfig(this.config);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
44
82
|
const chartProps = [
|
|
45
83
|
'data',
|
|
46
84
|
'categories',
|
|
@@ -234,6 +272,9 @@ NileAnomalyChart.styles = styles;
|
|
|
234
272
|
__decorate([
|
|
235
273
|
query('.chart-container')
|
|
236
274
|
], NileAnomalyChart.prototype, "chartContainer", void 0);
|
|
275
|
+
__decorate([
|
|
276
|
+
property({ type: Object })
|
|
277
|
+
], NileAnomalyChart.prototype, "config", void 0);
|
|
237
278
|
__decorate([
|
|
238
279
|
property({ type: String, attribute: 'chart-title' })
|
|
239
280
|
], NileAnomalyChart.prototype, "chartTitle", 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 AreaChartSeriesData {
|
|
5
6
|
name: string;
|
|
6
7
|
data: number[];
|
|
@@ -12,6 +13,8 @@ export declare class NileAreaChart 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: AreaChartSeriesData[];
|
|
@@ -21,6 +24,9 @@ export declare class NileAreaChart extends NileElement {
|
|
|
21
24
|
height: string;
|
|
22
25
|
yAxisTitle: string;
|
|
23
26
|
stacked: boolean;
|
|
27
|
+
/** Apply { chart, aq } config to individual properties. */
|
|
28
|
+
private applyConfig;
|
|
29
|
+
connectedCallback(): void;
|
|
24
30
|
disconnectedCallback(): void;
|
|
25
31
|
protected firstUpdated(): void;
|
|
26
32
|
protected updated(changedProperties: PropertyValues): void;
|
|
@@ -11,6 +11,8 @@ let NileAreaChart = class NileAreaChart extends NileElement {
|
|
|
11
11
|
this._hc = null;
|
|
12
12
|
this.chart = null;
|
|
13
13
|
this.resizeObserver = null;
|
|
14
|
+
/** Full chart configuration. Accepts separated { chart, aq } input. */
|
|
15
|
+
this.config = null;
|
|
14
16
|
this.chartTitle = '';
|
|
15
17
|
this.chartSubtitle = '';
|
|
16
18
|
this.data = [];
|
|
@@ -21,6 +23,38 @@ let NileAreaChart = class NileAreaChart extends NileElement {
|
|
|
21
23
|
this.yAxisTitle = '';
|
|
22
24
|
this.stacked = false;
|
|
23
25
|
}
|
|
26
|
+
/** Apply { chart, aq } config to individual properties. */
|
|
27
|
+
applyConfig(cfg) {
|
|
28
|
+
const { chart: c, aq } = cfg;
|
|
29
|
+
if (c) {
|
|
30
|
+
const area = c;
|
|
31
|
+
if (area.data)
|
|
32
|
+
this.data = area.data;
|
|
33
|
+
if (area.categories)
|
|
34
|
+
this.categories = area.categories;
|
|
35
|
+
if (area.yAxisTitle)
|
|
36
|
+
this.yAxisTitle = area.yAxisTitle;
|
|
37
|
+
if (area.height)
|
|
38
|
+
this.height = area.height;
|
|
39
|
+
if (area.loading !== undefined)
|
|
40
|
+
this.loading = area.loading;
|
|
41
|
+
if (area.options)
|
|
42
|
+
this.options = area.options;
|
|
43
|
+
if (area.stacked !== undefined)
|
|
44
|
+
this.stacked = area.stacked;
|
|
45
|
+
}
|
|
46
|
+
if (aq) {
|
|
47
|
+
if (aq.chartTitle)
|
|
48
|
+
this.chartTitle = aq.chartTitle;
|
|
49
|
+
if (aq.chartSubtitle)
|
|
50
|
+
this.chartSubtitle = aq.chartSubtitle;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
connectedCallback() {
|
|
54
|
+
super.connectedCallback();
|
|
55
|
+
if (this.config)
|
|
56
|
+
this.applyConfig(this.config);
|
|
57
|
+
}
|
|
24
58
|
disconnectedCallback() {
|
|
25
59
|
super.disconnectedCallback();
|
|
26
60
|
this.destroyChart();
|
|
@@ -29,6 +63,10 @@ let NileAreaChart = class NileAreaChart extends NileElement {
|
|
|
29
63
|
}
|
|
30
64
|
firstUpdated() { this.initChart(); this.setupResizeObserver(); }
|
|
31
65
|
updated(changedProperties) {
|
|
66
|
+
if (changedProperties.has('config') && this.config) {
|
|
67
|
+
this.applyConfig(this.config);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
32
70
|
const props = ['data', 'categories', 'chartTitle', 'chartSubtitle', 'options', 'height', 'yAxisTitle', 'stacked', 'loading'];
|
|
33
71
|
if (!props.some(p => changedProperties.has(p)))
|
|
34
72
|
return;
|
|
@@ -88,6 +126,9 @@ NileAreaChart.styles = styles;
|
|
|
88
126
|
__decorate([
|
|
89
127
|
query('.chart-container')
|
|
90
128
|
], NileAreaChart.prototype, "chartContainer", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
property({ type: Object })
|
|
131
|
+
], NileAreaChart.prototype, "config", void 0);
|
|
91
132
|
__decorate([
|
|
92
133
|
property({ type: String, attribute: 'chart-title' })
|
|
93
134
|
], NileAreaChart.prototype, "chartTitle", void 0);
|
|
@@ -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-area-negative-chart.css.js.map
|
|
@@ -0,0 +1,42 @@
|
|
|
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/separated-chart-config-input.type.js';
|
|
5
|
+
export interface AreaNegativeSeriesData {
|
|
6
|
+
name: string;
|
|
7
|
+
data: number[];
|
|
8
|
+
color?: string;
|
|
9
|
+
negativeColor?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class NileAreaNegativeChart extends NileElement {
|
|
12
|
+
static styles: CSSResultGroup;
|
|
13
|
+
private _hc;
|
|
14
|
+
private chart;
|
|
15
|
+
private resizeObserver;
|
|
16
|
+
private chartContainer;
|
|
17
|
+
config: SeparatedChartConfigInputType | null;
|
|
18
|
+
chartTitle: string;
|
|
19
|
+
chartSubtitle: string;
|
|
20
|
+
data: AreaNegativeSeriesData[];
|
|
21
|
+
categories: string[];
|
|
22
|
+
options: Highcharts.Options;
|
|
23
|
+
loading: boolean;
|
|
24
|
+
height: string;
|
|
25
|
+
yAxisTitle: string;
|
|
26
|
+
threshold: number;
|
|
27
|
+
private applyConfig;
|
|
28
|
+
connectedCallback(): void;
|
|
29
|
+
disconnectedCallback(): void;
|
|
30
|
+
protected firstUpdated(): void;
|
|
31
|
+
protected updated(changedProperties: PropertyValues): void;
|
|
32
|
+
private setupResizeObserver;
|
|
33
|
+
private buildOptions;
|
|
34
|
+
private initChart;
|
|
35
|
+
private destroyChart;
|
|
36
|
+
render(): TemplateResult;
|
|
37
|
+
}
|
|
38
|
+
declare global {
|
|
39
|
+
interface HTMLElementTagNameMap {
|
|
40
|
+
'nile-area-negative-chart': NileAreaNegativeChart;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
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-area-negative-chart.css.js';
|
|
9
|
+
let NileAreaNegativeChart = class NileAreaNegativeChart 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.threshold = 0;
|
|
25
|
+
}
|
|
26
|
+
applyConfig(cfg) {
|
|
27
|
+
applySeparatedChartConfig(this, cfg);
|
|
28
|
+
}
|
|
29
|
+
connectedCallback() {
|
|
30
|
+
super.connectedCallback();
|
|
31
|
+
if (this.config)
|
|
32
|
+
this.applyConfig(this.config);
|
|
33
|
+
}
|
|
34
|
+
disconnectedCallback() {
|
|
35
|
+
super.disconnectedCallback();
|
|
36
|
+
this.destroyChart();
|
|
37
|
+
this.resizeObserver?.disconnect();
|
|
38
|
+
this.resizeObserver = null;
|
|
39
|
+
}
|
|
40
|
+
firstUpdated() {
|
|
41
|
+
this.initChart();
|
|
42
|
+
this.setupResizeObserver();
|
|
43
|
+
}
|
|
44
|
+
updated(changedProperties) {
|
|
45
|
+
if (changedProperties.has('config') && this.config) {
|
|
46
|
+
this.applyConfig(this.config);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const props = [
|
|
50
|
+
'data',
|
|
51
|
+
'categories',
|
|
52
|
+
'chartTitle',
|
|
53
|
+
'chartSubtitle',
|
|
54
|
+
'options',
|
|
55
|
+
'height',
|
|
56
|
+
'yAxisTitle',
|
|
57
|
+
'threshold',
|
|
58
|
+
'loading',
|
|
59
|
+
];
|
|
60
|
+
if (!props.some(p => changedProperties.has(p)))
|
|
61
|
+
return;
|
|
62
|
+
if (this.loading) {
|
|
63
|
+
this.destroyChart();
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (this.chart) {
|
|
67
|
+
this.chart.update(this.buildOptions(), true, true);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
this.initChart();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
setupResizeObserver() {
|
|
74
|
+
if (!this.chartContainer)
|
|
75
|
+
return;
|
|
76
|
+
this.resizeObserver = new ResizeObserver(() => this.chart?.reflow());
|
|
77
|
+
this.resizeObserver.observe(this.chartContainer);
|
|
78
|
+
}
|
|
79
|
+
buildOptions() {
|
|
80
|
+
const self = this;
|
|
81
|
+
return deepMerge({
|
|
82
|
+
chart: { type: 'area', height: this.height },
|
|
83
|
+
title: { text: this.chartTitle || undefined },
|
|
84
|
+
subtitle: { text: this.chartSubtitle || undefined },
|
|
85
|
+
xAxis: { categories: this.categories },
|
|
86
|
+
yAxis: { title: { text: this.yAxisTitle || undefined } },
|
|
87
|
+
tooltip: { shared: true },
|
|
88
|
+
plotOptions: {
|
|
89
|
+
area: {
|
|
90
|
+
threshold: this.threshold,
|
|
91
|
+
fillOpacity: 0.35,
|
|
92
|
+
},
|
|
93
|
+
series: {
|
|
94
|
+
cursor: 'pointer',
|
|
95
|
+
point: {
|
|
96
|
+
events: {
|
|
97
|
+
click() {
|
|
98
|
+
self.emit('nile-chart-click', {
|
|
99
|
+
point: this,
|
|
100
|
+
category: this.category,
|
|
101
|
+
value: this.y,
|
|
102
|
+
seriesName: this.series.name,
|
|
103
|
+
});
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
series: this.data.map(s => ({
|
|
110
|
+
type: 'area',
|
|
111
|
+
name: s.name,
|
|
112
|
+
data: s.data,
|
|
113
|
+
color: s.color,
|
|
114
|
+
negativeColor: s.negativeColor,
|
|
115
|
+
})),
|
|
116
|
+
credits: { enabled: false },
|
|
117
|
+
}, this.options);
|
|
118
|
+
}
|
|
119
|
+
async initChart() {
|
|
120
|
+
if (this.loading || !this.chartContainer)
|
|
121
|
+
return;
|
|
122
|
+
if (!this._hc)
|
|
123
|
+
this._hc = await getHighcharts();
|
|
124
|
+
this.chart = this._hc.chart(this.chartContainer, this.buildOptions());
|
|
125
|
+
this.emit('nile-chart-ready', { chart: this.chart });
|
|
126
|
+
}
|
|
127
|
+
destroyChart() {
|
|
128
|
+
if (this.chart) {
|
|
129
|
+
this.chart.destroy();
|
|
130
|
+
this.chart = null;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
render() {
|
|
134
|
+
if (this.loading) {
|
|
135
|
+
return html `<div class="chart-loading" style="height:${this.height}">Loading...</div>`;
|
|
136
|
+
}
|
|
137
|
+
return html `<div class="chart-container"></div>`;
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
NileAreaNegativeChart.styles = styles;
|
|
141
|
+
__decorate([
|
|
142
|
+
query('.chart-container')
|
|
143
|
+
], NileAreaNegativeChart.prototype, "chartContainer", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
property({ type: Object })
|
|
146
|
+
], NileAreaNegativeChart.prototype, "config", void 0);
|
|
147
|
+
__decorate([
|
|
148
|
+
property({ type: String, attribute: 'chart-title' })
|
|
149
|
+
], NileAreaNegativeChart.prototype, "chartTitle", void 0);
|
|
150
|
+
__decorate([
|
|
151
|
+
property({ type: String, attribute: 'chart-subtitle' })
|
|
152
|
+
], NileAreaNegativeChart.prototype, "chartSubtitle", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
property({ type: Array })
|
|
155
|
+
], NileAreaNegativeChart.prototype, "data", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
property({ type: Array })
|
|
158
|
+
], NileAreaNegativeChart.prototype, "categories", void 0);
|
|
159
|
+
__decorate([
|
|
160
|
+
property({ type: Object })
|
|
161
|
+
], NileAreaNegativeChart.prototype, "options", void 0);
|
|
162
|
+
__decorate([
|
|
163
|
+
property({ type: Boolean, reflect: true })
|
|
164
|
+
], NileAreaNegativeChart.prototype, "loading", void 0);
|
|
165
|
+
__decorate([
|
|
166
|
+
property({ type: String })
|
|
167
|
+
], NileAreaNegativeChart.prototype, "height", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
property({ type: String, attribute: 'y-axis-title' })
|
|
170
|
+
], NileAreaNegativeChart.prototype, "yAxisTitle", void 0);
|
|
171
|
+
__decorate([
|
|
172
|
+
property({ type: Number })
|
|
173
|
+
], NileAreaNegativeChart.prototype, "threshold", void 0);
|
|
174
|
+
NileAreaNegativeChart = __decorate([
|
|
175
|
+
customElement('nile-area-negative-chart')
|
|
176
|
+
], NileAreaNegativeChart);
|
|
177
|
+
export { NileAreaNegativeChart };
|
|
178
|
+
//# sourceMappingURL=nile-area-negative-chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|