UNPKG

@nova-ui/charts

Version:

Nova Charts is a library created to provide potential consumers with solutions for various data visualizations that conform with the Nova Design Language. It's designed to solve common patterns identified by UX designers, but also be very flexible so that

1 lines 1.08 MB
{"version":3,"file":"nova-ui-charts.mjs","sources":["../../src/chart-tooltips/chart-tooltip.component.ts","../../src/chart-tooltips/chart-tooltip.component.html","../../src/chart-tooltips/chart-tooltip.directive.ts","../../src/renderers/types.ts","../../src/constants.ts","../../src/core/common/scales/types.ts","../../src/core/common/renderer.ts","../../src/core/common/types.ts","../../src/renderers/radial/radial-renderer.ts","../../src/core/common/chart-plugin.ts","../../src/core/plugins/chart-donut-content-plugin.ts","../../src/chart-donut-content/chart-donut-content.component.ts","../../src/chart-donut-content/chart-donut-content.component.html","../../src/core/plugins/tooltips/chart-tooltips-plugin.ts","../../src/chart-tooltips/chart-tooltips.component.ts","../../src/chart-tooltips/chart-tooltips.component.html","../../src/core/plugins/chart-popover-plugin.ts","../../src/chart-popover/chart-popover.component.ts","../../src/chart-popover/chart-popover.component.html","../../src/chart-marker/chart-marker.component.ts","../../src/chart-marker/chart-marker.component.html","../../src/chart/chart.component.ts","../../src/core/common/event-bus.ts","../../src/core/chart-collection.ts","../../src/chart-collection/chart-collection.service.ts","../../src/chart-collection/chart-collection-id.directive.ts","../../src/legend/types.ts","../../src/legend/legend.component.ts","../../src/legend/legend.component.html","../../src/legend/legend-series/legend-series.component.ts","../../src/legend/legend-series/legend-series.component.html","../../src/legend/legend-tile/basic-legend-tile/basic-legend-tile.component.ts","../../src/legend/legend-tile/basic-legend-tile/basic-legend-tile.component.html","../../src/legend/legend-tile/rich-legend-tile/rich-legend-tile.component.ts","../../src/legend/legend-tile/rich-legend-tile/rich-legend-tile.component.html","../../src/thresholds/types.ts","../../src/core/common/palette/processed-color-provider.ts","../../src/core/common/palette/sequential-value-provider.ts","../../src/core/common/palette/sequential-color-provider.ts","../../src/core/common/palette/text-color-provider.ts","../../src/core/common/palette/chart-palette.ts","../../src/core/common/palette/markers/svg-marker.ts","../../src/core/common/palette/palettes.ts","../../src/core/common/palette/sequential-chart-marker-provider.ts","../../src/core/common/palette/default-providers.ts","../../src/renderers/area/area-accessors.ts","../../src/renderers/accessors/rectangle-accessors.ts","../../src/renderers/bar/accessors/bar-accessors.ts","../../src/renderers/bar/accessors/horizontal-bar-accessors.ts","../../src/renderers/bar/accessors/status-accessors.ts","../../src/renderers/bar/accessors/status-accessors-fn.ts","../../src/core/common/scales/constants.ts","../../src/core/common/scales/helpers/convert.ts","../../src/core/common/scales/helpers/invert.ts","../../src/core/common/utility.service.ts","../../src/renderers/xy-renderer.ts","../../src/renderers/bar/bar-renderer.ts","../../src/renderers/constants.ts","../../src/renderers/accessors/xy-accessors.ts","../../src/renderers/line/line-accessors.ts","../../src/core/common/scales/helpers/is-in-range.ts","../../src/renderers/marker-utils.ts","../../src/renderers/line/line-renderer.ts","../../src/core/types.ts","../../src/renderers/side-indicator-renderer.ts","../../src/thresholds/thresholds-service.ts","../../src/charts.module.ts","../../src/gauge/constants.ts","../../src/core/common/scales/helpers/domain.ts","../../src/core/common/data-manager.ts","../../src/core/common/render-engine.ts","../../src/core/plugins/render-engine-plugin.ts","../../src/core/chart.ts","../../src/core/chart-assists/types.ts","../../src/core/chart-assists/chart-assist.ts","../../src/core/grid/config/dimension-config.ts","../../src/core/grid/default-text-overflow-handler.ts","../../src/core/grid/config/axis-config.ts","../../src/core/grid/config/border-config.ts","../../src/core/grid/config/grid-config.ts","../../src/core/grid/config/xy-grid-config.ts","../../src/core/grid/config/linear-gauge-grid-config-fn.ts","../../src/core/common/mouse-interactive-area.ts","../../src/core/common/scales/domain-calculation/merge-domains.ts","../../src/core/common/scales/domain-calculation/automatic-domain.ts","../../src/core/common/scales/scale.ts","../../src/core/common/scales/linear-scale.ts","../../src/core/common/scales/band-scale.ts","../../src/core/common/scales/domain-calculation/domain-with-ticks.ts","../../src/core/plugins/interaction/interaction-label-plugin.ts","../../src/core/plugins/interaction/interaction-line-plugin.ts","../../src/core/plugins/mouse-interactive-area-plugin.ts","../../src/core/common/lasagna.ts","../../src/core/grid/grid.ts","../../src/core/grid/xy-grid.ts","../../src/core/plugins/gauge/constants.ts","../../src/renderers/radial/gauge/donut-gauge-rendering-util.ts","../../src/renderers/radial/gauge/donut-gauge-thresholds-renderer.ts","../../src/core/plugins/gauge/donut-gauge-labels-plugin.ts","../../src/core/plugins/gauge/linear-gauge-labels-plugin.ts","../../src/renderers/bar/accessors/vertical-bar-accessors.ts","../../src/renderers/bar/bar-scales.ts","../../src/renderers/bar/linear-gauge-renderer-config.ts","../../src/renderers/bar/linear-gauge-thresholds-renderer.ts","../../src/renderers/bar/preprocessor-utils.ts","../../src/renderers/bar/stacked-preprocessor.ts","../../src/renderers/radial/accessors/radial-accessors.ts","../../src/renderers/radial/gauge/donut-gauge-renderer-config.ts","../../src/core/grid/radial-grid.ts","../../src/renderers/radial/radial-grid-fn.ts","../../src/renderers/radial/radial-preprocessor.ts","../../src/renderers/radial/radial-scales.ts","../../src/gauge/gauge-util.ts","../../src/gauge/types.ts","../../src/gauge/public-api.ts","../../src/chart-collection/public-api.ts","../../src/core/common/palette/mapped-value-provider.ts","../../src/core/common/palette/markers/path-marker.ts","../../src/core/common/palette/public-api.ts","../../src/core/common/scales/domain-calculation/domain-with-auxiliary-series.ts","../../src/core/common/scales/point-scale.ts","../../src/core/common/scales/formatters/datetime-formatter.ts","../../src/core/common/scales/time-scale.ts","../../src/core/common/scales/time-interval-scale.ts","../../src/core/common/scales/formatters/public-api.ts","../../src/core/common/scales/noop-scale.ts","../../src/core/common/scales/public-api.ts","../../src/core/common/data-series.ts","../../src/core/common/public-api.ts","../../src/core/grid/config/area-grid-config.ts","../../src/core/grid/config/bar-grid-config.ts","../../src/core/grid/config/bar-horizontal-grid-config.ts","../../src/core/grid/config/bar-status-grid-config.ts","../../src/core/grid/config/spark-chart-grid-config.ts","../../src/core/grid/config/public-api.ts","../../src/core/grid/types.ts","../../src/core/grid/public-api.ts","../../src/core/plugins/gauge/types.ts","../../src/core/plugins/gauge/public-api.ts","../../src/core/plugins/interaction/public-api.ts","../../src/core/plugins/radial-popover-plugin.ts","../../src/core/plugins/tooltips/radial-tooltips-plugin.ts","../../src/core/plugins/tooltips/bar-tooltips-plugin.ts","../../src/core/plugins/tooltips/index.ts","../../src/core/plugins/types.ts","../../src/core/plugins/zoom-plugin.ts","../../src/core/plugins/timeseries-zoom-plugin.ts","../../src/core/plugins/timeseries-zoom-plugin-sync.service.ts","../../src/core/plugins/public-api.ts","../../src/core/chart-assists/spark-chart-assist.ts","../../src/core/chart-assists/public-api.ts","../../src/core/public-api.ts","../../src/legend/legend-tile/public-api.ts","../../src/legend/public-api.ts","../../src/renderers/accessors/noop-accessors.ts","../../src/renderers/accessors/public-api.ts","../../src/renderers/noop-renderer.ts","../../src/renderers/bar/bar-grid.ts","../../src/renderers/bar/types.ts","../../src/renderers/bar/accessors/bar-accessors-fn.ts","../../src/renderers/bar/accessors/public-api.ts","../../src/renderers/bar/highlight-strategies/bar-highlight-strategy.ts","../../src/renderers/bar/highlight-strategies/bar-highlight-strategy-outline.ts","../../src/renderers/bar/highlight-strategies/bar-series-highlight-strategy.ts","../../src/renderers/bar/highlight-strategies/public-api.ts","../../src/renderers/bar/public-api.ts","../../src/renderers/radial/pie-renderer.ts","../../src/renderers/radial/public-api.ts","../../src/renderers/line/calculate-missing-data.ts","../../src/renderers/line/interaction-strategies/line-select-series-interaction-strategy.ts","../../src/renderers/line/interaction-strategies/public-api.ts","../../src/renderers/line/missing-data-line-renderer-config.ts","../../src/renderers/line/public-api.ts","../../src/renderers/area/area-grid.ts","../../src/renderers/area/area-renderer.ts","../../src/renderers/area/stacked-area-preprocessor.ts","../../src/renderers/area/stacked-percentage-area-preprocessor.ts","../../src/renderers/area/stacked-area-accessors.ts","../../src/renderers/area/public-api.ts","../../src/renderers/public-api.ts","../../src/thresholds/thresholds-summary-grid-config.ts","../../src/thresholds/thresholds-top-grid-config.ts","../../src/thresholds/public-api.ts","../../src/public-api.ts","../../src/nova-ui-charts.ts"],"sourcesContent":["// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { animate, style, transition, trigger } from \"@angular/animations\";\nimport {\n ChangeDetectionStrategy,\n Component,\n Input,\n TemplateRef,\n} from \"@angular/core\";\n\n@Component({\n selector: \"nui-chart-tooltip\",\n styleUrls: [\"./chart-tooltip.component.less\"],\n templateUrl: \"./chart-tooltip.component.html\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger(\"tooltip\", [\n transition(\":enter\", [\n style({ opacity: 0 }),\n animate(300, style({ opacity: 1 })),\n ]),\n transition(\":leave\", [animate(300, style({ opacity: 0 }))]),\n ]),\n ],\n standalone: false,\n})\nexport class ChartTooltipComponent {\n @Input() template: TemplateRef<any>;\n}\n","<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","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n Overlay,\n OverlayPositionBuilder,\n ScrollStrategyOptions,\n} from \"@angular/cdk/overlay\";\n// added the import below on a separate line to avoid warning of unused reference when doing build-lib:prod\n// @see https://github.com/angular/angular/issues/21280#issuecomment-608957903\nimport {\n ConnectedPosition,\n FlexibleConnectedPositionStrategy,\n OverlayRef,\n} from \"@angular/cdk/overlay\";\nimport { ComponentPortal } from \"@angular/cdk/portal\";\nimport {\n Directive,\n ElementRef,\n Input,\n OnDestroy,\n OnInit,\n TemplateRef,\n} from \"@angular/core\";\nimport { Subject, Subscription } from \"rxjs\";\n\nimport { ChartTooltipComponent } from \"./chart-tooltip.component\";\n\n/** @ignore */\n@Directive({\n selector: \"[nuiChartTooltip]\",\n standalone: false,\n})\nexport class ChartTooltipDirective implements OnInit, OnDestroy {\n @Input() template: TemplateRef<any>;\n\n @Input() openRemoteControl: Subject<void>;\n @Input() closeRemoteControl: Subject<void>;\n\n @Input() positions: ConnectedPosition[];\n\n private overlayRef: OverlayRef;\n private openSubscription: Subscription;\n private closeSubscription: Subscription;\n private positionStrategy: FlexibleConnectedPositionStrategy;\n\n constructor(\n private overlay: Overlay,\n private overlayPositionBuilder: OverlayPositionBuilder,\n private scrollStrategyOptions: ScrollStrategyOptions,\n public elementRef: ElementRef<HTMLElement>\n ) {}\n\n public ngOnInit(): void {\n this.positionStrategy = this.overlayPositionBuilder\n .flexibleConnectedTo(this.elementRef)\n .withPositions(this.positions)\n .withFlexibleDimensions(false)\n .withPush(true);\n\n this.overlayRef = this.overlay.create({\n panelClass: \"nui-chart-tooltip-pane\",\n positionStrategy: this.positionStrategy,\n scrollStrategy: this.scrollStrategyOptions.close(),\n });\n\n if (this.openRemoteControl) {\n this.openSubscription = this.openRemoteControl.subscribe(() => {\n this.show();\n });\n }\n\n if (this.closeRemoteControl) {\n this.closeSubscription = this.closeRemoteControl.subscribe(() => {\n this.hide();\n });\n }\n }\n\n public show(): void {\n if (this.overlayRef.hasAttached()) {\n this.positionStrategy.apply();\n return;\n }\n const tooltipRef = this.overlayRef.attach(\n new ComponentPortal(ChartTooltipComponent)\n );\n tooltipRef.instance.template = this.template;\n }\n\n public hide(): void {\n this.overlayRef.detach();\n }\n\n public ngOnDestroy(): void {\n this.hide();\n\n if (this.openSubscription) {\n this.openSubscription.unsubscribe();\n }\n if (this.closeSubscription) {\n this.closeSubscription.unsubscribe();\n }\n }\n\n public getOverlayElement(): HTMLElement {\n return this.overlayRef.overlayElement;\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { CurveFactory } from \"d3-shape\";\nimport { Subject } from \"rxjs\";\n\nimport { IRectangleAccessors } from \"./accessors/rectangle-accessors\";\nimport { BarRenderer } from \"./bar/bar-renderer\";\nimport { ILineAccessors } from \"./line/line-accessors\";\nimport { LineRenderer } from \"./line/line-renderer\";\nimport { Renderer } from \"../core/common/renderer\";\nimport { Scales } from \"../core/common/scales/types\";\nimport {\n D3Selection,\n IAccessors,\n IDataSeries,\n IRenderContainers,\n IRendererConfig,\n IRendererEventPayload,\n} from \"../core/common/types\";\n\nexport enum RenderState {\n hidden = \"hidden\",\n deemphasized = \"deemphasized\",\n emphasized = \"emphasized\",\n default = \"default\",\n}\n\nexport enum RenderLayerName {\n background = \"background\",\n data = \"data\",\n unclippedData = \"unclipped-data\",\n foreground = \"foreground\",\n}\n\n/** The configuration interface for marker interaction */\nexport interface IMarkerInteractionConfig {\n /** Enables mouse events on data point markers */\n enabled: boolean;\n /** Enables the pointer style mouse cursor when data point markers are hovered */\n clickable?: boolean;\n}\n\n/** The configuration interface for the enhanced line caps */\nexport interface IEnhancedLineCapConfig {\n /** Set the stroke color */\n stroke?: string;\n /** Set the stroke width in pixels */\n strokeWidth?: number;\n /** Set the fill color */\n fill?: string;\n /** Set the radius in pixels */\n radius?: number;\n}\n\n/** The configuration interface for the line renderer */\nexport interface ILineRendererConfig extends IRendererConfig {\n /** Set the width of the line in pixels */\n strokeWidth?: number;\n /** Set the stroke-dasharray of the line, e.g. \"1,1\", \"2,2\", etc. */\n strokeStyle?: string;\n /** Set the stroke-linecap of the line, e.g. \"round\" */\n strokeLinecap?: string;\n /** Set the d3 curve algorithm to be used for drawing the lines */\n curveType?: CurveFactory;\n /** Set the strategy for determining the behavior of the chart resulting from user interaction, e.g. LineSelectSeriesInteractionStrategy */\n interactionStrategy?: IHighlightStrategy<ILineAccessors, LineRenderer>;\n /** Configure the interaction behavior for markers */\n markerInteraction?: IMarkerInteractionConfig;\n /** Set whether enhanced line caps should be displayed */\n useEnhancedLineCaps?: boolean;\n /** Optionally configure enhanced line caps. Prerequisite: 'useEnhancedLineCaps' is set to true */\n enhancedLineCap?: IEnhancedLineCapConfig;\n}\n\n/** The configuration interface for the bar renderer */\nexport interface IBarRendererConfig extends IRendererConfig {\n /** Set the padding on both sides of each bar */\n padding?: number;\n /** Set the class name to apply custom styles to the bars */\n barClass?: string;\n /** Set the strategy for determining the behavior of the chart resulting from user interaction, e.g. BarHighlightStrategy */\n highlightStrategy?: IHighlightStrategy<IRectangleAccessors, BarRenderer>;\n /** Set the mouse cursor style to use when hovering over individual bars */\n cursor?: string;\n /** Enables pointer events on the bars */\n pointerEvents?: boolean;\n /** Set the stroke width in pixels */\n strokeWidth?: number;\n /** Enable the minimum bar thickness (BarRenderer.MIN_BAR_THICKNESS) */\n enableMinBarThickness?: boolean;\n}\n\n/** The configuration interface for the area renderer */\nexport interface IAreaRendererConfig extends IRendererConfig {\n /** Set the d3 curve algorithm to be used for drawing the area boundaries */\n curveType?: CurveFactory;\n /** Set the class name to apply custom styles to the areas */\n areaClass?: string;\n /** Enables the pointer cursor when data point markers are hovered */\n markerInteraction?: IMarkerInteractionConfig;\n /** The width of the area path's stroke in pixels. Default is 1. */\n strokeWidth?: number;\n}\n\nexport interface IRenderSeries<TA extends IAccessors> {\n dataSeries: IDataSeries<TA>;\n containers: IRenderContainers;\n scales: Scales;\n parentContainer?: D3Selection<SVGElement>;\n}\n\nexport interface IHighlightStrategy<\n TA extends IAccessors<any>,\n T = Renderer<TA>\n> {\n getDataPointIndex(\n renderer: T,\n series: IDataSeries<TA>,\n values: { [p: string]: any },\n scales: Scales\n ): number;\n\n highlightDataPoint(\n renderer: T,\n renderSeries: IRenderSeries<TA>,\n dataPointIndex: number,\n rendererSubject: Subject<IRendererEventPayload>\n ): void;\n\n draw(\n renderer: T,\n renderSeries: IRenderSeries<TA>,\n rendererSubject: Subject<IRendererEventPayload>\n ): void;\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { InjectionToken } from \"@angular/core\";\n\nimport { IChartComponent, ILasagnaLayer } from \"./core/common/types\";\nimport { RenderLayerName } from \"./renderers/types\";\n\nexport const MOUSE_ACTIVE_EVENT = \"mouse_active\";\nexport const INTERACTION_VALUES_ACTIVE_EVENT = \"interaction_values_active\";\nexport const INTERACTION_VALUES_EVENT = \"interaction_values\";\nexport const INTERACTION_COORDINATES_EVENT = \"interaction_coordinates\";\nexport const HIGHLIGHT_DATA_POINT_EVENT = \"highlight_data_point\";\nexport const SELECT_DATA_POINT_EVENT = \"select_data_point\";\nexport const HIGHLIGHT_SERIES_EVENT = \"highlight_series\";\nexport const INTERACTION_SERIES_EVENT = \"interaction_series\";\nexport const INTERACTION_DATA_POINTS_EVENT = \"interaction_data_points\";\nexport const INTERACTION_DATA_POINT_EVENT = \"interaction_data_point\";\nexport const DESTROY_EVENT = \"destroy\";\nexport const SET_DOMAIN_EVENT = \"set_domain\";\nexport const REFRESH_EVENT = \"refresh\";\nexport const CHART_VIEW_STATUS_EVENT = \"chart_view_status\";\nexport const SERIES_STATE_CHANGE_EVENT = \"series_state_change\";\nexport const AXES_STYLE_CHANGE_EVENT = \"axes_style_change\";\n\n/** @ignore */\nexport const CHART_COMPONENT = new InjectionToken<IChartComponent>(\n \"chart_component\"\n);\n\n/** @ignore */\nexport const STANDARD_RENDER_LAYERS: { [name: string]: ILasagnaLayer } = {\n [RenderLayerName.background]: {\n name: RenderLayerName.background,\n order: 0,\n clipped: true,\n },\n [RenderLayerName.data]: {\n name: RenderLayerName.data,\n order: 50,\n clipped: true,\n },\n [RenderLayerName.unclippedData]: {\n name: RenderLayerName.unclippedData,\n // order is one greater than the data layer to ensure the unclipped data layer appears just after the data layer in the DOM\n order: 51,\n clipped: false,\n },\n [RenderLayerName.foreground]: {\n name: RenderLayerName.foreground,\n order: 1000,\n clipped: false,\n },\n};\n\n/** @ignore */\nexport const DATA_POINT_NOT_FOUND = -1;\n\n/** @ignore */\nexport const DATA_POINT_INTERACTION_RESET = -2;\n\n/** Use this class to prevent DOM elements from triggering mouse-interactive-area events */\nexport const IGNORE_INTERACTION_CLASS = \"ignore-interaction\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { AxisScale } from \"d3-axis\";\n\nimport { UnitOption } from \"@nova-ui/bits\";\n\nimport { IAccessors, IChartSeries } from \"../types\";\n\n/** Domain for series with empty or null data */\nexport const EMPTY_CONTINUOUS_DOMAIN = [0, 0];\n/** A reasonable non-data-driven domain for charts */\nexport const NORMALIZED_DOMAIN = [0, 1];\n\n/** Signature for domain calculator */\nexport type DomainCalculator = (\n chartSeriesSet: IChartSeries<IAccessors>[],\n scaleId: string,\n scale: IScale<any>\n) => any[];\n\n/** Signature for a specific domain calculator that rounds domain to the closes tick */\nexport interface IDomainWithTicksCalculator extends DomainCalculator {\n domainWithTicks?: true;\n}\n\n/** Type guard for the domain calculator with ticks */\nexport function isDomainWithTicksCalculator(\n obj: any\n): obj is IDomainWithTicksCalculator {\n return !!obj.domainWithTicks;\n}\n\n/** Interface for scale formatters */\nexport interface IFormatters<T> {\n /** Formatter for tick labels */\n tick?: Formatter<T>;\n /** Additional formatters */\n [p: string]: Formatter<T> | undefined;\n}\n\n/** Signature for label formatters */\nexport type Formatter<T> = (value: T) => string;\n\n/** Dictionary of scale collections in index and array form */\nexport interface ScalesIndex {\n [key: string]: {\n /** Scale collection as an index */\n index: { [scaleId: string]: IScale<any> };\n /** Scale collection as an array */\n list: IScale<any>[];\n };\n}\n\n/** Dictionary of scales */\nexport type Scales = Record<string, IScale<any>>;\n\nexport interface IXYScales extends Scales {\n x: IScale<any>;\n y: IScale<any>;\n}\n\nexport interface IRadialScales extends Scales {\n r: IScale<number>;\n}\n\n/** Interface for a scale */\nexport interface IScale<T> {\n /** The scale identifier */\n readonly id: string;\n readonly d3Scale: AxisScale<T>; // TODO: maybe AxisScale is to narrow?\n fixDomainValues?: T[];\n\n /** If this flag is enabled, the domain of this scale is not recalculated */\n isDomainFixed?: boolean;\n /** Method used to calculate the scale's domain */\n domainCalculator?: DomainCalculator;\n /** The scales formatters */\n formatters: IFormatters<T>;\n /** If this flag is enabled, the domain has been recalculated with ticks in mind */\n __domainCalculatedWithTicks?: boolean;\n scaleUnits?: UnitOption;\n\n /** If this flag is enabled, the label generated by InteractionLabelPlugin will be shown only on a chart that is beeing hovered */\n isTimeseriesScale?: boolean;\n\n /**\n * Sets fix domain to the first and last value and assigns values to fixDomainValues property\n */\n setFixDomainValues?(values: T[]): void;\n\n /**\n * Determines if the scale's domain is continuous\n *\n * @returns {boolean} true if the scale's domain is continuous (numeric), false otherwise\n */\n isContinuous(): boolean;\n\n /**\n * Determines if the scale's domain is valid\n *\n * @returns {boolean} true if the scale's domain is valid, false otherwise\n */\n isDomainValid(): boolean;\n\n /**\n * Converts a value to its corresponding coordinate\n *\n * @param {T} value The value to be converted\n * @returns {number} The coordinate corresponding to the specified value\n */\n convert(value: T): number;\n\n /**\n * Converts a coordinate to its corresponding value\n *\n * @param {number} coordinate The coordinate to be converted\n * @returns {T} The value corresponding to the specified coordinate\n */\n invert(coordinate: number): T | undefined;\n\n /**\n * Gets the scale's range\n *\n * @returns {[number, number]} The scale's range\n */\n range(): [number, number];\n\n /**\n * Sets the scale's range\n *\n * @param {[number, number]} range The scale's new range\n */\n range(range: [number, number]): this;\n\n /**\n * Gets the scale's domain\n *\n * @returns {T[]} The scale's domain\n */\n domain(): T[];\n\n /**\n * Sets the scale's domain\n *\n * @param {T[]} domain The scale's new domain\n */\n domain(domain: T[]): this;\n\n /**\n * Shorthand method for setting the domain and isDomainFixed at once\n *\n * @param {T[]} domain The scale's fixed domain\n */\n fixDomain(domain: T[]): void;\n\n /**\n * Reverse the scale orientation by toggling the reversed flag\n */\n reverse(): this;\n\n /**\n * Getter for the reversed flag (see #reverse)\n */\n reversed(): boolean;\n\n /**\n * Setter for the reversed flag (see #reverse)\n *\n * @param reversed\n */\n reversed(reversed: boolean): this;\n}\n\nexport interface IBandScale<T> extends IScale<T> {\n bandwidth(): number;\n}\n\nexport function isBandScale(scale: any): scale is IBandScale<any> {\n return typeof scale.bandwidth === \"function\";\n}\n\nexport interface IHasInnerScale<T> extends IScale<T> {\n innerScale: IScale<any>;\n}\n\nexport function hasInnerScale(scale: any): scale is IHasInnerScale<any> {\n return typeof scale.innerScale !== \"undefined\";\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { extent, Numeric } from \"d3\";\nimport { Selection } from \"d3-selection\";\nimport { ValueMap } from \"d3-selection-multi\";\nimport defaultsDeep from \"lodash/defaultsDeep\";\nimport each from \"lodash/each\";\nimport get from \"lodash/get\";\nimport { Subject } from \"rxjs\";\n\nimport { DATA_POINT_NOT_FOUND, STANDARD_RENDER_LAYERS } from \"../../constants\";\nimport { EMPTY_CONTINUOUS_DOMAIN, IScale, Scales } from \"./scales/types\";\nimport {\n D3Selection,\n IAccessors,\n IDataPoint,\n IDataSeries,\n ILasagnaLayer,\n IPosition,\n IRenderContainers,\n IRendererConfig,\n IRendererEventPayload,\n} from \"./types\";\nimport {\n IRenderSeries,\n RenderLayerName,\n RenderState,\n} from \"../../renderers/types\";\n\n/**\n * The abstract base class for chart renderers with some limited default functionality\n */\n// For why the \"dynamic\" decorator is used see https://github.com/ng-packagr/ng-packagr/issues/641\n// @dynamic\nexport abstract class Renderer<TA extends IAccessors> {\n public static readonly DEFAULT_CONFIG: IRendererConfig = {\n stateStyles: {\n [RenderState.default]: {\n opacity: 1,\n },\n [RenderState.hidden]: {\n opacity: 0,\n },\n [RenderState.deemphasized]: {\n opacity: 0.1,\n },\n [RenderState.emphasized]: {\n opacity: 1,\n },\n },\n };\n\n constructor(public config: IRendererConfig = {}) {\n // setting default values to the properties that were not set by user\n this.config = defaultsDeep(this.config, Renderer.DEFAULT_CONFIG);\n }\n\n public interaction: Record<string, any> = {};\n\n /**\n * Draw the visual representation of the provided data series\n *\n * @param {IRenderSeries} renderSeries The series to render\n * @param {Subject<IRendererEventPayload>} rendererSubject A subject to optionally invoke for emitting events regarding a data point\n */\n public abstract draw(\n renderSeries: IRenderSeries<TA>,\n rendererSubject: Subject<IRendererEventPayload>\n ): void;\n\n /**\n * Return position of a specified datapoint\n *\n * @param {IDataSeries} dataSeries\n * @param {number} index\n * @param {Scales} scales\n * @returns {IPosition}\n */\n public abstract getDataPointPosition(\n dataSeries: IDataSeries<TA>,\n index: number,\n scales: Scales\n ): IPosition | undefined;\n\n /**\n * Based on provided values, return the nearest data point that the given coordinates represent. This is used for mouse hover behavior\n *\n * @param {IDataSeries} series series from which to determine the index corresponding to the specified values\n * @param {{ [axis: string]: any }} values the values from which a data point index can be determined\n * @param {Scales} scales the scales to be used in the index calculation\n *\n * @returns {number} negative value means that index is not found\n */\n public getDataPointIndex(\n series: IDataSeries<TA>,\n values: { [axis: string]: any },\n scales: Scales\n ): number {\n return DATA_POINT_NOT_FOUND;\n }\n\n /**\n * Highlight the data point corresponding to the specified data point index\n *\n * @param {IRenderSeries} renderSeries The series on which to render the data point highlight\n * @param {number} dataPointIndex index of the highlighted point within the data series (pass -1 to remove the highlight marker)\n * @param {Subject<IRendererEventPayload>} rendererSubject A subject to optionally invoke for emitting events regarding a data point\n */\n public highlightDataPoint(\n renderSeries: IRenderSeries<TA>,\n dataPointIndex: number,\n rendererSubject: Subject<IRendererEventPayload>\n ): void {}\n\n /**\n * Get the style attributes for the specified state that we need to apply to a series container\n *\n * @param {RenderState} state the state for which to retrieve container styles\n *\n * @returns {ValueMap<any, any>} the container styles for the specified state\n */\n public getContainerStateStyles = (\n state: RenderState\n ): ValueMap<any, any> => {\n if (!this.config.stateStyles) {\n throw new Error(\"stateStyles property is not defined\");\n }\n return this.config.stateStyles[state || RenderState.default];\n };\n\n /**\n * Set the RenderState of the target data series\n *\n * @param {IRenderContainers} renderContainers the render containers of the series\n * @param {RenderState} state The new state for the target series\n */\n public setSeriesState(\n renderContainers: IRenderContainers,\n state: RenderState\n ): void {}\n\n /**\n * Set the RenderState of the target data point\n *\n * @param {D3Selection} target the target data point\n * @param {RenderState} state The new state for the target data point\n */\n public setDataPointState(target: D3Selection, state: RenderState): void {}\n\n /**\n * Calculate domain for data filtered by given filterScales\n *\n * @param dataSeries\n * @param filterScales\n * @param scaleKey\n * @param scale\n * @returns array of datapoints from <code>dataSeries</code> filtered by domains of given <code>filterScale</code>s\n */\n public getDomainOfFilteredData(\n dataSeries: IDataSeries<TA>,\n filterScales: Record<string, IScale<any>>,\n scaleKey: string,\n scale: IScale<any>\n ): any[] {\n let filteredData = dataSeries.data;\n for (const fixedScaleKey of Object.keys(filterScales)) {\n const filterScale = filterScales[fixedScaleKey];\n if (!filterScale.isDomainFixed || !filterScale.isContinuous()) {\n continue;\n }\n\n filteredData = this.filterDataByDomain(\n filteredData,\n dataSeries,\n fixedScaleKey,\n filterScale.domain()\n );\n }\n\n return this.getDomain(filteredData, dataSeries, scaleKey, scale);\n }\n\n /**\n * Calculate the domain using the data of a series\n *\n * @param {any[]} data source data, can be filtered\n * @param dataSeries related data series\n * @param {string} scaleName name of the scale for which domain calculation is needed\n * @param scale\n *\n * @returns {[any, any]} min and max values as an array\n */\n public getDomain(\n data: any[],\n dataSeries: IDataSeries<TA>,\n scaleName: string,\n scale: IScale<any>\n ): any[] {\n if (!data || data.length === 0) {\n return EMPTY_CONTINUOUS_DOMAIN;\n }\n\n return extent<Numeric, Numeric>(data, (datum, index, arr) =>\n dataSeries.accessors.data?.[scaleName]?.(\n datum,\n index,\n Array.from(arr),\n dataSeries\n )\n );\n }\n\n /**\n * Filters given dataset by domain of provided scale\n *\n * @param data\n * @param dataSeries\n * @param scaleName\n * @param domain\n */\n public filterDataByDomain(\n data: any[],\n dataSeries: IDataSeries<TA>,\n scaleName: string,\n domain: any[]\n ): any[] {\n const accessor = dataSeries.accessors.data?.[scaleName];\n\n // if (isNil(accessor)) {\n // throw new Error(\"accessor is not defined\");\n // }\n\n return data.filter((d, i) => {\n // @ts-ignore\n const value = accessor(d, i, data, dataSeries);\n return value >= domain[0] && value <= domain[1];\n });\n }\n\n /**\n * Get the definitions of lasagna layers required for visualizing data\n *\n * @returns {ILasagnaLayer[]} lasagna layer definitions\n */\n public getRequiredLayers(): ILasagnaLayer[] {\n return [STANDARD_RENDER_LAYERS[RenderLayerName.data]];\n }\n\n protected setupInteraction(\n path: string[],\n nativeEvent: string,\n target: Selection<any, any, any, any>,\n dataPointSubject: Subject<IRendererEventPayload>,\n dataPoint: Partial<IDataPoint>\n ): void {\n const eventList: string[] = get(this.interaction, path, {})[\n nativeEvent\n ];\n if (!eventList) {\n return;\n }\n\n each(eventList, (targetEvent: string) => {\n target.on(nativeEvent, () => {\n const bbox = target.node().getBoundingClientRect();\n dataPointSubject.next({\n eventName: targetEvent,\n data: <IDataPoint>{\n ...dataPoint,\n position: bbox,\n },\n });\n });\n });\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { ScaleLinear } from \"d3-scale\";\nimport { Selection } from \"d3-selection\";\nimport { ValueMap } from \"d3-selection-multi\";\n\nimport { ChartPlugin } from \"./chart-plugin\";\nimport { DataManager } from \"./data-manager\";\nimport { EventBus } from \"./event-bus\";\nimport { RenderEngine } from \"./render-engine\";\nimport { Renderer } from \"./renderer\";\nimport { Scales } from \"./scales/types\";\nimport { StandardGaugeThresholdMarkerRadius } from \"../../gauge/constants\";\nimport { RenderState } from \"../../renderers/types\";\nimport { IGrid } from \"../grid/types\";\n\n/**\n * Short-form alias for the most commonly used generic D3 Selection type\n */\nexport type D3Selection<T extends SVGElement = SVGElement> = Selection<\n T,\n any,\n SVGElement,\n any\n>;\n\n/**\n * Signature for data accessors\n *\n * @param d data point\n * @param i index\n * @param series the whole data series\n */\nexport type DataAccessor<D = any, T = any> = (\n d: D,\n i: number,\n series: D[],\n dataSeries: IDataSeries<IAccessors>\n) => T;\n\n/**\n * Signature for series accessors\n */\nexport type SeriesAccessor = (\n seriesId: string,\n series: IDataSeries<IAccessors>\n) => any;\n\n/** @ignore */\nexport interface ILasagnaLayer {\n name: string;\n order: number;\n clipped: boolean;\n}\n\n/** Mouse interaction types */\nexport enum InteractionType {\n /** Indicates that an element has been clicked */\n Click = \"click\",\n /** Indicates that an element is hovered */\n Hover = \"hover\",\n /** Indicates a 'mousedown' event */\n MouseDown = \"mousedown\",\n /** Indicates that the mouse has entered the bounds of an element */\n MouseEnter = \"mouseenter\",\n /** Indicates that the mouse has left the bounds of an element */\n MouseLeave = \"mouseleave\",\n /** Indicates a movement of the mouse across the chart */\n MouseMove = \"mousemove\",\n /** Indicates a 'mouseup' event */\n MouseUp = \"mouseup\",\n}\n\n/** @ignore */\nexport interface ICoordinates {\n x: number;\n y: number;\n}\n\n/** @ignore */\nexport interface IInteractionEvent {\n type: InteractionType;\n coordinates: ICoordinates;\n}\n\n/**\n * Information about the render state of a series\n */\nexport interface IRenderStateData {\n /** Series identifier */\n seriesId: string;\n /** Series render state */\n state: RenderState;\n /** Series */\n series?: IChartSeries<IAccessors>;\n}\n\n/** @ignore */\nexport interface IDomainLimits<T> {\n min: T;\n max: T;\n}\n\nexport interface IRendererConfig {\n stateStyles?: Record<RenderState, ValueMap<any, any>>;\n transitionDuration?: number;\n interactive?: boolean;\n /** Excludes series from scale domain calculations */\n ignoreForDomainCalculation?: boolean;\n}\n\nexport interface IRadialRendererConfig extends IRendererConfig {\n annularWidth?: number;\n annularPadding?: number;\n /** annularGrowth is a percentage value to define annular width automatically.\n * It will grow until it reaches maxThickness.\n * Set one to 0 to use annularWidth constant value instead */\n maxThickness?: number;\n annularGrowth?: number;\n cursor?: string;\n strokeWidth?: number;\n enableSeriesHighlighting?: boolean;\n enableDataPointHighlighting?: boolean;\n}\n\n/**\n * Standard configuration for gauge threshold renderers\n */\nexport interface IGaugeThresholdsRendererConfig {\n /** The radius of each threshold marker */\n markerRadius?: StandardGaugeThresholdMarkerRadius | number;\n /** Boolean indicating whether the renderer is enabled */\n enabled?: boolean;\n}\n\n/**\n * Configuration for the DonutGaugeThresholdsRenderer\n */\nexport interface IDonutGaugeThresholdsRendererConfig\n extends IRadialRendererConfig,\n IGaugeThresholdsRendererConfig {}\n\n/**\n * Configuration for the LinearGaugeThresholdsRenderer\n */\nexport interface ILinearGaugeThresholdsRendererConfig\n extends IRendererConfig,\n IGaugeThresholdsRendererConfig {}\n\nexport interface ILinearScales {\n x: ScaleLinear<number, number>;\n y: ScaleLinear<number, number>;\n}\n\nexport interface IDataAccessors<D = any> {\n [key: string]: DataAccessor<D> | undefined;\n}\n\nexport interface ISeriesAccessors {\n [key: string]: SeriesAccessor | undefined;\n}\n\n/**\n * Accessors describe the data for the consumers.\n */\nexport interface IAccessors<D = any> {\n /** Data point level accessors for defining what part of a datum is used for visualizations */\n data?: IDataAccessors<D>;\n /** Series level accessors - e.g. for colors, markers, etc. */\n series?: ISeriesAccessors;\n}\n\n/**\n * A set of data to visualize on the chart\n */\nexport interface IDataSeries<A extends IAccessors<D>, D = any> {\n /** The series identifier */\n id: string;\n /**\n * The series data. It is an array of arbitrary objects, the structure of which is prescribed by the consumer of this data series. Specific\n * renderers require specific accessor keys that are used to access values on data points. The renderers and other consumers rarely access\n * data point properties directly, but usually through accessors.\n */\n data: D[];\n /** Accessors describing the data */\n accessors: A;\n\n /** Allow any properties to be stored on this object to facilitate the transfer of data from APIs */\n [key: string]: any;\n}\n\n/**\n * The set of elements required for a chart to visualize some data\n */\nexport interface IChartSeries<A extends IAccessors> extends IDataSeries<A> {\n /** The renderer to be used for visualizing the data */\n renderer: Renderer<A>;\n /**\n * Information about how chart data should conform to the drawable area.\n * Grids expect certain scale keys to be used depending on the type of grid, for example an x-y grid\n * uses 'x' and 'y' as the keys for its scales.\n */\n scales: Scales;\n /**\n * Represents an emphasis/visibility state of this series\n */\n renderState?: RenderState;\n}\n\nexport interface IChartAssistSeries<A extends IAccessors>\n extends IChartSeries<A> {\n /**\n * Whether this series should be shown in the legend\n */\n showInLegend?: boolean;\n /**\n * Whether this series should be preprocessed in the chart assist\n */\n preprocess?: boolean;\n}\n\nexport interface IChartMarker {\n getSvg(): string;\n setColor(color: string): void;\n}\n\nexport interface IChart {\n target?: D3Selection<SVGSVGElement>;\n configuration?: IChartConfiguration;\n getEventBus(): EventBus<IChartEvent>;\n getDataManager(): DataManager;\n getRenderEngine(): RenderE