@nova-ui/charts 12.0.17 → 13.0.1-3938
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/bundles/css/styles.css +3 -1
- package/chart/chart.component.d.ts +3 -0
- package/chart-collection/chart-collection-id.directive.d.ts +3 -0
- package/chart-collection/chart-collection.service.d.ts +3 -0
- package/chart-donut-content/chart-donut-content.component.d.ts +3 -0
- package/chart-marker/chart-marker.component.d.ts +3 -0
- package/chart-popover/chart-popover.component.d.ts +3 -0
- package/chart-tooltips/chart-tooltip.component.d.ts +3 -0
- package/chart-tooltips/chart-tooltip.directive.d.ts +3 -0
- package/chart-tooltips/chart-tooltips.component.d.ts +3 -0
- package/charts.module.d.ts +18 -0
- package/core/plugins/chart-popover-plugin.d.ts +2 -2
- package/core/plugins/tooltips/chart-tooltips-plugin.d.ts +2 -2
- package/esm2020/chart/chart.component.mjs +104 -0
- package/esm2020/chart-collection/chart-collection-id.directive.mjs +56 -0
- package/esm2020/chart-collection/chart-collection.service.mjs +45 -0
- package/{esm2015/chart-collection/public-api.js → esm2020/chart-collection/public-api.mjs} +0 -0
- package/{esm2015/chart-donut-content/chart-donut-content.component.js → esm2020/chart-donut-content/chart-donut-content.component.mjs} +12 -13
- package/esm2020/chart-marker/chart-marker.component.mjs +94 -0
- package/esm2020/chart-popover/chart-popover.component.mjs +85 -0
- package/esm2020/chart-tooltips/chart-tooltip.component.mjs +50 -0
- package/esm2020/chart-tooltips/chart-tooltip.directive.mjs +96 -0
- package/esm2020/chart-tooltips/chart-tooltips.component.mjs +193 -0
- package/esm2020/charts.module.mjs +101 -0
- package/{esm2015/constants.js → esm2020/constants.mjs} +0 -0
- package/esm2020/core/chart-assists/chart-assist.mjs +352 -0
- package/{esm2015/core/chart-assists/public-api.js → esm2020/core/chart-assists/public-api.mjs} +0 -0
- package/{esm2015/core/chart-assists/spark-chart-assist.js → esm2020/core/chart-assists/spark-chart-assist.mjs} +0 -0
- package/{esm2015/core/chart-assists/types.js → esm2020/core/chart-assists/types.mjs} +0 -0
- package/esm2020/core/chart-collection.mjs +145 -0
- package/esm2020/core/chart.mjs +197 -0
- package/{esm2015/core/common/chart-plugin.js → esm2020/core/common/chart-plugin.mjs} +0 -0
- package/esm2020/core/common/data-manager.mjs +108 -0
- package/{esm2015/core/common/data-series.js → esm2020/core/common/data-series.mjs} +0 -0
- package/{esm2015/core/common/event-bus.js → esm2020/core/common/event-bus.mjs} +0 -0
- package/{esm2015/core/common/lasagna.js → esm2020/core/common/lasagna.mjs} +0 -0
- package/esm2020/core/common/mouse-interactive-area.mjs +133 -0
- package/{esm2015/core/common/palette/chart-palette.js → esm2020/core/common/palette/chart-palette.mjs} +0 -0
- package/{esm2015/core/common/palette/color.helper.js → esm2020/core/common/palette/color.helper.mjs} +0 -0
- package/{esm2015/core/common/palette/default-providers.js → esm2020/core/common/palette/default-providers.mjs} +0 -0
- package/{esm2015/core/common/palette/mapped-value-provider.js → esm2020/core/common/palette/mapped-value-provider.mjs} +0 -0
- package/{esm2015/core/common/palette/markers/path-marker.js → esm2020/core/common/palette/markers/path-marker.mjs} +0 -0
- package/{esm2015/core/common/palette/markers/svg-marker.js → esm2020/core/common/palette/markers/svg-marker.mjs} +0 -0
- package/esm2020/core/common/palette/palettes.mjs +147 -0
- package/{esm2015/core/common/palette/processed-color-provider.js → esm2020/core/common/palette/processed-color-provider.mjs} +0 -0
- package/{esm2015/core/common/palette/public-api.js → esm2020/core/common/palette/public-api.mjs} +0 -0
- package/{esm2015/core/common/palette/sequential-chart-marker-provider.js → esm2020/core/common/palette/sequential-chart-marker-provider.mjs} +0 -0
- package/{esm2015/core/common/palette/sequential-color-provider.js → esm2020/core/common/palette/sequential-color-provider.mjs} +0 -0
- package/{esm2015/core/common/palette/sequential-value-provider.js → esm2020/core/common/palette/sequential-value-provider.mjs} +0 -0
- package/{esm2015/core/common/palette/text-color-provider.js → esm2020/core/common/palette/text-color-provider.mjs} +0 -0
- package/{esm2015/core/common/public-api.js → esm2020/core/common/public-api.mjs} +0 -0
- package/{esm2015/core/common/render-engine.js → esm2020/core/common/render-engine.mjs} +0 -0
- package/esm2020/core/common/renderer.mjs +184 -0
- package/{esm2015/core/common/scales/band-scale.js → esm2020/core/common/scales/band-scale.mjs} +0 -0
- package/{esm2015/core/common/scales/constants.js → esm2020/core/common/scales/constants.mjs} +0 -0
- package/{esm2015/core/common/scales/domain-calculation/automatic-domain.js → esm2020/core/common/scales/domain-calculation/automatic-domain.mjs} +0 -0
- package/{esm2015/core/common/scales/domain-calculation/domain-with-auxiliary-series.js → esm2020/core/common/scales/domain-calculation/domain-with-auxiliary-series.mjs} +0 -0
- package/{esm2015/core/common/scales/domain-calculation/domain-with-ticks.js → esm2020/core/common/scales/domain-calculation/domain-with-ticks.mjs} +0 -0
- package/{esm2015/core/common/scales/domain-calculation/merge-domains.js → esm2020/core/common/scales/domain-calculation/merge-domains.mjs} +0 -0
- package/esm2020/core/common/scales/formatters/datetime-formatter.mjs +40 -0
- package/{esm2015/core/common/scales/formatters/public-api.js → esm2020/core/common/scales/formatters/public-api.mjs} +0 -0
- package/{esm2015/core/common/scales/helpers/convert.js → esm2020/core/common/scales/helpers/convert.mjs} +0 -0
- package/{esm2015/core/common/scales/helpers/domain.js → esm2020/core/common/scales/helpers/domain.mjs} +0 -0
- package/{esm2015/core/common/scales/helpers/invert.js → esm2020/core/common/scales/helpers/invert.mjs} +0 -0
- package/{esm2015/core/common/scales/helpers/is-in-range.js → esm2020/core/common/scales/helpers/is-in-range.mjs} +0 -0
- package/esm2020/core/common/scales/linear-scale.mjs +46 -0
- package/{esm2015/core/common/scales/noop-scale.js → esm2020/core/common/scales/noop-scale.mjs} +0 -0
- package/{esm2015/core/common/scales/point-scale.js → esm2020/core/common/scales/point-scale.mjs} +0 -0
- package/{esm2015/core/common/scales/public-api.js → esm2020/core/common/scales/public-api.mjs} +0 -0
- package/{esm2015/core/common/scales/scale.js → esm2020/core/common/scales/scale.mjs} +0 -0
- package/{esm2015/core/common/scales/time-interval-scale.js → esm2020/core/common/scales/time-interval-scale.mjs} +0 -0
- package/{esm2015/core/common/scales/time-scale.js → esm2020/core/common/scales/time-scale.mjs} +0 -0
- package/{esm2015/core/common/scales/types.js → esm2020/core/common/scales/types.mjs} +0 -0
- package/{esm2015/core/common/types.js → esm2020/core/common/types.mjs} +0 -0
- package/{esm2015/core/common/utility.service.js → esm2020/core/common/utility.service.mjs} +2 -3
- package/{esm2015/core/grid/config/area-grid-config.js → esm2020/core/grid/config/area-grid-config.mjs} +0 -0
- package/{esm2015/core/grid/config/axis-config.js → esm2020/core/grid/config/axis-config.mjs} +0 -0
- package/{esm2015/core/grid/config/bar-grid-config.js → esm2020/core/grid/config/bar-grid-config.mjs} +0 -0
- package/{esm2015/core/grid/config/bar-horizontal-grid-config.js → esm2020/core/grid/config/bar-horizontal-grid-config.mjs} +0 -0
- package/{esm2015/core/grid/config/bar-status-grid-config.js → esm2020/core/grid/config/bar-status-grid-config.mjs} +0 -0
- package/{esm2015/core/grid/config/border-config.js → esm2020/core/grid/config/border-config.mjs} +0 -0
- package/{esm2015/core/grid/config/dimension-config.js → esm2020/core/grid/config/dimension-config.mjs} +0 -0
- package/{esm2015/core/grid/config/grid-config.js → esm2020/core/grid/config/grid-config.mjs} +0 -0
- package/{esm2015/core/grid/config/linear-gauge-grid-config-fn.js → esm2020/core/grid/config/linear-gauge-grid-config-fn.mjs} +0 -0
- package/{esm2015/core/grid/config/public-api.js → esm2020/core/grid/config/public-api.mjs} +0 -0
- package/{esm2015/core/grid/config/spark-chart-grid-config.js → esm2020/core/grid/config/spark-chart-grid-config.mjs} +0 -0
- package/{esm2015/core/grid/config/xy-grid-config.js → esm2020/core/grid/config/xy-grid-config.mjs} +0 -0
- package/esm2020/core/grid/default-text-overflow-handler.mjs +56 -0
- package/esm2020/core/grid/grid.mjs +309 -0
- package/{esm2015/core/grid/public-api.js → esm2020/core/grid/public-api.mjs} +0 -0
- package/{esm2015/core/grid/radial-grid.js → esm2020/core/grid/radial-grid.mjs} +0 -0
- package/{esm2015/core/grid/types.js → esm2020/core/grid/types.mjs} +0 -0
- package/esm2020/core/grid/xy-grid.mjs +768 -0
- package/{esm2015/core/plugins/chart-donut-content-plugin.js → esm2020/core/plugins/chart-donut-content-plugin.mjs} +0 -0
- package/esm2020/core/plugins/chart-popover-plugin.mjs +134 -0
- package/{esm2015/core/plugins/gauge/constants.js → esm2020/core/plugins/gauge/constants.mjs} +0 -0
- package/esm2020/core/plugins/gauge/donut-gauge-labels-plugin.mjs +156 -0
- package/esm2020/core/plugins/gauge/linear-gauge-labels-plugin.mjs +168 -0
- package/{esm2015/core/plugins/gauge/public-api.js → esm2020/core/plugins/gauge/public-api.mjs} +0 -0
- package/{esm2015/core/plugins/gauge/types.js → esm2020/core/plugins/gauge/types.mjs} +0 -0
- package/esm2020/core/plugins/interaction/interaction-label-plugin.mjs +164 -0
- package/{esm2015/core/plugins/interaction/interaction-line-plugin.js → esm2020/core/plugins/interaction/interaction-line-plugin.mjs} +1 -1
- package/{esm2015/core/plugins/interaction/public-api.js → esm2020/core/plugins/interaction/public-api.mjs} +0 -0
- package/{esm2015/core/plugins/mouse-interactive-area-plugin.js → esm2020/core/plugins/mouse-interactive-area-plugin.mjs} +1 -1
- package/{esm2015/core/plugins/public-api.js → esm2020/core/plugins/public-api.mjs} +0 -0
- package/esm2020/core/plugins/radial-popover-plugin.mjs +47 -0
- package/{esm2015/core/plugins/render-engine-plugin.js → esm2020/core/plugins/render-engine-plugin.mjs} +1 -1
- package/{esm2015/core/plugins/tooltips/bar-tooltips-plugin.js → esm2020/core/plugins/tooltips/bar-tooltips-plugin.mjs} +0 -0
- package/esm2020/core/plugins/tooltips/chart-tooltips-plugin.mjs +200 -0
- package/{esm2015/core/plugins/tooltips/index.js → esm2020/core/plugins/tooltips/index.mjs} +0 -0
- package/{esm2015/core/plugins/tooltips/radial-tooltips-plugin.js → esm2020/core/plugins/tooltips/radial-tooltips-plugin.mjs} +0 -0
- package/{esm2015/core/plugins/types.js → esm2020/core/plugins/types.mjs} +0 -0
- package/{esm2015/core/plugins/zoom-plugin.js → esm2020/core/plugins/zoom-plugin.mjs} +1 -1
- package/{esm2015/core/public-api.js → esm2020/core/public-api.mjs} +0 -0
- package/{esm2015/core/types.js → esm2020/core/types.mjs} +0 -0
- package/{esm2015/gauge/constants.js → esm2020/gauge/constants.mjs} +0 -0
- package/{esm2015/gauge/gauge-util.js → esm2020/gauge/gauge-util.mjs} +77 -54
- package/{esm2015/gauge/public-api.js → esm2020/gauge/public-api.mjs} +0 -0
- package/{esm2015/gauge/types.js → esm2020/gauge/types.mjs} +0 -0
- package/esm2020/legend/legend-series/legend-series.component.mjs +159 -0
- package/esm2020/legend/legend-tile/basic-legend-tile/basic-legend-tile.component.mjs +30 -0
- package/{esm2015/legend/legend-tile/public-api.js → esm2020/legend/legend-tile/public-api.mjs} +0 -0
- package/esm2020/legend/legend-tile/rich-legend-tile/rich-legend-tile.component.mjs +76 -0
- package/esm2020/legend/legend.component.mjs +69 -0
- package/{esm2015/legend/public-api.js → esm2020/legend/public-api.mjs} +0 -0
- package/{esm2015/legend/types.js → esm2020/legend/types.mjs} +0 -0
- package/{esm2015/nova-ui-charts.js → esm2020/nova-ui-charts.mjs} +0 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
- package/{esm2015/renderers/accessors/noop-accessors.js → esm2020/renderers/accessors/noop-accessors.mjs} +0 -0
- package/{esm2015/renderers/accessors/public-api.js → esm2020/renderers/accessors/public-api.mjs} +0 -0
- package/{esm2015/renderers/accessors/rectangle-accessors.js → esm2020/renderers/accessors/rectangle-accessors.mjs} +0 -0
- package/{esm2015/renderers/accessors/xy-accessors.js → esm2020/renderers/accessors/xy-accessors.mjs} +0 -0
- package/esm2020/renderers/area/area-accessors.mjs +43 -0
- package/{esm2015/renderers/area/area-grid.js → esm2020/renderers/area/area-grid.mjs} +0 -0
- package/esm2020/renderers/area/area-renderer.mjs +163 -0
- package/{esm2015/renderers/area/public-api.js → esm2020/renderers/area/public-api.mjs} +0 -0
- package/{esm2015/renderers/area/stacked-area-accessors.js → esm2020/renderers/area/stacked-area-accessors.mjs} +0 -0
- package/esm2020/renderers/area/stacked-area-preprocessor.mjs +60 -0
- package/esm2020/renderers/area/stacked-percentage-area-preprocessor.mjs +83 -0
- package/{esm2015/renderers/bar/accessors/bar-accessors-fn.js → esm2020/renderers/bar/accessors/bar-accessors-fn.mjs} +0 -0
- package/{esm2015/renderers/bar/accessors/bar-accessors.js → esm2020/renderers/bar/accessors/bar-accessors.mjs} +0 -0
- package/esm2020/renderers/bar/accessors/horizontal-bar-accessors.mjs +36 -0
- package/{esm2015/renderers/bar/accessors/public-api.js → esm2020/renderers/bar/accessors/public-api.mjs} +0 -0
- package/{esm2015/renderers/bar/accessors/status-accessors-fn.js → esm2020/renderers/bar/accessors/status-accessors-fn.mjs} +0 -0
- package/{esm2015/renderers/bar/accessors/status-accessors.js → esm2020/renderers/bar/accessors/status-accessors.mjs} +0 -0
- package/esm2020/renderers/bar/accessors/vertical-bar-accessors.mjs +36 -0
- package/{esm2015/renderers/bar/bar-grid.js → esm2020/renderers/bar/bar-grid.mjs} +0 -0
- package/esm2020/renderers/bar/bar-renderer.mjs +251 -0
- package/{esm2015/renderers/bar/bar-scales.js → esm2020/renderers/bar/bar-scales.mjs} +0 -0
- package/esm2020/renderers/bar/highlight-strategies/bar-highlight-strategy.mjs +137 -0
- package/esm2020/renderers/bar/highlight-strategies/bar-series-highlight-strategy.mjs +82 -0
- package/{esm2015/renderers/bar/highlight-strategies/public-api.js → esm2020/renderers/bar/highlight-strategies/public-api.mjs} +0 -0
- package/{esm2015/renderers/bar/linear-gauge-renderer-config.js → esm2020/renderers/bar/linear-gauge-renderer-config.mjs} +0 -0
- package/esm2020/renderers/bar/linear-gauge-thresholds-renderer.mjs +77 -0
- package/esm2020/renderers/bar/preprocessor-utils.mjs +32 -0
- package/{esm2015/renderers/bar/public-api.js → esm2020/renderers/bar/public-api.mjs} +0 -0
- package/esm2020/renderers/bar/stacked-preprocessor.mjs +66 -0
- package/{esm2015/renderers/bar/types.js → esm2020/renderers/bar/types.mjs} +0 -0
- package/{esm2015/renderers/constants.js → esm2020/renderers/constants.mjs} +0 -0
- package/esm2020/renderers/line/calculate-missing-data.mjs +66 -0
- package/{esm2015/renderers/line/interaction-strategies/line-select-series-interaction-strategy.js → esm2020/renderers/line/interaction-strategies/line-select-series-interaction-strategy.mjs} +0 -0
- package/{esm2015/renderers/line/interaction-strategies/public-api.js → esm2020/renderers/line/interaction-strategies/public-api.mjs} +0 -0
- package/{esm2015/renderers/line/line-accessors.js → esm2020/renderers/line/line-accessors.mjs} +0 -0
- package/esm2020/renderers/line/line-renderer.mjs +210 -0
- package/{esm2015/renderers/line/missing-data-line-renderer-config.js → esm2020/renderers/line/missing-data-line-renderer-config.mjs} +0 -0
- package/{esm2015/renderers/line/public-api.js → esm2020/renderers/line/public-api.mjs} +0 -0
- package/esm2020/renderers/marker-utils.mjs +149 -0
- package/{esm2015/renderers/noop-renderer.js → esm2020/renderers/noop-renderer.mjs} +0 -0
- package/{esm2015/renderers/public-api.js → esm2020/renderers/public-api.mjs} +0 -0
- package/{esm2015/renderers/radial/accessors/radial-accessors.js → esm2020/renderers/radial/accessors/radial-accessors.mjs} +0 -0
- package/{esm2015/renderers/radial/gauge/donut-gauge-renderer-config.js → esm2020/renderers/radial/gauge/donut-gauge-renderer-config.mjs} +0 -0
- package/{esm2015/renderers/radial/gauge/donut-gauge-rendering-util.js → esm2020/renderers/radial/gauge/donut-gauge-rendering-util.mjs} +0 -0
- package/{esm2015/renderers/radial/gauge/donut-gauge-thresholds-renderer.js → esm2020/renderers/radial/gauge/donut-gauge-thresholds-renderer.mjs} +0 -0
- package/{esm2015/renderers/radial/pie-renderer.js → esm2020/renderers/radial/pie-renderer.mjs} +0 -0
- package/{esm2015/renderers/radial/public-api.js → esm2020/renderers/radial/public-api.mjs} +0 -0
- package/{esm2015/renderers/radial/radial-grid-fn.js → esm2020/renderers/radial/radial-grid-fn.mjs} +0 -0
- package/esm2020/renderers/radial/radial-preprocessor.mjs +54 -0
- package/esm2020/renderers/radial/radial-renderer.mjs +180 -0
- package/{esm2015/renderers/radial/radial-scales.js → esm2020/renderers/radial/radial-scales.mjs} +0 -0
- package/{esm2015/renderers/side-indicator-renderer.js → esm2020/renderers/side-indicator-renderer.mjs} +0 -0
- package/{esm2015/renderers/types.js → esm2020/renderers/types.mjs} +0 -0
- package/esm2020/renderers/xy-renderer.mjs +54 -0
- package/{esm2015/thresholds/public-api.js → esm2020/thresholds/public-api.mjs} +0 -0
- package/esm2020/thresholds/thresholds-service.mjs +391 -0
- package/{esm2015/thresholds/thresholds-summary-grid-config.js → esm2020/thresholds/thresholds-summary-grid-config.mjs} +0 -0
- package/{esm2015/thresholds/thresholds-top-grid-config.js → esm2020/thresholds/thresholds-top-grid-config.mjs} +0 -0
- package/{esm2015/thresholds/types.js → esm2020/thresholds/types.mjs} +0 -0
- package/fesm2015/{nova-ui-charts.js → nova-ui-charts.mjs} +1264 -1252
- package/fesm2015/nova-ui-charts.mjs.map +1 -0
- package/fesm2020/nova-ui-charts.mjs +9922 -0
- package/fesm2020/nova-ui-charts.mjs.map +1 -0
- package/legend/legend-series/legend-series.component.d.ts +3 -0
- package/legend/legend-tile/basic-legend-tile/basic-legend-tile.component.d.ts +3 -0
- package/legend/legend-tile/rich-legend-tile/rich-legend-tile.component.d.ts +3 -0
- package/legend/legend.component.d.ts +3 -0
- package/nova-ui-charts.d.ts +1 -0
- package/package.json +33 -14
- package/renderers/marker-utils.d.ts +2 -2
- package/sdk/atoms/chart/donut-chart-test.po.js +1 -1
- package/sdk/atoms/chart/donut-chart-test.po.js.map +1 -1
- package/sdk/atoms/chart/line-chart-test.po.js +1 -1
- package/sdk/atoms/chart/line-chart-test.po.js.map +1 -1
- package/sdk/atoms/chart/pie-chart-test.po.js +1 -1
- package/sdk/atoms/chart/pie-chart-test.po.js.map +1 -1
- package/sdk/atoms/chart/spark-chart-test.po.js +2 -2
- package/sdk/atoms/chart/spark-chart-test.po.js.map +1 -1
- package/sdk/atoms/chart/test.po.js +1 -1
- package/sdk/atoms/chart/test.po.js.map +1 -1
- package/sdk/atoms/chart/thresholds-summary-test.po.js +4 -4
- package/sdk/atoms/chart/thresholds-summary-test.po.js.map +1 -1
- package/sdk/atoms/chart/time-frame-bar-test.po.js +3 -3
- package/sdk/atoms/chart/time-frame-bar-test.po.js.map +1 -1
- package/sdk/locale/messages.en.xlf +118 -121
- package/thresholds/thresholds-service.d.ts +3 -0
- package/bundles/nova-ui-charts.umd.js +0 -11049
- package/bundles/nova-ui-charts.umd.js.map +0 -1
- package/esm2015/chart/chart.component.js +0 -102
- package/esm2015/chart-collection/chart-collection-id.directive.js +0 -52
- package/esm2015/chart-collection/chart-collection.service.js +0 -42
- package/esm2015/chart-marker/chart-marker.component.js +0 -93
- package/esm2015/chart-popover/chart-popover.component.js +0 -82
- package/esm2015/chart-tooltips/chart-tooltip.component.js +0 -44
- package/esm2015/chart-tooltips/chart-tooltip.directive.js +0 -95
- package/esm2015/chart-tooltips/chart-tooltips.component.js +0 -192
- package/esm2015/charts.module.js +0 -74
- package/esm2015/core/chart-assists/chart-assist.js +0 -353
- package/esm2015/core/chart-collection.js +0 -145
- package/esm2015/core/chart.js +0 -195
- package/esm2015/core/common/data-manager.js +0 -109
- package/esm2015/core/common/mouse-interactive-area.js +0 -134
- package/esm2015/core/common/palette/palettes.js +0 -149
- package/esm2015/core/common/renderer.js +0 -185
- package/esm2015/core/common/scales/formatters/datetime-formatter.js +0 -43
- package/esm2015/core/common/scales/linear-scale.js +0 -46
- package/esm2015/core/grid/default-text-overflow-handler.js +0 -57
- package/esm2015/core/grid/grid.js +0 -309
- package/esm2015/core/grid/xy-grid.js +0 -773
- package/esm2015/core/plugins/chart-popover-plugin.js +0 -136
- package/esm2015/core/plugins/gauge/donut-gauge-labels-plugin.js +0 -157
- package/esm2015/core/plugins/gauge/linear-gauge-labels-plugin.js +0 -171
- package/esm2015/core/plugins/interaction/interaction-label-plugin.js +0 -164
- package/esm2015/core/plugins/radial-popover-plugin.js +0 -48
- package/esm2015/core/plugins/tooltips/chart-tooltips-plugin.js +0 -202
- package/esm2015/legend/legend-series/legend-series.component.js +0 -142
- package/esm2015/legend/legend-tile/basic-legend-tile/basic-legend-tile.component.js +0 -31
- package/esm2015/legend/legend-tile/rich-legend-tile/rich-legend-tile.component.js +0 -71
- package/esm2015/legend/legend.component.js +0 -67
- package/esm2015/renderers/area/area-accessors.js +0 -43
- package/esm2015/renderers/area/area-renderer.js +0 -178
- package/esm2015/renderers/area/stacked-area-preprocessor.js +0 -60
- package/esm2015/renderers/area/stacked-percentage-area-preprocessor.js +0 -83
- package/esm2015/renderers/bar/accessors/horizontal-bar-accessors.js +0 -29
- package/esm2015/renderers/bar/accessors/vertical-bar-accessors.js +0 -29
- package/esm2015/renderers/bar/bar-renderer.js +0 -265
- package/esm2015/renderers/bar/highlight-strategies/bar-highlight-strategy.js +0 -138
- package/esm2015/renderers/bar/highlight-strategies/bar-series-highlight-strategy.js +0 -82
- package/esm2015/renderers/bar/linear-gauge-thresholds-renderer.js +0 -83
- package/esm2015/renderers/bar/preprocessor-utils.js +0 -32
- package/esm2015/renderers/bar/stacked-preprocessor.js +0 -63
- package/esm2015/renderers/line/calculate-missing-data.js +0 -66
- package/esm2015/renderers/line/line-renderer.js +0 -216
- package/esm2015/renderers/marker-utils.js +0 -147
- package/esm2015/renderers/radial/radial-preprocessor.js +0 -48
- package/esm2015/renderers/radial/radial-renderer.js +0 -183
- package/esm2015/renderers/xy-renderer.js +0 -55
- package/esm2015/thresholds/thresholds-service.js +0 -393
- package/fesm2015/nova-ui-charts.js.map +0 -1
- package/nova-ui-charts.metadata.json +0 -1
|
@@ -1,39 +1,42 @@
|
|
|
1
|
-
import { Overlay, OverlayPositionBuilder, ScrollStrategyOptions, OverlayModule } from '@angular/cdk/overlay';
|
|
2
1
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { Component, ChangeDetectionStrategy, Input, Directive, ViewChildren, EventEmitter, Output, ViewChild, InjectionToken, Injectable, Inject, forwardRef, ViewEncapsulation, Optional, Host, HostBinding, HostListener, NgModule } from '@angular/core';
|
|
5
4
|
import { trigger, transition, style, animate } from '@angular/animations';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { extent, min, max, bisect } from 'd3-array';
|
|
10
|
-
import each from 'lodash/each';
|
|
11
|
-
import get from 'lodash/get';
|
|
5
|
+
import * as i1 from '@angular/common';
|
|
6
|
+
import * as i1$1 from '@angular/cdk/overlay';
|
|
7
|
+
import { OverlayModule } from '@angular/cdk/overlay';
|
|
12
8
|
import { forceCollide, forceSimulation } from 'd3-force';
|
|
13
9
|
import { select, local, event, mouse } from 'd3-selection';
|
|
10
|
+
import each from 'lodash/each';
|
|
14
11
|
import isEqual from 'lodash/isEqual';
|
|
15
12
|
import isNil from 'lodash/isNil';
|
|
13
|
+
import { Subject, BehaviorSubject, of } from 'rxjs';
|
|
16
14
|
import { takeUntil, filter as filter$1, map, switchMap } from 'rxjs/operators';
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import { PopoverComponent, UtilService, LoggerService, NuiCommonModule, NuiIconModule, NuiPopoverModule } from '@nova-ui/bits';
|
|
15
|
+
import * as i1$2 from '@nova-ui/bits';
|
|
16
|
+
import { PopoverComponent, UtilService, NuiCommonModule, NuiIconModule, NuiPopoverModule } from '@nova-ui/bits';
|
|
20
17
|
import isFunction from 'lodash/isFunction';
|
|
21
18
|
import 'd3-selection-multi';
|
|
19
|
+
import isUndefined from 'lodash/isUndefined';
|
|
22
20
|
import findKey from 'lodash/findKey';
|
|
23
21
|
import debounce from 'lodash/debounce';
|
|
24
22
|
import isEmpty from 'lodash/isEmpty';
|
|
25
23
|
import cloneDeep from 'lodash/cloneDeep';
|
|
26
24
|
import sortBy from 'lodash/sortBy';
|
|
27
25
|
import unionWith from 'lodash/unionWith';
|
|
26
|
+
import values from 'lodash/values';
|
|
28
27
|
import { rgb } from 'd3-color';
|
|
29
28
|
import isArray from 'lodash/isArray';
|
|
30
29
|
import startsWith from 'lodash/startsWith';
|
|
31
30
|
import trim from 'lodash/trim';
|
|
32
31
|
import trimEnd from 'lodash/trimEnd';
|
|
33
32
|
import trimStart from 'lodash/trimStart';
|
|
33
|
+
import { extent, min, max, bisect } from 'd3-array';
|
|
34
|
+
import defaultsDeep from 'lodash/defaultsDeep';
|
|
34
35
|
import flatten from 'lodash/flatten';
|
|
35
36
|
import uniq from 'lodash/uniq';
|
|
37
|
+
import get from 'lodash/get';
|
|
36
38
|
import identity from 'lodash/identity';
|
|
39
|
+
import { curveLinear, line, pie, arc, area } from 'd3-shape';
|
|
37
40
|
import filter from 'lodash/filter';
|
|
38
41
|
import includes from 'lodash/includes';
|
|
39
42
|
import keyBy from 'lodash/keyBy';
|
|
@@ -47,34 +50,38 @@ import orderBy from 'lodash/orderBy';
|
|
|
47
50
|
import unionBy from 'lodash/unionBy';
|
|
48
51
|
import { timeMinute, timeDay, timeMonth, timeYear } from 'd3-time';
|
|
49
52
|
import moment, { duration } from 'moment/moment';
|
|
53
|
+
import pickBy from 'lodash/pickBy';
|
|
50
54
|
import { brushX } from 'd3-brush';
|
|
51
55
|
import findIndex from 'lodash/findIndex';
|
|
52
56
|
|
|
53
57
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
54
58
|
class ChartTooltipComponent {
|
|
55
59
|
}
|
|
56
|
-
ChartTooltipComponent
|
|
57
|
-
{ type:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
ChartTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChartTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
61
|
+
ChartTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ChartTooltipComponent, selector: "nui-chart-tooltip", inputs: { template: "template" }, ngImport: i0, template: "<div>\n <div @tooltip class=\"nui-chart-tooltip px-2 py-1 nui-text-small\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </div>\n</div>\n", styles: [":host{display:block;pointer-events:none}.nui-chart-tooltip{background-color:var(--nui-color-bg-inverse,#111);color:var(--nui-color-text-inverse,#fff);line-height:normal}\n"], directives: [{ type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], animations: [
|
|
62
|
+
trigger("tooltip", [
|
|
63
|
+
transition(":enter", [
|
|
64
|
+
style({ opacity: 0 }),
|
|
65
|
+
animate(300, style({ opacity: 1 })),
|
|
66
|
+
]),
|
|
67
|
+
transition(":leave", [animate(300, style({ opacity: 0 }))]),
|
|
68
|
+
]),
|
|
69
|
+
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
70
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChartTooltipComponent, decorators: [{
|
|
71
|
+
type: Component,
|
|
72
|
+
args: [{ selector: "nui-chart-tooltip", changeDetection: ChangeDetectionStrategy.OnPush, animations: [
|
|
73
|
+
trigger("tooltip", [
|
|
74
|
+
transition(":enter", [
|
|
75
|
+
style({ opacity: 0 }),
|
|
76
|
+
animate(300, style({ opacity: 1 })),
|
|
77
|
+
]),
|
|
78
|
+
transition(":leave", [animate(300, style({ opacity: 0 }))]),
|
|
66
79
|
]),
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
},] }
|
|
72
|
-
];
|
|
73
|
-
ChartTooltipComponent.propDecorators = {
|
|
74
|
-
template: [{ type: Input }]
|
|
75
|
-
};
|
|
80
|
+
], template: "<div>\n <div @tooltip class=\"nui-chart-tooltip px-2 py-1 nui-text-small\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </div>\n</div>\n", styles: [":host{display:block;pointer-events:none}.nui-chart-tooltip{background-color:var(--nui-color-bg-inverse,#111);color:var(--nui-color-text-inverse,#fff);line-height:normal}\n"] }]
|
|
81
|
+
}], propDecorators: { template: [{
|
|
82
|
+
type: Input
|
|
83
|
+
}] } });
|
|
76
84
|
|
|
77
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
78
85
|
/** @ignore */
|
|
79
86
|
class ChartTooltipDirective {
|
|
80
87
|
constructor(overlay, overlayPositionBuilder, scrollStrategyOptions, elementRef) {
|
|
@@ -95,812 +102,83 @@ class ChartTooltipDirective {
|
|
|
95
102
|
scrollStrategy: this.scrollStrategyOptions.close(),
|
|
96
103
|
});
|
|
97
104
|
if (this.openRemoteControl) {
|
|
98
|
-
this.openSubscription = this.openRemoteControl.subscribe(() => {
|
|
99
|
-
this.show();
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
if (this.closeRemoteControl) {
|
|
103
|
-
this.closeSubscription = this.closeRemoteControl.subscribe(() => {
|
|
104
|
-
this.hide();
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
show() {
|
|
109
|
-
if (this.overlayRef.hasAttached()) {
|
|
110
|
-
this.positionStrategy.apply();
|
|
111
|
-
}
|
|
112
|
-
else {
|
|
113
|
-
const tooltipRef = this.overlayRef.attach(new ComponentPortal(ChartTooltipComponent));
|
|
114
|
-
tooltipRef.instance.template = this.template;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
hide() {
|
|
118
|
-
this.overlayRef.detach();
|
|
119
|
-
}
|
|
120
|
-
ngOnDestroy() {
|
|
121
|
-
this.hide();
|
|
122
|
-
if (this.openSubscription) {
|
|
123
|
-
this.openSubscription.unsubscribe();
|
|
124
|
-
}
|
|
125
|
-
if (this.closeSubscription) {
|
|
126
|
-
this.closeSubscription.unsubscribe();
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
getOverlayElement() {
|
|
130
|
-
return this.overlayRef.overlayElement;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
ChartTooltipDirective.decorators = [
|
|
134
|
-
{ type: Directive, args: [{ selector: "[nuiChartTooltip]" },] }
|
|
135
|
-
];
|
|
136
|
-
ChartTooltipDirective.ctorParameters = () => [
|
|
137
|
-
{ type: Overlay },
|
|
138
|
-
{ type: OverlayPositionBuilder },
|
|
139
|
-
{ type: ScrollStrategyOptions },
|
|
140
|
-
{ type: ElementRef }
|
|
141
|
-
];
|
|
142
|
-
ChartTooltipDirective.propDecorators = {
|
|
143
|
-
template: [{ type: Input }],
|
|
144
|
-
openRemoteControl: [{ type: Input }],
|
|
145
|
-
closeRemoteControl: [{ type: Input }],
|
|
146
|
-
positions: [{ type: Input }]
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
150
|
-
//
|
|
151
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
152
|
-
// of this software and associated documentation files (the "Software"), to
|
|
153
|
-
// deal in the Software without restriction, including without limitation the
|
|
154
|
-
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
155
|
-
// sell copies of the Software, and to permit persons to whom the Software is
|
|
156
|
-
// furnished to do so, subject to the following conditions:
|
|
157
|
-
//
|
|
158
|
-
// The above copyright notice and this permission notice shall be included in
|
|
159
|
-
// all copies or substantial portions of the Software.
|
|
160
|
-
//
|
|
161
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
162
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
163
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
164
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
165
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
166
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
167
|
-
// THE SOFTWARE.
|
|
168
|
-
var RenderState;
|
|
169
|
-
(function (RenderState) {
|
|
170
|
-
RenderState["hidden"] = "hidden";
|
|
171
|
-
RenderState["deemphasized"] = "deemphasized";
|
|
172
|
-
RenderState["emphasized"] = "emphasized";
|
|
173
|
-
RenderState["default"] = "default";
|
|
174
|
-
})(RenderState || (RenderState = {}));
|
|
175
|
-
var RenderLayerName;
|
|
176
|
-
(function (RenderLayerName) {
|
|
177
|
-
RenderLayerName["background"] = "background";
|
|
178
|
-
RenderLayerName["data"] = "data";
|
|
179
|
-
RenderLayerName["unclippedData"] = "unclipped-data";
|
|
180
|
-
RenderLayerName["foreground"] = "foreground";
|
|
181
|
-
})(RenderLayerName || (RenderLayerName = {}));
|
|
182
|
-
|
|
183
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
184
|
-
const MOUSE_ACTIVE_EVENT = "mouse_active";
|
|
185
|
-
const INTERACTION_VALUES_ACTIVE_EVENT = "interaction_values_active";
|
|
186
|
-
const INTERACTION_VALUES_EVENT = "interaction_values";
|
|
187
|
-
const INTERACTION_COORDINATES_EVENT = "interaction_coordinates";
|
|
188
|
-
const HIGHLIGHT_DATA_POINT_EVENT = "highlight_data_point";
|
|
189
|
-
const SELECT_DATA_POINT_EVENT = "select_data_point";
|
|
190
|
-
const HIGHLIGHT_SERIES_EVENT = "highlight_series";
|
|
191
|
-
const INTERACTION_SERIES_EVENT = "interaction_series";
|
|
192
|
-
const INTERACTION_DATA_POINTS_EVENT = "interaction_data_points";
|
|
193
|
-
const INTERACTION_DATA_POINT_EVENT = "interaction_data_point";
|
|
194
|
-
const DESTROY_EVENT = "destroy";
|
|
195
|
-
const SET_DOMAIN_EVENT = "set_domain";
|
|
196
|
-
const REFRESH_EVENT = "refresh";
|
|
197
|
-
const CHART_VIEW_STATUS_EVENT = "chart_view_status";
|
|
198
|
-
const SERIES_STATE_CHANGE_EVENT = "series_state_change";
|
|
199
|
-
const AXES_STYLE_CHANGE_EVENT = "axes_style_change";
|
|
200
|
-
/** @ignore */
|
|
201
|
-
const CHART_COMPONENT = new InjectionToken("chart_component");
|
|
202
|
-
/** @ignore */
|
|
203
|
-
const STANDARD_RENDER_LAYERS = {
|
|
204
|
-
[RenderLayerName.background]: {
|
|
205
|
-
name: RenderLayerName.background,
|
|
206
|
-
order: 0,
|
|
207
|
-
clipped: true,
|
|
208
|
-
},
|
|
209
|
-
[RenderLayerName.data]: {
|
|
210
|
-
name: RenderLayerName.data,
|
|
211
|
-
order: 50,
|
|
212
|
-
clipped: true,
|
|
213
|
-
},
|
|
214
|
-
[RenderLayerName.unclippedData]: {
|
|
215
|
-
name: RenderLayerName.unclippedData,
|
|
216
|
-
// order is one greater than the data layer to ensure the unclipped data layer appears just after the data layer in the DOM
|
|
217
|
-
order: 51,
|
|
218
|
-
clipped: false,
|
|
219
|
-
},
|
|
220
|
-
[RenderLayerName.foreground]: {
|
|
221
|
-
name: RenderLayerName.foreground,
|
|
222
|
-
order: 1000,
|
|
223
|
-
clipped: false,
|
|
224
|
-
},
|
|
225
|
-
};
|
|
226
|
-
/** @ignore */
|
|
227
|
-
const DATA_POINT_NOT_FOUND = -1;
|
|
228
|
-
/** @ignore */
|
|
229
|
-
const DATA_POINT_INTERACTION_RESET = -2;
|
|
230
|
-
/** Use this class to prevent DOM elements from triggering mouse-interactive-area events */
|
|
231
|
-
const IGNORE_INTERACTION_CLASS = "ignore-interaction";
|
|
232
|
-
|
|
233
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
234
|
-
//
|
|
235
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
236
|
-
// of this software and associated documentation files (the "Software"), to
|
|
237
|
-
// deal in the Software without restriction, including without limitation the
|
|
238
|
-
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
239
|
-
// sell copies of the Software, and to permit persons to whom the Software is
|
|
240
|
-
// furnished to do so, subject to the following conditions:
|
|
241
|
-
//
|
|
242
|
-
// The above copyright notice and this permission notice shall be included in
|
|
243
|
-
// all copies or substantial portions of the Software.
|
|
244
|
-
//
|
|
245
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
246
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
247
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
248
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
249
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
250
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
251
|
-
// THE SOFTWARE.
|
|
252
|
-
/** Domain for series with empty or null data */
|
|
253
|
-
const EMPTY_CONTINUOUS_DOMAIN = [0, 0];
|
|
254
|
-
/** A reasonable non-data-driven domain for charts */
|
|
255
|
-
const NORMALIZED_DOMAIN = [0, 1];
|
|
256
|
-
/** Type guard for the domain calculator with ticks */
|
|
257
|
-
function isDomainWithTicksCalculator(obj) {
|
|
258
|
-
return !!obj.domainWithTicks;
|
|
259
|
-
}
|
|
260
|
-
function isBandScale(scale) {
|
|
261
|
-
return typeof scale.bandwidth === "function";
|
|
262
|
-
}
|
|
263
|
-
function hasInnerScale(scale) {
|
|
264
|
-
return typeof scale.innerScale !== "undefined";
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
268
|
-
/**
|
|
269
|
-
* The abstract base class for chart renderers with some limited default functionality
|
|
270
|
-
*/
|
|
271
|
-
// For why the "dynamic" decorator is used see https://github.com/ng-packagr/ng-packagr/issues/641
|
|
272
|
-
// @dynamic
|
|
273
|
-
class Renderer {
|
|
274
|
-
constructor(config = {}) {
|
|
275
|
-
this.config = config;
|
|
276
|
-
this.interaction = {};
|
|
277
|
-
/**
|
|
278
|
-
* Get the style attributes for the specified state that we need to apply to a series container
|
|
279
|
-
*
|
|
280
|
-
* @param {RenderState} state the state for which to retrieve container styles
|
|
281
|
-
*
|
|
282
|
-
* @returns {ValueMap<any, any>} the container styles for the specified state
|
|
283
|
-
*/
|
|
284
|
-
this.getContainerStateStyles = (state) => {
|
|
285
|
-
if (!this.config.stateStyles) {
|
|
286
|
-
throw new Error("stateStyles property is not defined");
|
|
287
|
-
}
|
|
288
|
-
return this.config.stateStyles[state || RenderState.default];
|
|
289
|
-
};
|
|
290
|
-
// setting default values to the properties that were not set by user
|
|
291
|
-
this.config = defaultsDeep(this.config, Renderer.DEFAULT_CONFIG);
|
|
292
|
-
}
|
|
293
|
-
/**
|
|
294
|
-
* Based on provided values, return the nearest data point that the given coordinates represent. This is used for mouse hover behavior
|
|
295
|
-
*
|
|
296
|
-
* @param {IDataSeries} series series from which to determine the index corresponding to the specified values
|
|
297
|
-
* @param {{ [axis: string]: any }} values the values from which a data point index can be determined
|
|
298
|
-
* @param {Scales} scales the scales to be used in the index calculation
|
|
299
|
-
*
|
|
300
|
-
* @returns {number} negative value means that index is not found
|
|
301
|
-
*/
|
|
302
|
-
getDataPointIndex(series, values, scales) {
|
|
303
|
-
return DATA_POINT_NOT_FOUND;
|
|
304
|
-
}
|
|
305
|
-
/**
|
|
306
|
-
* Highlight the data point corresponding to the specified data point index
|
|
307
|
-
*
|
|
308
|
-
* @param {IRenderSeries} renderSeries The series on which to render the data point highlight
|
|
309
|
-
* @param {number} dataPointIndex index of the highlighted point within the data series (pass -1 to remove the highlight marker)
|
|
310
|
-
* @param {Subject<IRendererEventPayload>} rendererSubject A subject to optionally invoke for emitting events regarding a data point
|
|
311
|
-
*/
|
|
312
|
-
highlightDataPoint(renderSeries, dataPointIndex, rendererSubject) { }
|
|
313
|
-
/**
|
|
314
|
-
* Set the RenderState of the target data series
|
|
315
|
-
*
|
|
316
|
-
* @param {IRenderContainers} renderContainers the render containers of the series
|
|
317
|
-
* @param {RenderState} state The new state for the target series
|
|
318
|
-
*/
|
|
319
|
-
setSeriesState(renderContainers, state) { }
|
|
320
|
-
/**
|
|
321
|
-
* Set the RenderState of the target data point
|
|
322
|
-
*
|
|
323
|
-
* @param {D3Selection} target the target data point
|
|
324
|
-
* @param {RenderState} state The new state for the target data point
|
|
325
|
-
*/
|
|
326
|
-
setDataPointState(target, state) { }
|
|
327
|
-
/**
|
|
328
|
-
* Calculate domain for data filtered by given filterScales
|
|
329
|
-
*
|
|
330
|
-
* @param dataSeries
|
|
331
|
-
* @param filterScales
|
|
332
|
-
* @param scaleKey
|
|
333
|
-
* @param scale
|
|
334
|
-
* @returns array of datapoints from <code>dataSeries</code> filtered by domains of given <code>filterScale</code>s
|
|
335
|
-
*/
|
|
336
|
-
getDomainOfFilteredData(dataSeries, filterScales, scaleKey, scale) {
|
|
337
|
-
let filteredData = dataSeries.data;
|
|
338
|
-
for (const fixedScaleKey of Object.keys(filterScales)) {
|
|
339
|
-
const filterScale = filterScales[fixedScaleKey];
|
|
340
|
-
if (!filterScale.isDomainFixed || !filterScale.isContinuous()) {
|
|
341
|
-
continue;
|
|
342
|
-
}
|
|
343
|
-
filteredData = this.filterDataByDomain(filteredData, dataSeries, fixedScaleKey, filterScale.domain());
|
|
344
|
-
}
|
|
345
|
-
return this.getDomain(filteredData, dataSeries, scaleKey, scale);
|
|
346
|
-
}
|
|
347
|
-
/**
|
|
348
|
-
* Calculate the domain using the data of a series
|
|
349
|
-
*
|
|
350
|
-
* @param {any[]} data source data, can be filtered
|
|
351
|
-
* @param dataSeries related data series
|
|
352
|
-
* @param {string} scaleName name of the scale for which domain calculation is needed
|
|
353
|
-
* @param scale
|
|
354
|
-
*
|
|
355
|
-
* @returns {[any, any]} min and max values as an array
|
|
356
|
-
*/
|
|
357
|
-
getDomain(data, dataSeries, scaleName, scale) {
|
|
358
|
-
if (!data || data.length === 0) {
|
|
359
|
-
return EMPTY_CONTINUOUS_DOMAIN;
|
|
360
|
-
}
|
|
361
|
-
return extent(data, (datum, index, arr) => {
|
|
362
|
-
var _a, _b;
|
|
363
|
-
return (_b = (_a = dataSeries.accessors.data) === null || _a === void 0 ? void 0 : _a[scaleName]) === null || _b === void 0 ? void 0 : _b.call(_a, datum, index, Array.from(arr), dataSeries);
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
/**
|
|
367
|
-
* Filters given dataset by domain of provided scale
|
|
368
|
-
*
|
|
369
|
-
* @param data
|
|
370
|
-
* @param dataSeries
|
|
371
|
-
* @param scaleName
|
|
372
|
-
* @param domain
|
|
373
|
-
*/
|
|
374
|
-
filterDataByDomain(data, dataSeries, scaleName, domain) {
|
|
375
|
-
var _a;
|
|
376
|
-
const accessor = (_a = dataSeries.accessors.data) === null || _a === void 0 ? void 0 : _a[scaleName];
|
|
377
|
-
// if (isNil(accessor)) {
|
|
378
|
-
// throw new Error("accessor is not defined");
|
|
379
|
-
// }
|
|
380
|
-
return data.filter((d, i) => {
|
|
381
|
-
// @ts-ignore
|
|
382
|
-
const value = accessor(d, i, data, dataSeries);
|
|
383
|
-
return value >= domain[0] && value <= domain[1];
|
|
384
|
-
});
|
|
385
|
-
}
|
|
386
|
-
/**
|
|
387
|
-
* Get the definitions of lasagna layers required for visualizing data
|
|
388
|
-
*
|
|
389
|
-
* @returns {ILasagnaLayer[]} lasagna layer definitions
|
|
390
|
-
*/
|
|
391
|
-
getRequiredLayers() {
|
|
392
|
-
return [STANDARD_RENDER_LAYERS[RenderLayerName.data]];
|
|
393
|
-
}
|
|
394
|
-
setupInteraction(path, nativeEvent, target, dataPointSubject, dataPoint) {
|
|
395
|
-
const eventList = get(this.interaction, path, {})[nativeEvent];
|
|
396
|
-
if (!eventList) {
|
|
397
|
-
return;
|
|
398
|
-
}
|
|
399
|
-
each(eventList, (targetEvent) => {
|
|
400
|
-
target.on(nativeEvent, () => {
|
|
401
|
-
const bbox = target.node().getBoundingClientRect();
|
|
402
|
-
dataPointSubject.next({
|
|
403
|
-
eventName: targetEvent,
|
|
404
|
-
data: Object.assign(Object.assign({}, dataPoint), { position: bbox }),
|
|
405
|
-
});
|
|
406
|
-
});
|
|
407
|
-
});
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
Renderer.DEFAULT_CONFIG = {
|
|
411
|
-
stateStyles: {
|
|
412
|
-
[RenderState.default]: {
|
|
413
|
-
opacity: 1,
|
|
414
|
-
},
|
|
415
|
-
[RenderState.hidden]: {
|
|
416
|
-
opacity: 0,
|
|
417
|
-
},
|
|
418
|
-
[RenderState.deemphasized]: {
|
|
419
|
-
opacity: 0.1,
|
|
420
|
-
},
|
|
421
|
-
[RenderState.emphasized]: {
|
|
422
|
-
opacity: 1,
|
|
423
|
-
},
|
|
424
|
-
},
|
|
425
|
-
};
|
|
426
|
-
|
|
427
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
428
|
-
//
|
|
429
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
430
|
-
// of this software and associated documentation files (the "Software"), to
|
|
431
|
-
// deal in the Software without restriction, including without limitation the
|
|
432
|
-
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
433
|
-
// sell copies of the Software, and to permit persons to whom the Software is
|
|
434
|
-
// furnished to do so, subject to the following conditions:
|
|
435
|
-
//
|
|
436
|
-
// The above copyright notice and this permission notice shall be included in
|
|
437
|
-
// all copies or substantial portions of the Software.
|
|
438
|
-
//
|
|
439
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
440
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
441
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
442
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
443
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
444
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
445
|
-
// THE SOFTWARE.
|
|
446
|
-
/** Mouse interaction types */
|
|
447
|
-
var InteractionType;
|
|
448
|
-
(function (InteractionType) {
|
|
449
|
-
/** Indicates that an element has been clicked */
|
|
450
|
-
InteractionType["Click"] = "click";
|
|
451
|
-
/** Indicates that an element is hovered */
|
|
452
|
-
InteractionType["Hover"] = "hover";
|
|
453
|
-
/** Indicates a 'mousedown' event */
|
|
454
|
-
InteractionType["MouseDown"] = "mousedown";
|
|
455
|
-
/** Indicates that the mouse has entered the bounds of an element */
|
|
456
|
-
InteractionType["MouseEnter"] = "mouseenter";
|
|
457
|
-
/** Indicates that the mouse has left the bounds of an element */
|
|
458
|
-
InteractionType["MouseLeave"] = "mouseleave";
|
|
459
|
-
/** Indicates a movement of the mouse across the chart */
|
|
460
|
-
InteractionType["MouseMove"] = "mousemove";
|
|
461
|
-
/** Indicates a 'mouseup' event */
|
|
462
|
-
InteractionType["MouseUp"] = "mouseup";
|
|
463
|
-
})(InteractionType || (InteractionType = {}));
|
|
464
|
-
|
|
465
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
466
|
-
/**
|
|
467
|
-
* Default configuration for Radial Renderer
|
|
468
|
-
*/
|
|
469
|
-
const DEFAULT_RADIAL_RENDERER_CONFIG = {
|
|
470
|
-
annularWidth: 20,
|
|
471
|
-
annularPadding: 5,
|
|
472
|
-
maxThickness: 30,
|
|
473
|
-
annularGrowth: 0.15,
|
|
474
|
-
cursor: "default",
|
|
475
|
-
enableSeriesHighlighting: true,
|
|
476
|
-
enableDataPointHighlighting: true,
|
|
477
|
-
};
|
|
478
|
-
/**
|
|
479
|
-
* Radial renderer is a generic renderer that is able to draw pie and donut charts
|
|
480
|
-
*/
|
|
481
|
-
class RadialRenderer extends Renderer {
|
|
482
|
-
/**
|
|
483
|
-
* Creates an instance of RadialRenderer.
|
|
484
|
-
* @param {IRadialRendererConfig} [config]
|
|
485
|
-
* Renderer configuration object. Defaults to `DEFAULT_RADIAL_RENDERER_CONFIG` constant value.
|
|
486
|
-
*/
|
|
487
|
-
constructor(config = {}) {
|
|
488
|
-
super(config);
|
|
489
|
-
this.config = config;
|
|
490
|
-
this.config = defaultsDeep(this.config, DEFAULT_RADIAL_RENDERER_CONFIG);
|
|
491
|
-
}
|
|
492
|
-
/** See {@link Renderer#draw} */
|
|
493
|
-
draw(renderSeries, rendererSubject) {
|
|
494
|
-
const dataContainer = renderSeries.containers[RenderLayerName.data];
|
|
495
|
-
const data = renderSeries.dataSeries.data;
|
|
496
|
-
const accessors = renderSeries.dataSeries.accessors;
|
|
497
|
-
// TODO: This handles several data points withing one series as well. Most probably this can be abstracted to other renderer
|
|
498
|
-
const arcGenerator = (d, index) => {
|
|
499
|
-
const separateArc = this.getArc(renderSeries.scales.r.range(), arc(), index);
|
|
500
|
-
return separateArc(d);
|
|
501
|
-
};
|
|
502
|
-
this.segmentWidth = this.getSegmentWidth(renderSeries);
|
|
503
|
-
const g = dataContainer.selectAll("path.arc").data(data);
|
|
504
|
-
g.exit().remove();
|
|
505
|
-
g.enter()
|
|
506
|
-
.append("path")
|
|
507
|
-
.attr("class", "arc pointer-events nui-chart--path__outline")
|
|
508
|
-
.style("stroke-width", this.config.strokeWidth)
|
|
509
|
-
.style("cursor", this.config.cursor)
|
|
510
|
-
.on("mouseenter", (d, i) => {
|
|
511
|
-
this.emitDataPointHighlight(renderSeries, d, i, rendererSubject);
|
|
512
|
-
})
|
|
513
|
-
.on("mouseleave", (d, i) => {
|
|
514
|
-
this.emitDataPointHighlight(renderSeries, null, DATA_POINT_NOT_FOUND, rendererSubject);
|
|
515
|
-
})
|
|
516
|
-
// TODO: testing event, remove in favor or generic interaction setup
|
|
517
|
-
.on("click", (d, i) => {
|
|
518
|
-
rendererSubject.next({
|
|
519
|
-
eventName: SELECT_DATA_POINT_EVENT,
|
|
520
|
-
data: {
|
|
521
|
-
seriesId: renderSeries.dataSeries.id,
|
|
522
|
-
index: i,
|
|
523
|
-
data: d.data,
|
|
524
|
-
position: this.getDataPointPosition(renderSeries.dataSeries, i, renderSeries.scales),
|
|
525
|
-
},
|
|
526
|
-
});
|
|
527
|
-
})
|
|
528
|
-
.merge(g)
|
|
529
|
-
.attr("d", arcGenerator)
|
|
530
|
-
.attr("fill", (d, i) => {
|
|
531
|
-
var _a, _b;
|
|
532
|
-
return accessors.data.color
|
|
533
|
-
? accessors.data.color(d.data, i, data, renderSeries.dataSeries)
|
|
534
|
-
: (_b = (_a = accessors.series).color) === null || _b === void 0 ? void 0 : _b.call(_a, renderSeries.dataSeries.id, renderSeries.dataSeries);
|
|
535
|
-
});
|
|
536
|
-
}
|
|
537
|
-
/** See {@link Renderer#getDataPointPosition} */
|
|
538
|
-
getDataPointPosition(dataSeries, index, scales) {
|
|
539
|
-
if (index < 0) {
|
|
540
|
-
return undefined;
|
|
541
|
-
}
|
|
542
|
-
const pieArcData = dataSeries.data[index];
|
|
543
|
-
const dataPointArc = this.getArc(scales.r.range(), arc(), index);
|
|
544
|
-
const centroid = dataPointArc.centroid(pieArcData);
|
|
545
|
-
return {
|
|
546
|
-
x: centroid[0],
|
|
547
|
-
y: centroid[1],
|
|
548
|
-
width: 0,
|
|
549
|
-
height: 0,
|
|
550
|
-
};
|
|
551
|
-
}
|
|
552
|
-
getInnerRadius(range, index) {
|
|
553
|
-
if (isUndefined(this.segmentWidth) ||
|
|
554
|
-
isUndefined(this.config.annularPadding)) {
|
|
555
|
-
throw new Error("Can't compute inner radius");
|
|
556
|
-
}
|
|
557
|
-
const calculatedRadius = range[1] -
|
|
558
|
-
range[0] -
|
|
559
|
-
this.segmentWidth -
|
|
560
|
-
index * (this.config.annularPadding + this.segmentWidth);
|
|
561
|
-
return calculatedRadius >= 0 ? calculatedRadius : 0;
|
|
562
|
-
}
|
|
563
|
-
getOuterRadius(range, index) {
|
|
564
|
-
if (isUndefined(this.segmentWidth) ||
|
|
565
|
-
isUndefined(this.config.annularPadding)) {
|
|
566
|
-
throw new Error("Can't compute outer radius");
|
|
567
|
-
}
|
|
568
|
-
const calculatedRadius = range[1] -
|
|
569
|
-
range[0] -
|
|
570
|
-
index * (this.config.annularPadding + this.segmentWidth);
|
|
571
|
-
return calculatedRadius >= 0 ? calculatedRadius : 0;
|
|
572
|
-
}
|
|
573
|
-
getArc(range, generatedArc, index) {
|
|
574
|
-
const innerRadius = this.getInnerRadius(range, index);
|
|
575
|
-
return generatedArc
|
|
576
|
-
.outerRadius(this.getOuterRadius(range, index))
|
|
577
|
-
.innerRadius(innerRadius);
|
|
578
|
-
}
|
|
579
|
-
getSegmentWidth(renderSeries) {
|
|
580
|
-
if (!(this.config.maxThickness && this.config.annularGrowth)) {
|
|
581
|
-
return this.config.annularWidth;
|
|
582
|
-
}
|
|
583
|
-
else {
|
|
584
|
-
return Math.min((renderSeries.scales.r.range()[1] -
|
|
585
|
-
renderSeries.scales.r.range()[0]) *
|
|
586
|
-
this.config.annularGrowth, this.config.maxThickness);
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
emitDataPointHighlight(renderSeries, data, i, rendererSubject) {
|
|
590
|
-
const position = this.getDataPointPosition(renderSeries.dataSeries, i, renderSeries.scales);
|
|
591
|
-
const dataPoint = {
|
|
592
|
-
seriesId: renderSeries.dataSeries.id,
|
|
593
|
-
dataSeries: renderSeries.dataSeries,
|
|
594
|
-
index: i,
|
|
595
|
-
data: data,
|
|
596
|
-
position: position,
|
|
597
|
-
};
|
|
598
|
-
if (this.config.enableSeriesHighlighting) {
|
|
599
|
-
rendererSubject.next({
|
|
600
|
-
eventName: HIGHLIGHT_SERIES_EVENT,
|
|
601
|
-
data: dataPoint,
|
|
602
|
-
});
|
|
603
|
-
}
|
|
604
|
-
if (this.config.enableDataPointHighlighting) {
|
|
605
|
-
rendererSubject.next({
|
|
606
|
-
eventName: HIGHLIGHT_DATA_POINT_EVENT,
|
|
607
|
-
data: dataPoint,
|
|
608
|
-
});
|
|
609
|
-
}
|
|
610
|
-
// we're emitting this event manually, because it's not triggered by mouse interactive area in this case
|
|
611
|
-
rendererSubject.next({
|
|
612
|
-
eventName: INTERACTION_DATA_POINTS_EVENT,
|
|
613
|
-
data: {
|
|
614
|
-
interactionType: InteractionType.MouseMove,
|
|
615
|
-
dataPoints: {
|
|
616
|
-
[renderSeries.dataSeries.id]: dataPoint,
|
|
617
|
-
},
|
|
618
|
-
},
|
|
619
|
-
});
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
624
|
-
//
|
|
625
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
626
|
-
// of this software and associated documentation files (the "Software"), to
|
|
627
|
-
// deal in the Software without restriction, including without limitation the
|
|
628
|
-
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
629
|
-
// sell copies of the Software, and to permit persons to whom the Software is
|
|
630
|
-
// furnished to do so, subject to the following conditions:
|
|
631
|
-
//
|
|
632
|
-
// The above copyright notice and this permission notice shall be included in
|
|
633
|
-
// all copies or substantial portions of the Software.
|
|
634
|
-
//
|
|
635
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
636
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
637
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
638
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
639
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
640
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
641
|
-
// THE SOFTWARE.
|
|
642
|
-
class ChartPlugin {
|
|
643
|
-
constructor() { }
|
|
644
|
-
initialize() { }
|
|
645
|
-
update() { }
|
|
646
|
-
updateDimensions() { }
|
|
647
|
-
destroy() { }
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
651
|
-
/**
|
|
652
|
-
* This plugin calculates new size and position for content inside donut chart
|
|
653
|
-
*/
|
|
654
|
-
class ChartDonutContentPlugin extends ChartPlugin {
|
|
655
|
-
constructor() {
|
|
656
|
-
super(...arguments);
|
|
657
|
-
/** Subject for getting updates on the content position */
|
|
658
|
-
this.contentPositionUpdateSubject = new Subject();
|
|
659
|
-
/** The current content position */
|
|
660
|
-
this.contentPosition = {
|
|
661
|
-
top: 0,
|
|
662
|
-
left: 0,
|
|
663
|
-
width: 0,
|
|
664
|
-
height: 0,
|
|
665
|
-
};
|
|
666
|
-
}
|
|
667
|
-
updateDimensions() {
|
|
668
|
-
const radius = this.chart
|
|
669
|
-
.getDataManager()
|
|
670
|
-
.chartSeriesSet.reduce((prev, current) => {
|
|
671
|
-
if (current.renderer instanceof RadialRenderer &&
|
|
672
|
-
!isUndefined(prev)) {
|
|
673
|
-
return Math.min(prev, current.renderer.getInnerRadius(current.scales.r.range(), current.data.length - 1));
|
|
674
|
-
}
|
|
675
|
-
return prev;
|
|
676
|
-
}, Infinity);
|
|
677
|
-
if (isUndefined(radius)) {
|
|
678
|
-
throw new Error("Radius is undefined");
|
|
679
|
-
}
|
|
680
|
-
this.contentPosition = this.getContentPosition(radius);
|
|
681
|
-
this.contentPositionUpdateSubject.next(this.contentPosition);
|
|
682
|
-
}
|
|
683
|
-
destroy() {
|
|
684
|
-
this.contentPositionUpdateSubject.complete();
|
|
685
|
-
}
|
|
686
|
-
getContentPosition(areaSize) {
|
|
687
|
-
const basics = [
|
|
688
|
-
this.chart.getGrid().config().dimension.outerHeight() / 2,
|
|
689
|
-
this.chart.getGrid().config().dimension.outerWidth() / 2,
|
|
690
|
-
];
|
|
691
|
-
return {
|
|
692
|
-
top: basics[0] - areaSize / Math.sqrt(2),
|
|
693
|
-
left: basics[1] - areaSize / Math.sqrt(2),
|
|
694
|
-
width: areaSize * Math.sqrt(2),
|
|
695
|
-
height: areaSize * Math.sqrt(2),
|
|
696
|
-
};
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
701
|
-
class ChartDonutContentComponent {
|
|
702
|
-
ngOnChanges(changes) {
|
|
703
|
-
var _a;
|
|
704
|
-
if (changes.plugin) {
|
|
705
|
-
(_a = this.contentPositionUpdateSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
706
|
-
this.contentPositionUpdateSubscription =
|
|
707
|
-
this.plugin.contentPositionUpdateSubject.subscribe((contentPosition) => {
|
|
708
|
-
this.contentPosition = contentPosition;
|
|
709
|
-
});
|
|
710
|
-
this.plugin.chart.updateDimensions();
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
ngOnDestroy() {
|
|
714
|
-
if (this.contentPositionUpdateSubscription) {
|
|
715
|
-
this.contentPositionUpdateSubscription.unsubscribe();
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
ChartDonutContentComponent.decorators = [
|
|
720
|
-
{ type: Component, args: [{
|
|
721
|
-
selector: "nui-chart-donut-content",
|
|
722
|
-
template: "<div\n *ngIf=\"plugin && contentPosition\"\n class=\"nui-chart-donut-content d-flex justify-content-center align-items-center text-center\"\n [style.top.px]=\"contentPosition.top\"\n [style.left.px]=\"contentPosition.left\"\n [style.height.px]=\"contentPosition.height\"\n [style.width.px]=\"contentPosition.width\"\n>\n <ng-content></ng-content>\n</div>\n",
|
|
723
|
-
styles: [".nui-chart-donut-content{position:absolute;pointer-events:auto;width:100%;height:100%;overflow:hidden;text-overflow:ellipsis}\n"]
|
|
724
|
-
},] }
|
|
725
|
-
];
|
|
726
|
-
ChartDonutContentComponent.propDecorators = {
|
|
727
|
-
plugin: [{ type: Input }]
|
|
728
|
-
};
|
|
729
|
-
|
|
730
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
731
|
-
/** How far away from the data point position will the tooltip be positioned */
|
|
732
|
-
const TOOLTIP_POSITION_OFFSET = 10;
|
|
733
|
-
/** @ignore
|
|
734
|
-
* Used for charts where tooltips should be placed aside of some vertical line */
|
|
735
|
-
const getVerticalSetup = (offset) => [
|
|
736
|
-
{
|
|
737
|
-
originX: "end",
|
|
738
|
-
originY: "top",
|
|
739
|
-
overlayX: "start",
|
|
740
|
-
overlayY: "center",
|
|
741
|
-
offsetX: offset,
|
|
742
|
-
},
|
|
743
|
-
{
|
|
744
|
-
originX: "start",
|
|
745
|
-
originY: "center",
|
|
746
|
-
overlayX: "end",
|
|
747
|
-
overlayY: "center",
|
|
748
|
-
offsetX: -offset,
|
|
749
|
-
},
|
|
750
|
-
];
|
|
751
|
-
/** @ignore
|
|
752
|
-
* Used for charts where tooltips should be placed aligned to some horizontal line (as Horizontal Bar Charts) */
|
|
753
|
-
const getHorizontalSetup = (offset) => [
|
|
754
|
-
{
|
|
755
|
-
originX: "end",
|
|
756
|
-
originY: "top",
|
|
757
|
-
overlayX: "center",
|
|
758
|
-
overlayY: "bottom",
|
|
759
|
-
offsetY: -offset,
|
|
760
|
-
},
|
|
761
|
-
{
|
|
762
|
-
originX: "end",
|
|
763
|
-
originY: "bottom",
|
|
764
|
-
overlayX: "center",
|
|
765
|
-
overlayY: "top",
|
|
766
|
-
offsetY: offset,
|
|
767
|
-
},
|
|
768
|
-
];
|
|
769
|
-
/**
|
|
770
|
-
* This plugin listens to the INTERACTION_DATA_POINTS_EVENT and transforms received data into tooltips inputs.
|
|
771
|
-
* The actual tooltips are handled by the ChartTooltipsComponent.
|
|
772
|
-
*/
|
|
773
|
-
class ChartTooltipsPlugin extends ChartPlugin {
|
|
774
|
-
/**
|
|
775
|
-
* @param tooltipPositionOffset Offset of a tooltip from edge of a highlighted element
|
|
776
|
-
* @param orientation
|
|
777
|
-
*/
|
|
778
|
-
constructor(tooltipPositionOffset = TOOLTIP_POSITION_OFFSET, orientation = "right") {
|
|
779
|
-
super();
|
|
780
|
-
this.tooltipPositionOffset = tooltipPositionOffset;
|
|
781
|
-
this.orientation = orientation;
|
|
782
|
-
/** Calculated positions for the data point tooltips */
|
|
783
|
-
this.dataPointPositions = {};
|
|
784
|
-
/**
|
|
785
|
-
* This publishes an event to show tooltips
|
|
786
|
-
*/
|
|
787
|
-
this.showSubject = new Subject();
|
|
788
|
-
/**
|
|
789
|
-
* This publishes an event to hide tooltips
|
|
790
|
-
*/
|
|
791
|
-
this.hideSubject = new Subject();
|
|
792
|
-
this.isChartInView = false;
|
|
793
|
-
this.destroy$ = new Subject();
|
|
794
|
-
this.seriesVisibilityMap = {};
|
|
795
|
-
if (orientation === "right") {
|
|
796
|
-
this.overlaySetup = getVerticalSetup(tooltipPositionOffset);
|
|
105
|
+
this.openSubscription = this.openRemoteControl.subscribe(() => {
|
|
106
|
+
this.show();
|
|
107
|
+
});
|
|
797
108
|
}
|
|
798
|
-
|
|
799
|
-
this.
|
|
109
|
+
if (this.closeRemoteControl) {
|
|
110
|
+
this.closeSubscription = this.closeRemoteControl.subscribe(() => {
|
|
111
|
+
this.hide();
|
|
112
|
+
});
|
|
800
113
|
}
|
|
801
114
|
}
|
|
802
|
-
|
|
803
|
-
this.
|
|
804
|
-
.
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
.
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
const dataPoints = event.data.dataPoints;
|
|
811
|
-
this.processHighlightedDataPoints(dataPoints);
|
|
812
|
-
}
|
|
813
|
-
});
|
|
814
|
-
this.chart
|
|
815
|
-
.getEventBus()
|
|
816
|
-
.getStream(SERIES_STATE_CHANGE_EVENT)
|
|
817
|
-
.pipe(takeUntil(this.destroy$))
|
|
818
|
-
.subscribe((event) => {
|
|
819
|
-
event.data.forEach((series) => {
|
|
820
|
-
this.seriesVisibilityMap[series.seriesId] =
|
|
821
|
-
series.state !== RenderState.hidden;
|
|
822
|
-
});
|
|
823
|
-
});
|
|
824
|
-
this.chart
|
|
825
|
-
.getEventBus()
|
|
826
|
-
.getStream(CHART_VIEW_STATUS_EVENT)
|
|
827
|
-
.pipe(takeUntil(this.destroy$))
|
|
828
|
-
.subscribe((event) => {
|
|
829
|
-
this.isChartInView = event.data.isChartInView;
|
|
830
|
-
if (!this.isChartInView) {
|
|
831
|
-
this.hideSubject.next();
|
|
832
|
-
}
|
|
833
|
-
});
|
|
115
|
+
show() {
|
|
116
|
+
if (this.overlayRef.hasAttached()) {
|
|
117
|
+
this.positionStrategy.apply();
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
const tooltipRef = this.overlayRef.attach(new ComponentPortal(ChartTooltipComponent));
|
|
121
|
+
tooltipRef.instance.template = this.template;
|
|
122
|
+
}
|
|
834
123
|
}
|
|
835
|
-
|
|
836
|
-
this.
|
|
837
|
-
this.destroy$.complete();
|
|
124
|
+
hide() {
|
|
125
|
+
this.overlayRef.detach();
|
|
838
126
|
}
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
this.seriesVisibilityMap[d.seriesId] !== false);
|
|
844
|
-
if (values(validDataPoints).length === 0) {
|
|
845
|
-
this.hideSubject.next();
|
|
846
|
-
return;
|
|
127
|
+
ngOnDestroy() {
|
|
128
|
+
this.hide();
|
|
129
|
+
if (this.openSubscription) {
|
|
130
|
+
this.openSubscription.unsubscribe();
|
|
847
131
|
}
|
|
848
|
-
this.
|
|
849
|
-
|
|
850
|
-
if (!chartElement) {
|
|
851
|
-
throw new Error("Chart parent node is not defined");
|
|
132
|
+
if (this.closeSubscription) {
|
|
133
|
+
this.closeSubscription.unsubscribe();
|
|
852
134
|
}
|
|
853
|
-
const bbox = chartElement.getBoundingClientRect();
|
|
854
|
-
const offsetParentBbox = chartElement.offsetParent.getBoundingClientRect();
|
|
855
|
-
const chartPosition = {
|
|
856
|
-
x: bbox.left - offsetParentBbox.left,
|
|
857
|
-
y: bbox.top - offsetParentBbox.top,
|
|
858
|
-
};
|
|
859
|
-
each(Object.keys(this.dataPoints), (seriesId) => {
|
|
860
|
-
const dataPoint = this.dataPoints[seriesId];
|
|
861
|
-
const chartSeries = this.chart
|
|
862
|
-
.getDataManager()
|
|
863
|
-
.getChartSeries(dataPoint.seriesId);
|
|
864
|
-
const tooltipRelativePosition = this.getTooltipPosition(dataPoint, chartSeries);
|
|
865
|
-
this.dataPointPositions[seriesId] = this.getAbsolutePosition(tooltipRelativePosition, chartPosition);
|
|
866
|
-
});
|
|
867
|
-
this.showSubject.next();
|
|
868
135
|
}
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
136
|
+
getOverlayElement() {
|
|
137
|
+
return this.overlayRef.overlayElement;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
ChartTooltipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChartTooltipDirective, deps: [{ token: i1$1.Overlay }, { token: i1$1.OverlayPositionBuilder }, { token: i1$1.ScrollStrategyOptions }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
141
|
+
ChartTooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ChartTooltipDirective, selector: "[nuiChartTooltip]", inputs: { template: "template", openRemoteControl: "openRemoteControl", closeRemoteControl: "closeRemoteControl", positions: "positions" }, ngImport: i0 });
|
|
142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChartTooltipDirective, decorators: [{
|
|
143
|
+
type: Directive,
|
|
144
|
+
args: [{ selector: "[nuiChartTooltip]" }]
|
|
145
|
+
}], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i1$1.OverlayPositionBuilder }, { type: i1$1.ScrollStrategyOptions }, { type: i0.ElementRef }]; }, propDecorators: { template: [{
|
|
146
|
+
type: Input
|
|
147
|
+
}], openRemoteControl: [{
|
|
148
|
+
type: Input
|
|
149
|
+
}], closeRemoteControl: [{
|
|
150
|
+
type: Input
|
|
151
|
+
}], positions: [{
|
|
152
|
+
type: Input
|
|
153
|
+
}] } });
|
|
154
|
+
|
|
155
|
+
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
156
|
+
class ChartDonutContentComponent {
|
|
157
|
+
ngOnChanges(changes) {
|
|
158
|
+
var _a;
|
|
159
|
+
if (changes.plugin) {
|
|
160
|
+
(_a = this.contentPositionUpdateSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
161
|
+
this.contentPositionUpdateSubscription =
|
|
162
|
+
this.plugin.contentPositionUpdateSubject.subscribe((contentPosition) => {
|
|
163
|
+
this.contentPosition = contentPosition;
|
|
164
|
+
});
|
|
165
|
+
this.plugin.chart.updateDimensions();
|
|
878
166
|
}
|
|
879
|
-
return {
|
|
880
|
-
x: dataPoint.position.x,
|
|
881
|
-
y: dataPoint.position.y,
|
|
882
|
-
height: ((_a = dataPoint.position) === null || _a === void 0 ? void 0 : _a.height) || 1,
|
|
883
|
-
width: ((_b = dataPoint.position) === null || _b === void 0 ? void 0 : _b.width) || 1,
|
|
884
|
-
overlayPositions: this.overlaySetup,
|
|
885
|
-
};
|
|
886
167
|
}
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
* @param chartPosition
|
|
892
|
-
*/
|
|
893
|
-
getAbsolutePosition(relativePosition, chartPosition) {
|
|
894
|
-
return Object.assign({}, relativePosition, {
|
|
895
|
-
x: chartPosition.x +
|
|
896
|
-
this.chart.getGrid().config().dimension.margin.left +
|
|
897
|
-
relativePosition.x,
|
|
898
|
-
y: chartPosition.y +
|
|
899
|
-
this.chart.getGrid().config().dimension.margin.top +
|
|
900
|
-
relativePosition.y,
|
|
901
|
-
});
|
|
168
|
+
ngOnDestroy() {
|
|
169
|
+
if (this.contentPositionUpdateSubscription) {
|
|
170
|
+
this.contentPositionUpdateSubscription.unsubscribe();
|
|
171
|
+
}
|
|
902
172
|
}
|
|
903
173
|
}
|
|
174
|
+
ChartDonutContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChartDonutContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
175
|
+
ChartDonutContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ChartDonutContentComponent, selector: "nui-chart-donut-content", inputs: { plugin: "plugin" }, usesOnChanges: true, ngImport: i0, template: "<div\n *ngIf=\"plugin && contentPosition\"\n class=\"nui-chart-donut-content d-flex justify-content-center align-items-center text-center\"\n [style.top.px]=\"contentPosition.top\"\n [style.left.px]=\"contentPosition.left\"\n [style.height.px]=\"contentPosition.height\"\n [style.width.px]=\"contentPosition.width\"\n>\n <ng-content></ng-content>\n</div>\n", styles: [".nui-chart-donut-content{position:absolute;pointer-events:auto;width:100%;height:100%;overflow:hidden;text-overflow:ellipsis}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
176
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChartDonutContentComponent, decorators: [{
|
|
177
|
+
type: Component,
|
|
178
|
+
args: [{ selector: "nui-chart-donut-content", template: "<div\n *ngIf=\"plugin && contentPosition\"\n class=\"nui-chart-donut-content d-flex justify-content-center align-items-center text-center\"\n [style.top.px]=\"contentPosition.top\"\n [style.left.px]=\"contentPosition.left\"\n [style.height.px]=\"contentPosition.height\"\n [style.width.px]=\"contentPosition.width\"\n>\n <ng-content></ng-content>\n</div>\n", styles: [".nui-chart-donut-content{position:absolute;pointer-events:auto;width:100%;height:100%;overflow:hidden;text-overflow:ellipsis}\n"] }]
|
|
179
|
+
}], propDecorators: { plugin: [{
|
|
180
|
+
type: Input
|
|
181
|
+
}] } });
|
|
904
182
|
|
|
905
183
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
906
184
|
class ChartTooltipsComponent {
|
|
@@ -1050,131 +328,19 @@ class ChartTooltipsComponent {
|
|
|
1050
328
|
return this.plugin.orientation === "right";
|
|
1051
329
|
}
|
|
1052
330
|
}
|
|
1053
|
-
ChartTooltipsComponent
|
|
1054
|
-
{ type:
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
styles: [".chart-tooltips__popover{position:absolute;pointer-events:none}\n"]
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
]
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
tooltips: [{ type: ViewChildren, args: [ChartTooltipDirective,] }]
|
|
1067
|
-
};
|
|
1068
|
-
|
|
1069
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
1070
|
-
/**
|
|
1071
|
-
* This plugin listens for the INTERACTION_DATA_POINTS_EVENT by default and transforms received data into
|
|
1072
|
-
* popover inputs. The listened event can be configured using the 'config.eventStreamId' property.
|
|
1073
|
-
* The actual popover is handled by the ChartPopoverComponent.
|
|
1074
|
-
*/
|
|
1075
|
-
class ChartPopoverPlugin extends ChartPlugin {
|
|
1076
|
-
constructor(config = {}) {
|
|
1077
|
-
super();
|
|
1078
|
-
this.config = config;
|
|
1079
|
-
/** Emits the popover's target position */
|
|
1080
|
-
this.updatePositionSubject = new Subject();
|
|
1081
|
-
/** Emits an event indicating the popover should open */
|
|
1082
|
-
this.openPopoverSubject = new Subject();
|
|
1083
|
-
/** Emits an event indicating the popover should close */
|
|
1084
|
-
this.closePopoverSubject = new Subject();
|
|
1085
|
-
/** The target position of the popover */
|
|
1086
|
-
this.popoverTargetPosition = {
|
|
1087
|
-
top: 0,
|
|
1088
|
-
left: 0,
|
|
1089
|
-
width: 0,
|
|
1090
|
-
height: 0,
|
|
1091
|
-
};
|
|
1092
|
-
/** The default plugin configuration */
|
|
1093
|
-
this.DEFAULT_CONFIG = {
|
|
1094
|
-
eventStreamId: INTERACTION_DATA_POINTS_EVENT,
|
|
1095
|
-
interactionType: InteractionType.MouseMove,
|
|
1096
|
-
};
|
|
1097
|
-
this.isOpen = false;
|
|
1098
|
-
this.destroy$ = new Subject();
|
|
1099
|
-
this.config = defaultsDeep(this.config, this.DEFAULT_CONFIG);
|
|
1100
|
-
}
|
|
1101
|
-
initialize() {
|
|
1102
|
-
this.chart
|
|
1103
|
-
.getEventBus()
|
|
1104
|
-
.getStream(this.config.eventStreamId)
|
|
1105
|
-
.pipe(takeUntil(this.destroy$))
|
|
1106
|
-
.subscribe((event) => {
|
|
1107
|
-
var _a;
|
|
1108
|
-
if (event.data.interactionType === this.config.interactionType) {
|
|
1109
|
-
// here we handle data either of type IInteractionDataPointsEvent or IInteractionDataPointEvent
|
|
1110
|
-
const dataPoints = (_a = event.data
|
|
1111
|
-
.dataPoints) !== null && _a !== void 0 ? _a : {
|
|
1112
|
-
[event.data.dataPoint.seriesId]: event.data.dataPoint,
|
|
1113
|
-
};
|
|
1114
|
-
this.processDataPoints(dataPoints);
|
|
1115
|
-
}
|
|
1116
|
-
});
|
|
1117
|
-
}
|
|
1118
|
-
destroy() {
|
|
1119
|
-
if (this.updatePositionSubject) {
|
|
1120
|
-
this.updatePositionSubject.complete();
|
|
1121
|
-
}
|
|
1122
|
-
if (this.openPopoverSubject) {
|
|
1123
|
-
this.openPopoverSubject.complete();
|
|
1124
|
-
}
|
|
1125
|
-
if (this.closePopoverSubject) {
|
|
1126
|
-
this.closePopoverSubject.complete();
|
|
1127
|
-
}
|
|
1128
|
-
if (this.destroy$) {
|
|
1129
|
-
this.destroy$.next();
|
|
1130
|
-
this.destroy$.complete();
|
|
1131
|
-
}
|
|
1132
|
-
}
|
|
1133
|
-
getAbsolutePosition(valuesArray) {
|
|
1134
|
-
var _a, _b;
|
|
1135
|
-
const chartElement = (_b = (_a = this.chart.target) === null || _a === void 0 ? void 0 : _a.node()) === null || _b === void 0 ? void 0 : _b.parentNode; // the one above svg
|
|
1136
|
-
if (!chartElement) {
|
|
1137
|
-
throw new Error("Chart parent node is not defined");
|
|
1138
|
-
}
|
|
1139
|
-
const dataPointsLeft = Math.min(...valuesArray.map((d) => d.position.x));
|
|
1140
|
-
const left = chartElement.offsetLeft +
|
|
1141
|
-
this.chart.getGrid().config().dimension.margin.left +
|
|
1142
|
-
dataPointsLeft;
|
|
1143
|
-
const top = chartElement.offsetTop +
|
|
1144
|
-
this.chart.getGrid().config().dimension.margin.top;
|
|
1145
|
-
// area for popovers is enlarged to cover the whole chart (top to bottom),
|
|
1146
|
-
// so that we avoid collision of chart visualization and popover (by UX request)
|
|
1147
|
-
return {
|
|
1148
|
-
top: top,
|
|
1149
|
-
left: left,
|
|
1150
|
-
height: chartElement.offsetHeight,
|
|
1151
|
-
width: Math.max(...valuesArray.map((d) => d.position.x + (d.position.width || 0))) - dataPointsLeft,
|
|
1152
|
-
};
|
|
1153
|
-
}
|
|
1154
|
-
processDataPoints(dataPoints) {
|
|
1155
|
-
const validDataPoints = pickBy(dataPoints, (d) => d.index >= 0 && d.position);
|
|
1156
|
-
const validDataPointsValues = values(validDataPoints);
|
|
1157
|
-
if (validDataPointsValues.length > 0) {
|
|
1158
|
-
this.popoverTargetPosition = this.getAbsolutePosition(validDataPointsValues);
|
|
1159
|
-
this.dataPoints = validDataPoints;
|
|
1160
|
-
// timeout is needed in order to successfully open popover on initial hover over the chart
|
|
1161
|
-
setTimeout(() => {
|
|
1162
|
-
this.updatePositionSubject.next(this.popoverTargetPosition);
|
|
1163
|
-
if (!this.isOpen) {
|
|
1164
|
-
this.isOpen = true;
|
|
1165
|
-
this.openPopoverSubject.next();
|
|
1166
|
-
}
|
|
1167
|
-
});
|
|
1168
|
-
}
|
|
1169
|
-
else {
|
|
1170
|
-
// timeout is needed for symmetry of timing with above timeout for opening the popover
|
|
1171
|
-
setTimeout(() => {
|
|
1172
|
-
this.closePopoverSubject.next();
|
|
1173
|
-
this.isOpen = false;
|
|
1174
|
-
});
|
|
1175
|
-
}
|
|
1176
|
-
}
|
|
1177
|
-
}
|
|
331
|
+
ChartTooltipsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChartTooltipsComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
332
|
+
ChartTooltipsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ChartTooltipsComponent, selector: "nui-chart-tooltips", inputs: { plugin: "plugin", template: "template" }, viewQueries: [{ propertyName: "tooltips", predicate: ChartTooltipDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"plugin && plugin.dataPoints\">\n <div *ngFor=\"let item of plugin.dataPoints | keyvalue; trackBy: trackByFn\">\n <ng-template #tooltipTemplate>\n <ng-container\n *ngTemplateOutlet=\"template; context: { dataPoint: item.value }\"\n ></ng-container>\n </ng-template>\n\n <div\n nuiChartTooltip\n *ngIf=\"plugin.dataPointPositions[item.key]\"\n [attr.series-id]=\"item.key\"\n [template]=\"tooltipTemplate\"\n [openRemoteControl]=\"openTooltips\"\n [closeRemoteControl]=\"closeTooltips\"\n [positions]=\"plugin.dataPointPositions[item.key].overlayPositions\"\n class=\"chart-tooltips__popover\"\n [style.left.px]=\"plugin.dataPointPositions[item.key].x\"\n [style.top.px]=\"plugin.dataPointPositions[item.key].y\"\n [style.height.px]=\"plugin.dataPointPositions[item.key].height\"\n [style.width.px]=\"plugin.dataPointPositions[item.key].width\"\n ></div>\n </div>\n</div>\n", styles: [".chart-tooltips__popover{position:absolute;pointer-events:none}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: ChartTooltipDirective, selector: "[nuiChartTooltip]", inputs: ["template", "openRemoteControl", "closeRemoteControl", "positions"] }], pipes: { "keyvalue": i1.KeyValuePipe } });
|
|
333
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChartTooltipsComponent, decorators: [{
|
|
334
|
+
type: Component,
|
|
335
|
+
args: [{ selector: "nui-chart-tooltips", template: "<div *ngIf=\"plugin && plugin.dataPoints\">\n <div *ngFor=\"let item of plugin.dataPoints | keyvalue; trackBy: trackByFn\">\n <ng-template #tooltipTemplate>\n <ng-container\n *ngTemplateOutlet=\"template; context: { dataPoint: item.value }\"\n ></ng-container>\n </ng-template>\n\n <div\n nuiChartTooltip\n *ngIf=\"plugin.dataPointPositions[item.key]\"\n [attr.series-id]=\"item.key\"\n [template]=\"tooltipTemplate\"\n [openRemoteControl]=\"openTooltips\"\n [closeRemoteControl]=\"closeTooltips\"\n [positions]=\"plugin.dataPointPositions[item.key].overlayPositions\"\n class=\"chart-tooltips__popover\"\n [style.left.px]=\"plugin.dataPointPositions[item.key].x\"\n [style.top.px]=\"plugin.dataPointPositions[item.key].y\"\n [style.height.px]=\"plugin.dataPointPositions[item.key].height\"\n [style.width.px]=\"plugin.dataPointPositions[item.key].width\"\n ></div>\n </div>\n</div>\n", styles: [".chart-tooltips__popover{position:absolute;pointer-events:none}\n"] }]
|
|
336
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { plugin: [{
|
|
337
|
+
type: Input
|
|
338
|
+
}], template: [{
|
|
339
|
+
type: Input
|
|
340
|
+
}], tooltips: [{
|
|
341
|
+
type: ViewChildren,
|
|
342
|
+
args: [ChartTooltipDirective]
|
|
343
|
+
}] } });
|
|
1178
344
|
|
|
1179
345
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
1180
346
|
class ChartPopoverComponent {
|
|
@@ -1215,25 +381,23 @@ class ChartPopoverComponent {
|
|
|
1215
381
|
(_b = this.popover) === null || _b === void 0 ? void 0 : _b.updatePosition();
|
|
1216
382
|
this.update.next((_c = this.plugin) === null || _c === void 0 ? void 0 : _c.dataPoints);
|
|
1217
383
|
});
|
|
1218
|
-
}
|
|
1219
|
-
}
|
|
1220
|
-
ChartPopoverComponent
|
|
1221
|
-
{ type:
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
styles: [":host{position:absolute}.chart-popover__popover{position:absolute;pointer-events:none}\n"]
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
popover: [{ type: ViewChild, args: [PopoverComponent,] }]
|
|
1236
|
-
};
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
ChartPopoverComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChartPopoverComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
387
|
+
ChartPopoverComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ChartPopoverComponent, selector: "nui-chart-popover", inputs: { plugin: "plugin", template: "template" }, outputs: { update: "update" }, viewQueries: [{ propertyName: "popover", first: true, predicate: PopoverComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"plugin && plugin.dataPoints\">\n <nui-popover\n class=\"chart-popover__popover\"\n trigger=\"openPopoverSubject\"\n placement=\"top\"\n [unlimited]=\"true\"\n [template]=\"popoverTemplate\"\n [openPopover]=\"plugin.openPopoverSubject\"\n [closePopover]=\"plugin.closePopoverSubject\"\n [hasPadding]=\"false\"\n [container]=\"element.nativeElement\"\n [style.height.px]=\"plugin.popoverTargetPosition.height\"\n [withGrowAfterOpen]=\"true\"\n >\n </nui-popover>\n\n <ng-template #popoverTemplate>\n <ng-container\n *ngTemplateOutlet=\"\n template;\n context: { dataPoints: plugin.dataPoints }\n \"\n ></ng-container>\n </ng-template>\n</div>\n", styles: [":host{position:absolute}.chart-popover__popover{position:absolute;pointer-events:none}\n"], components: [{ type: i1$2.PopoverComponent, selector: "nui-popover", inputs: ["closePopover", "openPopover", "disabled", "trigger", "template", "placement", "popoverTitle", "icon", "modal", "container", "hasPadding", "preventClosing", "unlimited", "delay", "withGrowAfterOpen", "popoverOverlayPosition"], outputs: ["shown", "hidden"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
388
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChartPopoverComponent, decorators: [{
|
|
389
|
+
type: Component,
|
|
390
|
+
args: [{ selector: "nui-chart-popover", template: "<div *ngIf=\"plugin && plugin.dataPoints\">\n <nui-popover\n class=\"chart-popover__popover\"\n trigger=\"openPopoverSubject\"\n placement=\"top\"\n [unlimited]=\"true\"\n [template]=\"popoverTemplate\"\n [openPopover]=\"plugin.openPopoverSubject\"\n [closePopover]=\"plugin.closePopoverSubject\"\n [hasPadding]=\"false\"\n [container]=\"element.nativeElement\"\n [style.height.px]=\"plugin.popoverTargetPosition.height\"\n [withGrowAfterOpen]=\"true\"\n >\n </nui-popover>\n\n <ng-template #popoverTemplate>\n <ng-container\n *ngTemplateOutlet=\"\n template;\n context: { dataPoints: plugin.dataPoints }\n \"\n ></ng-container>\n </ng-template>\n</div>\n", styles: [":host{position:absolute}.chart-popover__popover{position:absolute;pointer-events:none}\n"] }]
|
|
391
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { plugin: [{
|
|
392
|
+
type: Input
|
|
393
|
+
}], template: [{
|
|
394
|
+
type: Input
|
|
395
|
+
}], update: [{
|
|
396
|
+
type: Output
|
|
397
|
+
}], popover: [{
|
|
398
|
+
type: ViewChild,
|
|
399
|
+
args: [PopoverComponent]
|
|
400
|
+
}] } });
|
|
1237
401
|
|
|
1238
402
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
1239
403
|
/** @ignore */
|
|
@@ -1289,23 +453,107 @@ class ChartMarkerComponent {
|
|
|
1289
453
|
});
|
|
1290
454
|
}
|
|
1291
455
|
}
|
|
1292
|
-
ChartMarkerComponent
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
]
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
456
|
+
ChartMarkerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChartMarkerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
457
|
+
ChartMarkerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ChartMarkerComponent, selector: "nui-chart-marker", inputs: { marker: "marker", drawLine: "drawLine", color: "color", maxSize: "maxSize" }, viewQueries: [{ propertyName: "svgContent", first: true, predicate: ["svgContent"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<svg [attr.width]=\"width\" [attr.height]=\"height\" [attr.viewBox]=\"viewBox\">\n <g #svgContent></g>\n</svg>\n", styles: [":host{font-size:0}\n"] });
|
|
458
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChartMarkerComponent, decorators: [{
|
|
459
|
+
type: Component,
|
|
460
|
+
args: [{ selector: "nui-chart-marker", template: "<svg [attr.width]=\"width\" [attr.height]=\"height\" [attr.viewBox]=\"viewBox\">\n <g #svgContent></g>\n</svg>\n", styles: [":host{font-size:0}\n"] }]
|
|
461
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { marker: [{
|
|
462
|
+
type: Input
|
|
463
|
+
}], drawLine: [{
|
|
464
|
+
type: Input
|
|
465
|
+
}], color: [{
|
|
466
|
+
type: Input
|
|
467
|
+
}], maxSize: [{
|
|
468
|
+
type: Input
|
|
469
|
+
}], svgContent: [{
|
|
470
|
+
type: ViewChild,
|
|
471
|
+
args: ["svgContent"]
|
|
472
|
+
}] } });
|
|
473
|
+
|
|
474
|
+
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
475
|
+
//
|
|
476
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
477
|
+
// of this software and associated documentation files (the "Software"), to
|
|
478
|
+
// deal in the Software without restriction, including without limitation the
|
|
479
|
+
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
480
|
+
// sell copies of the Software, and to permit persons to whom the Software is
|
|
481
|
+
// furnished to do so, subject to the following conditions:
|
|
482
|
+
//
|
|
483
|
+
// The above copyright notice and this permission notice shall be included in
|
|
484
|
+
// all copies or substantial portions of the Software.
|
|
485
|
+
//
|
|
486
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
487
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
488
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
489
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
490
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
491
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
492
|
+
// THE SOFTWARE.
|
|
493
|
+
var RenderState;
|
|
494
|
+
(function (RenderState) {
|
|
495
|
+
RenderState["hidden"] = "hidden";
|
|
496
|
+
RenderState["deemphasized"] = "deemphasized";
|
|
497
|
+
RenderState["emphasized"] = "emphasized";
|
|
498
|
+
RenderState["default"] = "default";
|
|
499
|
+
})(RenderState || (RenderState = {}));
|
|
500
|
+
var RenderLayerName;
|
|
501
|
+
(function (RenderLayerName) {
|
|
502
|
+
RenderLayerName["background"] = "background";
|
|
503
|
+
RenderLayerName["data"] = "data";
|
|
504
|
+
RenderLayerName["unclippedData"] = "unclipped-data";
|
|
505
|
+
RenderLayerName["foreground"] = "foreground";
|
|
506
|
+
})(RenderLayerName || (RenderLayerName = {}));
|
|
507
|
+
|
|
508
|
+
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
509
|
+
const MOUSE_ACTIVE_EVENT = "mouse_active";
|
|
510
|
+
const INTERACTION_VALUES_ACTIVE_EVENT = "interaction_values_active";
|
|
511
|
+
const INTERACTION_VALUES_EVENT = "interaction_values";
|
|
512
|
+
const INTERACTION_COORDINATES_EVENT = "interaction_coordinates";
|
|
513
|
+
const HIGHLIGHT_DATA_POINT_EVENT = "highlight_data_point";
|
|
514
|
+
const SELECT_DATA_POINT_EVENT = "select_data_point";
|
|
515
|
+
const HIGHLIGHT_SERIES_EVENT = "highlight_series";
|
|
516
|
+
const INTERACTION_SERIES_EVENT = "interaction_series";
|
|
517
|
+
const INTERACTION_DATA_POINTS_EVENT = "interaction_data_points";
|
|
518
|
+
const INTERACTION_DATA_POINT_EVENT = "interaction_data_point";
|
|
519
|
+
const DESTROY_EVENT = "destroy";
|
|
520
|
+
const SET_DOMAIN_EVENT = "set_domain";
|
|
521
|
+
const REFRESH_EVENT = "refresh";
|
|
522
|
+
const CHART_VIEW_STATUS_EVENT = "chart_view_status";
|
|
523
|
+
const SERIES_STATE_CHANGE_EVENT = "series_state_change";
|
|
524
|
+
const AXES_STYLE_CHANGE_EVENT = "axes_style_change";
|
|
525
|
+
/** @ignore */
|
|
526
|
+
const CHART_COMPONENT = new InjectionToken("chart_component");
|
|
527
|
+
/** @ignore */
|
|
528
|
+
const STANDARD_RENDER_LAYERS = {
|
|
529
|
+
[RenderLayerName.background]: {
|
|
530
|
+
name: RenderLayerName.background,
|
|
531
|
+
order: 0,
|
|
532
|
+
clipped: true,
|
|
533
|
+
},
|
|
534
|
+
[RenderLayerName.data]: {
|
|
535
|
+
name: RenderLayerName.data,
|
|
536
|
+
order: 50,
|
|
537
|
+
clipped: true,
|
|
538
|
+
},
|
|
539
|
+
[RenderLayerName.unclippedData]: {
|
|
540
|
+
name: RenderLayerName.unclippedData,
|
|
541
|
+
// order is one greater than the data layer to ensure the unclipped data layer appears just after the data layer in the DOM
|
|
542
|
+
order: 51,
|
|
543
|
+
clipped: false,
|
|
544
|
+
},
|
|
545
|
+
[RenderLayerName.foreground]: {
|
|
546
|
+
name: RenderLayerName.foreground,
|
|
547
|
+
order: 1000,
|
|
548
|
+
clipped: false,
|
|
549
|
+
},
|
|
1308
550
|
};
|
|
551
|
+
/** @ignore */
|
|
552
|
+
const DATA_POINT_NOT_FOUND = -1;
|
|
553
|
+
/** @ignore */
|
|
554
|
+
const DATA_POINT_INTERACTION_RESET = -2;
|
|
555
|
+
/** Use this class to prevent DOM elements from triggering mouse-interactive-area events */
|
|
556
|
+
const IGNORE_INTERACTION_CLASS = "ignore-interaction";
|
|
1309
557
|
|
|
1310
558
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
1311
559
|
class EventBus {
|
|
@@ -1464,9 +712,11 @@ class ChartCollectionService {
|
|
|
1464
712
|
return collection;
|
|
1465
713
|
}
|
|
1466
714
|
}
|
|
1467
|
-
ChartCollectionService
|
|
1468
|
-
|
|
1469
|
-
|
|
715
|
+
ChartCollectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChartCollectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
716
|
+
ChartCollectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChartCollectionService });
|
|
717
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChartCollectionService, decorators: [{
|
|
718
|
+
type: Injectable
|
|
719
|
+
}] });
|
|
1470
720
|
|
|
1471
721
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
1472
722
|
/**
|
|
@@ -1486,18 +736,22 @@ class ChartCollectionIdDirective {
|
|
|
1486
736
|
.addChart(this.chartComponent.chart);
|
|
1487
737
|
}
|
|
1488
738
|
}
|
|
1489
|
-
ChartCollectionIdDirective
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
};
|
|
739
|
+
ChartCollectionIdDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChartCollectionIdDirective, deps: [{ token: CHART_COMPONENT }, { token: ChartCollectionService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
740
|
+
ChartCollectionIdDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ChartCollectionIdDirective, selector: "[nuiChartCollectionId]", inputs: { collectionId: ["nuiChartCollectionId", "collectionId"] }, ngImport: i0 });
|
|
741
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChartCollectionIdDirective, decorators: [{
|
|
742
|
+
type: Directive,
|
|
743
|
+
args: [{
|
|
744
|
+
selector: "[nuiChartCollectionId]",
|
|
745
|
+
}]
|
|
746
|
+
}], ctorParameters: function () {
|
|
747
|
+
return [{ type: undefined, decorators: [{
|
|
748
|
+
type: Inject,
|
|
749
|
+
args: [CHART_COMPONENT]
|
|
750
|
+
}] }, { type: ChartCollectionService }];
|
|
751
|
+
}, propDecorators: { collectionId: [{
|
|
752
|
+
type: Input,
|
|
753
|
+
args: ["nuiChartCollectionId"]
|
|
754
|
+
}] } });
|
|
1501
755
|
|
|
1502
756
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
1503
757
|
class ChartComponent {
|
|
@@ -1559,26 +813,28 @@ class ChartComponent {
|
|
|
1559
813
|
(_c = this.chart) === null || _c === void 0 ? void 0 : _c.destroy();
|
|
1560
814
|
}
|
|
1561
815
|
}
|
|
1562
|
-
ChartComponent
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
};
|
|
816
|
+
ChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChartComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
817
|
+
ChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ChartComponent, selector: "nui-chart", inputs: { chart: "chart" }, providers: [
|
|
818
|
+
{
|
|
819
|
+
provide: CHART_COMPONENT,
|
|
820
|
+
useExisting: forwardRef(() => ChartComponent),
|
|
821
|
+
},
|
|
822
|
+
], usesOnChanges: true, ngImport: i0, template: "", isInline: true });
|
|
823
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChartComponent, decorators: [{
|
|
824
|
+
type: Component,
|
|
825
|
+
args: [{
|
|
826
|
+
selector: "nui-chart",
|
|
827
|
+
template: "",
|
|
828
|
+
providers: [
|
|
829
|
+
{
|
|
830
|
+
provide: CHART_COMPONENT,
|
|
831
|
+
useExisting: forwardRef(() => ChartComponent),
|
|
832
|
+
},
|
|
833
|
+
],
|
|
834
|
+
}]
|
|
835
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { chart: [{
|
|
836
|
+
type: Input
|
|
837
|
+
}] } });
|
|
1582
838
|
|
|
1583
839
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
1584
840
|
//
|
|
@@ -1634,23 +890,24 @@ class LegendComponent {
|
|
|
1634
890
|
this.activeChanged.complete();
|
|
1635
891
|
}
|
|
1636
892
|
}
|
|
1637
|
-
LegendComponent
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
},
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
893
|
+
LegendComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LegendComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
894
|
+
LegendComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: LegendComponent, selector: "nui-legend", inputs: { active: "active", interactive: "interactive", orientation: "orientation", seriesColor: "seriesColor", seriesIcon: "seriesIcon", seriesUnitLabel: "seriesUnitLabel" }, host: { classAttribute: "d-inline-block" }, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"nui-legend d-flex flex-wrap\"\n [class.flex-column]=\"orientation === 'vertical'\"\n>\n <ng-content></ng-content>\n</div>\n" });
|
|
895
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LegendComponent, decorators: [{
|
|
896
|
+
type: Component,
|
|
897
|
+
args: [{ selector: "nui-legend", host: { class: "d-inline-block" }, encapsulation: ViewEncapsulation.Emulated, template: "<div\n class=\"nui-legend d-flex flex-wrap\"\n [class.flex-column]=\"orientation === 'vertical'\"\n>\n <ng-content></ng-content>\n</div>\n" }]
|
|
898
|
+
}], propDecorators: { active: [{
|
|
899
|
+
type: Input
|
|
900
|
+
}], interactive: [{
|
|
901
|
+
type: Input
|
|
902
|
+
}], orientation: [{
|
|
903
|
+
type: Input
|
|
904
|
+
}], seriesColor: [{
|
|
905
|
+
type: Input
|
|
906
|
+
}], seriesIcon: [{
|
|
907
|
+
type: Input
|
|
908
|
+
}], seriesUnitLabel: [{
|
|
909
|
+
type: Input
|
|
910
|
+
}] } });
|
|
1654
911
|
|
|
1655
912
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
1656
913
|
/** @ignore */
|
|
@@ -1742,46 +999,61 @@ class LegendSeriesComponent {
|
|
|
1742
999
|
this.projectedDescription.nativeElement.children.length !== 0);
|
|
1743
1000
|
}
|
|
1744
1001
|
}
|
|
1745
|
-
LegendSeriesComponent
|
|
1746
|
-
{ type:
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
}
|
|
1002
|
+
LegendSeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LegendSeriesComponent, deps: [{ token: LegendComponent, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
1003
|
+
LegendSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: LegendSeriesComponent, selector: "nui-legend-series", inputs: { active: "active", interactive: "interactive", isSelected: "isSelected", descriptionPrimary: "descriptionPrimary", descriptionSecondary: "descriptionSecondary", icon: "icon", color: "color", seriesRenderState: "seriesRenderState" }, outputs: { isSelectedChange: "isSelectedChange" }, host: { listeners: { "click": "onClick()" }, properties: { "class.nui-legend-series--interactive": "this.isInteractiveClassApplied", "class.nui-legend-series--horizontal": "this.isHorizontalClassApplied", "class.inverse": "this.isActiveClassApplied" }, classAttribute: "nui-legend-series" }, viewQueries: [{ propertyName: "projectedDescription", first: true, predicate: ["projectedDescription"], descendants: true }], ngImport: i0, template: "<div\n class=\"d-flex\"\n [ngClass]=\"['nui-legend-series--state-' + seriesRenderState]\"\n [class.nui-legend-series--deselected]=\"!isSelected\"\n>\n <div class=\"nui-legend-series__tile-wrapper\">\n <div class=\"nui-legend-series__tile\">\n <ng-content></ng-content>\n </div>\n <div\n class=\"nui-legend-series__checkbox-wrapper\"\n [class.nui-legend-series__checkbox--checked]=\"isSelected\"\n >\n <div class=\"nui-legend-series__checkbox-mark\">\n <i class=\"nui-legend-series__checkbox-glyph\"></i>\n </div>\n </div>\n </div>\n <div\n *ngIf=\"hasInputDescription(); else descriptionTemplate\"\n class=\"description-container nui-text-small d-flex flex-column justify-content-center\"\n >\n <div\n *ngIf=\"!!descriptionPrimary\"\n class=\"description description-primary\"\n [title]=\"descriptionPrimary\"\n >\n {{ descriptionPrimary }}\n </div>\n <div\n *ngIf=\"!!descriptionSecondary\"\n class=\"description description-secondary\"\n [title]=\"descriptionSecondary\"\n >\n {{ descriptionSecondary }}\n </div>\n </div>\n</div>\n<ng-template #descriptionTemplate>\n <div class=\"d-flex\" #projectedDescription>\n <ng-content select=\"[description]\"></ng-content>\n </div>\n</ng-template>\n", directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1004
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LegendSeriesComponent, decorators: [{
|
|
1005
|
+
type: Component,
|
|
1006
|
+
args: [{ host: { class: LEGEND_SERIES_CLASS_NAME }, selector: "nui-legend-series", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"d-flex\"\n [ngClass]=\"['nui-legend-series--state-' + seriesRenderState]\"\n [class.nui-legend-series--deselected]=\"!isSelected\"\n>\n <div class=\"nui-legend-series__tile-wrapper\">\n <div class=\"nui-legend-series__tile\">\n <ng-content></ng-content>\n </div>\n <div\n class=\"nui-legend-series__checkbox-wrapper\"\n [class.nui-legend-series__checkbox--checked]=\"isSelected\"\n >\n <div class=\"nui-legend-series__checkbox-mark\">\n <i class=\"nui-legend-series__checkbox-glyph\"></i>\n </div>\n </div>\n </div>\n <div\n *ngIf=\"hasInputDescription(); else descriptionTemplate\"\n class=\"description-container nui-text-small d-flex flex-column justify-content-center\"\n >\n <div\n *ngIf=\"!!descriptionPrimary\"\n class=\"description description-primary\"\n [title]=\"descriptionPrimary\"\n >\n {{ descriptionPrimary }}\n </div>\n <div\n *ngIf=\"!!descriptionSecondary\"\n class=\"description description-secondary\"\n [title]=\"descriptionSecondary\"\n >\n {{ descriptionSecondary }}\n </div>\n </div>\n</div>\n<ng-template #descriptionTemplate>\n <div class=\"d-flex\" #projectedDescription>\n <ng-content select=\"[description]\"></ng-content>\n </div>\n</ng-template>\n" }]
|
|
1007
|
+
}], ctorParameters: function () {
|
|
1008
|
+
return [{ type: LegendComponent, decorators: [{
|
|
1009
|
+
type: Optional
|
|
1010
|
+
}, {
|
|
1011
|
+
type: Host
|
|
1012
|
+
}] }];
|
|
1013
|
+
}, propDecorators: { active: [{
|
|
1014
|
+
type: Input
|
|
1015
|
+
}], interactive: [{
|
|
1016
|
+
type: Input
|
|
1017
|
+
}], isSelected: [{
|
|
1018
|
+
type: Input
|
|
1019
|
+
}], isSelectedChange: [{
|
|
1020
|
+
type: Output
|
|
1021
|
+
}], descriptionPrimary: [{
|
|
1022
|
+
type: Input
|
|
1023
|
+
}], descriptionSecondary: [{
|
|
1024
|
+
type: Input
|
|
1025
|
+
}], icon: [{
|
|
1026
|
+
type: Input
|
|
1027
|
+
}], color: [{
|
|
1028
|
+
type: Input
|
|
1029
|
+
}], seriesRenderState: [{
|
|
1030
|
+
type: Input
|
|
1031
|
+
}], projectedDescription: [{
|
|
1032
|
+
type: ViewChild,
|
|
1033
|
+
args: ["projectedDescription"]
|
|
1034
|
+
}], isInteractiveClassApplied: [{
|
|
1035
|
+
type: HostBinding,
|
|
1036
|
+
args: [`class.${LEGEND_SERIES_CLASS_NAME}--interactive`]
|
|
1037
|
+
}], isHorizontalClassApplied: [{
|
|
1038
|
+
type: HostBinding,
|
|
1039
|
+
args: [`class.${LEGEND_SERIES_CLASS_NAME}--horizontal`]
|
|
1040
|
+
}], isActiveClassApplied: [{
|
|
1041
|
+
type: HostBinding,
|
|
1042
|
+
args: [`class.inverse`]
|
|
1043
|
+
}], onClick: [{
|
|
1044
|
+
type: HostListener,
|
|
1045
|
+
args: ["click"]
|
|
1046
|
+
}] } });
|
|
1773
1047
|
|
|
1774
1048
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
1775
1049
|
class BasicLegendTileComponent {
|
|
1776
1050
|
}
|
|
1777
|
-
BasicLegendTileComponent
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
},] }
|
|
1784
|
-
];
|
|
1051
|
+
BasicLegendTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BasicLegendTileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1052
|
+
BasicLegendTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: BasicLegendTileComponent, selector: "nui-basic-legend-tile", ngImport: i0, template: "<div class=\"nui-basic-legend-tile\">\n <ng-content></ng-content>\n</div>\n", styles: [".nui-basic-legend-tile{height:100%;min-height:30px;min-width:30px;display:flex;align-items:center;justify-content:center}\n"] });
|
|
1053
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BasicLegendTileComponent, decorators: [{
|
|
1054
|
+
type: Component,
|
|
1055
|
+
args: [{ selector: "nui-basic-legend-tile", encapsulation: ViewEncapsulation.Emulated, template: "<div class=\"nui-basic-legend-tile\">\n <ng-content></ng-content>\n</div>\n", styles: [".nui-basic-legend-tile{height:100%;min-height:30px;min-width:30px;display:flex;align-items:center;justify-content:center}\n"] }]
|
|
1056
|
+
}] });
|
|
1785
1057
|
|
|
1786
1058
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
1787
1059
|
class RichLegendTileComponent {
|
|
@@ -1812,25 +1084,62 @@ class RichLegendTileComponent {
|
|
|
1812
1084
|
return !isNil(this.unitLabel);
|
|
1813
1085
|
}
|
|
1814
1086
|
}
|
|
1815
|
-
RichLegendTileComponent
|
|
1816
|
-
{ type:
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
];
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1087
|
+
RichLegendTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: RichLegendTileComponent, deps: [{ token: LegendSeriesComponent, host: true }, { token: LegendComponent, host: true, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1088
|
+
RichLegendTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: RichLegendTileComponent, selector: "nui-rich-legend-tile", inputs: { unitLabel: "unitLabel", value: "value", backgroundColor: "backgroundColor", color: "color" }, ngImport: i0, template: "<div\n class=\"nui-rich-legend-tile\"\n [class.nui-rich-legend-tile--has-point-marker]=\"\n rightEdge.children.length > 0\n \"\n [class.nui-rich-legend-tile--series-has-additional-content]=\"\n seriesHasAdditionalContent\n \"\n>\n <div\n class=\"nui-rich-legend-tile__tilebox d-flex justify-content-center align-items-end flex-column\"\n [ngStyle]=\"{ 'background-color': backgroundColor }\"\n [style.color]=\"color\"\n >\n <div\n *ngIf=\"hasInputValue(); else projectedTopContent\"\n class=\"nui-rich-legend-tile__tilebox-value nui-rich-legend-tile__ellipsified\"\n >\n {{ value }}\n </div>\n <div\n *ngIf=\"hasInputUnitLabel(); else projectedBottomContent\"\n class=\"nui-rich-legend-tile__tilebox-unit nui-rich-legend-tile__ellipsified\"\n >\n {{ unitLabel }}\n </div>\n <ng-content></ng-content>\n </div>\n <div class=\"nui-rich-legend-tile__icon\" #icon>\n <ng-content select=\"[leftEdge]\"></ng-content>\n </div>\n <div class=\"nui-rich-legend-tile__point-marker\" #rightEdge>\n <ng-content select=\"[rightEdge]\"></ng-content>\n </div>\n</div>\n<ng-template #projectedTopContent>\n <ng-content select=\"[top]\"></ng-content>\n</ng-template>\n<ng-template #projectedBottomContent>\n <ng-content select=\"[bottom]\"></ng-content>\n</ng-template>\n", styles: [".nui-rich-legend-tile{position:relative;width:60px;height:100%;line-height:18px}.nui-rich-legend-tile :empty{display:none}.nui-rich-legend-tile__tilebox{width:100%;height:100%;padding:0 5px;background-color:var(--nui-color-bg-light,#fff)}.nui-rich-legend-tile__ellipsified{max-width:100%;overflow:hidden;text-overflow:ellipsis}.nui-rich-legend-tile__tilebox-value{text-align:right;font-weight:600}.nui-rich-legend-tile__tilebox-value:not(:last-child){margin-bottom:-3px}.nui-rich-legend-tile__tilebox-unit{text-align:right;font-size:11px}.nui-rich-legend-tile__tilebox-unit:not(:first-child){margin-top:-3px}.nui-rich-legend-tile__point-marker,.nui-rich-legend-tile__icon{position:absolute;line-height:0;top:50%;pointer-events:none}.nui-rich-legend-tile__point-marker{right:0;transform:translate(50%,-50%)}.nui-rich-legend-tile__icon{left:0;transform:translate(-50%,-50%)}.nui-rich-legend-tile--has-point-marker.nui-rich-legend-tile--series-has-additional-content{margin-right:5px}.nui-rich-legend-tile--has-point-marker .nui-rich-legend-tile__tilebox{padding-right:7px}\n"], directives: [{ type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1089
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: RichLegendTileComponent, decorators: [{
|
|
1090
|
+
type: Component,
|
|
1091
|
+
args: [{ selector: "nui-rich-legend-tile", encapsulation: ViewEncapsulation.Emulated, template: "<div\n class=\"nui-rich-legend-tile\"\n [class.nui-rich-legend-tile--has-point-marker]=\"\n rightEdge.children.length > 0\n \"\n [class.nui-rich-legend-tile--series-has-additional-content]=\"\n seriesHasAdditionalContent\n \"\n>\n <div\n class=\"nui-rich-legend-tile__tilebox d-flex justify-content-center align-items-end flex-column\"\n [ngStyle]=\"{ 'background-color': backgroundColor }\"\n [style.color]=\"color\"\n >\n <div\n *ngIf=\"hasInputValue(); else projectedTopContent\"\n class=\"nui-rich-legend-tile__tilebox-value nui-rich-legend-tile__ellipsified\"\n >\n {{ value }}\n </div>\n <div\n *ngIf=\"hasInputUnitLabel(); else projectedBottomContent\"\n class=\"nui-rich-legend-tile__tilebox-unit nui-rich-legend-tile__ellipsified\"\n >\n {{ unitLabel }}\n </div>\n <ng-content></ng-content>\n </div>\n <div class=\"nui-rich-legend-tile__icon\" #icon>\n <ng-content select=\"[leftEdge]\"></ng-content>\n </div>\n <div class=\"nui-rich-legend-tile__point-marker\" #rightEdge>\n <ng-content select=\"[rightEdge]\"></ng-content>\n </div>\n</div>\n<ng-template #projectedTopContent>\n <ng-content select=\"[top]\"></ng-content>\n</ng-template>\n<ng-template #projectedBottomContent>\n <ng-content select=\"[bottom]\"></ng-content>\n</ng-template>\n", styles: [".nui-rich-legend-tile{position:relative;width:60px;height:100%;line-height:18px}.nui-rich-legend-tile :empty{display:none}.nui-rich-legend-tile__tilebox{width:100%;height:100%;padding:0 5px;background-color:var(--nui-color-bg-light,#fff)}.nui-rich-legend-tile__ellipsified{max-width:100%;overflow:hidden;text-overflow:ellipsis}.nui-rich-legend-tile__tilebox-value{text-align:right;font-weight:600}.nui-rich-legend-tile__tilebox-value:not(:last-child){margin-bottom:-3px}.nui-rich-legend-tile__tilebox-unit{text-align:right;font-size:11px}.nui-rich-legend-tile__tilebox-unit:not(:first-child){margin-top:-3px}.nui-rich-legend-tile__point-marker,.nui-rich-legend-tile__icon{position:absolute;line-height:0;top:50%;pointer-events:none}.nui-rich-legend-tile__point-marker{right:0;transform:translate(50%,-50%)}.nui-rich-legend-tile__icon{left:0;transform:translate(-50%,-50%)}.nui-rich-legend-tile--has-point-marker.nui-rich-legend-tile--series-has-additional-content{margin-right:5px}.nui-rich-legend-tile--has-point-marker .nui-rich-legend-tile__tilebox{padding-right:7px}\n"] }]
|
|
1092
|
+
}], ctorParameters: function () {
|
|
1093
|
+
return [{ type: LegendSeriesComponent, decorators: [{
|
|
1094
|
+
type: Host
|
|
1095
|
+
}] }, { type: LegendComponent, decorators: [{
|
|
1096
|
+
type: Optional
|
|
1097
|
+
}, {
|
|
1098
|
+
type: Host
|
|
1099
|
+
}] }, { type: i0.ChangeDetectorRef }];
|
|
1100
|
+
}, propDecorators: { unitLabel: [{
|
|
1101
|
+
type: Input
|
|
1102
|
+
}], value: [{
|
|
1103
|
+
type: Input
|
|
1104
|
+
}], backgroundColor: [{
|
|
1105
|
+
type: Input
|
|
1106
|
+
}], color: [{
|
|
1107
|
+
type: Input
|
|
1108
|
+
}] } });
|
|
1109
|
+
|
|
1110
|
+
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
1111
|
+
//
|
|
1112
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1113
|
+
// of this software and associated documentation files (the "Software"), to
|
|
1114
|
+
// deal in the Software without restriction, including without limitation the
|
|
1115
|
+
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
1116
|
+
// sell copies of the Software, and to permit persons to whom the Software is
|
|
1117
|
+
// furnished to do so, subject to the following conditions:
|
|
1118
|
+
//
|
|
1119
|
+
// The above copyright notice and this permission notice shall be included in
|
|
1120
|
+
// all copies or substantial portions of the Software.
|
|
1121
|
+
//
|
|
1122
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1123
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1124
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1125
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1126
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1127
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1128
|
+
// THE SOFTWARE.
|
|
1129
|
+
/** Domain for series with empty or null data */
|
|
1130
|
+
const EMPTY_CONTINUOUS_DOMAIN = [0, 0];
|
|
1131
|
+
/** A reasonable non-data-driven domain for charts */
|
|
1132
|
+
const NORMALIZED_DOMAIN = [0, 1];
|
|
1133
|
+
/** Type guard for the domain calculator with ticks */
|
|
1134
|
+
function isDomainWithTicksCalculator(obj) {
|
|
1135
|
+
return !!obj.domainWithTicks;
|
|
1136
|
+
}
|
|
1137
|
+
function isBandScale(scale) {
|
|
1138
|
+
return typeof scale.bandwidth === "function";
|
|
1139
|
+
}
|
|
1140
|
+
function hasInnerScale(scale) {
|
|
1141
|
+
return typeof scale.innerScale !== "undefined";
|
|
1142
|
+
}
|
|
1834
1143
|
|
|
1835
1144
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
1836
1145
|
function getColorValueByName(colorVariable) {
|
|
@@ -2177,14 +1486,13 @@ const emptyShapes = [
|
|
|
2177
1486
|
"m0 4-4-8 8.001 0-4.001 8zm0-3.354 1.573-3.146-3.145 0 1.572 3.146z",
|
|
2178
1487
|
"m0-1.951-2.237 1.626.855 2.63 2.766 0 .855-2.63-2.237-1.626zm0-1.854 4.001 2.907-1.528 4.703-4.945 0-1.528-4.703 4.001-2.907z", // pentagon empty
|
|
2179
1488
|
];
|
|
2180
|
-
const ɵ1$1 = (s) => `<path class="nui-chart--path__outline" d="${s}"></path>`, ɵ2$1 = (s, i) => `<path class="nui-chart--path__outline-fill" stroke="none" d="${regularShapes[i]}"></path>
|
|
2181
|
-
<path class="nui-chart--path__outline" d="${s}"></path>`, ɵ0$1 = (s) => new SvgMarker(s);
|
|
2182
1489
|
/* eslint-enable max-len */
|
|
2183
1490
|
/** Default chart marker set */
|
|
2184
1491
|
const CHART_MARKERS = [
|
|
2185
|
-
...regularShapes.map(
|
|
2186
|
-
...emptyShapes.map(
|
|
2187
|
-
|
|
1492
|
+
...regularShapes.map((s) => `<path class="nui-chart--path__outline" d="${s}"></path>`),
|
|
1493
|
+
...emptyShapes.map((s, i) => `<path class="nui-chart--path__outline-fill" stroke="none" d="${regularShapes[i]}"></path>
|
|
1494
|
+
<path class="nui-chart--path__outline" d="${s}"></path>`),
|
|
1495
|
+
].map((s) => new SvgMarker(s));
|
|
2188
1496
|
|
|
2189
1497
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
2190
1498
|
/**
|
|
@@ -2410,17 +1718,174 @@ function convert(scale, value, position = BAND_CENTER, levels = Number.MAX_VALUE
|
|
|
2410
1718
|
if (!isBandScale(scale)) {
|
|
2411
1719
|
return scale.convert(value);
|
|
2412
1720
|
}
|
|
2413
|
-
const bandScale = scale;
|
|
2414
|
-
if (!isArray(value)) {
|
|
2415
|
-
return bandScale.convert(value, position);
|
|
1721
|
+
const bandScale = scale;
|
|
1722
|
+
if (!isArray(value)) {
|
|
1723
|
+
return bandScale.convert(value, position);
|
|
1724
|
+
}
|
|
1725
|
+
const values = value;
|
|
1726
|
+
if (values.length === 1 || !bandScale.innerScale || levels <= 1) {
|
|
1727
|
+
return bandScale.convert(values[0], position);
|
|
1728
|
+
}
|
|
1729
|
+
return (bandScale.convert(values[0], 0) +
|
|
1730
|
+
convert(bandScale.innerScale, values.slice(1), position, levels - 1));
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
1734
|
+
/**
|
|
1735
|
+
* The abstract base class for chart renderers with some limited default functionality
|
|
1736
|
+
*/
|
|
1737
|
+
// For why the "dynamic" decorator is used see https://github.com/ng-packagr/ng-packagr/issues/641
|
|
1738
|
+
// @dynamic
|
|
1739
|
+
class Renderer {
|
|
1740
|
+
constructor(config = {}) {
|
|
1741
|
+
this.config = config;
|
|
1742
|
+
this.interaction = {};
|
|
1743
|
+
/**
|
|
1744
|
+
* Get the style attributes for the specified state that we need to apply to a series container
|
|
1745
|
+
*
|
|
1746
|
+
* @param {RenderState} state the state for which to retrieve container styles
|
|
1747
|
+
*
|
|
1748
|
+
* @returns {ValueMap<any, any>} the container styles for the specified state
|
|
1749
|
+
*/
|
|
1750
|
+
this.getContainerStateStyles = (state) => {
|
|
1751
|
+
if (!this.config.stateStyles) {
|
|
1752
|
+
throw new Error("stateStyles property is not defined");
|
|
1753
|
+
}
|
|
1754
|
+
return this.config.stateStyles[state || RenderState.default];
|
|
1755
|
+
};
|
|
1756
|
+
// setting default values to the properties that were not set by user
|
|
1757
|
+
this.config = defaultsDeep(this.config, Renderer.DEFAULT_CONFIG);
|
|
1758
|
+
}
|
|
1759
|
+
/**
|
|
1760
|
+
* Based on provided values, return the nearest data point that the given coordinates represent. This is used for mouse hover behavior
|
|
1761
|
+
*
|
|
1762
|
+
* @param {IDataSeries} series series from which to determine the index corresponding to the specified values
|
|
1763
|
+
* @param {{ [axis: string]: any }} values the values from which a data point index can be determined
|
|
1764
|
+
* @param {Scales} scales the scales to be used in the index calculation
|
|
1765
|
+
*
|
|
1766
|
+
* @returns {number} negative value means that index is not found
|
|
1767
|
+
*/
|
|
1768
|
+
getDataPointIndex(series, values, scales) {
|
|
1769
|
+
return DATA_POINT_NOT_FOUND;
|
|
1770
|
+
}
|
|
1771
|
+
/**
|
|
1772
|
+
* Highlight the data point corresponding to the specified data point index
|
|
1773
|
+
*
|
|
1774
|
+
* @param {IRenderSeries} renderSeries The series on which to render the data point highlight
|
|
1775
|
+
* @param {number} dataPointIndex index of the highlighted point within the data series (pass -1 to remove the highlight marker)
|
|
1776
|
+
* @param {Subject<IRendererEventPayload>} rendererSubject A subject to optionally invoke for emitting events regarding a data point
|
|
1777
|
+
*/
|
|
1778
|
+
highlightDataPoint(renderSeries, dataPointIndex, rendererSubject) { }
|
|
1779
|
+
/**
|
|
1780
|
+
* Set the RenderState of the target data series
|
|
1781
|
+
*
|
|
1782
|
+
* @param {IRenderContainers} renderContainers the render containers of the series
|
|
1783
|
+
* @param {RenderState} state The new state for the target series
|
|
1784
|
+
*/
|
|
1785
|
+
setSeriesState(renderContainers, state) { }
|
|
1786
|
+
/**
|
|
1787
|
+
* Set the RenderState of the target data point
|
|
1788
|
+
*
|
|
1789
|
+
* @param {D3Selection} target the target data point
|
|
1790
|
+
* @param {RenderState} state The new state for the target data point
|
|
1791
|
+
*/
|
|
1792
|
+
setDataPointState(target, state) { }
|
|
1793
|
+
/**
|
|
1794
|
+
* Calculate domain for data filtered by given filterScales
|
|
1795
|
+
*
|
|
1796
|
+
* @param dataSeries
|
|
1797
|
+
* @param filterScales
|
|
1798
|
+
* @param scaleKey
|
|
1799
|
+
* @param scale
|
|
1800
|
+
* @returns array of datapoints from <code>dataSeries</code> filtered by domains of given <code>filterScale</code>s
|
|
1801
|
+
*/
|
|
1802
|
+
getDomainOfFilteredData(dataSeries, filterScales, scaleKey, scale) {
|
|
1803
|
+
let filteredData = dataSeries.data;
|
|
1804
|
+
for (const fixedScaleKey of Object.keys(filterScales)) {
|
|
1805
|
+
const filterScale = filterScales[fixedScaleKey];
|
|
1806
|
+
if (!filterScale.isDomainFixed || !filterScale.isContinuous()) {
|
|
1807
|
+
continue;
|
|
1808
|
+
}
|
|
1809
|
+
filteredData = this.filterDataByDomain(filteredData, dataSeries, fixedScaleKey, filterScale.domain());
|
|
1810
|
+
}
|
|
1811
|
+
return this.getDomain(filteredData, dataSeries, scaleKey, scale);
|
|
1812
|
+
}
|
|
1813
|
+
/**
|
|
1814
|
+
* Calculate the domain using the data of a series
|
|
1815
|
+
*
|
|
1816
|
+
* @param {any[]} data source data, can be filtered
|
|
1817
|
+
* @param dataSeries related data series
|
|
1818
|
+
* @param {string} scaleName name of the scale for which domain calculation is needed
|
|
1819
|
+
* @param scale
|
|
1820
|
+
*
|
|
1821
|
+
* @returns {[any, any]} min and max values as an array
|
|
1822
|
+
*/
|
|
1823
|
+
getDomain(data, dataSeries, scaleName, scale) {
|
|
1824
|
+
if (!data || data.length === 0) {
|
|
1825
|
+
return EMPTY_CONTINUOUS_DOMAIN;
|
|
1826
|
+
}
|
|
1827
|
+
return extent(data, (datum, index, arr) => { var _a, _b; return (_b = (_a = dataSeries.accessors.data) === null || _a === void 0 ? void 0 : _a[scaleName]) === null || _b === void 0 ? void 0 : _b.call(_a, datum, index, Array.from(arr), dataSeries); });
|
|
1828
|
+
}
|
|
1829
|
+
/**
|
|
1830
|
+
* Filters given dataset by domain of provided scale
|
|
1831
|
+
*
|
|
1832
|
+
* @param data
|
|
1833
|
+
* @param dataSeries
|
|
1834
|
+
* @param scaleName
|
|
1835
|
+
* @param domain
|
|
1836
|
+
*/
|
|
1837
|
+
filterDataByDomain(data, dataSeries, scaleName, domain) {
|
|
1838
|
+
var _a;
|
|
1839
|
+
const accessor = (_a = dataSeries.accessors.data) === null || _a === void 0 ? void 0 : _a[scaleName];
|
|
1840
|
+
// if (isNil(accessor)) {
|
|
1841
|
+
// throw new Error("accessor is not defined");
|
|
1842
|
+
// }
|
|
1843
|
+
return data.filter((d, i) => {
|
|
1844
|
+
// @ts-ignore
|
|
1845
|
+
const value = accessor(d, i, data, dataSeries);
|
|
1846
|
+
return value >= domain[0] && value <= domain[1];
|
|
1847
|
+
});
|
|
1848
|
+
}
|
|
1849
|
+
/**
|
|
1850
|
+
* Get the definitions of lasagna layers required for visualizing data
|
|
1851
|
+
*
|
|
1852
|
+
* @returns {ILasagnaLayer[]} lasagna layer definitions
|
|
1853
|
+
*/
|
|
1854
|
+
getRequiredLayers() {
|
|
1855
|
+
return [STANDARD_RENDER_LAYERS[RenderLayerName.data]];
|
|
2416
1856
|
}
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
1857
|
+
setupInteraction(path, nativeEvent, target, dataPointSubject, dataPoint) {
|
|
1858
|
+
const eventList = get(this.interaction, path, {})[nativeEvent];
|
|
1859
|
+
if (!eventList) {
|
|
1860
|
+
return;
|
|
1861
|
+
}
|
|
1862
|
+
each(eventList, (targetEvent) => {
|
|
1863
|
+
target.on(nativeEvent, () => {
|
|
1864
|
+
const bbox = target.node().getBoundingClientRect();
|
|
1865
|
+
dataPointSubject.next({
|
|
1866
|
+
eventName: targetEvent,
|
|
1867
|
+
data: Object.assign(Object.assign({}, dataPoint), { position: bbox }),
|
|
1868
|
+
});
|
|
1869
|
+
});
|
|
1870
|
+
});
|
|
2420
1871
|
}
|
|
2421
|
-
return (bandScale.convert(values[0], 0) +
|
|
2422
|
-
convert(bandScale.innerScale, values.slice(1), position, levels - 1));
|
|
2423
1872
|
}
|
|
1873
|
+
Renderer.DEFAULT_CONFIG = {
|
|
1874
|
+
stateStyles: {
|
|
1875
|
+
[RenderState.default]: {
|
|
1876
|
+
opacity: 1,
|
|
1877
|
+
},
|
|
1878
|
+
[RenderState.hidden]: {
|
|
1879
|
+
opacity: 0,
|
|
1880
|
+
},
|
|
1881
|
+
[RenderState.deemphasized]: {
|
|
1882
|
+
opacity: 0.1,
|
|
1883
|
+
},
|
|
1884
|
+
[RenderState.emphasized]: {
|
|
1885
|
+
opacity: 1,
|
|
1886
|
+
},
|
|
1887
|
+
},
|
|
1888
|
+
};
|
|
2424
1889
|
|
|
2425
1890
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
2426
1891
|
function invert(scale, coordinate) {
|
|
@@ -2829,10 +2294,7 @@ class BarRenderer extends XYRenderer {
|
|
|
2829
2294
|
getDomain(data, dataSeries, scaleKey, scale) {
|
|
2830
2295
|
const accessors = dataSeries.accessors.data;
|
|
2831
2296
|
const accessorSuffix = scaleKey.toUpperCase();
|
|
2832
|
-
const accessor = (name) => (d, i, arr) => {
|
|
2833
|
-
var _a;
|
|
2834
|
-
return (_a = accessors[name + accessorSuffix]) === null || _a === void 0 ? void 0 : _a.call(accessors, d, i, Array.from(arr), dataSeries);
|
|
2835
|
-
};
|
|
2297
|
+
const accessor = (name) => (d, i, arr) => { var _a; return (_a = accessors[name + accessorSuffix]) === null || _a === void 0 ? void 0 : _a.call(accessors, d, i, Array.from(arr), dataSeries); };
|
|
2836
2298
|
if (scale.isContinuous()) {
|
|
2837
2299
|
return !data || data.length === 0
|
|
2838
2300
|
? EMPTY_CONTINUOUS_DOMAIN
|
|
@@ -3052,6 +2514,44 @@ function isInRange(scale, px) {
|
|
|
3052
2514
|
return px >= min && px <= max;
|
|
3053
2515
|
}
|
|
3054
2516
|
|
|
2517
|
+
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
2518
|
+
//
|
|
2519
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
2520
|
+
// of this software and associated documentation files (the "Software"), to
|
|
2521
|
+
// deal in the Software without restriction, including without limitation the
|
|
2522
|
+
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
2523
|
+
// sell copies of the Software, and to permit persons to whom the Software is
|
|
2524
|
+
// furnished to do so, subject to the following conditions:
|
|
2525
|
+
//
|
|
2526
|
+
// The above copyright notice and this permission notice shall be included in
|
|
2527
|
+
// all copies or substantial portions of the Software.
|
|
2528
|
+
//
|
|
2529
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
2530
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2531
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
2532
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2533
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
2534
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
2535
|
+
// THE SOFTWARE.
|
|
2536
|
+
/** Mouse interaction types */
|
|
2537
|
+
var InteractionType;
|
|
2538
|
+
(function (InteractionType) {
|
|
2539
|
+
/** Indicates that an element has been clicked */
|
|
2540
|
+
InteractionType["Click"] = "click";
|
|
2541
|
+
/** Indicates that an element is hovered */
|
|
2542
|
+
InteractionType["Hover"] = "hover";
|
|
2543
|
+
/** Indicates a 'mousedown' event */
|
|
2544
|
+
InteractionType["MouseDown"] = "mousedown";
|
|
2545
|
+
/** Indicates that the mouse has entered the bounds of an element */
|
|
2546
|
+
InteractionType["MouseEnter"] = "mouseenter";
|
|
2547
|
+
/** Indicates that the mouse has left the bounds of an element */
|
|
2548
|
+
InteractionType["MouseLeave"] = "mouseleave";
|
|
2549
|
+
/** Indicates a movement of the mouse across the chart */
|
|
2550
|
+
InteractionType["MouseMove"] = "mousemove";
|
|
2551
|
+
/** Indicates a 'mouseup' event */
|
|
2552
|
+
InteractionType["MouseUp"] = "mouseup";
|
|
2553
|
+
})(InteractionType || (InteractionType = {}));
|
|
2554
|
+
|
|
3055
2555
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
3056
2556
|
class MarkerUtils {
|
|
3057
2557
|
/**
|
|
@@ -3858,50 +3358,75 @@ class ThresholdsService {
|
|
|
3858
3358
|
}
|
|
3859
3359
|
}
|
|
3860
3360
|
ThresholdsService.SERIES_ID_SUFFIX = "__thresholds-background";
|
|
3861
|
-
ThresholdsService
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
];
|
|
3361
|
+
ThresholdsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThresholdsService, deps: [{ token: i1$2.LoggerService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3362
|
+
ThresholdsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThresholdsService });
|
|
3363
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThresholdsService, decorators: [{
|
|
3364
|
+
type: Injectable
|
|
3365
|
+
}], ctorParameters: function () { return [{ type: i1$2.LoggerService }]; } });
|
|
3867
3366
|
|
|
3868
3367
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
3869
3368
|
class NuiChartsModule {
|
|
3870
3369
|
}
|
|
3871
|
-
NuiChartsModule
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3370
|
+
NuiChartsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NuiChartsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3371
|
+
NuiChartsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NuiChartsModule, declarations: [LegendComponent,
|
|
3372
|
+
LegendSeriesComponent,
|
|
3373
|
+
BasicLegendTileComponent,
|
|
3374
|
+
RichLegendTileComponent,
|
|
3375
|
+
ChartComponent,
|
|
3376
|
+
ChartCollectionIdDirective,
|
|
3377
|
+
ChartMarkerComponent,
|
|
3378
|
+
ChartPopoverComponent,
|
|
3379
|
+
ChartDonutContentComponent,
|
|
3380
|
+
ChartTooltipsComponent,
|
|
3381
|
+
ChartTooltipComponent,
|
|
3382
|
+
ChartTooltipDirective], imports: [NuiCommonModule, NuiIconModule, NuiPopoverModule, OverlayModule], exports: [LegendComponent,
|
|
3383
|
+
LegendSeriesComponent,
|
|
3384
|
+
RichLegendTileComponent,
|
|
3385
|
+
BasicLegendTileComponent,
|
|
3386
|
+
ChartComponent,
|
|
3387
|
+
ChartCollectionIdDirective,
|
|
3388
|
+
ChartMarkerComponent,
|
|
3389
|
+
ChartPopoverComponent,
|
|
3390
|
+
ChartDonutContentComponent,
|
|
3391
|
+
ChartTooltipsComponent,
|
|
3392
|
+
ChartTooltipComponent,
|
|
3393
|
+
ChartTooltipDirective] });
|
|
3394
|
+
NuiChartsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NuiChartsModule, providers: [ChartCollectionService, ThresholdsService], imports: [[NuiCommonModule, NuiIconModule, NuiPopoverModule, OverlayModule]] });
|
|
3395
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NuiChartsModule, decorators: [{
|
|
3396
|
+
type: NgModule,
|
|
3397
|
+
args: [{
|
|
3398
|
+
imports: [NuiCommonModule, NuiIconModule, NuiPopoverModule, OverlayModule],
|
|
3399
|
+
declarations: [
|
|
3400
|
+
LegendComponent,
|
|
3401
|
+
LegendSeriesComponent,
|
|
3402
|
+
BasicLegendTileComponent,
|
|
3403
|
+
RichLegendTileComponent,
|
|
3404
|
+
ChartComponent,
|
|
3405
|
+
ChartCollectionIdDirective,
|
|
3406
|
+
ChartMarkerComponent,
|
|
3407
|
+
ChartPopoverComponent,
|
|
3408
|
+
ChartDonutContentComponent,
|
|
3409
|
+
ChartTooltipsComponent,
|
|
3410
|
+
ChartTooltipComponent,
|
|
3411
|
+
ChartTooltipDirective,
|
|
3412
|
+
],
|
|
3413
|
+
exports: [
|
|
3414
|
+
LegendComponent,
|
|
3415
|
+
LegendSeriesComponent,
|
|
3416
|
+
RichLegendTileComponent,
|
|
3417
|
+
BasicLegendTileComponent,
|
|
3418
|
+
ChartComponent,
|
|
3419
|
+
ChartCollectionIdDirective,
|
|
3420
|
+
ChartMarkerComponent,
|
|
3421
|
+
ChartPopoverComponent,
|
|
3422
|
+
ChartDonutContentComponent,
|
|
3423
|
+
ChartTooltipsComponent,
|
|
3424
|
+
ChartTooltipComponent,
|
|
3425
|
+
ChartTooltipDirective,
|
|
3426
|
+
],
|
|
3427
|
+
providers: [ChartCollectionService, ThresholdsService],
|
|
3428
|
+
}]
|
|
3429
|
+
}] });
|
|
3905
3430
|
|
|
3906
3431
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
3907
3432
|
//
|
|
@@ -4311,6 +3836,33 @@ class RenderEngine {
|
|
|
4311
3836
|
}
|
|
4312
3837
|
}
|
|
4313
3838
|
|
|
3839
|
+
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
3840
|
+
//
|
|
3841
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
3842
|
+
// of this software and associated documentation files (the "Software"), to
|
|
3843
|
+
// deal in the Software without restriction, including without limitation the
|
|
3844
|
+
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
3845
|
+
// sell copies of the Software, and to permit persons to whom the Software is
|
|
3846
|
+
// furnished to do so, subject to the following conditions:
|
|
3847
|
+
//
|
|
3848
|
+
// The above copyright notice and this permission notice shall be included in
|
|
3849
|
+
// all copies or substantial portions of the Software.
|
|
3850
|
+
//
|
|
3851
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
3852
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
3853
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
3854
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
3855
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
3856
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
3857
|
+
// THE SOFTWARE.
|
|
3858
|
+
class ChartPlugin {
|
|
3859
|
+
constructor() { }
|
|
3860
|
+
initialize() { }
|
|
3861
|
+
update() { }
|
|
3862
|
+
updateDimensions() { }
|
|
3863
|
+
destroy() { }
|
|
3864
|
+
}
|
|
3865
|
+
|
|
4314
3866
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
4315
3867
|
/** @ignore */
|
|
4316
3868
|
class RenderEnginePlugin extends ChartPlugin {
|
|
@@ -4696,10 +4248,7 @@ class ChartAssist {
|
|
|
4696
4248
|
this.legendInteractionAssist.update(processedSeriesSet);
|
|
4697
4249
|
}
|
|
4698
4250
|
// add render states to the series for use in the chart
|
|
4699
|
-
const seriesSet = processedSeriesSet.map((s) => {
|
|
4700
|
-
var _a;
|
|
4701
|
-
return Object.assign({ renderState: (_a = this.renderStatesIndex[s.id]) === null || _a === void 0 ? void 0 : _a.state }, s);
|
|
4702
|
-
});
|
|
4251
|
+
const seriesSet = processedSeriesSet.map((s) => { var _a; return Object.assign({ renderState: (_a = this.renderStatesIndex[s.id]) === null || _a === void 0 ? void 0 : _a.state }, s); });
|
|
4703
4252
|
this.chart.update(seriesSet);
|
|
4704
4253
|
this.publishRenderStates();
|
|
4705
4254
|
}
|
|
@@ -7037,25 +6586,183 @@ class DonutGaugeRenderingUtil {
|
|
|
7037
6586
|
if (!data.length) {
|
|
7038
6587
|
return [];
|
|
7039
6588
|
}
|
|
7040
|
-
const arcData = DonutGaugeRenderingUtil.generateArcValues(data);
|
|
7041
|
-
const thresholdsData = [];
|
|
7042
|
-
const pieGenerator = pie().sort(null);
|
|
7043
|
-
const arcsForMarkers = pieGenerator(arcData);
|
|
7044
|
-
arcsForMarkers.forEach((arcDatum, i) => {
|
|
7045
|
-
if (i % 2 === 1) {
|
|
7046
|
-
thresholdsData.push(arcDatum);
|
|
7047
|
-
}
|
|
7048
|
-
});
|
|
7049
|
-
return thresholdsData;
|
|
6589
|
+
const arcData = DonutGaugeRenderingUtil.generateArcValues(data);
|
|
6590
|
+
const thresholdsData = [];
|
|
6591
|
+
const pieGenerator = pie().sort(null);
|
|
6592
|
+
const arcsForMarkers = pieGenerator(arcData);
|
|
6593
|
+
arcsForMarkers.forEach((arcDatum, i) => {
|
|
6594
|
+
if (i % 2 === 1) {
|
|
6595
|
+
thresholdsData.push(arcDatum);
|
|
6596
|
+
}
|
|
6597
|
+
});
|
|
6598
|
+
return thresholdsData;
|
|
6599
|
+
}
|
|
6600
|
+
static generateArcValues(data) {
|
|
6601
|
+
// arcs with a value of zero serve as the threshold points
|
|
6602
|
+
const arcData = Array(data.length * 2 - 1).fill(0);
|
|
6603
|
+
data.forEach((d, i) => {
|
|
6604
|
+
// arcs with a non-zero value serve as the space between the threshold points
|
|
6605
|
+
arcData[i * 2] = i === 0 ? d.value : d.value - data[i - 1].value;
|
|
6606
|
+
});
|
|
6607
|
+
return arcData;
|
|
6608
|
+
}
|
|
6609
|
+
}
|
|
6610
|
+
|
|
6611
|
+
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
6612
|
+
/**
|
|
6613
|
+
* Default configuration for Radial Renderer
|
|
6614
|
+
*/
|
|
6615
|
+
const DEFAULT_RADIAL_RENDERER_CONFIG = {
|
|
6616
|
+
annularWidth: 20,
|
|
6617
|
+
annularPadding: 5,
|
|
6618
|
+
maxThickness: 30,
|
|
6619
|
+
annularGrowth: 0.15,
|
|
6620
|
+
cursor: "default",
|
|
6621
|
+
enableSeriesHighlighting: true,
|
|
6622
|
+
enableDataPointHighlighting: true,
|
|
6623
|
+
};
|
|
6624
|
+
/**
|
|
6625
|
+
* Radial renderer is a generic renderer that is able to draw pie and donut charts
|
|
6626
|
+
*/
|
|
6627
|
+
class RadialRenderer extends Renderer {
|
|
6628
|
+
/**
|
|
6629
|
+
* Creates an instance of RadialRenderer.
|
|
6630
|
+
* @param {IRadialRendererConfig} [config]
|
|
6631
|
+
* Renderer configuration object. Defaults to `DEFAULT_RADIAL_RENDERER_CONFIG` constant value.
|
|
6632
|
+
*/
|
|
6633
|
+
constructor(config = {}) {
|
|
6634
|
+
super(config);
|
|
6635
|
+
this.config = config;
|
|
6636
|
+
this.config = defaultsDeep(this.config, DEFAULT_RADIAL_RENDERER_CONFIG);
|
|
6637
|
+
}
|
|
6638
|
+
/** See {@link Renderer#draw} */
|
|
6639
|
+
draw(renderSeries, rendererSubject) {
|
|
6640
|
+
const dataContainer = renderSeries.containers[RenderLayerName.data];
|
|
6641
|
+
const data = renderSeries.dataSeries.data;
|
|
6642
|
+
const accessors = renderSeries.dataSeries.accessors;
|
|
6643
|
+
// TODO: This handles several data points withing one series as well. Most probably this can be abstracted to other renderer
|
|
6644
|
+
const arcGenerator = (d, index) => {
|
|
6645
|
+
const separateArc = this.getArc(renderSeries.scales.r.range(), arc(), index);
|
|
6646
|
+
return separateArc(d);
|
|
6647
|
+
};
|
|
6648
|
+
this.segmentWidth = this.getSegmentWidth(renderSeries);
|
|
6649
|
+
const g = dataContainer.selectAll("path.arc").data(data);
|
|
6650
|
+
g.exit().remove();
|
|
6651
|
+
g.enter()
|
|
6652
|
+
.append("path")
|
|
6653
|
+
.attr("class", "arc pointer-events nui-chart--path__outline")
|
|
6654
|
+
.style("stroke-width", this.config.strokeWidth)
|
|
6655
|
+
.style("cursor", this.config.cursor)
|
|
6656
|
+
.on("mouseenter", (d, i) => {
|
|
6657
|
+
this.emitDataPointHighlight(renderSeries, d, i, rendererSubject);
|
|
6658
|
+
})
|
|
6659
|
+
.on("mouseleave", (d, i) => {
|
|
6660
|
+
this.emitDataPointHighlight(renderSeries, null, DATA_POINT_NOT_FOUND, rendererSubject);
|
|
6661
|
+
})
|
|
6662
|
+
// TODO: testing event, remove in favor or generic interaction setup
|
|
6663
|
+
.on("click", (d, i) => {
|
|
6664
|
+
rendererSubject.next({
|
|
6665
|
+
eventName: SELECT_DATA_POINT_EVENT,
|
|
6666
|
+
data: {
|
|
6667
|
+
seriesId: renderSeries.dataSeries.id,
|
|
6668
|
+
index: i,
|
|
6669
|
+
data: d.data,
|
|
6670
|
+
position: this.getDataPointPosition(renderSeries.dataSeries, i, renderSeries.scales),
|
|
6671
|
+
},
|
|
6672
|
+
});
|
|
6673
|
+
})
|
|
6674
|
+
.merge(g)
|
|
6675
|
+
.attr("d", arcGenerator)
|
|
6676
|
+
.attr("fill", (d, i) => {
|
|
6677
|
+
var _a, _b;
|
|
6678
|
+
return accessors.data.color
|
|
6679
|
+
? accessors.data.color(d.data, i, data, renderSeries.dataSeries)
|
|
6680
|
+
: (_b = (_a = accessors.series).color) === null || _b === void 0 ? void 0 : _b.call(_a, renderSeries.dataSeries.id, renderSeries.dataSeries);
|
|
6681
|
+
});
|
|
6682
|
+
}
|
|
6683
|
+
/** See {@link Renderer#getDataPointPosition} */
|
|
6684
|
+
getDataPointPosition(dataSeries, index, scales) {
|
|
6685
|
+
if (index < 0) {
|
|
6686
|
+
return undefined;
|
|
6687
|
+
}
|
|
6688
|
+
const pieArcData = dataSeries.data[index];
|
|
6689
|
+
const dataPointArc = this.getArc(scales.r.range(), arc(), index);
|
|
6690
|
+
const centroid = dataPointArc.centroid(pieArcData);
|
|
6691
|
+
return {
|
|
6692
|
+
x: centroid[0],
|
|
6693
|
+
y: centroid[1],
|
|
6694
|
+
width: 0,
|
|
6695
|
+
height: 0,
|
|
6696
|
+
};
|
|
6697
|
+
}
|
|
6698
|
+
getInnerRadius(range, index) {
|
|
6699
|
+
if (isUndefined(this.segmentWidth) ||
|
|
6700
|
+
isUndefined(this.config.annularPadding)) {
|
|
6701
|
+
throw new Error("Can't compute inner radius");
|
|
6702
|
+
}
|
|
6703
|
+
const calculatedRadius = range[1] -
|
|
6704
|
+
range[0] -
|
|
6705
|
+
this.segmentWidth -
|
|
6706
|
+
index * (this.config.annularPadding + this.segmentWidth);
|
|
6707
|
+
return calculatedRadius >= 0 ? calculatedRadius : 0;
|
|
6708
|
+
}
|
|
6709
|
+
getOuterRadius(range, index) {
|
|
6710
|
+
if (isUndefined(this.segmentWidth) ||
|
|
6711
|
+
isUndefined(this.config.annularPadding)) {
|
|
6712
|
+
throw new Error("Can't compute outer radius");
|
|
6713
|
+
}
|
|
6714
|
+
const calculatedRadius = range[1] -
|
|
6715
|
+
range[0] -
|
|
6716
|
+
index * (this.config.annularPadding + this.segmentWidth);
|
|
6717
|
+
return calculatedRadius >= 0 ? calculatedRadius : 0;
|
|
7050
6718
|
}
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
6719
|
+
getArc(range, generatedArc, index) {
|
|
6720
|
+
const innerRadius = this.getInnerRadius(range, index);
|
|
6721
|
+
return generatedArc
|
|
6722
|
+
.outerRadius(this.getOuterRadius(range, index))
|
|
6723
|
+
.innerRadius(innerRadius);
|
|
6724
|
+
}
|
|
6725
|
+
getSegmentWidth(renderSeries) {
|
|
6726
|
+
if (!(this.config.maxThickness && this.config.annularGrowth)) {
|
|
6727
|
+
return this.config.annularWidth;
|
|
6728
|
+
}
|
|
6729
|
+
else {
|
|
6730
|
+
return Math.min((renderSeries.scales.r.range()[1] -
|
|
6731
|
+
renderSeries.scales.r.range()[0]) *
|
|
6732
|
+
this.config.annularGrowth, this.config.maxThickness);
|
|
6733
|
+
}
|
|
6734
|
+
}
|
|
6735
|
+
emitDataPointHighlight(renderSeries, data, i, rendererSubject) {
|
|
6736
|
+
const position = this.getDataPointPosition(renderSeries.dataSeries, i, renderSeries.scales);
|
|
6737
|
+
const dataPoint = {
|
|
6738
|
+
seriesId: renderSeries.dataSeries.id,
|
|
6739
|
+
dataSeries: renderSeries.dataSeries,
|
|
6740
|
+
index: i,
|
|
6741
|
+
data: data,
|
|
6742
|
+
position: position,
|
|
6743
|
+
};
|
|
6744
|
+
if (this.config.enableSeriesHighlighting) {
|
|
6745
|
+
rendererSubject.next({
|
|
6746
|
+
eventName: HIGHLIGHT_SERIES_EVENT,
|
|
6747
|
+
data: dataPoint,
|
|
6748
|
+
});
|
|
6749
|
+
}
|
|
6750
|
+
if (this.config.enableDataPointHighlighting) {
|
|
6751
|
+
rendererSubject.next({
|
|
6752
|
+
eventName: HIGHLIGHT_DATA_POINT_EVENT,
|
|
6753
|
+
data: dataPoint,
|
|
6754
|
+
});
|
|
6755
|
+
}
|
|
6756
|
+
// we're emitting this event manually, because it's not triggered by mouse interactive area in this case
|
|
6757
|
+
rendererSubject.next({
|
|
6758
|
+
eventName: INTERACTION_DATA_POINTS_EVENT,
|
|
6759
|
+
data: {
|
|
6760
|
+
interactionType: InteractionType.MouseMove,
|
|
6761
|
+
dataPoints: {
|
|
6762
|
+
[renderSeries.dataSeries.id]: dataPoint,
|
|
6763
|
+
},
|
|
6764
|
+
},
|
|
7057
6765
|
});
|
|
7058
|
-
return arcData;
|
|
7059
6766
|
}
|
|
7060
6767
|
}
|
|
7061
6768
|
|
|
@@ -7497,14 +7204,8 @@ class LinearGaugeThresholdsRenderer extends BarRenderer {
|
|
|
7497
7204
|
.append("circle")
|
|
7498
7205
|
.attr("class", GAUGE_THRESHOLD_MARKER_CLASS)
|
|
7499
7206
|
.merge(markerSelection)
|
|
7500
|
-
.attr("cx", (d, i) => {
|
|
7501
|
-
var _a, _b;
|
|
7502
|
-
return renderSeries.scales.x.convert((_b = (_a = accessors === null || accessors === void 0 ? void 0 : accessors.data) === null || _a === void 0 ? void 0 : _a.endX) === null || _b === void 0 ? void 0 : _b.call(_a, d, i, dataSeries.data, dataSeries));
|
|
7503
|
-
})
|
|
7504
|
-
.attr("cy", (d, i) => {
|
|
7505
|
-
var _a, _b;
|
|
7506
|
-
return renderSeries.scales.y.convert((_b = (_a = accessors === null || accessors === void 0 ? void 0 : accessors.data) === null || _a === void 0 ? void 0 : _a.endY) === null || _b === void 0 ? void 0 : _b.call(_a, d, i, dataSeries.data, dataSeries));
|
|
7507
|
-
})
|
|
7207
|
+
.attr("cx", (d, i) => { var _a, _b; return renderSeries.scales.x.convert((_b = (_a = accessors === null || accessors === void 0 ? void 0 : accessors.data) === null || _a === void 0 ? void 0 : _a.endX) === null || _b === void 0 ? void 0 : _b.call(_a, d, i, dataSeries.data, dataSeries)); })
|
|
7208
|
+
.attr("cy", (d, i) => { var _a, _b; return renderSeries.scales.y.convert((_b = (_a = accessors === null || accessors === void 0 ? void 0 : accessors.data) === null || _a === void 0 ? void 0 : _a.endY) === null || _b === void 0 ? void 0 : _b.call(_a, d, i, dataSeries.data, dataSeries)); })
|
|
7508
7209
|
.attr("r", this.config.markerRadius)
|
|
7509
7210
|
.style("fill", (d, i) => `var(--nui-color-${data[i].hit ? "text-light" : "icon-default"})`)
|
|
7510
7211
|
.style("stroke-width", 0);
|
|
@@ -8139,8 +7840,6 @@ GaugeUtil.DATA_CATEGORY = "gauge";
|
|
|
8139
7840
|
|
|
8140
7841
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
8141
7842
|
|
|
8142
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
8143
|
-
|
|
8144
7843
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
8145
7844
|
//
|
|
8146
7845
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
@@ -8320,13 +8019,11 @@ class PointScale extends Scale {
|
|
|
8320
8019
|
|
|
8321
8020
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
8322
8021
|
const intlFormat = (date, options) => new Intl.DateTimeFormat(moment.locale(), options).format(date);
|
|
8323
|
-
const ɵ0 = intlFormat;
|
|
8324
8022
|
const formatSecond = (d) => intlFormat(d, {
|
|
8325
8023
|
hour: "numeric",
|
|
8326
8024
|
minute: "2-digit",
|
|
8327
8025
|
second: "2-digit",
|
|
8328
8026
|
}), formatMinute = (d) => intlFormat(d, { hour: "numeric", minute: "2-digit" }), formatWeek = (d) => intlFormat(d, { month: "short", day: "2-digit" }), formatMonth = (d) => intlFormat(d, { month: "short" }), formatYear = (d) => intlFormat(d, { year: "numeric" });
|
|
8329
|
-
const ɵ1 = formatSecond, ɵ2 = formatMinute, ɵ3 = formatWeek, ɵ4 = formatMonth, ɵ5 = formatYear;
|
|
8330
8027
|
/**
|
|
8331
8028
|
* Formatter for dates
|
|
8332
8029
|
*/
|
|
@@ -8691,61 +8388,217 @@ class BarStatusGridConfig extends XYGridConfig {
|
|
|
8691
8388
|
this.axis.bottom.visible = false;
|
|
8692
8389
|
this.borders.bottom.visible = false;
|
|
8693
8390
|
}
|
|
8694
|
-
this.axis.left.visible = false;
|
|
8695
|
-
this.axis.left.gridTicks = false;
|
|
8696
|
-
this.borders.left.visible = false;
|
|
8697
|
-
this.dimension.autoHeight = false;
|
|
8698
|
-
this.dimension.margin.top = 0;
|
|
8699
|
-
if (!config.showBottomAxis) {
|
|
8700
|
-
this.dimension.margin.bottom = 0;
|
|
8391
|
+
this.axis.left.visible = false;
|
|
8392
|
+
this.axis.left.gridTicks = false;
|
|
8393
|
+
this.borders.left.visible = false;
|
|
8394
|
+
this.dimension.autoHeight = false;
|
|
8395
|
+
this.dimension.margin.top = 0;
|
|
8396
|
+
if (!config.showBottomAxis) {
|
|
8397
|
+
this.dimension.margin.bottom = 0;
|
|
8398
|
+
}
|
|
8399
|
+
this.dimension.height(30); // TODO: solve magic number together with spark chart
|
|
8400
|
+
}
|
|
8401
|
+
}
|
|
8402
|
+
|
|
8403
|
+
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
8404
|
+
/**
|
|
8405
|
+
* Applies spark chart specific grid configuration
|
|
8406
|
+
*
|
|
8407
|
+
* @param c
|
|
8408
|
+
* @param showBottomAxis
|
|
8409
|
+
* @param showTopBorder
|
|
8410
|
+
*/
|
|
8411
|
+
function sparkChartGridConfig(c = new XYGridConfig(), showBottomAxis = false, showTopBorder = true) {
|
|
8412
|
+
c.interactionPlugins = false;
|
|
8413
|
+
c.axis.left.visible = false;
|
|
8414
|
+
c.axis.left.gridTicks = false;
|
|
8415
|
+
c.dimension.margin.left = 5;
|
|
8416
|
+
c.dimension.margin.right = 5;
|
|
8417
|
+
c.dimension.margin.bottom = showBottomAxis ? c.dimension.margin.bottom : 0;
|
|
8418
|
+
c.dimension.padding.top = 5;
|
|
8419
|
+
c.dimension.padding.bottom = 5;
|
|
8420
|
+
c.dimension.autoHeight = false;
|
|
8421
|
+
// TODO: avoid magic number
|
|
8422
|
+
// Hard-coded value stands for the height of rich legend tile when there are 2 rows of description.
|
|
8423
|
+
// We need to figure out how to make a better layout that will not require magic numbers.
|
|
8424
|
+
c.dimension.height(36);
|
|
8425
|
+
if (showTopBorder) {
|
|
8426
|
+
c.borders.top = new BorderConfig();
|
|
8427
|
+
}
|
|
8428
|
+
if (!showBottomAxis) {
|
|
8429
|
+
c.borders.bottom.visible = false;
|
|
8430
|
+
}
|
|
8431
|
+
return c;
|
|
8432
|
+
}
|
|
8433
|
+
|
|
8434
|
+
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
8435
|
+
|
|
8436
|
+
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
8437
|
+
|
|
8438
|
+
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
8439
|
+
/**
|
|
8440
|
+
* This plugin calculates new size and position for content inside donut chart
|
|
8441
|
+
*/
|
|
8442
|
+
class ChartDonutContentPlugin extends ChartPlugin {
|
|
8443
|
+
constructor() {
|
|
8444
|
+
super(...arguments);
|
|
8445
|
+
/** Subject for getting updates on the content position */
|
|
8446
|
+
this.contentPositionUpdateSubject = new Subject();
|
|
8447
|
+
/** The current content position */
|
|
8448
|
+
this.contentPosition = {
|
|
8449
|
+
top: 0,
|
|
8450
|
+
left: 0,
|
|
8451
|
+
width: 0,
|
|
8452
|
+
height: 0,
|
|
8453
|
+
};
|
|
8454
|
+
}
|
|
8455
|
+
updateDimensions() {
|
|
8456
|
+
const radius = this.chart
|
|
8457
|
+
.getDataManager()
|
|
8458
|
+
.chartSeriesSet.reduce((prev, current) => {
|
|
8459
|
+
if (current.renderer instanceof RadialRenderer &&
|
|
8460
|
+
!isUndefined(prev)) {
|
|
8461
|
+
return Math.min(prev, current.renderer.getInnerRadius(current.scales.r.range(), current.data.length - 1));
|
|
8462
|
+
}
|
|
8463
|
+
return prev;
|
|
8464
|
+
}, Infinity);
|
|
8465
|
+
if (isUndefined(radius)) {
|
|
8466
|
+
throw new Error("Radius is undefined");
|
|
8467
|
+
}
|
|
8468
|
+
this.contentPosition = this.getContentPosition(radius);
|
|
8469
|
+
this.contentPositionUpdateSubject.next(this.contentPosition);
|
|
8470
|
+
}
|
|
8471
|
+
destroy() {
|
|
8472
|
+
this.contentPositionUpdateSubject.complete();
|
|
8473
|
+
}
|
|
8474
|
+
getContentPosition(areaSize) {
|
|
8475
|
+
const basics = [
|
|
8476
|
+
this.chart.getGrid().config().dimension.outerHeight() / 2,
|
|
8477
|
+
this.chart.getGrid().config().dimension.outerWidth() / 2,
|
|
8478
|
+
];
|
|
8479
|
+
return {
|
|
8480
|
+
top: basics[0] - areaSize / Math.sqrt(2),
|
|
8481
|
+
left: basics[1] - areaSize / Math.sqrt(2),
|
|
8482
|
+
width: areaSize * Math.sqrt(2),
|
|
8483
|
+
height: areaSize * Math.sqrt(2),
|
|
8484
|
+
};
|
|
8485
|
+
}
|
|
8486
|
+
}
|
|
8487
|
+
|
|
8488
|
+
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
8489
|
+
/**
|
|
8490
|
+
* This plugin listens for the INTERACTION_DATA_POINTS_EVENT by default and transforms received data into
|
|
8491
|
+
* popover inputs. The listened event can be configured using the 'config.eventStreamId' property.
|
|
8492
|
+
* The actual popover is handled by the ChartPopoverComponent.
|
|
8493
|
+
*/
|
|
8494
|
+
class ChartPopoverPlugin extends ChartPlugin {
|
|
8495
|
+
constructor(config = {}) {
|
|
8496
|
+
super();
|
|
8497
|
+
this.config = config;
|
|
8498
|
+
/** Emits the popover's target position */
|
|
8499
|
+
this.updatePositionSubject = new Subject();
|
|
8500
|
+
/** Emits an event indicating the popover should open */
|
|
8501
|
+
this.openPopoverSubject = new Subject();
|
|
8502
|
+
/** Emits an event indicating the popover should close */
|
|
8503
|
+
this.closePopoverSubject = new Subject();
|
|
8504
|
+
/** The target position of the popover */
|
|
8505
|
+
this.popoverTargetPosition = {
|
|
8506
|
+
top: 0,
|
|
8507
|
+
left: 0,
|
|
8508
|
+
width: 0,
|
|
8509
|
+
height: 0,
|
|
8510
|
+
};
|
|
8511
|
+
/** The default plugin configuration */
|
|
8512
|
+
this.DEFAULT_CONFIG = {
|
|
8513
|
+
eventStreamId: INTERACTION_DATA_POINTS_EVENT,
|
|
8514
|
+
interactionType: InteractionType.MouseMove,
|
|
8515
|
+
};
|
|
8516
|
+
this.isOpen = false;
|
|
8517
|
+
this.destroy$ = new Subject();
|
|
8518
|
+
this.config = defaultsDeep(this.config, this.DEFAULT_CONFIG);
|
|
8519
|
+
}
|
|
8520
|
+
initialize() {
|
|
8521
|
+
this.chart
|
|
8522
|
+
.getEventBus()
|
|
8523
|
+
.getStream(this.config.eventStreamId)
|
|
8524
|
+
.pipe(takeUntil(this.destroy$))
|
|
8525
|
+
.subscribe((event) => {
|
|
8526
|
+
var _a;
|
|
8527
|
+
if (event.data.interactionType === this.config.interactionType) {
|
|
8528
|
+
// here we handle data either of type IInteractionDataPointsEvent or IInteractionDataPointEvent
|
|
8529
|
+
const dataPoints = (_a = event.data
|
|
8530
|
+
.dataPoints) !== null && _a !== void 0 ? _a : {
|
|
8531
|
+
[event.data.dataPoint.seriesId]: event.data.dataPoint,
|
|
8532
|
+
};
|
|
8533
|
+
this.processDataPoints(dataPoints);
|
|
8534
|
+
}
|
|
8535
|
+
});
|
|
8536
|
+
}
|
|
8537
|
+
destroy() {
|
|
8538
|
+
if (this.updatePositionSubject) {
|
|
8539
|
+
this.updatePositionSubject.complete();
|
|
8540
|
+
}
|
|
8541
|
+
if (this.openPopoverSubject) {
|
|
8542
|
+
this.openPopoverSubject.complete();
|
|
8543
|
+
}
|
|
8544
|
+
if (this.closePopoverSubject) {
|
|
8545
|
+
this.closePopoverSubject.complete();
|
|
8546
|
+
}
|
|
8547
|
+
if (this.destroy$) {
|
|
8548
|
+
this.destroy$.next();
|
|
8549
|
+
this.destroy$.complete();
|
|
8550
|
+
}
|
|
8551
|
+
}
|
|
8552
|
+
getAbsolutePosition(valuesArray) {
|
|
8553
|
+
var _a, _b;
|
|
8554
|
+
const chartElement = (_b = (_a = this.chart.target) === null || _a === void 0 ? void 0 : _a.node()) === null || _b === void 0 ? void 0 : _b.parentNode; // the one above svg
|
|
8555
|
+
if (!chartElement) {
|
|
8556
|
+
throw new Error("Chart parent node is not defined");
|
|
8557
|
+
}
|
|
8558
|
+
const dataPointsLeft = Math.min(...valuesArray.map((d) => d.position.x));
|
|
8559
|
+
const left = chartElement.offsetLeft +
|
|
8560
|
+
this.chart.getGrid().config().dimension.margin.left +
|
|
8561
|
+
dataPointsLeft;
|
|
8562
|
+
const top = chartElement.offsetTop +
|
|
8563
|
+
this.chart.getGrid().config().dimension.margin.top;
|
|
8564
|
+
// area for popovers is enlarged to cover the whole chart (top to bottom),
|
|
8565
|
+
// so that we avoid collision of chart visualization and popover (by UX request)
|
|
8566
|
+
return {
|
|
8567
|
+
top: top,
|
|
8568
|
+
left: left,
|
|
8569
|
+
height: chartElement.offsetHeight,
|
|
8570
|
+
width: Math.max(...valuesArray.map((d) => d.position.x + (d.position.width || 0))) - dataPointsLeft,
|
|
8571
|
+
};
|
|
8572
|
+
}
|
|
8573
|
+
processDataPoints(dataPoints) {
|
|
8574
|
+
const validDataPoints = pickBy(dataPoints, (d) => d.index >= 0 && d.position);
|
|
8575
|
+
const validDataPointsValues = values(validDataPoints);
|
|
8576
|
+
if (validDataPointsValues.length > 0) {
|
|
8577
|
+
this.popoverTargetPosition = this.getAbsolutePosition(validDataPointsValues);
|
|
8578
|
+
this.dataPoints = validDataPoints;
|
|
8579
|
+
// timeout is needed in order to successfully open popover on initial hover over the chart
|
|
8580
|
+
setTimeout(() => {
|
|
8581
|
+
this.updatePositionSubject.next(this.popoverTargetPosition);
|
|
8582
|
+
if (!this.isOpen) {
|
|
8583
|
+
this.isOpen = true;
|
|
8584
|
+
this.openPopoverSubject.next();
|
|
8585
|
+
}
|
|
8586
|
+
});
|
|
8587
|
+
}
|
|
8588
|
+
else {
|
|
8589
|
+
// timeout is needed for symmetry of timing with above timeout for opening the popover
|
|
8590
|
+
setTimeout(() => {
|
|
8591
|
+
this.closePopoverSubject.next();
|
|
8592
|
+
this.isOpen = false;
|
|
8593
|
+
});
|
|
8701
8594
|
}
|
|
8702
|
-
this.dimension.height(30); // TODO: solve magic number together with spark chart
|
|
8703
|
-
}
|
|
8704
|
-
}
|
|
8705
|
-
|
|
8706
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
8707
|
-
/**
|
|
8708
|
-
* Applies spark chart specific grid configuration
|
|
8709
|
-
*
|
|
8710
|
-
* @param c
|
|
8711
|
-
* @param showBottomAxis
|
|
8712
|
-
* @param showTopBorder
|
|
8713
|
-
*/
|
|
8714
|
-
function sparkChartGridConfig(c = new XYGridConfig(), showBottomAxis = false, showTopBorder = true) {
|
|
8715
|
-
c.interactionPlugins = false;
|
|
8716
|
-
c.axis.left.visible = false;
|
|
8717
|
-
c.axis.left.gridTicks = false;
|
|
8718
|
-
c.dimension.margin.left = 5;
|
|
8719
|
-
c.dimension.margin.right = 5;
|
|
8720
|
-
c.dimension.margin.bottom = showBottomAxis ? c.dimension.margin.bottom : 0;
|
|
8721
|
-
c.dimension.padding.top = 5;
|
|
8722
|
-
c.dimension.padding.bottom = 5;
|
|
8723
|
-
c.dimension.autoHeight = false;
|
|
8724
|
-
// TODO: avoid magic number
|
|
8725
|
-
// Hard-coded value stands for the height of rich legend tile when there are 2 rows of description.
|
|
8726
|
-
// We need to figure out how to make a better layout that will not require magic numbers.
|
|
8727
|
-
c.dimension.height(36);
|
|
8728
|
-
if (showTopBorder) {
|
|
8729
|
-
c.borders.top = new BorderConfig();
|
|
8730
|
-
}
|
|
8731
|
-
if (!showBottomAxis) {
|
|
8732
|
-
c.borders.bottom.visible = false;
|
|
8733
8595
|
}
|
|
8734
|
-
return c;
|
|
8735
8596
|
}
|
|
8736
8597
|
|
|
8737
8598
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
8738
8599
|
|
|
8739
8600
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
8740
8601
|
|
|
8741
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
8742
|
-
|
|
8743
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
8744
|
-
|
|
8745
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
8746
|
-
|
|
8747
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
8748
|
-
|
|
8749
8602
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
8750
8603
|
/**
|
|
8751
8604
|
* Extends ChartPopoverPlugin to handle popover positioning for radial charts.
|
|
@@ -8775,6 +8628,181 @@ class RadialPopoverPlugin extends ChartPopoverPlugin {
|
|
|
8775
8628
|
}
|
|
8776
8629
|
}
|
|
8777
8630
|
|
|
8631
|
+
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
8632
|
+
/** How far away from the data point position will the tooltip be positioned */
|
|
8633
|
+
const TOOLTIP_POSITION_OFFSET = 10;
|
|
8634
|
+
/** @ignore
|
|
8635
|
+
* Used for charts where tooltips should be placed aside of some vertical line */
|
|
8636
|
+
const getVerticalSetup = (offset) => [
|
|
8637
|
+
{
|
|
8638
|
+
originX: "end",
|
|
8639
|
+
originY: "top",
|
|
8640
|
+
overlayX: "start",
|
|
8641
|
+
overlayY: "center",
|
|
8642
|
+
offsetX: offset,
|
|
8643
|
+
},
|
|
8644
|
+
{
|
|
8645
|
+
originX: "start",
|
|
8646
|
+
originY: "center",
|
|
8647
|
+
overlayX: "end",
|
|
8648
|
+
overlayY: "center",
|
|
8649
|
+
offsetX: -offset,
|
|
8650
|
+
},
|
|
8651
|
+
];
|
|
8652
|
+
/** @ignore
|
|
8653
|
+
* Used for charts where tooltips should be placed aligned to some horizontal line (as Horizontal Bar Charts) */
|
|
8654
|
+
const getHorizontalSetup = (offset) => [
|
|
8655
|
+
{
|
|
8656
|
+
originX: "end",
|
|
8657
|
+
originY: "top",
|
|
8658
|
+
overlayX: "center",
|
|
8659
|
+
overlayY: "bottom",
|
|
8660
|
+
offsetY: -offset,
|
|
8661
|
+
},
|
|
8662
|
+
{
|
|
8663
|
+
originX: "end",
|
|
8664
|
+
originY: "bottom",
|
|
8665
|
+
overlayX: "center",
|
|
8666
|
+
overlayY: "top",
|
|
8667
|
+
offsetY: offset,
|
|
8668
|
+
},
|
|
8669
|
+
];
|
|
8670
|
+
/**
|
|
8671
|
+
* This plugin listens to the INTERACTION_DATA_POINTS_EVENT and transforms received data into tooltips inputs.
|
|
8672
|
+
* The actual tooltips are handled by the ChartTooltipsComponent.
|
|
8673
|
+
*/
|
|
8674
|
+
class ChartTooltipsPlugin extends ChartPlugin {
|
|
8675
|
+
/**
|
|
8676
|
+
* @param tooltipPositionOffset Offset of a tooltip from edge of a highlighted element
|
|
8677
|
+
* @param orientation
|
|
8678
|
+
*/
|
|
8679
|
+
constructor(tooltipPositionOffset = TOOLTIP_POSITION_OFFSET, orientation = "right") {
|
|
8680
|
+
super();
|
|
8681
|
+
this.tooltipPositionOffset = tooltipPositionOffset;
|
|
8682
|
+
this.orientation = orientation;
|
|
8683
|
+
/** Calculated positions for the data point tooltips */
|
|
8684
|
+
this.dataPointPositions = {};
|
|
8685
|
+
/**
|
|
8686
|
+
* This publishes an event to show tooltips
|
|
8687
|
+
*/
|
|
8688
|
+
this.showSubject = new Subject();
|
|
8689
|
+
/**
|
|
8690
|
+
* This publishes an event to hide tooltips
|
|
8691
|
+
*/
|
|
8692
|
+
this.hideSubject = new Subject();
|
|
8693
|
+
this.isChartInView = false;
|
|
8694
|
+
this.destroy$ = new Subject();
|
|
8695
|
+
this.seriesVisibilityMap = {};
|
|
8696
|
+
if (orientation === "right") {
|
|
8697
|
+
this.overlaySetup = getVerticalSetup(tooltipPositionOffset);
|
|
8698
|
+
}
|
|
8699
|
+
else if (orientation === "top") {
|
|
8700
|
+
this.overlaySetup = getHorizontalSetup(tooltipPositionOffset);
|
|
8701
|
+
}
|
|
8702
|
+
}
|
|
8703
|
+
initialize() {
|
|
8704
|
+
this.chart
|
|
8705
|
+
.getEventBus()
|
|
8706
|
+
.getStream(INTERACTION_DATA_POINTS_EVENT)
|
|
8707
|
+
.pipe(takeUntil(this.destroy$))
|
|
8708
|
+
.subscribe((event) => {
|
|
8709
|
+
if (event.data.interactionType === InteractionType.MouseMove &&
|
|
8710
|
+
this.isChartInView) {
|
|
8711
|
+
const dataPoints = event.data.dataPoints;
|
|
8712
|
+
this.processHighlightedDataPoints(dataPoints);
|
|
8713
|
+
}
|
|
8714
|
+
});
|
|
8715
|
+
this.chart
|
|
8716
|
+
.getEventBus()
|
|
8717
|
+
.getStream(SERIES_STATE_CHANGE_EVENT)
|
|
8718
|
+
.pipe(takeUntil(this.destroy$))
|
|
8719
|
+
.subscribe((event) => {
|
|
8720
|
+
event.data.forEach((series) => {
|
|
8721
|
+
this.seriesVisibilityMap[series.seriesId] =
|
|
8722
|
+
series.state !== RenderState.hidden;
|
|
8723
|
+
});
|
|
8724
|
+
});
|
|
8725
|
+
this.chart
|
|
8726
|
+
.getEventBus()
|
|
8727
|
+
.getStream(CHART_VIEW_STATUS_EVENT)
|
|
8728
|
+
.pipe(takeUntil(this.destroy$))
|
|
8729
|
+
.subscribe((event) => {
|
|
8730
|
+
this.isChartInView = event.data.isChartInView;
|
|
8731
|
+
if (!this.isChartInView) {
|
|
8732
|
+
this.hideSubject.next();
|
|
8733
|
+
}
|
|
8734
|
+
});
|
|
8735
|
+
}
|
|
8736
|
+
destroy() {
|
|
8737
|
+
this.destroy$.next();
|
|
8738
|
+
this.destroy$.complete();
|
|
8739
|
+
}
|
|
8740
|
+
processHighlightedDataPoints(dataPoints) {
|
|
8741
|
+
var _a, _b;
|
|
8742
|
+
const validDataPoints = pickBy(dataPoints, (d) => d.index >= 0 &&
|
|
8743
|
+
d.position &&
|
|
8744
|
+
this.seriesVisibilityMap[d.seriesId] !== false);
|
|
8745
|
+
if (values(validDataPoints).length === 0) {
|
|
8746
|
+
this.hideSubject.next();
|
|
8747
|
+
return;
|
|
8748
|
+
}
|
|
8749
|
+
this.dataPoints = validDataPoints;
|
|
8750
|
+
const chartElement = (_b = (_a = this.chart.target) === null || _a === void 0 ? void 0 : _a.node()) === null || _b === void 0 ? void 0 : _b.parentNode; // the one above svg
|
|
8751
|
+
if (!chartElement) {
|
|
8752
|
+
throw new Error("Chart parent node is not defined");
|
|
8753
|
+
}
|
|
8754
|
+
const bbox = chartElement.getBoundingClientRect();
|
|
8755
|
+
const offsetParentBbox = chartElement.offsetParent.getBoundingClientRect();
|
|
8756
|
+
const chartPosition = {
|
|
8757
|
+
x: bbox.left - offsetParentBbox.left,
|
|
8758
|
+
y: bbox.top - offsetParentBbox.top,
|
|
8759
|
+
};
|
|
8760
|
+
each(Object.keys(this.dataPoints), (seriesId) => {
|
|
8761
|
+
const dataPoint = this.dataPoints[seriesId];
|
|
8762
|
+
const chartSeries = this.chart
|
|
8763
|
+
.getDataManager()
|
|
8764
|
+
.getChartSeries(dataPoint.seriesId);
|
|
8765
|
+
const tooltipRelativePosition = this.getTooltipPosition(dataPoint, chartSeries);
|
|
8766
|
+
this.dataPointPositions[seriesId] = this.getAbsolutePosition(tooltipRelativePosition, chartPosition);
|
|
8767
|
+
});
|
|
8768
|
+
this.showSubject.next();
|
|
8769
|
+
}
|
|
8770
|
+
/**
|
|
8771
|
+
* Calculate tooltip position. Default implementation shows the tooltip on left / right with
|
|
8772
|
+
* @param dataPoint
|
|
8773
|
+
* @param chartSeries
|
|
8774
|
+
*/
|
|
8775
|
+
getTooltipPosition(dataPoint, chartSeries) {
|
|
8776
|
+
var _a, _b;
|
|
8777
|
+
if (!dataPoint.position) {
|
|
8778
|
+
throw new Error("Unable to get tooltip position");
|
|
8779
|
+
}
|
|
8780
|
+
return {
|
|
8781
|
+
x: dataPoint.position.x,
|
|
8782
|
+
y: dataPoint.position.y,
|
|
8783
|
+
height: ((_a = dataPoint.position) === null || _a === void 0 ? void 0 : _a.height) || 1,
|
|
8784
|
+
width: ((_b = dataPoint.position) === null || _b === void 0 ? void 0 : _b.width) || 1,
|
|
8785
|
+
overlayPositions: this.overlaySetup,
|
|
8786
|
+
};
|
|
8787
|
+
}
|
|
8788
|
+
/**
|
|
8789
|
+
* Converts the relative position within a chart into an absolute position on the screen
|
|
8790
|
+
*
|
|
8791
|
+
* @param relativePosition
|
|
8792
|
+
* @param chartPosition
|
|
8793
|
+
*/
|
|
8794
|
+
getAbsolutePosition(relativePosition, chartPosition) {
|
|
8795
|
+
return Object.assign({}, relativePosition, {
|
|
8796
|
+
x: chartPosition.x +
|
|
8797
|
+
this.chart.getGrid().config().dimension.margin.left +
|
|
8798
|
+
relativePosition.x,
|
|
8799
|
+
y: chartPosition.y +
|
|
8800
|
+
this.chart.getGrid().config().dimension.margin.top +
|
|
8801
|
+
relativePosition.y,
|
|
8802
|
+
});
|
|
8803
|
+
}
|
|
8804
|
+
}
|
|
8805
|
+
|
|
8778
8806
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
8779
8807
|
/**
|
|
8780
8808
|
* The circle is divided into 8 parts (E, SE, S, SW, ...), these values represent the connection points
|
|
@@ -8869,8 +8897,6 @@ class BarTooltipsPlugin extends ChartTooltipsPlugin {
|
|
|
8869
8897
|
|
|
8870
8898
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
8871
8899
|
|
|
8872
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
8873
|
-
|
|
8874
8900
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
8875
8901
|
class ZoomPlugin extends ChartPlugin {
|
|
8876
8902
|
constructor(config = {}) {
|
|
@@ -9191,8 +9217,6 @@ function barGrid(config) {
|
|
|
9191
9217
|
return grid;
|
|
9192
9218
|
}
|
|
9193
9219
|
|
|
9194
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
9195
|
-
|
|
9196
9220
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
9197
9221
|
/**
|
|
9198
9222
|
* Creates {@link VerticalBarAccessors} or {@link VerticalBarAccessors}
|
|
@@ -9622,22 +9646,10 @@ class AreaRenderer extends XYRenderer {
|
|
|
9622
9646
|
throw new Error("curveType is not defined");
|
|
9623
9647
|
}
|
|
9624
9648
|
const areaFunc = area()
|
|
9625
|
-
.x0((d, i) => {
|
|
9626
|
-
var _a, _b;
|
|
9627
|
-
return this.safetyCheck(renderSeries.scales.
|
|
9628
|
-
|
|
9629
|
-
.x1((d, i) => {
|
|
9630
|
-
var _a, _b;
|
|
9631
|
-
return this.safetyCheck(renderSeries.scales.x.convert((_b = (_a = accessors.data).absoluteX1) === null || _b === void 0 ? void 0 : _b.call(_a, d, i, dataSeries.data, dataSeries)));
|
|
9632
|
-
})
|
|
9633
|
-
.y0((d, i) => {
|
|
9634
|
-
var _a, _b;
|
|
9635
|
-
return this.safetyCheck(renderSeries.scales.y.convert((_b = (_a = accessors.data).absoluteY0) === null || _b === void 0 ? void 0 : _b.call(_a, d, i, dataSeries.data, dataSeries)));
|
|
9636
|
-
})
|
|
9637
|
-
.y1((d, i) => {
|
|
9638
|
-
var _a, _b;
|
|
9639
|
-
return this.safetyCheck(renderSeries.scales.y.convert((_b = (_a = accessors.data).absoluteY1) === null || _b === void 0 ? void 0 : _b.call(_a, d, i, dataSeries.data, dataSeries)));
|
|
9640
|
-
})
|
|
9649
|
+
.x0((d, i) => { var _a, _b; return this.safetyCheck(renderSeries.scales.x.convert((_b = (_a = accessors.data).absoluteX0) === null || _b === void 0 ? void 0 : _b.call(_a, d, i, dataSeries.data, dataSeries))); })
|
|
9650
|
+
.x1((d, i) => { var _a, _b; return this.safetyCheck(renderSeries.scales.x.convert((_b = (_a = accessors.data).absoluteX1) === null || _b === void 0 ? void 0 : _b.call(_a, d, i, dataSeries.data, dataSeries))); })
|
|
9651
|
+
.y0((d, i) => { var _a, _b; return this.safetyCheck(renderSeries.scales.y.convert((_b = (_a = accessors.data).absoluteY0) === null || _b === void 0 ? void 0 : _b.call(_a, d, i, dataSeries.data, dataSeries))); })
|
|
9652
|
+
.y1((d, i) => { var _a, _b; return this.safetyCheck(renderSeries.scales.y.convert((_b = (_a = accessors.data).absoluteY1) === null || _b === void 0 ? void 0 : _b.call(_a, d, i, dataSeries.data, dataSeries))); })
|
|
9641
9653
|
.curve(this.config.curveType);
|
|
9642
9654
|
path.attr("d", (_a = areaFunc(validatedData)) !== null && _a !== void 0 ? _a : "");
|
|
9643
9655
|
}
|
|
@@ -9894,5 +9906,5 @@ function thresholdsTopGridConfig(c = new XYGridConfig()) {
|
|
|
9894
9906
|
* Generated bundle index. Do not edit.
|
|
9895
9907
|
*/
|
|
9896
9908
|
|
|
9897
|
-
export { AXES_STYLE_CHANGE_EVENT, AreaAccessors, AreaGridConfig, AreaRenderer, AxisConfig, BandScale, BarAccessors, BarGridConfig, BarHighlightStrategy, BarHorizontalGridConfig, BarRenderer, BarSeriesHighlightStrategy, BarStatusGridConfig, BarTooltipsPlugin, BasicLegendTileComponent, BorderConfig, CHART_COMPONENT, CHART_MARKERS, CHART_PALETTE_CS1, CHART_PALETTE_CS2, CHART_PALETTE_CS3, CHART_PALETTE_CS_S, CHART_PALETTE_CS_S_EXTENDED, CHART_VIEW_STATUS_EVENT, Chart, ChartAssist, ChartAssistEventType, ChartAssistRenderStateData, ChartCollection, ChartCollectionIdDirective, ChartCollectionService, ChartComponent, ChartDonutContentComponent, ChartDonutContentPlugin, ChartMarkerComponent, ChartPalette, ChartPlugin, ChartPopoverComponent, ChartPopoverPlugin, ChartTooltipComponent, ChartTooltipDirective, ChartTooltipsComponent, ChartTooltipsPlugin, CssFilterId, DATA_POINT_INTERACTION_RESET, DATA_POINT_NOT_FOUND, DEFAULT_DONUT_GAUGE_THRESHOLDS_RENDERER_CONFIG, DEFAULT_LINEAR_GAUGE_THRESHOLDS_RENDERER_CONFIG, DEFAULT_MARKER_INTERACTION_CONFIG, DEFAULT_RADIAL_RENDERER_CONFIG, DESTROY_EVENT, DONUT_GAUGE_LABEL_CLEARANCE_DEFAULT, DataManager, DataSeries, DimensionConfig, DonutGaugeLabelsPlugin, DonutGaugeRenderingUtil, DonutGaugeThresholdsRenderer, EMPTY_CONTINUOUS_DOMAIN, EventBus, GAUGE_LABELS_CONTAINER_CLASS, GAUGE_LABEL_FORMATTER_NAME_DEFAULT, GAUGE_QUANTITY_SERIES_ID, GAUGE_REMAINDER_SERIES_ID, GAUGE_THRESHOLD_LABEL_CLASS, GAUGE_THRESHOLD_MARKERS_SERIES_ID, GAUGE_THRESHOLD_MARKER_CLASS, GRAYSCALE_COLOR_MATRIX, GRAYSCALE_FILTER, GaugeMode, GaugeUtil, Grid, GridConfig, HIGHLIGHT_DATA_POINT_EVENT, HIGHLIGHT_SERIES_EVENT, HorizontalBarAccessors, IGNORE_INTERACTION_CLASS, INTERACTION_COORDINATES_EVENT, INTERACTION_DATA_POINTS_EVENT, INTERACTION_DATA_POINT_EVENT, INTERACTION_SERIES_EVENT, INTERACTION_VALUES_ACTIVE_EVENT, INTERACTION_VALUES_EVENT, InteractionLabelPlugin, InteractionLinePlugin, InteractionType, LEGEND_SERIES_CLASS_NAME, LINEAR_GAUGE_LABEL_CLEARANCE_DEFAULTS, Lasagna, LegendComponent, LegendInteractionAssist, LegendSeriesComponent, LineAccessors, LineRenderer, LineSelectSeriesInteractionStrategy, LinearGaugeLabelsPlugin, LinearGaugeThresholdsRenderer, LinearScale, MOUSE_ACTIVE_EVENT, MappedValueProvider, MissingDataLineRendererConfig, MouseInteractiveArea, MouseInteractiveAreaPlugin, NORMALIZED_DOMAIN, NoopAccessors, NoopRenderer, NoopScale, NuiChartsModule, PathMarker, PieRenderer, PointScale, ProcessedColorProvider, REFRESH_EVENT, RadialAccessors, RadialGrid, RadialPopoverPlugin, RadialRenderer, RadialTooltipsPlugin, RectangleAccessors, RenderEngine, RenderEnginePlugin, RenderLayerName, RenderState, Renderer, RichLegendTileComponent, SELECT_DATA_POINT_EVENT, SERIES_STATE_CHANGE_EVENT, SET_DOMAIN_EVENT, STANDARD_RENDER_LAYERS, Scale, SequentialChartMarkerProvider, SequentialColorProvider, SequentialValueProvider, SideIndicatorAccessors, SideIndicatorRenderer, SparkChartAssist, StandardGaugeColor, StandardGaugeThresholdId, StandardGaugeThresholdMarkerRadius, StandardLinearGaugeThickness, StatusAccessors, SvgMarker, THRESHOLDS_MAIN_CHART_RENDERER_CONFIG, THRESHOLDS_SUMMARY_RENDERER_CONFIG, TOOLTIP_POSITION_OFFSET, TextColorProvider, ThresholdsService, TimeIntervalScale, TimeScale, UtilityService, VerticalBarAccessors, XYAccessors, XYGrid, XYGridConfig, XYRenderer, ZoneBoundary, ZoomPlugin, applyStackMetadata, areaGrid, barAccessors, barGrid, barScales, borderMidpoint, calculateDomainValueCombinedTotals, calculateMissingData, convert, datetimeFormatter, defaultColorProvider, defaultMarkerProvider, defaultPalette, domainWithAuxiliarySeries, donutGaugeRendererConfig, getAutomaticDomain, getAutomaticDomainWithIncludedInterval, getAutomaticDomainWithTicks, getColorValueByName, getHorizontalSetup, getVerticalSetup, hasInnerScale, invert, isBandScale, isDaylightSavingTime, isDomainWithTicksCalculator, linearGaugeGridConfig, mergeDomains, radial, radialGrid, radialPreprocessor, radialScales, sparkChartGridConfig, stack, stackedArea, stackedAreaAccessors, stackedAreaPreprocessor, stackedPercentageArea, stackedPercentageAreaPreprocessor, stackedPreprocessor, statusAccessors, thresholdsSummaryGridConfig, thresholdsTopGridConfig
|
|
9898
|
-
//# sourceMappingURL=nova-ui-charts.
|
|
9909
|
+
export { AXES_STYLE_CHANGE_EVENT, AreaAccessors, AreaGridConfig, AreaRenderer, AxisConfig, BandScale, BarAccessors, BarGridConfig, BarHighlightStrategy, BarHorizontalGridConfig, BarRenderer, BarSeriesHighlightStrategy, BarStatusGridConfig, BarTooltipsPlugin, BasicLegendTileComponent, BorderConfig, CHART_COMPONENT, CHART_MARKERS, CHART_PALETTE_CS1, CHART_PALETTE_CS2, CHART_PALETTE_CS3, CHART_PALETTE_CS_S, CHART_PALETTE_CS_S_EXTENDED, CHART_VIEW_STATUS_EVENT, Chart, ChartAssist, ChartAssistEventType, ChartAssistRenderStateData, ChartCollection, ChartCollectionIdDirective, ChartCollectionService, ChartComponent, ChartDonutContentComponent, ChartDonutContentPlugin, ChartMarkerComponent, ChartPalette, ChartPlugin, ChartPopoverComponent, ChartPopoverPlugin, ChartTooltipComponent, ChartTooltipDirective, ChartTooltipsComponent, ChartTooltipsPlugin, CssFilterId, DATA_POINT_INTERACTION_RESET, DATA_POINT_NOT_FOUND, DEFAULT_DONUT_GAUGE_THRESHOLDS_RENDERER_CONFIG, DEFAULT_LINEAR_GAUGE_THRESHOLDS_RENDERER_CONFIG, DEFAULT_MARKER_INTERACTION_CONFIG, DEFAULT_RADIAL_RENDERER_CONFIG, DESTROY_EVENT, DONUT_GAUGE_LABEL_CLEARANCE_DEFAULT, DataManager, DataSeries, DimensionConfig, DonutGaugeLabelsPlugin, DonutGaugeRenderingUtil, DonutGaugeThresholdsRenderer, EMPTY_CONTINUOUS_DOMAIN, EventBus, GAUGE_LABELS_CONTAINER_CLASS, GAUGE_LABEL_FORMATTER_NAME_DEFAULT, GAUGE_QUANTITY_SERIES_ID, GAUGE_REMAINDER_SERIES_ID, GAUGE_THRESHOLD_LABEL_CLASS, GAUGE_THRESHOLD_MARKERS_SERIES_ID, GAUGE_THRESHOLD_MARKER_CLASS, GRAYSCALE_COLOR_MATRIX, GRAYSCALE_FILTER, GaugeMode, GaugeUtil, Grid, GridConfig, HIGHLIGHT_DATA_POINT_EVENT, HIGHLIGHT_SERIES_EVENT, HorizontalBarAccessors, IGNORE_INTERACTION_CLASS, INTERACTION_COORDINATES_EVENT, INTERACTION_DATA_POINTS_EVENT, INTERACTION_DATA_POINT_EVENT, INTERACTION_SERIES_EVENT, INTERACTION_VALUES_ACTIVE_EVENT, INTERACTION_VALUES_EVENT, InteractionLabelPlugin, InteractionLinePlugin, InteractionType, LEGEND_SERIES_CLASS_NAME, LINEAR_GAUGE_LABEL_CLEARANCE_DEFAULTS, Lasagna, LegendComponent, LegendInteractionAssist, LegendSeriesComponent, LineAccessors, LineRenderer, LineSelectSeriesInteractionStrategy, LinearGaugeLabelsPlugin, LinearGaugeThresholdsRenderer, LinearScale, MOUSE_ACTIVE_EVENT, MappedValueProvider, MissingDataLineRendererConfig, MouseInteractiveArea, MouseInteractiveAreaPlugin, NORMALIZED_DOMAIN, NoopAccessors, NoopRenderer, NoopScale, NuiChartsModule, PathMarker, PieRenderer, PointScale, ProcessedColorProvider, REFRESH_EVENT, RadialAccessors, RadialGrid, RadialPopoverPlugin, RadialRenderer, RadialTooltipsPlugin, RectangleAccessors, RenderEngine, RenderEnginePlugin, RenderLayerName, RenderState, Renderer, RichLegendTileComponent, SELECT_DATA_POINT_EVENT, SERIES_STATE_CHANGE_EVENT, SET_DOMAIN_EVENT, STANDARD_RENDER_LAYERS, Scale, SequentialChartMarkerProvider, SequentialColorProvider, SequentialValueProvider, SideIndicatorAccessors, SideIndicatorRenderer, SparkChartAssist, StandardGaugeColor, StandardGaugeThresholdId, StandardGaugeThresholdMarkerRadius, StandardLinearGaugeThickness, StatusAccessors, SvgMarker, THRESHOLDS_MAIN_CHART_RENDERER_CONFIG, THRESHOLDS_SUMMARY_RENDERER_CONFIG, TOOLTIP_POSITION_OFFSET, TextColorProvider, ThresholdsService, TimeIntervalScale, TimeScale, UtilityService, VerticalBarAccessors, XYAccessors, XYGrid, XYGridConfig, XYRenderer, ZoneBoundary, ZoomPlugin, applyStackMetadata, areaGrid, barAccessors, barGrid, barScales, borderMidpoint, calculateDomainValueCombinedTotals, calculateMissingData, convert, datetimeFormatter, defaultColorProvider, defaultMarkerProvider, defaultPalette, domainWithAuxiliarySeries, donutGaugeRendererConfig, getAutomaticDomain, getAutomaticDomainWithIncludedInterval, getAutomaticDomainWithTicks, getColorValueByName, getHorizontalSetup, getVerticalSetup, hasInnerScale, invert, isBandScale, isDaylightSavingTime, isDomainWithTicksCalculator, linearGaugeGridConfig, mergeDomains, radial, radialGrid, radialPreprocessor, radialScales, sparkChartGridConfig, stack, stackedArea, stackedAreaAccessors, stackedAreaPreprocessor, stackedPercentageArea, stackedPercentageAreaPreprocessor, stackedPreprocessor, statusAccessors, thresholdsSummaryGridConfig, thresholdsTopGridConfig };
|
|
9910
|
+
//# sourceMappingURL=nova-ui-charts.mjs.map
|