1 line
913 KiB
Plaintext
1 line
913 KiB
Plaintext
{"version":3,"file":"swimlane-ngx-charts.mjs","sources":["../../../../projects/swimlane/ngx-charts/src/lib/utils/throttle.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/tooltip/position/placement-type.enum.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/tooltip/position/position.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/tooltip/tooltip.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/tooltip/injection-registery.service.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/tooltip/injection.service.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/tooltip/tooltip.service.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/types/legend.model.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/types/scale-type.enum.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/legend/scale-legend.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/label.helper.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/legend/legend-entry.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/legend/legend.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/charts/chart.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/utils/visibility-observer.ts","../../../../projects/swimlane/ngx-charts/src/lib/utils/types.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/base-chart.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/types/orientation.enum.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/axes/axis-label.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/trim-label.helper.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/axes/ticks.helper.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/types/text-anchor.enum.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/axes/x-axis-ticks.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/axes/x-axis.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/shape.helper.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/axes/y-axis-ticks.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/axes/y-axis.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/axes/axes.module.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/tooltip/style.type.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/tooltip/show.type.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/tooltip/tooltip.directive.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/tooltip/tooltip.module.ts","../../../../projects/swimlane/ngx-charts/src/lib/utils/id.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/types/bar-orientation.enum.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/svg-linear-gradient.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/circle.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/circle-series.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/grid-panel.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/grid-panel-series.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/svg-radial-gradient.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/area.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/count/count.helper.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/count/count.directive.ts","../../../../projects/swimlane/ngx-charts/src/lib/events.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/tooltip-area.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/timeline/timeline.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/legend/advanced-legend.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/chart-common.module.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/view-dimensions.helper.ts","../../../../projects/swimlane/ngx-charts/src/lib/utils/color-sets.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/color.helper.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/domain.helper.ts","../../../../projects/swimlane/ngx-charts/src/lib/utils/sort.ts","../../../../projects/swimlane/ngx-charts/src/lib/area-chart/area-series.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/area-chart/area-chart.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/area-chart/area-chart-normalized.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/area-chart/area-chart-stacked.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/area-chart/area-chart.module.ts","../../../../projects/swimlane/ngx-charts/src/lib/bar-chart/bar.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/bar-chart/types/bar-chart-type.enum.ts","../../../../projects/swimlane/ngx-charts/src/lib/bar-chart/types/d0-type.enum.ts","../../../../projects/swimlane/ngx-charts/src/lib/bar-chart/bar-label.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/bar-chart/series-horizontal.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/bar-chart/bar-horizontal.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/bar-chart/bar-horizontal-2d.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/bar-chart/bar-horizontal-normalized.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/bar-chart/bar-horizontal-stacked.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/bar-chart/series-vertical.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/bar-chart/bar-vertical.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/bar-chart/bar-vertical-2d.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/bar-chart/bar-vertical-normalized.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/bar-chart/bar-vertical-stacked.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/bar-chart/bar-chart.module.ts","../../../../projects/swimlane/ngx-charts/src/lib/box-chart/box.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/box-chart/box-series.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/box-chart/box-chart.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/box-chart/box-chart.module.ts","../../../../projects/swimlane/ngx-charts/src/lib/bubble-chart/bubble-chart.utils.ts","../../../../projects/swimlane/ngx-charts/src/lib/bubble-chart/bubble-series.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/bubble-chart/bubble-chart.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/bubble-chart/bubble-chart.module.ts","../../../../projects/swimlane/ngx-charts/src/lib/heat-map/heat-map-cell.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/heat-map/heat-map-cell-series.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/heat-map/heat-map.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/heat-map/heat-map.module.ts","../../../../projects/swimlane/ngx-charts/src/lib/line-chart/line.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/line-chart/line-series.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/line-chart/line-chart.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/line-chart/line-chart.module.ts","../../../../projects/swimlane/ngx-charts/src/lib/pie-chart/pie-label.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/polar-chart/polar-series.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/polar-chart/polar-chart.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/pie-chart/pie-arc.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/pie-chart/pie-series.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/pie-chart/advanced-pie-chart.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/pie-chart/pie-chart.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/grid-layout.helper.ts","../../../../projects/swimlane/ngx-charts/src/lib/pie-chart/pie-grid-series.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/pie-chart/pie-grid.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/pie-chart/pie-chart.module.ts","../../../../projects/swimlane/ngx-charts/src/lib/polar-chart/polar-chart.module.ts","../../../../projects/swimlane/ngx-charts/src/lib/utils/calculate-width.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/constants/font-widths.ts","../../../../projects/swimlane/ngx-charts/src/lib/number-card/card.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/utils/color-utils.ts","../../../../projects/swimlane/ngx-charts/src/lib/number-card/card-series.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/number-card/number-card.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/number-card/number-card.module.ts","../../../../projects/swimlane/ngx-charts/src/lib/tree-map/tree-map-cell.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/tree-map/tree-map-cell-series.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/tree-map/tree-map.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/tree-map/tree-map.module.ts","../../../../projects/swimlane/ngx-charts/src/lib/gauge/linear-gauge.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/gauge/gauge-arc.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/gauge/gauge-axis.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/gauge/gauge.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/gauge/gauge.module.ts","../../../../projects/swimlane/ngx-charts/src/lib/polyfills.ts","../../../../projects/swimlane/ngx-charts/src/lib/sankey/sankey.component.ts","../../../../projects/swimlane/ngx-charts/src/lib/sankey/sankey.module.ts","../../../../projects/swimlane/ngx-charts/src/lib/ngx-charts.module.ts","../../../../projects/swimlane/ngx-charts/src/lib/common/tick-format.helper.ts","../../../../projects/swimlane/ngx-charts/src/public-api.ts","../../../../projects/swimlane/ngx-charts/src/swimlane-ngx-charts.ts"],"sourcesContent":["/**\n * Throttle a function\n *\n */\nexport function throttle(func: any, wait: number, options?: any) {\n options = options || {};\n let context;\n let args;\n let result;\n let timeout = null;\n let previous = 0;\n\n function later() {\n previous = options.leading === false ? 0 : +new Date();\n timeout = null;\n result = func.apply(context, args);\n }\n\n return function () {\n const now = +new Date();\n\n if (!previous && options.leading === false) {\n previous = now;\n }\n\n const remaining = wait - (now - previous);\n context = this;\n // eslint-disable-next-line prefer-rest-params\n args = arguments;\n\n if (remaining <= 0) {\n clearTimeout(timeout);\n timeout = null;\n previous = now;\n result = func.apply(context, args);\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n\n return result;\n };\n}\n\n/**\n * Throttle decorator\n *\n * class MyClass {\n * throttleable(10)\n * myFn() { ... }\n * }\n */\nexport function throttleable(duration: number, options?: any) {\n return function innerDecorator(target, key, descriptor) {\n return {\n configurable: true,\n enumerable: descriptor.enumerable,\n get: function getter() {\n Object.defineProperty(this, key, {\n configurable: true,\n enumerable: descriptor.enumerable,\n value: throttle(descriptor.value, duration, options)\n });\n\n return this[key];\n }\n };\n };\n}\n","export enum PlacementTypes {\n Top = 'top',\n Bottom = 'bottom',\n Left = 'left',\n Right = 'right',\n Center = 'center'\n}\n","import { PlacementTypes } from './placement-type.enum';\n\nconst caretOffset = 7;\n\nfunction verticalPosition(elDimensions: DOMRect, popoverDimensions: DOMRect, alignment: PlacementTypes): number {\n if (alignment === PlacementTypes.Top) {\n return elDimensions.top - caretOffset;\n }\n\n if (alignment === PlacementTypes.Bottom) {\n return elDimensions.top + elDimensions.height - popoverDimensions.height + caretOffset;\n }\n\n if (alignment === PlacementTypes.Center) {\n return elDimensions.top + elDimensions.height / 2 - popoverDimensions.height / 2;\n }\n\n return undefined;\n}\n\nfunction horizontalPosition(elDimensions: DOMRect, popoverDimensions: DOMRect, alignment: PlacementTypes): number {\n if (alignment === PlacementTypes.Left) {\n return elDimensions.left - caretOffset;\n }\n\n if (alignment === PlacementTypes.Right) {\n return elDimensions.left + elDimensions.width - popoverDimensions.width + caretOffset;\n }\n\n if (alignment === PlacementTypes.Center) {\n return elDimensions.left + elDimensions.width / 2 - popoverDimensions.width / 2;\n }\n\n return undefined;\n}\n\n/**\n * Position helper for the popover directive.\n *\n * @export\n */\nexport class PositionHelper {\n /**\n * Calculate vertical alignment position\n *\n * @memberOf PositionHelper\n */\n static calculateVerticalAlignment(\n elDimensions: DOMRect,\n popoverDimensions: DOMRect,\n alignment: PlacementTypes\n ): number {\n let result = verticalPosition(elDimensions, popoverDimensions, alignment);\n\n if (result + popoverDimensions.height > window.innerHeight) {\n result = window.innerHeight - popoverDimensions.height;\n }\n\n return result;\n }\n\n /**\n * Calculate vertical caret position\n *\n * @memberOf PositionHelper\n */\n static calculateVerticalCaret(\n elDimensions: DOMRect,\n popoverDimensions: DOMRect,\n caretDimensions: DOMRect,\n alignment: PlacementTypes\n ): number {\n let result;\n\n if (alignment === PlacementTypes.Top) {\n result = elDimensions.height / 2 - caretDimensions.height / 2 + caretOffset;\n }\n\n if (alignment === PlacementTypes.Bottom) {\n result = popoverDimensions.height - elDimensions.height / 2 - caretDimensions.height / 2 - caretOffset;\n }\n\n if (alignment === PlacementTypes.Center) {\n result = popoverDimensions.height / 2 - caretDimensions.height / 2;\n }\n\n const popoverPosition = verticalPosition(elDimensions, popoverDimensions, alignment);\n if (popoverPosition + popoverDimensions.height > window.innerHeight) {\n result += popoverPosition + popoverDimensions.height - window.innerHeight;\n }\n\n return result;\n }\n\n /**\n * Calculate horz alignment position\n *\n * @memberOf PositionHelper\n */\n static calculateHorizontalAlignment(\n elDimensions: DOMRect,\n popoverDimensions: DOMRect,\n alignment: PlacementTypes\n ): number {\n let result = horizontalPosition(elDimensions, popoverDimensions, alignment);\n\n if (result + popoverDimensions.width > window.innerWidth) {\n result = window.innerWidth - popoverDimensions.width;\n }\n\n return result;\n }\n\n /**\n * Calculate horz caret position\n *\n * @memberOf PositionHelper\n */\n static calculateHorizontalCaret(\n elDimensions: DOMRect,\n popoverDimensions: DOMRect,\n caretDimensions: DOMRect,\n alignment: PlacementTypes\n ): number {\n let result;\n\n if (alignment === PlacementTypes.Left) {\n result = elDimensions.width / 2 - caretDimensions.width / 2 + caretOffset;\n }\n\n if (alignment === PlacementTypes.Right) {\n result = popoverDimensions.width - elDimensions.width / 2 - caretDimensions.width / 2 - caretOffset;\n }\n\n if (alignment === PlacementTypes.Center) {\n result = popoverDimensions.width / 2 - caretDimensions.width / 2;\n }\n\n const popoverPosition = horizontalPosition(elDimensions, popoverDimensions, alignment);\n if (popoverPosition + popoverDimensions.width > window.innerWidth) {\n result += popoverPosition + popoverDimensions.width - window.innerWidth;\n }\n\n return result;\n }\n\n /**\n * Checks if the element's position should be flipped\n *\n * @memberOf PositionHelper\n */\n static shouldFlip(\n elDimensions: DOMRect,\n popoverDimensions: DOMRect,\n placement: PlacementTypes,\n spacing: number\n ): boolean {\n let flip = false;\n\n if (placement === PlacementTypes.Right) {\n if (elDimensions.left + elDimensions.width + popoverDimensions.width + spacing > window.innerWidth) {\n flip = true;\n }\n }\n\n if (placement === PlacementTypes.Left) {\n if (elDimensions.left - popoverDimensions.width - spacing < 0) {\n flip = true;\n }\n }\n\n if (placement === PlacementTypes.Top) {\n if (elDimensions.top - popoverDimensions.height - spacing < 0) {\n flip = true;\n }\n }\n\n if (placement === PlacementTypes.Bottom) {\n if (elDimensions.top + elDimensions.height + popoverDimensions.height + spacing > window.innerHeight) {\n flip = true;\n }\n }\n\n return flip;\n }\n\n /**\n * Position caret\n *\n * @memberOf PositionHelper\n */\n static positionCaret(placement, elmDim, hostDim, caretDimensions, alignment: PlacementTypes): any {\n let top = 0;\n let left = 0;\n\n if (placement === PlacementTypes.Right) {\n left = -7;\n top = PositionHelper.calculateVerticalCaret(hostDim, elmDim, caretDimensions, alignment);\n } else if (placement === PlacementTypes.Left) {\n left = elmDim.width;\n top = PositionHelper.calculateVerticalCaret(hostDim, elmDim, caretDimensions, alignment);\n } else if (placement === PlacementTypes.Top) {\n top = elmDim.height;\n left = PositionHelper.calculateHorizontalCaret(hostDim, elmDim, caretDimensions, alignment);\n } else if (placement === PlacementTypes.Bottom) {\n top = -7;\n left = PositionHelper.calculateHorizontalCaret(hostDim, elmDim, caretDimensions, alignment);\n }\n\n return { top, left };\n }\n\n /**\n * Position content\n *\n * @memberOf PositionHelper\n */\n static positionContent(placement, elmDim, hostDim, spacing, alignment): any {\n let top = 0;\n let left = 0;\n\n if (placement === PlacementTypes.Right) {\n left = hostDim.left + hostDim.width + spacing;\n top = PositionHelper.calculateVerticalAlignment(hostDim, elmDim, alignment);\n } else if (placement === PlacementTypes.Left) {\n left = hostDim.left - elmDim.width - spacing;\n top = PositionHelper.calculateVerticalAlignment(hostDim, elmDim, alignment);\n } else if (placement === PlacementTypes.Top) {\n top = hostDim.top - elmDim.height - spacing;\n left = PositionHelper.calculateHorizontalAlignment(hostDim, elmDim, alignment);\n } else if (placement === PlacementTypes.Bottom) {\n top = hostDim.top + hostDim.height + spacing;\n left = PositionHelper.calculateHorizontalAlignment(hostDim, elmDim, alignment);\n }\n\n return { top, left };\n }\n\n /**\n * Determine placement based on flip\n *\n * @memberOf PositionHelper\n */\n static determinePlacement(placement: PlacementTypes, elmDim: DOMRect, hostDim: DOMRect, spacing: number): any {\n const shouldFlip = PositionHelper.shouldFlip(hostDim, elmDim, placement, spacing);\n\n if (shouldFlip) {\n if (placement === PlacementTypes.Right) {\n return PlacementTypes.Left;\n } else if (placement === PlacementTypes.Left) {\n return PlacementTypes.Right;\n } else if (placement === PlacementTypes.Top) {\n return PlacementTypes.Bottom;\n } else if (placement === PlacementTypes.Bottom) {\n return PlacementTypes.Top;\n }\n }\n\n return placement;\n }\n}\n","import {\n Input,\n Component,\n ElementRef,\n AfterViewInit,\n ViewEncapsulation,\n HostListener,\n ViewChild,\n HostBinding,\n Renderer2,\n PLATFORM_ID,\n Inject,\n TemplateRef\n} from '@angular/core';\n\nimport { throttleable } from '../../utils/throttle';\nimport { PositionHelper, PlacementTypes } from './position';\n\nimport { StyleTypes } from './style.type';\nimport { isPlatformBrowser } from '@angular/common';\n\n@Component({\n selector: 'ngx-tooltip-content',\n template: `\n <div>\n <span #caretElm [hidden]=\"!showCaret\" class=\"tooltip-caret position-{{ this.placement }}\"> </span>\n <div class=\"tooltip-content\">\n <span *ngIf=\"!title\">\n <ng-template [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ model: context }\"> </ng-template>\n </span>\n <span *ngIf=\"title\" [innerHTML]=\"title\"> </span>\n </div>\n </div>\n `,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./tooltip.component.scss']\n})\nexport class TooltipContentComponent implements AfterViewInit {\n @Input() host: ElementRef;\n @Input() showCaret: boolean;\n @Input() type: StyleTypes;\n @Input() placement: PlacementTypes;\n @Input() alignment: PlacementTypes;\n @Input() spacing: number;\n @Input() cssClass: string;\n @Input() title: string;\n @Input() template: TemplateRef<any>;\n @Input() context: any;\n\n @ViewChild('caretElm') caretElm: ElementRef;\n\n @HostBinding('class')\n get cssClasses(): string {\n let clz = 'ngx-charts-tooltip-content';\n clz += ` position-${this.placement}`;\n clz += ` type-${this.type}`;\n clz += ` ${this.cssClass}`;\n return clz;\n }\n\n constructor(public element: ElementRef, private renderer: Renderer2, @Inject(PLATFORM_ID) private platformId: any) {}\n\n ngAfterViewInit(): void {\n setTimeout(this.position.bind(this));\n }\n\n position(): void {\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n\n const nativeElm = this.element.nativeElement;\n const hostDim = this.host.nativeElement.getBoundingClientRect();\n\n // if no dims were found, never show\n if (!hostDim.height && !hostDim.width) return;\n\n const elmDim = nativeElm.getBoundingClientRect();\n this.checkFlip(hostDim, elmDim);\n this.positionContent(nativeElm, hostDim, elmDim);\n\n if (this.showCaret) {\n this.positionCaret(hostDim, elmDim);\n }\n\n // animate its entry\n setTimeout(() => this.renderer.addClass(nativeElm, 'animate'), 1);\n }\n\n positionContent(nativeElm: HTMLElement, hostDim: DOMRect, elmDim: DOMRect): void {\n const { top, left } = PositionHelper.positionContent(this.placement, elmDim, hostDim, this.spacing, this.alignment);\n\n this.renderer.setStyle(nativeElm, 'top', `${top}px`);\n this.renderer.setStyle(nativeElm, 'left', `${left}px`);\n }\n\n positionCaret(hostDim: DOMRect, elmDim: DOMRect): void {\n const caretElm = this.caretElm.nativeElement;\n const caretDimensions = caretElm.getBoundingClientRect();\n const { top, left } = PositionHelper.positionCaret(\n this.placement,\n elmDim,\n hostDim,\n caretDimensions,\n this.alignment\n );\n\n this.renderer.setStyle(caretElm, 'top', `${top}px`);\n this.renderer.setStyle(caretElm, 'left', `${left}px`);\n }\n\n checkFlip(hostDim: DOMRect, elmDim: DOMRect): void {\n this.placement = PositionHelper.determinePlacement(this.placement, elmDim, hostDim, this.spacing);\n }\n\n @HostListener('window:resize')\n @throttleable(100)\n onWindowResize(): void {\n this.position();\n }\n}\n","import { ComponentRef, Type } from '@angular/core';\nimport { InjectionService } from './injection.service';\n\nexport interface PartialBindings {\n inputs?: object;\n outputs?: object;\n}\n\nexport abstract class InjectionRegisteryService<T = any> {\n protected abstract type: Type<T>;\n\n protected defaults: PartialBindings = {};\n protected components: Map<any, Array<ComponentRef<T>>> = new Map();\n\n constructor(public injectionService: InjectionService) {}\n\n getByType(type: Type<T> = this.type) {\n return this.components.get(type);\n }\n\n create(bindings: object): ComponentRef<T> {\n return this.createByType(this.type, bindings);\n }\n\n createByType(type: Type<T>, bindings: PartialBindings): ComponentRef<T> {\n bindings = this.assignDefaults(bindings);\n\n const component = this.injectComponent(type, bindings);\n this.register(type, component);\n\n return component;\n }\n\n destroy(instance: ComponentRef<T>): void {\n const compsByType = this.components.get(instance.componentType);\n\n if (compsByType && compsByType.length) {\n const idx = compsByType.indexOf(instance);\n\n if (idx > -1) {\n const component = compsByType[idx];\n component.destroy();\n compsByType.splice(idx, 1);\n }\n }\n }\n\n destroyAll(): void {\n this.destroyByType(this.type);\n }\n\n destroyByType(type: Type<T>): void {\n const comps = this.components.get(type);\n\n if (comps && comps.length) {\n let i = comps.length - 1;\n while (i >= 0) {\n this.destroy(comps[i--]);\n }\n }\n }\n\n protected injectComponent(type: Type<T>, bindings: PartialBindings): ComponentRef<T> {\n return this.injectionService.appendComponent(type, bindings);\n }\n\n protected assignDefaults(bindings: PartialBindings): PartialBindings {\n const inputs = { ...this.defaults.inputs };\n const outputs = { ...this.defaults.outputs };\n\n if (!bindings.inputs && !bindings.outputs) {\n bindings = { inputs: bindings };\n }\n\n if (inputs) {\n bindings.inputs = { ...inputs, ...bindings.inputs };\n }\n\n if (outputs) {\n bindings.outputs = { ...outputs, ...bindings.outputs };\n }\n\n return bindings;\n }\n\n protected register(type: Type<T>, component: ComponentRef<T>): void {\n if (!this.components.has(type)) {\n this.components.set(type, []);\n }\n\n const types = this.components.get(type);\n types.push(component);\n }\n}\n","import {\n ApplicationRef,\n ComponentFactoryResolver,\n ComponentRef,\n Injectable,\n Injector,\n ViewContainerRef,\n EmbeddedViewRef,\n Type\n} from '@angular/core';\nimport { DomPortalOutlet, ComponentPortal } from '@angular/cdk/portal';\n\nfunction isViewContainerRef(x: any): x is ViewContainerRef {\n return x.element;\n}\n\n/**\n * Injection service is a helper to append components\n * dynamically to a known location in the DOM, most\n * noteably for dialogs/tooltips appending to body.\n *\n * @export\n */\n@Injectable()\nexport class InjectionService {\n static globalRootViewContainer: ViewContainerRef = null;\n\n /**\n * Sets a default global root view container. This is useful for\n * things like ngUpgrade that doesn't have a ApplicationRef root.\n *\n * @param container\n */\n static setGlobalRootViewContainer(container: ViewContainerRef): void {\n InjectionService.globalRootViewContainer = container;\n }\n\n private _container: ViewContainerRef;\n\n constructor(\n private applicationRef: ApplicationRef,\n private componentFactoryResolver: ComponentFactoryResolver,\n private injector: Injector\n ) {}\n\n /**\n * Gets the root view container to inject the component to.\n *\n * @memberOf InjectionService\n */\n getRootViewContainer(): ViewContainerRef | ComponentRef<any> {\n if (this._container) return this._container;\n if (InjectionService.globalRootViewContainer) return InjectionService.globalRootViewContainer;\n\n if (this.applicationRef.components.length) return this.applicationRef.components[0];\n\n throw new Error(\n 'View Container not found! ngUpgrade needs to manually set this via setRootViewContainer or setGlobalRootViewContainer.'\n );\n }\n\n /**\n * Overrides the default root view container. This is useful for\n * things like ngUpgrade that doesn't have a ApplicationRef root.\n *\n * @param container\n *\n * @memberOf InjectionService\n */\n setRootViewContainer(container: ViewContainerRef): void {\n this._container = container;\n }\n\n /**\n * Gets the html element for a component ref.\n *\n * @param componentRef\n *\n * @memberOf InjectionService\n */\n getComponentRootNode(component: ViewContainerRef | ComponentRef<any>): HTMLElement {\n if (isViewContainerRef(component)) {\n return component.element.nativeElement;\n }\n if (component.hostView && (component.hostView as EmbeddedViewRef<any>).rootNodes.length > 0) {\n return (component.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n }\n\n // the top most component root node has no `hostView`\n return component.location.nativeElement;\n }\n\n /**\n * Gets the root component container html element.\n *\n * @memberOf InjectionService\n */\n getRootViewContainerNode(component: ViewContainerRef | ComponentRef<any>): HTMLElement {\n return this.getComponentRootNode(component);\n }\n\n /**\n * Projects the bindings onto the component\n *\n * @param component\n * @param options\n *\n * @memberOf InjectionService\n */\n projectComponentBindings(component: ComponentRef<any>, bindings: any): ComponentRef<any> {\n if (bindings) {\n if (bindings.inputs !== undefined) {\n const bindingKeys = Object.getOwnPropertyNames(bindings.inputs);\n for (const bindingName of bindingKeys) {\n component.instance[bindingName] = bindings.inputs[bindingName];\n }\n }\n\n if (bindings.outputs !== undefined) {\n const eventKeys = Object.getOwnPropertyNames(bindings.outputs);\n for (const eventName of eventKeys) {\n component.instance[eventName] = bindings.outputs[eventName];\n }\n }\n }\n\n return component;\n }\n\n /**\n * Appends a component to a adjacent location\n *\n * @param componentClass\n * @param [options={}]\n * @param [location]\n *\n * @memberOf InjectionService\n */\n appendComponent<T>(componentClass: Type<T>, bindings: any = {}, location?: any): ComponentRef<any> {\n if (!location) location = this.getRootViewContainer();\n const appendLocation = this.getComponentRootNode(location);\n\n const portalHost = new DomPortalOutlet(\n appendLocation,\n this.componentFactoryResolver,\n this.applicationRef,\n this.injector\n );\n\n const portal = new ComponentPortal(componentClass);\n\n const componentRef = portalHost.attach(portal);\n this.projectComponentBindings(componentRef, bindings);\n return componentRef;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { InjectionService } from './injection.service';\nimport { TooltipContentComponent } from './tooltip.component';\nimport { InjectionRegisteryService } from './injection-registery.service';\n@Injectable()\nexport class TooltipService extends InjectionRegisteryService<TooltipContentComponent> {\n type: any = TooltipContentComponent;\n\n constructor(injectionService: InjectionService) {\n super(injectionService);\n }\n}\n","import { ScaleType } from './scale-type.enum';\n\nexport interface LegendOptions {\n colors: any;\n domain: any[];\n position: LegendPosition;\n title: string;\n scaleType: ScaleType;\n}\n\nexport enum LegendPosition {\n Right = 'right',\n Below = 'below'\n}\n\nexport enum LegendType {\n ScaleLegend = 'scaleLegend',\n Legend = 'legend'\n}\n","export enum ScaleType {\n Time = 'time',\n Linear = 'linear',\n Ordinal = 'ordinal',\n Quantile = 'quantile'\n}\n","import { Component, Input, OnChanges, ChangeDetectionStrategy, SimpleChanges, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'ngx-charts-scale-legend',\n template: `\n <div\n class=\"scale-legend\"\n [class.horizontal-legend]=\"horizontal\"\n [style.height.px]=\"horizontal ? undefined : height\"\n [style.width.px]=\"width\"\n >\n <div class=\"scale-legend-label\">\n <span>{{ valueRange[1].toLocaleString() }}</span>\n </div>\n <div class=\"scale-legend-wrap\" [style.background]=\"gradient\"></div>\n <div class=\"scale-legend-label\">\n <span>{{ valueRange[0].toLocaleString() }}</span>\n </div>\n </div>\n `,\n styleUrls: ['./scale-legend.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ScaleLegendComponent implements OnChanges {\n @Input() valueRange: number[];\n @Input() colors: any;\n @Input() height: number;\n @Input() width: number;\n @Input() horizontal: boolean = false;\n\n gradient: string;\n\n ngOnChanges(changes: SimpleChanges): void {\n const gradientValues = this.gradientString(this.colors.range(), this.colors.domain());\n const direction = this.horizontal ? 'right' : 'bottom';\n this.gradient = `linear-gradient(to ${direction}, ${gradientValues})`;\n }\n\n /**\n * Generates the string used in the gradient stylesheet properties\n * @param colors array of colors\n * @param splits array of splits on a scale of (0, 1)\n */\n gradientString(colors: string[], splits: number[]): string {\n // add the 100%\n splits.push(1);\n const pairs = [];\n colors.reverse().forEach((c, i) => {\n pairs.push(`${c} ${Math.round(splits[i] * 100)}%`);\n });\n\n return pairs.join(', ');\n }\n}\n","/**\n * Formats a label given a date, number or string.\n *\n * @export\n */\nexport function formatLabel(label: any): string {\n if (label instanceof Date) {\n label = label.toLocaleDateString();\n } else {\n label = label.toLocaleString();\n }\n\n return label;\n}\n\n/**\n * Escapes a label.\n *\n * @export\n */\nexport function escapeLabel(label: any): string {\n return label.toLocaleString().replace(/[&'`\"<>]/g, match => {\n return {\n '&': '&',\n // tslint:disable-next-line: quotemark\n \"'\": ''',\n '`': '`',\n '\"': '"',\n '<': '<',\n '>': '>'\n }[match];\n });\n}\n","import { Component, Input, Output, ChangeDetectionStrategy, HostListener, EventEmitter } from '@angular/core';\n\n@Component({\n selector: 'ngx-charts-legend-entry',\n template: `\n <span [title]=\"formattedLabel\" tabindex=\"-1\" [class.active]=\"isActive\" (click)=\"select.emit(formattedLabel)\">\n <span class=\"legend-label-color\" [style.background-color]=\"color\" (click)=\"toggle.emit(formattedLabel)\"> </span>\n <span class=\"legend-label-text\">\n {{ trimmedLabel }}\n </span>\n </span>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class LegendEntryComponent {\n @Input() color: string;\n @Input() label: string;\n @Input() formattedLabel: string;\n @Input() isActive: boolean = false;\n\n @Output() select: EventEmitter<string> = new EventEmitter();\n @Output() activate: EventEmitter<{ name: string }> = new EventEmitter();\n @Output() deactivate: EventEmitter<{ name: string }> = new EventEmitter();\n @Output() toggle: EventEmitter<string> = new EventEmitter();\n\n get trimmedLabel(): string {\n return this.formattedLabel || '(empty)';\n }\n\n @HostListener('mouseenter')\n onMouseEnter(): void {\n this.activate.emit({ name: this.label });\n }\n\n @HostListener('mouseleave')\n onMouseLeave(): void {\n this.deactivate.emit({ name: this.label });\n }\n}\n","import {\n Component,\n Input,\n ChangeDetectionStrategy,\n Output,\n EventEmitter,\n SimpleChanges,\n OnChanges,\n ChangeDetectorRef,\n ViewEncapsulation\n} from '@angular/core';\nimport { formatLabel } from '../label.helper';\nimport { ColorHelper } from '../color.helper';\n\nexport interface LegendEntry {\n color: string;\n formattedLabel: string;\n label: string;\n}\n\n@Component({\n selector: 'ngx-charts-legend',\n template: `\n <div [style.width.px]=\"width\">\n <header class=\"legend-title\" *ngIf=\"title?.length > 0\">\n <span class=\"legend-title-text\">{{ title }}</span>\n </header>\n <div class=\"legend-wrap\">\n <ul class=\"legend-labels\" [class.horizontal-legend]=\"horizontal\" [style.max-height.px]=\"height - 45\">\n <li *ngFor=\"let entry of legendEntries; trackBy: trackBy\" class=\"legend-label\">\n <ngx-charts-legend-entry\n [label]=\"entry.label\"\n [formattedLabel]=\"entry.formattedLabel\"\n [color]=\"entry.color\"\n [isActive]=\"isActive(entry)\"\n (select)=\"labelClick.emit($event)\"\n (activate)=\"activate($event)\"\n (deactivate)=\"deactivate($event)\"\n >\n </ngx-charts-legend-entry>\n </li>\n </ul>\n </div>\n </div>\n `,\n styleUrls: ['./legend.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class LegendComponent implements OnChanges {\n @Input() data: string[];\n @Input() title: string;\n @Input() colors: ColorHelper;\n @Input() height: number;\n @Input() width: number;\n @Input() activeEntries;\n @Input() horizontal = false;\n\n @Output() labelClick: EventEmitter<string> = new EventEmitter();\n @Output() labelActivate: EventEmitter<{ name: string }> = new EventEmitter();\n @Output() labelDeactivate: EventEmitter<{ name: string }> = new EventEmitter();\n\n legendEntries: LegendEntry[] = [];\n\n constructor(private cd: ChangeDetectorRef) {}\n\n ngOnChanges(changes: SimpleChanges): void {\n this.update();\n }\n\n update(): void {\n this.cd.markForCheck();\n this.legendEntries = this.getLegendEntries();\n }\n\n getLegendEntries(): LegendEntry[] {\n const items = [];\n for (const label of this.data) {\n const formattedLabel = formatLabel(label);\n\n const idx = items.findIndex(i => {\n return i.label === formattedLabel;\n });\n\n if (idx === -1) {\n items.push({\n label,\n formattedLabel,\n color: this.colors.getColor(label)\n });\n }\n }\n\n return items;\n }\n\n isActive(entry: LegendEntry): boolean {\n if (!this.activeEntries) return false;\n const item = this.activeEntries.find(d => {\n return entry.label === d.name;\n });\n return item !== undefined;\n }\n\n activate(item: { name: string }) {\n this.labelActivate.emit(item);\n }\n\n deactivate(item: { name: string }) {\n this.labelDeactivate.emit(item);\n }\n\n trackBy(index: number, item: LegendEntry): string {\n return item.label;\n }\n}\n","import {\n Component,\n Input,\n OnChanges,\n ChangeDetectionStrategy,\n EventEmitter,\n Output,\n SimpleChanges\n} from '@angular/core';\nimport { TooltipService } from '../tooltip/tooltip.service';\nimport { LegendOptions, LegendType, LegendPosition } from '../types/legend.model';\nimport { ScaleType } from '../types/scale-type.enum';\n\n@Component({\n providers: [TooltipService],\n selector: 'ngx-charts-chart',\n template: `\n <div class=\"ngx-charts-outer\" [style.width.px]=\"view[0]\" [style.height.px]=\"view[1]\">\n <svg class=\"ngx-charts\" [attr.width]=\"chartWidth\" [attr.height]=\"view[1]\">\n <ng-content></ng-content>\n </svg>\n <ngx-charts-scale-legend\n *ngIf=\"showLegend && legendType === LegendType.ScaleLegend\"\n class=\"chart-legend\"\n [horizontal]=\"legendOptions && legendOptions.position === LegendPosition.Below\"\n [valueRange]=\"legendOptions.domain\"\n [colors]=\"legendOptions.colors\"\n [height]=\"view[1]\"\n [width]=\"legendWidth\"\n >\n </ngx-charts-scale-legend>\n <ngx-charts-legend\n *ngIf=\"showLegend && legendType === LegendType.Legend\"\n class=\"chart-legend\"\n [horizontal]=\"legendOptions && legendOptions.position === LegendPosition.Below\"\n [data]=\"legendOptions.domain\"\n [title]=\"legendOptions.title\"\n [colors]=\"legendOptions.colors\"\n [height]=\"view[1]\"\n [width]=\"legendWidth\"\n [activeEntries]=\"activeEntries\"\n (labelClick)=\"legendLabelClick.emit($event)\"\n (labelActivate)=\"legendLabelActivate.emit($event)\"\n (labelDeactivate)=\"legendLabelDeactivate.emit($event)\"\n >\n </ngx-charts-legend>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ChartComponent implements OnChanges {\n @Input() view: [number, number];\n @Input() showLegend: boolean = false;\n @Input() legendOptions: LegendOptions;\n @Input() legendType: LegendType;\n @Input() activeEntries: any[];\n @Input() animations: boolean = true;\n\n @Output() legendLabelClick = new EventEmitter<string>();\n @Output() legendLabelActivate = new EventEmitter<{ name: string }>();\n @Output() legendLabelDeactivate = new EventEmitter<{ name: string }>();\n\n chartWidth: number;\n title: string;\n legendWidth: number;\n\n readonly LegendPosition = LegendPosition;\n readonly LegendType = LegendType;\n\n ngOnChanges(changes: SimpleChanges): void {\n this.update();\n }\n\n update(): void {\n let legendColumns = 0;\n if (this.showLegend) {\n this.legendType = this.getLegendType();\n\n if (!this.legendOptions || this.legendOptions.position === LegendPosition.Right) {\n if (this.legendType === LegendType.ScaleLegend) {\n legendColumns = 1;\n } else {\n legendColumns = 2;\n }\n }\n }\n\n const chartColumns = 12 - legendColumns;\n\n this.chartWidth = Math.floor((this.view[0] * chartColumns) / 12.0);\n this.legendWidth =\n !this.legendOptions || this.legendOptions.position === LegendPosition.Right\n ? Math.floor((this.view[0] * legendColumns) / 12.0)\n : this.chartWidth;\n }\n\n getLegendType(): LegendType {\n return this.legendOptions.scaleType === ScaleType.Linear ? LegendType.ScaleLegend : LegendType.Legend;\n }\n}\n","import { Output, EventEmitter, NgZone, Directive, ElementRef } from '@angular/core';\n\n/**\n * Visibility Observer\n */\n@Directive({\n selector: 'visibility-observer'\n})\nexport class VisibilityObserver {\n @Output() visible: EventEmitter<any> = new EventEmitter();\n\n timeout: any;\n isVisible: boolean = false;\n\n constructor(private element: ElementRef, private zone: NgZone) {\n this.runCheck();\n }\n\n destroy(): void {\n clearTimeout(this.timeout);\n }\n\n onVisibilityChange(): void {\n // trigger zone recalc for columns\n this.zone.run(() => {\n this.isVisible = true;\n this.visible.emit(true);\n });\n }\n\n runCheck(): void {\n const check = () => {\n if (!this.element) {\n return;\n }\n\n // https://davidwalsh.name/offsetheight-visibility\n const { offsetHeight, offsetWidth } = this.element.nativeElement;\n\n if (offsetHeight && offsetWidth) {\n clearTimeout(this.timeout);\n this.onVisibilityChange();\n } else {\n clearTimeout(this.timeout);\n this.zone.runOutsideAngular(() => {\n this.timeout = setTimeout(() => check(), 100);\n });\n }\n };\n\n this.zone.runOutsideAngular(() => {\n this.timeout = setTimeout(() => check());\n });\n }\n}\n","export function isDate(value): boolean {\n return toString.call(value) === '[object Date]';\n}\n\nexport function isNumber(value): boolean {\n return typeof value === 'number';\n}\n","import { isPlatformBrowser, isPlatformServer } from '@angular/common';\nimport {\n ElementRef,\n NgZone,\n ChangeDetectorRef,\n Component,\n Input,\n Output,\n EventEmitter,\n AfterViewInit,\n OnDestroy,\n OnChanges,\n SimpleChanges,\n PLATFORM_ID,\n Inject,\n OnInit\n} from '@angular/core';\n\nimport { fromEvent as observableFromEvent } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\nimport { VisibilityObserver } from '../utils/visibility-observer';\nimport { isDate } from '../utils/types';\nimport { Color } from '../utils/color-sets';\nimport { ScaleType } from './types/scale-type.enum';\nimport { ViewDimensions } from './types/view-dimension.interface';\n\n@Component({\n selector: 'base-chart',\n template: ` <div></div> `\n})\nexport class BaseChartComponent implements OnChanges, AfterViewInit, OnDestroy, OnInit {\n @Input() results: any;\n @Input() view: [number, number];\n @Input() scheme: string | Color = 'cool';\n @Input() schemeType: ScaleType = ScaleType.Ordinal;\n @Input() customColors: any;\n @Input() animations: boolean = true;\n\n @Output() select = new EventEmitter();\n\n width: number;\n height: number;\n resizeSubscription: any;\n visibilityObserver: VisibilityObserver;\n\n constructor(\n protected chartElement: ElementRef,\n protected zone: NgZone,\n protected cd: ChangeDetectorRef,\n @Inject(PLATFORM_ID) public platformId: any\n ) {}\n\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.animations = false;\n }\n }\n\n ngAfterViewInit(): void {\n this.bindWindowResizeEvent();\n\n // listen for visibility of the element for hidden by default scenario\n this.visibilityObserver = new VisibilityObserver(this.chartElement, this.zone);\n this.visibilityObserver.visible.subscribe(this.update.bind(this));\n }\n\n ngOnDestroy(): void {\n this.unbindEvents();\n if (this.visibilityObserver) {\n this.visibilityObserver.visible.unsubscribe();\n this.visibilityObserver.destroy();\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.update();\n }\n\n update(): void {\n if (this.results) {\n this.results = this.cloneData(this.results);\n } else {\n this.results = [];\n }\n\n if (this.view) {\n this.width = this.view[0];\n this.height = this.view[1];\n } else {\n const dims = this.getContainerDims();\n if (dims) {\n this.width = dims.width;\n this.height = dims.height;\n }\n }\n\n // default values if width or height are 0 or undefined\n if (!this.width) {\n this.width = 600;\n }\n\n if (!this.height) {\n this.height = 400;\n }\n\n this.width = Math.floor(this.width);\n this.height = Math.floor(this.height);\n\n if (this.cd) {\n this.cd.markForCheck();\n }\n }\n\n getContainerDims(): ViewDimensions {\n let width;\n let height;\n const hostElem = this.chartElement.nativeElement;\n\n if (isPlatformBrowser(this.platformId) && hostElem.parentNode !== null) {\n // Get the container dimensions\n const dims = hostElem.parentNode.getBoundingClientRect();\n width = dims.width;\n height = dims.height;\n }\n\n if (width && height) {\n return { width, height };\n }\n\n return null;\n }\n\n /**\n * Converts all date objects that appear as name\n * into formatted date strings\n */\n formatDates(): void {\n for (let i = 0; i < this.results.length; i++) {\n const g = this.results[i];\n g.label = g.name;\n if (isDate(g.label)) {\n g.label = g.label.toLocaleDateString();\n }\n\n if (g.series) {\n for (let j = 0; j < g.series.length; j++) {\n const d = g.series[j];\n d.label = d.name;\n if (isDate(d.label)) {\n d.label = d.label.toLocaleDateString();\n }\n }\n }\n }\n }\n\n protected unbindEvents(): void {\n if (this.resizeSubscription) {\n this.resizeSubscription.unsubscribe();\n }\n }\n\n private bindWindowResizeEvent(): void {\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n\n const source = observableFromEvent(window, 'resize');\n const subscription = source.pipe(debounceTime(200)).subscribe(e => {\n this.update();\n if (this.cd) {\n this.cd.markForCheck();\n }\n });\n this.resizeSubscription = subscription;\n }\n\n /**\n * Clones the data into a new object\n *\n * @memberOf BaseChart\n */\n private cloneData(data): any {\n const results = [];\n\n for (const item of data) {\n const copy = {};\n\n if (item['name'] !== undefined) {\n copy['name'] = item['name'];\n }\n\n if (item['value'] !== undefined) {\n copy['value'] = item['value'];\n }\n\n if (item['series'] !== undefined) {\n copy['series'] = [];\n for (const seriesItem of item['series']) {\n const seriesItemCopy = Object.assign({}, seriesItem);\n copy['series'].push(seriesItemCopy);\n }\n }\n\n if (item['extra'] !== undefined) {\n copy['extra'] = JSON.parse(JSON.stringify(item['extra']));\n }\n\n if (item['source'] !== undefined) {\n copy['source'] = item['source'];\n }\n\n if (item['target'] !== undefined) {\n copy['target'] = item['target'];\n }\n\n results.push(copy);\n }\n\n return results;\n }\n}\n","export enum Orientation {\n Top = 'top',\n Bottom = 'bottom',\n Left = 'left',\n Right = 'right'\n}\n","import { Component, Input, ElementRef, OnChanges, SimpleChanges, ChangeDetectionStrategy } from '@angular/core';\nimport { Orientation } from '../types/orientation.enum';\n\n@Component({\n selector: 'g[ngx-charts-axis-label]',\n template: `\n <svg:text\n [attr.stroke-width]=\"strokeWidth\"\n [attr.x]=\"x\"\n [attr.y]=\"y\"\n [attr.text-anchor]=\"textAnchor\"\n [attr.transform]=\"transform\"\n >\n {{ label }}\n </svg:text>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class AxisLabelComponent implements OnChanges {\n @Input() orient: Orientation;\n @Input() label: string;\n @Input() offset: number;\n @Input() width: number;\n @Input() height: number;\n\n x: number;\n y: number;\n transform: string;\n strokeWidth: string;\n textAnchor: string;\n element: ElementRef;\n textHeight = 25;\n margin = 5;\n\n constructor(element: ElementRef) {\n this.element = element.nativeElement;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.update();\n }\n\n update(): void {\n this.strokeWidth = '0.01';\n this.textAnchor = 'middle';\n this.transform = '';\n\n switch (this.orient) {\n case Orientation.Top:\n this.y = this.offset;\n this.x = this.width / 2;\n break;\n case Orientation.Bottom:\n this.y = this.offset;\n this.x = this.width / 2;\n break;\n case Orientation.Left:\n this.y = -(this.offset + this.textHeight + this.margin);\n this.x = -this.height / 2;\n this.transform = 'rotate(270)';\n break;\n case Orientation.Right:\n this.y = this.offset + this.margin;\n this.x = -this.height / 2;\n this.transform = 'rotate(270)';\n break;\n default:\n }\n }\n}\n","export function trimLabel(s: any, max: number = 16): string {\n if (typeof s !== 'string') {\n if (typeof s === 'number') {\n return s + '';\n } else {\n return '';\n }\n }\n\n s = s.trim();\n if (s.length <= max) {\n return s;\n } else {\n return `${s.slice(0, max)}...`;\n }\n}\n","export function reduceTicks(ticks: any[], maxTicks: number): any[] {\n if (ticks.length > maxTicks) {\n const reduced = [];\n const modulus = Math.floor(ticks.length / maxTicks);\n for (let i = 0; i < ticks.length; i++) {\n if (i % modulus === 0) {\n reduced.push(ticks[i]);\n }\n }\n ticks = reduced;\n }\n\n return ticks;\n}\n\nexport function getTickLines(label: string, maxLength: number, maxLines: number): string[] {\n const labelString = (label || '').toString();\n let totalLines = [];\n\n if (/\\s/.test(labelString)) {\n totalLines = labelString.split(/\\s+/).reduce((lines: string[], line: string) => {\n const last = (lines.pop() || '') + ' ';\n return last.length + line.length > maxLength ? [...lines, last.trim(), line.trim()] : [...lines, last + line];\n }, []);\n } else {\n let startIndex = 0;\n while (startIndex < labelString.length) {\n totalLines.push(labelString.substring(startIndex, startIndex + maxLength));\n startIndex += maxLength;\n }\n }\n\n if (totalLines.length > maxLines) {\n totalLines = totalLines.splice(0, maxLines);\n totalLines[totalLines.length - 1] += '...';\n }\n\n return totalLines;\n}\n","export enum TextAnchor {\n Start = 'start',\n Middle = 'middle',\n End = 'end'\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n Component,\n Input,\n Output,\n EventEmitter,\n OnChanges,\n ElementRef,\n ViewChild,\n SimpleChanges,\n AfterViewInit,\n ChangeDetectionStrategy,\n Inject,\n PLATFORM_ID\n} from '@angular/core';\nimport { trimLabel } from '../trim-label.helper';\nimport { getTickLines, reduceTicks } from './ticks.helper';\nimport { Orientation } from '../types/orientation.enum';\nimport { TextAnchor } from '../types/text-anchor.enum';\n\n@Component({\n selector: 'g[ngx-charts-x-axis-ticks]',\n template: `\n <svg:g #ticksel>\n <svg:g *ngFor=\"let tick of ticks\" class=\"tick\" [attr.transform]=\"tickTransform(tick)\">\n <ng-container *ngIf=\"tickFormat(tick) as tickFormatted\">\n <title>{{ tickFormatted }}</title>\n <svg:text\n stroke-width=\"0.01\"\n font-size=\"12px\"\n [attr.text-anchor]=\"textAnchor\"\n [attr.transform]=\"textTransform\"\n >\n <ng-container *ngIf=\"isWrapTicksSupported; then tmplMultilineTick; else tmplSinglelineTick\"></ng-container>\n </svg:text>\n\n <ng-template #tmplMultilineTick>\n <ng-container *ngIf=\"tickChunks(tick) as tickLines\">\n <svg:tspan *ngFor=\"let tickLine of tickLines; let i = index\" x=\"0\" [attr.y]=\"i * 12\">\n {{ tickLine }}\n </svg:tspan>\n </ng-container>\n </ng-template>\n\n <ng-template #tmplSinglelineTick>\n {{ tickTrim(tickFormatted) }}\n </ng-template>\n </ng-container>\n </svg:g>\n </svg:g>\n\n <svg:g *ngFor=\"let tick of ticks\" [attr.transform]=\"tickTransform(tick)\">\n <svg:g *ngIf=\"showGridLines\" [attr.transform]=\"gridLineTransform()\">\n <svg:line class=\"gridline-path gridline-path-vertical\" [attr.y1]=\"-gridLineHeight\" y2=\"0\" />\n </svg:g>\n </svg:g>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class XAxisTicksComponent implements OnChanges, AfterViewInit {\n @Input() scale;\n @Input() orient: Orientation;\n @Input() tickArguments: number[] = [5];\n @Input() tickValues: string[] | number[];\n @Input() tickStroke: string = '#ccc';\n @Input() trimTicks: boolean = true;\n @Input() maxTickLength: number = 16;\n @Input() tickFormatting;\n @Input() showGridLines = false;\n @Input() gridLineHeight: number;\n @Input() width: number;\n @Input() rotateTicks: boolean = true;\n @Input() wrapTicks = false;\n\n @Output() dimensionsChanged = new EventEmitter();\n\n verticalSpacing: number = 20;\n rotateLabels: boolean = false;\n innerTickSize: number = 6;\n outerTickSize: number = 6;\n tickPadding: number = 3;\n textAnchor: TextAnchor = TextAnchor.Middle;\n maxTicksLength: number = 0;\n maxAllowedLength: number = 16;\n adjustedScale: any;\n textTransform: string;\n ticks: any[];\n tickFormat: (o: any) => any;\n height: number = 0;\n approxHeight: number = 10;\n maxPossibleLengthForTickIfWrapped = 16;\n\n @ViewChild('ticksel') ticksElement: ElementRef;\n\n get isWrapTicksSupported() {\n return this.wrapTicks && this.scale.step;\n }\n\n constructor(@Inject(PLATFORM_ID) private platformId: any) {}\n\n ngOnChanges(changes: SimpleChanges): void {\n this.update();\n }\n\n ngAfterViewInit(): void {\n setTimeout(() => this.updateDims());\n }\n\n updateDims(): void {\n if (!isPlatformBrowser(this.platformId)) {\n // for SSR, use approximate value instead of measured\n this.dimensionsChanged.emit({ height: this.approxHeight });\n return;\n }\n\n const height = parseInt(this.ticksElement.nativeElement.getBoundingClientRect().height, 10);\n if (height !== this.height) {\n this.height = height;\n this.dimensionsChanged.emit({ height: this.height });\n setTimeout(() => this.updateDims());\n }\n }\n\n update(): void {\n const scale = this.scale;\n this.ticks = this.getTicks();\n\n if (this.tickFormatting) {\n this.tickFormat = this.tickFormatting;\n } else if (scale.tickFormat) {\n // eslint-disable-next-line prefer-spread\n this.tickFormat = scale.tickFormat.apply(scale, this.tickArguments);\n } else {\n this.tickFormat = function (d) {\n if (d.constructor.name === 'Date') {\n return d.toLocaleDateString();\n }\n return d.toLocaleString();\n };\n }\n\n const angle = this.rotateTicks ? this.getRotationAngle(this.ticks) : null;\n\n this.adjustedScale = this.scale.bandwidth\n ? function (d) {\n return this.scale(d) + this.scale.bandwidth() * 0.5;\n }\n : this.scale;\n\n this.textTransform = '';\n if (angle && angle !== 0) {\n this.textTransform = `rotate(${angle})`;\n this.textAnchor = TextAnchor.End;\n this.verticalSpacing = 10;\n } else {\n this.textAnchor = TextAnchor.Middle;\n }\n\n setTimeout(() => this.updateDims());\n }\n\n getRotationAngle(ticks: any[]): number {\n let angle = 0;\n this.maxTicksLength = 0;\n for (let i = 0; i < ticks.length; i++) {\n const tick = this.tickFormat(ticks[i]).toString();\n let tickLength = tick.length;\n if (this.trimTicks) {\n tickLength = this.tickTrim(tick).length;\n }\n\n if (tickLength > this.maxTicksLength) {\n this.maxTicksLength = tickLength;\n }\n }\n\n const len = Math.min(this.maxTicksLength, this.maxAllowedLength);\n const charWidth = 7; // need to measure this\n const wordWidth = len * charWidth;\n\n let baseWidth = wordWidth;\n const maxBaseWidth = Math.floor(this.width / ticks.length);\n\n // calculate optimal angle\n while (baseWidth > maxBaseWidth && angle > -90) {\n angle -= 30;\n baseWidth = Math.cos(angle * (Math.PI / 180)) * wordWidth;\n }\n\n let labelHeight = 14;\n if (this.isWrapTicksSupported) {\n const longestTick = this.ticks.reduce(\n (earlier, current) => (current.length > earlier.length ? current : earlier),\n ''\n );\n\n const tickLines = this.tickChunks(longestTick);\n labelHeight = 14 * (tickLines.length || 1);\n\n this.maxPossibleLengthForTickIfWrapped = this.getMaxPossibleLengthForTick(longestTick);\n }\n\n const requiredHeight =\n angle !== 0\n ? Math.max(Math.abs(Math.sin((angle * Math.PI) / 180)) * this.maxTickLength * charWidth, 10)\n : labelHeight;\n\n this.approxHeight = Math.min(requiredHeight, 200);\n\n return angle;\n }\n\n getTicks(): any[] {\n let ticks;\n const maxTicks = this.getMaxTicks(20);\n const maxScaleTicks = this.getMaxTicks(100);\n\n if (this.tickValues) {\n ticks = this.tickValues;\n } else if (this.scale.ticks) {\n ticks = this.scale.ticks.apply(this.scale, [maxScaleTicks]);\n } else {\n ticks = this.scale.domain();\n ticks = reduceTicks(ticks, maxTicks);\n }\n\n return ticks;\n }\n\n getMaxTicks(tickWidth: number): number {\n return Math.floor(this.width / tickWidth);\n }\n\n tickTransform(tick: number): string {\n return 'translate(' + this.adjustedScale(tick) + ',' + this.verticalSpacing + ')';\n }\n\n gridLineTransform(): string {\n return `translate(0,${-this.verticalSpacing - 5})`;\n }\n\n tickTrim(label: string): string {\n return this.trimTicks ? trimLabel(label, this.maxTickLength) : label;\n }\n\n getMaxPossibleLengthForTick(longestLabel: string): number {\n if (this.scale.bandwidth) {\n const averageCharacterWidth = 7; // approximate char width\n const maxCharacters = Math.floor(this.scale.bandwidth() / averageCharacterWidth);\n const truncatedText = longestLabel.slice(0, maxCharacters);\n return Math.max(truncatedText.length, this.maxTickLength);\n }\n\n return this.maxTickLength;\n }\n\n tickChunks(label: string): string[] {\n if (label.toString().length > this.maxTickLength && this.scale.bandwidth) {\n const maxAllowedLines = 5;\n\n let maxLines = this.rotateTicks ? Math.floor(this.scale.step() / 14) : maxAllowedLines;\n\n if (maxLines <= 1) {\n return [this.tickTrim(label)];\n }\n\n let possibleStringLength = Math.max(this.maxPossibleLengthForTickIfWrapped, this.maxTickLength);\n\n if (!isPlatformBrowser(this.platformId)) {\n possibleStringLength = Math.floor(\n Math.min(\n this.approxHeight / maxAllowedLines,\n Math.max(this.maxPossibleLengthForTickIfWrapped, this.maxTickLength)\n )\n );\n }\n\n maxLines = Math.min(maxLines, maxAllowedLines);\n const lines = getTickLines(label, possibleStringLength, maxLines < 1 ? 1 : maxLines);\n return lines;\n }\n\n return [this.tickTrim(label)];\n }\n}\n","import {\n Component,\n Input,\n SimpleChanges,\n Output,\n EventEmitter,\n OnChanges,\n ViewChild,\n ChangeDetectionStrategy\n} from '@angular/core';\n\nimport { XAxisTicksComponent } from './x-axis-ticks.component';\nimport { Orientation } from '../types/orientation.enum';\nimport { ViewDimensions } from '../types/view-dimension.interface';\n\n@Component({\n selector: 'g[ngx-charts-x-axis]',\n template: `\n <svg:g [attr.class]=\"xAxisClassName\" [attr.transform]=\"transform\">\n <svg:g\n ngx-charts-x-axis-ticks\n *ngIf=\"xScale\"\n [trimTicks]=\"trimTicks\"\n [rotateTicks]=\"rotateTicks\"\n [maxTickLength]=\"maxTickLength\"\n [tickFormatting]=\"tickFormatting\"\n [tickArguments]=\"tickArguments\"\n [tickStroke]=\"tickStroke\"\n [scale]=\"xScale\"\n [orient]=\"xOrient\"\n [showGridLines]=\"showGridLines\"\n [gridLineHeight]=\"dims.height\"\n [width]=\"dims.width\"\n [tickValues]=\"ticks\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"emitTicksHeight($event)\"\n />\n <svg:g\n ngx-charts-axis-label\n *ngIf=\"showLabel\"\n [label]=\"labelText\"\n [offset]=\"labelOffset\"\n [orient]=\"orientation.Bottom\"\n [height]=\"dims.height\"\n [width]=\"dims.width\"\n ></svg:g>\n </svg:g>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class XAxisComponent implements OnChanges {\n @Input() xScale;\n @Input() dims: ViewDimensions;\n @Input() trimTicks: boolean;\n @Input() rotateTicks: boolean = true;\n @Input() maxTickLength: number;\n @Input() tickFormatting;\n @Input() showGridLines = false;\n @Input() showLabel: boolean;\n @Input() labelText: string;\n @Input() ticks: any[];\n @Input() xAxisTickCount: number;\n @Input() xOrient: Orientation = Orientation.Bottom;\n @Input() xAxisOffset: number = 0;\n @Input() wrapTicks = false;\n\n @Output() dimensionsChanged = new EventEmitter();\n\n xAxisClassName: string = 'x axis';\n\n tickArguments: number[];\n transform: string;\n labelOffset: number = 0;\n fill: string = 'none';\n stroke: string = 'stroke';\n tickStroke: string = '#ccc';\n strokeWidth: string = 'none';\n padding: number = 5;\n\n readonly orientation = Orientation;\n\n @ViewChild(XAxisTicksComponent) ticksComponent: XAxisTicksComponent;\n\n ngOnChanges(changes: SimpleChanges): void {\n this.update();\n }\n\n update(): void {\n this.transform = `translate(0,${this.xAxisOffset + this.padding + this.dims.height})`;\n\n if (typeof this.xAxisTickCount !== 'undefined') {\n this.tickArguments = [this.xAxisTickCount];\n }\n }\n\n emitTicksHeight({ height }): void {\n const newLabelOffset = height + 25 + 5;\n if (newLabelOffset !== this.labelOffset) {\n this.labelOffset = newLabelOffset;\n setTimeout(() => {\n this.dimensionsChanged.emit({ height });\n }, 0);\n }\n }\n}\n","/**\n * Generates a rounded rectanglar path\n *\n * @export\n * @param x, y, w, h, r, tl, tr, bl, br\n */\nexport function roundedRect(\n x: number,\n y: number,\n w: number,\n h: number,\n r: number,\n [tl, tr, bl, br]: boolean[]\n): string {\n let retval = '';\n\n w = Math.floor(w);\n h = Math.floor(h);\n\n w = w === 0 ? 1 : w;\n h = h === 0 ? 1 : h;\n\n retval = `M${[x + r, y]}`;\n retval += `h${w - 2 * r}`;\n\n if (tr) {\n retval += `a${[r, r]} 0 0 1 ${[r, r]}`;\n } else {\n retval += `h${r}v${r}`;\n }\n\n retval += `v${h - 2 * r}`;\n\n if (br) {\n retval += `a${[r, r]} 0 0 1 ${[-r, r]}`;\n } else {\n retval += `v${r}h${-r}`;\n }\n\n retval += `h${2 * r - w}`;\n\n if (bl) {\n retval += `a${[r, r]} 0 0 1 ${[-r, -r]}`;\n } else {\n retval += `h${-r}v${-r}`;\n }\n\n retval += `v${2 * r - h}`;\n\n if (tl) {\n retval += `a${[r, r]} 0 0 1 ${[r, -r]}`;\n } else {\n retval += `v${-r}h${r}`;\n }\n\n retval += `z`;\n\n return retval;\n}\n","import {\n Component,\n Input,\n Output,\n OnChanges,\n ElementRef,\n ViewChild,\n EventEmitter,\n AfterViewInit,\n ChangeDetectionStrategy,\n SimpleChanges,\n PLATFORM_ID,\n Inject\n} from '@angular/core';\nimport { trimLabel } from '../trim-label.helper';\nimport { getTickLines, reduceTicks } from './ticks.helper';\nimport { roundedRect } from '../../common/shape.helper';\nimport { isPlatformBrowser } from '@angular/common';\nimport { Orientation } from '../types/orientation.enum';\nimport { TextAnchor } from '../types/text-anchor.enum';\n\n@Component({\n selector: 'g[ngx-charts-y-axis-ticks]',\n template: `\n <svg:g #ticksel>\n <svg:g *ngFor=\"let tick of ticks\" class=\"tick\" [attr.transform]=\"transform(tick)\">\n <ng-container *ngIf=\"tickFormat(tick) as tickFormatted\">\n <title>{{ tickFormatted }}</title>\n <svg:text\n stroke-width=\"0.01\"\n [attr.dy]=\"dy\"\n [attr.x]=\"x1\"\n [attr.y]=\"y1\"\n [attr.text-anchor]=\"textAnchor\"\n [style.font-size]=\"'12px'\"\n >\n <ng-container *ngIf=\"wrapTicks; then tmplMultilineTick; else tmplSinglelineTick\"></ng-container>\n </svg:text>\n\n <ng-template #tmplMultilineTick>\n <ng-container *ngIf=\"tickChunks(tick) as tickLines\">\n <ng-container *ngIf=\"tickLines.length > 1; else tmplSinglelineTick\">\n <svg:tspan *ngFor=\"let tickLine of tickLines; let i = index\" x=\"0\" [attr.y]=\"i * (8 + tickSpacing)\">\n {{ tickLine }}\n </svg:tspan>\n </ng-container>\n </ng-container>\n </ng-template>\n\n <ng-template #tmplSinglelineTick>\n {{ tickTrim(tickFormatted) }}\n </ng-template>\n </ng-container>\n </svg:g>\n </svg:g>\n\n <svg:path\n *ngIf=\"referenceLineLength > 1 && refMax && refMin && showRefLines\"\n class=\"reference-area\"\n [attr.d]=\"referenceAreaPath\"\n [attr.transform]=\"gridLineTransform()\"\n />\n <svg:g *ngFor=\"let tick of ticks\" [attr.transform]=\"transform(tick)\">\n <svg:g *ngIf=\"showGridLines\" [attr.transform]=\"gridLineTransform()\">\n <svg:line\n *ngIf=\"orient === Orientation.Left\"\n class=\"gridline-path gridline-path-horizontal\"\n x1=\"0\"\n [attr.x2]=\"gridLineWidth\"\n />\n <svg:line\n *ngIf=\"orient === Orientation.Right\"\n class=\"gridline-path gridline-path-horizontal\"\n x1=\"0\"\n [attr.x2]=\"-gridLineWidth\"\n />\n </svg:g>\n </svg:g>\n\n <svg:g *ngFor=\"let refLine of referenceLines\">\n <svg:g *ngIf=\"showRefLines\" [attr.transform]=\"transform(refLine.value)\">\n <svg:line\n class=\"refline-path gridline-path-horizontal\"\n x1=\"0\"\n [attr.x2]=\"gridLineWidth\"\n [attr.transform]=\"gridLineTransform()\"\n />\n <svg:g *ngIf=\"showRefLabels\">\n <title>{{ tickTrim(tickFormat(refLine.value)) }}</title>\n <svg:text\n class=\"refline-label\"\n [attr.dy]=\"dy\"\n [attr.y]=\"-6\"\n [attr.x]=\"gridLineWidth\"\n [attr.text-anchor]=\"textAnchor\"\n >\n {{ refLine.name }}\n </svg:text>\n </svg:g>\n </svg:g>\n </svg:g>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class YAxisTicksComponent implements OnChanges, AfterViewInit {\n @Input() scale;\n @Input() orient: Orientation;\n @Input() tickArguments: number[] = [5];\n @Input() tickValues: string[] | number[];\n @Input() tickStroke = '#ccc';\n @Input() trimTicks: boolean = true;\n @Input() maxTickLength: number = 16;\n @Input() tickFormatting;\n @Input() showGridLines: boolean = false;\n @Input() gridLineWidth: number;\n @Input() height: number;\n @Input() referenceLines;\n @Input() showRefLabels: boolean = false;\n @Input() showRefLines: boolean = false;\n @Input() wrapTicks = false;\n\n @Output() dimensionsChanged = new EventEmitter();\n\n innerTickSize: number = 6;\n tickPadding: number = 3;\n tickSpacing: number;\n verticalSpacing: number = 20;\n textAnchor: TextAnchor = TextAnchor.Middle;\n dy: string;\n x1: number;\n x2: number;\n y1: number;\n y2: number;\n adjustedScale: any;\n transform: (o: any) => string;\n tickFormat: (o: any) => string;\n ticks: any[];\n width: number = 0;\n outerTickSize: number = 6;\n rotateLabels: boolean = false;\n refMax: number;\n refMin: number;\n referenceLineLength: number = 0;\n referenceAreaPath: string;\n\n readonly Orientation = Orientation;\n\n @ViewChild('ticksel') ticksElement: ElementRef;\n\n constructor(@Inject(PLATFORM_ID) private platformId: any) {}\n\n ngOnChanges(changes: SimpleChanges): void {\n this.update();\n }\n\n ngAfterViewInit(): void {\n setTimeout(() => this.updateDims());\n }\n\n updateDims(): void {\n if (!isPlatformBrowser(this.platformId)) {\n // for SSR, use approximate value instead of measured\n this.width = this.getApproximateAxisWidth();\n this.dimensionsChanged.emit({ width: this.width });\n return;\n }\n\n const width = parseInt(this.ticksElement.nativeElement.getBoundingClientRect().width, 10);\n if (width !== this.width) {\n this.width = width;\n this.dimensionsChanged.emit({ width });\n setTimeout(() => this.updateDims());\n }\n }\n\n update(): void {\n const scale = this.scale;\n const sign = this.orient === Orientation.Top || this.orient === Orientation.Right ? -1 : 1;\n this.tickSpacing = Math.max(this.innerTickSize, 0) + this.tickPadding;\n\n this.ticks = this.getTicks();\n\n if (this.tickFormatting) {\n this.tickFormat = this.tickFormatting;\n } else if (scale.tickFormat) {\n // eslint-disable-next-line prefer-spread\n this.tickFormat = scale.tickFormat.apply(scale, this.tickArguments);\n } else {\n this.tickFormat = function (d) {\n if (d.constructor.name === 'Date') {\n return d.toLocaleDateString();\n }\n return d.toLocaleString();\n };\n }\n\n this.adjustedScale = scale.bandwidth\n ? d => {\n // position the tick to middle considering number of lines of the tick\n const positionMiddle = scale(d) + scale.bandwidth() * 0.5;\n if (this.wrapTicks && d.toString().length > this.maxTickLength) {\n const chunksLength = this.tickChunks(d).length;\n\n if (chunksLength === 1) {\n return positionMiddle;\n }\n\n const bandWidth = scale.bandwidth();\n const heightOfLines = chunksLength * 8;\n const availableFreeSpace = bandWidth * 0.5 - heightOfLines * 0.5;\n\n return scale(d) + availableFreeSpace;\n }\n\n return positionMiddle;\n }\n : scale;\n\n if (this.showRefLines && this.referenceLines) {\n this.setReferencelines();\n }\n\n switch (this.orient) {\n case Orientation.Top:\n this.transform = function (tick) {\n return 'translate(' + this.adjustedScale(tick) + ',0)';\n };\n this.textAnchor = TextAnchor.Middle;\n this.y2 = this.innerTickSize * sign;\n this.y1 = this.tickSpacing * sign;\n this.dy = sign < 0 ? '0em' : '.71em';\n break;\n case Orientation.Bottom:\n this.transform = function (tick) {\n return 'translate(' + this.adjustedScale(tick) + ',0)';\n };\n this.textAnchor = TextAnchor.Middle;\n this.y2 = this.innerTickSize * sign;\n this.y1 = this.tickSpacing * sign;\n this.dy = sign < 0 ? '0em' : '.71em';\n break;\n case Orientation.Left:\n this.transform = function (tick) {\n return 'translate(0,' + this.adjustedScale(tick) + ')';\n };\n this.textAnchor = TextAnchor.End;\n this.x2 = this.innerTickSize * -sign;\n this.x1 = this.tickSpacing * -sign;\n this.dy = '.32em';\n break;\n case Orientation.Right:\n this.transform = function (tick) {\n return 'translate(0,' + this.adjustedScale(tick) + ')';\n };\n this.textAnchor = TextAnchor.Start;\n this.x2 = this.innerTickSize * -sign;\n this.x1 = this.tickSpacing * -sign;\n this.dy = '.32em';\n break;\n default:\n }\n setTimeout(() => this.updateDims());\n }\n\n setReferencelines(): void {\n this.refMin = this.adjustedScale(\n Math.min.apply(\n null,\n this.referenceLines.map(item => item.value)\n )\n );\n this.refMax = this.adjustedScale(\n Math.max.apply(\n null,\n this.referenceLines.map(item => item.value)\n )\n );\n this.referenceLineLength = this.referenceLines.length;\n\n this.referenceAreaPath = roundedRect(0, this.refMax, this.gridLineWidth, this.refMin - this.refMax, 0, [\n false,\n false,\n false,\n false\n ]);\n }\n\n getTicks(): any[] {\n let ticks;\n const maxTicks = this.getMaxTicks(20);\n const maxScaleTicks = this.getMaxTicks(50);\n\n if (this.tickValues) {\n ticks = this.tickValues;\n } else if (this.scale.ticks) {\n ticks = this.scale.ticks.apply(this.scale, [maxScaleTicks]);\n } else {\n ticks = this.scale.domain();\n ticks = reduceTicks(ticks, maxTicks);\n }\n\n return ticks;\n }\n\n getMaxTicks(tickHeight: number): number {\n return Math.floor(this.height / tickHeight);\n }\n\n tickTransform(tick: number): string {\n return `translate(${this.adjustedScale(tick)},${this.verticalSpacing})`;\n }\n\n gridLineTransform(): string {\n return `translate(5,0)`;\n }\n\n tickTrim(label: string): string {\n return this.trimTicks ? trimLabel(label, this.maxTickLength) : label;\n }\n\n getApproximateAxisWidth(): number {\n const maxChars = Math.max(...this.ticks.map(t => this.tickTrim(this.tickFormat(t)).length));\n const charWidth = 7;\n return maxChars * charWidth;\n }\n\n tickChunks(label: string): string[] {\n if (label.toString().length > this.maxTickLength && this.scale.bandwidth) {\n // for y-axis the width of the tick is fixed\n const preferredWidth = this.maxTickLength;\n const maxLines = Math.floor(this.scale.bandwidth() / 15);\n\n if (maxLines <= 1) {\n return [this.tickTrim(label)];\n }\n\n return getTickLines(label, preferredWidth, Math.min(maxLines, 5));\n }\n\n return [this.tickFormat(label)];\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n OnChanges,\n ViewChild,\n SimpleChanges,\n ChangeDetectionStrategy\n} from '@angular/core';\nimport { YAxisTicksComponent } from './y-axis-ticks.component';\nimport { Orientation } from '../types/orientation.enum';\nimport { ViewDimensions } from '../types/view-dimension.interface';\n\n@Component({\n selector: 'g[ngx-charts-y-axis]',\n template: `\n <svg:g [attr.class]=\"yAxisClassName\" [attr.transform]=\"transform\">\n <svg:g\n ngx-charts-y-axis-ticks\n *ngIf=\"yScale\"\n [trimTicks]=\"trimTicks\"\n [maxTickLength]=\"maxTickLength\"\n [tickFormatting]=\"tickFormatting\"\n [tickArguments]=\"tickArguments\"\n [tickValues]=\"ticks\"\n [tickStroke]=\"tickStroke\"\n [scale]=\"yScale\"\n [orient]=\"yOrient\"\n [showGridLines]=\"showGridLines\"\n [gridLineWidth]=\"dims.width\"\n [referenceLines]=\"referenceLines\"\n [showRefLines]=\"showRefLines\"\n [showRefLabels]=\"showRefLabels\"\n [height]=\"dims.height\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"emitTicksWidth($event)\"\n />\n\n <svg:g\n ngx-charts-axis-label\n *ngIf=\"showLabel\"\n [label]=\"labelText\"\n [offset]=\"labelOffset\"\n [orient]=\"yOrient\"\n [height]=\"dims.height\"\n [width]=\"dims.width\"\n ></svg:g>\n </svg:g>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class YAxisComponent implements OnChanges {\n @Input() yScale;\n @Input() dims: ViewDimensions;\n @Input() trimTicks: boolean;\n @Input() maxTickLength: number;\n @Input() tickFormatting;\n @Input() ticks: any[];\n @Input() showGridLines: boolean = false;\n @Input() showLabel: boolean;\n @Input() labelText: string;\n @Input() yAxisTickCount: any;\n @Input() yOrient: Orientation = Orientation.Left;\n @Input() referenceLines;\n @Input() showRefLines: boolean;\n @Input() showRefLabels: boolean;\n @Input() yAxisOffset: number = 0;\n @Input() wrapTicks = false;\n @Output() dimensionsChanged = new EventEmitter();\n\n yAxisClassName: string = 'y axis';\n tickArguments: number[];\n offset: number;\n transform: string;\n labelOffset: number = 15;\n fill: string = 'none';\n stroke: string = '#CCC';\n tickStroke: string = '#CCC';\n strokeWidth: number = 1;\n padding: number = 5;\n\n @ViewChild(YAxisTicksComponent) ticksComponent: YAxisTicksComponent;\n\n ngOnChanges(changes: SimpleChanges): void {\n this.update();\n }\n\n update(): void {\n this.offset = -(this.yAxisOffset + this.padding);\n if (this.yOrient === Orientation.Right) {\n this.labelOffset = 65;\n this.transform = `translate(${this.offset + this.dims.width} , 0)`;\n } else {\n this.transform = `translate(${this.offset} , 0)`;\n }\n\n if (this.yAxisTickCount !== undefined) {\n this.tickArguments = [this.yAxisTickCount];\n }\n }\n\n emitTicksWidth({ width }): void {\n if (width !== this.labelOffset && this.yOrient === Orientation.Right) {\n this.labelOffset = width + this.labelOffset;\n setTimeout(() => {\n this.dimensionsChanged.emit({ width });\n }, 0);\n } else if (width !== this.labelOffset) {\n this.labelOffset = width;\n setTimeout(() => {\n this.dimensionsChanged.emit({ width });\n }, 0);\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { AxisLabelComponent } from './axis-label.component';\nimport { XAxisComponent } from './x-axis.component';\nimport { XAxisTicksComponent } from './x-axis-ticks.component';\nimport { YAxisComponent } from './y-axis.component';\nimport { YAxisTicksComponent } from './y-axis-ticks.component';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [AxisLabelComponent, XAxisComponent, XAxisTicksComponent, YAxisComponent, YAxisTicksComponent],\n exports: [AxisLabelComponent, XAxisComponent, XAxisTicksComponent, YAxisComponent, YAxisTicksComponent]\n})\nexport class AxesModule {}\n","export enum StyleTypes {\n popover = 'popover',\n tooltip = 'tooltip'\n}\n","export enum ShowTypes {\n all = 'all' as any,\n focus = 'focus' as any,\n mouseover = 'mouseover' as any\n}\n","import {\n Directive,\n Input,\n Output,\n EventEmitter,\n HostListener,\n ViewContainerRef,\n Renderer2,\n OnDestroy,\n TemplateRef,\n ComponentRef\n} from '@angular/core';\n\nimport { PlacementTypes } from './position';\nimport { StyleTypes } from './style.type';\nimport { ShowTypes } from './show.type';\n\nimport { TooltipService } from './tooltip.service';\n\n@Directive({ selector: '[ngx-tooltip]' })\nexport class TooltipDirective implements OnDestroy {\n @Input() tooltipCssClass: string = '';\n @Input() tooltipTitle?: string;\n @Input() tooltipAppendToBody: boolean = true;\n @Input() tooltipSpacing: number = 10;\n @Input() tooltipDisabled: boolean = false;\n @Input() tooltipShowCaret: boolean = true;\n @Input() tooltipPlacement: PlacementTypes = PlacementTypes.Top;\n @Input() tooltipAlignment: PlacementTypes = PlacementTypes.Center;\n @Input() tooltipType: StyleTypes = StyleTypes.popover;\n @Input() tooltipCloseOnClickOutside: boolean = true;\n @Input() tooltipCloseOnMouseLeave: boolean = true;\n @Input() tooltipHideTimeout: number = 300;\n @Input() tooltipShowTimeout: number = 100;\n @Input() tooltipTemplate: TemplateRef<any>;\n @Input() tooltipShowEvent: ShowTypes = ShowTypes.all;\n @Input() tooltipContext: any;\n @Input() tooltipImmediateExit: boolean = false;\n\n @Output() show: EventEmitter<boolean> = new EventEmitter();\n @Output() hide: EventEmitter<boolean> = new EventEmitter();\n\n private get listensForFocus(): boolean {\n return this.tooltipShowEvent === ShowTypes.all || this.tooltipShowEvent === ShowTypes.focus;\n }\n\n private get listensForHover(): boolean {\n return this.tooltipShowEvent === ShowTypes.all || this.tooltipShowEvent === ShowTypes.mouseover;\n }\n\n private component: ComponentRef<any>;\n private timeout: ReturnType<typeof setTimeout>;\n private mouseLeaveContentEvent: any;\n private mouseEnterContentEvent: any;\n private documentClickEvent: any;\n\n constructor(\n private tooltipService: TooltipService,\n private viewContainerRef: ViewContainerRef,\n private renderer: Renderer2\n ) {}\n\n ngOnDestroy(): void {\n this.hideTooltip(true);\n }\n\n @HostListener('focusin')\n onFocus(): void {\n if (this.listensForFocus) {\n this.showTooltip();\n }\n }\n\n @HostListener('blur')\n onBlur(): void {\n if (this.listensForFocus) {\n this.hideTooltip(true);\n }\n }\n\n @HostListener('mouseenter')\n onMouseEnter(): void {\n if (this.listensForHover) {\n this.showTooltip();\n }\n }\n\n @HostListener('mouseleave', ['$event.target'])\n onMouseLeave(target): void {\n if (this.listensForHover && this.tooltipCloseOnMouseLeave) {\n clearTimeout(this.timeout);\n\n if (this.component) {\n const contentDom = this.component.instance.element.nativeElement;\n const contains = contentDom.contains(target);\n if (contains) return;\n }\n\n this.hideTooltip(this.tooltipImmediateExit);\n }\n }\n\n @HostListener('click')\n onMouseClick() {\n if (this.listensForHover) {\n this.hideTooltip(true);\n }\n }\n\n showTooltip(immediate?: boolean): void {\n if (this.component || this.tooltipDisabled) return;\n\n const time = immediate\n ? 0\n : this.tooltipShowTimeout + (navigator.userAgent.match(/\\(i[^;]+;( U;)? CPU.+Mac OS X/) ? 400 : 0);\n\n clearTimeout(this.timeout);\n this.timeout = setTimeout(() => {\n this.tooltipService.destroyAll();\n\n const options = this.createBoundOptions();\n this.component = this.tooltipService.create(options);\n\n // add a tiny timeout to avoid event re-triggers\n setTimeout(() => {\n if (this.component) {\n this.addHideListeners(this.component.instance.element.nativeElement);\n }\n }, 10);\n\n this.show.emit(true);\n }, time);\n }\n\n addHideListeners(tooltip: HTMLElement): void {\n // on mouse enter, cancel the hide triggered by the leave\n this.mouseEnterContentEvent = this.renderer.listen(tooltip, 'mouseenter', () => {\n clearTimeout(this.timeout);\n });\n\n // content mouse leave listener\n if (this.tooltipCloseOnMouseLeave) {\n this.mouseLeaveContentEvent = this.renderer.listen(tooltip, 'mouseleave', () => {\n this.hideTooltip(this.tooltipImmediateExit);\n });\n }\n\n // content close on click outside\n if (this.tooltipCloseOnClickOutside) {\n this.documentClickEvent = this.renderer.listen('window', 'click', event => {\n const contains = tooltip.contains(event.target);\n if (!contains) this.hideTooltip();\n });\n }\n }\n\n hideTooltip(immediate: boolean = false): void {\n if (!this.component) return;\n\n const destroyFn = () => {\n // remove events\n if (this.mouseLeaveContentEvent) this.mouseLeaveContentEvent();\n if (this.mouseEnterContentEvent) this.mouseEnterContentEvent();\n if (this.documentClickEvent) this.documentClickEvent();\n\n // emit events\n this.hide.emit(true);\n\n // destroy component\n this.tooltipService.destroy(this.component);\n this.component = undefined;\n };\n\n clearTimeout(this.timeout);\n if (!immediate) {\n this.timeout = setTimeout(destroyFn, this.tooltipHideTimeout);\n } else {\n destroyFn();\n }\n }\n\n private createBoundOptions(): any {\n return {\n title: this.tooltipTitle,\n template: this.tooltipTemplate,\n host: this.viewContainerRef.element,\n placement: this.tooltipPlacement,\n alignment: this.tooltipAlignment,\n type: this.tooltipType,\n showCaret: this.tooltipShowCaret,\n cssClass: this.tooltipCssClass,\n spacing: this.tooltipSpacing,\n context: this.tooltipContext\n };\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { TooltipDirective } from './tooltip.directive';\nimport { TooltipContentComponent } from './tooltip.component';\nimport { TooltipService } from './tooltip.service';\n\nimport { InjectionService } from './injection.service';\n\n@NgModule({\n declarations: [TooltipContentComponent, TooltipDirective],\n providers: [InjectionService, TooltipService],\n exports: [TooltipContentComponent, TooltipDirective],\n imports: [CommonModule],\n entryComponents: [TooltipContentComponent]\n})\nexport class TooltipModule {}\n","const cache = {};\n\n/**\n * Generates a short id.\n *\n * Description:\n * A 4-character alphanumeric sequence (364 = 1.6 million)\n * This should only be used for JavaScript specific models.\n * http://stackoverflow.com/questions/6248666/how-to-generate-short-uid-like-ax4j9z-in-js\n *\n * Example: `ebgf`\n */\nexport function id(): string {\n let newId = ('0000' + ((Math.random() * Math.pow(36, 4)) << 0).toString(36)).slice(-4);\n\n // append a 'a' because neo gets mad\n newId = `a${newId}`;\n\n // ensure not already used\n if (!cache[newId]) {\n cache[newId] = true;\n return newId;\n }\n\n return id();\n}\n","export enum BarOrientation {\n Vertical = 'vertical',\n Horizontal = 'horizontal'\n}\n","import { Component, Input, OnChanges, SimpleChanges, ChangeDetectionStrategy } from '@angular/core';\nimport { BarOrientation } from './types/bar-orientation.enum';\nimport { Gradient } from './types/gradient.interface';\n\n@Component({\n selector: 'g[ngx-charts-svg-linear-gradient]',\n template: `\n <svg:linearGradient [id]=\"name\" [attr.x1]=\"x1\" [attr.y1]=\"y1\" [attr.x2]=\"x2\" [attr.y2]=\"y2\">\n <svg:stop\n *ngFor=\"let stop of stops\"\n [attr.offset]=\"stop.offset + '%'\"\n [style.stop-color]=\"stop.color\"\n [style.stop-opacity]=\"stop.opacity\"\n />\n </svg:linearGradient>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SvgLinearGradientComponent implements OnChanges {\n @Input() orientation = BarOrientation.Vertical;\n @Input() name: string;\n @Input() stops: Gradient[];\n\n x1: string;\n x2: string;\n y1: string;\n y2: string;\n\n ngOnChanges(changes: SimpleChanges): void {\n this.x1 = '0%';\n this.x2 = '0%';\n this.y1 = '0%';\n this.y2 = '0%';\n\n if (this.orientation === BarOrientation.Horizontal) {\n this.x2 = '100%';\n } else if (this.orientation === BarOrientation.Vertical) {\n this.y1 = '100%';\n }\n }\n}\n","import {\n Component,\n Input,\n SimpleChanges,\n Output,\n EventEmitter,\n OnChanges,\n ChangeDetectionStrategy,\n HostListener\n} from '@angular/core';\n\n@Component({\n selector: 'g[ngx-charts-circle]',\n template: `\n <svg:circle\n [attr.cx]=\"cx\"\n [attr.cy]=\"cy\"\n [attr.r]=\"r\"\n [attr.fill]=\"fill\"\n [attr.stroke]=\"stroke\"\n [attr.opacity]=\"circleOpacity\"\n [attr.class]=\"classNames\"\n [attr.pointer-events]=\"pointerEvents\"\n />\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class CircleComponent implements OnChanges {\n @Input() cx: number;\n @Input() cy: number;\n @Input() r: number;\n @Input() fill: string;\n @Input() stroke: string;\n @Input() data: number | string;\n @Input() classNames: string[] | string;\n @Input() circleOpacity: number;\n @Input() pointerEvents: string;\n\n @Output() select: EventEmitter<number | string> = new EventEmitter();\n @Output() activate: EventEmitter<number | string> = new EventEmitter();\n @Output() deactivate: EventEmitter<number | string> = new EventEmitter();\n\n @HostListener('click')\n onClick() {\n this.select.emit(this.data);\n }\n\n @HostListener('mouseenter')\n onMouseEnter(): void {\n this.activate.emit(this.data);\n }\n\n @HostListener('mouseleave')\n onMouseLeave(): void {\n this.deactivate.emit(this.data);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.classNames = Array.isArray(this.classNames) ? this.classNames.join(' ') : '';\n this.classNames += 'circle';\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n OnChanges,\n OnInit,\n ChangeDetectionStrategy,\n TemplateRef,\n PLATFORM_ID,\n Inject\n} from '@angular/core';\nimport { trigger, style, animate, transition } from '@angular/animations';\nimport { formatLabel, escapeLabel } from './label.helper';\nimport { id } from '../utils/id';\nimport { ColorHelper } from './color.helper';\nimport { DataItem, Series, StringOrNumberOrDate } from '../models/chart-data.model';\nimport { PlacementTypes } from './tooltip/position';\nimport { StyleTypes } from './tooltip/style.type';\nimport { BarOrientation } from './types/bar-orientation.enum';\nimport { Gradient } from './types/gradient.interface';\nimport { ScaleType } from './types/scale-type.enum';\nimport { isPlatformServer } from '@angular/common';\n\nexport enum SeriesType {\n Standard = 'standard',\n Stacked = 'stacked'\n}\n\nexport interface Circle {\n classNames: string[];\n value: string | number;\n label: string;\n data: DataItem;\n cx: number;\n cy: number;\n radius: number;\n height: number;\n tooltipLabel: string;\n color: string;\n opacity: number;\n seriesName: string;\n gradientStops: Gradient[];\n min: number;\n max: number;\n}\n\n@Component({\n selector: 'g[ngx-charts-circle-series]',\n template: `\n <svg:g *ngIf=\"circle\">\n <defs>\n <svg:g\n ngx-charts-svg-linear-gradient\n [orientation]=\"barOrientation.Vertical\"\n [name]=\"gradientId\"\n [stops]=\"circle.gradientStops\"\n />\n </defs>\n <svg:rect\n *ngIf=\"!isSSR && barVisible && type === 'standard'\"\n [@animationState]=\"'active'\"\n [attr.x]=\"circle.cx - circle.radius\"\n [attr.y]=\"circle.cy\"\n [attr.width]=\"circle.radius * 2\"\n [attr.height]=\"circle.height\"\n [attr.fill]=\"gradientFill\"\n class=\"tooltip-bar\"\n />\n <svg:rect\n *ngIf=\"isSSR && barVisible && type === 'standard'\"\n [attr.x]=\"circle.cx - circle.radius\"\n [attr.y]=\"circle.cy\"\n [attr.width]=\"circle.radius * 2\"\n [attr.height]=\"circle.height\"\n [attr.fill]=\"gradientFill\"\n class=\"tooltip-bar\"\n />\n <svg:g\n ngx-charts-circle\n class=\"circle\"\n [cx]=\"circle.cx\"\n [cy]=\"circle.cy\"\n [r]=\"circle.radius\"\n [fill]=\"circle.color\"\n [class.active]=\"isActive({ name: circle.seriesName })\"\n [pointerEvents]=\"circle.value === 0 ? 'none' : 'all'\"\n [data]=\"circle.value\"\n [classNames]=\"circle.classNames\"\n (select)=\"onClick(circle.data)\"\n (activate)=\"activateCircle()\"\n (deactivate)=\"deactivateCircle()\"\n ngx-tooltip\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipPlacement]=\"placementTypes.Top\"\n [tooltipType]=\"styleTypes.tooltip\"\n [tooltipTitle]=\"tooltipTemplate ? undefined : getTooltipText(circle)\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipContext]=\"circle.data\"\n />\n </svg:g>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('animationState', [\n transition(':enter', [\n style({\n opacity: 0\n }),\n animate(250, style({ opacity: 1 }))\n ])\n ])\n ]\n})\nexport class CircleSeriesComponent implements OnChanges, OnInit {\n @Input() data: Series;\n @Input() type: SeriesType = SeriesType.Standard;\n @Input() xScale;\n @Input() yScale;\n @Input() colors: ColorHelper;\n @Input() scaleType: ScaleType;\n @Input() visibleValue: boolean;\n @Input() activeEntries: any[];\n @Input() tooltipDisabled: boolean = false;\n @Input() tooltipTemplate: TemplateRef<any>;\n\n @Output() select: EventEmitter<DataItem> = new EventEmitter();\n @Output() activate: EventEmitter<{ name: StringOrNumberOrDate }> = new EventEmitter();\n @Output() deactivate: EventEmitter<{ name: StringOrNumberOrDate }> = new EventEmitter();\n\n areaPath: any;\n circle: Circle; // active circle\n barVisible: boolean = false;\n gradientId: string;\n gradientFill: string;\n\n barOrientation = BarOrientation;\n placementTypes = PlacementTypes;\n styleTypes = StyleTypes;\n\n isSSR = false;\n\n constructor(@Inject(PLATFORM_ID) private platformId: any) {}\n\n ngOnInit() {\n this.gradientId = 'grad' + id().toString();\n this.gradientFill = `url(#${this.gradientId})`;\n\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n\n ngOnChanges(): void {\n this.update();\n }\n\n update(): void {\n this.circle = this.getActiveCircle();\n }\n\n getActiveCircle(): Circle {\n const indexActiveDataPoint = this.data.series.findIndex(d => {\n const label = d.name;\n return label && this.visibleValue && label.toString() === this.visibleValue.toString() && d.value !== undefined;\n });\n\n if (indexActiveDataPoint === -1) {\n // No valid point is 'active/hovered over' at this moment.\n return undefined;\n }\n\n return this.mapDataPointToCircle(this.data.series[indexActiveDataPoint], indexActiveDataPoint);\n }\n\n mapDataPointToCircle(d: any, i: number): Circle {\n const seriesName = this.data.name as string;\n\n const value = d.value;\n const label = d.name;\n const tooltipLabel = formatLabel(label);\n\n let cx;\n if (this.scaleType === ScaleType.Time) {\n cx = this.xScale(label);\n } else if (this.scaleType === ScaleType.Linear) {\n cx = this.xScale(Number(label));\n } else {\n cx = this.xScale(label);\n }\n\n const cy = this.yScale(this.type === SeriesType.Standard ? value : d.d1);\n const radius = 5;\n const height = this.yScale.range()[0] - cy;\n const opacity = 1;\n\n let color;\n if (this.colors.scaleType === ScaleType.Linear) {\n if (this.type === SeriesType.Standard) {\n color = this.colors.getColor(value);\n } else {\n color = this.colors.getColor(d.d1);\n }\n } else {\n color = this.colors.getColor(seriesName);\n }\n\n const data = Object.assign({}, d, {\n series: seriesName,\n value,\n name: label\n });\n\n return {\n classNames: [`circle-data-${i}`],\n value,\n label,\n data,\n cx,\n cy,\n radius,\n height,\n tooltipLabel,\n color,\n opacity,\n seriesName,\n gradientStops: this.getGradientStops(color),\n min: d.min,\n max: d.max\n };\n }\n\n getTooltipText({\n tooltipLabel,\n value,\n seriesName,\n min,\n max\n }: {\n tooltipLabel: string;\n value: any;\n seriesName: string;\n min: number;\n max: number;\n }): string {\n return `\n <span class=\"tooltip-label\">${escapeLabel(seriesName)} • ${escapeLabel(tooltipLabel)}</span>\n <span class=\"tooltip-val\">${value.toLocaleString()}${this.getTooltipMinMaxText(min, max)}</span>\n `;\n }\n\n getTooltipMinMaxText(min: number, max: number): string {\n if (min !== undefined || max !== undefined) {\n let result = ' (';\n if (min !== undefined) {\n if (max === undefined) {\n result += '≥';\n }\n result += min.toLocaleString();\n if (max !== undefined) {\n result += ' - ';\n }\n } else if (max !== undefined) {\n result += '≤';\n }\n if (max !== undefined) {\n result += max.toLocaleString();\n }\n result += ')';\n return result;\n } else {\n return '';\n }\n }\n\n getGradientStops(color: string): Gradient[] {\n return [\n {\n offset: 0,\n color,\n opacity: 0.2\n },\n {\n offset: 100,\n color,\n opacity: 1\n }\n ];\n }\n\n onClick(data: DataItem): void {\n this.select.emit(data);\n }\n\n isActive(entry): boolean {\n if (!this.activeEntries) return false;\n const item = this.activeEntries.find(d => {\n return entry.name === d.name;\n });\n return item !== undefined;\n }\n\n activateCircle(): void {\n this.barVisible = true;\n this.activate.emit({ name: this.data.name });\n }\n\n deactivateCircle(): void {\n this.barVisible = false;\n this.circle.opacity = 0;\n this.deactivate.emit({ name: this.data.name });\n }\n}\n","import { Component, Input, ChangeDetectionStrategy } from '@angular/core';\n\n@Component({\n selector: 'g[ngx-charts-grid-panel]',\n template: `\n <svg:rect [attr.height]=\"height\" [attr.width]=\"width\" [attr.x]=\"x\" [attr.y]=\"y\" stroke=\"none\" class=\"gridpanel\" />\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class GridPanelComponent {\n @Input() width: number;\n @Input() height: number;\n @Input() x: number;\n @Input() y: number;\n}\n","import { Component, SimpleChanges, Input, OnChanges, ChangeDetectionStrategy } from '@angular/core';\nimport { BarOrientation } from './types/bar-orientation.enum';\nimport { ViewDimensions } from './types/view-dimension.interface';\n\ninterface GridPanel {\n class: ClassEnum;\n height: number;\n name: string;\n width: number;\n x: number;\n y: number;\n}\n\nenum ClassEnum {\n Odd = 'odd',\n Even = 'even'\n}\n\n@Component({\n selector: 'g[ngx-charts-grid-panel-series]',\n template: `\n <svg:g\n ngx-charts-grid-panel\n *ngFor=\"let gridPanel of gridPanels\"\n [height]=\"gridPanel.height\"\n [width]=\"gridPanel.width\"\n [x]=\"gridPanel.x\"\n [y]=\"gridPanel.y\"\n [class.grid-panel]=\"true\"\n [class.odd]=\"gridPanel.class === 'odd'\"\n [class.even]=\"gridPanel.class === 'even'\"\n ></svg:g>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class GridPanelSeriesComponent implements OnChanges {\n gridPanels: GridPanel[];\n\n @Input() data: any[];\n\n @Input() dims: ViewDimensions;\n\n @Input() xScale: any;\n\n @Input() yScale: any;\n\n @Input() orient: BarOrientation;\n\n ngOnChanges(changes: SimpleChanges): void {\n this.update();\n }\n\n update(): void {\n this.gridPanels = this.getGridPanels();\n }\n\n getGridPanels(): GridPanel[] {\n return this.data.map(d => {\n let offset;\n let width;\n let height;\n let x;\n let y;\n let className = ClassEnum.Odd;\n\n if (this.orient === BarOrientation.Vertical) {\n const position: number = this.xScale(d.name);\n const positionIndex = Number.parseInt((position / this.xScale.step()).toString(), 10);\n\n if (positionIndex % 2 === 1) {\n className = ClassEnum.Even;\n }\n offset = this.xScale.bandwidth() * this.xScale.paddingInner();\n width = this.xScale.bandwidth() + offset;\n height = this.dims.height;\n x = this.xScale(d.name) - offset / 2;\n y = 0;\n } else if (this.orient === BarOrientation.Horizontal) {\n const position = this.yScale(d.name);\n const positionIndex = Number.parseInt((position / this.yScale.step()).toString(), 10);\n\n if (positionIndex % 2 === 1) {\n className = ClassEnum.Even;\n }\n offset = this.yScale.bandwidth() * this.yScale.paddingInner();\n\n width = this.dims.width;\n height = this.yScale.bandwidth() + offset;\n x = 0;\n y = this.yScale(d.name) - offset / 2;\n }\n\n return {\n name: d.name,\n class: className,\n height,\n width,\n x,\n y\n };\n });\n }\n}\n","import { Component, Input, OnChanges, ChangeDetectionStrategy, SimpleChanges } from '@angular/core';\nimport { Gradient } from './types/gradient.interface';\n\n@Component({\n selector: 'g[ngx-charts-svg-radial-gradient]',\n template: `\n <svg:radialGradient [id]=\"name\" [attr.cx]=\"cx\" [attr.cy]=\"cy\" [attr.r]=\"r\" gradientUnits=\"userSpaceOnUse\">\n <svg:stop\n *ngFor=\"let stop of stops\"\n [attr.offset]=\"stop.offset + '%'\"\n [style.stop-color]=\"stop.color\"\n [style.stop-opacity]=\"stop.opacity\"\n />\n </svg:radialGradient>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SvgRadialGradientComponent implements OnChanges {\n @Input() color: string;\n @Input() name: string;\n @Input() startOpacity: number;\n @Input() endOpacity = 1;\n @Input() cx: number = 0;\n @Input() cy: number = 0;\n\n @Input()\n get stops(): Gradient[] {\n return this.stopsInput || this.stopsDefault;\n }\n\n set stops(value: Gradient[]) {\n this.stopsInput = value;\n }\n\n r: string;\n\n private stopsInput: Gradient[];\n private stopsDefault: Gradient[];\n\n ngOnChanges(changes: SimpleChanges): void {\n this.r = '30%';\n if ('color' in changes || 'startOpacity' in changes || 'endOpacity' in changes) {\n this.stopsDefault = [\n {\n offset: 0,\n color: this.color,\n opacity: this.startOpacity\n },\n {\n offset: 100,\n color: this.color,\n opacity: this.endOpacity\n }\n ];\n }\n }\n}\n","import { Component, Input, Output, EventEmitter, ElementRef, OnChanges, ChangeDetectionStrategy } from '@angular/core';\nimport { select } from 'd3-selection';\nimport { id } from '../utils/id';\nimport { AreaChartSeries } from '../models/chart-data.model';\nimport { BarOrientation } from './types/bar-orientation.enum';\nimport { Gradient } from './types/gradient.interface';\n\n@Component({\n selector: 'g[ngx-charts-area]',\n template: `\n <svg:defs *ngIf=\"gradient\">\n <svg:g\n ngx-charts-svg-linear-gradient\n [orientation]=\"barOrientation.Vertical\"\n [name]=\"gradientId\"\n [stops]=\"gradientStops\"\n />\n </svg:defs>\n <svg:path class=\"area\" [attr.d]=\"areaPath\" [attr.fill]=\"gradient ? gradientFill : fill\" [style.opacity]=\"opacity\" />\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class AreaComponent implements OnChanges {\n @Input() data: AreaChartSeries;\n @Input() path: string;\n @Input() startingPath: string;\n @Input() fill: string;\n @Input() opacity: number = 1;\n @Input() startOpacity: number = 0.5;\n @Input() endOpacity: number = 1;\n @Input() gradient: boolean = false;\n @Input() stops: Gradient[];\n @Input() animations: boolean = true;\n\n @Output() select = new EventEmitter();\n\n element: HTMLElement;\n gradientId: string;\n gradientFill: string;\n areaPath: string;\n animationsLoaded: boolean = false;\n gradientStops: Gradient[];\n hasGradient: boolean = false;\n\n barOrientation = BarOrientation;\n\n constructor(element: ElementRef) {\n this.element = element.nativeElement;\n }\n\n ngOnChanges(): void {\n this.update();\n\n if (!this.animationsLoaded) {\n this.loadAnimation();\n this.animationsLoaded = true;\n }\n }\n\n update(): void {\n this.gradientId = 'grad' + id().toString();\n this.gradientFill = `url(#${this.gradientId})`;\n\n if (this.gradient || this.stops) {\n this.gradientStops = this.getGradient();\n this.hasGradient = true;\n } else {\n this.hasGradient = false;\n }\n\n this.updatePathEl();\n }\n\n loadAnimation(): void {\n this.areaPath = this.startingPath;\n setTimeout(this.updatePathEl.bind(this), 100);\n }\n\n updatePathEl(): void {\n const node = select(this.element).select('.area');\n\n if (this.animations) {\n node.transition().duration(750).attr('d', this.path);\n } else {\n node.attr('d', this.path);\n }\n }\n\n getGradient(): Gradient[] {\n if (this.stops) {\n return this.stops;\n }\n\n return [\n {\n offset: 0,\n color: this.fill,\n opacity: this.startOpacity\n },\n {\n offset: 100,\n color: this.fill,\n opacity: this.endOpacity\n }\n ];\n }\n}\n","// Robert Penner's easeOutExpo\nfunction easeOutExpo(t, b, c, d): number {\n return (c * (-Math.pow(2, (-10 * t) / d) + 1) * 1024) / 1023 + b;\n}\n\n/**\n * Counts from a number to the end incrementally.\n */\nexport function count(countFrom: number, countTo: number, countDecimals: number, countDuration: number, callback: any) {\n const startVal = Number(countFrom);\n const endVal = Number(countTo);\n const countDown = startVal > endVal;\n const decimals = Math.max(0, countDecimals);\n const dec = Math.pow(10, decimals);\n const duration = Number(countDuration) * 1000;\n let startTime;\n\n function runCount(timestamp: number) {\n let frameVal;\n const progress = timestamp - startTime;\n\n if (countDown) {\n frameVal = startVal - easeOutExpo(progress, 0, startVal - endVal, duration);\n } else {\n frameVal = easeOutExpo(progress, startVal, endVal - startVal, duration);\n }\n\n if (countDown) {\n frameVal = frameVal < endVal ? endVal : frameVal;\n } else {\n frameVal = frameVal > endVal ? endVal : frameVal;\n }\n\n frameVal = Math.round(frameVal * dec) / dec;\n\n const tick = progress < duration;\n callback({\n value: frameVal,\n progress,\n timestamp,\n finished: !tick\n });\n\n if (tick) {\n return requestAnimationFrame(val => runCount(val));\n }\n }\n\n return requestAnimationFrame(timestamp => {\n startTime = timestamp;\n return runCount(timestamp);\n });\n}\n\n/**\n * Determine decimals places\n *\n * @export\n */\nexport function decimalChecker(countTo: number): number {\n const endVal = Number(countTo);\n\n if (endVal % 1 !== 0 && Math.abs(endVal) <= 10) {\n return 2;\n }\n\n return 0;\n}\n","import { Component, Input, Output, EventEmitter, ChangeDetectorRef, OnDestroy, ElementRef } from '@angular/core';\nimport { count, decimalChecker } from './count.helper';\n\n/**\n * Count up component\n *\n * Loosely inspired by:\n * - https://github.com/izupet/angular2-counto\n * - https://inorganik.github.io/countUp.js/\n *\n * @export\n */\n@Component({\n selector: '[ngx-charts-count-up]',\n template: ` {{ value }} `\n})\nexport class CountUpDirective implements OnDestroy {\n @Input() countDuration: number = 1;\n @Input() countPrefix: string = '';\n @Input() countSuffix: string = '';\n @Input() valueFormatting: any;\n\n @Input()\n set countDecimals(val: number) {\n this._countDecimals = val;\n }\n\n get countDecimals(): number {\n if (this._countDecimals) return this._countDecimals;\n return decimalChecker(this.countTo);\n }\n\n @Input()\n set countTo(val) {\n this._countTo = parseFloat(val);\n this.start();\n }\n\n get countTo(): any {\n return this._countTo;\n }\n\n @Input()\n set countFrom(val) {\n this._countFrom = parseFloat(val);\n this.start();\n }\n\n get countFrom(): any {\n return this._countFrom;\n }\n\n @Output() countChange = new EventEmitter();\n @Output() countFinish = new EventEmitter();\n\n nativeElement: any;\n\n value: any = '';\n formattedValue: string;\n\n private animationReq: any;\n\n private _countDecimals: number = 0;\n private _countTo: number = 0;\n private _countFrom: number = 0;\n\n constructor(private cd: ChangeDetectorRef, element: ElementRef) {\n this.nativeElement = element.nativeElement;\n }\n\n ngOnDestroy(): void {\n cancelAnimationFrame(this.animationReq);\n }\n\n start(): void {\n cancelAnimationFrame(this.animationReq);\n\n const valueFormatting =\n this.valueFormatting || (value => `${this.countPrefix}${value.toLocaleString()}${this.countSuffix}`);\n\n const callback = ({ value, progress, finished }) => {\n this.value = valueFormatting(value);\n this.cd.markForCheck();\n if (!finished) this.countChange.emit({ value: this.value, progress });\n if (finished) this.countFinish.emit({ value: this.value, progress });\n };\n\n this.animationReq = count(this.countFrom, this.countTo, this.countDecimals, this.countDuration, callback);\n }\n}\n","declare let global: any;\n\n// If we don't check whether 'window' and 'global' variables are defined,\n// code will fail in browser/node with 'variable is undefined' error.\nlet root: any;\nif (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n}\n\n// tslint:disable-next-line:variable-name\nexport const MouseEvent = root.MouseEvent as any & {\n prototype?: MouseEvent;\n new (typeArg: string, eventInitDict?: MouseEventInit): MouseEvent;\n};\n\nexport function createMouseEvent(name: string, bubbles: boolean = false, cancelable: boolean = true): MouseEvent {\n // Calling new of an event does not work correctly on IE. The following is a tested workaround\n // See https://stackoverflow.com/questions/27176983/dispatchevent-not-working-in-ie11\n if (typeof MouseEvent === 'function') {\n // Sane browsers\n return new MouseEvent(name, { bubbles, cancelable });\n } else {\n // IE\n const event = document.createEvent('MouseEvent');\n event.initEvent(name, bubbles, cancelable);\n return event;\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ViewChild,\n ChangeDetectionStrategy,\n TemplateRef,\n PLATFORM_ID,\n Inject\n} from '@angular/core';\nimport { trigger, style, animate, transition } from '@angular/animations';\nimport { createMouseEvent } from '../events';\nimport { isPlatformBrowser } from '@angular/common';\nimport { ColorHelper } from '../common/color.helper';\nimport { PlacementTypes } from './tooltip/position';\nimport { StyleTypes } from './tooltip/style.type';\nimport { ViewDimensions } from './types/view-dimension.interface';\nimport { ScaleType } from './types/scale-type.enum';\n\nexport interface Tooltip {\n color: string;\n d0: number;\n d1: number;\n max: number;\n min: number;\n name: any;\n series: any;\n value: any;\n}\n\n@Component({\n selector: 'g[ngx-charts-tooltip-area]',\n template: `\n <svg:g>\n <svg:rect\n class=\"tooltip-area\"\n [attr.x]=\"0\"\n y=\"0\"\n [attr.width]=\"dims.width\"\n [attr.height]=\"dims.height\"\n style=\"opacity: 0; cursor: 'auto';\"\n (mousemove)=\"mouseMove($event)\"\n (mouseleave)=\"hideTooltip()\"\n />\n <ng-template #defaultTooltipTemplate let-model=\"model\">\n <xhtml:div class=\"area-tooltip-container\">\n <xhtml:div *ngFor=\"let tooltipItem of model\" class=\"tooltip-item\">\n <xhtml:span class=\"tooltip-item-color\" [style.background-color]=\"tooltipItem.color\"></xhtml:span>\n {{ getToolTipText(tooltipItem) }}\n </xhtml:div>\n </xhtml:div>\n </ng-template>\n <svg:rect\n #tooltipAnchor\n [@animationState]=\"anchorOpacity !== 0 ? 'active' : 'inactive'\"\n class=\"tooltip-anchor\"\n [attr.x]=\"anchorPos\"\n y=\"0\"\n [attr.width]=\"1\"\n [attr.height]=\"dims.height\"\n [style.opacity]=\"anchorOpacity\"\n [style.pointer-events]=\"'none'\"\n ngx-tooltip\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipPlacement]=\"placementTypes.Right\"\n [tooltipType]=\"styleTypes.tooltip\"\n [tooltipSpacing]=\"15\"\n [tooltipTemplate]=\"tooltipTemplate ? tooltipTemplate : defaultTooltipTemplate\"\n [tooltipContext]=\"anchorValues\"\n [tooltipImmediateExit]=\"true\"\n />\n </svg:g>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('animationState', [\n transition('inactive => active', [\n style({\n opacity: 0\n }),\n animate(250, style({ opacity: 0.7 }))\n ]),\n transition('active => inactive', [\n style({\n opacity: 0.7\n }),\n animate(250, style({ opacity: 0 }))\n ])\n ])\n ]\n})\nexport class TooltipArea {\n anchorOpacity: number = 0;\n anchorPos: number = -1;\n anchorValues: Tooltip[] = [];\n lastAnchorPos: number;\n\n placementTypes = PlacementTypes;\n styleTypes = StyleTypes;\n\n @Input() dims: ViewDimensions;\n @Input() xSet: any[];\n @Input() xScale;\n @Input() yScale;\n @Input() results: any[];\n @Input() colors: ColorHelper;\n @Input() showPercentage: boolean = false;\n @Input() tooltipDisabled: boolean = false;\n @Input() tooltipTemplate: TemplateRef<any>;\n\n @Output() hover: EventEmitter<{ value: any }> = new EventEmitter();\n\n @ViewChild('tooltipAnchor', { static: false }) tooltipAnchor;\n\n constructor(@Inject(PLATFORM_ID) private platformId: any) {}\n\n getValues(xVal): Tooltip[] {\n const results = [];\n\n for (const group of this.results) {\n const item = group.series.find(d => d.name.toString() === xVal.toString());\n let groupName = group.name;\n if (groupName instanceof Date) {\n groupName = groupName.toLocaleDateString();\n }\n\n if (item) {\n const label = item.name;\n let val = item.value;\n if (this.showPercentage) {\n val = (item.d1 - item.d0).toFixed(2) + '%';\n }\n let color;\n if (this.colors.scaleType === ScaleType.Linear) {\n let v = val;\n if (item.d1) {\n v = item.d1;\n }\n color = this.colors.getColor(v);\n } else {\n color = this.colors.getColor(group.name);\n }\n\n const data = Object.assign({}, item, {\n value: val,\n name: label,\n series: groupName,\n min: item.min,\n max: item.max,\n color\n });\n\n results.push(data);\n }\n }\n\n return results;\n }\n\n mouseMove(event) {\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n\n const xPos = event.pageX - event.target.getBoundingClientRect().left;\n\n const closestIndex = this.findClosestPointIndex(xPos);\n const closestPoint = this.xSet[closestIndex];\n this.anchorPos = this.xScale(closestPoint);\n this.anchorPos = Math.max(0, this.anchorPos);\n this.anchorPos = Math.min(this.dims.width, this.anchorPos);\n\n this.anchorValues = this.getValues(closestPoint);\n if (this.anchorPos !== this.lastAnchorPos) {\n const ev = createMouseEvent('mouseleave');\n this.tooltipAnchor.nativeElement.dispatchEvent(ev);\n this.anchorOpacity = 0.7;\n this.hover.emit({\n value: closestPoint\n });\n this.showTooltip();\n\n this.lastAnchorPos = this.anchorPos;\n }\n }\n\n findClosestPointIndex(xPos: number): number {\n let minIndex = 0;\n let maxIndex = this.xSet.length - 1;\n let minDiff = Number.MAX_VALUE;\n let closestIndex = 0;\n\n while (minIndex <= maxIndex) {\n const currentIndex = ((minIndex + maxIndex) / 2) | 0;\n const currentElement = this.xScale(this.xSet[currentIndex]);\n\n const curDiff = Math.abs(currentElement - xPos);\n\n if (curDiff < minDiff) {\n minDiff = curDiff;\n closestIndex = currentIndex;\n }\n\n if (currentElement < xPos) {\n minIndex = currentIndex + 1;\n } else if (currentElement > xPos) {\n maxIndex = currentIndex - 1;\n } else {\n minDiff = 0;\n closestIndex = currentIndex;\n break;\n }\n }\n\n return closestIndex;\n }\n\n showTooltip(): void {\n const event = createMouseEvent('mouseenter');\n this.tooltipAnchor.nativeElement.dispatchEvent(event);\n }\n\n hideTooltip(): void {\n const event = createMouseEvent('mouseleave');\n this.tooltipAnchor.nativeElement.dispatchEvent(event);\n this.anchorOpacity = 0;\n this.lastAnchorPos = -1;\n }\n\n getToolTipText(tooltipItem: Tooltip): string {\n let result: string = '';\n if (tooltipItem.series !== undefined) {\n result += tooltipItem.series;\n } else {\n result += '???';\n }\n result += ': ';\n if (tooltipItem.value !== undefined) {\n result += tooltipItem.value.toLocaleString();\n }\n if (tooltipItem.min !== undefined || tooltipItem.max !== undefined) {\n result += ' (';\n if (tooltipItem.min !== undefined) {\n if (tooltipItem.max === undefined) {\n result += '≥';\n }\n result += tooltipItem.min.toLocaleString();\n if (tooltipItem.max !== undefined) {\n result += ' - ';\n }\n } else if (tooltipItem.max !== undefined) {\n result += '≤';\n }\n if (tooltipItem.max !== undefined) {\n result += tooltipItem.max.toLocaleString();\n }\n result += ')';\n }\n return result;\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ElementRef,\n OnChanges,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n SimpleChanges,\n ViewEncapsulation,\n OnInit\n} from '@angular/core';\nimport { brushX } from 'd3-brush';\nimport { scaleLinear, scaleTime, scalePoint } from 'd3-scale';\nimport { select } from 'd3-selection';\nimport { id } from '../../utils/id';\nimport { ScaleType } from '../types/scale-type.enum';\nimport { ViewDimensions } from '../types/view-dimension.interface';\n\n@Component({\n selector: 'g[ngx-charts-timeline]',\n template: `\n <svg:g class=\"timeline\" [attr.transform]=\"transform\">\n <svg:filter [attr.id]=\"filterId\">\n <svg:feColorMatrix\n in=\"SourceGraphic\"\n type=\"matrix\"\n values=\"0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\"\n />\n </svg:filter>\n <svg:g class=\"embedded-chart\">\n <ng-content></ng-content>\n </svg:g>\n <svg:rect x=\"0\" [attr.width]=\"view[0]\" y=\"0\" [attr.height]=\"height\" class=\"brush-background\" />\n <svg:g class=\"brush\"></svg:g>\n </svg:g>\n `,\n styleUrls: ['./timeline.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class Timeline implements OnChanges {\n @Input() view: [number, number];\n @Input() results; // type this\n @Input() scheme; // type this\n @Input() customColors; // type this\n @Input() legend: boolean;\n @Input() autoScale: boolean;\n @Input() scaleType: ScaleType;\n @Input() height: number = 50;\n\n @Output() select = new EventEmitter();\n @Output() onDomainChange = new EventEmitter();\n\n element: HTMLElement;\n dims: ViewDimensions;\n xDomain: any[];\n xScale: any;\n brush: any;\n transform: string;\n initialized: boolean = false;\n filterId: string;\n filter: string;\n\n constructor(element: ElementRef, private cd: ChangeDetectorRef) {\n this.element = element.nativeElement;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.update();\n\n if (!this.initialized) {\n this.addBrush();\n this.initialized = true;\n }\n }\n\n update(): void {\n this.dims = this.getDims();\n this.height = this.dims.height;\n const offsetY = this.view[1] - this.height;\n\n this.xDomain = this.getXDomain();\n this.xScale = this.getXScale();\n\n if (this.brush) {\n this.updateBrush();\n }\n\n this.transform = `translate(0 , ${offsetY})`;\n\n this.filterId = 'filter' + id().toString();\n this.filter = `url(#${this.filterId})`;\n\n this.cd.markForCheck();\n }\n\n getXDomain(): any[] {\n let values = [];\n\n for (const results of this.results) {\n for (const d of results.series) {\n if (!values.includes(d.name)) {\n values.push(d.name);\n }\n }\n }\n\n let domain = [];\n if (this.scaleType === ScaleType.Time) {\n const min = Math.min(...values);\n const max = Math.max(...values);\n domain = [min, max];\n } else if (this.scaleType === ScaleType.Linear) {\n values = values.map(v => Number(v));\n const min = Math.min(...values);\n const max = Math.max(...values);\n domain = [min, max];\n } else {\n domain = values;\n }\n\n return domain;\n }\n\n getXScale() {\n let scale;\n\n if (this.scaleType === ScaleType.Time) {\n scale = scaleTime().range([0, this.dims.width]).domain(this.xDomain);\n } else if (this.scaleType === ScaleType.Linear) {\n scale = scaleLinear().range([0, this.dims.width]).domain(this.xDomain);\n } else if (this.scaleType === ScaleType.Ordinal) {\n scale = scalePoint().range([0, this.dims.width]).padding(0.1).domain(this.xDomain);\n }\n\n return scale;\n }\n\n addBrush(): void {\n if (this.brush) return;\n\n const height = this.height;\n const width = this.view[0];\n\n this.brush = brushX()\n .extent([\n [0, 0],\n [width, height]\n ])\n .on('brush end', ({ selection }) => {\n const newSelection = selection || this.xScale.range();\n const newDomain = newSelection.map(this.xScale.invert);\n\n this.onDomainChange.emit(newDomain);\n this.cd.markForCheck();\n });\n\n select(this.element).select('.brush').call(this.brush);\n }\n\n updateBrush(): void {\n if (!this.brush) return;\n\n const height = this.height;\n const width = this.view[0];\n\n this.brush.extent([\n [0, 0],\n [width, height]\n ]);\n select(this.element).select('.brush').call(this.brush);\n\n // clear hardcoded properties so they can be defined by CSS\n select(this.element)\n .select('.selection')\n .attr('fill', undefined)\n .attr('stroke', undefined)\n .attr('fill-opacity', undefined);\n\n this.cd.markForCheck();\n }\n\n getDims(): ViewDimensions {\n const width = this.view[0];\n\n const dims = {\n width,\n height: this.height\n };\n\n return dims;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n Output,\n SimpleChanges,\n ViewEncapsulation\n} from '@angular/core';\nimport { trimLabel } from '../trim-label.helper';\nimport { formatLabel } from '../label.helper';\nimport { DataItem, StringOrNumberOrDate } from '../../models/chart-data.model';\nimport { ColorHelper } from '../color.helper';\n\nexport interface AdvancedLegendItem {\n value: StringOrNumberOrDate;\n _value: StringOrNumberOrDate;\n color: string;\n data: DataItem;\n label: string;\n displayLabel: string;\n originalLabel: string;\n percentage: string;\n}\n\n@Component({\n selector: 'ngx-charts-advanced-legend',\n template: `\n <div class=\"advanced-pie-legend\" [style.width.px]=\"width\">\n <div\n *ngIf=\"animations\"\n class=\"total-value\"\n ngx-charts-count-up\n [countTo]=\"roundedTotal\"\n [valueFormatting]=\"valueFormatting\"\n ></div>\n <div class=\"total-value\" *ngIf=\"!animations\">\n {{ valueFormatting ? valueFormatting(roundedTotal) : defaultValueFormatting(roundedTotal) }}\n </div>\n <div class=\"total-label\">\n {{ label }}\n </div>\n <div class=\"legend-items-container\">\n <div class=\"legend-items\">\n <div\n *ngFor=\"let legendItem of legendItems; trackBy: trackBy\"\n tabindex=\"-1\"\n class=\"legend-item\"\n (mouseenter)=\"activate.emit(legendItem.data)\"\n (mouseleave)=\"deactivate.emit(legendItem.data)\"\n (click)=\"select.emit(legendItem.data)\"\n >\n <div class=\"item-color\" [style.border-left-color]=\"legendItem.color\"></div>\n <div\n *ngIf=\"animations\"\n class=\"item-value\"\n ngx-charts-count-up\n [countTo]=\"legendItem._value\"\n [valueFormatting]=\"valueFormatting\"\n ></div>\n <div *ngIf=\"!animations\" class=\"item-value\">\n {{ valueFormatting ? valueFormatting(legendItem.value) : defaultValueFormatting(legendItem.value) }}\n </div>\n <div class=\"item-label\">{{ legendItem.displayLabel }}</div>\n <div\n *ngIf=\"animations\"\n class=\"item-percent\"\n ngx-charts-count-up\n [countTo]=\"legendItem.percentage\"\n [countSuffix]=\"'%'\"\n ></div>\n <div *ngIf=\"!animations\" class=\"item-percent\">{{ legendItem.percentage.toLocaleString() }}%</div>\n </div>\n </div>\n </div>\n </div>\n `,\n styleUrls: ['./advanced-legend.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class AdvancedLegendComponent implements OnChanges {\n @Input() width: number;\n @Input() data: DataItem[];\n @Input() colors: ColorHelper;\n @Input() label: string = 'Total';\n @Input() animations: boolean = true;\n\n @Output() select: EventEmitter<DataItem> = new EventEmitter();\n @Output() activate: EventEmitter<DataItem> = new EventEmitter();\n @Output() deactivate: EventEmitter<DataItem> = new EventEmitter();\n\n legendItems: AdvancedLegendItem[] = [];\n total: number;\n roundedTotal: number;\n\n @Input() valueFormatting: (value: StringOrNumberOrDate) => any;\n @Input() labelFormatting: (value: string) => string = label => label;\n @Input() percentageFormatting: (value: number) => number = percentage => percentage;\n\n defaultValueFormatting: (value: StringOrNumberOrDate) => string = value => value.toLocaleString();\n\n ngOnChanges(changes: SimpleChanges): void {\n this.update();\n }\n\n getTotal(): number {\n return this.data.map(d => Number(d.value)).reduce((sum, d) => sum + d, 0);\n }\n\n update(): void {\n this.total = this.getTotal();\n this.roundedTotal = this.total;\n\n this.legendItems = this.getLegendItems();\n }\n\n getLegendItems(): AdvancedLegendItem[] {\n return (this.data as any).map(d => {\n const label = formatLabel(d.name);\n const value = d.value;\n const color = this.colors.getColor(label);\n const percentage = this.total > 0 ? (value / this.total) * 100 : 0;\n const formattedLabel = typeof this.labelFormatting === 'function' ? this.labelFormatting(label) : label;\n\n return {\n _value: value,\n data: d,\n value,\n color,\n label: formattedLabel,\n displayLabel: trimLabel(formattedLabel, 20),\n origialLabel: d.name,\n percentage: this.percentageFormatting ? this.percentageFormatting(percentage) : percentage.toLocaleString()\n };\n });\n }\n\n trackBy(index: number, item: AdvancedLegendItem) {\n return item.label;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { ChartComponent } from './charts/chart.component';\nimport { BaseChartComponent } from './base-chart.component';\nimport { AxesModule } from './axes/axes.module';\nimport { TooltipModule } from './tooltip/tooltip.module';\nimport { CircleSeriesComponent } from './circle-series.component';\nimport { CircleComponent } from './circle.component';\nimport { GridPanelComponent } from './grid-panel.component';\nimport { GridPanelSeriesComponent } from './grid-panel-series.component';\nimport { SvgLinearGradientComponent } from './svg-linear-gradient.component';\nimport { SvgRadialGradientComponent } from './svg-radial-gradient.component';\nimport { AreaComponent } from './area.component';\nimport { CountUpDirective } from './count/count.directive';\nimport { TooltipArea } from './tooltip-area.component';\nimport { Timeline } from './timeline/timeline.component';\nimport { VisibilityObserver } from '../utils/visibility-observer';\nimport { LegendComponent } from './legend/legend.component';\nimport { LegendEntryComponent } from './legend/legend-entry.component';\nimport { ScaleLegendComponent } from './legend/scale-legend.component';\nimport { AdvancedLegendComponent } from './legend/advanced-legend.component';\n\nconst COMPONENTS = [\n AreaComponent,\n BaseChartComponent,\n CountUpDirective,\n TooltipArea,\n ChartComponent,\n LegendComponent,\n LegendEntryComponent,\n ScaleLegendComponent,\n CircleComponent,\n CircleSeriesComponent,\n GridPanelComponent,\n GridPanelSeriesComponent,\n SvgLinearGradientComponent,\n SvgRadialGradientComponent,\n Timeline,\n AdvancedLegendComponent\n];\n\n@NgModule({\n imports: [CommonModule, AxesModule, TooltipModule],\n declarations: [...COMPONENTS, VisibilityObserver],\n exports: [CommonModule, AxesModule, TooltipModule, ...COMPONENTS, VisibilityObserver]\n})\nexport class ChartCommonModule {}\n","import { LegendPosition } from './types/legend.model';\nimport { ScaleType } from './types/scale-type.enum';\nimport { ViewDimensions } from './types/view-dimension.interface';\n\nexport function calculateViewDimensions({\n width,\n height,\n margins,\n showXAxis = false,\n showYAxis = false,\n xAxisHeight = 0,\n yAxisWidth = 0,\n showXLabel = false,\n showYLabel = false,\n showLegend = false,\n legendType = ScaleType.Ordinal,\n legendPosition = LegendPosition.Right,\n columns = 12\n}): ViewDimensions {\n let xOffset = margins[3];\n let chartWidth = width;\n let chartHeight = height - margins[0] - margins[2];\n\n if (showLegend && legendPosition === LegendPosition.Right) {\n if (legendType === ScaleType.Ordinal) {\n columns -= 2;\n } else {\n columns -= 1;\n }\n }\n\n chartWidth = (chartWidth * columns) / 12;\n\n chartWidth = chartWidth - margins[1] - margins[3];\n\n if (showXAxis) {\n chartHeight -= 5;\n chartHeight -= xAxisHeight;\n\n if (showXLabel) {\n // text height + spacing between axis label and tick labels\n const offset = 25 + 5;\n chartHeight -= offset;\n }\n }\n\n if (showYAxis) {\n chartWidth -= 5;\n chartWidth -= yAxisWidth;\n xOffset += yAxisWidth;\n xOffset += 10;\n\n if (showYLabel) {\n // text height + spacing between axis label and tick labels\n const offset = 25 + 5;\n chartWidth -= offset;\n xOffset += offset;\n }\n }\n\n chartWidth = Math.max(0, chartWidth);\n chartHeight = Math.max(0, chartHeight);\n\n return {\n width: Math.floor(chartWidth),\n height: Math.floor(chartHeight),\n xOffset: Math.floor(xOffset)\n };\n}\n","import { ScaleType } from '../common/types/scale-type.enum';\n\nexport interface Color {\n name: string;\n selectable: boolean;\n group: ScaleType;\n domain: string[];\n}\n\nexport const colorSets: Color[] = [\n {\n name: 'vivid',\n selectable: true,\n group: ScaleType.Ordinal,\n domain: [\n '#647c8a',\n '#3f51b5',\n '#2196f3',\n '#00b862',\n '#afdf0a',\n '#a7b61a',\n '#f3e562',\n '#ff9800',\n '#ff5722',\n '#ff4514'\n ]\n },\n {\n name: 'natural',\n selectable: true,\n group: ScaleType.Ordinal,\n domain: [\n '#bf9d76',\n '#e99450',\n '#d89f59',\n '#f2dfa7',\n '#a5d7c6',\n '#7794b1',\n '#afafaf',\n '#707160',\n '#ba9383',\n '#d9d5c3'\n ]\n },\n {\n name: 'cool',\n selectable: true,\n group: ScaleType.Ordinal,\n domain: [\n '#a8385d',\n '#7aa3e5',\n '#a27ea8',\n '#aae3f5',\n '#adcded',\n '#a95963',\n '#8796c0',\n '#7ed3ed',\n '#50abcc',\n '#ad6886'\n ]\n },\n {\n name: 'fire',\n selectable: true,\n group: ScaleType.Ordinal,\n domain: ['#ff3d00', '#bf360c', '#ff8f00', '#ff6f00', '#ff5722', '#e65100', '#ffca28', '#ffab00']\n },\n {\n name: 'solar',\n selectable: true,\n group: ScaleType.Linear,\n domain: [\n '#fff8e1',\n '#ffecb3',\n '#ffe082',\n '#ffd54f',\n '#ffca28',\n '#ffc107',\n '#ffb300',\n '#ffa000',\n '#ff8f00',\n '#ff6f00'\n ]\n },\n {\n name: 'air',\n selectable: true,\n group: ScaleType.Linear,\n domain: [\n '#e1f5fe',\n '#b3e5fc',\n '#81d4fa',\n '#4fc3f7',\n '#29b6f6',\n '#03a9f4',\n '#039be5',\n '#0288d1',\n '#0277bd',\n '#01579b'\n ]\n },\n {\n name: 'aqua',\n selectable: true,\n group: ScaleType.Linear,\n domain: [\n '#e0f7fa',\n '#b2ebf2',\n '#80deea',\n '#4dd0e1',\n '#26c6da',\n '#00bcd4',\n '#00acc1',\n '#0097a7',\n '#00838f',\n '#006064'\n ]\n },\n {\n name: 'flame',\n selectable: false,\n group: ScaleType.Ordinal,\n domain: [\n '#A10A28',\n '#D3342D',\n '#EF6D49',\n '#FAAD67',\n '#FDDE90',\n '#DBED91',\n '#A9D770',\n '#6CBA67',\n '#2C9653',\n '#146738'\n ]\n },\n {\n name: 'ocean',\n selectable: false,\n group: ScaleType.Ordinal,\n domain: [\n '#1D68FB',\n '#33C0FC',\n '#4AFFFE',\n '#AFFFFF',\n '#FFFC63',\n '#FDBD2D',\n '#FC8A25',\n '#FA4F1E',\n '#FA141B',\n '#BA38D1'\n ]\n },\n {\n name: 'forest',\n selectable: false,\n group: ScaleType.Ordinal,\n domain: [\n '#55C22D',\n '#C1F33D',\n '#3CC099',\n '#AFFFFF',\n '#8CFC9D',\n '#76CFFA',\n '#BA60FB',\n '#EE6490',\n '#C42A1C',\n '#FC9F32'\n ]\n },\n {\n name: 'horizon',\n selectable: false,\n group: ScaleType.Ordinal,\n domain: [\n '#2597FB',\n '#65EBFD',\n '#99FDD0',\n '#FCEE4B',\n '#FEFCFA',\n '#FDD6E3',\n '#FCB1A8',\n '#EF6F7B',\n '#CB96E8',\n '#EFDEE0'\n ]\n },\n {\n name: 'neons',\n selectable: false,\n group: ScaleType.Ordinal,\n domain: [\n '#FF3333',\n '#FF33FF',\n '#CC33FF',\n '#0000FF',\n '#33CCFF',\n '#33FFFF',\n '#33FF66',\n '#CCFF33',\n '#FFCC00',\n '#FF6600'\n ]\n },\n {\n name: 'picnic',\n selectable: false,\n group: ScaleType.Ordinal,\n domain: [\n '#FAC51D',\n '#66BD6D',\n '#FAA026',\n '#29BB9C',\n '#E96B56',\n '#55ACD2',\n '#B7332F',\n '#2C83C9',\n '#9166B8',\n '#92E7E8'\n ]\n },\n {\n name: 'night',\n selectable: false,\n group: ScaleType.Ordinal,\n domain: [\n '#2B1B5A',\n '#501356',\n '#183356',\n '#28203F',\n '#391B3C',\n '#1E2B3C',\n '#120634',\n '#2D0432',\n '#051932',\n '#453080',\n '#75267D',\n '#2C507D',\n '#4B3880',\n '#752F7D',\n '#35547D'\n ]\n },\n {\n name: 'nightLights',\n selectable: false,\n group: ScaleType.Ordinal,\n domain: [\n '#4e31a5',\n '#9c25a7',\n '#3065ab',\n '#57468b',\n '#904497',\n '#46648b',\n '#32118d',\n '#a00fb3',\n '#1052a2',\n '#6e51bd',\n '#b63cc3',\n '#6c97cb',\n '#8671c1',\n '#b455be',\n '#7496c3'\n ]\n }\n];\n","import { range } from 'd3-array';\nimport {\n scaleBand,\n ScaleLinear,\n scaleLinear,\n ScaleOrdinal,\n scaleOrdinal,\n ScaleQuantile,\n scaleQuantile\n} from 'd3-scale';\n\nimport { Color, colorSets } from '../utils/color-sets';\nimport { StringOrNumberOrDate } from '../models/chart-data.model';\nimport { ScaleType } from './types/scale-type.enum';\nimport { Gradient } from './types/gradient.interface';\n\nexport class ColorHelper {\n scale: any;\n scaleType: ScaleType;\n colorDomain: string[];\n domain: number[] | string[];\n customColors: any;\n\n constructor(scheme: string | Color, type: ScaleType, domain: number[] | string[], customColors?) {\n if (typeof scheme === 'string') {\n scheme = colorSets.find(cs => {\n return cs.name === scheme;\n });\n }\n this.colorDomain = scheme.domain;\n this.scaleType = type;\n this.domain = domain;\n this.customColors = customColors;\n\n this.scale = this.generateColorScheme(scheme, type, this.domain);\n }\n\n generateColorScheme(scheme: string | Color, type: ScaleType, domain: number[] | string[]): any {\n if (typeof scheme === 'string') {\n scheme = colorSets.find(cs => {\n return cs.name === scheme;\n });\n }\n\n let colorScale: ScaleQuantile<number> | ScaleOrdinal<string, unknown> | ScaleLinear<number, number>;\n switch (type) {\n case ScaleType.Quantile:\n colorScale = scaleQuantile()\n .range(scheme.domain as any)\n .domain(domain as number[]);\n break;\n case ScaleType.Ordinal:\n colorScale = scaleOrdinal()\n .range(scheme.domain)\n .domain(domain as string[]);\n break;\n case ScaleType.Linear:\n {\n const colorDomain = [...scheme.domain];\n if (colorDomain.length === 1) {\n colorDomain.push(colorDomain[0]);\n this.colorDomain = colorDomain;\n }\n\n const points = range(0, 1, 1.0 / colorDomain.length);\n colorScale = scaleLinear()\n .range(colorDomain as any)\n .domain(points);\n }\n break;\n default:\n break;\n }\n\n return colorScale;\n }\n\n getColor(value: StringOrNumberOrDate): string {\n if (value === undefined || value === null) {\n throw new Error('Value can not be null');\n }\n if (this.scaleType === ScaleType.Linear) {\n const valueScale = scaleLinear()\n .domain(this.domain as number[])\n .range([0, 1]);\n\n return this.scale(valueScale(value as number));\n } else {\n if (typeof this.customColors === 'function') {\n return this.customColors(value);\n }\n\n const formattedValue = value.toString();\n let found: any; // todo type customColors\n if (this.customColors && this.customColors.length > 0) {\n found = this.customColors.find(mapping => {\n return mapping.name.toLowerCase() === formattedValue.toLowerCase();\n });\n }\n\n if (found) {\n return found.value;\n } else {\n return this.scale(value);\n }\n }\n }\n\n getLinearGradientStops(value: number | string, start?: number | string): Gradient[] {\n if (start === undefined) {\n start = this.domain[0];\n }\n const valueScale = scaleLinear()\n .domain(this.domain as number[])\n .range([0, 1]);\n\n const colorValueScale = scaleBand().domain(this.colorDomain).range([0, 1]);\n\n const endColor = this.getColor(value);\n\n // generate the stops\n const startVal = valueScale(start as number);\n const startColor = this.getColor(start);\n\n const endVal = valueScale(value as number);\n let i = 1;\n let currentVal = startVal;\n const stops: Gradient[] = [];\n\n stops.push({\n color: startColor,\n offset: startVal,\n originalOffset: startVal,\n opacity: 1\n });\n\n while (currentVal < endVal && i < this.colorDomain.length) {\n const color = this.colorDomain[i];\n const offset = colorValueScale(color);\n if (offset <= startVal) {\n i++;\n continue;\n }\n\n if (offset.toFixed(4) >= (endVal - colorValueScale.bandwidth()).toFixed(4)) {\n break;\n }\n\n stops.push({\n color,\n offset,\n opacity: 1\n });\n currentVal = offset;\n i++;\n }\n\n if (stops[stops.length - 1].offset < 100) {\n stops.push({\n color: endColor,\n offset: endVal,\n opacity: 1\n });\n }\n\n if (endVal === startVal) {\n stops[0].offset = 0;\n stops[1].offset = 100;\n } else {\n // normalize the offsets into percentages\n if (stops[stops.length - 1].offset !== 100) {\n for (const s of stops) {\n s.offset = ((s.offset - startVal) / (endVal - startVal)) * 100;\n }\n }\n }\n\n return stops;\n }\n}\n","import { ScaleType } from './types/scale-type.enum';\nimport { StringOrNumberOrDate } from '../models/chart-data.model';\n/**\n * Based on the data, return an array with unique values.\n *\n * @export\n * @returns array\n */\nexport function getUniqueXDomainValues(results: any[]): any[] {\n const valueSet = new Set();\n for (const result of results) {\n for (const d of result.series) {\n valueSet.add(d.name);\n }\n }\n return Array.from(valueSet);\n}\n\n/**\n * Get the scaleType of enumerable of values.\n * @returns 'time', 'linear' or 'ordinal'\n */\nexport function getScaleType(values: any[], checkDateType: boolean = true): ScaleType {\n if (checkDateType) {\n const allDates = values.every(value => value instanceof Date);\n if (allDates) {\n return ScaleType.Time;\n }\n }\n\n const allNumbers = values.every(value => typeof value === 'number');\n if (allNumbers) {\n return ScaleType.Linear;\n }\n\n return ScaleType.Ordinal;\n}\n\nexport function getXDomainArray(\n values: Array<string | number | Date>,\n xScaleMin?: number,\n xScaleMax?: number\n): { domain: any[]; xSet: any[]; scaleType: string } {\n const scaleType = getScaleType(values);\n let xSet: StringOrNumberOrDate[] = [];\n let domain: StringOrNumberOrDate[] = [];\n\n if (scaleType === ScaleType.Linear) {\n values = values.map(v => Number(v));\n }\n\n let min: number;\n let max: number;\n if (scaleType === ScaleType.Time || scaleType === ScaleType.Linear) {\n const mappedValues = values.map(v => Number(v));\n min = xScaleMin ? xScaleMin : Math.min(...mappedValues);\n max = xScaleMax ? xScaleMax : Math.max(...mappedValues);\n }\n\n if (scaleType === ScaleType.Time) {\n domain = [new Date(min), new Date(max)];\n xSet = [...values].sort((a: Date, b: Date) => {\n const aDate = a.getTime();\n const bDate = b.getTime();\n if (aDate > bDate) return 1;\n if (bDate > aDate) return -1;\n return 0;\n });\n } else if (scaleType === ScaleType.Linear) {\n domain = [min, max];\n // Use compare function to sort numbers numerically\n xSet = [...values].sort((a: number, b: number) => a - b);\n } else {\n domain = values;\n xSet = values;\n }\n\n return { domain, xSet, scaleType };\n}\n","export function sortLinear(data, property: string, direction = 'asc'): any[] {\n return data.sort((a, b) => {\n if (direction === 'asc') {\n return a[property] - b[property];\n } else {\n return b[property] - a[property];\n }\n });\n}\n\nexport function sortByDomain(data, property: string, direction = 'asc', domain): any[] {\n return data.sort((a, b) => {\n const aVal = a[property];\n const bVal = b[property];\n\n const aIdx = domain.indexOf(aVal);\n const bIdx = domain.indexOf(bVal);\n\n if (direction === 'asc') {\n return aIdx - bIdx;\n } else {\n return bIdx - aIdx;\n }\n });\n}\n\nexport function sortByTime(data, property: string, direction = 'asc'): any[] {\n return data.sort((a, b) => {\n const aDate = a[property].getTime();\n const bDate = b[property].getTime();\n\n if (direction === 'asc') {\n if (aDate > bDate) return 1;\n if (bDate > aDate) return -1;\n return 0;\n } else {\n if (aDate > bDate) return -1;\n if (bDate > aDate) return 1;\n return 0;\n }\n });\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n OnChanges,\n SimpleChanges,\n ChangeDetectionStrategy\n} from '@angular/core';\nimport { area } from 'd3-shape';\nimport { ColorHelper } from '../common/color.helper';\nimport { Gradient } from '../common/types/gradient.interface';\nimport { ScaleType } from '../common/types/scale-type.enum';\nimport { AreaChartSeries } from '../models/chart-data.model';\nimport { sortLinear, sortByTime, sortByDomain } from '../utils/sort';\n\n@Component({\n selector: 'g[ngx-charts-area-series]',\n template: `\n <svg:g\n ngx-charts-area\n class=\"area-series\"\n [data]=\"data\"\n [path]=\"path\"\n [fill]=\"colors.getColor(data.name)\"\n [stops]=\"gradientStops\"\n [startingPath]=\"startingPath\"\n [opacity]=\"opacity\"\n [gradient]=\"gradient || hasGradient\"\n [animations]=\"animations\"\n [class.active]=\"isActive(data)\"\n [class.inactive]=\"isInactive(data)\"\n />\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class AreaSeriesComponent implements OnChanges {\n @Input() data: AreaChartSeries;\n @Input() xScale: any;\n @Input() yScale: any;\n @Input() baseValue: any = 'auto';\n @Input() colors: ColorHelper;\n @Input() scaleType: ScaleType;\n @Input() stacked: boolean = false;\n @Input() normalized: boolean = false;\n @Input() gradient: boolean;\n @Input() curve: any;\n @Input() activeEntries: any[];\n @Input() animations: boolean = true;\n\n @Output() select = new EventEmitter();\n\n opacity: number;\n path: string;\n startingPath: string;\n\n hasGradient: boolean;\n gradientStops: Gradient[];\n\n ngOnChanges(changes: SimpleChanges): void {\n this.update();\n }\n\n update(): void {\n this.updateGradient();\n\n let currentArea;\n let startingArea;\n\n const xProperty = d => {\n const label = d.name;\n return this.xScale(label);\n };\n\n if (this.stacked || this.normalized) {\n currentArea = area<any>()\n .x(xProperty)\n .y0((d, i) => this.yScale(d.d0))\n .y1((d, i) => this.yScale(d.d1));\n\n startingArea = area<any>()\n .x(xProperty)\n .y0(d => this.yScale.range()[0])\n .y1(d => this.yScale.range()[0]);\n } else {\n currentArea = area<any>()\n .x(xProperty)\n .y0(() => (this.baseValue === 'auto' ? this.yScale.range()[0] : this.yScale(this.baseValue)))\n .y1(d => this.yScale(d.value));\n\n startingArea = area<any>()\n .x(xProperty)\n .y0(d => (this.baseValue === 'auto' ? this.yScale.range()[0] : this.yScale(this.baseValue)))\n .y1(d => (this.baseValue === 'auto' ? this.yScale.range()[0] : this.yScale(this.baseValue)));\n }\n\n currentArea.curve(this.curve);\n startingArea.curve(this.curve);\n\n this.opacity = 0.8;\n\n let data = this.data.series;\n if (this.scaleType === ScaleType.Linear) {\n data = sortLinear(data, 'name');\n } else if (this.scaleType === ScaleType.Time) {\n data = sortByTime(data, 'name');\n } else {\n data = sortByDomain(data, 'name', 'asc', this.xScale.domain());\n }\n\n this.path = currentArea(data);\n this.startingPath = startingArea(data);\n }\n\n updateGradient() {\n if (this.colors.scaleType === ScaleType.Linear) {\n this.hasGradient = true;\n if (this.stacked || this.normalized) {\n const d0values = this.data.series.map(d => d.d0);\n const d1values = this.data.series.map(d => d.d1);\n const max = Math.max(...d1values);\n const min = Math.min(...d0values);\n this.gradientStops = this.colors.getLinearGradientStops(max, min);\n } else {\n const values = this.data.series.map(d => d.value);\n const max = Math.max(...values);\n this.gradientStops = this.colors.getLinearGradientStops(max);\n }\n } else {\n this.hasGradient = false;\n this.gradientStops = undefined;\n }\n }\n\n isActive(entry): boolean {\n if (!this.activeEntries) return false;\n const item = this.activeEntries.find(d => {\n return entry.name === d.name;\n });\n return item !== undefined;\n }\n\n isInactive(entry): boolean {\n if (!this.activeEntries || this.activeEntries.length === 0) return false;\n const item = this.activeEntries.find(d => {\n return entry.name === d.name;\n });\n return item === undefined;\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ViewEncapsulation,\n HostListener,\n ChangeDetectionStrategy,\n ContentChild,\n TemplateRef,\n TrackByFunction\n} from '@angular/core';\nimport { scaleLinear, scalePoint, scaleTime } from 'd3-scale';\nimport { CurveFactory, curveLinear } from 'd3-shape';\n\nimport { calculateViewDimensions } from '../common/view-dimensions.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { BaseChartComponent } from '../common/base-chart.component';\nimport { id } from '../utils/id';\nimport { getUniqueXDomainValues, getScaleType } from '../common/domain.helper';\nimport { isDate, isNumber } from '../utils/types';\nimport { Series } from '../models/chart-data.model';\nimport { LegendOptions, LegendPosition } from '../common/types/legend.model';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\nimport { ScaleType } from '../common/types/scale-type.enum';\n\n@Component({\n selector: 'ngx-charts-area-chart',\n template: `\n <ngx-charts-chart\n [view]=\"[width, height]\"\n [showLegend]=\"legend\"\n [legendOptions]=\"legendOptions\"\n [activeEntries]=\"activeEntries\"\n [animations]=\"animations\"\n (legendLabelClick)=\"onClick($event)\"\n (legendLabelActivate)=\"onActivate($event)\"\n (legendLabelDeactivate)=\"onDeactivate($event)\"\n >\n <svg:defs>\n <svg:clipPath [attr.id]=\"clipPathId\">\n <svg:rect\n [attr.width]=\"dims.width + 10\"\n [attr.height]=\"dims.height + 10\"\n [attr.transform]=\"'translate(-5, -5)'\"\n />\n </svg:clipPath>\n </svg:defs>\n <svg:g [attr.transform]=\"transform\" class=\"area-chart chart\">\n <svg:g\n ngx-charts-x-axis\n *ngIf=\"xAxis\"\n [xScale]=\"xScale\"\n [dims]=\"dims\"\n [showGridLines]=\"showGridLines\"\n [showLabel]=\"showXAxisLabel\"\n [labelText]=\"xAxisLabel\"\n [trimTicks]=\"trimXAxisTicks\"\n [rotateTicks]=\"rotateXAxisTicks\"\n [maxTickLength]=\"maxXAxisTickLength\"\n [tickFormatting]=\"xAxisTickFormatting\"\n [ticks]=\"xAxisTicks\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateXAxisHeight($event)\"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf=\"yAxis\"\n [yScale]=\"yScale\"\n [dims]=\"dims\"\n [showGridLines]=\"showGridLines\"\n [showLabel]=\"showYAxisLabel\"\n [labelText]=\"yAxisLabel\"\n [trimTicks]=\"trimYAxisTicks\"\n [maxTickLength]=\"maxYAxisTickLength\"\n [tickFormatting]=\"yAxisTickFormatting\"\n [ticks]=\"yAxisTicks\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateYAxisWidth($event)\"\n ></svg:g>\n <svg:g [attr.clip-path]=\"clipPath\">\n <svg:g *ngFor=\"let series of results; trackBy: trackBy\">\n <svg:g\n ngx-charts-area-series\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [baseValue]=\"baseValue\"\n [colors]=\"colors\"\n [data]=\"series\"\n [activeEntries]=\"activeEntries\"\n [scaleType]=\"scaleType\"\n [gradient]=\"gradient\"\n [curve]=\"curve\"\n [animations]=\"animations\"\n />\n </svg:g>\n\n <svg:g *ngIf=\"!tooltipDisabled\" (mouseleave)=\"hideCircles()\">\n <svg:g\n ngx-charts-tooltip-area\n [dims]=\"dims\"\n [xSet]=\"xSet\"\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [results]=\"results\"\n [colors]=\"colors\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"seriesTooltipTemplate\"\n (hover)=\"updateHoveredVertical($event)\"\n />\n\n <svg:g *ngFor=\"let series of results\">\n <svg:g\n ngx-charts-circle-series\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [colors]=\"colors\"\n [activeEntries]=\"activeEntries\"\n [data]=\"series\"\n [scaleType]=\"scaleType\"\n [visibleValue]=\"hoveredVertical\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n (select)=\"onClick($event, series)\"\n (activate)=\"onActivate($event)\"\n (deactivate)=\"onDeactivate($event)\"\n />\n </svg:g>\n </svg:g>\n </svg:g>\n </svg:g>\n <svg:g\n ngx-charts-timeline\n *ngIf=\"timeline && scaleType != 'ordinal'\"\n [attr.transform]=\"timelineTransform\"\n [results]=\"results\"\n [view]=\"[timelineWidth, height]\"\n [height]=\"timelineHeight\"\n [scheme]=\"scheme\"\n [customColors]=\"customColors\"\n [legend]=\"legend\"\n [scaleType]=\"scaleType\"\n (onDomainChange)=\"updateDomain($event)\"\n >\n <svg:g *ngFor=\"let series of results; trackBy: trackBy\">\n <svg:g\n ngx-charts-area-series\n [xScale]=\"timelineXScale\"\n [yScale]=\"timelineYScale\"\n [baseValue]=\"baseValue\"\n [colors]=\"colors\"\n [data]=\"series\"\n [scaleType]=\"scaleType\"\n [gradient]=\"gradient\"\n [curve]=\"curve\"\n [animations]=\"animations\"\n />\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrls: ['../common/base-chart.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class AreaChartComponent extends BaseChartComponent {\n @Input() legend: boolean = false;\n @Input() legendTitle: string = 'Legend';\n @Input() legendPosition: LegendPosition = LegendPosition.Right;\n @Input() xAxis: boolean = false;\n @Input() yAxis: boolean = false;\n @Input() baseValue: any = 'auto';\n @Input() autoScale: boolean = false;\n @Input() showXAxisLabel: boolean;\n @Input() showYAxisLabel: boolean;\n @Input() xAxisLabel: string;\n @Input() yAxisLabel: string;\n @Input() timeline: boolean = false;\n @Input() gradient: boolean;\n @Input() showGridLines: boolean = true;\n @Input() curve: CurveFactory = curveLinear;\n @Input() activeEntries: any[] = [];\n @Input() schemeType: ScaleType;\n @Input() trimXAxisTicks: boolean = true;\n @Input() trimYAxisTicks: boolean = true;\n @Input() rotateXAxisTicks: boolean = true;\n @Input() maxXAxisTickLength: number = 16;\n @Input() maxYAxisTickLength: number = 16;\n @Input() xAxisTickFormatting: any;\n @Input() yAxisTickFormatting: any;\n @Input() xAxisTicks: any[];\n @Input() yAxisTicks: any[];\n @Input() roundDomains: boolean = false;\n @Input() tooltipDisabled: boolean = false;\n @Input() xScaleMin: any;\n @Input() xScaleMax: any;\n @Input() yScaleMin: number;\n @Input() yScaleMax: number;\n @Input() wrapTicks = false;\n\n @Output() activate: EventEmitter<any> = new EventEmitter();\n @Output() deactivate: EventEmitter<any> = new EventEmitter();\n\n @ContentChild('tooltipTemplate') tooltipTemplate: TemplateRef<any>;\n @ContentChild('seriesTooltipTemplate') seriesTooltipTemplate: TemplateRef<any>;\n\n dims: ViewDimensions;\n xSet: any;\n xDomain: any[];\n yDomain: [number, number];\n seriesDomain: string[];\n xScale: any;\n yScale: any;\n transform: string;\n colors: ColorHelper;\n clipPathId: string;\n clipPath: string;\n scaleType: ScaleType;\n series: Series;\n margin: number[] = [10, 20, 10, 20];\n hoveredVertical: any; // the value of the x axis that is hovered over\n xAxisHeight: number = 0;\n yAxisWidth: number = 0;\n filteredDomain: any;\n legendOptions: LegendOptions;\n\n timelineWidth: number;\n timelineHeight: number = 50;\n timelineXScale: any;\n timelineYScale: any;\n timelineXDomain: any[];\n timelineTransform: any;\n timelinePadding: number = 10;\n\n update(): void {\n super.update();\n\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n\n if (this.timeline) {\n this.dims.height -= this.timelineHeight + this.margin[2] + this.timelinePadding;\n }\n\n this.xDomain = this.getXDomain();\n if (this.filteredDomain) {\n this.xDomain = this.filteredDomain;\n }\n\n this.yDomain = this.getYDomain();\n this.seriesDomain = this.getSeriesDomain();\n\n this.xScale = this.getXScale(this.xDomain, this.dims.width);\n this.yScale = this.getYScale(this.yDomain, this.dims.height);\n\n this.updateTimeline();\n\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n\n this.transform = `translate(${this.dims.xOffset}, ${this.margin[0]})`;\n\n this.clipPathId = 'clip' + id().toString();\n this.clipPath = `url(#${this.clipPathId})`;\n }\n\n updateTimeline(): void {\n if (this.timeline) {\n this.timelineWidth = this.dims.width;\n this.timelineXDomain = this.getXDomain();\n this.timelineXScale = this.getXScale(this.timelineXDomain, this.timelineWidth);\n this.timelineYScale = this.getYScale(this.yDomain, this.timelineHeight);\n this.timelineTransform = `translate(${this.dims.xOffset}, ${-this.margin[2]})`;\n }\n }\n\n getXDomain(): any[] {\n let values = getUniqueXDomainValues(this.results);\n\n this.scaleType = getScaleType(values);\n let domain = [];\n\n if (this.scaleType === ScaleType.Linear) {\n values = values.map(v => Number(v));\n }\n\n let min;\n let max;\n if (this.scaleType === ScaleType.Time || this.scaleType === ScaleType.Linear) {\n min = this.xScaleMin ? this.xScaleMin : Math.min(...values);\n\n max = this.xScaleMax ? this.xScaleMax : Math.max(...values);\n }\n\n if (this.scaleType === ScaleType.Time) {\n domain = [new Date(min), new Date(max)];\n this.xSet = [...values].sort((a, b) => {\n const aDate = a.getTime();\n const bDate = b.getTime();\n if (aDate > bDate) return 1;\n if (bDate > aDate) return -1;\n return 0;\n });\n } else if (this.scaleType === ScaleType.Linear) {\n domain = [min, max];\n // Use compare function to sort numbers numerically\n this.xSet = [...values].sort((a, b) => a - b);\n } else {\n domain = values;\n this.xSet = values;\n }\n\n return domain;\n }\n\n getYDomain(): [number, number] {\n const domain = [];\n\n for (const results of this.results) {\n for (const d of results.series) {\n if (!domain.includes(d.value)) {\n domain.push(d.value);\n }\n }\n }\n\n const values = [...domain];\n if (!this.autoScale) {\n values.push(0);\n }\n if (this.baseValue !== 'auto') {\n values.push(this.baseValue);\n }\n\n const min = this.yScaleMin ? this.yScaleMin : Math.min(...values);\n\n const max = this.yScaleMax ? this.yScaleMax : Math.max(...values);\n\n return [min, max];\n }\n\n getSeriesDomain(): string[] {\n return this.results.map(d => d.name);\n }\n\n getXScale(domain, width: number): number {\n let scale;\n\n if (this.scaleType === ScaleType.Time) {\n scale = scaleTime();\n } else if (this.scaleType === ScaleType.Linear) {\n scale = scaleLinear();\n } else if (this.scaleType === ScaleType.Ordinal) {\n scale = scalePoint().padding(0.1);\n }\n\n scale.range([0, width]).domain(domain);\n\n return this.roundDomains ? scale.nice() : scale;\n }\n\n getYScale(domain: [number, number], height: number): any {\n const scale = scaleLinear().range([height, 0]).domain(domain);\n return this.roundDomains ? scale.nice() : scale;\n }\n\n getScaleType(values): ScaleType {\n let date = true;\n let num = true;\n for (const value of values) {\n if (isDate(value)) {\n date = false;\n }\n if (isNumber(value)) {\n num = false;\n }\n }\n\n if (date) {\n return ScaleType.Time;\n }\n\n if (num) {\n return ScaleType.Linear;\n }\n\n return ScaleType.Ordinal;\n }\n\n updateDomain(domain): void {\n this.filteredDomain = domain;\n this.xDomain = this.filteredDomain;\n this.xScale = this.getXScale(this.xDomain, this.dims.width);\n }\n\n updateHoveredVertical(item): void {\n this.hoveredVertical = item.value;\n this.deactivateAll();\n }\n\n @HostListener('mouseleave')\n hideCircles(): void {\n this.hoveredVertical = null;\n this.deactivateAll();\n }\n\n onClick(data, series?: Series): void {\n if (series) {\n data.series = series.name;\n }\n\n this.select.emit(data);\n }\n\n trackBy: TrackByFunction<Series> = (index: number, item: Series) => {\n return item.name;\n };\n\n setColors(): void {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.seriesDomain;\n } else {\n domain = this.yDomain;\n }\n\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n\n getLegendOptions(): LegendOptions {\n const opts: LegendOptions = {\n scaleType: this.schemeType as any,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.seriesDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n } else {\n opts.domain = this.yDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n\n updateYAxisWidth({ width }: { width: number }): void {\n this.yAxisWidth = width;\n this.update();\n }\n\n updateXAxisHeight({ height }: { height: number }): void {\n this.xAxisHeight = height;\n this.update();\n }\n\n onActivate(item): void {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n if (idx > -1) {\n return;\n }\n\n this.activeEntries = [item, ...this.activeEntries];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n\n onDeactivate(item): void {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n\n deactivateAll(): void {\n this.activeEntries = [...this.activeEntries];\n for (const entry of this.activeEntries) {\n this.deactivate.emit({ value: entry, entries: [] });\n }\n this.activeEntries = [];\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n HostListener,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ContentChild,\n TemplateRef,\n TrackByFunction\n} from '@angular/core';\nimport { scaleLinear, scalePoint, scaleTime } from 'd3-scale';\nimport { curveLinear } from 'd3-shape';\n\nimport { calculateViewDimensions } from '../common/view-dimensions.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { BaseChartComponent } from '../common/base-chart.component';\nimport { id } from '../utils/id';\nimport { getUniqueXDomainValues, getScaleType } from '../common/domain.helper';\nimport { Series } from '../models/chart-data.model';\nimport { SeriesType } from '../common/circle-series.component';\nimport { LegendOptions, LegendPosition } from '../common/types/legend.model';\nimport { ScaleType } from '../common/types/scale-type.enum';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\n\n@Component({\n selector: 'ngx-charts-area-chart-normalized',\n template: `\n <ngx-charts-chart\n [view]=\"[width, height]\"\n [showLegend]=\"legend\"\n [legendOptions]=\"legendOptions\"\n [activeEntries]=\"activeEntries\"\n [animations]=\"animations\"\n (legendLabelClick)=\"onClick($event)\"\n (legendLabelActivate)=\"onActivate($event)\"\n (legendLabelDeactivate)=\"onDeactivate($event)\"\n >\n <svg:defs>\n <svg:clipPath [attr.id]=\"clipPathId\">\n <svg:rect\n [attr.width]=\"dims.width + 10\"\n [attr.height]=\"dims.height + 10\"\n [attr.transform]=\"'translate(-5, -5)'\"\n />\n </svg:clipPath>\n </svg:defs>\n <svg:g [attr.transform]=\"transform\" class=\"area-chart chart\">\n <svg:g\n ngx-charts-x-axis\n *ngIf=\"xAxis\"\n [xScale]=\"xScale\"\n [dims]=\"dims\"\n [showGridLines]=\"showGridLines\"\n [showLabel]=\"showXAxisLabel\"\n [labelText]=\"xAxisLabel\"\n [trimTicks]=\"trimXAxisTicks\"\n [rotateTicks]=\"rotateXAxisTicks\"\n [maxTickLength]=\"maxXAxisTickLength\"\n [tickFormatting]=\"xAxisTickFormatting\"\n [ticks]=\"xAxisTicks\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateXAxisHeight($event)\"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf=\"yAxis\"\n [yScale]=\"yScale\"\n [dims]=\"dims\"\n [showGridLines]=\"showGridLines\"\n [showLabel]=\"showYAxisLabel\"\n [labelText]=\"yAxisLabel\"\n [trimTicks]=\"trimYAxisTicks\"\n [maxTickLength]=\"maxYAxisTickLength\"\n [tickFormatting]=\"yAxisTickFormatting\"\n [ticks]=\"yAxisTicks\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateYAxisWidth($event)\"\n ></svg:g>\n <svg:g [attr.clip-path]=\"clipPath\">\n <svg:g *ngFor=\"let series of results; trackBy: trackBy\">\n <svg:g\n ngx-charts-area-series\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [colors]=\"colors\"\n [data]=\"series\"\n [scaleType]=\"scaleType\"\n [activeEntries]=\"activeEntries\"\n [gradient]=\"gradient\"\n [normalized]=\"true\"\n [curve]=\"curve\"\n [animations]=\"animations\"\n />\n </svg:g>\n\n <svg:g *ngIf=\"!tooltipDisabled\" (mouseleave)=\"hideCircles()\">\n <svg:g\n ngx-charts-tooltip-area\n [dims]=\"dims\"\n [xSet]=\"xSet\"\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [results]=\"results\"\n [colors]=\"colors\"\n [showPercentage]=\"true\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"seriesTooltipTemplate\"\n (hover)=\"updateHoveredVertical($event)\"\n />\n\n <svg:g *ngFor=\"let series of results\">\n <svg:g\n ngx-charts-circle-series\n [type]=\"seriesType.Stacked\"\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [colors]=\"colors\"\n [activeEntries]=\"activeEntries\"\n [data]=\"series\"\n [scaleType]=\"scaleType\"\n [visibleValue]=\"hoveredVertical\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n (select)=\"onClick($event, series)\"\n (activate)=\"onActivate($event)\"\n (deactivate)=\"onDeactivate($event)\"\n />\n </svg:g>\n </svg:g>\n </svg:g>\n </svg:g>\n <svg:g\n ngx-charts-timeline\n *ngIf=\"timeline && scaleType != 'ordinal'\"\n [attr.transform]=\"timelineTransform\"\n [results]=\"results\"\n [view]=\"[timelineWidth, height]\"\n [height]=\"timelineHeight\"\n [scheme]=\"scheme\"\n [customColors]=\"customColors\"\n [legend]=\"legend\"\n [scaleType]=\"scaleType\"\n (onDomainChange)=\"updateDomain($event)\"\n >\n <svg:g *ngFor=\"let series of results; trackBy: trackBy\">\n <svg:g\n ngx-charts-area-series\n [xScale]=\"timelineXScale\"\n [yScale]=\"timelineYScale\"\n [colors]=\"colors\"\n [data]=\"series\"\n [scaleType]=\"scaleType\"\n [gradient]=\"gradient\"\n [normalized]=\"true\"\n [curve]=\"curve\"\n [animations]=\"animations\"\n />\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrls: ['../common/base-chart.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class AreaChartNormalizedComponent extends BaseChartComponent {\n @Input() legend = false;\n @Input() legendTitle: string = 'Legend';\n @Input() legendPosition: LegendPosition = LegendPosition.Right;\n @Input() xAxis: boolean;\n @Input() yAxis: boolean;\n @Input() showXAxisLabel: boolean = false;\n @Input() showYAxisLabel: boolean = false;\n @Input() xAxisLabel: string;\n @Input() yAxisLabel: string;\n @Input() timeline;\n @Input() gradient;\n @Input() showGridLines: boolean = true;\n @Input() curve: any = curveLinear;\n @Input() activeEntries: any[] = [];\n @Input() schemeType: ScaleType;\n @Input() trimXAxisTicks: boolean = true;\n @Input() trimYAxisTicks: boolean = true;\n @Input() rotateXAxisTicks: boolean = true;\n @Input() maxXAxisTickLength: number = 16;\n @Input() maxYAxisTickLength: number = 16;\n @Input() xAxisTickFormatting: any;\n @Input() yAxisTickFormatting: any;\n @Input() xAxisTicks: any[];\n @Input() yAxisTicks: any[];\n @Input() roundDomains: boolean = false;\n @Input() tooltipDisabled: boolean = false;\n @Input() wrapTicks = false;\n\n @Output() activate: EventEmitter<any> = new EventEmitter();\n @Output() deactivate: EventEmitter<any> = new EventEmitter();\n\n @ContentChild('tooltipTemplate') tooltipTemplate: TemplateRef<any>;\n @ContentChild('seriesTooltipTemplate') seriesTooltipTemplate: TemplateRef<any>;\n\n dims: ViewDimensions;\n scaleType: ScaleType;\n xDomain: any[];\n xSet: any[]; // the set of all values on the X Axis\n yDomain: [number, number] = [0, 100];\n seriesDomain: any;\n xScale: any;\n yScale: any;\n transform: string;\n clipPathId: string;\n clipPath: string;\n colors: ColorHelper;\n margin: number[] = [10, 20, 10, 20];\n tooltipAreas: any[];\n hoveredVertical: any; // the value of the x axis that is hovered over\n xAxisHeight: number = 0;\n yAxisWidth: number = 0;\n filteredDomain: any;\n legendOptions: LegendOptions;\n\n seriesType = SeriesType;\n\n timelineWidth: any;\n timelineHeight: number = 50;\n timelineXScale: any;\n timelineYScale: any;\n timelineXDomain: any;\n timelineTransform: any;\n timelinePadding: number = 10;\n\n update(): void {\n super.update();\n\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n\n if (this.timeline) {\n this.dims.height -= this.timelineHeight + this.margin[2] + this.timelinePadding;\n }\n\n this.xDomain = this.getXDomain();\n if (this.filteredDomain) {\n this.xDomain = this.filteredDomain;\n }\n\n this.seriesDomain = this.getSeriesDomain();\n\n this.xScale = this.getXScale(this.xDomain, this.dims.width);\n this.yScale = this.getYScale(this.yDomain, this.dims.height);\n\n for (let i = 0; i < this.xSet.length; i++) {\n const val = this.xSet[i];\n let d0 = 0;\n\n let total = 0;\n for (const group of this.results) {\n const d = group.series.find(item => {\n let a = item.name;\n let b = val;\n if (this.scaleType === ScaleType.Time) {\n a = a.valueOf();\n b = b.valueOf();\n }\n return a === b;\n });\n if (d) {\n total += d.value;\n }\n }\n\n for (const group of this.results) {\n let d = group.series.find(item => {\n let a = item.name;\n let b = val;\n if (this.scaleType === ScaleType.Time) {\n a = a.valueOf();\n b = b.valueOf();\n }\n return a === b;\n });\n\n if (d) {\n d.d0 = d0;\n d.d1 = d0 + d.value;\n d0 += d.value;\n } else {\n d = {\n name: val,\n value: 0,\n d0,\n d1: d0\n };\n group.series.push(d);\n }\n\n if (total > 0) {\n d.d0 = (d.d0 * 100) / total;\n d.d1 = (d.d1 * 100) / total;\n } else {\n d.d0 = 0;\n d.d1 = 0;\n }\n }\n }\n\n this.updateTimeline();\n\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n\n this.clipPathId = 'clip' + id().toString();\n this.clipPath = `url(#${this.clipPathId})`;\n }\n\n updateTimeline(): void {\n if (this.timeline) {\n this.timelineWidth = this.dims.width;\n this.timelineXDomain = this.getXDomain();\n this.timelineXScale = this.getXScale(this.timelineXDomain, this.timelineWidth);\n this.timelineYScale = this.getYScale(this.yDomain, this.timelineHeight);\n this.timelineTransform = `translate(${this.dims.xOffset}, ${-this.margin[2]})`;\n }\n }\n\n getXDomain(): any[] {\n let values = getUniqueXDomainValues(this.results);\n\n this.scaleType = getScaleType(values);\n let domain = [];\n\n if (this.scaleType === ScaleType.Time) {\n const min = Math.min(...values);\n const max = Math.max(...values);\n domain = [new Date(min), new Date(max)];\n this.xSet = [...values].sort((a, b) => {\n const aDate = a.getTime();\n const bDate = b.getTime();\n if (aDate > bDate) return 1;\n if (bDate > aDate) return -1;\n return 0;\n });\n } else if (this.scaleType === ScaleType.Linear) {\n values = values.map(v => Number(v));\n const min = Math.min(...values);\n const max = Math.max(...values);\n domain = [min, max];\n // Use compare function to sort numbers numerically\n this.xSet = [...values].sort((a, b) => a - b);\n } else {\n domain = values;\n this.xSet = values;\n }\n\n return domain;\n }\n\n getSeriesDomain(): string[] {\n return this.results.map(d => d.name);\n }\n\n getXScale(domain, width: number): any {\n let scale;\n\n if (this.scaleType === ScaleType.Time) {\n scale = scaleTime();\n } else if (this.scaleType === ScaleType.Linear) {\n scale = scaleLinear();\n } else if (this.scaleType === ScaleType.Ordinal) {\n scale = scalePoint().padding(0.1);\n }\n\n scale.range([0, width]).domain(domain);\n\n return this.roundDomains ? scale.nice() : scale;\n }\n\n getYScale(domain, height: number): any {\n const scale = scaleLinear().range([height, 0]).domain(domain);\n return this.roundDomains ? scale.nice() : scale;\n }\n\n updateDomain(domain): void {\n this.filteredDomain = domain;\n this.xDomain = this.filteredDomain;\n this.xScale = this.getXScale(this.xDomain, this.dims.width);\n }\n\n updateHoveredVertical(item): void {\n this.hoveredVertical = item.value;\n this.deactivateAll();\n }\n\n @HostListener('mouseleave')\n hideCircles(): void {\n this.hoveredVertical = null;\n this.deactivateAll();\n }\n\n onClick(data, series?): void {\n if (series) {\n data.series = series.name;\n }\n\n this.select.emit(data);\n }\n\n trackBy: TrackByFunction<Series> = (index: number, item: Series) => {\n return item.name;\n };\n\n setColors(): void {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.seriesDomain;\n } else {\n domain = this.yDomain;\n }\n\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n\n getLegendOptions(): LegendOptions {\n const opts: LegendOptions = {\n scaleType: this.schemeType as any,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.seriesDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n } else {\n opts.domain = this.yDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n\n updateYAxisWidth({ width }: { width: number }): void {\n this.yAxisWidth = width;\n this.update();\n }\n\n updateXAxisHeight({ height }: { height: number }): void {\n this.xAxisHeight = height;\n this.update();\n }\n\n onActivate(item): void {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n if (idx > -1) {\n return;\n }\n\n this.activeEntries = [item, ...this.activeEntries];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n\n onDeactivate(item): void {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n\n deactivateAll(): void {\n this.activeEntries = [...this.activeEntries];\n for (const entry of this.activeEntries) {\n this.deactivate.emit({ value: entry, entries: [] });\n }\n this.activeEntries = [];\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ViewEncapsulation,\n HostListener,\n ChangeDetectionStrategy,\n ContentChild,\n TemplateRef\n} from '@angular/core';\nimport { scaleLinear, scalePoint, scaleTime } from 'd3-scale';\nimport { curveLinear } from 'd3-shape';\n\nimport { calculateViewDimensions } from '../common/view-dimensions.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { BaseChartComponent } from '../common/base-chart.component';\nimport { id } from '../utils/id';\nimport { getUniqueXDomainValues, getScaleType } from '../common/domain.helper';\nimport { SeriesType } from '../common/circle-series.component';\nimport { LegendOptions, LegendPosition } from '../common/types/legend.model';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\nimport { ScaleType } from '../common/types/scale-type.enum';\n\n@Component({\n selector: 'ngx-charts-area-chart-stacked',\n template: `\n <ngx-charts-chart\n [view]=\"[width, height]\"\n [showLegend]=\"legend\"\n [legendOptions]=\"legendOptions\"\n [activeEntries]=\"activeEntries\"\n [animations]=\"animations\"\n (legendLabelClick)=\"onClick($event)\"\n (legendLabelActivate)=\"onActivate($event)\"\n (legendLabelDeactivate)=\"onDeactivate($event)\"\n >\n <svg:defs>\n <svg:clipPath [attr.id]=\"clipPathId\">\n <svg:rect\n [attr.width]=\"dims.width + 10\"\n [attr.height]=\"dims.height + 10\"\n [attr.transform]=\"'translate(-5, -5)'\"\n />\n </svg:clipPath>\n </svg:defs>\n <svg:g [attr.transform]=\"transform\" class=\"area-chart chart\">\n <svg:g\n ngx-charts-x-axis\n *ngIf=\"xAxis\"\n [xScale]=\"xScale\"\n [dims]=\"dims\"\n [showGridLines]=\"showGridLines\"\n [showLabel]=\"showXAxisLabel\"\n [labelText]=\"xAxisLabel\"\n [trimTicks]=\"trimXAxisTicks\"\n [rotateTicks]=\"rotateXAxisTicks\"\n [maxTickLength]=\"maxXAxisTickLength\"\n [tickFormatting]=\"xAxisTickFormatting\"\n [ticks]=\"xAxisTicks\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateXAxisHeight($event)\"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf=\"yAxis\"\n [yScale]=\"yScale\"\n [dims]=\"dims\"\n [showGridLines]=\"showGridLines\"\n [showLabel]=\"showYAxisLabel\"\n [labelText]=\"yAxisLabel\"\n [trimTicks]=\"trimYAxisTicks\"\n [maxTickLength]=\"maxYAxisTickLength\"\n [tickFormatting]=\"yAxisTickFormatting\"\n [ticks]=\"yAxisTicks\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateYAxisWidth($event)\"\n ></svg:g>\n <svg:g [attr.clip-path]=\"clipPath\">\n <svg:g *ngFor=\"let series of results; trackBy: trackBy\">\n <svg:g\n ngx-charts-area-series\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [colors]=\"colors\"\n [data]=\"series\"\n [scaleType]=\"scaleType\"\n [gradient]=\"gradient\"\n [activeEntries]=\"activeEntries\"\n [stacked]=\"true\"\n [curve]=\"curve\"\n [animations]=\"animations\"\n />\n </svg:g>\n\n <svg:g *ngIf=\"!tooltipDisabled\" (mouseleave)=\"hideCircles()\">\n <svg:g\n ngx-charts-tooltip-area\n [dims]=\"dims\"\n [xSet]=\"xSet\"\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [results]=\"results\"\n [colors]=\"colors\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"seriesTooltipTemplate\"\n (hover)=\"updateHoveredVertical($event)\"\n />\n\n <svg:g *ngFor=\"let series of results; trackBy: trackBy\">\n <svg:g\n ngx-charts-circle-series\n [type]=\"seriesType.Stacked\"\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [colors]=\"colors\"\n [activeEntries]=\"activeEntries\"\n [data]=\"series\"\n [scaleType]=\"scaleType\"\n [visibleValue]=\"hoveredVertical\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n (select)=\"onClick($event, series)\"\n (activate)=\"onActivate($event)\"\n (deactivate)=\"onDeactivate($event)\"\n />\n </svg:g>\n </svg:g>\n </svg:g>\n </svg:g>\n <svg:g\n ngx-charts-timeline\n *ngIf=\"timeline && scaleType != 'ordinal'\"\n [attr.transform]=\"timelineTransform\"\n [results]=\"results\"\n [view]=\"[timelineWidth, height]\"\n [height]=\"timelineHeight\"\n [scheme]=\"scheme\"\n [customColors]=\"customColors\"\n [legend]=\"legend\"\n [scaleType]=\"scaleType\"\n (onDomainChange)=\"updateDomain($event)\"\n >\n <svg:g *ngFor=\"let series of results; trackBy: trackBy\">\n <svg:g\n ngx-charts-area-series\n [xScale]=\"timelineXScale\"\n [yScale]=\"timelineYScale\"\n [colors]=\"colors\"\n [data]=\"series\"\n [scaleType]=\"scaleType\"\n [gradient]=\"gradient\"\n [stacked]=\"true\"\n [curve]=\"curve\"\n [animations]=\"animations\"\n />\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrls: ['../common/base-chart.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class AreaChartStackedComponent extends BaseChartComponent {\n @Input() legend: boolean = false;\n @Input() legendTitle: string = 'Legend';\n @Input() legendPosition: LegendPosition = LegendPosition.Right;\n @Input() xAxis: boolean = false;\n @Input() yAxis: boolean = false;\n @Input() showXAxisLabel: boolean;\n @Input() showYAxisLabel: boolean;\n @Input() xAxisLabel: string;\n @Input() yAxisLabel: string;\n @Input() timeline: boolean = false;\n @Input() gradient: boolean;\n @Input() showGridLines: boolean = true;\n @Input() curve: any = curveLinear;\n @Input() activeEntries: any[] = [];\n @Input() schemeType: ScaleType;\n @Input() trimXAxisTicks: boolean = true;\n @Input() trimYAxisTicks: boolean = true;\n @Input() rotateXAxisTicks: boolean = true;\n @Input() maxXAxisTickLength: number = 16;\n @Input() maxYAxisTickLength: number = 16;\n @Input() xAxisTickFormatting: any;\n @Input() yAxisTickFormatting: any;\n @Input() xAxisTicks: any[];\n @Input() yAxisTicks: any[];\n @Input() roundDomains: boolean = false;\n @Input() tooltipDisabled: boolean = false;\n @Input() xScaleMin: any;\n @Input() xScaleMax: any;\n @Input() yScaleMin: number;\n @Input() yScaleMax: number;\n @Input() wrapTicks = false;\n\n @Output() activate: EventEmitter<any> = new EventEmitter();\n @Output() deactivate: EventEmitter<any> = new EventEmitter();\n\n @ContentChild('tooltipTemplate') tooltipTemplate: TemplateRef<any>;\n @ContentChild('seriesTooltipTemplate') seriesTooltipTemplate: TemplateRef<any>;\n\n dims: ViewDimensions;\n scaleType: ScaleType;\n xDomain: any[];\n xSet: any[]; // the set of all values on the X Axis\n yDomain: [number, number];\n seriesDomain: any;\n xScale: any;\n yScale: any;\n transform: string;\n clipPathId: string;\n clipPath: string;\n colors: ColorHelper;\n margin: number[] = [10, 20, 10, 20];\n hoveredVertical: any; // the value of the x axis that is hovered over\n xAxisHeight: number = 0;\n yAxisWidth: number = 0;\n filteredDomain: any;\n legendOptions: any;\n\n timelineWidth: number;\n timelineHeight: number = 50;\n timelineXScale: any;\n timelineYScale: any;\n timelineXDomain: any;\n timelineTransform: any;\n timelinePadding: number = 10;\n\n seriesType = SeriesType;\n\n update(): void {\n super.update();\n\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n\n if (this.timeline) {\n this.dims.height -= this.timelineHeight + this.margin[2] + this.timelinePadding;\n }\n\n this.xDomain = this.getXDomain();\n if (this.filteredDomain) {\n this.xDomain = this.filteredDomain;\n }\n\n this.yDomain = this.getYDomain();\n this.seriesDomain = this.getSeriesDomain();\n\n this.xScale = this.getXScale(this.xDomain, this.dims.width);\n this.yScale = this.getYScale(this.yDomain, this.dims.height);\n\n for (let i = 0; i < this.xSet.length; i++) {\n const val = this.xSet[i];\n let d0 = 0;\n for (const group of this.results) {\n let d = group.series.find(item => {\n let a = item.name;\n let b = val;\n if (this.scaleType === ScaleType.Time) {\n a = a.valueOf();\n b = b.valueOf();\n }\n return a === b;\n });\n\n if (d) {\n d.d0 = d0;\n d.d1 = d0 + d.value;\n d0 += d.value;\n } else {\n d = {\n name: val,\n value: 0,\n d0,\n d1: d0\n };\n group.series.push(d);\n }\n }\n }\n\n this.updateTimeline();\n\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n\n this.clipPathId = 'clip' + id().toString();\n this.clipPath = `url(#${this.clipPathId})`;\n }\n\n updateTimeline(): void {\n if (this.timeline) {\n this.timelineWidth = this.dims.width;\n this.timelineXDomain = this.getXDomain();\n this.timelineXScale = this.getXScale(this.timelineXDomain, this.timelineWidth);\n this.timelineYScale = this.getYScale(this.yDomain, this.timelineHeight);\n this.timelineTransform = `translate(${this.dims.xOffset}, ${-this.margin[2]})`;\n }\n }\n\n getXDomain(): any[] {\n let values = getUniqueXDomainValues(this.results);\n\n this.scaleType = getScaleType(values);\n let domain = [];\n\n if (this.scaleType === ScaleType.Linear) {\n values = values.map(v => Number(v));\n }\n\n let min;\n let max;\n if (this.scaleType === ScaleType.Time || this.scaleType === ScaleType.Linear) {\n min = this.xScaleMin ? this.xScaleMin : Math.min(...values);\n\n max = this.xScaleMax ? this.xScaleMax : Math.max(...values);\n }\n\n if (this.scaleType === ScaleType.Time) {\n domain = [new Date(min), new Date(max)];\n this.xSet = [...values].sort((a, b) => {\n const aDate = a.getTime();\n const bDate = b.getTime();\n if (aDate > bDate) return 1;\n if (bDate > aDate) return -1;\n return 0;\n });\n } else if (this.scaleType === ScaleType.Linear) {\n domain = [min, max];\n // Use compare function to sort numbers numerically\n this.xSet = [...values].sort((a, b) => a - b);\n } else {\n domain = values;\n this.xSet = values;\n }\n\n return domain;\n }\n\n getYDomain(): [number, number] {\n const domain = [];\n\n for (let i = 0; i < this.xSet.length; i++) {\n const val = this.xSet[i];\n let sum = 0;\n for (const group of this.results) {\n const d = group.series.find(item => {\n let a = item.name;\n let b = val;\n if (this.scaleType === ScaleType.Time) {\n a = a.valueOf();\n b = b.valueOf();\n }\n return a === b;\n });\n\n if (d) {\n sum += d.value;\n }\n }\n\n domain.push(sum);\n }\n\n const min = this.yScaleMin ? this.yScaleMin : Math.min(0, ...domain);\n\n const max = this.yScaleMax ? this.yScaleMax : Math.max(...domain);\n return [min, max];\n }\n\n getSeriesDomain(): string[] {\n return this.results.map(d => d.name);\n }\n\n getXScale(domain, width: number): any {\n let scale;\n\n if (this.scaleType === ScaleType.Time) {\n scale = scaleTime();\n } else if (this.scaleType === ScaleType.Linear) {\n scale = scaleLinear();\n } else if (this.scaleType === ScaleType.Ordinal) {\n scale = scalePoint().padding(0.1);\n }\n\n scale.range([0, width]).domain(domain);\n\n return this.roundDomains ? scale.nice() : scale;\n }\n\n getYScale(domain, height: number): any {\n const scale = scaleLinear().range([height, 0]).domain(domain);\n return this.roundDomains ? scale.nice() : scale;\n }\n\n updateDomain(domain): void {\n this.filteredDomain = domain;\n this.xDomain = this.filteredDomain;\n this.xScale = this.getXScale(this.xDomain, this.dims.width);\n }\n\n updateHoveredVertical(item) {\n this.hoveredVertical = item.value;\n this.deactivateAll();\n }\n\n @HostListener('mouseleave')\n hideCircles(): void {\n this.hoveredVertical = null;\n this.deactivateAll();\n }\n\n onClick(data, series?): void {\n if (series) {\n data.series = series.name;\n }\n\n this.select.emit(data);\n }\n\n trackBy(index, item): string {\n return `${item.name}`;\n }\n\n setColors(): void {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.seriesDomain;\n } else {\n domain = this.yDomain;\n }\n\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n\n getLegendOptions(): LegendOptions {\n const opts = {\n scaleType: this.schemeType as any,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.seriesDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n } else {\n opts.domain = this.yDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n\n updateYAxisWidth({ width }: { width: number }): void {\n this.yAxisWidth = width;\n this.update();\n }\n\n updateXAxisHeight({ height }: { height: number }): void {\n this.xAxisHeight = height;\n this.update();\n }\n\n onActivate(item): void {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n if (idx > -1) {\n return;\n }\n\n this.activeEntries = [item, ...this.activeEntries];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n\n onDeactivate(item): void {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n\n deactivateAll() {\n this.activeEntries = [...this.activeEntries];\n for (const entry of this.activeEntries) {\n this.deactivate.emit({ value: entry, entries: [] });\n }\n this.activeEntries = [];\n }\n}\n","import { NgModule } from '@angular/core';\nimport { AreaChartComponent } from './area-chart.component';\nimport { AreaChartNormalizedComponent } from './area-chart-normalized.component';\nimport { AreaChartStackedComponent } from './area-chart-stacked.component';\nimport { AreaSeriesComponent } from './area-series.component';\nimport { ChartCommonModule } from '../common/chart-common.module';\n\n@NgModule({\n imports: [ChartCommonModule],\n declarations: [AreaChartComponent, AreaChartNormalizedComponent, AreaChartStackedComponent, AreaSeriesComponent],\n exports: [AreaChartComponent, AreaChartNormalizedComponent, AreaChartStackedComponent, AreaSeriesComponent]\n})\nexport class AreaChartModule {}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnChanges,\n Output,\n SimpleChanges\n} from '@angular/core';\nimport { select } from 'd3-selection';\nimport { roundedRect } from '../common/shape.helper';\nimport { id } from '../utils/id';\nimport { DataItem } from '../models/chart-data.model';\nimport { BarOrientation } from '../common/types/bar-orientation.enum';\nimport { Gradient } from '../common/types/gradient.interface';\n\n@Component({\n selector: 'g[ngx-charts-bar]',\n template: `\n <svg:defs *ngIf=\"hasGradient\">\n <svg:g ngx-charts-svg-linear-gradient [orientation]=\"orientation\" [name]=\"gradientId\" [stops]=\"gradientStops\" />\n </svg:defs>\n <svg:path\n class=\"bar\"\n stroke=\"none\"\n role=\"img\"\n tabIndex=\"-1\"\n [class.active]=\"isActive\"\n [class.hidden]=\"hideBar\"\n [attr.d]=\"path\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.fill]=\"hasGradient ? gradientFill : fill\"\n (click)=\"select.emit(data)\"\n />\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class BarComponent implements OnChanges {\n @Input() fill: string;\n @Input() data: DataItem;\n @Input() width: number;\n @Input() height: number;\n @Input() x: number;\n @Input() y: number;\n @Input() orientation: BarOrientation;\n @Input() roundEdges: boolean = true;\n @Input() gradient: boolean = false;\n @Input() offset: number = 0;\n @Input() isActive: boolean = false;\n @Input() stops: Gradient[];\n @Input() animations: boolean = true;\n @Input() ariaLabel: string;\n @Input() noBarWhenZero: boolean = true;\n\n @Output() select: EventEmitter<DataItem> = new EventEmitter();\n @Output() activate: EventEmitter<DataItem> = new EventEmitter();\n @Output() deactivate: EventEmitter<DataItem> = new EventEmitter();\n\n element: HTMLElement;\n path: string;\n gradientId: string;\n gradientFill: string;\n gradientStops: Gradient[];\n hasGradient: boolean = false;\n hideBar: boolean = false;\n\n constructor(element: ElementRef) {\n this.element = element.nativeElement;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.roundEdges) {\n this.loadAnimation();\n }\n this.update();\n }\n\n update(): void {\n this.gradientId = 'grad' + id().toString();\n this.gradientFill = `url(#${this.gradientId})`;\n\n if (this.gradient || this.stops) {\n this.gradientStops = this.getGradient();\n this.hasGradient = true;\n } else {\n this.hasGradient = false;\n }\n\n this.updatePathEl();\n this.checkToHideBar();\n }\n\n loadAnimation(): void {\n this.path = this.getStartingPath();\n setTimeout(this.update.bind(this), 100);\n }\n\n updatePathEl(): void {\n const node = select(this.element).select('.bar');\n const path = this.getPath();\n if (this.animations) {\n node.transition().duration(500).attr('d', path);\n } else {\n node.attr('d', path);\n }\n }\n\n getGradient(): Gradient[] {\n if (this.stops) {\n return this.stops;\n }\n\n return [\n {\n offset: 0,\n color: this.fill,\n opacity: this.getStartOpacity()\n },\n {\n offset: 100,\n color: this.fill,\n opacity: 1\n }\n ];\n }\n\n getStartingPath(): string {\n if (!this.animations) {\n return this.getPath();\n }\n\n let radius = this.getRadius();\n let path;\n\n if (this.roundEdges) {\n if (this.orientation === BarOrientation.Vertical) {\n radius = Math.min(this.height, radius);\n path = roundedRect(this.x, this.y + this.height, this.width, 1, 0, this.edges);\n } else if (this.orientation === BarOrientation.Horizontal) {\n radius = Math.min(this.width, radius);\n path = roundedRect(this.x, this.y, 1, this.height, 0, this.edges);\n }\n } else {\n if (this.orientation === BarOrientation.Vertical) {\n path = roundedRect(this.x, this.y + this.height, this.width, 1, 0, this.edges);\n } else if (this.orientation === BarOrientation.Horizontal) {\n path = roundedRect(this.x, this.y, 1, this.height, 0, this.edges);\n }\n }\n\n return path;\n }\n\n getPath(): string {\n let radius = this.getRadius();\n let path;\n\n if (this.roundEdges) {\n if (this.orientation === BarOrientation.Vertical) {\n radius = Math.min(this.height, radius);\n path = roundedRect(this.x, this.y, this.width, this.height, radius, this.edges);\n } else if (this.orientation === BarOrientation.Horizontal) {\n radius = Math.min(this.width, radius);\n path = roundedRect(this.x, this.y, this.width, this.height, radius, this.edges);\n }\n } else {\n path = roundedRect(this.x, this.y, this.width, this.height, radius, this.edges);\n }\n\n return path;\n }\n\n getRadius(): number {\n let radius = 0;\n\n if (this.roundEdges && this.height > 5 && this.width > 5) {\n radius = Math.floor(Math.min(5, this.height / 2, this.width / 2));\n }\n\n return radius;\n }\n\n getStartOpacity(): number {\n if (this.roundEdges) {\n return 0.2;\n } else {\n return 0.5;\n }\n }\n\n get edges(): boolean[] {\n let edges = [false, false, false, false];\n if (this.roundEdges) {\n if (this.orientation === BarOrientation.Vertical) {\n if (this.data.value > 0) {\n edges = [true, true, false, false];\n } else {\n edges = [false, false, true, true];\n }\n } else if (this.orientation === BarOrientation.Horizontal) {\n if (this.data.value > 0) {\n edges = [false, true, false, true];\n } else {\n edges = [true, false, true, false];\n }\n }\n }\n return edges;\n }\n\n @HostListener('mouseenter')\n onMouseEnter(): void {\n this.activate.emit(this.data);\n }\n\n @HostListener('mouseleave')\n onMouseLeave(): void {\n this.deactivate.emit(this.data);\n }\n\n private checkToHideBar(): void {\n this.hideBar =\n this.noBarWhenZero &&\n ((this.orientation === BarOrientation.Vertical && this.height === 0) ||\n (this.orientation === BarOrientation.Horizontal && this.width === 0));\n }\n}\n","export enum BarChartType {\n Standard = 'standard',\n Normalized = 'normalized',\n Stacked = 'stacked'\n}\n","export enum D0Types {\n positive = 'positive',\n negative = 'negative'\n}\n","import {\n Component,\n Input,\n OnChanges,\n SimpleChanges,\n ChangeDetectionStrategy,\n ElementRef,\n Output,\n EventEmitter\n} from '@angular/core';\nimport { formatLabel } from '../common/label.helper';\nimport { BarOrientation } from '../common/types/bar-orientation.enum';\n\n@Component({\n selector: 'g[ngx-charts-bar-label]',\n template: `\n <svg:text\n class=\"textDataLabel\"\n alignment-baseline=\"middle\"\n [attr.text-anchor]=\"textAnchor\"\n [attr.transform]=\"transform\"\n [attr.x]=\"x\"\n [attr.y]=\"y\"\n >\n {{ formatedValue }}\n </svg:text>\n `,\n styleUrls: ['./bar-label.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class BarLabelComponent implements OnChanges {\n @Input() value;\n @Input() valueFormatting: any;\n @Input() barX;\n @Input() barY;\n @Input() barWidth;\n @Input() barHeight;\n @Input() orientation: BarOrientation;\n\n @Output() dimensionsChanged: EventEmitter<any> = new EventEmitter();\n\n element: any;\n x: number;\n y: number;\n horizontalPadding: number = 2;\n verticalPadding: number = 5;\n formatedValue: string;\n transform: string;\n textAnchor: string;\n\n constructor(element: ElementRef) {\n this.element = element.nativeElement;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.update();\n }\n\n getSize(): any {\n const h = this.element.getBoundingClientRect().height;\n const w = this.element.getBoundingClientRect().width;\n return { height: h, width: w, negative: this.value < 0 };\n }\n\n ngAfterViewInit() {\n this.dimensionsChanged.emit(this.getSize());\n }\n\n update(): void {\n if (this.valueFormatting) {\n this.formatedValue = this.valueFormatting(this.value);\n } else {\n this.formatedValue = formatLabel(this.value);\n }\n\n if (this.orientation === 'horizontal') {\n this.x = this.barX + this.barWidth;\n // if the value is negative then it's on the left of the x0.\n // we need to put the data label in front of the bar\n if (this.value < 0) {\n this.x = this.x - this.horizontalPadding;\n this.textAnchor = 'end';\n } else {\n this.x = this.x + this.horizontalPadding;\n this.textAnchor = 'start';\n }\n this.y = this.barY + this.barHeight / 2;\n } else {\n // orientation must be \"vertical\"\n this.x = this.barX + this.barWidth / 2;\n this.y = this.barY + this.barHeight;\n\n if (this.value < 0) {\n this.y = this.y + this.verticalPadding;\n this.textAnchor = 'end';\n } else {\n this.y = this.y - this.verticalPadding;\n this.textAnchor = 'start';\n }\n this.transform = `rotate(-45, ${this.x} , ${this.y})`;\n }\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n OnChanges,\n SimpleChanges,\n ChangeDetectionStrategy,\n TemplateRef\n} from '@angular/core';\nimport { trigger, style, animate, transition } from '@angular/animations';\nimport { formatLabel, escapeLabel } from '../common/label.helper';\nimport { DataItem, StringOrNumberOrDate } from '../models/chart-data.model';\nimport { ColorHelper } from '../common/color.helper';\nimport { PlacementTypes } from '../common/tooltip/position';\nimport { StyleTypes } from '../common/tooltip/style.type';\nimport { BarChartType } from './types/bar-chart-type.enum';\nimport { Bar } from './types/bar.model';\nimport { D0Types } from './types/d0-type.enum';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\nimport { BarOrientation } from '../common/types/bar-orientation.enum';\nimport { ScaleType } from '../common/types/scale-type.enum';\n\n@Component({\n selector: 'g[ngx-charts-series-horizontal]',\n template: `\n <svg:g\n ngx-charts-bar\n *ngFor=\"let bar of bars; trackBy: trackBy\"\n [@animationState]=\"'active'\"\n [width]=\"bar.width\"\n [height]=\"bar.height\"\n [x]=\"bar.x\"\n [y]=\"bar.y\"\n [fill]=\"bar.color\"\n [stops]=\"bar.gradientStops\"\n [data]=\"bar.data\"\n [orientation]=\"barOrientation.Horizontal\"\n [roundEdges]=\"bar.roundEdges\"\n (select)=\"click($event)\"\n [gradient]=\"gradient\"\n [isActive]=\"isActive(bar.data)\"\n [ariaLabel]=\"bar.ariaLabel\"\n [animations]=\"animations\"\n (activate)=\"activate.emit($event)\"\n (deactivate)=\"deactivate.emit($event)\"\n ngx-tooltip\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipPlacement]=\"tooltipPlacement\"\n [tooltipType]=\"tooltipType\"\n [tooltipTitle]=\"tooltipTemplate ? undefined : bar.tooltipText\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipContext]=\"bar.data\"\n [noBarWhenZero]=\"noBarWhenZero\"\n ></svg:g>\n <svg:g *ngIf=\"showDataLabel\">\n <svg:g\n ngx-charts-bar-label\n *ngFor=\"let b of barsForDataLabels; let i = index; trackBy: trackDataLabelBy\"\n [barX]=\"b.x\"\n [barY]=\"b.y\"\n [barWidth]=\"b.width\"\n [barHeight]=\"b.height\"\n [value]=\"b.total\"\n [valueFormatting]=\"dataLabelFormatting\"\n [orientation]=\"barOrientation.Horizontal\"\n (dimensionsChanged)=\"dataLabelWidthChanged.emit({ size: $event, index: i })\"\n />\n </svg:g>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1\n }),\n animate(500, style({ opacity: 0 }))\n ])\n ])\n ]\n})\nexport class SeriesHorizontal implements OnChanges {\n @Input() dims: ViewDimensions;\n @Input() type: BarChartType = BarChartType.Standard;\n @Input() series: DataItem[];\n @Input() xScale;\n @Input() yScale;\n @Input() colors: ColorHelper;\n @Input() tooltipDisabled: boolean = false;\n @Input() gradient: boolean;\n @Input() activeEntries: DataItem[];\n @Input() seriesName: StringOrNumberOrDate;\n @Input() tooltipTemplate: TemplateRef<any>;\n @Input() roundEdges: boolean;\n @Input() animations: boolean = true;\n @Input() showDataLabel: boolean = false;\n @Input() dataLabelFormatting: any;\n @Input() noBarWhenZero: boolean = true;\n\n @Output() select: EventEmitter<DataItem> = new EventEmitter();\n @Output() activate = new EventEmitter();\n @Output() deactivate = new EventEmitter();\n @Output() dataLabelWidthChanged = new EventEmitter<{ size: Event; index: number }>();\n\n tooltipPlacement: PlacementTypes;\n tooltipType: StyleTypes;\n bars: Bar[];\n barsForDataLabels: Array<{ x: number; y: number; width: number; height: number; total: number; series: string }> = [];\n\n barOrientation = BarOrientation;\n\n ngOnChanges(changes: SimpleChanges): void {\n this.update();\n }\n\n update(): void {\n this.updateTooltipSettings();\n const d0 = {\n [D0Types.positive]: 0,\n [D0Types.negative]: 0\n };\n let d0Type: D0Types;\n d0Type = D0Types.positive;\n let total;\n if (this.type === BarChartType.Normalized) {\n total = this.series.map(d => d.value).reduce((sum, d) => (sum as any) + d, 0);\n }\n const xScaleMin = Math.max(this.xScale.domain()[0], 0);\n\n this.bars = this.series.map(d => {\n let value = d.value as any;\n const label = this.getLabel(d);\n const formattedLabel = formatLabel(label);\n const roundEdges = this.roundEdges;\n d0Type = value > 0 ? D0Types.positive : D0Types.negative;\n\n const bar: any = {\n value,\n label,\n roundEdges,\n data: d,\n formattedLabel\n };\n\n bar.height = this.yScale.bandwidth();\n\n if (this.type === BarChartType.Standard) {\n bar.width = Math.abs(this.xScale(value) - this.xScale(xScaleMin));\n if (value < 0) {\n bar.x = this.xScale(value);\n } else {\n bar.x = this.xScale(xScaleMin);\n }\n bar.y = this.yScale(label);\n } else if (this.type === BarChartType.Stacked) {\n const offset0 = d0[d0Type];\n const offset1 = offset0 + value;\n d0[d0Type] += value;\n\n bar.width = this.xScale(offset1) - this.xScale(offset0);\n bar.x = this.xScale(offset0);\n bar.y = 0;\n bar.offset0 = offset0;\n bar.offset1 = offset1;\n } else if (this.type === BarChartType.Normalized) {\n let offset0 = d0[d0Type];\n let offset1 = offset0 + value;\n d0[d0Type] += value;\n\n if (total > 0) {\n offset0 = (offset0 * 100) / total;\n offset1 = (offset1 * 100) / total;\n } else {\n offset0 = 0;\n offset1 = 0;\n }\n\n bar.width = this.xScale(offset1) - this.xScale(offset0);\n bar.x = this.xScale(offset0);\n bar.y = 0;\n bar.offset0 = offset0;\n bar.offset1 = offset1;\n value = (offset1 - offset0).toFixed(2) + '%';\n }\n\n if (this.colors.scaleType === ScaleType.Ordinal) {\n bar.color = this.colors.getColor(label);\n } else {\n if (this.type === BarChartType.Standard) {\n bar.color = this.colors.getColor(value);\n bar.gradientStops = this.colors.getLinearGradientStops(value);\n } else {\n bar.color = this.colors.getColor(bar.offset1);\n bar.gradientStops = this.colors.getLinearGradientStops(bar.offset1, bar.offset0);\n }\n }\n\n let tooltipLabel = formattedLabel;\n bar.ariaLabel = formattedLabel + ' ' + value.toLocaleString();\n if (this.seriesName !== null && this.seriesName !== undefined) {\n tooltipLabel = `${this.seriesName} • ${formattedLabel}`;\n bar.data.series = this.seriesName;\n bar.ariaLabel = this.seriesName + ' ' + bar.ariaLabel;\n }\n\n bar.tooltipText = this.tooltipDisabled\n ? undefined\n : `\n <span class=\"tooltip-label\">${escapeLabel(tooltipLabel)}</span>\n <span class=\"tooltip-val\">${\n this.dataLabelFormatting ? this.dataLabelFormatting(value) : value.toLocaleString()\n }</span>\n `;\n\n return bar;\n });\n\n this.updateDataLabels();\n }\n\n updateDataLabels(): void {\n if (this.type === BarChartType.Stacked) {\n this.barsForDataLabels = [];\n const section: any = {};\n section.series = this.seriesName;\n const totalPositive = this.series.map(d => d.value).reduce((sum, d) => (d > 0 ? sum + d : sum), 0);\n const totalNegative = this.series.map(d => d.value).reduce((sum, d) => (d < 0 ? sum + d : sum), 0);\n section.total = totalPositive + totalNegative;\n section.x = 0;\n section.y = 0;\n // if total is positive then we show it on the right, otherwise on the left\n if (section.total > 0) {\n section.width = this.xScale(totalPositive);\n } else {\n section.width = this.xScale(totalNegative);\n }\n section.height = this.yScale.bandwidth();\n this.barsForDataLabels.push(section);\n } else {\n this.barsForDataLabels = this.series.map(d => {\n const section: any = {};\n section.series = this.seriesName ?? d.label;\n section.total = d.value;\n section.x = this.xScale(0);\n section.y = this.yScale(d.label);\n section.width = this.xScale(section.total) - this.xScale(0);\n section.height = this.yScale.bandwidth();\n return section;\n });\n }\n }\n\n updateTooltipSettings(): void {\n this.tooltipPlacement = this.tooltipDisabled ? undefined : PlacementTypes.Top;\n this.tooltipType = this.tooltipDisabled ? undefined : StyleTypes.tooltip;\n }\n\n isActive(entry: DataItem): boolean {\n if (!this.activeEntries) return false;\n\n const item = this.activeEntries.find(active => {\n return entry.name === active.name && entry.value === active.value;\n });\n\n return item !== undefined;\n }\n\n getLabel(dataItem: DataItem): StringOrNumberOrDate {\n if (dataItem.label) {\n return dataItem.label;\n }\n return dataItem.name;\n }\n\n trackBy(index: number, bar: Bar): string {\n return bar.label;\n }\n\n trackDataLabelBy(index: number, barLabel: any): string {\n return index + '#' + barLabel.series + '#' + barLabel.total;\n }\n\n click(data: DataItem): void {\n this.select.emit(data);\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ContentChild,\n TemplateRef\n} from '@angular/core';\nimport { scaleBand, scaleLinear } from 'd3-scale';\n\nimport { calculateViewDimensions } from '../common/view-dimensions.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { BaseChartComponent } from '../common/base-chart.component';\nimport { LegendOptions, LegendPosition } from '../common/types/legend.model';\nimport { ScaleType } from '../common/types/scale-type.enum';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\n\n@Component({\n selector: 'ngx-charts-bar-horizontal',\n template: `\n <ngx-charts-chart\n [view]=\"[width, height]\"\n [showLegend]=\"legend\"\n [legendOptions]=\"legendOptions\"\n [activeEntries]=\"activeEntries\"\n [animations]=\"animations\"\n (legendLabelClick)=\"onClick($event)\"\n (legendLabelActivate)=\"onActivate($event, true)\"\n (legendLabelDeactivate)=\"onDeactivate($event, true)\"\n >\n <svg:g [attr.transform]=\"transform\" class=\"bar-chart chart\">\n <svg:g\n ngx-charts-x-axis\n *ngIf=\"xAxis\"\n [xScale]=\"xScale\"\n [dims]=\"dims\"\n [showGridLines]=\"showGridLines\"\n [showLabel]=\"showXAxisLabel\"\n [labelText]=\"xAxisLabel\"\n [trimTicks]=\"trimXAxisTicks\"\n [rotateTicks]=\"rotateXAxisTicks\"\n [maxTickLength]=\"maxXAxisTickLength\"\n [tickFormatting]=\"xAxisTickFormatting\"\n [ticks]=\"xAxisTicks\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateXAxisHeight($event)\"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf=\"yAxis\"\n [yScale]=\"yScale\"\n [dims]=\"dims\"\n [showLabel]=\"showYAxisLabel\"\n [labelText]=\"yAxisLabel\"\n [trimTicks]=\"trimYAxisTicks\"\n [maxTickLength]=\"maxYAxisTickLength\"\n [tickFormatting]=\"yAxisTickFormatting\"\n [ticks]=\"yAxisTicks\"\n [yAxisOffset]=\"dataLabelMaxWidth.negative\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateYAxisWidth($event)\"\n ></svg:g>\n <svg:g\n ngx-charts-series-horizontal\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [colors]=\"colors\"\n [series]=\"results\"\n [dims]=\"dims\"\n [gradient]=\"gradient\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [activeEntries]=\"activeEntries\"\n [roundEdges]=\"roundEdges\"\n [animations]=\"animations\"\n [showDataLabel]=\"showDataLabel\"\n [dataLabelFormatting]=\"dataLabelFormatting\"\n [noBarWhenZero]=\"noBarWhenZero\"\n (select)=\"onClick($event)\"\n (activate)=\"onActivate($event)\"\n (deactivate)=\"onDeactivate($event)\"\n (dataLabelWidthChanged)=\"onDataLabelMaxWidthChanged($event)\"\n ></svg:g>\n </svg:g>\n </ngx-charts-chart>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrls: ['../common/base-chart.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class BarHorizontalComponent extends BaseChartComponent {\n @Input() legend = false;\n @Input() legendTitle: string = 'Legend';\n @Input() legendPosition: LegendPosition = LegendPosition.Right;\n @Input() xAxis;\n @Input() yAxis;\n @Input() showXAxisLabel: boolean;\n @Input() showYAxisLabel: boolean;\n @Input() xAxisLabel: string;\n @Input() yAxisLabel: string;\n @Input() tooltipDisabled: boolean = false;\n @Input() gradient: boolean;\n @Input() showGridLines: boolean = true;\n @Input() activeEntries: any[] = [];\n @Input() schemeType: ScaleType;\n @Input() trimXAxisTicks: boolean = true;\n @Input() trimYAxisTicks: boolean = true;\n @Input() rotateXAxisTicks: boolean = true;\n @Input() maxXAxisTickLength: number = 16;\n @Input() maxYAxisTickLength: number = 16;\n @Input() xAxisTickFormatting: any;\n @Input() yAxisTickFormatting: any;\n @Input() xAxisTicks: any[];\n @Input() yAxisTicks: any[];\n @Input() barPadding: number = 8;\n @Input() roundDomains: boolean = false;\n @Input() roundEdges: boolean = true;\n @Input() xScaleMax: number;\n @Input() xScaleMin: number;\n @Input() showDataLabel: boolean = false;\n @Input() dataLabelFormatting: any;\n @Input() noBarWhenZero: boolean = true;\n @Input() wrapTicks = false;\n\n @Output() activate: EventEmitter<any> = new EventEmitter();\n @Output() deactivate: EventEmitter<any> = new EventEmitter();\n\n @ContentChild('tooltipTemplate') tooltipTemplate: TemplateRef<any>;\n\n dims: ViewDimensions;\n yScale: any;\n xScale: any;\n xDomain: [number, number];\n yDomain: string[];\n transform: string;\n colors: ColorHelper;\n margin: number[] = [10, 20, 10, 20];\n xAxisHeight: number = 0;\n yAxisWidth: number = 0;\n legendOptions: LegendOptions;\n dataLabelMaxWidth: any = { negative: 0, positive: 0 };\n\n update(): void {\n super.update();\n\n if (!this.showDataLabel) {\n this.dataLabelMaxWidth = { negative: 0, positive: 0 };\n }\n\n this.margin = [10, 20 + this.dataLabelMaxWidth.positive, 10, 20 + this.dataLabelMaxWidth.negative];\n\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n\n this.formatDates();\n\n this.xScale = this.getXScale();\n this.yScale = this.getYScale();\n\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n }\n\n getXScale(): any {\n this.xDomain = this.getXDomain();\n\n const scale = scaleLinear().range([0, this.dims.width]).domain(this.xDomain);\n\n return this.roundDomains ? scale.nice() : scale;\n }\n\n getYScale(): any {\n this.yDomain = this.getYDomain();\n const spacing = this.yDomain.length / (this.dims.height / this.barPadding + 1);\n\n return scaleBand().rangeRound([0, this.dims.height]).paddingInner(spacing).domain(this.yDomain);\n }\n\n getXDomain(): [number, number] {\n const values = this.results.map(d => d.value);\n const min = this.xScaleMin ? Math.min(this.xScaleMin, ...values) : Math.min(0, ...values);\n\n const max = this.xScaleMax ? Math.max(this.xScaleMax, ...values) : Math.max(0, ...values);\n return [min, max];\n }\n\n getYDomain(): string[] {\n return this.results.map(d => d.label);\n }\n\n onClick(data): void {\n this.select.emit(data);\n }\n\n setColors(): void {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.yDomain;\n } else {\n domain = this.xDomain;\n }\n\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n\n getLegendOptions(): LegendOptions {\n const opts = {\n scaleType: this.schemeType as any,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === 'ordinal') {\n opts.domain = this.yDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n } else {\n opts.domain = this.xDomain;\n opts.colors = this.colors.scale;\n }\n\n return opts;\n }\n\n updateYAxisWidth({ width }: { width: number }): void {\n this.yAxisWidth = width;\n this.update();\n }\n\n updateXAxisHeight({ height }: { height: number }): void {\n this.xAxisHeight = height;\n this.update();\n }\n\n onDataLabelMaxWidthChanged(event) {\n if (event.size.negative) {\n this.dataLabelMaxWidth.negative = Math.max(this.dataLabelMaxWidth.negative, event.size.width);\n } else {\n this.dataLabelMaxWidth.positive = Math.max(this.dataLabelMaxWidth.positive, event.size.width);\n }\n if (event.index === this.results.length - 1) {\n setTimeout(() => this.update());\n }\n }\n\n onActivate(item, fromLegend: boolean = false) {\n item = this.results.find(d => {\n if (fromLegend) {\n return d.label === item.name;\n } else {\n return d.name === item.name;\n }\n });\n\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value && d.series === item.series;\n });\n if (idx > -1) {\n return;\n }\n\n this.activeEntries = [item, ...this.activeEntries];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n\n onDeactivate(item, fromLegend: boolean = false) {\n item = this.results.find(d => {\n if (fromLegend) {\n return d.label === item.name;\n } else {\n return d.name === item.name;\n }\n });\n\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value && d.series === item.series;\n });\n\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n}\n","import {\n Component,\n Input,\n ViewEncapsulation,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n ContentChild,\n TemplateRef,\n TrackByFunction\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { trigger, style, animate, transition } from '@angular/animations';\n\nimport { scaleBand, scaleLinear } from 'd3-scale';\n\nimport { calculateViewDimensions } from '../common/view-dimensions.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { DataItem } from '../models/chart-data.model';\n\nimport { BaseChartComponent } from '../common/base-chart.component';\nimport { ScaleType } from '../common/types/scale-type.enum';\nimport { LegendOptions, LegendPosition } from '../common/types/legend.model';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\nimport { BarOrientation } from '../common/types/bar-orientation.enum';\n\n@Component({\n selector: 'ngx-charts-bar-horizontal-2d',\n template: `\n <ngx-charts-chart\n [view]=\"[width, height]\"\n [showLegend]=\"legend\"\n [legendOptions]=\"legendOptions\"\n [activeEntries]=\"activeEntries\"\n [animations]=\"animations\"\n (legendLabelActivate)=\"onActivate($event, undefined, true)\"\n (legendLabelDeactivate)=\"onDeactivate($event, undefined, true)\"\n (legendLabelClick)=\"onClick($event)\"\n >\n <svg:g [attr.transform]=\"transform\" class=\"bar-chart chart\">\n <svg:g\n ngx-charts-grid-panel-series\n [xScale]=\"valueScale\"\n [yScale]=\"groupScale\"\n [data]=\"results\"\n [dims]=\"dims\"\n [orient]=\"barOrientation.Horizontal\"\n ></svg:g>\n <svg:g\n ngx-charts-x-axis\n *ngIf=\"xAxis\"\n [xScale]=\"valueScale\"\n [dims]=\"dims\"\n [showGridLines]=\"showGridLines\"\n [showLabel]=\"showXAxisLabel\"\n [labelText]=\"xAxisLabel\"\n [trimTicks]=\"trimXAxisTicks\"\n [rotateTicks]=\"rotateXAxisTicks\"\n [maxTickLength]=\"maxXAxisTickLength\"\n [tickFormatting]=\"xAxisTickFormatting\"\n [ticks]=\"xAxisTicks\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateXAxisHeight($event)\"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf=\"yAxis\"\n [yScale]=\"groupScale\"\n [dims]=\"dims\"\n [showLabel]=\"showYAxisLabel\"\n [labelText]=\"yAxisLabel\"\n [trimTicks]=\"trimYAxisTicks\"\n [maxTickLength]=\"maxYAxisTickLength\"\n [tickFormatting]=\"yAxisTickFormatting\"\n [ticks]=\"yAxisTicks\"\n [yAxisOffset]=\"dataLabelMaxWidth.negative\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateYAxisWidth($event)\"\n ></svg:g>\n\n <svg:g *ngIf=\"!isSSR\">\n <svg:g\n *ngFor=\"let group of results; let index = index; trackBy: trackBy\"\n [@animationState]=\"'active'\"\n [attr.transform]=\"groupTransform(group)\"\n >\n <svg:g\n ngx-charts-series-horizontal\n [xScale]=\"valueScale\"\n [activeEntries]=\"activeEntries\"\n [yScale]=\"innerScale\"\n [colors]=\"colors\"\n [series]=\"group.series\"\n [dims]=\"dims\"\n [gradient]=\"gradient\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [seriesName]=\"group.name\"\n [roundEdges]=\"roundEdges\"\n [animations]=\"animations\"\n [showDataLabel]=\"showDataLabel\"\n [dataLabelFormatting]=\"dataLabelFormatting\"\n [noBarWhenZero]=\"noBarWhenZero\"\n (select)=\"onClick($event, group)\"\n (activate)=\"onActivate($event, group)\"\n (deactivate)=\"onDeactivate($event, group)\"\n (dataLabelWidthChanged)=\"onDataLabelMaxWidthChanged($event, index)\"\n />\n </svg:g>\n </svg:g>\n <svg:g *ngIf=\"isSSR\">\n <svg:g\n *ngFor=\"let group of results; let index = index; trackBy: trackBy\"\n [attr.transform]=\"groupTransform(group)\"\n >\n <svg:g\n ngx-charts-series-horizontal\n [xScale]=\"valueScale\"\n [activeEntries]=\"activeEntries\"\n [yScale]=\"innerScale\"\n [colors]=\"colors\"\n [series]=\"group.series\"\n [dims]=\"dims\"\n [gradient]=\"gradient\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [seriesName]=\"group.name\"\n [roundEdges]=\"roundEdges\"\n [animations]=\"animations\"\n [showDataLabel]=\"showDataLabel\"\n [dataLabelFormatting]=\"dataLabelFormatting\"\n [noBarWhenZero]=\"noBarWhenZero\"\n (select)=\"onClick($event, group)\"\n (activate)=\"onActivate($event, group)\"\n (deactivate)=\"onDeactivate($event, group)\"\n (dataLabelWidthChanged)=\"onDataLabelMaxWidthChanged($event, index)\"\n />\n </svg:g>\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrls: ['../common/base-chart.component.scss'],\n encapsulation: ViewEncapsulation.None,\n animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1,\n transform: '*'\n }),\n animate(500, style({ opacity: 0, transform: 'scale(0)' }))\n ])\n ])\n ]\n})\nexport class BarHorizontal2DComponent extends BaseChartComponent {\n @Input() legend: boolean = false;\n @Input() legendTitle: string = 'Legend';\n @Input() legendPosition: LegendPosition = LegendPosition.Right;\n @Input() xAxis;\n @Input() yAxis;\n @Input() showXAxisLabel: boolean;\n @Input() showYAxisLabel: boolean;\n @Input() xAxisLabel: string;\n @Input() yAxisLabel: string;\n @Input() tooltipDisabled: boolean = false;\n @Input() gradient: boolean;\n @Input() showGridLines: boolean = true;\n @Input() activeEntries: any[] = [];\n @Input() schemeType: ScaleType;\n @Input() trimXAxisTicks: boolean = true;\n @Input() trimYAxisTicks: boolean = true;\n @Input() rotateXAxisTicks: boolean = true;\n @Input() maxXAxisTickLength: number = 16;\n @Input() maxYAxisTickLength: number = 16;\n @Input() xAxisTickFormatting: any;\n @Input() yAxisTickFormatting: any;\n @Input() xAxisTicks: any[];\n @Input() yAxisTicks: any[];\n @Input() groupPadding: number = 16;\n @Input() barPadding: number = 8;\n @Input() roundDomains: boolean = false;\n @Input() roundEdges: boolean = true;\n @Input() xScaleMax: number;\n @Input() showDataLabel: boolean = false;\n @Input() dataLabelFormatting: any;\n @Input() noBarWhenZero: boolean = true;\n @Input() wrapTicks = false;\n\n @Output() activate: EventEmitter<any> = new EventEmitter();\n @Output() deactivate: EventEmitter<any> = new EventEmitter();\n\n @ContentChild('tooltipTemplate') tooltipTemplate: TemplateRef<any>;\n\n dims: ViewDimensions;\n groupDomain: string[];\n innerDomain: string[];\n valueDomain: [number, number];\n groupScale: any;\n innerScale: any;\n valueScale: any;\n transform: string;\n colors: ColorHelper;\n margin: number[] = [10, 20, 10, 20];\n xAxisHeight: number = 0;\n yAxisWidth: number = 0;\n legendOptions: LegendOptions;\n dataLabelMaxWidth: any = { negative: 0, positive: 0 };\n isSSR = false;\n\n barOrientation = BarOrientation;\n\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n\n update(): void {\n super.update();\n\n if (!this.showDataLabel) {\n this.dataLabelMaxWidth = { negative: 0, positive: 0 };\n }\n\n this.margin = [10, 20 + this.dataLabelMaxWidth.positive, 10, 20 + this.dataLabelMaxWidth.negative];\n\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n\n this.formatDates();\n\n this.groupDomain = this.getGroupDomain();\n this.innerDomain = this.getInnerDomain();\n this.valueDomain = this.getValueDomain();\n\n this.groupScale = this.getGroupScale();\n this.innerScale = this.getInnerScale();\n this.valueScale = this.getValueScale();\n\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n }\n\n getGroupScale(): any {\n const spacing = this.groupDomain.length / (this.dims.height / this.groupPadding + 1);\n\n return scaleBand()\n .rangeRound([0, this.dims.height])\n .paddingInner(spacing)\n .paddingOuter(spacing / 2)\n .domain(this.groupDomain);\n }\n\n getInnerScale(): any {\n const height = this.groupScale.bandwidth();\n const spacing = this.innerDomain.length / (height / this.barPadding + 1);\n\n return scaleBand().rangeRound([0, height]).paddingInner(spacing).domain(this.innerDomain);\n }\n\n getValueScale(): any {\n const scale = scaleLinear().range([0, this.dims.width]).domain(this.valueDomain);\n\n return this.roundDomains ? scale.nice() : scale;\n }\n\n getGroupDomain(): string[] {\n const domain = [];\n\n for (const group of this.results) {\n if (!domain.includes(group.label)) {\n domain.push(group.label);\n }\n }\n\n return domain;\n }\n\n getInnerDomain(): string[] {\n const domain = [];\n\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.label)) {\n domain.push(d.label);\n }\n }\n }\n\n return domain;\n }\n\n getValueDomain(): [number, number] {\n const domain = [];\n\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.value)) {\n domain.push(d.value);\n }\n }\n }\n\n const min = Math.min(0, ...domain);\n const max = this.xScaleMax ? Math.max(this.xScaleMax, ...domain) : Math.max(0, ...domain);\n return [min, max];\n }\n\n groupTransform(group: DataItem): string {\n return `translate(0, ${this.groupScale(group.label)})`;\n }\n\n onClick(data, group?: DataItem): void {\n if (group) {\n data.series = group.name;\n }\n\n this.select.emit(data);\n }\n\n trackBy: TrackByFunction<DataItem> = (index: number, item: DataItem) => {\n return item.name;\n };\n\n setColors(): void {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.innerDomain;\n } else {\n domain = this.valueDomain;\n }\n\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n\n getLegendOptions(): LegendOptions {\n const opts = {\n scaleType: this.schemeType as any,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.innerDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n } else {\n opts.domain = this.valueDomain;\n opts.colors = this.colors.scale;\n }\n\n return opts;\n }\n\n updateYAxisWidth({ width }: { width: number }): void {\n this.yAxisWidth = width;\n this.update();\n }\n\n updateXAxisHeight({ height }: { height: number }): void {\n this.xAxisHeight = height;\n this.update();\n }\n\n onDataLabelMaxWidthChanged(event, groupIndex: number): void {\n if (event.size.negative) {\n this.dataLabelMaxWidth.negative = Math.max(this.dataLabelMaxWidth.negative, event.size.width);\n } else {\n this.dataLabelMaxWidth.positive = Math.max(this.dataLabelMaxWidth.positive, event.size.width);\n }\n if (groupIndex === this.results.length - 1) {\n setTimeout(() => this.update());\n }\n }\n\n onActivate(event, group: DataItem, fromLegend: boolean = false): void {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n\n const items = this.results\n .map(g => g.series)\n .flat()\n .filter(i => {\n if (fromLegend) {\n return i.label === item.name;\n } else {\n return i.name === item.name && i.series === item.series;\n }\n });\n\n this.activeEntries = [...items];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n\n onDeactivate(event, group: DataItem, fromLegend: boolean = false): void {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n\n this.activeEntries = this.activeEntries.filter(i => {\n if (fromLegend) {\n return i.label !== item.name;\n } else {\n return !(i.name === item.name && i.series === item.series);\n }\n });\n\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n}\n","import {\n Component,\n Input,\n Output,\n ViewEncapsulation,\n EventEmitter,\n ChangeDetectionStrategy,\n ContentChild,\n TemplateRef,\n TrackByFunction\n} from '@angular/core';\nimport { trigger, style, animate, transition } from '@angular/animations';\n\nimport { scaleBand, scaleLinear } from 'd3-scale';\n\nimport { calculateViewDimensions } from '../common/view-dimensions.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { Series } from '../models/chart-data.model';\n\nimport { BaseChartComponent } from '../common/base-chart.component';\nimport { BarChartType } from './types/bar-chart-type.enum';\nimport { ScaleType } from '../common/types/scale-type.enum';\nimport { LegendOptions, LegendPosition } from '../common/types/legend.model';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\nimport { isPlatformServer } from '@angular/common';\n\n@Component({\n selector: 'ngx-charts-bar-horizontal-normalized',\n template: `\n <ngx-charts-chart\n [view]=\"[width, height]\"\n [showLegend]=\"legend\"\n [legendOptions]=\"legendOptions\"\n [activeEntries]=\"activeEntries\"\n [animations]=\"animations\"\n (legendLabelActivate)=\"onActivate($event, undefined, true)\"\n (legendLabelDeactivate)=\"onDeactivate($event, undefined, true)\"\n (legendLabelClick)=\"onClick($event)\"\n >\n <svg:g [attr.transform]=\"transform\" class=\"bar-chart chart\">\n <svg:g\n ngx-charts-x-axis\n *ngIf=\"xAxis\"\n [xScale]=\"xScale\"\n [dims]=\"dims\"\n [showGridLines]=\"showGridLines\"\n [showLabel]=\"showXAxisLabel\"\n [labelText]=\"xAxisLabel\"\n [trimTicks]=\"trimXAxisTicks\"\n [rotateTicks]=\"rotateXAxisTicks\"\n [maxTickLength]=\"maxXAxisTickLength\"\n [tickFormatting]=\"xAxisTickFormatting\"\n [ticks]=\"xAxisTicks\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateXAxisHeight($event)\"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf=\"yAxis\"\n [yScale]=\"yScale\"\n [dims]=\"dims\"\n [showLabel]=\"showYAxisLabel\"\n [labelText]=\"yAxisLabel\"\n [trimTicks]=\"trimYAxisTicks\"\n [maxTickLength]=\"maxYAxisTickLength\"\n [tickFormatting]=\"yAxisTickFormatting\"\n [ticks]=\"yAxisTicks\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateYAxisWidth($event)\"\n ></svg:g>\n <svg:g *ngIf=\"!isSSR\">\n <svg:g\n *ngFor=\"let group of results; trackBy: trackBy\"\n [@animationState]=\"'active'\"\n [attr.transform]=\"groupTransform(group)\"\n >\n <svg:g\n ngx-charts-series-horizontal\n [type]=\"barChartType.Normalized\"\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [activeEntries]=\"activeEntries\"\n [colors]=\"colors\"\n [series]=\"group.series\"\n [dims]=\"dims\"\n [gradient]=\"gradient\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [seriesName]=\"group.name\"\n [animations]=\"animations\"\n (select)=\"onClick($event, group)\"\n (activate)=\"onActivate($event, group)\"\n (deactivate)=\"onDeactivate($event, group)\"\n [noBarWhenZero]=\"noBarWhenZero\"\n />\n </svg:g>\n </svg:g>\n <svg:g *ngIf=\"isSSR\">\n <svg:g *ngFor=\"let group of results; trackBy: trackBy\" [attr.transform]=\"groupTransform(group)\">\n <svg:g\n ngx-charts-series-horizontal\n [type]=\"barChartType.Normalized\"\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [activeEntries]=\"activeEntries\"\n [colors]=\"colors\"\n [series]=\"group.series\"\n [dims]=\"dims\"\n [gradient]=\"gradient\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [seriesName]=\"group.name\"\n [animations]=\"animations\"\n (select)=\"onClick($event, group)\"\n (activate)=\"onActivate($event, group)\"\n (deactivate)=\"onDeactivate($event, group)\"\n [noBarWhenZero]=\"noBarWhenZero\"\n />\n </svg:g>\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrls: ['../common/base-chart.component.scss'],\n encapsulation: ViewEncapsulation.None,\n animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1,\n transform: '*'\n }),\n animate(500, style({ opacity: 0, transform: 'scale(0)' }))\n ])\n ])\n ]\n})\nexport class BarHorizontalNormalizedComponent extends BaseChartComponent {\n @Input() legend: boolean = false;\n @Input() legendTitle: string = 'Legend';\n @Input() legendPosition: LegendPosition = LegendPosition.Right;\n @Input() xAxis;\n @Input() yAxis;\n @Input() showXAxisLabel: boolean;\n @Input() showYAxisLabel: boolean;\n @Input() xAxisLabel: string;\n @Input() yAxisLabel: string;\n @Input() tooltipDisabled: boolean = false;\n @Input() gradient: boolean;\n @Input() showGridLines: boolean = true;\n @Input() activeEntries: any[] = [];\n @Input() schemeType: ScaleType;\n @Input() trimXAxisTicks: boolean = true;\n @Input() trimYAxisTicks: boolean = true;\n @Input() rotateXAxisTicks: boolean = true;\n @Input() maxXAxisTickLength: number = 16;\n @Input() maxYAxisTickLength: number = 16;\n @Input() xAxisTickFormatting: any;\n @Input() yAxisTickFormatting: any;\n @Input() xAxisTicks: any[];\n @Input() yAxisTicks: any[];\n @Input() barPadding: number = 8;\n @Input() roundDomains: boolean = false;\n @Input() noBarWhenZero: boolean = true;\n @Input() wrapTicks = false;\n\n @Output() activate: EventEmitter<any> = new EventEmitter();\n @Output() deactivate: EventEmitter<any> = new EventEmitter();\n\n @ContentChild('tooltipTemplate') tooltipTemplate: TemplateRef<any>;\n\n dims: ViewDimensions;\n groupDomain: string[];\n innerDomain: string[];\n valueDomain: [number, number] = [0, 100];\n xScale: any;\n yScale: any;\n transform: string;\n colors: ColorHelper;\n margin: number[] = [10, 20, 10, 20];\n xAxisHeight: number = 0;\n yAxisWidth: number = 0;\n legendOptions: LegendOptions;\n barChartType = BarChartType;\n isSSR = false;\n\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n\n update(): void {\n super.update();\n\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n\n this.formatDates();\n\n this.groupDomain = this.getGroupDomain();\n this.innerDomain = this.getInnerDomain();\n\n this.xScale = this.getXScale();\n this.yScale = this.getYScale();\n\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n }\n\n getGroupDomain(): string[] {\n const domain = [];\n\n for (const group of this.results) {\n if (!domain.includes(group.label)) {\n domain.push(group.label);\n }\n }\n\n return domain;\n }\n\n getInnerDomain(): string[] {\n const domain = [];\n\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.label)) {\n domain.push(d.label);\n }\n }\n }\n\n return domain;\n }\n\n getYScale(): any {\n const spacing = this.groupDomain.length / (this.dims.height / this.barPadding + 1);\n\n return scaleBand().rangeRound([0, this.dims.height]).paddingInner(spacing).domain(this.groupDomain);\n }\n\n getXScale(): any {\n const scale = scaleLinear().range([0, this.dims.width]).domain(this.valueDomain);\n return this.roundDomains ? scale.nice() : scale;\n }\n\n groupTransform(group: Series): string {\n return `translate(0, ${this.yScale(group.name)})`;\n }\n\n onClick(data, group?: Series): void {\n if (group) {\n data.series = group.name;\n }\n\n this.select.emit(data);\n }\n\n trackBy: TrackByFunction<Series> = (index: number, item: Series) => {\n return item.name;\n };\n\n setColors(): void {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.innerDomain;\n } else {\n domain = this.valueDomain;\n }\n\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n\n getLegendOptions(): LegendOptions {\n const opts = {\n scaleType: this.schemeType as any,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.innerDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n } else {\n opts.domain = this.valueDomain;\n opts.colors = this.colors.scale;\n }\n\n return opts;\n }\n\n updateYAxisWidth({ width }: { width: number }): void {\n this.yAxisWidth = width;\n this.update();\n }\n\n updateXAxisHeight({ height }: { height: number }): void {\n this.xAxisHeight = height;\n this.update();\n }\n\n onActivate(event, group: Series, fromLegend: boolean = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n\n const items = this.results\n .map(g => g.series)\n .flat()\n .filter(i => {\n if (fromLegend) {\n return i.label === item.name;\n } else {\n return i.name === item.name && i.series === item.series;\n }\n });\n\n this.activeEntries = [...items];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n\n onDeactivate(event, group: Series, fromLegend: boolean = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n\n this.activeEntries = this.activeEntries.filter(i => {\n if (fromLegend) {\n return i.label !== item.name;\n } else {\n return !(i.name === item.name && i.series === item.series);\n }\n });\n\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ContentChild,\n TemplateRef,\n TrackByFunction\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { trigger, style, animate, transition } from '@angular/animations';\n\nimport { scaleBand, scaleLinear } from 'd3-scale';\n\nimport { calculateViewDimensions } from '../common/view-dimensions.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { Series } from '../models/chart-data.model';\nimport { BaseChartComponent } from '../common/base-chart.component';\nimport { BarChartType } from './types/bar-chart-type.enum';\nimport { LegendOptions, LegendPosition } from '../common/types/legend.model';\nimport { ScaleType } from '../common/types/scale-type.enum';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\n\n@Component({\n selector: 'ngx-charts-bar-horizontal-stacked',\n template: `\n <ngx-charts-chart\n [view]=\"[width, height]\"\n [showLegend]=\"legend\"\n [legendOptions]=\"legendOptions\"\n [activeEntries]=\"activeEntries\"\n [animations]=\"animations\"\n (legendLabelActivate)=\"onActivate($event, undefined, true)\"\n (legendLabelDeactivate)=\"onDeactivate($event, undefined, true)\"\n (legendLabelClick)=\"onClick($event)\"\n >\n <svg:g [attr.transform]=\"transform\" class=\"bar-chart chart\">\n <svg:g\n ngx-charts-x-axis\n *ngIf=\"xAxis\"\n [xScale]=\"xScale\"\n [dims]=\"dims\"\n [showGridLines]=\"showGridLines\"\n [showLabel]=\"showXAxisLabel\"\n [labelText]=\"xAxisLabel\"\n [trimTicks]=\"trimXAxisTicks\"\n [rotateTicks]=\"rotateXAxisTicks\"\n [maxTickLength]=\"maxXAxisTickLength\"\n [tickFormatting]=\"xAxisTickFormatting\"\n [ticks]=\"xAxisTicks\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateXAxisHeight($event)\"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf=\"yAxis\"\n [yScale]=\"yScale\"\n [dims]=\"dims\"\n [showLabel]=\"showYAxisLabel\"\n [labelText]=\"yAxisLabel\"\n [trimTicks]=\"trimYAxisTicks\"\n [maxTickLength]=\"maxYAxisTickLength\"\n [tickFormatting]=\"yAxisTickFormatting\"\n [ticks]=\"yAxisTicks\"\n [yAxisOffset]=\"dataLabelMaxWidth.negative\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateYAxisWidth($event)\"\n ></svg:g>\n <svg:g *ngIf=\"!isSSR\">\n <svg:g\n *ngFor=\"let group of results; let index = index; trackBy: trackBy\"\n [@animationState]=\"'active'\"\n [attr.transform]=\"groupTransform(group)\"\n >\n <svg:g\n ngx-charts-series-horizontal\n [type]=\"barChartType.Stacked\"\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [colors]=\"colors\"\n [series]=\"group.series\"\n [activeEntries]=\"activeEntries\"\n [dims]=\"dims\"\n [gradient]=\"gradient\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [seriesName]=\"group.name\"\n [animations]=\"animations\"\n [showDataLabel]=\"showDataLabel\"\n [dataLabelFormatting]=\"dataLabelFormatting\"\n [noBarWhenZero]=\"noBarWhenZero\"\n (select)=\"onClick($event, group)\"\n (activate)=\"onActivate($event, group)\"\n (deactivate)=\"onDeactivate($event, group)\"\n (dataLabelWidthChanged)=\"onDataLabelMaxWidthChanged($event, index)\"\n />\n </svg:g>\n </svg:g>\n <svg:g *ngIf=\"isSSR\">\n <svg:g\n *ngFor=\"let group of results; let index = index; trackBy: trackBy\"\n [attr.transform]=\"groupTransform(group)\"\n >\n <svg:g\n ngx-charts-series-horizontal\n [type]=\"barChartType.Stacked\"\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [colors]=\"colors\"\n [series]=\"group.series\"\n [activeEntries]=\"activeEntries\"\n [dims]=\"dims\"\n [gradient]=\"gradient\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [seriesName]=\"group.name\"\n [animations]=\"animations\"\n [showDataLabel]=\"showDataLabel\"\n [dataLabelFormatting]=\"dataLabelFormatting\"\n [noBarWhenZero]=\"noBarWhenZero\"\n (select)=\"onClick($event, group)\"\n (activate)=\"onActivate($event, group)\"\n (deactivate)=\"onDeactivate($event, group)\"\n (dataLabelWidthChanged)=\"onDataLabelMaxWidthChanged($event, index)\"\n />\n </svg:g>\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrls: ['../common/base-chart.component.scss'],\n encapsulation: ViewEncapsulation.None,\n animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1,\n transform: '*'\n }),\n animate(500, style({ opacity: 0, transform: 'scale(0)' }))\n ])\n ])\n ]\n})\nexport class BarHorizontalStackedComponent extends BaseChartComponent {\n @Input() legend: boolean = false;\n @Input() legendTitle: string = 'Legend';\n @Input() legendPosition: LegendPosition = LegendPosition.Right;\n @Input() xAxis;\n @Input() yAxis;\n @Input() showXAxisLabel: boolean;\n @Input() showYAxisLabel: boolean;\n @Input() xAxisLabel: string;\n @Input() yAxisLabel: string;\n @Input() tooltipDisabled: boolean = false;\n @Input() gradient: boolean;\n @Input() showGridLines: boolean = true;\n @Input() activeEntries: any[] = [];\n @Input() schemeType: ScaleType;\n @Input() trimXAxisTicks: boolean = true;\n @Input() trimYAxisTicks: boolean = true;\n @Input() rotateXAxisTicks: boolean = true;\n @Input() maxXAxisTickLength: number = 16;\n @Input() maxYAxisTickLength: number = 16;\n @Input() xAxisTickFormatting: any;\n @Input() yAxisTickFormatting: any;\n @Input() xAxisTicks: any[];\n @Input() yAxisTicks: any[];\n @Input() barPadding: number = 8;\n @Input() roundDomains: boolean = false;\n @Input() xScaleMax: number;\n @Input() showDataLabel: boolean = false;\n @Input() dataLabelFormatting: any;\n @Input() noBarWhenZero: boolean = true;\n @Input() wrapTicks = false;\n\n @Output() activate: EventEmitter<any> = new EventEmitter();\n @Output() deactivate: EventEmitter<any> = new EventEmitter();\n\n @ContentChild('tooltipTemplate') tooltipTemplate: TemplateRef<any>;\n\n dims: ViewDimensions;\n groupDomain: string[];\n innerDomain: string[];\n valueDomain: [number, number];\n xScale: any;\n yScale: any;\n transform: string;\n colors: ColorHelper;\n margin = [10, 20, 10, 20];\n xAxisHeight: number = 0;\n yAxisWidth: number = 0;\n legendOptions: LegendOptions;\n dataLabelMaxWidth: any = { negative: 0, positive: 0 };\n\n barChartType = BarChartType;\n isSSR = false;\n\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n\n update(): void {\n super.update();\n\n if (!this.showDataLabel) {\n this.dataLabelMaxWidth = { negative: 0, positive: 0 };\n }\n\n this.margin = [10, 20 + this.dataLabelMaxWidth.positive, 10, 20 + this.dataLabelMaxWidth.negative];\n\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n\n this.formatDates();\n\n this.groupDomain = this.getGroupDomain();\n this.innerDomain = this.getInnerDomain();\n this.valueDomain = this.getValueDomain();\n\n this.xScale = this.getXScale();\n this.yScale = this.getYScale();\n\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n }\n\n getGroupDomain(): string[] {\n const domain = [];\n\n for (const group of this.results) {\n if (!domain.includes(group.label)) {\n domain.push(group.label);\n }\n }\n\n return domain;\n }\n\n getInnerDomain(): string[] {\n const domain = [];\n\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.label)) {\n domain.push(d.label);\n }\n }\n }\n\n return domain;\n }\n\n getValueDomain(): [number, number] {\n const domain = [];\n let smallest = 0;\n let biggest = 0;\n for (const group of this.results) {\n let smallestSum = 0;\n let biggestSum = 0;\n for (const d of group.series) {\n if (d.value < 0) {\n smallestSum += d.value;\n } else {\n biggestSum += d.value;\n }\n smallest = d.value < smallest ? d.value : smallest;\n biggest = d.value > biggest ? d.value : biggest;\n }\n domain.push(smallestSum);\n domain.push(biggestSum);\n }\n domain.push(smallest);\n domain.push(biggest);\n\n const min = Math.min(0, ...domain);\n const max = this.xScaleMax ? Math.max(this.xScaleMax, ...domain) : Math.max(...domain);\n return [min, max];\n }\n\n getYScale(): any {\n const spacing = this.groupDomain.length / (this.dims.height / this.barPadding + 1);\n\n return scaleBand().rangeRound([0, this.dims.height]).paddingInner(spacing).domain(this.groupDomain);\n }\n\n getXScale(): any {\n const scale = scaleLinear().range([0, this.dims.width]).domain(this.valueDomain);\n return this.roundDomains ? scale.nice() : scale;\n }\n\n groupTransform(group: Series): string {\n return `translate(0, ${this.yScale(group.name)})`;\n }\n\n onClick(data, group?: Series): void {\n if (group) {\n data.series = group.name;\n }\n\n this.select.emit(data);\n }\n\n trackBy: TrackByFunction<Series> = (index: number, item: Series) => {\n return item.name;\n };\n\n setColors(): void {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.innerDomain;\n } else {\n domain = this.valueDomain;\n }\n\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n\n getLegendOptions(): LegendOptions {\n const opts = {\n scaleType: this.schemeType as any,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.innerDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n } else {\n opts.domain = this.valueDomain;\n opts.colors = this.colors.scale;\n }\n\n return opts;\n }\n\n updateYAxisWidth({ width }: { width: number }): void {\n this.yAxisWidth = width;\n this.update();\n }\n\n updateXAxisHeight({ height }: { height: number }): void {\n this.xAxisHeight = height;\n this.update();\n }\n\n onDataLabelMaxWidthChanged(event, groupIndex: number) {\n if (event.size.negative) {\n this.dataLabelMaxWidth.negative = Math.max(this.dataLabelMaxWidth.negative, event.size.width);\n } else {\n this.dataLabelMaxWidth.positive = Math.max(this.dataLabelMaxWidth.positive, event.size.width);\n }\n if (groupIndex === this.results.length - 1) {\n setTimeout(() => this.update());\n }\n }\n\n onActivate(event, group: Series, fromLegend: boolean = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n\n const items = this.results\n .map(g => g.series)\n .flat()\n .filter(i => {\n if (fromLegend) {\n return i.label === item.name;\n } else {\n return i.name === item.name && i.series === item.series;\n }\n });\n\n this.activeEntries = [...items];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n\n onDeactivate(event, group: Series, fromLegend: boolean = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n\n this.activeEntries = this.activeEntries.filter(i => {\n if (fromLegend) {\n return i.label !== item.name;\n } else {\n return !(i.name === item.name && i.series === item.series);\n }\n });\n\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n OnChanges,\n ChangeDetectionStrategy,\n TemplateRef,\n PLATFORM_ID,\n Inject\n} from '@angular/core';\nimport { trigger, style, animate, transition } from '@angular/animations';\nimport { formatLabel, escapeLabel } from '../common/label.helper';\nimport { DataItem, StringOrNumberOrDate } from '../models/chart-data.model';\nimport { PlacementTypes } from '../common/tooltip/position';\nimport { StyleTypes } from '../common/tooltip/style.type';\nimport { ColorHelper } from '../common/color.helper';\nimport { BarChartType } from './types/bar-chart-type.enum';\nimport { D0Types } from './types/d0-type.enum';\nimport { Bar } from './types/bar.model';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\nimport { BarOrientation } from '../common/types/bar-orientation.enum';\nimport { ScaleType } from '../common/types/scale-type.enum';\nimport { isPlatformServer } from '@angular/common';\n\n@Component({\n selector: 'g[ngx-charts-series-vertical]',\n template: `\n <svg:g *ngIf=\"!isSSR\">\n <svg:g\n ngx-charts-bar\n *ngFor=\"let bar of bars; trackBy: trackBy\"\n [@animationState]=\"'active'\"\n [@.disabled]=\"!animations\"\n [width]=\"bar.width\"\n [height]=\"bar.height\"\n [x]=\"bar.x\"\n [y]=\"bar.y\"\n [fill]=\"bar.color\"\n [stops]=\"bar.gradientStops\"\n [data]=\"bar.data\"\n [orientation]=\"barOrientation.Vertical\"\n [roundEdges]=\"bar.roundEdges\"\n [gradient]=\"gradient\"\n [ariaLabel]=\"bar.ariaLabel\"\n [isActive]=\"isActive(bar.data)\"\n (select)=\"onClick($event)\"\n (activate)=\"activate.emit($event)\"\n (deactivate)=\"deactivate.emit($event)\"\n ngx-tooltip\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipPlacement]=\"tooltipPlacement\"\n [tooltipType]=\"tooltipType\"\n [tooltipTitle]=\"tooltipTemplate ? undefined : bar.tooltipText\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipContext]=\"bar.data\"\n [noBarWhenZero]=\"noBarWhenZero\"\n [animations]=\"animations\"\n ></svg:g>\n </svg:g>\n <svg:g *ngIf=\"isSSR\">\n <svg:g\n ngx-charts-bar\n *ngFor=\"let bar of bars; trackBy: trackBy\"\n [width]=\"bar.width\"\n [height]=\"bar.height\"\n [x]=\"bar.x\"\n [y]=\"bar.y\"\n [fill]=\"bar.color\"\n [stops]=\"bar.gradientStops\"\n [data]=\"bar.data\"\n [orientation]=\"barOrientation.Vertical\"\n [roundEdges]=\"bar.roundEdges\"\n [gradient]=\"gradient\"\n [ariaLabel]=\"bar.ariaLabel\"\n [isActive]=\"isActive(bar.data)\"\n (select)=\"onClick($event)\"\n (activate)=\"activate.emit($event)\"\n (deactivate)=\"deactivate.emit($event)\"\n ngx-tooltip\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipPlacement]=\"tooltipPlacement\"\n [tooltipType]=\"tooltipType\"\n [tooltipTitle]=\"tooltipTemplate ? undefined : bar.tooltipText\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipContext]=\"bar.data\"\n [noBarWhenZero]=\"noBarWhenZero\"\n [animations]=\"animations\"\n ></svg:g>\n </svg:g>\n <svg:g *ngIf=\"showDataLabel\">\n <svg:g\n ngx-charts-bar-label\n *ngFor=\"let b of barsForDataLabels; let i = index; trackBy: trackDataLabelBy\"\n [barX]=\"b.x\"\n [barY]=\"b.y\"\n [barWidth]=\"b.width\"\n [barHeight]=\"b.height\"\n [value]=\"b.total\"\n [valueFormatting]=\"dataLabelFormatting\"\n [orientation]=\"barOrientation.Vertical\"\n (dimensionsChanged)=\"dataLabelHeightChanged.emit({ size: $event, index: i })\"\n />\n </svg:g>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1\n }),\n animate(500, style({ opacity: 0 }))\n ])\n ])\n ]\n})\nexport class SeriesVerticalComponent implements OnChanges {\n @Input() dims: ViewDimensions;\n @Input() type: BarChartType = BarChartType.Standard;\n @Input() series: DataItem[];\n @Input() xScale;\n @Input() yScale;\n @Input() colors: ColorHelper;\n @Input() gradient: boolean;\n @Input() activeEntries: DataItem[];\n @Input() seriesName: StringOrNumberOrDate;\n @Input() tooltipDisabled: boolean = false;\n @Input() tooltipTemplate: TemplateRef<any>;\n @Input() roundEdges: boolean;\n @Input() animations: boolean = true;\n @Input() showDataLabel: boolean = false;\n @Input() dataLabelFormatting: any;\n @Input() noBarWhenZero: boolean = true;\n\n @Output() select: EventEmitter<DataItem> = new EventEmitter();\n @Output() activate = new EventEmitter();\n @Output() deactivate = new EventEmitter();\n @Output() dataLabelHeightChanged = new EventEmitter();\n\n tooltipPlacement: PlacementTypes;\n tooltipType: StyleTypes;\n\n bars: Bar[];\n barsForDataLabels: Array<{ x: number; y: number; width: number; height: number; total: number; series: string }> = [];\n\n barOrientation = BarOrientation;\n\n isSSR = false;\n\n constructor(@Inject(PLATFORM_ID) private platformId: any) {}\n\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n\n ngOnChanges(changes): void {\n this.update();\n }\n\n update(): void {\n this.updateTooltipSettings();\n let width;\n if (this.series.length) {\n width = this.xScale.bandwidth();\n }\n width = Math.round(width);\n const yScaleMin = Math.max(this.yScale.domain()[0], 0);\n\n const d0 = {\n [D0Types.positive]: 0,\n [D0Types.negative]: 0\n };\n let d0Type = D0Types.positive;\n\n let total;\n if (this.type === BarChartType.Normalized) {\n total = this.series.map(d => d.value).reduce((sum, d) => sum + d, 0);\n }\n\n this.bars = this.series.map((d, index) => {\n let value = d.value as any;\n const label = this.getLabel(d);\n const formattedLabel = formatLabel(label);\n const roundEdges = this.roundEdges;\n d0Type = value > 0 ? D0Types.positive : D0Types.negative;\n\n const bar: any = {\n value,\n label,\n roundEdges,\n data: d,\n width,\n formattedLabel,\n height: 0,\n x: 0,\n y: 0\n };\n\n if (this.type === BarChartType.Standard) {\n bar.height = Math.abs(this.yScale(value) - this.yScale(yScaleMin));\n bar.x = this.xScale(label);\n\n if (value < 0) {\n bar.y = this.yScale(0);\n } else {\n bar.y = this.yScale(value);\n }\n } else if (this.type === BarChartType.Stacked) {\n const offset0 = d0[d0Type];\n const offset1 = offset0 + value;\n d0[d0Type] += value;\n\n bar.height = this.yScale(offset0) - this.yScale(offset1);\n bar.x = 0;\n bar.y = this.yScale(offset1);\n bar.offset0 = offset0;\n bar.offset1 = offset1;\n } else if (this.type === BarChartType.Normalized) {\n let offset0 = d0[d0Type];\n let offset1 = offset0 + value;\n d0[d0Type] += value;\n\n if (total > 0) {\n offset0 = (offset0 * 100) / total;\n offset1 = (offset1 * 100) / total;\n } else {\n offset0 = 0;\n offset1 = 0;\n }\n\n bar.height = this.yScale(offset0) - this.yScale(offset1);\n bar.x = 0;\n bar.y = this.yScale(offset1);\n bar.offset0 = offset0;\n bar.offset1 = offset1;\n value = (offset1 - offset0).toFixed(2) + '%';\n }\n\n if (this.colors.scaleType === ScaleType.Ordinal) {\n bar.color = this.colors.getColor(label);\n } else {\n if (this.type === BarChartType.Standard) {\n bar.color = this.colors.getColor(value);\n bar.gradientStops = this.colors.getLinearGradientStops(value);\n } else {\n bar.color = this.colors.getColor(bar.offset1);\n bar.gradientStops = this.colors.getLinearGradientStops(bar.offset1, bar.offset0);\n }\n }\n\n let tooltipLabel = formattedLabel;\n bar.ariaLabel = formattedLabel + ' ' + value.toLocaleString();\n if (this.seriesName !== null && this.seriesName !== undefined) {\n tooltipLabel = `${this.seriesName} • ${formattedLabel}`;\n bar.data.series = this.seriesName;\n bar.ariaLabel = this.seriesName + ' ' + bar.ariaLabel;\n }\n\n bar.tooltipText = this.tooltipDisabled\n ? undefined\n : `\n <span class=\"tooltip-label\">${escapeLabel(tooltipLabel)}</span>\n <span class=\"tooltip-val\">${\n this.dataLabelFormatting ? this.dataLabelFormatting(value) : value.toLocaleString()\n }</span>\n `;\n\n return bar;\n });\n\n this.updateDataLabels();\n }\n\n updateDataLabels(): void {\n if (this.type === BarChartType.Stacked) {\n this.barsForDataLabels = [];\n const section: any = {};\n section.series = this.seriesName;\n const totalPositive = this.series.map(d => d.value).reduce((sum, d) => (d > 0 ? sum + d : sum), 0);\n const totalNegative = this.series.map(d => d.value).reduce((sum, d) => (d < 0 ? sum + d : sum), 0);\n section.total = totalPositive + totalNegative;\n section.x = 0;\n section.y = 0;\n if (section.total > 0) {\n section.height = this.yScale(totalPositive);\n } else {\n section.height = this.yScale(totalNegative);\n }\n section.width = this.xScale.bandwidth();\n this.barsForDataLabels.push(section);\n } else {\n this.barsForDataLabels = this.series.map(d => {\n const section: any = {};\n section.series = this.seriesName ?? d.label;\n section.total = d.value;\n section.x = this.xScale(d.label);\n section.y = this.yScale(0);\n section.height = this.yScale(section.total) - this.yScale(0);\n section.width = this.xScale.bandwidth();\n return section;\n });\n }\n }\n\n updateTooltipSettings(): void {\n this.tooltipPlacement = this.tooltipDisabled ? undefined : PlacementTypes.Top;\n this.tooltipType = this.tooltipDisabled ? undefined : StyleTypes.tooltip;\n }\n\n isActive(entry: DataItem): boolean {\n if (!this.activeEntries) return false;\n\n const item = this.activeEntries.find(active => {\n return entry.name === active.name && entry.value === active.value;\n });\n\n return item !== undefined;\n }\n\n onClick(data: DataItem): void {\n this.select.emit(data);\n }\n\n getLabel(dataItem: DataItem): StringOrNumberOrDate {\n if (dataItem.label) {\n return dataItem.label;\n }\n return dataItem.name;\n }\n\n trackBy(index: number, bar: Bar): string {\n return bar.label;\n }\n\n trackDataLabelBy(index: number, barLabel: any): string {\n return index + '#' + barLabel.series + '#' + barLabel.total;\n }\n}\n","import {\n Component,\n Input,\n ViewEncapsulation,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n ContentChild,\n TemplateRef\n} from '@angular/core';\nimport { scaleBand, scaleLinear } from 'd3-scale';\n\nimport { calculateViewDimensions } from '../common/view-dimensions.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { BaseChartComponent } from '../common/base-chart.component';\nimport { DataItem } from '../models/chart-data.model';\nimport { LegendOptions, LegendPosition } from '../common/types/legend.model';\nimport { ScaleType } from '../common/types/scale-type.enum';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\n\n@Component({\n selector: 'ngx-charts-bar-vertical',\n template: `\n <ngx-charts-chart\n [view]=\"[width, height]\"\n [showLegend]=\"legend\"\n [legendOptions]=\"legendOptions\"\n [activeEntries]=\"activeEntries\"\n [animations]=\"animations\"\n (legendLabelClick)=\"onClick($event)\"\n (legendLabelActivate)=\"onActivate($event, true)\"\n (legendLabelDeactivate)=\"onDeactivate($event, true)\"\n >\n <svg:g [attr.transform]=\"transform\" class=\"bar-chart chart\">\n <svg:g\n ngx-charts-x-axis\n *ngIf=\"xAxis\"\n [xScale]=\"xScale\"\n [dims]=\"dims\"\n [showGridLines]=\"showGridLines\"\n [showLabel]=\"showXAxisLabel\"\n [labelText]=\"xAxisLabel\"\n [trimTicks]=\"trimXAxisTicks\"\n [rotateTicks]=\"rotateXAxisTicks\"\n [maxTickLength]=\"maxXAxisTickLength\"\n [tickFormatting]=\"xAxisTickFormatting\"\n [ticks]=\"xAxisTicks\"\n [xAxisOffset]=\"dataLabelMaxHeight.negative\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateXAxisHeight($event)\"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf=\"yAxis\"\n [yScale]=\"yScale\"\n [dims]=\"dims\"\n [showGridLines]=\"showGridLines\"\n [showLabel]=\"showYAxisLabel\"\n [labelText]=\"yAxisLabel\"\n [trimTicks]=\"trimYAxisTicks\"\n [maxTickLength]=\"maxYAxisTickLength\"\n [tickFormatting]=\"yAxisTickFormatting\"\n [ticks]=\"yAxisTicks\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateYAxisWidth($event)\"\n ></svg:g>\n <svg:g\n ngx-charts-series-vertical\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [colors]=\"colors\"\n [series]=\"results\"\n [dims]=\"dims\"\n [gradient]=\"gradient\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [showDataLabel]=\"showDataLabel\"\n [dataLabelFormatting]=\"dataLabelFormatting\"\n [activeEntries]=\"activeEntries\"\n [roundEdges]=\"roundEdges\"\n [animations]=\"animations\"\n [noBarWhenZero]=\"noBarWhenZero\"\n (activate)=\"onActivate($event)\"\n (deactivate)=\"onDeactivate($event)\"\n (select)=\"onClick($event)\"\n (dataLabelHeightChanged)=\"onDataLabelMaxHeightChanged($event)\"\n ></svg:g>\n </svg:g>\n </ngx-charts-chart>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrls: ['../common/base-chart.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class BarVerticalComponent extends BaseChartComponent {\n @Input() legend = false;\n @Input() legendTitle: string = 'Legend';\n @Input() legendPosition: LegendPosition = LegendPosition.Right;\n @Input() xAxis;\n @Input() yAxis;\n @Input() showXAxisLabel: boolean;\n @Input() showYAxisLabel: boolean;\n @Input() xAxisLabel: string;\n @Input() yAxisLabel: string;\n @Input() tooltipDisabled: boolean = false;\n @Input() gradient: boolean;\n @Input() showGridLines: boolean = true;\n @Input() activeEntries: any[] = [];\n @Input() schemeType: ScaleType;\n @Input() trimXAxisTicks: boolean = true;\n @Input() trimYAxisTicks: boolean = true;\n @Input() rotateXAxisTicks: boolean = true;\n @Input() maxXAxisTickLength: number = 16;\n @Input() maxYAxisTickLength: number = 16;\n @Input() xAxisTickFormatting: any;\n @Input() yAxisTickFormatting: any;\n @Input() xAxisTicks: any[];\n @Input() yAxisTicks: any[];\n @Input() barPadding = 8;\n @Input() roundDomains: boolean = false;\n @Input() roundEdges: boolean = true;\n @Input() yScaleMax: number;\n @Input() yScaleMin: number;\n @Input() showDataLabel: boolean = false;\n @Input() dataLabelFormatting: any;\n @Input() noBarWhenZero: boolean = true;\n @Input() wrapTicks = false;\n\n @Output() activate: EventEmitter<any> = new EventEmitter();\n @Output() deactivate: EventEmitter<any> = new EventEmitter();\n\n @ContentChild('tooltipTemplate') tooltipTemplate: TemplateRef<any>;\n\n dims: ViewDimensions;\n xScale: any;\n yScale: any;\n xDomain: any;\n yDomain: any;\n transform: string;\n colors: ColorHelper;\n margin: number[] = [10, 20, 10, 20];\n xAxisHeight: number = 0;\n yAxisWidth: number = 0;\n legendOptions: LegendOptions;\n dataLabelMaxHeight: any = { negative: 0, positive: 0 };\n\n update(): void {\n super.update();\n\n if (!this.showDataLabel) {\n this.dataLabelMaxHeight = { negative: 0, positive: 0 };\n }\n this.margin = [10 + this.dataLabelMaxHeight.positive, 20, 10 + this.dataLabelMaxHeight.negative, 20];\n\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n\n this.formatDates();\n\n if (this.showDataLabel) {\n this.dims.height -= this.dataLabelMaxHeight.negative;\n }\n this.xScale = this.getXScale();\n this.yScale = this.getYScale();\n\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0] + this.dataLabelMaxHeight.negative})`;\n }\n\n getXScale(): any {\n this.xDomain = this.getXDomain();\n const spacing = this.xDomain.length / (this.dims.width / this.barPadding + 1);\n return scaleBand().range([0, this.dims.width]).paddingInner(spacing).domain(this.xDomain);\n }\n\n getYScale(): any {\n this.yDomain = this.getYDomain();\n const scale = scaleLinear().range([this.dims.height, 0]).domain(this.yDomain);\n return this.roundDomains ? scale.nice() : scale;\n }\n\n getXDomain(): any[] {\n return this.results.map(d => d.label);\n }\n\n getYDomain(): [number, number] {\n const values = this.results.map(d => d.value);\n\n let min = this.yScaleMin ? Math.min(this.yScaleMin, ...values) : Math.min(0, ...values);\n if (this.yAxisTicks && !this.yAxisTicks.some(isNaN)) {\n min = Math.min(min, ...this.yAxisTicks);\n }\n\n let max = this.yScaleMax ? Math.max(this.yScaleMax, ...values) : Math.max(0, ...values);\n if (this.yAxisTicks && !this.yAxisTicks.some(isNaN)) {\n max = Math.max(max, ...this.yAxisTicks);\n }\n return [min, max];\n }\n\n onClick(data: DataItem | string) {\n this.select.emit(data);\n }\n\n setColors(): void {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.xDomain;\n } else {\n domain = this.yDomain;\n }\n\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n\n getLegendOptions() {\n const opts = {\n scaleType: this.schemeType as any,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.xDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n } else {\n opts.domain = this.yDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n\n updateYAxisWidth({ width }): void {\n this.yAxisWidth = width;\n this.update();\n }\n\n updateXAxisHeight({ height }): void {\n this.xAxisHeight = height;\n this.update();\n }\n\n onDataLabelMaxHeightChanged(event) {\n if (event.size.negative) {\n this.dataLabelMaxHeight.negative = Math.max(this.dataLabelMaxHeight.negative, event.size.height);\n } else {\n this.dataLabelMaxHeight.positive = Math.max(this.dataLabelMaxHeight.positive, event.size.height);\n }\n if (event.index === this.results.length - 1) {\n setTimeout(() => this.update());\n }\n }\n\n onActivate(item, fromLegend = false) {\n item = this.results.find(d => {\n if (fromLegend) {\n return d.label === item.name;\n } else {\n return d.name === item.name;\n }\n });\n\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value && d.series === item.series;\n });\n if (idx > -1) {\n return;\n }\n\n this.activeEntries = [item, ...this.activeEntries];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n\n onDeactivate(item, fromLegend = false) {\n item = this.results.find(d => {\n if (fromLegend) {\n return d.label === item.name;\n } else {\n return d.name === item.name;\n }\n });\n\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value && d.series === item.series;\n });\n\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n}\n","import {\n Component,\n Input,\n Output,\n ViewEncapsulation,\n EventEmitter,\n ChangeDetectionStrategy,\n ContentChild,\n TemplateRef,\n TrackByFunction\n} from '@angular/core';\nimport { trigger, style, animate, transition } from '@angular/animations';\nimport { scaleBand, scaleLinear } from 'd3-scale';\n\nimport { calculateViewDimensions } from '../common/view-dimensions.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { DataItem } from '../models/chart-data.model';\n\nimport { BaseChartComponent } from '../common/base-chart.component';\nimport { LegendOptions, LegendPosition } from '../common/types/legend.model';\nimport { ScaleType } from '../common/types/scale-type.enum';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\nimport { BarOrientation } from '../common/types/bar-orientation.enum';\nimport { isPlatformServer } from '@angular/common';\n\n@Component({\n selector: 'ngx-charts-bar-vertical-2d',\n template: `\n <ngx-charts-chart\n [view]=\"[width, height]\"\n [showLegend]=\"legend\"\n [legendOptions]=\"legendOptions\"\n [activeEntries]=\"activeEntries\"\n [animations]=\"animations\"\n (legendLabelActivate)=\"onActivate($event, undefined, true)\"\n (legendLabelDeactivate)=\"onDeactivate($event, undefined, true)\"\n (legendLabelClick)=\"onClick($event)\"\n >\n <svg:g [attr.transform]=\"transform\" class=\"bar-chart chart\">\n <svg:g\n ngx-charts-grid-panel-series\n [xScale]=\"groupScale\"\n [yScale]=\"valueScale\"\n [data]=\"results\"\n [dims]=\"dims\"\n [orient]=\"barOrientation.Vertical\"\n ></svg:g>\n <svg:g\n ngx-charts-x-axis\n *ngIf=\"xAxis\"\n [xScale]=\"groupScale\"\n [dims]=\"dims\"\n [showLabel]=\"showXAxisLabel\"\n [labelText]=\"xAxisLabel\"\n [trimTicks]=\"trimXAxisTicks\"\n [rotateTicks]=\"rotateXAxisTicks\"\n [maxTickLength]=\"maxXAxisTickLength\"\n [tickFormatting]=\"xAxisTickFormatting\"\n [ticks]=\"xAxisTicks\"\n [xAxisOffset]=\"dataLabelMaxHeight.negative\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateXAxisHeight($event)\"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf=\"yAxis\"\n [yScale]=\"valueScale\"\n [dims]=\"dims\"\n [showGridLines]=\"showGridLines\"\n [showLabel]=\"showYAxisLabel\"\n [labelText]=\"yAxisLabel\"\n [trimTicks]=\"trimYAxisTicks\"\n [maxTickLength]=\"maxYAxisTickLength\"\n [tickFormatting]=\"yAxisTickFormatting\"\n [ticks]=\"yAxisTicks\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateYAxisWidth($event)\"\n ></svg:g>\n <svg:g *ngIf=\"!isSSR\">\n <svg:g\n ngx-charts-series-vertical\n *ngFor=\"let group of results; let index = index; trackBy: trackBy\"\n [@animationState]=\"'active'\"\n [attr.transform]=\"groupTransform(group)\"\n [activeEntries]=\"activeEntries\"\n [xScale]=\"innerScale\"\n [yScale]=\"valueScale\"\n [colors]=\"colors\"\n [series]=\"group.series\"\n [dims]=\"dims\"\n [gradient]=\"gradient\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [showDataLabel]=\"showDataLabel\"\n [dataLabelFormatting]=\"dataLabelFormatting\"\n [seriesName]=\"group.name\"\n [roundEdges]=\"roundEdges\"\n [animations]=\"animations\"\n [noBarWhenZero]=\"noBarWhenZero\"\n (select)=\"onClick($event, group)\"\n (activate)=\"onActivate($event, group)\"\n (deactivate)=\"onDeactivate($event, group)\"\n (dataLabelHeightChanged)=\"onDataLabelMaxHeightChanged($event, index)\"\n />\n </svg:g>\n </svg:g>\n <svg:g *ngIf=\"isSSR\">\n <svg:g\n ngx-charts-series-vertical\n *ngFor=\"let group of results; let index = index; trackBy: trackBy\"\n [attr.transform]=\"groupTransform(group)\"\n [activeEntries]=\"activeEntries\"\n [xScale]=\"innerScale\"\n [yScale]=\"valueScale\"\n [colors]=\"colors\"\n [series]=\"group.series\"\n [dims]=\"dims\"\n [gradient]=\"gradient\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [showDataLabel]=\"showDataLabel\"\n [dataLabelFormatting]=\"dataLabelFormatting\"\n [seriesName]=\"group.name\"\n [roundEdges]=\"roundEdges\"\n [animations]=\"animations\"\n [noBarWhenZero]=\"noBarWhenZero\"\n (select)=\"onClick($event, group)\"\n (activate)=\"onActivate($event, group)\"\n (deactivate)=\"onDeactivate($event, group)\"\n (dataLabelHeightChanged)=\"onDataLabelMaxHeightChanged($event, index)\"\n />\n </svg:g>\n </ngx-charts-chart>\n `,\n styleUrls: ['../common/base-chart.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1,\n transform: '*'\n }),\n animate(500, style({ opacity: 0, transform: 'scale(0)' }))\n ])\n ])\n ]\n})\nexport class BarVertical2DComponent extends BaseChartComponent {\n @Input() legend: boolean = false;\n @Input() legendTitle: string = 'Legend';\n @Input() legendPosition: LegendPosition = LegendPosition.Right;\n @Input() xAxis;\n @Input() yAxis;\n @Input() showXAxisLabel: boolean;\n @Input() showYAxisLabel: boolean;\n @Input() xAxisLabel: string;\n @Input() yAxisLabel: string;\n @Input() tooltipDisabled: boolean = false;\n @Input() scaleType: ScaleType = ScaleType.Ordinal;\n @Input() gradient: boolean;\n @Input() showGridLines: boolean = true;\n @Input() activeEntries: any[] = [];\n @Input() schemeType: ScaleType;\n @Input() trimXAxisTicks: boolean = true;\n @Input() trimYAxisTicks: boolean = true;\n @Input() rotateXAxisTicks: boolean = true;\n @Input() maxXAxisTickLength: number = 16;\n @Input() maxYAxisTickLength: number = 16;\n @Input() xAxisTickFormatting: any;\n @Input() yAxisTickFormatting: any;\n @Input() xAxisTicks: any[];\n @Input() yAxisTicks: any[];\n @Input() groupPadding: number = 16;\n @Input() barPadding: number = 8;\n @Input() roundDomains: boolean = false;\n @Input() roundEdges: boolean = true;\n @Input() yScaleMax: number;\n @Input() showDataLabel: boolean = false;\n @Input() dataLabelFormatting: any;\n @Input() noBarWhenZero: boolean = true;\n @Input() wrapTicks = false;\n\n @Output() activate: EventEmitter<any> = new EventEmitter();\n @Output() deactivate: EventEmitter<any> = new EventEmitter();\n\n @ContentChild('tooltipTemplate') tooltipTemplate: TemplateRef<any>;\n\n dims: ViewDimensions;\n groupDomain: string[];\n innerDomain: string[];\n valueDomain: [number, number];\n groupScale: any;\n innerScale: any;\n valueScale: any;\n transform: string;\n colors: ColorHelper;\n margin: number[] = [10, 20, 10, 20];\n xAxisHeight: number = 0;\n yAxisWidth: number = 0;\n legendOptions: LegendOptions;\n dataLabelMaxHeight: any = { negative: 0, positive: 0 };\n isSSR = false;\n\n barOrientation = BarOrientation;\n\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n\n update(): void {\n super.update();\n\n if (!this.showDataLabel) {\n this.dataLabelMaxHeight = { negative: 0, positive: 0 };\n }\n this.margin = [10 + this.dataLabelMaxHeight.positive, 20, 10 + this.dataLabelMaxHeight.negative, 20];\n\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n\n if (this.showDataLabel) {\n this.dims.height -= this.dataLabelMaxHeight.negative;\n }\n\n this.formatDates();\n\n this.groupDomain = this.getGroupDomain();\n this.innerDomain = this.getInnerDomain();\n this.valueDomain = this.getValueDomain();\n\n this.groupScale = this.getGroupScale();\n this.innerScale = this.getInnerScale();\n this.valueScale = this.getValueScale();\n\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0] + this.dataLabelMaxHeight.negative})`;\n }\n\n onDataLabelMaxHeightChanged(event, groupIndex: number): void {\n if (event.size.negative) {\n this.dataLabelMaxHeight.negative = Math.max(this.dataLabelMaxHeight.negative, event.size.height);\n } else {\n this.dataLabelMaxHeight.positive = Math.max(this.dataLabelMaxHeight.positive, event.size.height);\n }\n if (groupIndex === this.results.length - 1) {\n setTimeout(() => this.update());\n }\n }\n\n getGroupScale(): any {\n const spacing = this.groupDomain.length / (this.dims.height / this.groupPadding + 1);\n\n return scaleBand()\n .rangeRound([0, this.dims.width])\n .paddingInner(spacing)\n .paddingOuter(spacing / 2)\n .domain(this.groupDomain);\n }\n\n getInnerScale(): any {\n const width = this.groupScale.bandwidth();\n const spacing = this.innerDomain.length / (width / this.barPadding + 1);\n return scaleBand().rangeRound([0, width]).paddingInner(spacing).domain(this.innerDomain);\n }\n\n getValueScale(): any {\n const scale = scaleLinear().range([this.dims.height, 0]).domain(this.valueDomain);\n return this.roundDomains ? scale.nice() : scale;\n }\n\n getGroupDomain(): string[] {\n const domain = [];\n for (const group of this.results) {\n if (!domain.includes(group.label)) {\n domain.push(group.label);\n }\n }\n\n return domain;\n }\n\n getInnerDomain(): string[] {\n const domain = [];\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.label)) {\n domain.push(d.label);\n }\n }\n }\n\n return domain;\n }\n\n getValueDomain(): [number, number] {\n const domain = [];\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.value)) {\n domain.push(d.value);\n }\n }\n }\n\n const min = Math.min(0, ...domain);\n const max = this.yScaleMax ? Math.max(this.yScaleMax, ...domain) : Math.max(0, ...domain);\n\n return [min, max];\n }\n\n groupTransform(group: DataItem): string {\n return `translate(${this.groupScale(group.label)}, 0)`;\n }\n\n onClick(data, group?: DataItem): void {\n if (group) {\n data.series = group.name;\n }\n\n this.select.emit(data);\n }\n\n trackBy: TrackByFunction<DataItem> = (index: number, item: DataItem) => {\n return item.name;\n };\n\n setColors(): void {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.innerDomain;\n } else {\n domain = this.valueDomain;\n }\n\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n\n getLegendOptions(): LegendOptions {\n const opts = {\n scaleType: this.schemeType as any,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.innerDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n } else {\n opts.domain = this.valueDomain;\n opts.colors = this.colors.scale;\n }\n\n return opts;\n }\n\n updateYAxisWidth({ width }: { width: number }): void {\n this.yAxisWidth = width;\n this.update();\n }\n\n updateXAxisHeight({ height }: { height: number }): void {\n this.xAxisHeight = height;\n this.update();\n }\n\n onActivate(event, group: DataItem, fromLegend: boolean = false): void {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n\n const items = this.results\n .map(g => g.series)\n .flat()\n .filter(i => {\n if (fromLegend) {\n return i.label === item.name;\n } else {\n return i.name === item.name && i.series === item.series;\n }\n });\n\n this.activeEntries = [...items];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n\n onDeactivate(event, group: DataItem, fromLegend: boolean = false): void {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n\n this.activeEntries = this.activeEntries.filter(i => {\n if (fromLegend) {\n return i.label !== item.name;\n } else {\n return !(i.name === item.name && i.series === item.series);\n }\n });\n\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ContentChild,\n TemplateRef,\n TrackByFunction\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { trigger, style, animate, transition } from '@angular/animations';\nimport { scaleBand, scaleLinear } from 'd3-scale';\n\nimport { calculateViewDimensions } from '../common/view-dimensions.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { Series } from '../models/chart-data.model';\nimport { BaseChartComponent } from '../common/base-chart.component';\nimport { BarChartType } from './types/bar-chart-type.enum';\nimport { LegendOptions, LegendPosition } from '../common/types/legend.model';\nimport { ScaleType } from '../common/types/scale-type.enum';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\n\n@Component({\n selector: 'ngx-charts-bar-vertical-normalized',\n template: `\n <ngx-charts-chart\n [view]=\"[width, height]\"\n [showLegend]=\"legend\"\n [legendOptions]=\"legendOptions\"\n [activeEntries]=\"activeEntries\"\n [animations]=\"animations\"\n (legendLabelActivate)=\"onActivate($event, undefined, true)\"\n (legendLabelDeactivate)=\"onDeactivate($event, undefined, true)\"\n (legendLabelClick)=\"onClick($event)\"\n >\n <svg:g [attr.transform]=\"transform\" class=\"bar-chart chart\">\n <svg:g\n ngx-charts-x-axis\n *ngIf=\"xAxis\"\n [xScale]=\"xScale\"\n [dims]=\"dims\"\n [showLabel]=\"showXAxisLabel\"\n [labelText]=\"xAxisLabel\"\n [trimTicks]=\"trimXAxisTicks\"\n [rotateTicks]=\"rotateXAxisTicks\"\n [maxTickLength]=\"maxXAxisTickLength\"\n [tickFormatting]=\"xAxisTickFormatting\"\n [ticks]=\"xAxisTicks\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateXAxisHeight($event)\"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf=\"yAxis\"\n [yScale]=\"yScale\"\n [dims]=\"dims\"\n [showGridLines]=\"showGridLines\"\n [showLabel]=\"showYAxisLabel\"\n [labelText]=\"yAxisLabel\"\n [trimTicks]=\"trimYAxisTicks\"\n [maxTickLength]=\"maxYAxisTickLength\"\n [tickFormatting]=\"yAxisTickFormatting\"\n [ticks]=\"yAxisTicks\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateYAxisWidth($event)\"\n ></svg:g>\n <svg:g *ngIf=\"!isSSR\">\n <svg:g\n *ngFor=\"let group of results; trackBy: trackBy\"\n [@animationState]=\"'active'\"\n [attr.transform]=\"groupTransform(group)\"\n >\n <svg:g\n ngx-charts-series-vertical\n [type]=\"barChartType.Normalized\"\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [activeEntries]=\"activeEntries\"\n [colors]=\"colors\"\n [series]=\"group.series\"\n [dims]=\"dims\"\n [gradient]=\"gradient\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [seriesName]=\"group.name\"\n [animations]=\"animations\"\n [noBarWhenZero]=\"noBarWhenZero\"\n (select)=\"onClick($event, group)\"\n (activate)=\"onActivate($event, group)\"\n (deactivate)=\"onDeactivate($event, group)\"\n />\n </svg:g>\n </svg:g>\n <svg:g *ngIf=\"isSSR\">\n <svg:g *ngFor=\"let group of results; trackBy: trackBy\" [attr.transform]=\"groupTransform(group)\">\n <svg:g\n ngx-charts-series-vertical\n [type]=\"barChartType.Normalized\"\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [activeEntries]=\"activeEntries\"\n [colors]=\"colors\"\n [series]=\"group.series\"\n [dims]=\"dims\"\n [gradient]=\"gradient\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [seriesName]=\"group.name\"\n [animations]=\"animations\"\n [noBarWhenZero]=\"noBarWhenZero\"\n (select)=\"onClick($event, group)\"\n (activate)=\"onActivate($event, group)\"\n (deactivate)=\"onDeactivate($event, group)\"\n />\n </svg:g>\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n `,\n styleUrls: ['../common/base-chart.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1,\n transform: '*'\n }),\n animate(500, style({ opacity: 0, transform: 'scale(0)' }))\n ])\n ])\n ]\n})\nexport class BarVerticalNormalizedComponent extends BaseChartComponent {\n @Input() legend: boolean = false;\n @Input() legendTitle: string = 'Legend';\n @Input() legendPosition: LegendPosition = LegendPosition.Right;\n @Input() xAxis;\n @Input() yAxis;\n @Input() showXAxisLabel: boolean;\n @Input() showYAxisLabel: boolean;\n @Input() xAxisLabel: string;\n @Input() yAxisLabel: string;\n @Input() tooltipDisabled: boolean = false;\n @Input() gradient: boolean;\n @Input() showGridLines: boolean = true;\n @Input() activeEntries: any[] = [];\n @Input() schemeType: ScaleType;\n @Input() trimXAxisTicks: boolean = true;\n @Input() trimYAxisTicks: boolean = true;\n @Input() rotateXAxisTicks: boolean = true;\n @Input() maxXAxisTickLength: number = 16;\n @Input() maxYAxisTickLength: number = 16;\n @Input() xAxisTickFormatting: any;\n @Input() yAxisTickFormatting: any;\n @Input() xAxisTicks: any[];\n @Input() yAxisTicks: any[];\n @Input() barPadding: number = 8;\n @Input() roundDomains: boolean = false;\n @Input() noBarWhenZero: boolean = true;\n @Input() wrapTicks = false;\n\n @Output() activate: EventEmitter<any> = new EventEmitter();\n @Output() deactivate: EventEmitter<any> = new EventEmitter();\n\n @ContentChild('tooltipTemplate') tooltipTemplate: TemplateRef<any>;\n\n dims: ViewDimensions;\n groupDomain: string[];\n innerDomain: string[];\n valueDomain: [number, number] = [0, 100];\n xScale: any;\n yScale: any;\n transform: string;\n colors: ColorHelper;\n margin: number[] = [10, 20, 10, 20];\n xAxisHeight: number = 0;\n yAxisWidth: number = 0;\n legendOptions: LegendOptions;\n isSSR = false;\n\n barChartType = BarChartType;\n\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n\n update(): void {\n super.update();\n\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n\n this.formatDates();\n\n this.groupDomain = this.getGroupDomain();\n this.innerDomain = this.getInnerDomain();\n\n this.xScale = this.getXScale();\n this.yScale = this.getYScale();\n\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n }\n\n getGroupDomain(): string[] {\n const domain = [];\n for (const group of this.results) {\n if (!domain.includes(group.label)) {\n domain.push(group.label);\n }\n }\n\n return domain;\n }\n\n getInnerDomain(): string[] {\n const domain = [];\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.label)) {\n domain.push(d.label);\n }\n }\n }\n\n return domain;\n }\n\n getXScale(): any {\n const spacing = this.groupDomain.length / (this.dims.width / this.barPadding + 1);\n\n return scaleBand().rangeRound([0, this.dims.width]).paddingInner(spacing).domain(this.groupDomain);\n }\n\n getYScale(): any {\n const scale = scaleLinear().range([this.dims.height, 0]).domain(this.valueDomain);\n return this.roundDomains ? scale.nice() : scale;\n }\n\n groupTransform(group: Series): string {\n return `translate(${this.xScale(group.name)}, 0)`;\n }\n\n onClick(data, group?: Series) {\n if (group) {\n data.series = group.name;\n }\n\n this.select.emit(data);\n }\n\n trackBy: TrackByFunction<Series> = (index: number, item: Series) => {\n return item.name;\n };\n\n setColors(): void {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.innerDomain;\n } else {\n domain = this.valueDomain;\n }\n\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n\n getLegendOptions(): LegendOptions {\n const opts = {\n scaleType: this.schemeType as any,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.innerDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n } else {\n opts.domain = this.valueDomain;\n opts.colors = this.colors.scale;\n }\n\n return opts;\n }\n\n updateYAxisWidth({ width }: { width: number }) {\n this.yAxisWidth = width;\n this.update();\n }\n\n updateXAxisHeight({ height }: { height: number }) {\n this.xAxisHeight = height;\n this.update();\n }\n\n onActivate(event, group: Series, fromLegend: boolean = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n\n const items = this.results\n .map(g => g.series)\n .flat()\n .filter(i => {\n if (fromLegend) {\n return i.label === item.name;\n } else {\n return i.name === item.name && i.series === item.series;\n }\n });\n\n this.activeEntries = [...items];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n\n onDeactivate(event, group: Series, fromLegend: boolean = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n\n this.activeEntries = this.activeEntries.filter(i => {\n if (fromLegend) {\n return i.label !== item.name;\n } else {\n return !(i.name === item.name && i.series === item.series);\n }\n });\n\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ContentChild,\n TemplateRef,\n TrackByFunction\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { trigger, style, animate, transition } from '@angular/animations';\nimport { scaleBand, scaleLinear } from 'd3-scale';\n\nimport { calculateViewDimensions } from '../common/view-dimensions.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { Series } from '../models/chart-data.model';\nimport { BaseChartComponent } from '../common/base-chart.component';\nimport { BarChartType } from './types/bar-chart-type.enum';\nimport { LegendOptions, LegendPosition } from '../common/types/legend.model';\nimport { ScaleType } from '../common/types/scale-type.enum';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\n\n@Component({\n selector: 'ngx-charts-bar-vertical-stacked',\n template: `\n <ngx-charts-chart\n [view]=\"[width, height]\"\n [showLegend]=\"legend\"\n [legendOptions]=\"legendOptions\"\n [activeEntries]=\"activeEntries\"\n [animations]=\"animations\"\n (legendLabelActivate)=\"onActivate($event, undefined, true)\"\n (legendLabelDeactivate)=\"onDeactivate($event, undefined, true)\"\n (legendLabelClick)=\"onClick($event)\"\n >\n <svg:g [attr.transform]=\"transform\" class=\"bar-chart chart\">\n <svg:g\n ngx-charts-x-axis\n *ngIf=\"xAxis\"\n [xScale]=\"xScale\"\n [dims]=\"dims\"\n [showLabel]=\"showXAxisLabel\"\n [labelText]=\"xAxisLabel\"\n [trimTicks]=\"trimXAxisTicks\"\n [rotateTicks]=\"rotateXAxisTicks\"\n [maxTickLength]=\"maxXAxisTickLength\"\n [tickFormatting]=\"xAxisTickFormatting\"\n [ticks]=\"xAxisTicks\"\n [xAxisOffset]=\"dataLabelMaxHeight.negative\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateXAxisHeight($event)\"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf=\"yAxis\"\n [yScale]=\"yScale\"\n [dims]=\"dims\"\n [showGridLines]=\"showGridLines\"\n [showLabel]=\"showYAxisLabel\"\n [labelText]=\"yAxisLabel\"\n [trimTicks]=\"trimYAxisTicks\"\n [maxTickLength]=\"maxYAxisTickLength\"\n [tickFormatting]=\"yAxisTickFormatting\"\n [ticks]=\"yAxisTicks\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateYAxisWidth($event)\"\n ></svg:g>\n <svg:g *ngIf=\"!isSSR\">\n <svg:g\n *ngFor=\"let group of results; let index = index; trackBy: trackBy\"\n [@animationState]=\"'active'\"\n [attr.transform]=\"groupTransform(group)\"\n >\n <svg:g\n ngx-charts-series-vertical\n [type]=\"barChartType.Stacked\"\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [activeEntries]=\"activeEntries\"\n [colors]=\"colors\"\n [series]=\"group.series\"\n [dims]=\"dims\"\n [gradient]=\"gradient\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [showDataLabel]=\"showDataLabel\"\n [dataLabelFormatting]=\"dataLabelFormatting\"\n [seriesName]=\"group.name\"\n [animations]=\"animations\"\n [noBarWhenZero]=\"noBarWhenZero\"\n (select)=\"onClick($event, group)\"\n (activate)=\"onActivate($event, group)\"\n (deactivate)=\"onDeactivate($event, group)\"\n (dataLabelHeightChanged)=\"onDataLabelMaxHeightChanged($event, index)\"\n />\n </svg:g>\n </svg:g>\n </svg:g>\n <svg:g *ngIf=\"isSSR\">\n <svg:g\n *ngFor=\"let group of results; let index = index; trackBy: trackBy\"\n [attr.transform]=\"groupTransform(group)\"\n >\n <svg:g\n ngx-charts-series-vertical\n [type]=\"barChartType.Stacked\"\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [activeEntries]=\"activeEntries\"\n [colors]=\"colors\"\n [series]=\"group.series\"\n [dims]=\"dims\"\n [gradient]=\"gradient\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [showDataLabel]=\"showDataLabel\"\n [dataLabelFormatting]=\"dataLabelFormatting\"\n [seriesName]=\"group.name\"\n [animations]=\"animations\"\n [noBarWhenZero]=\"noBarWhenZero\"\n (select)=\"onClick($event, group)\"\n (activate)=\"onActivate($event, group)\"\n (deactivate)=\"onDeactivate($event, group)\"\n (dataLabelHeightChanged)=\"onDataLabelMaxHeightChanged($event, index)\"\n />\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n `,\n styleUrls: ['../common/base-chart.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1,\n transform: '*'\n }),\n animate(500, style({ opacity: 0, transform: 'scale(0)' }))\n ])\n ])\n ]\n})\nexport class BarVerticalStackedComponent extends BaseChartComponent {\n @Input() legend: boolean = false;\n @Input() legendTitle: string = 'Legend';\n @Input() legendPosition: LegendPosition = LegendPosition.Right;\n @Input() xAxis;\n @Input() yAxis;\n @Input() showXAxisLabel: boolean;\n @Input() showYAxisLabel: boolean;\n @Input() xAxisLabel: string;\n @Input() yAxisLabel: string;\n @Input() tooltipDisabled: boolean = false;\n @Input() gradient: boolean;\n @Input() showGridLines: boolean = true;\n @Input() activeEntries: any[] = [];\n @Input() schemeType: ScaleType;\n @Input() trimXAxisTicks: boolean = true;\n @Input() trimYAxisTicks: boolean = true;\n @Input() rotateXAxisTicks: boolean = true;\n @Input() maxXAxisTickLength: number = 16;\n @Input() maxYAxisTickLength: number = 16;\n @Input() xAxisTickFormatting: any;\n @Input() yAxisTickFormatting: any;\n @Input() xAxisTicks: any[];\n @Input() yAxisTicks: any[];\n @Input() barPadding: number = 8;\n @Input() roundDomains: boolean = false;\n @Input() yScaleMax: number;\n @Input() showDataLabel: boolean = false;\n @Input() dataLabelFormatting: any;\n @Input() noBarWhenZero: boolean = true;\n @Input() wrapTicks = false;\n\n @Output() activate: EventEmitter<any> = new EventEmitter();\n @Output() deactivate: EventEmitter<any> = new EventEmitter();\n\n @ContentChild('tooltipTemplate') tooltipTemplate: TemplateRef<any>;\n\n dims: ViewDimensions;\n groupDomain: string[];\n innerDomain: string[];\n valueDomain: [number, number];\n xScale: any;\n yScale: any;\n transform: string;\n tickFormatting: (label: string) => string;\n colors: ColorHelper;\n margin: number[] = [10, 20, 10, 20];\n xAxisHeight: number = 0;\n yAxisWidth: number = 0;\n legendOptions: LegendOptions;\n dataLabelMaxHeight: any = { negative: 0, positive: 0 };\n isSSR = false;\n\n barChartType = BarChartType;\n\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n\n update(): void {\n super.update();\n\n if (!this.showDataLabel) {\n this.dataLabelMaxHeight = { negative: 0, positive: 0 };\n }\n this.margin = [10 + this.dataLabelMaxHeight.positive, 20, 10 + this.dataLabelMaxHeight.negative, 20];\n\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n\n if (this.showDataLabel) {\n this.dims.height -= this.dataLabelMaxHeight.negative;\n }\n\n this.formatDates();\n\n this.groupDomain = this.getGroupDomain();\n this.innerDomain = this.getInnerDomain();\n this.valueDomain = this.getValueDomain();\n\n this.xScale = this.getXScale();\n this.yScale = this.getYScale();\n\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0] + this.dataLabelMaxHeight.negative})`;\n }\n\n getGroupDomain(): string[] {\n const domain = [];\n for (const group of this.results) {\n if (!domain.includes(group.label)) {\n domain.push(group.label);\n }\n }\n return domain;\n }\n\n getInnerDomain(): string[] {\n const domain = [];\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.label)) {\n domain.push(d.label);\n }\n }\n }\n return domain;\n }\n\n getValueDomain(): [number, number] {\n const domain = [];\n let smallest = 0;\n let biggest = 0;\n for (const group of this.results) {\n let smallestSum = 0;\n let biggestSum = 0;\n for (const d of group.series) {\n if (d.value < 0) {\n smallestSum += d.value;\n } else {\n biggestSum += d.value;\n }\n smallest = d.value < smallest ? d.value : smallest;\n biggest = d.value > biggest ? d.value : biggest;\n }\n domain.push(smallestSum);\n domain.push(biggestSum);\n }\n domain.push(smallest);\n domain.push(biggest);\n\n const min = Math.min(0, ...domain);\n const max = this.yScaleMax ? Math.max(this.yScaleMax, ...domain) : Math.max(...domain);\n return [min, max];\n }\n\n getXScale(): any {\n const spacing = this.groupDomain.length / (this.dims.width / this.barPadding + 1);\n return scaleBand().rangeRound([0, this.dims.width]).paddingInner(spacing).domain(this.groupDomain);\n }\n\n getYScale(): any {\n const scale = scaleLinear().range([this.dims.height, 0]).domain(this.valueDomain);\n return this.roundDomains ? scale.nice() : scale;\n }\n\n onDataLabelMaxHeightChanged(event, groupIndex: number) {\n if (event.size.negative) {\n this.dataLabelMaxHeight.negative = Math.max(this.dataLabelMaxHeight.negative, event.size.height);\n } else {\n this.dataLabelMaxHeight.positive = Math.max(this.dataLabelMaxHeight.positive, event.size.height);\n }\n if (groupIndex === this.results.length - 1) {\n setTimeout(() => this.update());\n }\n }\n\n groupTransform(group: Series): string {\n return `translate(${this.xScale(group.name) || 0}, 0)`;\n }\n\n onClick(data, group?: Series) {\n if (group) {\n data.series = group.name;\n }\n\n this.select.emit(data);\n }\n\n trackBy: TrackByFunction<Series> = (index: number, item: Series) => {\n return item.name;\n };\n\n setColors(): void {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.innerDomain;\n } else {\n domain = this.valueDomain;\n }\n\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n\n getLegendOptions(): LegendOptions {\n const opts = {\n scaleType: this.schemeType as any,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.innerDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n } else {\n opts.domain = this.valueDomain;\n opts.colors = this.colors.scale;\n }\n\n return opts;\n }\n\n updateYAxisWidth({ width }: { width: number }): void {\n this.yAxisWidth = width;\n this.update();\n }\n\n updateXAxisHeight({ height }: { height: number }): void {\n this.xAxisHeight = height;\n this.update();\n }\n\n onActivate(event, group, fromLegend: boolean = false): void {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n\n const items = this.results\n .map(g => g.series)\n .flat()\n .filter(i => {\n if (fromLegend) {\n return i.label === item.name;\n } else {\n return i.name === item.name && i.series === item.series;\n }\n });\n\n this.activeEntries = [...items];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n\n onDeactivate(event, group: Series, fromLegend: boolean = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n\n this.activeEntries = this.activeEntries.filter(i => {\n if (fromLegend) {\n return i.label !== item.name;\n } else {\n return !(i.name === item.name && i.series === item.series);\n }\n });\n\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ChartCommonModule } from '../common/chart-common.module';\nimport { BarComponent } from './bar.component';\nimport { BarHorizontalComponent } from './bar-horizontal.component';\nimport { BarHorizontal2DComponent } from './bar-horizontal-2d.component';\nimport { BarHorizontalNormalizedComponent } from './bar-horizontal-normalized.component';\nimport { BarHorizontalStackedComponent } from './bar-horizontal-stacked.component';\nimport { BarVerticalComponent } from './bar-vertical.component';\nimport { BarVertical2DComponent } from './bar-vertical-2d.component';\nimport { BarVerticalNormalizedComponent } from './bar-vertical-normalized.component';\nimport { BarVerticalStackedComponent } from './bar-vertical-stacked.component';\nimport { SeriesHorizontal } from './series-horizontal.component';\nimport { SeriesVerticalComponent } from './series-vertical.component';\nimport { BarLabelComponent } from './bar-label.component';\n\n@NgModule({\n imports: [ChartCommonModule],\n declarations: [\n BarComponent,\n BarHorizontalComponent,\n BarHorizontal2DComponent,\n BarHorizontalNormalizedComponent,\n BarHorizontalStackedComponent,\n BarVerticalComponent,\n BarVertical2DComponent,\n BarVerticalNormalizedComponent,\n BarVerticalStackedComponent,\n BarLabelComponent,\n SeriesHorizontal,\n SeriesVerticalComponent\n ],\n exports: [\n BarComponent,\n BarHorizontalComponent,\n BarHorizontal2DComponent,\n BarHorizontalNormalizedComponent,\n BarHorizontalStackedComponent,\n BarVerticalComponent,\n BarVertical2DComponent,\n BarVerticalNormalizedComponent,\n BarVerticalStackedComponent,\n BarLabelComponent,\n SeriesHorizontal,\n SeriesVerticalComponent\n ]\n})\nexport class BarChartModule {}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n HostListener,\n ElementRef,\n SimpleChanges,\n OnChanges,\n ChangeDetectionStrategy,\n ChangeDetectorRef\n} from '@angular/core';\nimport { select, BaseType } from 'd3-selection';\nimport { interpolate } from 'd3-interpolate';\nimport { easeSinInOut } from 'd3-ease';\n\nimport rfdc from 'rfdc';\nimport { roundedRect } from '../common/shape.helper';\nimport { id } from '../utils/id';\nimport { IBoxModel } from '../models/chart-data.model';\nimport { IVector2D } from '../models/coordinates.model';\nimport { BarOrientation } from '../common/types/bar-orientation.enum';\nimport { Gradient } from '../common/types/gradient.interface';\n\nconst cloneDeep = rfdc();\n\ntype LineCoordinates = [IVector2D, IVector2D, IVector2D, IVector2D];\n\n@Component({\n selector: 'g[ngx-charts-box]',\n template: `\n <svg:defs>\n <svg:g\n *ngIf=\"hasGradient\"\n ngx-charts-svg-linear-gradient\n [orientation]=\"BarOrientation.Vertical\"\n [name]=\"gradientId\"\n [stops]=\"gradientStops\"\n />\n <svg:mask [attr.id]=\"maskLineId\">\n <svg:g>\n <rect height=\"100%\" width=\"100%\" fill=\"white\" fill-opacity=\"1\" />\n <path class=\"bar\" [attr.d]=\"boxPath\" fill=\"black\" fill-opacity=\"1\" />\n </svg:g>\n </svg:mask>\n </svg:defs>\n <svg:g>\n <svg:path\n class=\"bar\"\n role=\"img\"\n tabIndex=\"-1\"\n [class.active]=\"isActive\"\n [class.hidden]=\"hideBar\"\n [attr.d]=\"boxPath\"\n [attr.stroke]=\"strokeColor\"\n [attr.stroke-width]=\"boxStrokeWidth\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.fill]=\"hasGradient ? gradientFill : fill\"\n (click)=\"select.emit(data)\"\n />\n <svg:line\n *ngFor=\"let line of lineCoordinates; let i = index\"\n class=\"bar-line\"\n [class.hidden]=\"hideBar\"\n [attr.x1]=\"line.v1.x\"\n [attr.y1]=\"line.v1.y\"\n [attr.x2]=\"line.v2.x\"\n [attr.y2]=\"line.v2.y\"\n [attr.stroke]=\"strokeColor\"\n [attr.stroke-width]=\"i === 2 ? medianLineWidth : whiskerStrokeWidth\"\n [attr.mask]=\"i ? undefined : maskLine\"\n fill=\"none\"\n />\n </svg:g>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class BoxComponent implements OnChanges {\n @Input() strokeColor: string;\n @Input() strokeWidth: number;\n @Input() fill: string;\n @Input() data: IBoxModel;\n @Input() width: number;\n @Input() height: number;\n @Input() x: number;\n @Input() y: number;\n @Input() lineCoordinates: LineCoordinates;\n @Input() roundEdges: boolean = true;\n @Input() gradient: boolean = false;\n @Input() gradientStops: Gradient[];\n @Input() offset: number = 0;\n @Input() isActive: boolean = false;\n @Input() animations: boolean = true;\n @Input() ariaLabel: string;\n @Input() noBarWhenZero: boolean = true;\n\n @Output() select: EventEmitter<IBoxModel> = new EventEmitter();\n @Output() activate: EventEmitter<IBoxModel> = new EventEmitter();\n @Output() deactivate: EventEmitter<IBoxModel> = new EventEmitter();\n\n BarOrientation = BarOrientation;\n\n nativeElm: any;\n\n // Path related properties.\n oldPath: string;\n boxPath: string;\n oldLineCoordinates: LineCoordinates;\n\n // Color related properties.\n gradientId: string;\n gradientFill: string;\n initialized: boolean = false;\n hasGradient: boolean = false;\n hideBar: boolean = false;\n\n /** Mask Path to cut the line on the box part. */\n maskLine: string;\n /** Mask Path Id to keep track of the mask element */\n maskLineId: string;\n\n boxStrokeWidth: number;\n whiskerStrokeWidth: number;\n medianLineWidth: number;\n\n constructor(element: ElementRef, protected cd: ChangeDetectorRef) {\n this.nativeElm = element.nativeElement;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (!this.initialized) {\n this.loadAnimation();\n this.initialized = true;\n } else {\n this.update();\n }\n }\n\n update(): void {\n this.boxStrokeWidth = Math.max(this.strokeWidth, 1);\n this.whiskerStrokeWidth = Math.max(this.strokeWidth / 2, 1);\n this.medianLineWidth = 1.5 * this.strokeWidth;\n\n this.gradientId = 'grad' + id().toString();\n this.gradientFill = `url(#${this.gradientId})`;\n\n if (this.gradient) {\n this.gradientStops = this.getGradient();\n this.hasGradient = true;\n } else {\n this.hasGradient = false;\n }\n\n this.updateLineEl();\n this.updatePathEl();\n this.checkToHideBar();\n this.maskLineId = 'mask' + id().toString();\n this.maskLine = `url(#${this.maskLineId})`;\n\n if (this.cd) {\n this.cd.markForCheck();\n }\n }\n\n loadAnimation(): void {\n this.boxPath = this.oldPath = this.getStartingPath();\n this.oldLineCoordinates = this.getStartingLineCoordinates();\n setTimeout(this.update.bind(this), 100);\n }\n\n updatePathEl(): void {\n const nodeBar = select(this.nativeElm).selectAll('.bar');\n const path = this.getPath();\n if (this.animations) {\n nodeBar\n .attr('d', this.oldPath)\n .transition()\n .ease(easeSinInOut)\n .duration(500)\n .attrTween('d', this.pathTween(path, 4));\n } else {\n nodeBar.attr('d', path);\n }\n this.oldPath = path;\n }\n\n updateLineEl(): void {\n const lineEl = select(this.nativeElm).selectAll('.bar-line');\n const lineCoordinates = this.lineCoordinates;\n const oldLineCoordinates = this.oldLineCoordinates;\n if (this.animations) {\n lineEl\n .attr('x1', (_, index) => oldLineCoordinates[index].v1.x)\n .attr('y1', (_, index) => oldLineCoordinates[index].v1.y)\n .attr('x2', (_, index) => oldLineCoordinates[index].v2.x)\n .attr('y2', (_, index) => oldLineCoordinates[index].v2.y)\n .transition()\n .ease(easeSinInOut)\n .duration(500)\n .attr('x1', (_, index) => lineCoordinates[index].v1.x)\n .attr('y1', (_, index) => lineCoordinates[index].v1.y)\n .attr('x2', (_, index) => lineCoordinates[index].v2.x)\n .attr('y2', (_, index) => lineCoordinates[index].v2.y);\n } else {\n lineEl\n .attr('x1', (_, index) => lineCoordinates[index].v1.x)\n .attr('y1', (_, index) => lineCoordinates[index].v1.y)\n .attr('x2', (_, index) => lineCoordinates[index].v2.x)\n .attr('y2', (_, index) => lineCoordinates[index].v2.y);\n }\n this.oldLineCoordinates = [...lineCoordinates];\n }\n\n /**\n * See [D3 Selections](https://www.d3indepth.com/selections/)\n * @param d The joined data.\n * @param index The index of the element within the selection\n * @param node The node element (Line).\n */\n lineTween(attr: string, d: any, index: number, node: BaseType[] | ArrayLike<BaseType>) {\n const nodeLineEl = node[index] as SVGLineElement;\n return nodeLineEl[attr].baseVal.value;\n }\n\n // TODO: Refactor into another .ts file if https://github.com/swimlane/ngx-charts/pull/1179 gets merged.\n pathTween(d1: string, precision: number) {\n return function () {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const path0 = this;\n const path1 = this.cloneNode();\n path1.setAttribute('d', d1);\n const n0 = path0?.getTotalLength();\n const n1 = path1?.getTotalLength();\n // Uniform sampling of distance based on specified precision.\n const distances = [0];\n let i = 0;\n const dt = precision / Math.max(n0, n1);\n while (i < 1) {\n distances.push(i);\n i += dt;\n }\n distances.push(1);\n\n // Compute point-interpolators at each distance.\n const points = distances.map((t: number) => {\n const p0 = path0.getPointAtLength(t * n0);\n const p1 = path1.getPointAtLength(t * n1);\n return interpolate([p0.x, p0.y], [p1.x, p1.y]);\n });\n\n // 't': T is the fraction of time (between 0 and 1) since the transition began.\n return (t: any) => {\n return t < 1 ? 'M' + points.map((p: (t: number) => any[]) => p(t)).join('L') : d1;\n };\n };\n }\n\n getStartingPath(): string {\n if (!this.animations) {\n return this.getPath();\n }\n\n const radius = this.roundEdges ? 1 : 0;\n const { x, y } = this.lineCoordinates[2].v1;\n\n return roundedRect(x - this.width, y - 1, this.width, 2, radius, this.edges);\n }\n\n getPath(): string {\n const radius = this.getRadius();\n let path = '';\n\n path = roundedRect(this.x, this.y, this.width, this.height, Math.min(this.height, radius), this.edges);\n\n return path;\n }\n\n getStartingLineCoordinates(): LineCoordinates {\n if (!this.animations) {\n return [...this.lineCoordinates];\n }\n\n const lineCoordinates: LineCoordinates = cloneDeep(this.lineCoordinates);\n\n lineCoordinates[1].v1.y = lineCoordinates[1].v2.y = lineCoordinates[3].v1.y = lineCoordinates[3].v2.y = lineCoordinates[0].v1.y = lineCoordinates[0].v2.y =\n lineCoordinates[2].v1.y;\n\n return lineCoordinates;\n }\n\n getRadius(): number {\n let radius = 0;\n\n if (this.roundEdges && this.height > 5 && this.width > 5) {\n radius = Math.floor(Math.min(5, this.height / 2, this.width / 2));\n }\n\n return radius;\n }\n\n getGradient(): Gradient[] {\n return [\n {\n offset: 0,\n color: this.fill,\n opacity: this.getStartOpacity()\n },\n {\n offset: 100,\n color: this.fill,\n opacity: 1\n }\n ];\n }\n\n getStartOpacity(): number {\n if (this.roundEdges) {\n return 0.2;\n } else {\n return 0.5;\n }\n }\n\n get edges(): boolean[] {\n let edges: [boolean, boolean, boolean, boolean] = [false, false, false, false];\n if (this.roundEdges) {\n edges = [true, true, true, true];\n }\n return edges;\n }\n\n @HostListener('mouseenter')\n onMouseEnter(): void {\n this.activate.emit(this.data);\n }\n\n @HostListener('mouseleave')\n onMouseLeave(): void {\n this.deactivate.emit(this.data);\n }\n\n private checkToHideBar(): void {\n this.hideBar = this.noBarWhenZero && this.height === 0;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n Output,\n SimpleChanges,\n TemplateRef\n} from '@angular/core';\nimport { min, max, quantile } from 'd3-array';\nimport { ScaleLinear, ScaleBand } from 'd3-scale';\nimport { IBoxModel, BoxChartSeries, DataItem } from '../models/chart-data.model';\nimport { IVector2D } from '../models/coordinates.model';\nimport { trigger, transition, style, animate } from '@angular/animations';\nimport { ColorHelper } from '../common/color.helper';\nimport { formatLabel, escapeLabel } from '../common/label.helper';\nimport { StyleTypes } from '../common/tooltip/style.type';\nimport { PlacementTypes } from '../common/tooltip/position';\nimport { ScaleType } from '../common/types/scale-type.enum';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\n\n@Component({\n selector: 'g[ngx-charts-box-series]',\n template: `\n <svg:g\n ngx-charts-box\n [@animationState]=\"'active'\"\n [@.disabled]=\"!animations\"\n [width]=\"box.width\"\n [height]=\"box.height\"\n [x]=\"box.x\"\n [y]=\"box.y\"\n [roundEdges]=\"box.roundEdges\"\n [fill]=\"box.color\"\n [gradientStops]=\"box.gradientStops\"\n [strokeColor]=\"strokeColor\"\n [strokeWidth]=\"strokeWidth\"\n [data]=\"box.data\"\n [lineCoordinates]=\"box.lineCoordinates\"\n [gradient]=\"gradient\"\n [ariaLabel]=\"box.ariaLabel\"\n (select)=\"onClick($event)\"\n (activate)=\"activate.emit($event)\"\n (deactivate)=\"deactivate.emit($event)\"\n ngx-tooltip\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipPlacement]=\"tooltipPlacement\"\n [tooltipType]=\"tooltipType\"\n [tooltipTitle]=\"tooltipTitle\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipContext]=\"box.data\"\n [animations]=\"animations\"\n ></svg:g>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1\n }),\n animate(500, style({ opacity: 0 }))\n ])\n ])\n ]\n})\nexport class BoxSeriesComponent implements OnChanges {\n @Input() dims: ViewDimensions;\n @Input() series: BoxChartSeries;\n @Input() xScale: ScaleBand<string>;\n @Input() yScale: ScaleLinear<number, number>;\n @Input() colors: ColorHelper;\n @Input() animations: boolean = true;\n @Input() strokeColor: string;\n @Input() strokeWidth: number;\n @Input() tooltipDisabled: boolean = false;\n @Input() tooltipTemplate: TemplateRef<any>;\n @Input() tooltipPlacement: PlacementTypes;\n @Input() tooltipType: StyleTypes;\n @Input() roundEdges: boolean;\n @Input() gradient: boolean = false;\n\n @Output() select: EventEmitter<IBoxModel> = new EventEmitter();\n @Output() activate: EventEmitter<IBoxModel> = new EventEmitter();\n @Output() deactivate: EventEmitter<IBoxModel> = new EventEmitter();\n\n box: IBoxModel;\n counts: DataItem[];\n quartiles: [number, number, number];\n whiskers: [number, number];\n lineCoordinates: [IVector2D, IVector2D, IVector2D, IVector2D];\n tooltipTitle: string;\n\n ngOnChanges(changes: SimpleChanges): void {\n this.update();\n }\n\n onClick(data: IBoxModel): void {\n this.select.emit(data);\n }\n\n update(): void {\n this.updateTooltipSettings();\n const width = this.series && this.series.series.length ? Math.round(this.xScale.bandwidth()) : null;\n const seriesName = this.series.name;\n\n // Calculate Quantile and Whiskers for each box serie.\n this.counts = this.series.series;\n\n const mappedCounts = this.counts.map(serie => Number(serie.value));\n this.whiskers = [min(mappedCounts), max(mappedCounts)];\n\n // We get the group count and must sort it in order to retrieve quantiles.\n const groupCounts = this.counts.map(item => item.value).sort((a, b) => Number(a) - Number(b));\n this.quartiles = this.getBoxQuantiles(groupCounts);\n this.lineCoordinates = this.getLinesCoordinates(seriesName.toString(), this.whiskers, this.quartiles, width);\n\n const value = this.quartiles[1];\n const formattedLabel = formatLabel(seriesName);\n const box: IBoxModel = {\n value,\n data: this.counts,\n label: seriesName,\n formattedLabel,\n width,\n height: 0,\n x: 0,\n y: 0,\n roundEdges: this.roundEdges,\n quartiles: this.quartiles,\n lineCoordinates: this.lineCoordinates\n };\n\n box.height = Math.abs(this.yScale(this.quartiles[0]) - this.yScale(this.quartiles[2]));\n box.x = this.xScale(seriesName.toString());\n box.y = this.yScale(this.quartiles[2]);\n box.ariaLabel = formattedLabel + ' - Median: ' + value.toLocaleString();\n\n if (this.colors.scaleType === ScaleType.Ordinal) {\n box.color = this.colors.getColor(seriesName);\n } else {\n box.color = this.colors.getColor(this.quartiles[1]);\n box.gradientStops = this.colors.getLinearGradientStops(this.quartiles[0], this.quartiles[2]);\n }\n\n const tooltipLabel = formattedLabel;\n const formattedTooltipLabel = `\n <span class=\"tooltip-label\">${escapeLabel(tooltipLabel)}</span>\n <span class=\"tooltip-val\">\n • Q1: ${this.quartiles[0]} • Q2: ${this.quartiles[1]} • Q3: ${this.quartiles[2]}<br>\n • Min: ${this.whiskers[0]} • Max: ${this.whiskers[1]}\n </span>`;\n\n box.tooltipText = this.tooltipDisabled ? undefined : formattedTooltipLabel;\n this.tooltipTitle = this.tooltipDisabled ? undefined : box.tooltipText;\n\n this.box = box;\n }\n\n getBoxQuantiles(inputData: Array<number | Date>): [number, number, number] {\n return [quantile(inputData, 0.25), quantile(inputData, 0.5), quantile(inputData, 0.75)];\n }\n\n getLinesCoordinates(\n seriesName: string,\n whiskers: [number, number],\n quartiles: [number, number, number],\n barWidth: number\n ): [IVector2D, IVector2D, IVector2D, IVector2D] {\n // The X value is not being centered, so had to sum half the width to align it.\n const commonX = this.xScale(seriesName);\n const offsetX = commonX + barWidth / 2;\n\n const medianLineWidth = Math.max(barWidth + 4 * this.strokeWidth, 1);\n const whiskerLineWidth = Math.max(barWidth / 3, 1);\n\n const whiskerZero = this.yScale(whiskers[0]);\n const whiskerOne = this.yScale(whiskers[1]);\n const median = this.yScale(quartiles[1]);\n\n const topLine: IVector2D = {\n v1: { x: offsetX + whiskerLineWidth / 2, y: whiskerZero },\n v2: { x: offsetX - whiskerLineWidth / 2, y: whiskerZero }\n };\n const medianLine: IVector2D = {\n v1: { x: offsetX + medianLineWidth / 2, y: median },\n v2: { x: offsetX - medianLineWidth / 2, y: median }\n };\n const bottomLine: IVector2D = {\n v1: { x: offsetX + whiskerLineWidth / 2, y: whiskerOne },\n v2: { x: offsetX - whiskerLineWidth / 2, y: whiskerOne }\n };\n const verticalLine: IVector2D = {\n v1: { x: offsetX, y: whiskerZero },\n v2: { x: offsetX, y: whiskerOne }\n };\n return [verticalLine, topLine, medianLine, bottomLine];\n }\n\n updateTooltipSettings() {\n if (this.tooltipDisabled) {\n this.tooltipPlacement = undefined;\n this.tooltipType = undefined;\n } else {\n if (!this.tooltipPlacement) {\n this.tooltipPlacement = PlacementTypes.Top;\n }\n if (!this.tooltipType) {\n this.tooltipType = StyleTypes.tooltip;\n }\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n EventEmitter,\n Input,\n Output,\n TemplateRef,\n ViewEncapsulation\n} from '@angular/core';\n\nimport { BaseChartComponent } from '../common/base-chart.component';\nimport { ColorHelper } from '../common/color.helper';\nimport { BoxChartMultiSeries, BoxChartSeries, IBoxModel, StringOrNumberOrDate } from '../models/chart-data.model';\nimport { scaleLinear, ScaleLinear, scaleBand, ScaleBand } from 'd3-scale';\nimport { calculateViewDimensions } from '../common/view-dimensions.helper';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\nimport { LegendPosition, LegendOptions } from '../common/types/legend.model';\nimport { ScaleType } from '../common/types/scale-type.enum';\n\n@Component({\n selector: 'ngx-charts-box-chart',\n template: `\n <ngx-charts-chart\n [view]=\"[width, height]\"\n [showLegend]=\"legend\"\n [legendOptions]=\"legendOptions\"\n [animations]=\"animations\"\n (legendLabelClick)=\"onClick($event)\"\n (legendLabelActivate)=\"onActivate($event)\"\n (legendLabelDeactivate)=\"onDeactivate($event)\"\n >\n <svg:g [attr.transform]=\"transform\" class=\"box-chart chart\">\n <svg:g\n ngx-charts-x-axis\n [showGridLines]=\"showGridLines\"\n [dims]=\"dims\"\n [xScale]=\"xScale\"\n [showLabel]=\"showXAxisLabel\"\n [labelText]=\"xAxisLabel\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateXAxisHeight($event)\"\n />\n <svg:g\n ngx-charts-y-axis\n [showGridLines]=\"showGridLines\"\n [dims]=\"dims\"\n [yScale]=\"yScale\"\n [showLabel]=\"showYAxisLabel\"\n [labelText]=\"yAxisLabel\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateYAxisWidth($event)\"\n />\n </svg:g>\n <svg:g [attr.transform]=\"transform\">\n <svg:g *ngFor=\"let result of results; trackBy: trackBy\">\n <svg:g\n ngx-charts-box-series\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [colors]=\"colors\"\n [roundEdges]=\"roundEdges\"\n [strokeColor]=\"strokeColor\"\n [strokeWidth]=\"strokeWidth\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [series]=\"result\"\n [dims]=\"dims\"\n [animations]=\"animations\"\n [gradient]=\"gradient\"\n (activate)=\"onActivate($event)\"\n (deactivate)=\"onDeactivate($event)\"\n (select)=\"onClick($event)\"\n />\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n `,\n styleUrls: ['../common/base-chart.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class BoxChartComponent extends BaseChartComponent {\n /** Show or hide the legend. */\n @Input() legend: boolean = false;\n @Input() legendPosition: LegendPosition = LegendPosition.Right;\n @Input() legendTitle: string = 'Legend';\n /** I think it is better to handle legend options as single Input object of type ILegendOptions */\n @Input() legendOptionsConfig: LegendOptions;\n @Input() showGridLines: boolean = true;\n @Input() xAxis: boolean = true;\n @Input() yAxis: boolean = true;\n @Input() showXAxisLabel: boolean = true;\n @Input() showYAxisLabel: boolean = true;\n @Input() roundDomains: boolean = false;\n @Input() xAxisLabel: string;\n @Input() yAxisLabel: string;\n @Input() roundEdges: boolean = true;\n @Input() strokeColor: string = '#FFFFFF';\n @Input() strokeWidth: number = 2;\n @Input() tooltipDisabled: boolean = false;\n @Input() gradient: boolean;\n @Input() wrapTicks = false;\n\n @Output() select: EventEmitter<IBoxModel> = new EventEmitter();\n @Output() activate: EventEmitter<IBoxModel> = new EventEmitter();\n @Output() deactivate: EventEmitter<IBoxModel> = new EventEmitter();\n\n @ContentChild('tooltipTemplate', { static: false }) tooltipTemplate: TemplateRef<any>;\n\n /** Input Data, this came from Base Chart Component. */\n results: BoxChartMultiSeries;\n /** Chart Dimensions, this came from Base Chart Component. */\n dims: ViewDimensions;\n /** Color data. */\n colors: ColorHelper;\n /** Transform string css attribute for the chart container */\n transform: string;\n\n /** Chart Margins (For each side, counterclock wise). */\n margin: [number, number, number, number] = [10, 20, 10, 20];\n\n /** Legend Options object to handle positioning, title, colors and domain. */\n legendOptions: LegendOptions;\n\n xScale: ScaleBand<string>;\n yScale: ScaleLinear<number, number>;\n xDomain: StringOrNumberOrDate[];\n yDomain: number[];\n seriesDomain: string[];\n /** Chart X axis dimension. */\n xAxisHeight: number = 0;\n /** Chart Y axis dimension. */\n yAxisWidth: number = 0;\n\n trackBy(index: number, item: BoxChartSeries): StringOrNumberOrDate {\n return item.name;\n }\n\n update(): void {\n super.update();\n\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendPosition: this.legendPosition\n });\n\n this.xDomain = this.getXDomain();\n this.yDomain = this.getYDomain();\n this.seriesDomain = this.getSeriesDomain();\n this.setScales();\n this.setColors();\n\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n }\n\n setColors(): void {\n let domain: string[] | number[] = [];\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.seriesDomain;\n } else {\n domain = this.yDomain;\n }\n\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n\n setScales() {\n this.xScale = this.getXScale(this.xDomain, this.dims.width);\n this.yScale = this.getYScale(this.yDomain, this.dims.height);\n }\n\n getXScale(domain: Array<string | number | Date>, width: number): ScaleBand<string> {\n const scale = scaleBand()\n .domain(domain.map(d => d.toString()))\n .rangeRound([0, width])\n .padding(0.5);\n\n return scale;\n }\n\n getYScale(domain: number[], height: number): ScaleLinear<number, number> {\n const scale = scaleLinear().domain(domain).range([height, 0]);\n\n return this.roundDomains ? scale.nice() : scale;\n }\n\n getUniqueBoxChartXDomainValues(results: BoxChartMultiSeries) {\n const valueSet = new Set<string | number | Date>();\n for (const result of results) {\n valueSet.add(result.name);\n }\n return Array.from(valueSet);\n }\n\n getXDomain(): Array<string | number | Date> {\n let domain: Array<string | number | Date> = [];\n const values: Array<string | number | Date> = this.getUniqueBoxChartXDomainValues(this.results);\n let min: number;\n let max: number;\n if (typeof values[0] === 'string') {\n domain = values.map(val => val.toString());\n } else if (typeof values[0] === 'number') {\n const mappedValues = values.map(v => Number(v));\n min = Math.min(...mappedValues);\n max = Math.max(...mappedValues);\n domain = [min, max];\n } else {\n const mappedValues = values.map(v => Number(new Date(v)));\n min = Math.min(...mappedValues);\n max = Math.max(...mappedValues);\n domain = [new Date(min), new Date(max)];\n }\n return domain;\n }\n\n getYDomain(): number[] {\n const domain: Array<number | Date> = [];\n for (const results of this.results) {\n for (const d of results.series) {\n if (domain.indexOf(d.value) < 0) {\n domain.push(d.value);\n }\n }\n }\n\n const values = [...domain];\n const mappedValues = values.map(v => Number(v));\n\n const min: number = Math.min(...mappedValues);\n const max: number = Math.max(...mappedValues);\n\n return [min, max];\n }\n\n getSeriesDomain(): string[] {\n return this.results.map(d => `${d.name}`);\n }\n\n updateYAxisWidth({ width }): void {\n this.yAxisWidth = width;\n this.update();\n }\n\n updateXAxisHeight({ height }): void {\n this.xAxisHeight = height;\n this.update();\n }\n\n onClick(data: IBoxModel): void {\n this.select.emit(data);\n }\n\n onActivate(data: IBoxModel): void {\n this.activate.emit(data);\n }\n\n onDeactivate(data: IBoxModel): void {\n this.deactivate.emit(data);\n }\n\n private getLegendOptions(): LegendOptions {\n const legendOpts: LegendOptions = {\n scaleType: this.schemeType,\n colors: this.colors,\n domain: [],\n position: this.legendPosition,\n title: this.legendTitle\n };\n if (this.schemeType === ScaleType.Ordinal) {\n legendOpts.domain = this.xDomain;\n legendOpts.colors = this.colors;\n } else {\n legendOpts.domain = this.yDomain;\n legendOpts.colors = this.colors.scale;\n }\n return legendOpts;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ChartCommonModule } from '../common/chart-common.module';\nimport { BoxChartComponent } from './box-chart.component';\nimport { BoxSeriesComponent } from './box-series.component';\nimport { BoxComponent } from './box.component';\n\n@NgModule({\n imports: [ChartCommonModule],\n declarations: [BoxChartComponent, BoxSeriesComponent, BoxComponent],\n exports: [BoxChartComponent, BoxSeriesComponent, BoxComponent]\n})\nexport class BoxChartModule {}\n","import { ScaleLinear, scaleLinear, ScalePoint, scalePoint, ScaleTime, scaleTime } from 'd3-scale';\nimport { ScaleType } from '../common/types/scale-type.enum';\n\nexport function getDomain(\n values: any[],\n scaleType: ScaleType,\n autoScale: boolean,\n minVal?: number,\n maxVal?: number\n): number[] {\n let domain: number[] = [];\n if (scaleType === ScaleType.Linear) {\n values = values.map(v => Number(v));\n if (!autoScale) {\n values.push(0);\n }\n }\n\n if (scaleType === ScaleType.Time || scaleType === ScaleType.Linear) {\n const min = minVal || minVal === 0 ? minVal : Math.min(...values);\n const max = maxVal ? maxVal : Math.max(...values);\n\n domain = [min, max];\n } else {\n domain = values;\n }\n\n return domain;\n}\n\nexport function getScale(\n domain: number[],\n range: number[],\n scaleType: ScaleType,\n roundDomains: boolean\n): ScaleTime<number, number> | ScaleLinear<number, number> | ScalePoint<string> {\n switch (scaleType) {\n case ScaleType.Time:\n return scaleTime().range(range).domain(domain);\n case ScaleType.Linear: {\n const scale = scaleLinear().range(range).domain(domain);\n if (roundDomains) {\n return scale.nice();\n }\n return scale;\n }\n case ScaleType.Ordinal:\n return scalePoint()\n .range([range[0], range[1]])\n .domain(domain.map(r => r.toString()));\n default:\n return undefined;\n }\n}\n","import {\n Component,\n Input,\n Output,\n SimpleChanges,\n EventEmitter,\n OnChanges,\n ChangeDetectionStrategy,\n TemplateRef,\n PLATFORM_ID,\n Inject,\n OnInit\n} from '@angular/core';\nimport { trigger, style, animate, transition } from '@angular/animations';\nimport { formatLabel, escapeLabel } from '../common/label.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { BubbleChartSeries } from '../models/chart-data.model';\nimport { PlacementTypes } from '../common/tooltip/position';\nimport { StyleTypes } from '../common/tooltip/style.type';\nimport { ScaleType } from '../common/types/scale-type.enum';\nimport { isPlatformServer } from '@angular/common';\n\n@Component({\n selector: 'g[ngx-charts-bubble-series]',\n template: `\n <svg:g *ngFor=\"let circle of circles; trackBy: trackBy\">\n <svg:g [attr.transform]=\"circle.transform\">\n <svg:g\n *ngIf=\"!isSSR\"\n ngx-charts-circle\n [@animationState]=\"'active'\"\n class=\"circle\"\n [cx]=\"0\"\n [cy]=\"0\"\n [r]=\"circle.radius\"\n [fill]=\"circle.color\"\n [style.opacity]=\"circle.opacity\"\n [class.active]=\"circle.isActive\"\n [pointerEvents]=\"'all'\"\n [data]=\"circle.value\"\n [classNames]=\"circle.classNames\"\n (select)=\"onClick(circle.data)\"\n (activate)=\"activateCircle(circle)\"\n (deactivate)=\"deactivateCircle(circle)\"\n ngx-tooltip\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipPlacement]=\"placementTypes.Top\"\n [tooltipType]=\"styleTypes.tooltip\"\n [tooltipTitle]=\"tooltipTemplate ? undefined : getTooltipText(circle)\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipContext]=\"circle.data\"\n />\n <svg:g\n *ngIf=\"isSSR\"\n ngx-charts-circle\n class=\"circle\"\n [cx]=\"0\"\n [cy]=\"0\"\n [r]=\"circle.radius\"\n [fill]=\"circle.color\"\n [style.opacity]=\"circle.opacity\"\n [class.active]=\"circle.isActive\"\n [pointerEvents]=\"'all'\"\n [data]=\"circle.value\"\n [classNames]=\"circle.classNames\"\n (select)=\"onClick(circle.data)\"\n (activate)=\"activateCircle(circle)\"\n (deactivate)=\"deactivateCircle(circle)\"\n ngx-tooltip\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipPlacement]=\"placementTypes.Top\"\n [tooltipType]=\"styleTypes.tooltip\"\n [tooltipTitle]=\"tooltipTemplate ? undefined : getTooltipText(circle)\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipContext]=\"circle.data\"\n />\n </svg:g>\n </svg:g>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('animationState', [\n transition(':enter', [\n style({\n opacity: 0,\n transform: 'scale(0)'\n }),\n animate(250, style({ opacity: 1, transform: 'scale(1)' }))\n ])\n ])\n ]\n})\nexport class BubbleSeriesComponent implements OnChanges, OnInit {\n @Input() data: BubbleChartSeries;\n @Input() xScale;\n @Input() yScale;\n @Input() rScale;\n @Input() xScaleType: ScaleType;\n @Input() yScaleType: ScaleType;\n @Input() colors: ColorHelper;\n @Input() visibleValue;\n @Input() activeEntries: any[];\n @Input() xAxisLabel: string;\n @Input() yAxisLabel: string;\n @Input() tooltipDisabled: boolean = false;\n @Input() tooltipTemplate: TemplateRef<any>;\n\n @Output() select = new EventEmitter();\n @Output() activate = new EventEmitter();\n @Output() deactivate = new EventEmitter();\n\n areaPath: any;\n circles: any[]; // TODO type this\n\n placementTypes = PlacementTypes;\n styleTypes = StyleTypes;\n\n isSSR = false;\n\n constructor(@Inject(PLATFORM_ID) private platformId: any) {}\n\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.update();\n }\n\n update(): void {\n this.circles = this.getCircles();\n }\n\n getCircles(): any[] {\n const seriesName = this.data.name;\n\n return this.data.series\n .map((d, i) => {\n if (typeof d.y !== 'undefined' && typeof d.x !== 'undefined') {\n const y = d.y;\n const x = d.x;\n const r = d.r;\n\n const radius = this.rScale(r || 1);\n const tooltipLabel = formatLabel(d.name);\n\n const cx = this.xScaleType === ScaleType.Linear ? this.xScale(Number(x)) : this.xScale(x);\n const cy = this.yScaleType === ScaleType.Linear ? this.yScale(Number(y)) : this.yScale(y);\n\n const color =\n this.colors.scaleType === ScaleType.Linear ? this.colors.getColor(r) : this.colors.getColor(seriesName);\n\n const isActive = !this.activeEntries.length ? true : this.isActive({ name: seriesName });\n const opacity = isActive ? 1 : 0.3;\n\n const data = Object.assign({}, d, {\n series: seriesName,\n name: d.name,\n value: d.y,\n x: d.x,\n radius: d.r\n });\n\n return {\n data,\n x,\n y,\n r,\n classNames: [`circle-data-${i}`],\n value: y,\n label: x,\n cx,\n cy,\n radius,\n tooltipLabel,\n color,\n opacity,\n seriesName,\n isActive,\n transform: `translate(${cx},${cy})`\n };\n }\n })\n .filter(circle => circle !== undefined);\n }\n\n getTooltipText(circle): string {\n const hasRadius = typeof circle.r !== 'undefined';\n const hasTooltipLabel = circle.tooltipLabel && circle.tooltipLabel.length;\n const hasSeriesName = circle.seriesName && circle.seriesName.length;\n\n const radiusValue = hasRadius ? formatLabel(circle.r) : '';\n const xAxisLabel = this.xAxisLabel && this.xAxisLabel !== '' ? `${this.xAxisLabel}:` : '';\n const yAxisLabel = this.yAxisLabel && this.yAxisLabel !== '' ? `${this.yAxisLabel}:` : '';\n const x = formatLabel(circle.x);\n const y = formatLabel(circle.y);\n const name =\n hasSeriesName && hasTooltipLabel\n ? `${circle.seriesName} • ${circle.tooltipLabel}`\n : circle.seriesName + circle.tooltipLabel;\n const tooltipTitle =\n hasSeriesName || hasTooltipLabel ? `<span class=\"tooltip-label\">${escapeLabel(name)}</span>` : '';\n\n return `\n ${tooltipTitle}\n <span class=\"tooltip-label\">\n <label>${escapeLabel(xAxisLabel)}</label> ${escapeLabel(x)}<br />\n <label>${escapeLabel(yAxisLabel)}</label> ${escapeLabel(y)}\n </span>\n <span class=\"tooltip-val\">\n ${escapeLabel(radiusValue)}\n </span>\n `;\n }\n\n onClick(data): void {\n this.select.emit(data);\n }\n\n isActive(entry): boolean {\n if (!this.activeEntries) return false;\n const item = this.activeEntries.find(d => {\n return entry.name === d.name;\n });\n return item !== undefined;\n }\n\n isVisible(circle): boolean {\n if (this.activeEntries.length > 0) {\n return this.isActive({ name: circle.seriesName });\n }\n\n return circle.opacity !== 0;\n }\n\n activateCircle(circle): void {\n circle.barVisible = true;\n this.activate.emit({ name: this.data.name });\n }\n\n deactivateCircle(circle): void {\n circle.barVisible = false;\n this.deactivate.emit({ name: this.data.name });\n }\n\n trackBy(index, circle): string {\n return `${circle.data.series} ${circle.data.name}`;\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n HostListener,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ContentChild,\n TemplateRef\n} from '@angular/core';\nimport { trigger, style, animate, transition } from '@angular/animations';\nimport { scaleLinear } from 'd3-scale';\n\nimport { BaseChartComponent } from '../common/base-chart.component';\nimport { calculateViewDimensions } from '../common/view-dimensions.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { getScaleType } from '../common/domain.helper';\nimport { getDomain, getScale } from './bubble-chart.utils';\nimport { id } from '../utils/id';\nimport { BubbleChartSeries } from '../models/chart-data.model';\nimport { LegendOptions, LegendPosition } from '../common/types/legend.model';\nimport { ScaleType } from '../common/types/scale-type.enum';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\nimport { isPlatformServer } from '@angular/common';\n\n@Component({\n selector: 'ngx-charts-bubble-chart',\n template: `\n <ngx-charts-chart\n [view]=\"[width, height]\"\n [showLegend]=\"legend\"\n [activeEntries]=\"activeEntries\"\n [legendOptions]=\"legendOptions\"\n [animations]=\"animations\"\n (legendLabelClick)=\"onClick($event)\"\n (legendLabelActivate)=\"onActivate($event)\"\n (legendLabelDeactivate)=\"onDeactivate($event)\"\n >\n <svg:defs>\n <svg:clipPath [attr.id]=\"clipPathId\">\n <svg:rect\n [attr.width]=\"dims.width + 10\"\n [attr.height]=\"dims.height + 10\"\n [attr.transform]=\"'translate(-5, -5)'\"\n />\n </svg:clipPath>\n </svg:defs>\n <svg:g [attr.transform]=\"transform\" class=\"bubble-chart chart\">\n <svg:g\n ngx-charts-x-axis\n *ngIf=\"xAxis\"\n [showGridLines]=\"showGridLines\"\n [dims]=\"dims\"\n [xScale]=\"xScale\"\n [showLabel]=\"showXAxisLabel\"\n [labelText]=\"xAxisLabel\"\n [trimTicks]=\"trimXAxisTicks\"\n [rotateTicks]=\"rotateXAxisTicks\"\n [maxTickLength]=\"maxXAxisTickLength\"\n [tickFormatting]=\"xAxisTickFormatting\"\n [ticks]=\"xAxisTicks\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateXAxisHeight($event)\"\n />\n <svg:g\n ngx-charts-y-axis\n *ngIf=\"yAxis\"\n [showGridLines]=\"showGridLines\"\n [yScale]=\"yScale\"\n [dims]=\"dims\"\n [showLabel]=\"showYAxisLabel\"\n [labelText]=\"yAxisLabel\"\n [trimTicks]=\"trimYAxisTicks\"\n [maxTickLength]=\"maxYAxisTickLength\"\n [tickFormatting]=\"yAxisTickFormatting\"\n [ticks]=\"yAxisTicks\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateYAxisWidth($event)\"\n />\n <svg:rect\n class=\"bubble-chart-area\"\n x=\"0\"\n y=\"0\"\n [attr.width]=\"dims.width\"\n [attr.height]=\"dims.height\"\n style=\"fill: rgb(255, 0, 0); opacity: 0; cursor: 'auto';\"\n (mouseenter)=\"deactivateAll()\"\n />\n <svg:g *ngIf=\"!isSSR\" [attr.clip-path]=\"clipPath\">\n <svg:g *ngFor=\"let series of data; trackBy: trackBy\" [@animationState]=\"'active'\">\n <svg:g\n ngx-charts-bubble-series\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [rScale]=\"rScale\"\n [xScaleType]=\"xScaleType\"\n [yScaleType]=\"yScaleType\"\n [xAxisLabel]=\"xAxisLabel\"\n [yAxisLabel]=\"yAxisLabel\"\n [colors]=\"colors\"\n [data]=\"series\"\n [activeEntries]=\"activeEntries\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n (select)=\"onClick($event, series)\"\n (activate)=\"onActivate($event)\"\n (deactivate)=\"onDeactivate($event)\"\n />\n </svg:g>\n </svg:g>\n <svg:g *ngIf=\"isSSR\" [attr.clip-path]=\"clipPath\">\n <svg:g *ngFor=\"let series of data; trackBy: trackBy\">\n <svg:g\n ngx-charts-bubble-series\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [rScale]=\"rScale\"\n [xScaleType]=\"xScaleType\"\n [yScaleType]=\"yScaleType\"\n [xAxisLabel]=\"xAxisLabel\"\n [yAxisLabel]=\"yAxisLabel\"\n [colors]=\"colors\"\n [data]=\"series\"\n [activeEntries]=\"activeEntries\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n (select)=\"onClick($event, series)\"\n (activate)=\"onActivate($event)\"\n (deactivate)=\"onDeactivate($event)\"\n />\n </svg:g>\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n `,\n styleUrls: ['../common/base-chart.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1\n }),\n animate(\n 500,\n style({\n opacity: 0\n })\n )\n ])\n ])\n ]\n})\nexport class BubbleChartComponent extends BaseChartComponent {\n @Input() showGridLines: boolean = true;\n @Input() legend = false;\n @Input() legendTitle: string = 'Legend';\n @Input() legendPosition: LegendPosition = LegendPosition.Right;\n @Input() xAxis: boolean = true;\n @Input() yAxis: boolean = true;\n @Input() showXAxisLabel: boolean;\n @Input() showYAxisLabel: boolean;\n @Input() xAxisLabel: string;\n @Input() yAxisLabel: string;\n @Input() trimXAxisTicks: boolean = true;\n @Input() trimYAxisTicks: boolean = true;\n @Input() rotateXAxisTicks: boolean = true;\n @Input() maxXAxisTickLength: number = 16;\n @Input() maxYAxisTickLength: number = 16;\n @Input() xAxisTickFormatting: any;\n @Input() yAxisTickFormatting: any;\n @Input() xAxisTicks: any[];\n @Input() yAxisTicks: any[];\n @Input() roundDomains: boolean = false;\n @Input() maxRadius: number = 10;\n @Input() minRadius: number = 3;\n @Input() autoScale: boolean;\n @Input() schemeType: ScaleType = ScaleType.Ordinal;\n @Input() tooltipDisabled: boolean = false;\n @Input() xScaleMin: number;\n @Input() xScaleMax: number;\n @Input() yScaleMin: number;\n @Input() yScaleMax: number;\n @Input() wrapTicks = false;\n\n @Output() activate: EventEmitter<any> = new EventEmitter();\n @Output() deactivate: EventEmitter<any> = new EventEmitter();\n\n @ContentChild('tooltipTemplate') tooltipTemplate: TemplateRef<any>;\n\n dims: ViewDimensions;\n colors: ColorHelper;\n scaleType: ScaleType = ScaleType.Linear;\n margin: number[] = [10, 20, 10, 20];\n bubblePadding: number[] = [0, 0, 0, 0];\n data: BubbleChartSeries[];\n\n legendOptions: LegendOptions;\n transform: string;\n\n clipPath: string;\n clipPathId: string;\n\n seriesDomain: number[];\n xDomain: number[];\n yDomain: number[];\n rDomain: number[];\n\n xScaleType: ScaleType;\n yScaleType: ScaleType;\n\n yScale: any;\n xScale: any;\n rScale: any;\n\n xAxisHeight: number = 0;\n yAxisWidth: number = 0;\n\n activeEntries: any[] = [];\n\n isSSR = false;\n\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n\n update(): void {\n super.update();\n\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n\n this.seriesDomain = this.results.map(d => d.name);\n this.rDomain = this.getRDomain();\n this.xDomain = this.getXDomain();\n this.yDomain = this.getYDomain();\n\n this.transform = `translate(${this.dims.xOffset},${this.margin[0]})`;\n\n const colorDomain = this.schemeType === ScaleType.Ordinal ? this.seriesDomain : this.rDomain;\n this.colors = new ColorHelper(this.scheme, this.schemeType, colorDomain, this.customColors);\n\n this.data = this.results;\n\n this.minRadius = Math.max(this.minRadius, 1);\n this.maxRadius = Math.max(this.maxRadius, 1);\n\n this.rScale = this.getRScale(this.rDomain, [this.minRadius, this.maxRadius]);\n\n this.bubblePadding = [0, 0, 0, 0];\n this.setScales();\n\n this.bubblePadding = this.getBubblePadding();\n this.setScales();\n\n this.legendOptions = this.getLegendOptions();\n\n this.clipPathId = 'clip' + id().toString();\n this.clipPath = `url(#${this.clipPathId})`;\n }\n\n @HostListener('mouseleave')\n hideCircles(): void {\n this.deactivateAll();\n }\n\n onClick(data, series?): void {\n if (series) {\n data.series = series.name;\n }\n\n this.select.emit(data);\n }\n\n getBubblePadding(): number[] {\n let yMin = 0;\n let xMin = 0;\n let yMax = this.dims.height;\n let xMax = this.dims.width;\n\n for (const s of this.data) {\n for (const d of s.series) {\n const r = this.rScale(d.r);\n const cx = this.xScaleType === ScaleType.Linear ? this.xScale(Number(d.x)) : this.xScale(d.x);\n const cy = this.yScaleType === ScaleType.Linear ? this.yScale(Number(d.y)) : this.yScale(d.y);\n xMin = Math.max(r - cx, xMin);\n yMin = Math.max(r - cy, yMin);\n yMax = Math.max(cy + r, yMax);\n xMax = Math.max(cx + r, xMax);\n }\n }\n\n xMax = Math.max(xMax - this.dims.width, 0);\n yMax = Math.max(yMax - this.dims.height, 0);\n\n return [yMin, xMax, yMax, xMin];\n }\n\n setScales() {\n let width = this.dims.width;\n if (this.xScaleMin === undefined && this.xScaleMax === undefined) {\n width = width - this.bubblePadding[1];\n }\n let height = this.dims.height;\n if (this.yScaleMin === undefined && this.yScaleMax === undefined) {\n height = height - this.bubblePadding[2];\n }\n this.xScale = this.getXScale(this.xDomain, width);\n this.yScale = this.getYScale(this.yDomain, height);\n }\n\n getYScale(domain, height: number): any {\n return getScale(domain, [height, this.bubblePadding[0]], this.yScaleType, this.roundDomains);\n }\n\n getXScale(domain, width: number): any {\n return getScale(domain, [this.bubblePadding[3], width], this.xScaleType, this.roundDomains);\n }\n\n getRScale(domain, range): any {\n const scale = scaleLinear().range(range).domain(domain);\n\n return this.roundDomains ? scale.nice() : scale;\n }\n\n getLegendOptions(): LegendOptions {\n const opts = {\n scaleType: this.schemeType as any,\n colors: undefined,\n domain: [],\n position: this.legendPosition,\n title: undefined\n };\n\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.seriesDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n } else {\n opts.domain = this.rDomain;\n opts.colors = this.colors.scale;\n }\n\n return opts;\n }\n\n getXDomain(): number[] {\n const values = [];\n\n for (const results of this.results) {\n for (const d of results.series) {\n if (!values.includes(d.x)) {\n values.push(d.x);\n }\n }\n }\n\n this.xScaleType = getScaleType(values);\n return getDomain(values, this.xScaleType, this.autoScale, this.xScaleMin, this.xScaleMax);\n }\n\n getYDomain(): number[] {\n const values = [];\n\n for (const results of this.results) {\n for (const d of results.series) {\n if (!values.includes(d.y)) {\n values.push(d.y);\n }\n }\n }\n\n this.yScaleType = getScaleType(values);\n return getDomain(values, this.yScaleType, this.autoScale, this.yScaleMin, this.yScaleMax);\n }\n\n getRDomain(): [number, number] {\n let min = Infinity;\n let max = -Infinity;\n\n for (const results of this.results) {\n for (const d of results.series) {\n const value = Number(d.r) || 1;\n min = Math.min(min, value);\n max = Math.max(max, value);\n }\n }\n\n return [min, max];\n }\n\n updateYAxisWidth({ width }: { width: number }): void {\n this.yAxisWidth = width;\n this.update();\n }\n\n updateXAxisHeight({ height }: { height: number }): void {\n this.xAxisHeight = height;\n this.update();\n }\n\n onActivate(item): void {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name;\n });\n if (idx > -1) {\n return;\n }\n\n this.activeEntries = [item, ...this.activeEntries];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n\n onDeactivate(item): void {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name;\n });\n\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n\n deactivateAll(): void {\n this.activeEntries = [...this.activeEntries];\n for (const entry of this.activeEntries) {\n this.deactivate.emit({ value: entry, entries: [] });\n }\n this.activeEntries = [];\n }\n\n trackBy(index: number, item): string {\n return `${item.name}`;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ChartCommonModule } from '../common/chart-common.module';\nimport { BubbleChartComponent } from './bubble-chart.component';\nimport { BubbleSeriesComponent } from './bubble-series.component';\n\n@NgModule({\n imports: [ChartCommonModule],\n declarations: [BubbleChartComponent, BubbleSeriesComponent],\n exports: [BubbleChartComponent, BubbleSeriesComponent]\n})\nexport class BubbleChartModule {}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n SimpleChanges,\n ElementRef,\n OnChanges,\n ChangeDetectionStrategy,\n HostListener\n} from '@angular/core';\nimport { select } from 'd3-selection';\nimport { Transition } from 'd3-transition';\nimport { BarOrientation } from '../common/types/bar-orientation.enum';\nimport { Gradient } from '../common/types/gradient.interface';\nimport { id } from '../utils/id';\n\n@Component({\n selector: 'g[ngx-charts-heat-map-cell]',\n template: `\n <svg:g [attr.transform]=\"transform\" class=\"cell\">\n <defs *ngIf=\"gradient\">\n <svg:g\n ngx-charts-svg-linear-gradient\n [orientation]=\"barOrientation.Vertical\"\n [name]=\"gradientId\"\n [stops]=\"gradientStops\"\n />\n </defs>\n <svg:rect\n [attr.fill]=\"gradient ? gradientUrl : fill\"\n rx=\"3\"\n [attr.width]=\"width\"\n [attr.height]=\"height\"\n class=\"cell\"\n (click)=\"onClick()\"\n />\n </svg:g>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class HeatMapCellComponent implements OnChanges {\n @Input() fill: string;\n @Input() x: number;\n @Input() y: number;\n @Input() width: number;\n @Input() height: number;\n @Input() data: number;\n @Input() gradient: boolean = false;\n @Input() animations: boolean = true;\n\n @Output() select: EventEmitter<number> = new EventEmitter();\n @Output() activate: EventEmitter<number> = new EventEmitter();\n @Output() deactivate: EventEmitter<number> = new EventEmitter();\n\n element: HTMLElement;\n transform: string;\n startOpacity: number;\n gradientId: string;\n gradientUrl: string;\n gradientStops: Gradient[];\n\n barOrientation = BarOrientation;\n\n constructor(element: ElementRef) {\n this.element = element.nativeElement;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.transform = `translate(${this.x} , ${this.y})`;\n\n this.startOpacity = 0.3;\n this.gradientId = 'grad' + id().toString();\n this.gradientUrl = `url(#${this.gradientId})`;\n this.gradientStops = this.getGradientStops();\n\n if (this.animations) {\n this.loadAnimation();\n }\n }\n\n getGradientStops(): Gradient[] {\n return [\n {\n offset: 0,\n color: this.fill,\n opacity: this.startOpacity\n },\n {\n offset: 100,\n color: this.fill,\n opacity: 1\n }\n ];\n }\n\n loadAnimation(): void {\n const node = select(this.element).select('.cell');\n node.attr('opacity', 0);\n this.animateToCurrentForm();\n }\n\n animateToCurrentForm(): void {\n const node = select(this.element).select('.cell');\n\n node.transition().duration(750).attr('opacity', 1);\n }\n\n onClick(): void {\n this.select.emit(this.data);\n }\n\n @HostListener('mouseenter')\n onMouseEnter(): void {\n this.activate.emit(this.data);\n }\n\n @HostListener('mouseleave')\n onMouseLeave(): void {\n this.deactivate.emit(this.data);\n }\n}\n","import {\n Component,\n Input,\n SimpleChanges,\n Output,\n EventEmitter,\n OnChanges,\n OnInit,\n ChangeDetectionStrategy,\n TemplateRef\n} from '@angular/core';\nimport { formatLabel, escapeLabel } from '../common/label.helper';\nimport { DataItem, Series } from '../models/chart-data.model';\nimport { PlacementTypes } from '../common/tooltip/position';\nimport { StyleTypes } from '../common/tooltip/style.type';\n\ninterface Cell {\n cell: DataItem;\n data: number;\n fill: string;\n height: number;\n label: string;\n row: Series;\n series: string;\n width: number;\n x: number;\n y: number;\n}\n@Component({\n selector: 'g[ngx-charts-heat-map-cell-series]',\n template: `\n <svg:g\n ngx-charts-heat-map-cell\n *ngFor=\"let c of cells; trackBy: trackBy\"\n [x]=\"c.x\"\n [y]=\"c.y\"\n [width]=\"c.width\"\n [height]=\"c.height\"\n [fill]=\"c.fill\"\n [data]=\"c.data\"\n (select)=\"onClick(c.cell)\"\n (activate)=\"activate.emit(c.cell)\"\n (deactivate)=\"deactivate.emit(c.cell)\"\n [gradient]=\"gradient\"\n [animations]=\"animations\"\n ngx-tooltip\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipPlacement]=\"placementTypes.Top\"\n [tooltipType]=\"styleTypes.tooltip\"\n [tooltipTitle]=\"tooltipTemplate ? undefined : tooltipText(c)\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipContext]=\"{ series: c.series, name: c.label, value: c.data }\"\n ></svg:g>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class HeatCellSeriesComponent implements OnChanges, OnInit {\n @Input() data;\n @Input() colors;\n @Input() xScale;\n @Input() yScale;\n @Input() gradient: boolean;\n @Input() tooltipDisabled: boolean = false;\n @Input() tooltipText: any;\n @Input() tooltipTemplate: TemplateRef<any>;\n @Input() animations: boolean = true;\n\n @Output() select: EventEmitter<DataItem> = new EventEmitter();\n @Output() activate: EventEmitter<DataItem> = new EventEmitter();\n @Output() deactivate: EventEmitter<DataItem> = new EventEmitter();\n\n cells: Cell[];\n\n placementTypes = PlacementTypes;\n styleTypes = StyleTypes;\n\n ngOnInit() {\n if (!this.tooltipText) {\n this.tooltipText = this.getTooltipText;\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.update();\n }\n\n update(): void {\n this.cells = this.getCells();\n }\n\n getCells(): Cell[] {\n const cells = [];\n\n this.data.map(row => {\n row.series.map(cell => {\n const value = cell.value;\n cell.series = row.name;\n\n cells.push({\n row,\n cell,\n x: this.xScale(row.name),\n y: this.yScale(cell.name),\n width: this.xScale.bandwidth(),\n height: this.yScale.bandwidth(),\n fill: this.colors.getColor(value),\n data: value,\n label: formatLabel(cell.name),\n series: row.name\n });\n });\n });\n\n return cells;\n }\n\n getTooltipText({ label, data, series }: { label: string; data: number; series: string }): string {\n return `\n <span class=\"tooltip-label\">${escapeLabel(series)} • ${escapeLabel(label)}</span>\n <span class=\"tooltip-val\">${data.toLocaleString()}</span>\n `;\n }\n\n trackBy(index: number, item): string {\n return item.label;\n }\n\n onClick(data): void {\n this.select.emit(data);\n }\n}\n","import {\n Component,\n Input,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ContentChild,\n TemplateRef,\n Output,\n EventEmitter\n} from '@angular/core';\nimport { scaleBand } from 'd3-scale';\n\nimport { BaseChartComponent } from '../common/base-chart.component';\nimport { calculateViewDimensions } from '../common/view-dimensions.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { getScaleType } from '../common/domain.helper';\nimport { LegendOptions, LegendPosition } from '../common/types/legend.model';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\nimport { ScaleType } from '../common/types/scale-type.enum';\n\ninterface RectItem {\n fill: string;\n height: number;\n rx: number;\n width: number;\n x: number;\n y: number;\n}\n\n@Component({\n selector: 'ngx-charts-heat-map',\n template: `\n <ngx-charts-chart\n [view]=\"[width, height]\"\n [showLegend]=\"legend\"\n [animations]=\"animations\"\n [legendOptions]=\"legendOptions\"\n (legendLabelClick)=\"onClick($event)\"\n >\n <svg:g [attr.transform]=\"transform\" class=\"heat-map chart\">\n <svg:g\n ngx-charts-x-axis\n *ngIf=\"xAxis\"\n [xScale]=\"xScale\"\n [dims]=\"dims\"\n [showLabel]=\"showXAxisLabel\"\n [labelText]=\"xAxisLabel\"\n [trimTicks]=\"trimXAxisTicks\"\n [rotateTicks]=\"rotateXAxisTicks\"\n [maxTickLength]=\"maxXAxisTickLength\"\n [tickFormatting]=\"xAxisTickFormatting\"\n [ticks]=\"xAxisTicks\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateXAxisHeight($event)\"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf=\"yAxis\"\n [yScale]=\"yScale\"\n [dims]=\"dims\"\n [showLabel]=\"showYAxisLabel\"\n [labelText]=\"yAxisLabel\"\n [trimTicks]=\"trimYAxisTicks\"\n [maxTickLength]=\"maxYAxisTickLength\"\n [tickFormatting]=\"yAxisTickFormatting\"\n [ticks]=\"yAxisTicks\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateYAxisWidth($event)\"\n ></svg:g>\n <svg:rect\n *ngFor=\"let rect of rects\"\n [attr.x]=\"rect.x\"\n [attr.y]=\"rect.y\"\n [attr.rx]=\"rect.rx\"\n [attr.width]=\"rect.width\"\n [attr.height]=\"rect.height\"\n [attr.fill]=\"rect.fill\"\n />\n <svg:g\n ngx-charts-heat-map-cell-series\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [colors]=\"colors\"\n [data]=\"results\"\n [gradient]=\"gradient\"\n [animations]=\"animations\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipText]=\"tooltipText\"\n (select)=\"onClick($event)\"\n (activate)=\"onActivate($event, undefined)\"\n (deactivate)=\"onDeactivate($event, undefined)\"\n />\n </svg:g>\n </ngx-charts-chart>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrls: ['../common/base-chart.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class HeatMapComponent extends BaseChartComponent {\n @Input() legend: boolean;\n @Input() legendTitle: string = 'Legend';\n @Input() legendPosition: LegendPosition = LegendPosition.Right;\n @Input() xAxis: boolean;\n @Input() yAxis: boolean;\n @Input() showXAxisLabel: boolean;\n @Input() showYAxisLabel: boolean;\n @Input() xAxisLabel: string;\n @Input() yAxisLabel: string;\n @Input() gradient: boolean;\n @Input() innerPadding: number | number[] | string | string[] = 8;\n @Input() trimXAxisTicks: boolean = true;\n @Input() trimYAxisTicks: boolean = true;\n @Input() rotateXAxisTicks: boolean = true;\n @Input() maxXAxisTickLength: number = 16;\n @Input() maxYAxisTickLength: number = 16;\n @Input() xAxisTickFormatting: any;\n @Input() yAxisTickFormatting: any;\n @Input() xAxisTicks: any[];\n @Input() yAxisTicks: any[];\n @Input() tooltipDisabled: boolean = false;\n @Input() tooltipText: any;\n @Input() min: number;\n @Input() max: number;\n @Input() activeEntries: any[] = [];\n @Input() wrapTicks = false;\n\n @Output() activate: EventEmitter<any> = new EventEmitter();\n @Output() deactivate: EventEmitter<any> = new EventEmitter();\n\n @ContentChild('tooltipTemplate') tooltipTemplate: TemplateRef<any>;\n\n dims: ViewDimensions;\n xDomain: string[];\n yDomain: string[];\n valueDomain: any[];\n xScale: any;\n yScale: any;\n colors: ColorHelper;\n colorScale: any;\n transform: string;\n rects: RectItem[];\n margin: number[] = [10, 20, 10, 20];\n xAxisHeight: number = 0;\n yAxisWidth: number = 0;\n legendOptions: LegendOptions;\n scaleType: ScaleType = ScaleType.Linear;\n\n update(): void {\n super.update();\n\n this.formatDates();\n\n this.xDomain = this.getXDomain();\n this.yDomain = this.getYDomain();\n this.valueDomain = this.getValueDomain();\n\n this.scaleType = getScaleType(this.valueDomain, false);\n\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.scaleType as any,\n legendPosition: this.legendPosition\n });\n\n if (this.scaleType === ScaleType.Linear) {\n let min = this.min;\n let max = this.max;\n if (!this.min) {\n min = Math.min(0, ...this.valueDomain);\n }\n if (!this.max) {\n max = Math.max(...this.valueDomain);\n }\n this.valueDomain = [min, max];\n }\n\n this.xScale = this.getXScale();\n this.yScale = this.getYScale();\n\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n this.rects = this.getRects();\n }\n\n getXDomain(): string[] {\n const domain = [];\n for (const group of this.results) {\n if (!domain.includes(group.name)) {\n domain.push(group.name);\n }\n }\n\n return domain;\n }\n\n getYDomain(): string[] {\n const domain = [];\n\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.name)) {\n domain.push(d.name);\n }\n }\n }\n\n return domain;\n }\n\n getValueDomain(): any[] {\n const domain = [];\n\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.value)) {\n domain.push(d.value);\n }\n }\n }\n\n return domain;\n }\n\n /**\n * Converts the input to gap paddingInner in fraction\n * Supports the following inputs:\n * Numbers: 8\n * Strings: \"8\", \"8px\", \"8%\"\n * Arrays: [8,2], \"8,2\", \"[8,2]\"\n * Mixed: [8,\"2%\"], [\"8px\",\"2%\"], \"8,2%\", \"[8,2%]\"\n *\n * @memberOf HeatMapComponent\n */\n getDimension(value: string | number | Array<string | number>, index: number = 0, N: number, L: number): number {\n if (typeof value === 'string') {\n value = value\n .replace('[', '')\n .replace(']', '')\n .replace('px', '')\n // tslint:disable-next-line: quotemark\n .replace(\"'\", '');\n\n if (value.includes(',')) {\n value = value.split(',');\n }\n }\n if (Array.isArray(value) && typeof index === 'number') {\n return this.getDimension(value[index], null, N, L);\n }\n if (typeof value === 'string' && value.includes('%')) {\n return +value.replace('%', '') / 100;\n }\n return N / (L / +value + 1);\n }\n\n getXScale(): any {\n const f = this.getDimension(this.innerPadding, 0, this.xDomain.length, this.dims.width);\n return scaleBand().rangeRound([0, this.dims.width]).domain(this.xDomain).paddingInner(f);\n }\n\n getYScale(): any {\n const f = this.getDimension(this.innerPadding, 1, this.yDomain.length, this.dims.height);\n return scaleBand().rangeRound([this.dims.height, 0]).domain(this.yDomain).paddingInner(f);\n }\n\n getRects(): RectItem[] {\n const rects = [];\n\n this.xDomain.map(xVal => {\n this.yDomain.map(yVal => {\n rects.push({\n x: this.xScale(xVal),\n y: this.yScale(yVal),\n rx: 3,\n width: this.xScale.bandwidth(),\n height: this.yScale.bandwidth(),\n fill: 'rgba(200,200,200,0.03)'\n });\n });\n });\n\n return rects;\n }\n\n onClick(data): void {\n this.select.emit(data);\n }\n\n setColors(): void {\n this.colors = new ColorHelper(this.scheme, this.scaleType, this.valueDomain);\n }\n\n getLegendOptions(): LegendOptions {\n return {\n scaleType: this.scaleType,\n domain: this.valueDomain,\n colors: this.scaleType === ScaleType.Ordinal ? this.colors : this.colors.scale,\n title: this.scaleType === ScaleType.Ordinal ? this.legendTitle : undefined,\n position: this.legendPosition\n };\n }\n\n updateYAxisWidth({ width }: { width: number }): void {\n this.yAxisWidth = width;\n this.update();\n }\n\n updateXAxisHeight({ height }: { height: number }): void {\n this.xAxisHeight = height;\n this.update();\n }\n\n onActivate(event, group, fromLegend: boolean = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n\n const items = this.results\n .map(g => g.series)\n .flat()\n .filter(i => {\n if (fromLegend) {\n return i.label === item.name;\n } else {\n return i.name === item.name && i.series === item.series;\n }\n });\n\n this.activeEntries = [...items];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n\n onDeactivate(event, group, fromLegend: boolean = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n\n this.activeEntries = this.activeEntries.filter(i => {\n if (fromLegend) {\n return i.label !== item.name;\n } else {\n return !(i.name === item.name && i.series === item.series);\n }\n });\n\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ChartCommonModule } from '../common/chart-common.module';\nimport { HeatMapCellComponent } from './heat-map-cell.component';\nimport { HeatCellSeriesComponent } from './heat-map-cell-series.component';\nimport { HeatMapComponent } from './heat-map.component';\n\n@NgModule({\n imports: [ChartCommonModule],\n declarations: [HeatMapCellComponent, HeatCellSeriesComponent, HeatMapComponent],\n exports: [HeatMapCellComponent, HeatCellSeriesComponent, HeatMapComponent]\n})\nexport class HeatMapModule {}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n OnChanges,\n ElementRef,\n ChangeDetectionStrategy,\n SimpleChanges,\n PLATFORM_ID,\n Inject,\n OnInit\n} from '@angular/core';\nimport { trigger, style, animate, transition } from '@angular/animations';\nimport { select } from 'd3-selection';\nimport { Series } from '../models/chart-data.model';\nimport { isPlatformServer } from '@angular/common';\n\n@Component({\n selector: 'g[ngx-charts-line]',\n template: `\n <svg:g *ngIf=\"!isSSR\">\n <svg:path\n [@animationState]=\"'active'\"\n class=\"line\"\n [attr.d]=\"initialPath\"\n [attr.fill]=\"fill\"\n [attr.stroke]=\"stroke\"\n stroke-width=\"1.5px\"\n />\n </svg:g>\n <svg:g *ngIf=\"isSSR\">\n <svg:path class=\"line\" [attr.d]=\"initialPath\" [attr.fill]=\"fill\" [attr.stroke]=\"stroke\" stroke-width=\"1.5px\" />\n </svg:g>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('animationState', [\n transition(':enter', [\n style({\n strokeDasharray: 2000,\n strokeDashoffset: 2000\n }),\n animate(\n 1000,\n style({\n strokeDashoffset: 0\n })\n )\n ])\n ])\n ]\n})\nexport class LineComponent implements OnChanges, OnInit {\n @Input() path: string;\n @Input() stroke: string;\n @Input() data: Series;\n @Input() fill: string = 'none';\n @Input() animations: boolean = true;\n\n // @Output() select = new EventEmitter();\n\n initialized: boolean = false;\n initialPath: string;\n\n isSSR = false;\n\n constructor(private element: ElementRef, @Inject(PLATFORM_ID) private platformId: any) {}\n\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (!this.initialized) {\n this.initialized = true;\n this.initialPath = this.path;\n } else {\n this.updatePathEl();\n }\n }\n\n updatePathEl(): void {\n const node = select(this.element.nativeElement).select('.line');\n\n if (this.animations) {\n node.transition().duration(750).attr('d', this.path);\n } else {\n node.attr('d', this.path);\n }\n }\n}\n","import { Component, Input, OnChanges, SimpleChanges, ChangeDetectionStrategy } from '@angular/core';\nimport { area, line } from 'd3-shape';\n\nimport { id } from '../utils/id';\nimport { sortLinear, sortByTime, sortByDomain } from '../utils/sort';\nimport { ColorHelper } from '../common/color.helper';\nimport { Series } from '../models/chart-data.model';\nimport { BarOrientation } from '../common/types/bar-orientation.enum';\nimport { ScaleType } from '../common/types/scale-type.enum';\nimport { Gradient } from '../common/types/gradient.interface';\n\n@Component({\n selector: 'g[ngx-charts-line-series]',\n template: `\n <svg:g>\n <defs>\n <svg:g\n ngx-charts-svg-linear-gradient\n *ngIf=\"hasGradient\"\n [orientation]=\"barOrientation.Vertical\"\n [name]=\"gradientId\"\n [stops]=\"gradientStops\"\n />\n </defs>\n <svg:g\n ngx-charts-area\n class=\"line-highlight\"\n [data]=\"data\"\n [path]=\"areaPath\"\n [fill]=\"hasGradient ? gradientUrl : colors.getColor(data.name)\"\n [opacity]=\"0.25\"\n [startOpacity]=\"0\"\n [gradient]=\"true\"\n [stops]=\"areaGradientStops\"\n [class.active]=\"isActive(data)\"\n [class.inactive]=\"isInactive(data)\"\n [animations]=\"animations\"\n />\n <svg:g\n ngx-charts-line\n class=\"line-series\"\n [data]=\"data\"\n [path]=\"path\"\n [stroke]=\"stroke\"\n [animations]=\"animations\"\n [class.active]=\"isActive(data)\"\n [class.inactive]=\"isInactive(data)\"\n />\n <svg:g\n ngx-charts-area\n *ngIf=\"hasRange\"\n class=\"line-series-range\"\n [data]=\"data\"\n [path]=\"outerPath\"\n [fill]=\"hasGradient ? gradientUrl : colors.getColor(data.name)\"\n [class.active]=\"isActive(data)\"\n [class.inactive]=\"isInactive(data)\"\n [opacity]=\"rangeFillOpacity\"\n [animations]=\"animations\"\n />\n </svg:g>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class LineSeriesComponent implements OnChanges {\n @Input() data: Series;\n @Input() xScale;\n @Input() yScale;\n @Input() colors: ColorHelper;\n @Input() scaleType: ScaleType;\n @Input() curve: any;\n @Input() activeEntries: any[];\n @Input() rangeFillOpacity: number;\n @Input() hasRange: boolean;\n @Input() animations: boolean = true;\n\n path: string;\n outerPath: string;\n areaPath: string;\n gradientId: string;\n gradientUrl: string;\n hasGradient: boolean;\n gradientStops: Gradient[];\n areaGradientStops: Gradient[];\n stroke: string;\n\n barOrientation = BarOrientation;\n\n ngOnChanges(changes: SimpleChanges): void {\n this.update();\n }\n\n update(): void {\n this.updateGradients();\n\n const data = this.sortData(this.data.series);\n\n const lineGen = this.getLineGenerator();\n this.path = lineGen(data) || '';\n\n const areaGen = this.getAreaGenerator();\n this.areaPath = areaGen(data) || '';\n\n if (this.hasRange) {\n const range = this.getRangeGenerator();\n this.outerPath = range(data) || '';\n }\n\n if (this.hasGradient) {\n this.stroke = this.gradientUrl;\n const values = this.data.series.map(d => d.value);\n const max = Math.max(...values);\n const min = Math.min(...values);\n if (max === min) {\n this.stroke = this.colors.getColor(max);\n }\n } else {\n this.stroke = this.colors.getColor(this.data.name);\n }\n }\n\n getLineGenerator(): any {\n return line<any>()\n .x(d => {\n const label = d.name;\n let value;\n if (this.scaleType === ScaleType.Time) {\n value = this.xScale(label);\n } else if (this.scaleType === ScaleType.Linear) {\n value = this.xScale(Number(label));\n } else {\n value = this.xScale(label);\n }\n return value;\n })\n .y(d => this.yScale(d.value))\n .curve(this.curve);\n }\n\n getRangeGenerator(): any {\n return area<any>()\n .x(d => {\n const label = d.name;\n let value;\n if (this.scaleType === ScaleType.Time) {\n value = this.xScale(label);\n } else if (this.scaleType === ScaleType.Linear) {\n value = this.xScale(Number(label));\n } else {\n value = this.xScale(label);\n }\n return value;\n })\n .y0(d => this.yScale(typeof d.min === 'number' ? d.min : d.value))\n .y1(d => this.yScale(typeof d.max === 'number' ? d.max : d.value))\n .curve(this.curve);\n }\n\n getAreaGenerator(): any {\n const xProperty = d => {\n const label = d.name;\n return this.xScale(label);\n };\n\n return area<any>()\n .x(xProperty)\n .y0(() => this.yScale.range()[0])\n .y1(d => this.yScale(d.value))\n .curve(this.curve);\n }\n\n sortData(data) {\n if (this.scaleType === ScaleType.Linear) {\n data = sortLinear(data, 'name');\n } else if (this.scaleType === ScaleType.Time) {\n data = sortByTime(data, 'name');\n } else {\n data = sortByDomain(data, 'name', 'asc', this.xScale.domain());\n }\n\n return data;\n }\n\n updateGradients() {\n if (this.colors.scaleType === ScaleType.Linear) {\n this.hasGradient = true;\n this.gradientId = 'grad' + id().toString();\n this.gradientUrl = `url(#${this.gradientId})`;\n const values = this.data.series.map(d => d.value);\n const max = Math.max(...values);\n const min = Math.min(...values);\n this.gradientStops = this.colors.getLinearGradientStops(max, min);\n this.areaGradientStops = this.colors.getLinearGradientStops(max);\n } else {\n this.hasGradient = false;\n this.gradientStops = undefined;\n this.areaGradientStops = undefined;\n }\n }\n\n isActive(entry): boolean {\n if (!this.activeEntries) return false;\n const item = this.activeEntries.find(d => {\n return entry.name === d.name;\n });\n return item !== undefined;\n }\n\n isInactive(entry): boolean {\n if (!this.activeEntries || this.activeEntries.length === 0) return false;\n const item = this.activeEntries.find(d => {\n return entry.name === d.name;\n });\n return item === undefined;\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ViewEncapsulation,\n HostListener,\n ChangeDetectionStrategy,\n ContentChild,\n TemplateRef,\n OnInit\n} from '@angular/core';\nimport { trigger, style, animate, transition } from '@angular/animations';\nimport { scaleLinear, scaleTime, scalePoint } from 'd3-scale';\nimport { curveLinear } from 'd3-shape';\n\nimport { calculateViewDimensions } from '../common/view-dimensions.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { BaseChartComponent } from '../common/base-chart.component';\nimport { id } from '../utils/id';\nimport { getUniqueXDomainValues, getScaleType } from '../common/domain.helper';\nimport { LegendOptions, LegendPosition } from '../common/types/legend.model';\nimport { ScaleType } from '../common/types/scale-type.enum';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\nimport { isPlatformServer } from '@angular/common';\n\n@Component({\n selector: 'ngx-charts-line-chart',\n template: `\n <ngx-charts-chart\n [view]=\"[width, height]\"\n [showLegend]=\"legend\"\n [legendOptions]=\"legendOptions\"\n [activeEntries]=\"activeEntries\"\n [animations]=\"animations\"\n (legendLabelClick)=\"onClick($event)\"\n (legendLabelActivate)=\"onActivate($event)\"\n (legendLabelDeactivate)=\"onDeactivate($event)\"\n >\n <svg:defs>\n <svg:clipPath [attr.id]=\"clipPathId\">\n <svg:rect\n [attr.width]=\"dims.width + 10\"\n [attr.height]=\"dims.height + 10\"\n [attr.transform]=\"'translate(-5, -5)'\"\n />\n </svg:clipPath>\n </svg:defs>\n <svg:g [attr.transform]=\"transform\" class=\"line-chart chart\">\n <svg:g\n ngx-charts-x-axis\n *ngIf=\"xAxis\"\n [xScale]=\"xScale\"\n [dims]=\"dims\"\n [showGridLines]=\"showGridLines\"\n [showLabel]=\"showXAxisLabel\"\n [labelText]=\"xAxisLabel\"\n [trimTicks]=\"trimXAxisTicks\"\n [rotateTicks]=\"rotateXAxisTicks\"\n [maxTickLength]=\"maxXAxisTickLength\"\n [tickFormatting]=\"xAxisTickFormatting\"\n [ticks]=\"xAxisTicks\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateXAxisHeight($event)\"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf=\"yAxis\"\n [yScale]=\"yScale\"\n [dims]=\"dims\"\n [showGridLines]=\"showGridLines\"\n [showLabel]=\"showYAxisLabel\"\n [labelText]=\"yAxisLabel\"\n [trimTicks]=\"trimYAxisTicks\"\n [maxTickLength]=\"maxYAxisTickLength\"\n [tickFormatting]=\"yAxisTickFormatting\"\n [ticks]=\"yAxisTicks\"\n [referenceLines]=\"referenceLines\"\n [showRefLines]=\"showRefLines\"\n [showRefLabels]=\"showRefLabels\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateYAxisWidth($event)\"\n ></svg:g>\n <svg:g [attr.clip-path]=\"clipPath\">\n <svg:g *ngIf=\"!isSSR\">\n <svg:g *ngFor=\"let series of results; trackBy: trackBy\" [@animationState]=\"'active'\">\n <svg:g\n ngx-charts-line-series\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [colors]=\"colors\"\n [data]=\"series\"\n [activeEntries]=\"activeEntries\"\n [scaleType]=\"scaleType\"\n [curve]=\"curve\"\n [rangeFillOpacity]=\"rangeFillOpacity\"\n [hasRange]=\"hasRange\"\n [animations]=\"animations\"\n />\n </svg:g>\n </svg:g>\n <svg:g *ngIf=\"isSSR\">\n <svg:g *ngFor=\"let series of results; trackBy: trackBy\">\n <svg:g\n ngx-charts-line-series\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [colors]=\"colors\"\n [data]=\"series\"\n [activeEntries]=\"activeEntries\"\n [scaleType]=\"scaleType\"\n [curve]=\"curve\"\n [rangeFillOpacity]=\"rangeFillOpacity\"\n [hasRange]=\"hasRange\"\n [animations]=\"animations\"\n />\n </svg:g>\n </svg:g>\n\n <svg:g *ngIf=\"!tooltipDisabled\" (mouseleave)=\"hideCircles()\">\n <svg:g\n ngx-charts-tooltip-area\n [dims]=\"dims\"\n [xSet]=\"xSet\"\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [results]=\"results\"\n [colors]=\"colors\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"seriesTooltipTemplate\"\n (hover)=\"updateHoveredVertical($event)\"\n />\n\n <svg:g *ngFor=\"let series of results\">\n <svg:g\n ngx-charts-circle-series\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [colors]=\"colors\"\n [data]=\"series\"\n [scaleType]=\"scaleType\"\n [visibleValue]=\"hoveredVertical\"\n [activeEntries]=\"activeEntries\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n (select)=\"onClick($event)\"\n (activate)=\"onActivate($event)\"\n (deactivate)=\"onDeactivate($event)\"\n />\n </svg:g>\n </svg:g>\n </svg:g>\n </svg:g>\n <svg:g\n ngx-charts-timeline\n *ngIf=\"timeline && scaleType != 'ordinal'\"\n [attr.transform]=\"timelineTransform\"\n [results]=\"results\"\n [view]=\"[timelineWidth, height]\"\n [height]=\"timelineHeight\"\n [scheme]=\"scheme\"\n [customColors]=\"customColors\"\n [scaleType]=\"scaleType\"\n [legend]=\"legend\"\n (onDomainChange)=\"updateDomain($event)\"\n >\n <svg:g *ngFor=\"let series of results; trackBy: trackBy\">\n <svg:g\n ngx-charts-line-series\n [xScale]=\"timelineXScale\"\n [yScale]=\"timelineYScale\"\n [colors]=\"colors\"\n [data]=\"series\"\n [scaleType]=\"scaleType\"\n [curve]=\"curve\"\n [hasRange]=\"hasRange\"\n [animations]=\"animations\"\n />\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n `,\n styleUrls: ['../common/base-chart.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1\n }),\n animate(\n 500,\n style({\n opacity: 0\n })\n )\n ])\n ])\n ]\n})\nexport class LineChartComponent extends BaseChartComponent implements OnInit {\n @Input() legend: boolean;\n @Input() legendTitle: string = 'Legend';\n @Input() legendPosition: LegendPosition = LegendPosition.Right;\n @Input() xAxis: boolean;\n @Input() yAxis: boolean;\n @Input() showXAxisLabel: boolean;\n @Input() showYAxisLabel: boolean;\n @Input() xAxisLabel: string;\n @Input() yAxisLabel: string;\n @Input() autoScale: boolean;\n @Input() timeline: boolean;\n @Input() gradient: boolean;\n @Input() showGridLines: boolean = true;\n @Input() curve: any = curveLinear;\n @Input() activeEntries: any[] = [];\n @Input() schemeType: ScaleType;\n @Input() rangeFillOpacity: number;\n @Input() trimXAxisTicks: boolean = true;\n @Input() trimYAxisTicks: boolean = true;\n @Input() rotateXAxisTicks: boolean = true;\n @Input() maxXAxisTickLength: number = 16;\n @Input() maxYAxisTickLength: number = 16;\n @Input() xAxisTickFormatting: any;\n @Input() yAxisTickFormatting: any;\n @Input() xAxisTicks: any[];\n @Input() yAxisTicks: any[];\n @Input() roundDomains: boolean = false;\n @Input() tooltipDisabled: boolean = false;\n @Input() showRefLines: boolean = false;\n @Input() referenceLines: any;\n @Input() showRefLabels: boolean = true;\n @Input() xScaleMin: number;\n @Input() xScaleMax: number;\n @Input() yScaleMin: number;\n @Input() yScaleMax: number;\n @Input() wrapTicks = false;\n\n @Output() activate: EventEmitter<any> = new EventEmitter();\n @Output() deactivate: EventEmitter<any> = new EventEmitter();\n\n @ContentChild('tooltipTemplate') tooltipTemplate: TemplateRef<any>;\n @ContentChild('seriesTooltipTemplate') seriesTooltipTemplate: TemplateRef<any>;\n\n dims: ViewDimensions;\n xSet: any;\n xDomain: any;\n yDomain: [number, number];\n seriesDomain: any;\n yScale: any;\n xScale: any;\n colors: ColorHelper;\n scaleType: ScaleType;\n transform: string;\n clipPath: string;\n clipPathId: string;\n areaPath: any;\n margin: number[] = [10, 20, 10, 20];\n hoveredVertical: any; // the value of the x axis that is hovered over\n xAxisHeight: number = 0;\n yAxisWidth: number = 0;\n filteredDomain: any;\n legendOptions: any;\n hasRange: boolean; // whether the line has a min-max range around it\n timelineWidth: any;\n timelineHeight: number = 50;\n timelineXScale: any;\n timelineYScale: any;\n timelineXDomain: any;\n timelineTransform: any;\n timelinePadding: number = 10;\n\n isSSR = false;\n\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n\n update(): void {\n super.update();\n\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n\n if (this.timeline) {\n this.dims.height -= this.timelineHeight + this.margin[2] + this.timelinePadding;\n }\n\n this.xDomain = this.getXDomain();\n if (this.filteredDomain) {\n this.xDomain = this.filteredDomain;\n }\n\n this.yDomain = this.getYDomain();\n this.seriesDomain = this.getSeriesDomain();\n\n this.xScale = this.getXScale(this.xDomain, this.dims.width);\n this.yScale = this.getYScale(this.yDomain, this.dims.height);\n\n this.updateTimeline();\n\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n\n this.clipPathId = 'clip' + id().toString();\n this.clipPath = `url(#${this.clipPathId})`;\n }\n\n updateTimeline(): void {\n if (this.timeline) {\n this.timelineWidth = this.dims.width;\n this.timelineXDomain = this.getXDomain();\n this.timelineXScale = this.getXScale(this.timelineXDomain, this.timelineWidth);\n this.timelineYScale = this.getYScale(this.yDomain, this.timelineHeight);\n this.timelineTransform = `translate(${this.dims.xOffset}, ${-this.margin[2]})`;\n }\n }\n\n getXDomain(): any[] {\n let values = getUniqueXDomainValues(this.results);\n\n this.scaleType = getScaleType(values);\n let domain = [];\n\n if (this.scaleType === ScaleType.Linear) {\n values = values.map(v => Number(v));\n }\n\n let min;\n let max;\n if (this.scaleType === ScaleType.Time || this.scaleType === ScaleType.Linear) {\n min = this.xScaleMin ? this.xScaleMin : Math.min(...values);\n\n max = this.xScaleMax ? this.xScaleMax : Math.max(...values);\n }\n\n if (this.scaleType === ScaleType.Time) {\n domain = [new Date(min), new Date(max)];\n this.xSet = [...values].sort((a, b) => {\n const aDate = a.getTime();\n const bDate = b.getTime();\n if (aDate > bDate) return 1;\n if (bDate > aDate) return -1;\n return 0;\n });\n } else if (this.scaleType === ScaleType.Linear) {\n domain = [min, max];\n // Use compare function to sort numbers numerically\n this.xSet = [...values].sort((a, b) => a - b);\n } else {\n domain = values;\n this.xSet = values;\n }\n\n return domain;\n }\n\n getYDomain(): [number, number] {\n const domain = [];\n for (const results of this.results) {\n for (const d of results.series) {\n if (domain.indexOf(d.value) < 0) {\n domain.push(d.value);\n }\n if (d.min !== undefined) {\n this.hasRange = true;\n if (domain.indexOf(d.min) < 0) {\n domain.push(d.min);\n }\n }\n if (d.max !== undefined) {\n this.hasRange = true;\n if (domain.indexOf(d.max) < 0) {\n domain.push(d.max);\n }\n }\n }\n }\n\n const values = [...domain];\n if (!this.autoScale) {\n values.push(0);\n }\n\n const min = this.yScaleMin ? this.yScaleMin : Math.min(...values);\n\n const max = this.yScaleMax ? this.yScaleMax : Math.max(...values);\n\n return [min, max];\n }\n\n getSeriesDomain(): string[] {\n return this.results.map(d => d.name);\n }\n\n getXScale(domain, width: number): any {\n let scale;\n\n if (this.scaleType === ScaleType.Time) {\n scale = scaleTime().range([0, width]).domain(domain);\n } else if (this.scaleType === ScaleType.Linear) {\n scale = scaleLinear().range([0, width]).domain(domain);\n\n if (this.roundDomains) {\n scale = scale.nice();\n }\n } else if (this.scaleType === ScaleType.Ordinal) {\n scale = scalePoint().range([0, width]).padding(0.1).domain(domain);\n }\n\n return scale;\n }\n\n getYScale(domain, height: number): any {\n const scale = scaleLinear().range([height, 0]).domain(domain);\n\n return this.roundDomains ? scale.nice() : scale;\n }\n\n updateDomain(domain): void {\n this.filteredDomain = domain;\n this.xDomain = this.filteredDomain;\n this.xScale = this.getXScale(this.xDomain, this.dims.width);\n }\n\n updateHoveredVertical(item): void {\n this.hoveredVertical = item.value;\n this.deactivateAll();\n }\n\n @HostListener('mouseleave')\n hideCircles(): void {\n this.hoveredVertical = null;\n this.deactivateAll();\n }\n\n onClick(data): void {\n this.select.emit(data);\n }\n\n trackBy(index: number, item): string {\n return `${item.name}`;\n }\n\n setColors(): void {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.seriesDomain;\n } else {\n domain = this.yDomain;\n }\n\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n\n getLegendOptions(): LegendOptions {\n const opts = {\n scaleType: this.schemeType as any,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.seriesDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n } else {\n opts.domain = this.yDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n\n updateYAxisWidth({ width }: { width: number }): void {\n this.yAxisWidth = width;\n this.update();\n }\n\n updateXAxisHeight({ height }: { height: number }): void {\n this.xAxisHeight = height;\n this.update();\n }\n\n onActivate(item): void {\n this.deactivateAll();\n\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n if (idx > -1) {\n return;\n }\n\n this.activeEntries = [item];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n\n onDeactivate(item): void {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n\n deactivateAll(): void {\n this.activeEntries = [...this.activeEntries];\n for (const entry of this.activeEntries) {\n this.deactivate.emit({ value: entry, entries: [] });\n }\n this.activeEntries = [];\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ChartCommonModule } from '../common/chart-common.module';\nimport { LineComponent } from './line.component';\nimport { LineChartComponent } from './line-chart.component';\nimport { LineSeriesComponent } from './line-series.component';\n\n@NgModule({\n imports: [ChartCommonModule],\n declarations: [LineComponent, LineChartComponent, LineSeriesComponent],\n exports: [LineComponent, LineChartComponent, LineSeriesComponent]\n})\nexport class LineChartModule {}\n","import { isPlatformServer } from '@angular/common';\nimport {\n Component,\n Input,\n OnChanges,\n SimpleChanges,\n ChangeDetectionStrategy,\n PLATFORM_ID,\n Inject\n} from '@angular/core';\nimport { arc, DefaultArcObject } from 'd3-shape';\n\nimport { trimLabel } from '../common/trim-label.helper';\nimport { TextAnchor } from '../common/types/text-anchor.enum';\nimport { DataItem } from '../models/chart-data.model';\n\nexport interface PieData extends DefaultArcObject {\n data: DataItem;\n index: number;\n pos: [number, number];\n value: number;\n}\n\n@Component({\n selector: 'g[ngx-charts-pie-label]',\n template: `\n <title>{{ label }}</title>\n <svg:g [attr.transform]=\"attrTransform\" [style.transform]=\"styleTransform\" [style.transition]=\"textTransition\">\n <svg:text\n class=\"pie-label\"\n [class.animation]=\"animations\"\n dy=\".35em\"\n [style.textAnchor]=\"textAnchor()\"\n [style.shapeRendering]=\"'crispEdges'\"\n >\n {{ labelTrim ? trimLabel(label, labelTrimSize) : label }}\n </svg:text>\n </svg:g>\n <svg:path\n [attr.d]=\"line\"\n [attr.stroke]=\"color\"\n fill=\"none\"\n class=\"pie-label-line line\"\n [class.animation]=\"animations\"\n ></svg:path>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PieLabelComponent implements OnChanges {\n @Input() data: PieData;\n @Input() radius: number;\n @Input() label: string;\n @Input() color: string;\n @Input() max: number;\n @Input() value: number;\n @Input() explodeSlices: boolean;\n @Input() animations: boolean = true;\n @Input() labelTrim: boolean = true;\n @Input() labelTrimSize: number = 10;\n\n trimLabel: (label: string, max?: number) => string;\n line: string;\n styleTransform: string;\n attrTransform: string;\n textTransition: string;\n\n constructor(@Inject(PLATFORM_ID) public platformId: any) {\n this.trimLabel = trimLabel;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.setTransforms();\n this.update();\n }\n\n setTransforms() {\n if (isPlatformServer(this.platformId)) {\n this.styleTransform = `translate3d(${this.textX}px,${this.textY}px, 0)`;\n this.attrTransform = `translate(${this.textX},${this.textY})`;\n this.textTransition = !this.animations ? null : 'transform 0.75s';\n } else {\n const isIE = /(edge|msie|trident)/i.test(navigator.userAgent);\n this.styleTransform = isIE ? null : `translate3d(${this.textX}px,${this.textY}px, 0)`;\n this.attrTransform = !isIE ? null : `translate(${this.textX},${this.textY})`;\n this.textTransition = isIE || !this.animations ? null : 'transform 0.75s';\n }\n }\n\n update(): void {\n let startRadius = this.radius;\n if (this.explodeSlices) {\n startRadius = (this.radius * this.value) / this.max;\n }\n\n const innerArc = arc().innerRadius(startRadius).outerRadius(startRadius);\n\n // Calculate innerPos then scale outer position to match label position\n const innerPos = innerArc.centroid(this.data);\n\n let scale = this.data.pos[1] / innerPos[1];\n if (this.data.pos[1] === 0 || innerPos[1] === 0) {\n scale = 1;\n }\n const outerPos = [scale * innerPos[0], scale * innerPos[1]];\n\n this.line = `M${innerPos}L${outerPos}L${this.data.pos}`;\n }\n\n get textX(): number {\n return this.data.pos[0];\n }\n\n get textY(): number {\n return this.data.pos[1];\n }\n\n textAnchor(): TextAnchor {\n return this.midAngle(this.data) < Math.PI ? TextAnchor.Start : TextAnchor.End;\n }\n\n midAngle(d): number {\n return d.startAngle + (d.endAngle - d.startAngle) / 2;\n }\n}\n","import {\n Component,\n Input,\n OnChanges,\n SimpleChanges,\n ChangeDetectionStrategy,\n TemplateRef,\n Output,\n EventEmitter\n} from '@angular/core';\nimport { lineRadial } from 'd3-shape';\n\nimport { id } from '../utils/id';\nimport { sortLinear, sortByTime, sortByDomain } from '../utils/sort';\nimport { escapeLabel } from '../common/label.helper';\nimport { Series, DataItem } from '../models/chart-data.model';\nimport { PlacementTypes } from '../common/tooltip/position';\nimport { StyleTypes } from '../common/tooltip/style.type';\nimport { BarOrientation } from '../common/types/bar-orientation.enum';\nimport { ScaleType } from '../common/types/scale-type.enum';\n\ninterface PolarChartCircle {\n color: string;\n cx: number;\n cy: number;\n data: Series;\n label: string;\n value: number;\n}\n\n@Component({\n selector: 'g[ngx-charts-polar-series]',\n template: `\n <svg:g class=\"polar-charts-series\">\n <defs>\n <svg:g\n ngx-charts-svg-radial-gradient\n *ngIf=\"hasGradient\"\n [color]=\"seriesColor\"\n [name]=\"gradientId\"\n [startOpacity]=\"0.25\"\n [endOpacity]=\"1\"\n [stops]=\"gradientStops\"\n />\n </defs>\n <svg:g\n ngx-charts-line\n class=\"polar-series-path\"\n [path]=\"path\"\n [stroke]=\"hasGradient ? gradientUrl : seriesColor\"\n [class.active]=\"active\"\n [class.inactive]=\"inactive\"\n [attr.fill-opacity]=\"rangeFillOpacity\"\n [fill]=\"hasGradient ? gradientUrl : seriesColor\"\n [animations]=\"animations\"\n />\n <svg:g\n ngx-charts-circle\n *ngFor=\"let circle of circles\"\n class=\"circle\"\n [cx]=\"circle.cx\"\n [cy]=\"circle.cy\"\n [r]=\"circleRadius\"\n [fill]=\"circle.color\"\n [style.opacity]=\"inactive ? 0.2 : 1\"\n ngx-tooltip\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipPlacement]=\"placementTypes.Top\"\n [tooltipType]=\"styleTypes.tooltip\"\n [tooltipTitle]=\"tooltipTemplate ? undefined : tooltipText(circle)\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipContext]=\"circle.data\"\n (select)=\"select.emit(circle.data)\"\n (activate)=\"activate.emit({ name: circle.data.series })\"\n (deactivate)=\"deactivate.emit({ name: circle.data.series })\"\n ></svg:g>\n </svg:g>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PolarSeriesComponent implements OnChanges {\n @Input() name;\n @Input() data;\n @Input() xScale; // Theta\n @Input() yScale; // R\n @Input() colors;\n @Input() scaleType;\n @Input() curve: any;\n @Input() activeEntries: any[];\n @Input() rangeFillOpacity: number;\n @Input() tooltipDisabled: boolean = false;\n @Input() tooltipText: (o: any) => string;\n @Input() gradient: boolean = false;\n @Input() tooltipTemplate: TemplateRef<any>;\n @Input() animations: boolean = true;\n\n @Output() select = new EventEmitter();\n @Output() activate = new EventEmitter();\n @Output() deactivate = new EventEmitter();\n\n path: string;\n circles: PolarChartCircle[];\n circleRadius: number = 3;\n\n areaPath: string;\n gradientId: string;\n gradientUrl: string;\n hasGradient: boolean;\n gradientStops: any[];\n areaGradientStops: any[];\n seriesColor: string;\n\n active: boolean;\n inactive: boolean;\n\n barOrientation = BarOrientation;\n placementTypes = PlacementTypes;\n styleTypes = StyleTypes;\n\n ngOnChanges(changes: SimpleChanges): void {\n this.update();\n }\n\n update(): void {\n this.updateGradients();\n\n const line = this.getLineGenerator();\n\n const data = this.sortData(this.data.series);\n\n const seriesName = this.data.name;\n const linearScaleType = this.colors.scaleType === ScaleType.Linear;\n const min = this.yScale.domain()[0];\n this.seriesColor = this.colors.getColor(linearScaleType ? min : seriesName);\n\n this.path = line(data) || '';\n\n this.circles = data.map(d => {\n const a = this.getAngle(d);\n const r = this.getRadius(d);\n const value = d.value;\n\n const color = this.colors.getColor(linearScaleType ? Math.abs(value) : seriesName);\n\n const cData = Object.assign({}, d, {\n series: seriesName,\n value,\n name: d.name\n });\n\n return {\n data: cData,\n cx: r * Math.sin(a),\n cy: -r * Math.cos(a),\n value,\n color,\n label: d.name\n };\n });\n\n this.active = this.isActive(this.data);\n this.inactive = this.isInactive(this.data);\n this.tooltipText = this.tooltipText || (c => this.defaultTooltipText(c));\n }\n\n getAngle(d: DataItem) {\n const label = d.name;\n if (this.scaleType === ScaleType.Time) {\n return this.xScale(label);\n } else if (this.scaleType === ScaleType.Linear) {\n return this.xScale(Number(label));\n }\n return this.xScale(label);\n }\n\n getRadius(d: DataItem) {\n return this.yScale(d.value);\n }\n\n getLineGenerator(): any {\n return lineRadial<any>()\n .angle(d => this.getAngle(d))\n .radius(d => this.getRadius(d))\n .curve(this.curve);\n }\n\n sortData(data: DataItem) {\n if (this.scaleType === ScaleType.Linear) {\n return sortLinear(data, 'name');\n } else if (this.scaleType === ScaleType.Time) {\n return sortByTime(data, 'name');\n }\n return sortByDomain(data, 'name', 'asc', this.xScale.domain());\n }\n\n isActive(entry: DataItem): boolean {\n if (!this.activeEntries) return false;\n const item = this.activeEntries.find(d => {\n return entry.name === d.name;\n });\n return item !== undefined;\n }\n\n isInactive(entry: DataItem): boolean {\n if (!this.activeEntries || this.activeEntries.length === 0) return false;\n const item = this.activeEntries.find(d => {\n return entry.name === d.name;\n });\n return item === undefined;\n }\n\n defaultTooltipText({ label, value }: { label: string; value: number }): string {\n return `\n <span class=\"tooltip-label\">${escapeLabel(this.data.name)} • ${escapeLabel(label)}</span>\n <span class=\"tooltip-val\">${value.toLocaleString()}</span>\n `;\n }\n\n updateGradients() {\n this.hasGradient = this.gradient || this.colors.scaleType === ScaleType.Linear;\n\n if (!this.hasGradient) {\n return;\n }\n\n this.gradientId = 'grad' + id().toString();\n this.gradientUrl = `url(#${this.gradientId})`;\n\n if (this.colors.scaleType === ScaleType.Linear) {\n const values = this.data.series.map(d => d.value);\n const max = Math.max(...values);\n const min = Math.min(...values);\n this.gradientStops = this.colors.getLinearGradientStops(max, min);\n } else {\n this.gradientStops = undefined;\n }\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ContentChild,\n TemplateRef,\n OnInit\n} from '@angular/core';\nimport { trigger, style, animate, transition } from '@angular/animations';\nimport { scaleLinear, scaleTime, scalePoint } from 'd3-scale';\nimport { curveCardinalClosed } from 'd3-shape';\n\nimport { calculateViewDimensions } from '../common/view-dimensions.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { BaseChartComponent } from '../common/base-chart.component';\nimport { getScaleType } from '../common/domain.helper';\nimport { isDate } from '../utils/types';\nimport { LegendPosition } from '../common/types/legend.model';\nimport { ScaleType } from '../common/types/scale-type.enum';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\nimport { Orientation } from '../common/types/orientation.enum';\nimport { isPlatformServer } from '@angular/common';\n\nconst twoPI = 2 * Math.PI;\n\n@Component({\n selector: 'ngx-charts-polar-chart',\n template: `\n <ngx-charts-chart\n [view]=\"[width, height]\"\n [showLegend]=\"legend\"\n [legendOptions]=\"legendOptions\"\n [activeEntries]=\"activeEntries\"\n [animations]=\"animations\"\n (legendLabelClick)=\"onClick($event)\"\n (legendLabelActivate)=\"onActivate($event)\"\n (legendLabelDeactivate)=\"onDeactivate($event)\"\n >\n <svg:g class=\"polar-chart chart\" [attr.transform]=\"transform\">\n <svg:g [attr.transform]=\"transformPlot\">\n <svg:circle class=\"polar-chart-background\" cx=\"0\" cy=\"0\" [attr.r]=\"this.outerRadius\" />\n <svg:g *ngIf=\"showGridLines\">\n <svg:circle\n *ngFor=\"let r of radiusTicks\"\n class=\"gridline-path radial-gridline-path\"\n cx=\"0\"\n cy=\"0\"\n [attr.r]=\"r\"\n />\n </svg:g>\n <svg:g *ngIf=\"xAxis\">\n <svg:g\n ngx-charts-pie-label\n *ngFor=\"let tick of thetaTicks\"\n [data]=\"tick\"\n [radius]=\"outerRadius\"\n [label]=\"tick.label\"\n [max]=\"outerRadius\"\n [value]=\"showGridLines ? 1 : outerRadius\"\n [explodeSlices]=\"true\"\n [animations]=\"animations\"\n [labelTrim]=\"labelTrim\"\n [labelTrimSize]=\"labelTrimSize\"\n ></svg:g>\n </svg:g>\n </svg:g>\n <svg:g\n ngx-charts-y-axis\n [attr.transform]=\"transformYAxis\"\n *ngIf=\"yAxis\"\n [yScale]=\"yAxisScale\"\n [dims]=\"yAxisDims\"\n [showGridLines]=\"showGridLines\"\n [showLabel]=\"showYAxisLabel\"\n [labelText]=\"yAxisLabel\"\n [trimTicks]=\"trimYAxisTicks\"\n [maxTickLength]=\"maxYAxisTickLength\"\n [tickFormatting]=\"yAxisTickFormatting\"\n [wrapTicks]=\"wrapTicks\"\n (dimensionsChanged)=\"updateYAxisWidth($event)\"\n ></svg:g>\n <svg:g\n ngx-charts-axis-label\n *ngIf=\"xAxis && showXAxisLabel\"\n [label]=\"xAxisLabel\"\n [offset]=\"labelOffset\"\n [orient]=\"orientation.Bottom\"\n [height]=\"dims.height\"\n [width]=\"dims.width\"\n ></svg:g>\n <svg:g *ngIf=\"!isSSR\" [attr.transform]=\"transformPlot\">\n <svg:g *ngFor=\"let series of results; trackBy: trackBy\" [@animationState]=\"'active'\">\n <svg:g\n ngx-charts-polar-series\n [gradient]=\"gradient\"\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [colors]=\"colors\"\n [data]=\"series\"\n [activeEntries]=\"activeEntries\"\n [scaleType]=\"scaleType\"\n [curve]=\"curve\"\n [rangeFillOpacity]=\"rangeFillOpacity\"\n [animations]=\"animations\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n (select)=\"onClick($event)\"\n (activate)=\"onActivate($event)\"\n (deactivate)=\"onDeactivate($event)\"\n />\n </svg:g>\n </svg:g>\n <svg:g *ngIf=\"isSSR\" [attr.transform]=\"transformPlot\">\n <svg:g *ngFor=\"let series of results; trackBy: trackBy\">\n <svg:g\n ngx-charts-polar-series\n [gradient]=\"gradient\"\n [xScale]=\"xScale\"\n [yScale]=\"yScale\"\n [colors]=\"colors\"\n [data]=\"series\"\n [activeEntries]=\"activeEntries\"\n [scaleType]=\"scaleType\"\n [curve]=\"curve\"\n [rangeFillOpacity]=\"rangeFillOpacity\"\n [animations]=\"animations\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n (select)=\"onClick($event)\"\n (activate)=\"onActivate($event)\"\n (deactivate)=\"onDeactivate($event)\"\n />\n </svg:g>\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n `,\n styleUrls: [\n '../common/base-chart.component.scss',\n '../pie-chart/pie-chart.component.scss',\n './polar-chart.component.scss'\n ],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('animationState', [\n transition(':leave', [\n style({\n opacity: 1\n }),\n animate(\n 500,\n style({\n opacity: 0\n })\n )\n ])\n ])\n ]\n})\nexport class PolarChartComponent extends BaseChartComponent implements OnInit {\n @Input() legend: boolean;\n @Input() legendTitle: string = 'Legend';\n @Input() legendPosition: LegendPosition = LegendPosition.Right;\n @Input() xAxis: boolean;\n @Input() yAxis: boolean;\n @Input() showXAxisLabel: boolean;\n @Input() showYAxisLabel: boolean;\n @Input() xAxisLabel: string;\n @Input() yAxisLabel: string;\n @Input() autoScale: boolean;\n @Input() showGridLines: boolean = true;\n @Input() curve: any = curveCardinalClosed;\n @Input() activeEntries: any[] = [];\n @Input() schemeType: ScaleType;\n @Input() rangeFillOpacity: number = 0.15;\n @Input() trimYAxisTicks: boolean = true;\n @Input() maxYAxisTickLength: number = 16;\n @Input() xAxisTickFormatting: (o: any) => any;\n @Input() yAxisTickFormatting: (o: any) => any;\n @Input() roundDomains: boolean = false;\n @Input() tooltipDisabled: boolean = false;\n @Input() showSeriesOnHover: boolean = true;\n @Input() gradient: boolean = false;\n @Input() yAxisMinScale: number = 0;\n @Input() labelTrim: boolean = true;\n @Input() labelTrimSize: number = 10;\n @Input() wrapTicks = false;\n\n @Output() activate: EventEmitter<any> = new EventEmitter();\n @Output() deactivate: EventEmitter<any> = new EventEmitter();\n\n @ContentChild('tooltipTemplate') tooltipTemplate: TemplateRef<any>;\n\n dims: ViewDimensions;\n yAxisDims: ViewDimensions;\n labelOffset: number;\n xDomain: any;\n yDomain: any;\n seriesDomain: any;\n yScale: any; // -> rScale\n xScale: any; // -> tScale\n yAxisScale: any; // -> yScale\n colors: ColorHelper;\n scaleType: ScaleType;\n transform: string;\n transformPlot: string;\n transformYAxis: string;\n transformXAxis: string;\n // series: any; // ???\n margin: number[] = [10, 20, 10, 20];\n xAxisHeight: number = 0;\n yAxisWidth: number = 0;\n filteredDomain: any;\n legendOptions: any;\n thetaTicks: any[];\n radiusTicks: number[];\n outerRadius: number;\n\n orientation = Orientation;\n\n isSSR = false;\n\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n\n update(): void {\n super.update();\n\n this.setDims();\n\n this.setScales();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n\n this.setTicks();\n }\n\n setDims() {\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n\n const halfWidth = Math.floor(this.dims.width / 2);\n const halfHeight = Math.floor(this.dims.height / 2);\n\n const outerRadius = (this.outerRadius = Math.min(halfHeight / 1.5, halfWidth / 1.5));\n\n const yOffset = Math.max(0, halfHeight - outerRadius);\n\n this.yAxisDims = {\n ...this.dims,\n width: halfWidth\n };\n\n this.transform = `translate(${this.dims.xOffset}, ${this.margin[0]})`;\n this.transformYAxis = `translate(0, ${yOffset})`;\n this.labelOffset = this.dims.height + 40;\n this.transformPlot = `translate(${halfWidth}, ${halfHeight})`;\n }\n\n setScales() {\n const xValues = this.getXValues();\n this.scaleType = getScaleType(xValues);\n this.xDomain = this.filteredDomain || this.getXDomain(xValues);\n\n this.yDomain = this.getYDomain();\n this.seriesDomain = this.getSeriesDomain();\n\n this.xScale = this.getXScale(this.xDomain, twoPI);\n this.yScale = this.getYScale(this.yDomain, this.outerRadius);\n this.yAxisScale = this.getYScale(this.yDomain.reverse(), this.outerRadius);\n }\n\n setTicks() {\n let tickFormat;\n if (this.xAxisTickFormatting) {\n tickFormat = this.xAxisTickFormatting;\n } else if (this.xScale.tickFormat) {\n tickFormat = this.xScale.tickFormat.apply(this.xScale, [5]);\n } else {\n tickFormat = d => {\n if (isDate(d)) {\n return d.toLocaleDateString();\n }\n return d.toLocaleString();\n };\n }\n\n const outerRadius = this.outerRadius;\n const s = 1.1;\n\n this.thetaTicks = this.xDomain.map(d => {\n const startAngle = this.xScale(d);\n const dd = s * outerRadius * (startAngle > Math.PI ? -1 : 1);\n const label = tickFormat(d);\n\n const startPos = [outerRadius * Math.sin(startAngle), -outerRadius * Math.cos(startAngle)];\n const pos = [dd, s * startPos[1]];\n return {\n innerRadius: 0,\n outerRadius,\n startAngle,\n endAngle: startAngle,\n value: outerRadius,\n label,\n startPos,\n pos\n };\n });\n\n const minDistance = 10;\n\n /* from pie chart, abstract out -*/\n for (let i = 0; i < this.thetaTicks.length - 1; i++) {\n const a = this.thetaTicks[i];\n\n for (let j = i + 1; j < this.thetaTicks.length; j++) {\n const b = this.thetaTicks[j];\n // if they're on the same side\n if (b.pos[0] * a.pos[0] > 0) {\n // if they're overlapping\n const o = minDistance - Math.abs(b.pos[1] - a.pos[1]);\n if (o > 0) {\n // push the second up or down\n b.pos[1] += Math.sign(b.pos[0]) * o;\n }\n }\n }\n }\n\n this.radiusTicks = this.yAxisScale.ticks(Math.floor(this.dims.height / 50)).map(d => this.yScale(d));\n }\n\n getXValues(): any[] {\n const values = [];\n for (const results of this.results) {\n for (const d of results.series) {\n if (!values.includes(d.name)) {\n values.push(d.name);\n }\n }\n }\n return values;\n }\n\n getXDomain(values = this.getXValues()): any[] {\n if (this.scaleType === ScaleType.Time) {\n const min = Math.min(...values);\n const max = Math.max(...values);\n return [min, max];\n } else if (this.scaleType === ScaleType.Linear) {\n values = values.map(v => Number(v));\n const min = Math.min(...values);\n const max = Math.max(...values);\n return [min, max];\n }\n return values;\n }\n\n getYValues(): any[] {\n const domain = [];\n\n for (const results of this.results) {\n for (const d of results.series) {\n if (domain.indexOf(d.value) < 0) {\n domain.push(d.value);\n }\n if (d.min !== undefined) {\n if (domain.indexOf(d.min) < 0) {\n domain.push(d.min);\n }\n }\n if (d.max !== undefined) {\n if (domain.indexOf(d.max) < 0) {\n domain.push(d.max);\n }\n }\n }\n }\n return domain;\n }\n\n getYDomain(domain = this.getYValues()): any[] {\n let min = Math.min(...domain);\n const max = Math.max(this.yAxisMinScale, ...domain);\n\n min = Math.max(0, min);\n if (!this.autoScale) {\n min = Math.min(0, min);\n }\n\n return [min, max];\n }\n\n getSeriesDomain(): any[] {\n return this.results.map(d => d.name);\n }\n\n getXScale(domain, width: number): any {\n switch (this.scaleType) {\n case ScaleType.Time:\n return scaleTime().range([0, width]).domain(domain);\n case ScaleType.Linear: {\n const scale = scaleLinear().range([0, width]).domain(domain);\n return this.roundDomains ? scale.nice() : scale;\n }\n default:\n return scalePoint()\n .range([0, width - twoPI / domain.length])\n .padding(0)\n .domain(domain);\n }\n }\n\n getYScale(domain, height: number): any {\n const scale = scaleLinear().range([0, height]).domain(domain);\n\n return this.roundDomains ? scale.nice() : scale;\n }\n\n onClick(data, series?): void {\n if (series) {\n data.series = series.name;\n }\n\n this.select.emit(data);\n }\n\n setColors(): void {\n const domain = this.schemeType === ScaleType.Ordinal ? this.seriesDomain : this.yDomain.reverse();\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n\n getLegendOptions() {\n if (this.schemeType === ScaleType.Ordinal) {\n return {\n scaleType: this.schemeType,\n colors: this.colors,\n domain: this.seriesDomain,\n title: this.legendTitle,\n position: this.legendPosition\n };\n }\n return {\n scaleType: this.schemeType,\n colors: this.colors.scale,\n domain: this.yDomain,\n title: undefined,\n position: this.legendPosition\n };\n }\n\n updateYAxisWidth({ width }: { width: number }): void {\n this.yAxisWidth = width;\n this.update();\n }\n\n updateXAxisHeight({ height }: { height: number }): void {\n this.xAxisHeight = height;\n this.update();\n }\n\n onActivate(item): void {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n if (idx > -1) {\n return;\n }\n this.activeEntries = this.showSeriesOnHover ? [item, ...this.activeEntries] : this.activeEntries;\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n\n onDeactivate(item): void {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n\n deactivateAll(): void {\n this.activeEntries = [...this.activeEntries];\n for (const entry of this.activeEntries) {\n this.deactivate.emit({ value: entry, entries: [] });\n }\n this.activeEntries = [];\n }\n\n trackBy(index: number, item): string {\n return `${item.name}`;\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ElementRef,\n SimpleChanges,\n OnChanges,\n ChangeDetectionStrategy\n} from '@angular/core';\nimport { interpolate } from 'd3-interpolate';\nimport { select } from 'd3-selection';\nimport { arc } from 'd3-shape';\nimport { id } from '../utils/id';\nimport { DataItem } from '../models/chart-data.model';\nimport { BarOrientation } from '../common/types/bar-orientation.enum';\n\n@Component({\n selector: 'g[ngx-charts-pie-arc]',\n template: `\n <svg:g class=\"arc-group\">\n <svg:defs *ngIf=\"gradient\">\n <svg:g ngx-charts-svg-radial-gradient [color]=\"fill\" [name]=\"radialGradientId\" [startOpacity]=\"startOpacity\" />\n </svg:defs>\n <svg:path\n [attr.d]=\"path\"\n class=\"arc\"\n [class.active]=\"isActive\"\n [attr.fill]=\"getGradient()\"\n (click)=\"onClick()\"\n (dblclick)=\"onDblClick($event)\"\n (mouseenter)=\"activate.emit(data)\"\n (mouseleave)=\"deactivate.emit(data)\"\n [style.pointer-events]=\"getPointerEvents()\"\n />\n </svg:g>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PieArcComponent implements OnChanges {\n @Input() fill: string;\n @Input() startAngle: number = 0;\n @Input() endAngle: number = Math.PI * 2;\n @Input() innerRadius: number;\n @Input() outerRadius: number;\n @Input() cornerRadius: number = 0;\n @Input() value: number;\n @Input() max: number;\n @Input() data: DataItem;\n @Input() explodeSlices: boolean = false;\n @Input() gradient: boolean = false;\n @Input() animate: boolean = true;\n @Input() pointerEvents: boolean = true;\n @Input() isActive: boolean = false;\n\n @Output() select = new EventEmitter();\n @Output() activate = new EventEmitter();\n @Output() deactivate = new EventEmitter();\n @Output() dblclick = new EventEmitter();\n\n barOrientation = BarOrientation;\n\n element: HTMLElement;\n path: any;\n startOpacity: number;\n radialGradientId: string;\n gradientFill: string;\n initialized: boolean = false;\n\n private _timeout;\n\n constructor(element: ElementRef) {\n this.element = element.nativeElement;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.update();\n }\n\n getGradient(): string {\n return this.gradient ? this.gradientFill : this.fill;\n }\n\n getPointerEvents(): string {\n return this.pointerEvents ? 'auto' : 'none';\n }\n\n update(): void {\n const calc = this.calculateArc();\n this.startOpacity = 0.5;\n this.radialGradientId = 'linearGrad' + id().toString();\n this.gradientFill = `url(#${this.radialGradientId})`;\n\n if (this.animate) {\n if (this.initialized) {\n this.updateAnimation();\n } else {\n this.loadAnimation();\n this.initialized = true;\n }\n } else {\n this.path = calc.startAngle(this.startAngle).endAngle(this.endAngle)();\n }\n }\n\n calculateArc(): any {\n let outerRadius = this.outerRadius;\n if (this.explodeSlices && this.innerRadius === 0) {\n outerRadius = (this.outerRadius * this.value) / this.max;\n }\n\n return arc().innerRadius(this.innerRadius).outerRadius(outerRadius).cornerRadius(this.cornerRadius);\n }\n\n loadAnimation(): void {\n const node = select(this.element)\n .selectAll('.arc')\n .data([{ startAngle: this.startAngle, endAngle: this.endAngle }]);\n\n const calc = this.calculateArc();\n\n node\n .transition()\n .attrTween('d', function (d) {\n (<any>this)._current = (<any>this)._current || d;\n const copyOfD = Object.assign({}, d);\n copyOfD.endAngle = copyOfD.startAngle;\n const interpolater = interpolate(copyOfD, copyOfD);\n (<any>this)._current = interpolater(0);\n return function (t) {\n return calc(interpolater(t));\n };\n })\n .transition()\n .duration(750)\n .attrTween('d', function (d) {\n (<any>this)._current = (<any>this)._current || d;\n const interpolater = interpolate((<any>this)._current, d);\n (<any>this)._current = interpolater(0);\n return function (t) {\n return calc(interpolater(t));\n };\n });\n }\n\n updateAnimation(): void {\n const node = select(this.element)\n .selectAll('.arc')\n .data([{ startAngle: this.startAngle, endAngle: this.endAngle }]);\n\n const calc = this.calculateArc();\n\n node\n .transition()\n .duration(750)\n .attrTween('d', function (d) {\n (<any>this)._current = (<any>this)._current || d;\n const interpolater = interpolate((<any>this)._current, d);\n (<any>this)._current = interpolater(0);\n return function (t) {\n return calc(interpolater(t));\n };\n });\n }\n\n onClick(): void {\n clearTimeout(this._timeout);\n this._timeout = setTimeout(() => this.select.emit(this.data), 200);\n }\n\n onDblClick(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n clearTimeout(this._timeout);\n\n this.dblclick.emit({\n data: this.data,\n nativeEvent: event\n });\n }\n}\n","import {\n Component,\n SimpleChanges,\n Input,\n Output,\n EventEmitter,\n OnChanges,\n ChangeDetectionStrategy,\n TemplateRef\n} from '@angular/core';\nimport { max } from 'd3-array';\nimport { arc, pie } from 'd3-shape';\nimport { ColorHelper } from '../common/color.helper';\n\nimport { formatLabel, escapeLabel } from '../common/label.helper';\nimport { DataItem } from '../models/chart-data.model';\nimport { PieData } from './pie-label.component';\nimport { PlacementTypes } from '../common/tooltip/position';\nimport { StyleTypes } from '../common/tooltip/style.type';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\n\n@Component({\n selector: 'g[ngx-charts-pie-series]',\n template: `\n <svg:g *ngFor=\"let arc of data; trackBy: trackBy\">\n <svg:g\n ngx-charts-pie-label\n *ngIf=\"labelVisible(arc)\"\n [data]=\"arc\"\n [radius]=\"outerRadius\"\n [color]=\"color(arc)\"\n [label]=\"labelText(arc)\"\n [labelTrim]=\"trimLabels\"\n [labelTrimSize]=\"maxLabelLength\"\n [max]=\"max\"\n [value]=\"arc.value\"\n [explodeSlices]=\"explodeSlices\"\n [animations]=\"animations\"\n ></svg:g>\n <svg:g\n ngx-charts-pie-arc\n [startAngle]=\"arc.startAngle\"\n [endAngle]=\"arc.endAngle\"\n [innerRadius]=\"innerRadius\"\n [outerRadius]=\"outerRadius\"\n [fill]=\"color(arc)\"\n [value]=\"arc.data.value\"\n [gradient]=\"gradient\"\n [data]=\"arc.data\"\n [max]=\"max\"\n [explodeSlices]=\"explodeSlices\"\n [isActive]=\"isActive(arc.data)\"\n [animate]=\"animations\"\n (select)=\"onClick($event)\"\n (activate)=\"activate.emit($event)\"\n (deactivate)=\"deactivate.emit($event)\"\n (dblclick)=\"dblclick.emit($event)\"\n ngx-tooltip\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipPlacement]=\"placementTypes.Top\"\n [tooltipType]=\"styleTypes.tooltip\"\n [tooltipTitle]=\"getTooltipTitle(arc)\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipContext]=\"arc.data\"\n ></svg:g>\n </svg:g>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PieSeriesComponent implements OnChanges {\n @Input() colors: ColorHelper;\n @Input() series: DataItem[] = [];\n @Input() dims: ViewDimensions;\n @Input() innerRadius: number = 60;\n @Input() outerRadius: number = 80;\n @Input() explodeSlices: boolean;\n @Input() showLabels: boolean;\n @Input() gradient: boolean;\n @Input() activeEntries: any[];\n @Input() labelFormatting: any;\n @Input() trimLabels: boolean = true;\n @Input() maxLabelLength: number = 10;\n @Input() tooltipText: (o: any) => any;\n @Input() tooltipDisabled: boolean = false;\n @Input() tooltipTemplate: TemplateRef<any>;\n @Input() animations: boolean = true;\n\n @Output() select = new EventEmitter();\n @Output() activate = new EventEmitter();\n @Output() deactivate = new EventEmitter();\n @Output() dblclick = new EventEmitter();\n\n max: number;\n data: PieData[];\n\n placementTypes = PlacementTypes;\n styleTypes = StyleTypes;\n\n ngOnChanges(changes: SimpleChanges): void {\n this.update();\n }\n\n update(): void {\n const pieGenerator = pie<any, any>()\n .value(d => d.value)\n .sort(null);\n\n const arcData = pieGenerator(this.series);\n\n this.max = max(arcData, d => {\n return d.value;\n });\n\n this.data = this.calculateLabelPositions(arcData);\n this.tooltipText = this.tooltipText || this.defaultTooltipText;\n }\n\n midAngle(d): number {\n return d.startAngle + (d.endAngle - d.startAngle) / 2;\n }\n\n outerArc(): any {\n const factor = 1.5;\n\n return arc()\n .innerRadius(this.outerRadius * factor)\n .outerRadius(this.outerRadius * factor);\n }\n\n calculateLabelPositions(pieData): any {\n const factor = 1.5;\n const minDistance = 10;\n const labelPositions = pieData;\n\n labelPositions.forEach(d => {\n d.pos = this.outerArc().centroid(d);\n d.pos[0] = factor * this.outerRadius * (this.midAngle(d) < Math.PI ? 1 : -1);\n });\n\n for (let i = 0; i < labelPositions.length - 1; i++) {\n const a = labelPositions[i];\n if (!this.labelVisible(a)) {\n continue;\n }\n\n for (let j = i + 1; j < labelPositions.length; j++) {\n const b = labelPositions[j];\n if (!this.labelVisible(b)) {\n continue;\n }\n // if they're on the same side\n if (b.pos[0] * a.pos[0] > 0) {\n // if they're overlapping\n const o = minDistance - Math.abs(b.pos[1] - a.pos[1]);\n if (o > 0) {\n // push the second up or down\n b.pos[1] += Math.sign(b.pos[0]) * o;\n }\n }\n }\n }\n\n return labelPositions;\n }\n\n labelVisible(myArc): boolean {\n return this.showLabels && myArc.endAngle - myArc.startAngle > Math.PI / 30;\n }\n\n getTooltipTitle(a) {\n return this.tooltipTemplate ? undefined : this.tooltipText(a);\n }\n\n labelText(myArc): string {\n if (this.labelFormatting) {\n return this.labelFormatting(myArc.data.name);\n }\n return this.label(myArc);\n }\n\n label(myArc): string {\n return formatLabel(myArc.data.name);\n }\n\n defaultTooltipText(myArc): string {\n const label = this.label(myArc);\n const val = formatLabel(myArc.data.value);\n\n return `\n <span class=\"tooltip-label\">${escapeLabel(label)}</span>\n <span class=\"tooltip-val\">${val}</span>\n `;\n }\n\n color(myArc): any {\n return this.colors.getColor(this.label(myArc));\n }\n\n trackBy(index, item): string {\n return item.data.name;\n }\n\n onClick(data): void {\n this.select.emit(data);\n }\n\n isActive(entry): boolean {\n if (!this.activeEntries) return false;\n const item = this.activeEntries.find(d => {\n return entry.name === d.name && entry.series === d.series;\n });\n return item !== undefined;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n EventEmitter,\n Input,\n Output,\n TemplateRef,\n ViewEncapsulation\n} from '@angular/core';\n\nimport { calculateViewDimensions } from '../common/view-dimensions.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { BaseChartComponent } from '../common/base-chart.component';\nimport { DataItem } from '../models/chart-data.model';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\nimport { ScaleType } from '../common/types/scale-type.enum';\n\n@Component({\n selector: 'ngx-charts-advanced-pie-chart',\n template: `\n <div [style.width.px]=\"width\" [style.height.px]=\"height\">\n <div class=\"advanced-pie chart\" [style.width.px]=\"dims.width\" [style.height.px]=\"dims.height\">\n <ngx-charts-chart [view]=\"[width, height]\" [showLegend]=\"false\" [animations]=\"animations\">\n <svg:g [attr.transform]=\"transform\" class=\"pie chart\">\n <svg:g\n ngx-charts-pie-series\n [colors]=\"colors\"\n [series]=\"results\"\n [innerRadius]=\"innerRadius\"\n [activeEntries]=\"activeEntries\"\n [outerRadius]=\"outerRadius\"\n [gradient]=\"gradient\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipText]=\"tooltipText\"\n (select)=\"onClick($event)\"\n (activate)=\"onActivate($event)\"\n (deactivate)=\"onDeactivate($event)\"\n [animations]=\"animations\"\n ></svg:g>\n </svg:g>\n </ngx-charts-chart>\n </div>\n <div class=\"advanced-pie-legend-wrapper\" [style.width.px]=\"width - dims.width\" [style.height.px]=\"height\">\n <ngx-charts-advanced-legend\n [data]=\"results\"\n [colors]=\"colors\"\n [width]=\"width - dims.width - margin[1]\"\n [label]=\"label\"\n [animations]=\"animations\"\n [valueFormatting]=\"valueFormatting\"\n [labelFormatting]=\"nameFormatting\"\n [percentageFormatting]=\"percentageFormatting\"\n (select)=\"onClick($event)\"\n (activate)=\"onActivate($event, true)\"\n (deactivate)=\"onDeactivate($event, true)\"\n >\n </ngx-charts-advanced-legend>\n </div>\n </div>\n `,\n styleUrls: ['../common/base-chart.component.scss', './advanced-pie-chart.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class AdvancedPieChartComponent extends BaseChartComponent {\n @Input() gradient: boolean;\n @Input() activeEntries: any[] = [];\n @Input() tooltipDisabled: boolean = false;\n @Input() tooltipText: any;\n @Input() label: string = 'Total';\n\n @Output() activate: EventEmitter<any> = new EventEmitter();\n @Output() deactivate: EventEmitter<any> = new EventEmitter();\n\n @ContentChild('tooltipTemplate') tooltipTemplate: TemplateRef<any>;\n\n dims: ViewDimensions;\n domain: string[];\n outerRadius: number;\n innerRadius: number;\n transform: string;\n colors: ColorHelper;\n legendWidth: number;\n margin: number[] = [20, 20, 20, 20];\n\n @Input() valueFormatting: (value: number) => any;\n @Input() nameFormatting: (value: string) => any;\n @Input() percentageFormatting: (value: number) => any;\n\n update(): void {\n super.update();\n\n this.dims = calculateViewDimensions({\n width: (this.width * 4) / 12.0,\n height: this.height,\n margins: this.margin\n });\n\n this.formatDates();\n\n this.domain = this.getDomain();\n this.setColors();\n\n const xOffset = this.dims.width / 2;\n const yOffset = this.margin[0] + this.dims.height / 2;\n this.legendWidth = this.width - this.dims.width - this.margin[1];\n\n this.outerRadius = Math.min(this.dims.width, this.dims.height) / 2.5;\n this.innerRadius = this.outerRadius * 0.75;\n\n this.transform = `translate(${xOffset} , ${yOffset})`;\n }\n\n getDomain(): string[] {\n return this.results.map(d => d.label);\n }\n\n onClick(data: DataItem) {\n this.select.emit(data);\n }\n\n setColors(): void {\n this.colors = new ColorHelper(this.scheme, ScaleType.Ordinal, this.domain, this.customColors);\n }\n\n onActivate(item, fromLegend = false) {\n item = this.results.find(d => {\n if (fromLegend) {\n return d.label === item.name;\n } else {\n return d.name === item.name;\n }\n });\n\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value && d.series === item.series;\n });\n if (idx > -1) {\n return;\n }\n\n this.activeEntries = [item, ...this.activeEntries];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n\n onDeactivate(item, fromLegend = false) {\n item = this.results.find(d => {\n if (fromLegend) {\n return d.label === item.name;\n } else {\n return d.name === item.name;\n }\n });\n\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value && d.series === item.series;\n });\n\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n}\n","import {\n Component,\n Input,\n Output,\n ViewEncapsulation,\n EventEmitter,\n ChangeDetectionStrategy,\n ContentChild,\n TemplateRef\n} from '@angular/core';\nimport { calculateViewDimensions } from '../common/view-dimensions.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { BaseChartComponent } from '../common/base-chart.component';\nimport { DataItem } from '../models/chart-data.model';\nimport { LegendOptions, LegendPosition } from '../common/types/legend.model';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\nimport { ScaleType } from '../common/types/scale-type.enum';\n\n@Component({\n selector: 'ngx-charts-pie-chart',\n template: `\n <ngx-charts-chart\n [view]=\"[width, height]\"\n [showLegend]=\"legend\"\n [legendOptions]=\"legendOptions\"\n [activeEntries]=\"activeEntries\"\n [animations]=\"animations\"\n (legendLabelActivate)=\"onActivate($event, true)\"\n (legendLabelDeactivate)=\"onDeactivate($event, true)\"\n (legendLabelClick)=\"onClick($event)\"\n >\n <svg:g [attr.transform]=\"translation\" class=\"pie-chart chart\">\n <svg:g\n ngx-charts-pie-series\n [colors]=\"colors\"\n [series]=\"data\"\n [showLabels]=\"labels\"\n [labelFormatting]=\"labelFormatting\"\n [trimLabels]=\"trimLabels\"\n [maxLabelLength]=\"maxLabelLength\"\n [activeEntries]=\"activeEntries\"\n [innerRadius]=\"innerRadius\"\n [outerRadius]=\"outerRadius\"\n [explodeSlices]=\"explodeSlices\"\n [gradient]=\"gradient\"\n [animations]=\"animations\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipText]=\"tooltipText\"\n (dblclick)=\"dblclick.emit($event)\"\n (select)=\"onClick($event)\"\n (activate)=\"onActivate($event)\"\n (deactivate)=\"onDeactivate($event)\"\n />\n </svg:g>\n </ngx-charts-chart>\n `,\n styleUrls: ['../common/base-chart.component.scss', './pie-chart.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PieChartComponent extends BaseChartComponent {\n @Input() labels: boolean = false;\n @Input() legend: boolean = false;\n @Input() legendTitle: string = 'Legend';\n @Input() legendPosition: LegendPosition = LegendPosition.Right;\n @Input() explodeSlices: boolean = false;\n @Input() doughnut: boolean = false;\n @Input() arcWidth: number = 0.25;\n @Input() gradient: boolean;\n @Input() activeEntries: any[] = [];\n @Input() tooltipDisabled: boolean = false;\n @Input() labelFormatting: any;\n @Input() trimLabels: boolean = true;\n @Input() maxLabelLength: number = 10;\n @Input() tooltipText: any;\n @Output() dblclick = new EventEmitter();\n // optional margins\n @Input() margins: number[];\n @Output() select = new EventEmitter();\n @Output() activate = new EventEmitter();\n @Output() deactivate = new EventEmitter();\n\n @ContentChild('tooltipTemplate') tooltipTemplate: TemplateRef<any>;\n\n translation: string;\n outerRadius: number;\n innerRadius: number;\n data: DataItem[];\n colors: ColorHelper;\n domain: string[];\n dims: ViewDimensions;\n legendOptions: LegendOptions;\n\n update(): void {\n super.update();\n\n if (this.labels && this.hasNoOptionalMarginsSet()) {\n this.margins = [30, 80, 30, 80];\n } else if (!this.labels && this.hasNoOptionalMarginsSet()) {\n // default value for margins\n this.margins = [20, 20, 20, 20];\n }\n\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margins,\n showLegend: this.legend,\n legendPosition: this.legendPosition\n });\n\n this.formatDates();\n\n const xOffset = this.margins[3] + this.dims.width / 2;\n const yOffset = this.margins[0] + this.dims.height / 2;\n this.translation = `translate(${xOffset}, ${yOffset})`;\n this.outerRadius = Math.min(this.dims.width, this.dims.height);\n if (this.labels) {\n // make room for labels\n this.outerRadius /= 3;\n } else {\n this.outerRadius /= 2;\n }\n this.innerRadius = 0;\n if (this.doughnut) {\n this.innerRadius = this.outerRadius * (1 - this.arcWidth);\n }\n\n this.domain = this.getDomain();\n\n // sort data according to domain\n this.data = this.results.sort((a, b) => {\n return this.domain.indexOf(a.name) - this.domain.indexOf(b.name);\n });\n\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n }\n\n getDomain(): string[] {\n return this.results.map(d => d.label);\n }\n\n onClick(data: DataItem | string): void {\n this.select.emit(data);\n }\n\n setColors(): void {\n this.colors = new ColorHelper(this.scheme, ScaleType.Ordinal, this.domain, this.customColors);\n }\n\n getLegendOptions(): LegendOptions {\n return {\n scaleType: ScaleType.Ordinal,\n domain: this.domain,\n colors: this.colors,\n title: this.legendTitle,\n position: this.legendPosition\n };\n }\n\n onActivate(item, fromLegend = false): void {\n item = this.results.find(d => {\n if (fromLegend) {\n return d.label === item.name;\n } else {\n return d.name === item.name;\n }\n });\n\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value && d.series === item.series;\n });\n if (idx > -1) {\n return;\n }\n\n this.activeEntries = [item, ...this.activeEntries];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n\n onDeactivate(item, fromLegend = false): void {\n item = this.results.find(d => {\n if (fromLegend) {\n return d.label === item.name;\n } else {\n return d.name === item.name;\n }\n });\n\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value && d.series === item.series;\n });\n\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n\n private hasNoOptionalMarginsSet(): boolean {\n return !this.margins || this.margins.length <= 0;\n }\n}\n","import { scaleBand } from 'd3-scale';\nimport { ViewDimensions } from './types/view-dimension.interface';\nimport { StringOrNumberOrDate } from '../models/chart-data.model';\n\nexport interface GridItem {\n data: GridData;\n height: number;\n width: number;\n x: number;\n y: number;\n}\n\nexport interface GridData {\n extra?: any;\n label: string;\n name: StringOrNumberOrDate;\n percent: number;\n total: number;\n value: number;\n}\n\nexport function gridSize(dims: ViewDimensions, len: number, minWidth: number): [number, number] {\n let rows = 1;\n let cols = len;\n const width = dims.width;\n\n if (width > minWidth) {\n while (width / cols < minWidth) {\n rows += 1;\n cols = Math.ceil(len / rows);\n }\n }\n\n return [cols, rows];\n}\n\nexport function gridLayout(\n dims: ViewDimensions,\n data: GridData[],\n minWidth: number,\n designatedTotal: number\n): GridItem[] {\n const xScale: any = scaleBand<number>();\n const yScale: any = scaleBand<number>();\n const width = dims.width;\n const height = dims.height;\n\n const [columns, rows] = gridSize(dims, data.length, minWidth);\n\n const xDomain = [];\n const yDomain = [];\n for (let i = 0; i < rows; i++) {\n yDomain.push(i);\n }\n for (let i = 0; i < columns; i++) {\n xDomain.push(i);\n }\n xScale.domain(xDomain);\n yScale.domain(yDomain);\n\n xScale.rangeRound([0, width], 0.1);\n yScale.rangeRound([0, height], 0.1);\n\n const res = [];\n const total = designatedTotal ? designatedTotal : getTotal(data);\n const cardWidth = xScale.bandwidth();\n const cardHeight = yScale.bandwidth();\n\n for (let i = 0; i < data.length; i++) {\n res[i] = {};\n res[i].data = {\n name: data[i] ? data[i].name : '',\n value: data[i] ? data[i].value : undefined,\n extra: data[i] ? data[i].extra : undefined,\n label: data[i] ? data[i].label : ''\n };\n res[i].x = xScale(i % columns);\n res[i].y = yScale(Math.floor(i / columns));\n res[i].width = cardWidth;\n res[i].height = cardHeight;\n res[i].data.percent = total > 0 ? res[i].data.value / total : 0;\n res[i].data.total = total;\n }\n return res;\n}\n\nfunction getTotal(results: any): number {\n return results.map(d => (d ? d.value : 0)).reduce((sum, val) => sum + val, 0);\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ElementRef,\n OnChanges,\n SimpleChanges,\n ChangeDetectionStrategy\n} from '@angular/core';\nimport { pie } from 'd3-shape';\nimport { PieGridData, PieGridDataItem } from '../models/chart-data.model';\n\nexport interface PieArc {\n animate: boolean;\n class: string;\n data: PieGridDataItem;\n endAngle: number;\n fill: string;\n pointerEvents: boolean;\n startAngle: number;\n}\n\n@Component({\n selector: 'g[ngx-charts-pie-grid-series]',\n template: `\n <svg:g class=\"pie-grid-arcs\">\n <svg:g\n ngx-charts-pie-arc\n *ngFor=\"let arc of arcs; trackBy: trackBy\"\n [attr.class]=\"arc.class\"\n [startAngle]=\"arc.startAngle\"\n [endAngle]=\"arc.endAngle\"\n [innerRadius]=\"innerRadius\"\n [outerRadius]=\"outerRadius\"\n [fill]=\"color(arc)\"\n [value]=\"arc.data.value\"\n [data]=\"arc.data\"\n [gradient]=\"false\"\n [pointerEvents]=\"arc.pointerEvents\"\n [animate]=\"arc.animate\"\n (select)=\"onClick($event)\"\n (activate)=\"activate.emit($event)\"\n (deactivate)=\"deactivate.emit($event)\"\n ></svg:g>\n </svg:g>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PieGridSeriesComponent implements OnChanges {\n @Input() colors;\n @Input() data: PieGridData[];\n @Input() innerRadius = 70;\n @Input() outerRadius = 80;\n @Input() animations: boolean = true;\n\n @Output() select = new EventEmitter();\n @Output() activate = new EventEmitter();\n @Output() deactivate = new EventEmitter();\n\n element: HTMLElement;\n layout: any;\n arcs: PieArc[];\n\n constructor(element: ElementRef) {\n this.element = element.nativeElement;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.update();\n }\n\n update(): void {\n this.layout = pie<any, any>()\n .value(d => d.data.value)\n .sort(null);\n\n this.arcs = this.getArcs();\n }\n\n getArcs(): PieArc[] {\n return this.layout(this.data).map((arc, index) => {\n const label = arc.data.data.name;\n const other = arc.data.data.other;\n\n if (index === 0) {\n arc.startAngle = 0;\n }\n\n const color = this.colors(label);\n return {\n data: arc.data.data,\n class: 'arc ' + 'arc' + index,\n fill: color,\n startAngle: other ? 0 : arc.startAngle,\n endAngle: arc.endAngle,\n animate: this.animations && !other,\n pointerEvents: !other\n };\n });\n }\n\n onClick(data): void {\n this.select.emit(this.data[0].data);\n }\n\n trackBy(index, item): string {\n return item.data.name;\n }\n\n label(arc): string {\n return arc.data.name;\n }\n\n color(arc): string {\n return this.colors(this.label(arc));\n }\n}\n","import {\n Component,\n Input,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ContentChild,\n TemplateRef,\n Output,\n EventEmitter\n} from '@angular/core';\nimport { min } from 'd3-array';\nimport { format } from 'd3-format';\n\nimport { calculateViewDimensions } from '../common/view-dimensions.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { BaseChartComponent } from '../common/base-chart.component';\nimport { trimLabel } from '../common/trim-label.helper';\nimport { gridLayout } from '../common/grid-layout.helper';\nimport { formatLabel } from '../common/label.helper';\nimport { DataItem, PieGridData, PieGridDataItem } from '../models/chart-data.model';\nimport { PlacementTypes } from '../common/tooltip/position';\nimport { StyleTypes } from '../common/tooltip/style.type';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\nimport { ScaleType } from '../common/types/scale-type.enum';\n\n@Component({\n selector: 'ngx-charts-pie-grid',\n template: `\n <ngx-charts-chart [view]=\"[width, height]\" [showLegend]=\"false\" [animations]=\"animations\">\n <svg:g [attr.transform]=\"transform\" class=\"pie-grid chart\">\n <svg:g *ngFor=\"let series of series\" class=\"pie-grid-item\" [attr.transform]=\"series.transform\">\n <svg:g\n ngx-charts-pie-grid-series\n [colors]=\"series.colors\"\n [data]=\"series.data\"\n [innerRadius]=\"series.innerRadius\"\n [outerRadius]=\"series.outerRadius\"\n [animations]=\"animations\"\n (select)=\"onClick($event)\"\n ngx-tooltip\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipPlacement]=\"placementTypes.Top\"\n [tooltipType]=\"styleTypes.tooltip\"\n [tooltipTitle]=\"tooltipTemplate ? undefined : tooltipText({ data: series })\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipContext]=\"series.data[0].data\"\n (activate)=\"onActivate($event)\"\n (deactivate)=\"onDeactivate($event)\"\n />\n <svg:text\n *ngIf=\"animations\"\n class=\"label percent-label\"\n dy=\"-0.5em\"\n x=\"0\"\n y=\"5\"\n ngx-charts-count-up\n [countTo]=\"series.percent\"\n [countSuffix]=\"'%'\"\n text-anchor=\"middle\"\n ></svg:text>\n <svg:text *ngIf=\"!animations\" class=\"label percent-label\" dy=\"-0.5em\" x=\"0\" y=\"5\" text-anchor=\"middle\">\n {{ series.percent.toLocaleString() }}\n </svg:text>\n <svg:text class=\"label\" dy=\"0.5em\" x=\"0\" y=\"5\" text-anchor=\"middle\">\n {{ series.label }}\n </svg:text>\n <svg:text\n *ngIf=\"animations\"\n class=\"label\"\n dy=\"1.23em\"\n x=\"0\"\n [attr.y]=\"series.outerRadius\"\n text-anchor=\"middle\"\n ngx-charts-count-up\n [countTo]=\"series.total\"\n [countPrefix]=\"label + ': '\"\n ></svg:text>\n <svg:text\n *ngIf=\"!animations\"\n class=\"label\"\n dy=\"1.23em\"\n x=\"0\"\n [attr.y]=\"series.outerRadius\"\n text-anchor=\"middle\"\n >\n {{ label }}: {{ series.total.toLocaleString() }}\n </svg:text>\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n `,\n styleUrls: ['../common/base-chart.component.scss', './pie-grid.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PieGridComponent extends BaseChartComponent {\n @Input() designatedTotal: number;\n @Input() tooltipDisabled: boolean = false;\n @Input() tooltipText: (o: any) => any;\n @Input() label: string = 'Total';\n @Input() minWidth: number = 150;\n @Input() activeEntries: any[] = [];\n\n @Output() activate: EventEmitter<any> = new EventEmitter();\n @Output() deactivate: EventEmitter<any> = new EventEmitter();\n\n dims: ViewDimensions;\n data: PieGridData[];\n transform: string;\n series: any[];\n domain: string[];\n colorScale: ColorHelper;\n margin: number[] = [20, 20, 20, 20];\n\n placementTypes = PlacementTypes;\n styleTypes = StyleTypes;\n\n @ContentChild('tooltipTemplate') tooltipTemplate: TemplateRef<any>;\n\n update(): void {\n super.update();\n\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin\n });\n\n this.formatDates();\n\n this.domain = this.getDomain();\n\n this.data = gridLayout(this.dims, this.results, this.minWidth, this.designatedTotal);\n this.transform = `translate(${this.margin[3]} , ${this.margin[0]})`;\n\n this.series = this.getSeries();\n this.setColors();\n\n this.tooltipText = this.tooltipText || this.defaultTooltipText;\n }\n\n defaultTooltipText({ data }): string {\n const label = trimLabel(formatLabel(data.name));\n const val = data.value.toLocaleString();\n return `\n <span class=\"tooltip-label\">${label}</span>\n <span class=\"tooltip-val\">${val}</span>\n `;\n }\n\n getDomain(): string[] {\n return this.results.map(d => d.label);\n }\n\n getSeries(): any[] {\n const total = this.designatedTotal ? this.designatedTotal : this.getTotal();\n\n return this.data.map(d => {\n const baselineLabelHeight = 20;\n const padding = 10;\n const name = d.data.name;\n const label = formatLabel(name);\n const value = d.data.value;\n const radius = min([d.width - padding, d.height - baselineLabelHeight]) / 2 - 5;\n const innerRadius = radius * 0.9;\n\n let count = 0;\n const colors = () => {\n count += 1;\n if (count === 1) {\n return 'rgba(100,100,100,0.3)';\n } else {\n return this.colorScale.getColor(label);\n }\n };\n\n const xPos = d.x + (d.width - padding) / 2;\n const yPos = d.y + (d.height - baselineLabelHeight) / 2;\n\n return {\n transform: `translate(${xPos}, ${yPos})`,\n colors,\n innerRadius,\n outerRadius: radius,\n name,\n label: trimLabel(label),\n total: value,\n value,\n percent: format('.1%')(d.data.percent),\n data: [\n d,\n {\n data: {\n other: true,\n value: total - value,\n name: d.data.name\n }\n }\n ]\n };\n });\n }\n\n getTotal(): any {\n return this.results.map(d => d.value).reduce((sum, d) => sum + d, 0);\n }\n\n onClick(data: DataItem): void {\n this.select.emit(data);\n }\n\n setColors(): void {\n this.colorScale = new ColorHelper(this.scheme, ScaleType.Ordinal, this.domain, this.customColors);\n }\n\n onActivate(item, fromLegend = false) {\n item = this.results.find(d => {\n if (fromLegend) {\n return d.label === item.name;\n } else {\n return d.name === item.name;\n }\n });\n\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value && d.series === item.series;\n });\n if (idx > -1) {\n return;\n }\n\n this.activeEntries = [item, ...this.activeEntries];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n\n onDeactivate(item, fromLegend = false) {\n item = this.results.find(d => {\n if (fromLegend) {\n return d.label === item.name;\n } else {\n return d.name === item.name;\n }\n });\n\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value && d.series === item.series;\n });\n\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ChartCommonModule } from '../common/chart-common.module';\nimport { AdvancedPieChartComponent } from './advanced-pie-chart.component';\nimport { PieLabelComponent } from './pie-label.component';\nimport { PieArcComponent } from './pie-arc.component';\nimport { PieChartComponent } from './pie-chart.component';\nimport { PieGridComponent } from './pie-grid.component';\nimport { PieGridSeriesComponent } from './pie-grid-series.component';\nimport { PieSeriesComponent } from './pie-series.component';\n\n@NgModule({\n imports: [ChartCommonModule],\n declarations: [\n AdvancedPieChartComponent,\n PieLabelComponent,\n PieArcComponent,\n PieChartComponent,\n PieGridComponent,\n PieGridSeriesComponent,\n PieSeriesComponent\n ],\n exports: [\n AdvancedPieChartComponent,\n PieLabelComponent,\n PieArcComponent,\n PieChartComponent,\n PieGridComponent,\n PieGridSeriesComponent,\n PieSeriesComponent\n ]\n})\nexport class PieChartModule {}\n","import { NgModule } from '@angular/core';\nimport { ChartCommonModule } from '../common/chart-common.module';\nimport { PolarChartComponent } from './polar-chart.component';\nimport { PolarSeriesComponent } from './polar-series.component';\nimport { PieChartModule } from '../pie-chart/pie-chart.module';\nimport { LineChartModule } from '../line-chart/line-chart.module';\n\n@NgModule({\n imports: [ChartCommonModule, PieChartModule, LineChartModule],\n declarations: [PolarChartComponent, PolarSeriesComponent],\n exports: [PolarChartComponent, PolarSeriesComponent]\n})\nexport class PolarChartModule {}\n","export function calculateTextWidth(fontFamilyKey: Record<string, any>, text: string, defaultWidth = 8) {\n return text.split('').reduce((acc, curr) => {\n const width = fontFamilyKey[curr] || defaultWidth;\n return acc + width;\n }, 0);\n}\n","export const VERDANA_FONT_WIDTHS_16_PX = {\n '0': 10,\n '1': 10,\n '2': 10,\n '3': 10,\n '4': 10,\n '5': 10,\n '6': 10,\n '7': 10,\n '8': 10,\n '9': 10,\n A: 11,\n B: 11,\n C: 11,\n D: 12,\n E: 10,\n F: 9,\n G: 12,\n H: 12,\n I: 7,\n J: 7,\n K: 11,\n L: 9,\n M: 13,\n N: 12,\n O: 13,\n P: 10,\n Q: 13,\n R: 11,\n S: 11,\n T: 10,\n U: 12,\n V: 11,\n W: 16,\n X: 11,\n Y: 10,\n Z: 11,\n a: 10,\n b: 10,\n c: 8,\n d: 10,\n e: 10,\n f: 6,\n g: 10,\n h: 10,\n i: 4,\n j: 6,\n k: 9,\n l: 4,\n m: 16,\n n: 10,\n o: 10,\n p: 10,\n q: 10,\n r: 7,\n s: 8,\n t: 6,\n u: 10,\n v: 9,\n w: 13,\n x: 9,\n y: 9,\n z: 8,\n '!': 6,\n '@': 16,\n '#': 13,\n $: 10,\n '%': 17,\n '^': 13,\n '&': 12,\n '*': 10,\n '(': 7,\n ')': 7,\n _: 10,\n '-': 7,\n '+': 13,\n '=': 13,\n ',': 6,\n '.': 6,\n '/': 7,\n \"'\": 4,\n ':': 7,\n '|': 7,\n '?': 9,\n ';': 7,\n '<': 13,\n '>': 13\n};\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ElementRef,\n SimpleChanges,\n OnChanges,\n ViewChild,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n NgZone,\n OnDestroy,\n PLATFORM_ID,\n Inject,\n OnInit\n} from '@angular/core';\nimport { trimLabel } from '../common/trim-label.helper';\nimport { roundedRect } from '../common/shape.helper';\nimport { escapeLabel } from '../common/label.helper';\nimport { decimalChecker, count } from '../common/count/count.helper';\nimport { GridData } from '../common/grid-layout.helper';\nimport { isPlatformBrowser, isPlatformServer } from '@angular/common';\nimport { calculateTextWidth } from '../utils/calculate-width';\nimport { VERDANA_FONT_WIDTHS_16_PX } from '../common/constants/font-widths';\n\n@Component({\n selector: 'g[ngx-charts-card]',\n template: `\n <svg:g [attr.transform]=\"transform\" class=\"cell\" (click)=\"onClick()\">\n <svg:rect class=\"card\" [style.fill]=\"color\" [attr.width]=\"cardWidth\" [attr.height]=\"cardHeight\" rx=\"3\" ry=\"3\" />\n <svg:path\n *ngIf=\"bandColor && bandColor !== color\"\n class=\"card-band\"\n [attr.fill]=\"bandColor\"\n [attr.transform]=\"transformBand\"\n stroke=\"none\"\n [attr.d]=\"bandPath\"\n />\n <title>{{ label }}</title>\n <svg:foreignObject\n class=\"trimmed-label\"\n x=\"5\"\n [attr.x]=\"textPadding[3]\"\n [attr.y]=\"cardHeight - textPadding[2]\"\n [attr.width]=\"textWidth\"\n [attr.height]=\"labelFontSize + textPadding[2]\"\n alignment-baseline=\"hanging\"\n >\n <xhtml:p\n [style.color]=\"textColor\"\n [style.fontSize.px]=\"labelFontSize\"\n [style.lineHeight.px]=\"labelFontSize\"\n [innerHTML]=\"formattedLabel\"\n >\n </xhtml:p>\n </svg:foreignObject>\n <svg:text\n #textEl\n class=\"value-text\"\n [attr.x]=\"textPadding[3]\"\n [attr.y]=\"textPadding[0]\"\n [style.fill]=\"textColor\"\n text-anchor=\"start\"\n alignment-baseline=\"hanging\"\n [style.font-size.pt]=\"textFontSize\"\n >\n {{ value }}\n </svg:text>\n </svg:g>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class CardComponent implements OnChanges, OnDestroy, OnInit {\n @Input() color: string;\n @Input() bandColor: string;\n @Input() textColor: string;\n @Input() x: number;\n @Input() y: number;\n @Input() width: number;\n @Input() height: number;\n @Input() label: string;\n @Input() data: GridData;\n @Input() medianSize: number;\n @Input() valueFormatting: any;\n @Input() labelFormatting: any;\n @Input() animations: boolean = true;\n\n @Output() select = new EventEmitter();\n\n @ViewChild('textEl', { static: false }) textEl: ElementRef;\n\n element: HTMLElement;\n value: string = '';\n transform: string;\n formattedLabel: string;\n cardWidth: number;\n cardHeight: number;\n textWidth: number;\n textFontSize: number = 12;\n textTransform: string = '';\n initialized: boolean = false;\n animationReq: number;\n\n bandHeight: number = 10;\n transformBand: string;\n textPadding: number[] = [10, 20, 5, 20];\n labelFontSize: number = 15;\n\n bandPath: string;\n\n constructor(\n element: ElementRef,\n private cd: ChangeDetectorRef,\n private zone: NgZone,\n @Inject(PLATFORM_ID) private platformId: any\n ) {\n this.element = element.nativeElement;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.update();\n }\n\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.scaleTextSSR();\n }\n }\n\n ngOnDestroy(): void {\n if (isPlatformBrowser(this.platformId)) {\n cancelAnimationFrame(this.animationReq);\n }\n }\n\n update(): void {\n this.zone.run(() => {\n const hasValue = this.data && typeof this.data.value !== 'undefined';\n const valueFormatting = this.valueFormatting || (card => card.value.toLocaleString());\n const labelFormatting = this.labelFormatting || (card => escapeLabel(trimLabel(card.label, 55)));\n\n this.transform = `translate(${this.x} , ${this.y})`;\n\n this.textWidth = Math.max(0, this.width) - this.textPadding[1] - this.textPadding[3];\n this.cardWidth = Math.max(0, this.width);\n this.cardHeight = Math.max(0, this.height);\n\n this.label = this.label ? this.label : (this.data.name as any);\n\n const cardData = {\n label: this.label,\n data: this.data,\n value: this.data.value\n };\n\n this.formattedLabel = labelFormatting(cardData);\n this.transformBand = `translate(0 , ${this.cardHeight - this.bandHeight})`;\n\n const value = hasValue ? valueFormatting(cardData) : '';\n\n this.value = this.paddedValue(value);\n this.setPadding();\n\n this.bandPath = roundedRect(0, 0, this.cardWidth, this.bandHeight, 3, [false, false, true, true]);\n\n setTimeout(() => {\n if (isPlatformBrowser(this.platformId)) {\n this.scaleText();\n }\n this.value = value;\n if (hasValue && !this.initialized) {\n setTimeout(() => this.startCount(), 20);\n }\n }, 8);\n });\n }\n\n paddedValue(value: string): string {\n if (this.medianSize && this.medianSize > value.length) {\n value += '\\u2007'.repeat(this.medianSize - value.length);\n }\n return value;\n }\n\n startCount(): void {\n if (!this.initialized && this.animations) {\n cancelAnimationFrame(this.animationReq);\n\n const val = this.data.value;\n const decs = decimalChecker(val);\n const valueFormatting = this.valueFormatting || (card => card.value.toLocaleString());\n\n const callback = ({ value, finished }) => {\n this.zone.run(() => {\n value = finished ? val : value;\n this.value = valueFormatting({ label: this.label, data: this.data, value });\n if (!finished) {\n this.value = this.paddedValue(this.value);\n }\n this.cd.markForCheck();\n });\n };\n\n this.animationReq = count(0, val, decs, 1, callback);\n this.initialized = true;\n }\n }\n\n scaleText(): void {\n this.zone.run(() => {\n const { width, height } = this.textEl.nativeElement.getBoundingClientRect();\n if (width === 0 || height === 0) {\n return;\n }\n\n const textPadding = (this.textPadding[1] = this.textPadding[3] = this.cardWidth / 8);\n const availableWidth = this.cardWidth - 2 * textPadding;\n const availableHeight = this.cardHeight / 3;\n\n const resizeScale = Math.min(availableWidth / width, availableHeight / height);\n this.textFontSize = Math.floor(this.textFontSize * resizeScale);\n this.labelFontSize = Math.min(this.textFontSize, 15);\n\n this.setPadding();\n this.cd.markForCheck();\n });\n }\n\n scaleTextSSR() {\n const width = calculateTextWidth(VERDANA_FONT_WIDTHS_16_PX, this.value, 10);\n const height = 18;\n const textPadding = (this.textPadding[1] = this.textPadding[3] = this.cardWidth / 8);\n const availableWidth = this.cardWidth - 2 * textPadding;\n const availableHeight = this.cardHeight / 3;\n\n const resizeScale = Math.min(availableWidth / width, availableHeight / height);\n\n this.textFontSize = Math.floor(this.textFontSize * resizeScale);\n this.labelFontSize = Math.min(this.textFontSize, 15);\n\n this.setPadding();\n }\n\n setPadding() {\n this.textPadding[1] = this.textPadding[3] = this.cardWidth / 8;\n const padding = this.cardHeight / 2;\n this.textPadding[0] = padding - this.textFontSize - this.labelFontSize / 2;\n this.textPadding[2] = padding - this.labelFontSize;\n }\n\n onClick(): void {\n this.select.emit(this.data);\n }\n}\n","import * as d3_color from 'd3-color';\n\n/**\n * Converts a hex to RGB\n *\n * @export\n */\nexport function hexToRgb(value: string): any {\n // deprecated, use d3.color()\n return d3_color.rgb(value);\n}\n\n/**\n * Accepts a color (string) and returns a inverted hex color (string)\n * http://stackoverflow.com/questions/9600295/automatically-change-text-color-to-assure-readability\n *\n * @export\n */\nexport function invertColor(value: string): string {\n const color = d3_color.rgb(value);\n const { r, g, b, opacity } = color;\n if (opacity === 0) {\n return color.toString();\n }\n const yiq = (r * 299 + g * 587 + b * 114) / 1000;\n const depth = yiq >= 128 ? -0.8 : 0.8;\n\n return shadeRGBColor(color, depth);\n}\n\n/**\n * Given a rgb, it will darken/lighten\n * http://stackoverflow.com/questions/5560248/programmatically-lighten-or-darken-a-hex-color-or-rgb-and-blend-colors\n *\n * @export\n * @param \\{ r, g, b }\n */\nexport function shadeRGBColor({ r, g, b }, percent: number): string {\n const t = percent < 0 ? 0 : 255;\n const p = percent < 0 ? percent * -1 : percent;\n\n r = Math.round((t - r) * p) + r;\n g = Math.round((t - g) * p) + g;\n b = Math.round((t - b) * p) + b;\n\n return `rgb(${r}, ${g}, ${b})`;\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n OnChanges,\n SimpleChanges,\n ChangeDetectionStrategy\n} from '@angular/core';\nimport { invertColor } from '../utils/color-utils';\nimport { GridItem, GridData } from '../common/grid-layout.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\n\nexport interface CardModel extends GridItem {\n color: string;\n tooltipText: string;\n textColor: string;\n bandColor: string;\n label: string;\n}\n\n@Component({\n selector: 'g[ngx-charts-card-series]',\n template: `\n <svg:rect\n *ngFor=\"let c of emptySlots; trackBy: trackBy\"\n class=\"card-empty\"\n [attr.x]=\"c.x\"\n [attr.y]=\"c.y\"\n [style.fill]=\"emptyColor\"\n [attr.width]=\"c.width\"\n [attr.height]=\"c.height\"\n rx=\"3\"\n ry=\"3\"\n />\n <svg:g\n ngx-charts-card\n *ngFor=\"let c of cards; trackBy: trackBy\"\n [x]=\"c.x\"\n [y]=\"c.y\"\n [width]=\"c.width\"\n [height]=\"c.height\"\n [color]=\"c.color\"\n [bandColor]=\"c.bandColor\"\n [textColor]=\"c.textColor\"\n [data]=\"c.data\"\n [label]=\"c.label\"\n [medianSize]=\"medianSize\"\n [valueFormatting]=\"valueFormatting\"\n [labelFormatting]=\"labelFormatting\"\n [animations]=\"animations\"\n (select)=\"onClick($event)\"\n />\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class CardSeriesComponent implements OnChanges {\n @Input() data: CardModel[];\n @Input() dims: ViewDimensions;\n @Input() colors: ColorHelper;\n @Input() innerPadding: number = 15;\n\n @Input() cardColor: string;\n @Input() bandColor: string;\n @Input() emptyColor = 'rgba(0, 0, 0, 0)';\n @Input() textColor: string;\n @Input() valueFormatting: any;\n @Input() labelFormatting: any;\n @Input() animations: boolean = true;\n\n @Output() select = new EventEmitter();\n\n cards: CardModel[];\n emptySlots: any[];\n medianSize: number;\n\n ngOnChanges(changes: SimpleChanges): void {\n this.update();\n }\n\n update(): void {\n if (this.data.length > 2) {\n const valueFormatting = this.valueFormatting || (card => card.value.toLocaleString());\n\n const sortedLengths = this.data\n .map(d => {\n const hasValue = d && d.data && typeof d.data.value !== 'undefined' && d.data.value !== null;\n return hasValue\n ? valueFormatting({\n data: d.data,\n label: d ? d.data.name : '',\n value: d && d.data ? d.data.value : ''\n }).length\n : 0;\n })\n .sort((a, b) => b - a);\n const idx = Math.ceil(this.data.length / 2);\n this.medianSize = sortedLengths[idx];\n }\n\n const cards = this.getCards();\n this.cards = cards.filter(d => d.data.value !== null);\n this.emptySlots = cards.filter(d => d.data.value === null);\n }\n\n getCards(): CardModel[] {\n const yPadding =\n typeof this.innerPadding === 'number' ? this.innerPadding : this.innerPadding[0] + this.innerPadding[2];\n const xPadding =\n typeof this.innerPadding === 'number' ? this.innerPadding : this.innerPadding[1] + this.innerPadding[3];\n\n return this.data.map((d, index) => {\n let label = d.data.name as any;\n if (label && label.constructor.name === 'Date') {\n label = label.toLocaleDateString();\n } else {\n label = label ? label.toLocaleString() : label;\n }\n\n const value = d.data.value;\n const valueColor = label ? this.colors.getColor(label) : this.emptyColor;\n const color = this.cardColor || valueColor || '#000';\n return {\n x: d.x,\n y: d.y,\n width: d.width - xPadding,\n height: d.height - yPadding,\n color,\n bandColor: this.bandColor || valueColor,\n textColor: this.textColor || invertColor(color),\n label,\n data: d.data,\n tooltipText: `${label}: ${value}`\n };\n });\n }\n\n trackBy(index, card): string {\n return card.label;\n }\n\n onClick(data): void {\n this.select.emit(data);\n }\n}\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input } from '@angular/core';\nimport { BaseChartComponent } from '../common/base-chart.component';\nimport { calculateViewDimensions } from '../common/view-dimensions.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { gridLayout, gridSize } from '../common/grid-layout.helper';\nimport { CardModel } from './card-series.component';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\nimport { ScaleType } from '../common/types/scale-type.enum';\n\n@Component({\n selector: 'ngx-charts-number-card',\n template: `\n <ngx-charts-chart [view]=\"[width, height]\" [showLegend]=\"false\" [animations]=\"animations\">\n <svg:g [attr.transform]=\"transform\" class=\"number-card chart\" [class.clickable]=\"clickable\">\n <svg:g\n ngx-charts-card-series\n [colors]=\"colors\"\n [cardColor]=\"cardColor\"\n [bandColor]=\"bandColor\"\n [textColor]=\"textColor\"\n [emptyColor]=\"emptyColor\"\n [data]=\"data\"\n [dims]=\"dims\"\n [innerPadding]=\"innerPadding\"\n [valueFormatting]=\"valueFormatting\"\n [labelFormatting]=\"labelFormatting\"\n [animations]=\"animations\"\n (select)=\"onClick($event)\"\n />\n </svg:g>\n </ngx-charts-chart>\n `,\n styleUrls: ['../common/base-chart.component.scss', './card.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class NumberCardComponent extends BaseChartComponent {\n @Input() cardColor: string;\n @Input() bandColor: string;\n @Input() emptyColor: string = 'rgba(0, 0, 0, 0)';\n @Input() innerPadding: number = 15;\n @Input() textColor: string;\n @Input() valueFormatting: any;\n @Input() labelFormatting: any;\n @Input() designatedTotal: number;\n\n dims: ViewDimensions;\n data: CardModel[];\n colors: ColorHelper;\n transform: string;\n domain: any[];\n margin: number[] = [10, 10, 10, 10];\n\n get clickable(): boolean {\n return !!this.select.observers.length;\n }\n\n update(): void {\n super.update();\n\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin\n });\n\n this.formatDates();\n\n this.domain = this.getDomain();\n\n this.setColors();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n\n const size = gridSize(this.dims, this.results.length, 150);\n const N = size[0] * size[1];\n\n const data = this.results.slice();\n\n while (data.length < N) {\n data.push({ value: null });\n }\n\n this.data = gridLayout(this.dims, data, 150, this.designatedTotal) as any;\n }\n\n getDomain(): string[] {\n return this.results.map(d => d.label);\n }\n\n onClick(data): void {\n this.select.emit(data);\n }\n\n setColors(): void {\n this.colors = new ColorHelper(this.scheme, ScaleType.Ordinal, this.domain, this.customColors);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ChartCommonModule } from '../common/chart-common.module';\nimport { CardComponent } from './card.component';\nimport { CardSeriesComponent } from './card-series.component';\nimport { NumberCardComponent } from './number-card.component';\n\n@NgModule({\n imports: [ChartCommonModule],\n declarations: [CardComponent, CardSeriesComponent, NumberCardComponent],\n exports: [CardComponent, CardSeriesComponent, NumberCardComponent]\n})\nexport class NumberCardModule {}\n","import { Component, Input, Output, EventEmitter, ElementRef, OnChanges, ChangeDetectionStrategy } from '@angular/core';\nimport { select } from 'd3-selection';\nimport { invertColor } from '../utils/color-utils';\nimport { trimLabel } from '../common/trim-label.helper';\nimport { escapeLabel } from '../common/label.helper';\nimport { id } from '../utils/id';\nimport { DataItem } from '../models/chart-data.model';\nimport { Gradient } from '../common/types/gradient.interface';\nimport { BarOrientation } from '../common/types/bar-orientation.enum';\n\n@Component({\n selector: 'g[ngx-charts-tree-map-cell]',\n template: `\n <svg:g>\n <defs *ngIf=\"gradient\">\n <svg:g\n ngx-charts-svg-linear-gradient\n [orientation]=\"orientation.Vertical\"\n [name]=\"gradientId\"\n [stops]=\"gradientStops\"\n />\n </defs>\n <svg:rect\n [attr.fill]=\"gradient ? gradientUrl : fill\"\n [attr.width]=\"width\"\n [attr.height]=\"height\"\n [attr.x]=\"x\"\n [attr.y]=\"y\"\n class=\"cell\"\n (click)=\"onClick()\"\n />\n <svg:foreignObject\n *ngIf=\"width >= 70 && height >= 35\"\n [attr.x]=\"x\"\n [attr.y]=\"y\"\n [attr.width]=\"width\"\n [attr.height]=\"height\"\n class=\"treemap-label\"\n [style.pointer-events]=\"'none'\"\n >\n <xhtml:p [style.color]=\"getTextColor()\" [style.height]=\"height + 'px'\" [style.width]=\"width + 'px'\">\n <xhtml:span class=\"treemap-label\" [innerHTML]=\"formattedLabel\"> </xhtml:span>\n <xhtml:br />\n <xhtml:span\n *ngIf=\"animations\"\n class=\"treemap-val\"\n ngx-charts-count-up\n [countTo]=\"value\"\n [valueFormatting]=\"valueFormatting\"\n >\n </xhtml:span>\n <xhtml:span *ngIf=\"!animations\" class=\"treemap-val\">\n {{ formattedValue }}\n </xhtml:span>\n </xhtml:p>\n </svg:foreignObject>\n </svg:g>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class TreeMapCellComponent implements OnChanges {\n @Input() data: DataItem;\n @Input() fill: string;\n @Input() x: number;\n @Input() y: number;\n @Input() width: number;\n @Input() height: number;\n @Input() label: string;\n @Input() value: any;\n // @Input() valueType;\n @Input() valueFormatting: any;\n @Input() labelFormatting: any;\n @Input() gradient: boolean = false;\n @Input() animations: boolean = true;\n\n @Output() select = new EventEmitter();\n\n gradientStops: Gradient[];\n gradientId: string;\n gradientUrl: string;\n\n element: HTMLElement;\n transform: string;\n formattedLabel: string;\n formattedValue: string;\n initialized: boolean = false;\n\n orientation = BarOrientation;\n\n constructor(element: ElementRef) {\n this.element = element.nativeElement;\n }\n\n ngOnChanges(): void {\n this.update();\n\n this.valueFormatting = this.valueFormatting || (value => value.toLocaleString());\n const labelFormatting = this.labelFormatting || (cell => escapeLabel(trimLabel(cell.label, 55)));\n\n const cellData = {\n data: this.data,\n label: this.label,\n value: this.value\n };\n\n this.formattedValue = this.valueFormatting(cellData.value);\n this.formattedLabel = labelFormatting(cellData);\n\n this.gradientId = 'grad' + id().toString();\n this.gradientUrl = `url(#${this.gradientId})`;\n this.gradientStops = this.getGradientStops();\n }\n\n update(): void {\n if (this.initialized) {\n this.animateToCurrentForm();\n } else {\n if (this.animations) {\n this.loadAnimation();\n }\n this.initialized = true;\n }\n }\n\n loadAnimation(): void {\n const node = select(this.element).select('.cell');\n\n node.attr('opacity', 0).attr('x', this.x).attr('y', this.y);\n\n this.animateToCurrentForm();\n }\n\n getTextColor(): string {\n return invertColor(this.fill);\n }\n\n animateToCurrentForm(): void {\n const node = select(this.element).select('.cell');\n\n if (this.animations) {\n node\n .transition()\n .duration(750)\n .attr('opacity', 1)\n .attr('x', this.x)\n .attr('y', this.y)\n .attr('width', this.width)\n .attr('height', this.height);\n } else {\n node.attr('opacity', 1).attr('x', this.x).attr('y', this.y).attr('width', this.width).attr('height', this.height);\n }\n }\n\n onClick(): void {\n this.select.emit(this.data);\n }\n\n getGradientStops(): Gradient[] {\n return [\n {\n offset: 0,\n color: this.fill,\n opacity: 0.3\n },\n {\n offset: 100,\n color: this.fill,\n opacity: 1\n }\n ];\n }\n}\n","import {\n Component,\n OnChanges,\n Input,\n Output,\n SimpleChanges,\n EventEmitter,\n ChangeDetectionStrategy,\n TemplateRef\n} from '@angular/core';\nimport { ColorHelper } from '../common/color.helper';\nimport { escapeLabel } from '../common/label.helper';\nimport { DataItem } from '../models/chart-data.model';\nimport { StyleTypes } from '../common/tooltip/style.type';\nimport { PlacementTypes } from '../common/tooltip/position';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\n\ninterface TreeMapCell {\n data: DataItem;\n fill: string;\n height: number;\n label: string;\n value: any;\n width: number;\n x: number;\n y: number;\n}\n\n@Component({\n selector: 'g[ngx-charts-tree-map-cell-series]',\n template: `\n <svg:g\n ngx-charts-tree-map-cell\n *ngFor=\"let c of cells; trackBy: trackBy\"\n [data]=\"c.data\"\n [x]=\"c.x\"\n [y]=\"c.y\"\n [width]=\"c.width\"\n [height]=\"c.height\"\n [fill]=\"c.fill\"\n [label]=\"c.label\"\n [value]=\"c.value\"\n [valueFormatting]=\"valueFormatting\"\n [labelFormatting]=\"labelFormatting\"\n [gradient]=\"gradient\"\n [animations]=\"animations\"\n (select)=\"onClick($event)\"\n ngx-tooltip\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipPlacement]=\"placementTypes.Top\"\n [tooltipType]=\"styleTypes.tooltip\"\n [tooltipTitle]=\"tooltipTemplate ? undefined : getTooltipText(c)\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipContext]=\"c.data\"\n ></svg:g>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class TreeMapCellSeriesComponent implements OnChanges {\n @Input() data: any; // type this\n @Input() dims: ViewDimensions;\n @Input() colors: ColorHelper;\n @Input() valueFormatting: any;\n @Input() labelFormatting: any;\n @Input() gradient: boolean = false;\n @Input() tooltipDisabled: boolean = false;\n @Input() tooltipTemplate: TemplateRef<any>;\n @Input() animations: boolean = true;\n\n @Output() select = new EventEmitter();\n\n cells: TreeMapCell[];\n styleTypes = StyleTypes;\n placementTypes = PlacementTypes;\n\n ngOnChanges(changes: SimpleChanges): void {\n this.cells = this.getCells();\n }\n\n getCells(): TreeMapCell[] {\n return this.data.children\n .filter(d => {\n return d.depth === 1;\n })\n .map((d, index) => {\n const label = d.id;\n\n return {\n data: d.data,\n x: d.x0,\n y: d.y0,\n width: d.x1 - d.x0,\n height: d.y1 - d.y0,\n fill: this.colors.getColor(label),\n label,\n value: d.value\n };\n });\n }\n\n getTooltipText({ label, value }: { label: any; value: any }): string {\n return `\n <span class=\"tooltip-label\">${escapeLabel(label)}</span>\n <span class=\"tooltip-val\">${value.toLocaleString()}</span>\n `;\n }\n\n onClick(data): void {\n this.select.emit(data);\n }\n\n trackBy(index, item): string {\n return item.label;\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ContentChild,\n TemplateRef\n} from '@angular/core';\nimport { treemap, stratify } from 'd3-hierarchy';\n\nimport { BaseChartComponent } from '../common/base-chart.component';\nimport { calculateViewDimensions } from '../common/view-dimensions.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { DataItem } from '../models/chart-data.model';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\nimport { ScaleType } from '../common/types/scale-type.enum';\n\n@Component({\n selector: 'ngx-charts-tree-map',\n template: `\n <ngx-charts-chart [view]=\"[width, height]\" [showLegend]=\"false\" [animations]=\"animations\">\n <svg:g [attr.transform]=\"transform\" class=\"tree-map chart\">\n <svg:g\n ngx-charts-tree-map-cell-series\n [colors]=\"colors\"\n [data]=\"data\"\n [dims]=\"dims\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [valueFormatting]=\"valueFormatting\"\n [labelFormatting]=\"labelFormatting\"\n [gradient]=\"gradient\"\n [animations]=\"animations\"\n (select)=\"onClick($event)\"\n />\n </svg:g>\n </ngx-charts-chart>\n `,\n styleUrls: ['./tree-map.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class TreeMapComponent extends BaseChartComponent {\n @Input() results: DataItem[];\n @Input() tooltipDisabled: boolean = false;\n @Input() valueFormatting: any;\n @Input() labelFormatting: any;\n @Input() gradient: boolean = false;\n\n @Output() select = new EventEmitter();\n\n @ContentChild('tooltipTemplate') tooltipTemplate: TemplateRef<any>;\n\n dims: ViewDimensions;\n domain: any;\n transform: any;\n colors: ColorHelper;\n treemap: any;\n data: DataItem;\n margin: number[] = [10, 10, 10, 10];\n\n update(): void {\n super.update();\n\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin\n });\n\n this.domain = this.getDomain();\n\n this.treemap = treemap<any>().size([this.dims.width, this.dims.height]);\n\n const rootNode = {\n name: 'root',\n value: 0,\n isRoot: true\n };\n\n const root = stratify<any>()\n .id(d => {\n let label = d.name;\n\n if (label.constructor.name === 'Date') {\n label = label.toLocaleDateString();\n } else {\n label = label.toLocaleString();\n }\n return label;\n })\n .parentId(d => (d.isRoot ? null : 'root'))([rootNode, ...this.results])\n .sum(d => d.value);\n\n this.data = this.treemap(root);\n\n this.setColors();\n\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n }\n\n getDomain(): any[] {\n return this.results.map(d => d.name);\n }\n\n onClick(data: DataItem): void {\n this.select.emit(data);\n }\n\n setColors(): void {\n this.colors = new ColorHelper(this.scheme, ScaleType.Ordinal, this.domain, this.customColors);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ChartCommonModule } from '../common/chart-common.module';\nimport { TreeMapCellComponent } from './tree-map-cell.component';\nimport { TreeMapCellSeriesComponent } from './tree-map-cell-series.component';\nimport { TreeMapComponent } from './tree-map.component';\n\n@NgModule({\n imports: [ChartCommonModule],\n declarations: [TreeMapCellComponent, TreeMapCellSeriesComponent, TreeMapComponent],\n exports: [TreeMapCellComponent, TreeMapCellSeriesComponent, TreeMapComponent]\n})\nexport class TreeMapModule {}\n","import {\n Component,\n Input,\n ElementRef,\n ViewChild,\n AfterViewInit,\n ViewEncapsulation,\n ChangeDetectionStrategy\n} from '@angular/core';\nimport { scaleLinear } from 'd3-scale';\n\nimport { BaseChartComponent } from '../common/base-chart.component';\nimport { calculateViewDimensions } from '../common/view-dimensions.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { calculateTextWidth } from '../utils/calculate-width';\nimport { VERDANA_FONT_WIDTHS_16_PX } from '../common/constants/font-widths';\nimport { isPlatformBrowser, isPlatformServer } from '@angular/common';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\nimport { BarOrientation } from '../common/types/bar-orientation.enum';\nimport { ScaleType } from '../common/types/scale-type.enum';\n\nenum ElementType {\n Value = 'value',\n Units = 'units'\n}\n\n@Component({\n selector: 'ngx-charts-linear-gauge',\n template: `\n <ngx-charts-chart [view]=\"[width, height]\" [showLegend]=\"false\" [animations]=\"animations\" (click)=\"onClick()\">\n <svg:g class=\"linear-gauge chart\">\n <svg:g\n ngx-charts-bar\n class=\"background-bar\"\n [width]=\"dims.width\"\n [height]=\"3\"\n [x]=\"margin[3]\"\n [y]=\"dims.height / 2 + margin[0] - 2\"\n [data]=\"{}\"\n [orientation]=\"barOrientation.Horizontal\"\n [roundEdges]=\"true\"\n [animations]=\"animations\"\n ></svg:g>\n <svg:g\n ngx-charts-bar\n [width]=\"valueScale(value)\"\n [height]=\"3\"\n [x]=\"margin[3]\"\n [y]=\"dims.height / 2 + margin[0] - 2\"\n [fill]=\"colors.getColor(units)\"\n [data]=\"{}\"\n [orientation]=\"barOrientation.Horizontal\"\n [roundEdges]=\"true\"\n [animations]=\"animations\"\n ></svg:g>\n\n <svg:line\n *ngIf=\"hasPreviousValue\"\n [attr.transform]=\"transformLine\"\n x1=\"0\"\n y1=\"5\"\n x2=\"0\"\n y2=\"15\"\n [attr.stroke]=\"colors.getColor(units)\"\n />\n\n <svg:line\n *ngIf=\"hasPreviousValue\"\n [attr.transform]=\"transformLine\"\n x1=\"0\"\n y1=\"-5\"\n x2=\"0\"\n y2=\"-15\"\n [attr.stroke]=\"colors.getColor(units)\"\n />\n\n <svg:g [attr.transform]=\"transform\">\n <svg:g [attr.transform]=\"valueTranslate\">\n <svg:text\n #valueTextEl\n class=\"value\"\n [style.textAnchor]=\"'middle'\"\n [attr.transform]=\"valueTextTransform\"\n alignment-baseline=\"after-edge\"\n >\n {{ displayValue }}\n </svg:text>\n </svg:g>\n\n <svg:g [attr.transform]=\"unitsTranslate\">\n <svg:text\n #unitsTextEl\n class=\"units\"\n [style.textAnchor]=\"'middle'\"\n [attr.transform]=\"unitsTextTransform\"\n alignment-baseline=\"before-edge\"\n >\n {{ units }}\n </svg:text>\n </svg:g>\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n `,\n styleUrls: ['../common/base-chart.component.scss', './linear-gauge.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class LinearGaugeComponent extends BaseChartComponent implements AfterViewInit {\n @Input() min: number = 0;\n @Input() max: number = 100;\n @Input() value: number = 0;\n @Input() units: string;\n @Input() previousValue: number;\n @Input() valueFormatting: any;\n\n @ViewChild('valueTextEl') valueTextEl: ElementRef;\n @ViewChild('unitsTextEl') unitsTextEl: ElementRef;\n\n dims: ViewDimensions;\n valueDomain: [number, number];\n valueScale: any;\n\n colors: ColorHelper;\n transform: string;\n margin: number[] = [10, 20, 10, 20];\n transformLine: string;\n\n valueResizeScale: number = 1;\n unitsResizeScale: number = 1;\n valueTextTransform: string = '';\n valueTranslate: string = '';\n unitsTextTransform: string = '';\n unitsTranslate: string = '';\n displayValue: string;\n hasPreviousValue: boolean;\n\n barOrientation = BarOrientation;\n\n ngAfterViewInit(): void {\n super.ngAfterViewInit();\n setTimeout(() => {\n this.scaleText(ElementType.Value);\n this.scaleText(ElementType.Units);\n });\n }\n\n update(): void {\n super.update();\n\n this.hasPreviousValue = this.previousValue !== undefined;\n this.max = Math.max(this.max, this.value);\n this.min = Math.min(this.min, this.value);\n if (this.hasPreviousValue) {\n this.max = Math.max(this.max, this.previousValue);\n this.min = Math.min(this.min, this.previousValue);\n }\n\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin\n });\n\n this.valueDomain = this.getValueDomain();\n this.valueScale = this.getValueScale();\n this.displayValue = this.getDisplayValue();\n\n this.setColors();\n\n const xOffset = this.margin[3] + this.dims.width / 2;\n const yOffset = this.margin[0] + this.dims.height / 2;\n\n this.transform = `translate(${xOffset}, ${yOffset})`;\n this.transformLine = `translate(${this.margin[3] + this.valueScale(this.previousValue)}, ${yOffset})`;\n this.valueTranslate = `translate(0, -15)`;\n this.unitsTranslate = `translate(0, 15)`;\n\n if (isPlatformServer(this.platformId)) {\n this.scaleTextSSR('value');\n this.scaleTextSSR('units');\n } else {\n setTimeout(() => this.scaleText(ElementType.Value), 50);\n setTimeout(() => this.scaleText(ElementType.Units), 50);\n }\n }\n\n getValueDomain(): [number, number] {\n return [this.min, this.max];\n }\n\n getValueScale(): any {\n return scaleLinear().range([0, this.dims.width]).domain(this.valueDomain);\n }\n\n getDisplayValue(): string {\n if (this.valueFormatting) {\n return this.valueFormatting(this.value);\n }\n return this.value.toLocaleString();\n }\n\n scaleText(element: ElementType, repeat: boolean = true): void {\n let el;\n let resizeScale;\n if (element === ElementType.Value) {\n el = this.valueTextEl;\n resizeScale = this.valueResizeScale;\n } else {\n el = this.unitsTextEl;\n resizeScale = this.unitsResizeScale;\n }\n\n const { width, height } = el.nativeElement.getBoundingClientRect();\n if (width === 0 || height === 0) return;\n const oldScale = resizeScale;\n const availableWidth = this.dims.width;\n const availableHeight = Math.max(this.dims.height / 2 - 15, 0);\n const resizeScaleWidth = Math.floor((availableWidth / (width / resizeScale)) * 100) / 100;\n const resizeScaleHeight = Math.floor((availableHeight / (height / resizeScale)) * 100) / 100;\n resizeScale = Math.min(resizeScaleHeight, resizeScaleWidth);\n\n if (resizeScale !== oldScale) {\n if (element === ElementType.Value) {\n this.valueResizeScale = resizeScale;\n this.valueTextTransform = `scale(${resizeScale}, ${resizeScale})`;\n } else {\n this.unitsResizeScale = resizeScale;\n this.unitsTextTransform = `scale(${resizeScale}, ${resizeScale})`;\n }\n this.cd.markForCheck();\n if (repeat && isPlatformBrowser(this.platformId)) {\n setTimeout(() => {\n this.scaleText(element, false);\n }, 50);\n }\n }\n }\n\n scaleTextSSR(element) {\n let resizeScale = 1;\n\n const value = element === 'value' ? this.displayValue : this.units;\n const width = calculateTextWidth(VERDANA_FONT_WIDTHS_16_PX, value, 10);\n const height = 25;\n\n const availableWidth = this.dims.width;\n const availableHeight = Math.max(this.dims.height / 2 - 15, 0);\n const resizeScaleWidth = Math.floor((availableWidth / (width / resizeScale)) * 100) / 100;\n const resizeScaleHeight = Math.floor((availableHeight / (height / resizeScale)) * 100) / 100;\n resizeScale = Math.min(resizeScaleHeight, resizeScaleWidth);\n\n if (element === 'value') {\n this.valueResizeScale = resizeScale;\n this.valueTextTransform = `scale(${resizeScale}, ${resizeScale})`;\n } else {\n this.unitsResizeScale = resizeScale;\n this.unitsTextTransform = `scale(${resizeScale}, ${resizeScale})`;\n }\n\n this.cd.markForCheck();\n }\n\n onClick(): void {\n this.select.emit({\n name: 'Value',\n value: this.value\n });\n }\n\n setColors(): void {\n this.colors = new ColorHelper(this.scheme, ScaleType.Ordinal, [this.value], this.customColors);\n }\n}\n","import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, TemplateRef } from '@angular/core';\nimport { formatLabel, escapeLabel } from '../common/label.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { DataItem } from '../models/chart-data.model';\nimport { PlacementTypes } from '../common/tooltip/position';\nimport { StyleTypes } from '../common/tooltip/style.type';\n\nexport interface ArcItem {\n data: DataItem;\n endAngle: number;\n innerRadius: number;\n outerRadius: number;\n}\n\n@Component({\n selector: 'g[ngx-charts-gauge-arc]',\n template: `\n <svg:g\n ngx-charts-pie-arc\n class=\"background-arc\"\n [startAngle]=\"0\"\n [endAngle]=\"backgroundArc.endAngle\"\n [innerRadius]=\"backgroundArc.innerRadius\"\n [outerRadius]=\"backgroundArc.outerRadius\"\n [cornerRadius]=\"cornerRadius\"\n [data]=\"backgroundArc.data\"\n [animate]=\"false\"\n [pointerEvents]=\"false\"\n ></svg:g>\n <svg:g\n ngx-charts-pie-arc\n [startAngle]=\"0\"\n [endAngle]=\"valueArc.endAngle\"\n [innerRadius]=\"valueArc.innerRadius\"\n [outerRadius]=\"valueArc.outerRadius\"\n [cornerRadius]=\"cornerRadius\"\n [fill]=\"colors.getColor(valueArc.data.name)\"\n [data]=\"valueArc.data\"\n [animate]=\"animations\"\n [isActive]=\"isActive\"\n (select)=\"select.emit($event)\"\n (activate)=\"activate.emit($event)\"\n (deactivate)=\"deactivate.emit($event)\"\n ngx-tooltip\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipPlacement]=\"placementTypes.Top\"\n [tooltipType]=\"styleTypes.tooltip\"\n [tooltipTitle]=\"tooltipTemplate ? undefined : tooltipText(valueArc)\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipContext]=\"valueArc.data\"\n ></svg:g>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class GaugeArcComponent {\n @Input() backgroundArc: ArcItem;\n @Input() valueArc: ArcItem;\n @Input() cornerRadius: number;\n @Input() colors: ColorHelper;\n @Input() isActive: boolean = false;\n @Input() tooltipDisabled: boolean = false;\n @Input() valueFormatting: (value: any) => string;\n @Input() tooltipTemplate: TemplateRef<any>;\n @Input() animations: boolean = true;\n\n @Output() select = new EventEmitter();\n @Output() activate = new EventEmitter();\n @Output() deactivate = new EventEmitter();\n\n placementTypes = PlacementTypes;\n styleTypes = StyleTypes;\n\n tooltipText(arc: ArcItem): string {\n const label = formatLabel(arc.data.name);\n let val;\n\n if (this.valueFormatting) {\n val = this.valueFormatting(arc.data.value);\n } else {\n val = formatLabel(arc.data.value);\n }\n\n return `\n <span class=\"tooltip-label\">${escapeLabel(label)}</span>\n <span class=\"tooltip-val\">${val}</span>\n `;\n }\n}\n","import { Component, Input, OnChanges, SimpleChanges, ChangeDetectionStrategy } from '@angular/core';\nimport { line } from 'd3-shape';\nimport { TextAnchor } from '../common/types/text-anchor.enum';\n\ninterface Big {\n line: string;\n text: string;\n textAnchor: string;\n textTransform: string;\n}\n\ninterface Ticks {\n big: Big[];\n small: Array<{ line: string }>;\n}\n\n@Component({\n selector: 'g[ngx-charts-gauge-axis]',\n template: `\n <svg:g [attr.transform]=\"rotate\">\n <svg:g *ngFor=\"let tick of ticks.big\" class=\"gauge-tick gauge-tick-large\">\n <svg:path [attr.d]=\"tick.line\" />\n </svg:g>\n <svg:g *ngFor=\"let tick of ticks.big\" class=\"gauge-tick gauge-tick-large\">\n <svg:text\n [style.textAnchor]=\"tick.textAnchor\"\n [attr.transform]=\"tick.textTransform\"\n alignment-baseline=\"central\"\n >\n {{ tick.text }}\n </svg:text>\n </svg:g>\n <svg:g *ngFor=\"let tick of ticks.small\" class=\"gauge-tick gauge-tick-small\">\n <svg:path [attr.d]=\"tick.line\" />\n </svg:g>\n </svg:g>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class GaugeAxisComponent implements OnChanges {\n @Input() bigSegments: number;\n @Input() smallSegments: number;\n @Input() min: number;\n @Input() max: number;\n @Input() angleSpan: number;\n @Input() startAngle: number;\n @Input() radius: number;\n @Input() valueScale: any;\n @Input() tickFormatting: any;\n\n ticks: Ticks;\n rotationAngle: number;\n rotate: string = '';\n\n ngOnChanges(changes: SimpleChanges) {\n this.update();\n }\n\n update(): void {\n this.rotationAngle = -90 + this.startAngle;\n this.rotate = `rotate(${this.rotationAngle})`;\n this.ticks = this.getTicks();\n }\n\n getTicks(): Ticks {\n const bigTickSegment = this.angleSpan / this.bigSegments;\n const smallTickSegment = bigTickSegment / this.smallSegments;\n const tickLength = 20;\n const ticks = {\n big: [],\n small: []\n };\n\n const startDistance = this.radius + 10;\n const textDist = startDistance + tickLength + 10;\n\n for (let i = 0; i <= this.bigSegments; i++) {\n const angleDeg = i * bigTickSegment;\n const angle = (angleDeg * Math.PI) / 180;\n\n const textAnchor = this.getTextAnchor(angleDeg);\n\n let skip = false;\n if (i === 0 && this.angleSpan === 360) {\n skip = true;\n }\n\n if (!skip) {\n let text = Number.parseFloat(this.valueScale.invert(angleDeg).toString()).toLocaleString();\n if (this.tickFormatting) {\n text = this.tickFormatting(text);\n }\n ticks.big.push({\n line: this.getTickPath(startDistance, tickLength, angle),\n textAnchor,\n text,\n textTransform: `\n translate(${textDist * Math.cos(angle)}, ${textDist * Math.sin(angle)}) rotate(${-this.rotationAngle})\n `\n });\n }\n\n if (i === this.bigSegments) {\n continue;\n }\n\n for (let j = 1; j <= this.smallSegments; j++) {\n const smallAngleDeg = angleDeg + j * smallTickSegment;\n const smallAngle = (smallAngleDeg * Math.PI) / 180;\n\n ticks.small.push({\n line: this.getTickPath(startDistance, tickLength / 2, smallAngle)\n });\n }\n }\n\n return ticks;\n }\n\n getTextAnchor(angle: number): TextAnchor {\n // [0, 45] = 'middle';\n // [46, 135] = 'start';\n // [136, 225] = 'middle';\n // [226, 315] = 'end';\n\n angle = (this.startAngle + angle) % 360;\n let textAnchor = TextAnchor.Middle;\n if (angle > 45 && angle <= 135) {\n textAnchor = TextAnchor.Start;\n } else if (angle > 225 && angle <= 315) {\n textAnchor = TextAnchor.End;\n }\n return textAnchor;\n }\n\n getTickPath(startDistance: number, tickLength: number, angle: number): any {\n const y1 = startDistance * Math.sin(angle);\n const y2 = (startDistance + tickLength) * Math.sin(angle);\n const x1 = startDistance * Math.cos(angle);\n const x2 = (startDistance + tickLength) * Math.cos(angle);\n\n const points = [\n { x: x1, y: y1 },\n { x: x2, y: y2 }\n ];\n const lineGenerator = line<any>()\n .x(d => d.x)\n .y(d => d.y);\n return lineGenerator(points);\n }\n}\n","import {\n Component,\n Input,\n ElementRef,\n ViewChild,\n AfterViewInit,\n ChangeDetectionStrategy,\n Output,\n EventEmitter,\n ViewEncapsulation,\n ContentChild,\n TemplateRef\n} from '@angular/core';\nimport { scaleLinear } from 'd3-scale';\n\nimport { BaseChartComponent } from '../common/base-chart.component';\nimport { calculateViewDimensions } from '../common/view-dimensions.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { ArcItem } from './gauge-arc.component';\nimport { LegendOptions, LegendPosition } from '../common/types/legend.model';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\nimport { ScaleType } from '../common/types/scale-type.enum';\n\ninterface Arcs {\n backgroundArc: ArcItem;\n valueArc: ArcItem;\n}\n\n@Component({\n selector: 'ngx-charts-gauge',\n template: `\n <ngx-charts-chart\n [view]=\"[width, height]\"\n [showLegend]=\"legend\"\n [legendOptions]=\"legendOptions\"\n [activeEntries]=\"activeEntries\"\n [animations]=\"animations\"\n (legendLabelClick)=\"onClick($event)\"\n (legendLabelActivate)=\"onActivate($event)\"\n (legendLabelDeactivate)=\"onDeactivate($event)\"\n >\n <svg:g [attr.transform]=\"transform\" class=\"gauge chart\">\n <svg:g *ngFor=\"let arc of arcs; trackBy: trackBy\" [attr.transform]=\"rotation\">\n <svg:g\n ngx-charts-gauge-arc\n [backgroundArc]=\"arc.backgroundArc\"\n [valueArc]=\"arc.valueArc\"\n [cornerRadius]=\"cornerRadius\"\n [colors]=\"colors\"\n [isActive]=\"isActive(arc.valueArc.data)\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [valueFormatting]=\"valueFormatting\"\n [animations]=\"animations\"\n (select)=\"onClick($event)\"\n (activate)=\"onActivate($event)\"\n (deactivate)=\"onDeactivate($event)\"\n ></svg:g>\n </svg:g>\n\n <svg:g\n ngx-charts-gauge-axis\n *ngIf=\"showAxis\"\n [bigSegments]=\"bigSegments\"\n [smallSegments]=\"smallSegments\"\n [min]=\"min\"\n [max]=\"max\"\n [radius]=\"outerRadius\"\n [angleSpan]=\"angleSpan\"\n [valueScale]=\"valueScale\"\n [startAngle]=\"startAngle\"\n [tickFormatting]=\"axisTickFormatting\"\n ></svg:g>\n\n <svg:text\n #textEl\n *ngIf=\"showText\"\n [style.textAnchor]=\"'middle'\"\n [attr.transform]=\"textTransform\"\n alignment-baseline=\"central\"\n >\n <tspan x=\"0\" dy=\"0\">{{ displayValue }}</tspan>\n <tspan x=\"0\" dy=\"1.2em\">{{ units }}</tspan>\n </svg:text>\n </svg:g>\n </ngx-charts-chart>\n `,\n styleUrls: ['../common/base-chart.component.scss', './gauge.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class GaugeComponent extends BaseChartComponent implements AfterViewInit {\n @Input() legend: boolean = false;\n @Input() legendTitle: string = 'Legend';\n @Input() legendPosition: LegendPosition = LegendPosition.Right;\n @Input() min: number = 0;\n @Input() max: number = 100;\n @Input() textValue: string;\n @Input() units: string;\n @Input() bigSegments: number = 10;\n @Input() smallSegments: number = 5;\n @Input() results: any[];\n @Input() showAxis: boolean = true;\n @Input() startAngle: number = -120;\n @Input() angleSpan: number = 240;\n @Input() activeEntries: any[] = [];\n @Input() axisTickFormatting: any;\n @Input() tooltipDisabled: boolean = false;\n @Input() valueFormatting: (value: any) => string;\n @Input() showText: boolean = true;\n\n // Specify margins\n @Input() margin: number[];\n\n @Output() activate: EventEmitter<any> = new EventEmitter();\n @Output() deactivate: EventEmitter<any> = new EventEmitter();\n\n @ContentChild('tooltipTemplate') tooltipTemplate: TemplateRef<any>;\n\n @ViewChild('textEl') textEl: ElementRef;\n\n dims: ViewDimensions;\n domain: any[];\n valueDomain: [number, number];\n valueScale: any;\n\n colors: ColorHelper;\n transform: string;\n\n outerRadius: number;\n textRadius: number; // max available radius for the text\n resizeScale: number = 1;\n rotation: string = '';\n textTransform: string = 'scale(1, 1)';\n cornerRadius: number = 10;\n arcs: Arcs[];\n displayValue: string;\n legendOptions: LegendOptions;\n\n ngAfterViewInit(): void {\n super.ngAfterViewInit();\n setTimeout(() => this.scaleText());\n }\n\n update(): void {\n super.update();\n\n if (!this.showAxis) {\n if (!this.margin) {\n this.margin = [10, 20, 10, 20];\n }\n } else {\n if (!this.margin) {\n this.margin = [60, 100, 60, 100];\n }\n }\n\n // make the starting angle positive\n if (this.startAngle < 0) {\n this.startAngle = (this.startAngle % 360) + 360;\n }\n\n this.angleSpan = Math.min(this.angleSpan, 360);\n\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showLegend: this.legend,\n legendPosition: this.legendPosition\n });\n\n this.domain = this.getDomain();\n this.valueDomain = this.getValueDomain();\n this.valueScale = this.getValueScale();\n this.displayValue = this.getDisplayValue();\n\n this.outerRadius = Math.min(this.dims.width, this.dims.height) / 2;\n\n this.arcs = this.getArcs();\n\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n\n const xOffset = this.margin[3] + this.dims.width / 2;\n const yOffset = this.margin[0] + this.dims.height / 2;\n\n this.transform = `translate(${xOffset}, ${yOffset})`;\n this.rotation = `rotate(${this.startAngle})`;\n setTimeout(() => this.scaleText(), 50);\n }\n\n getArcs(): any[] {\n const arcs = [];\n\n const availableRadius = this.outerRadius * 0.7;\n\n const radiusPerArc = Math.min(availableRadius / this.results.length, 10);\n const arcWidth = radiusPerArc * 0.7;\n this.textRadius = this.outerRadius - this.results.length * radiusPerArc;\n this.cornerRadius = Math.floor(arcWidth / 2);\n\n let i = 0;\n for (const d of this.results) {\n const outerRadius = this.outerRadius - i * radiusPerArc;\n const innerRadius = outerRadius - arcWidth;\n\n const backgroundArc = {\n endAngle: (this.angleSpan * Math.PI) / 180,\n innerRadius,\n outerRadius,\n data: {\n value: this.max,\n name: d.name\n }\n };\n\n const valueArc = {\n endAngle: (Math.min(this.valueScale(d.value), this.angleSpan) * Math.PI) / 180,\n innerRadius,\n outerRadius,\n data: {\n value: d.value,\n name: d.name\n }\n };\n\n const arc = {\n backgroundArc,\n valueArc\n };\n\n arcs.push(arc);\n i++;\n }\n\n return arcs;\n }\n\n getDomain(): string[] {\n return this.results.map(d => d.name);\n }\n\n getValueDomain(): [number, number] {\n const values = this.results.map(d => d.value);\n const dataMin = Math.min(...values);\n const dataMax = Math.max(...values);\n\n if (this.min !== undefined) {\n this.min = Math.min(this.min, dataMin);\n } else {\n this.min = dataMin;\n }\n\n if (this.max !== undefined) {\n this.max = Math.max(this.max, dataMax);\n } else {\n this.max = dataMax;\n }\n\n return [this.min, this.max];\n }\n\n getValueScale(): any {\n return scaleLinear().range([0, this.angleSpan]).nice().domain(this.valueDomain);\n }\n\n getDisplayValue(): string {\n const value = this.results.map(d => d.value).reduce((a, b) => a + b, 0);\n\n if (this.textValue && 0 !== this.textValue.length) {\n return this.textValue.toLocaleString();\n }\n\n if (this.valueFormatting) {\n return this.valueFormatting(value);\n }\n\n return value.toLocaleString();\n }\n\n scaleText(repeat: boolean = true): void {\n if (!this.showText) {\n return;\n }\n const { width } = this.textEl.nativeElement.getBoundingClientRect();\n const oldScale = this.resizeScale;\n\n if (width === 0) {\n this.resizeScale = 1;\n } else {\n const availableSpace = this.textRadius;\n this.resizeScale = Math.floor((availableSpace / (width / this.resizeScale)) * 100) / 100;\n }\n\n if (this.resizeScale !== oldScale) {\n this.textTransform = `scale(${this.resizeScale}, ${this.resizeScale})`;\n this.cd.markForCheck();\n if (repeat) {\n setTimeout(() => this.scaleText(false), 50);\n }\n }\n }\n\n onClick(data): void {\n this.select.emit(data);\n }\n\n getLegendOptions(): LegendOptions {\n return {\n scaleType: ScaleType.Ordinal,\n colors: this.colors,\n domain: this.domain,\n title: this.legendTitle,\n position: this.legendPosition\n };\n }\n\n setColors(): void {\n this.colors = new ColorHelper(this.scheme, ScaleType.Ordinal, this.domain, this.customColors);\n }\n\n onActivate(item): void {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n if (idx > -1) {\n return;\n }\n\n this.activeEntries = [item, ...this.activeEntries];\n this.activate.emit({ value: item, entries: this.activeEntries });\n }\n\n onDeactivate(item): void {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n\n this.deactivate.emit({ value: item, entries: this.activeEntries });\n }\n\n isActive(entry): boolean {\n if (!this.activeEntries) return false;\n const item = this.activeEntries.find(d => {\n return entry.name === d.name && entry.series === d.series;\n });\n return item !== undefined;\n }\n\n trackBy(index: number, item: Arcs): any {\n return item.valueArc.data.name;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ChartCommonModule } from '../common/chart-common.module';\nimport { LinearGaugeComponent } from './linear-gauge.component';\nimport { GaugeComponent } from './gauge.component';\nimport { GaugeArcComponent } from './gauge-arc.component';\nimport { GaugeAxisComponent } from './gauge-axis.component';\nimport { PieChartModule } from '../pie-chart/pie-chart.module';\nimport { BarChartModule } from '../bar-chart/bar-chart.module';\n\n@NgModule({\n imports: [ChartCommonModule, PieChartModule, BarChartModule],\n declarations: [LinearGaugeComponent, GaugeComponent, GaugeArcComponent, GaugeAxisComponent],\n exports: [LinearGaugeComponent, GaugeComponent, GaugeArcComponent, GaugeAxisComponent]\n})\nexport class GaugeModule {}\n","// The export is needed here to generate a valid polyfills.metadata.json file\nexport function ngxChartsPolyfills() {\n // IE11 fix\n // Ref: https://github.com/swimlane/ngx-charts/issues/386\n if (typeof SVGElement !== 'undefined' && typeof SVGElement.prototype.contains === 'undefined') {\n SVGElement.prototype.contains = HTMLDivElement.prototype.contains;\n }\n}\n","import {\n Component,\n Input,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ContentChild,\n TemplateRef,\n Output,\n EventEmitter\n} from '@angular/core';\nimport { sankey, sankeyLeft, sankeyLinkHorizontal } from 'd3-sankey';\n\nimport { BaseChartComponent } from '../common/base-chart.component';\nimport { calculateViewDimensions } from '../common/view-dimensions.helper';\nimport { ColorHelper } from '../common/color.helper';\nimport { ViewDimensions } from '../common/types/view-dimension.interface';\nimport { ScaleType } from '../common/types/scale-type.enum';\nimport { StyleTypes } from '../common/tooltip/style.type';\nimport { escapeLabel } from '../common/label.helper';\nimport { id } from '../utils/id';\nimport { TextAnchor } from '../common/types/text-anchor.enum';\n\ninterface RectItem {\n fill: string;\n height: number;\n rx: number;\n width: number;\n x: number;\n y: number;\n label: string;\n labelAnchor: string;\n tooltip: string;\n transform: string;\n data: any;\n}\n\n@Component({\n selector: 'ngx-charts-sankey',\n template: `\n <ngx-charts-chart [view]=\"[width, height]\" [animations]=\"animations\">\n <svg:g [attr.transform]=\"transform\" class=\"sankey chart\">\n <svg:g\n *ngFor=\"let link of linkPaths\"\n class=\"link\"\n ngx-tooltip\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipType]=\"styleTypes.tooltip\"\n [tooltipPlacement]=\"'top'\"\n [tooltipTitle]=\"tooltipTemplate ? undefined : link.tooltip\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipContext]=\"link.data\"\n >\n <svg:defs>\n <svg:linearGradient\n [attr.id]=\"link.id\"\n gradientUnits=\"userSpaceOnUse\"\n [attr.x1]=\"link.source.x1\"\n [attr.x2]=\"link.target.x0\"\n >\n <svg:stop offset=\"0%\" [attr.stop-color]=\"link.startColor\"></svg:stop>\n <svg:stop offset=\"100%\" [attr.stop-color]=\"link.endColor\"></svg:stop>\n </svg:linearGradient>\n </svg:defs>\n <svg:path\n [attr.d]=\"link.path\"\n [attr.stroke]=\"link.gradientFill\"\n [attr.stroke-width]=\"link.strokeWidth\"\n stroke-opacity=\"0.5\"\n fill=\"none\"\n (click)=\"select.emit(link.data)\"\n (mouseenter)=\"activate.emit(link.data)\"\n ></svg:path>\n </svg:g>\n\n <svg:g *ngFor=\"let rect of nodeRects\" [attr.transform]=\"rect.transform\" class=\"node\">\n <svg:rect\n [attr.x]=\"0\"\n [attr.y]=\"0\"\n [attr.width]=\"rect.width\"\n [attr.height]=\"rect.height\"\n [attr.fill]=\"rect.fill\"\n ngx-tooltip\n [tooltipDisabled]=\"tooltipDisabled\"\n [tooltipType]=\"styleTypes.tooltip\"\n [tooltipPlacement]=\"'top'\"\n [tooltipTitle]=\"tooltipTemplate ? undefined : rect.tooltip\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipContext]=\"rect.data\"\n (click)=\"select.emit(rect.data)\"\n (mouseenter)=\"activate.emit(rect.data)\"\n ></svg:rect>\n </svg:g>\n\n <svg:g *ngFor=\"let rect of nodeRects\" [attr.transform]=\"rect.transform\">\n <svg:text\n *ngIf=\"showLabels && rect.height > 15\"\n class=\"label\"\n [attr.x]=\"rect.width + 5\"\n [attr.y]=\"rect.height / 2\"\n [attr.text-anchor]=\"rect.labelAnchor\"\n dy=\"0.35em\"\n [attr.dx]=\"rect.labelAnchor === 'end' ? -25 : 0\"\n >\n {{ rect.label }}\n </svg:text>\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrls: ['../common/base-chart.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class SankeyComponent extends BaseChartComponent {\n @Input() showLabels: boolean = true;\n @Input() gradient: boolean;\n @Input() tooltipDisabled: boolean = false;\n @Input() activeEntries: any[] = [];\n @Input() labelFormatting: any;\n\n @Output() activate: EventEmitter<any> = new EventEmitter();\n @Output() deactivate: EventEmitter<any> = new EventEmitter();\n\n @ContentChild('tooltipTemplate') tooltipTemplate: TemplateRef<any>;\n\n dims: ViewDimensions;\n colors: ColorHelper;\n colorScale: any;\n transform: string;\n margin: number[] = [10, 10, 10, 10];\n scaleType: ScaleType = ScaleType.Ordinal;\n valueDomain: any[];\n styleTypes = StyleTypes;\n\n nodeRects: RectItem[];\n linkPaths: any[];\n\n update(): void {\n super.update();\n\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n legendType: this.scaleType as any\n });\n\n const linkDefs = this.results;\n const nodeDefs = Array.from(new Set(linkDefs.flatMap(l => [l.source, l.target])), (name: string) => ({\n name,\n value: linkDefs.filter(l => l.source === name).reduce((acc, l) => acc + l.value, 0)\n }));\n\n // Configure generator\n const sankeyGenerator = sankey()\n .nodeId(d => d.name)\n .nodeAlign(sankeyLeft)\n .nodeWidth(15)\n .nodePadding(10)\n .extent([\n [1, 5],\n [this.dims.width - 1, this.dims.height - 5]\n ]);\n\n // Generate links and nodes\n const data = sankeyGenerator({\n nodes: nodeDefs.map(d => Object.assign({}, d)),\n links: linkDefs.map(d => Object.assign({}, d))\n });\n\n this.valueDomain = this.getValueDomain(data.nodes);\n this.setColors();\n\n this.nodeRects = data.nodes.map(node => {\n const rect: RectItem = {\n x: node.x0,\n y: node.y0,\n height: node.y1 - node.y0,\n width: node.x1 - node.x0,\n fill: this.colors.getColor(node.name),\n tooltip: this.getNodeTooltipText(node),\n rx: 5,\n data: {\n name: node.name,\n value: node.value\n },\n transform: '',\n label: this.labelFormatting ? this.labelFormatting(node.name) : node.name,\n labelAnchor: TextAnchor.Start\n };\n rect.labelAnchor = this.getTextAnchor(node);\n rect.transform = `translate(${rect.x},${rect.y})`;\n return rect;\n });\n\n this.linkPaths = data.links.map(link => {\n const gradientId = 'mask' + id().toString();\n const linkPath = {\n path: sankeyLinkHorizontal()(link),\n strokeWidth: Math.max(1, link.width),\n tooltip: this.getLinkTooltipText(link.source, link.target, link.value),\n id: gradientId,\n gradientFill: `url(#${gradientId})`,\n source: link.source,\n target: link.target,\n startColor: this.colors.getColor(link.source.name),\n endColor: this.colors.getColor(link.target.name),\n data: {\n source: link.source.name,\n target: link.target.name,\n value: link.value\n }\n };\n return linkPath;\n });\n\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n }\n\n getNodeTooltipText(node): string {\n return `\n <span class=\"tooltip-label\">${escapeLabel(node.name)}</span>\n <span class=\"tooltip-val\">${node.value.toLocaleString()}</span>\n `;\n }\n\n getLinkTooltipText(sourceNode, targetNode, value: number): string {\n return `\n <span class=\"tooltip-label\">${escapeLabel(sourceNode.name)} • ${escapeLabel(targetNode.name)}</span>\n <span class=\"tooltip-val\">${value.toLocaleString()} (${(value / sourceNode.value).toLocaleString(undefined, {\n style: 'percent',\n maximumFractionDigits: 2\n })})</span>\n `;\n }\n\n getTextAnchor(node): TextAnchor {\n if (node.layer === 0) {\n return TextAnchor.Start;\n } else {\n return TextAnchor.End;\n }\n }\n\n onClick(data): void {\n this.select.emit(data);\n }\n\n setColors(): void {\n this.colors = new ColorHelper(this.scheme, this.scaleType, this.valueDomain);\n }\n\n getValueDomain(nodes): any[] {\n return nodes.map(n => n.name);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ChartCommonModule } from '../common/chart-common.module';\nimport { SankeyComponent } from './sankey.component';\n\n@NgModule({\n imports: [ChartCommonModule],\n declarations: [SankeyComponent],\n exports: [SankeyComponent]\n})\nexport class SankeyModule {}\n","import { NgModule } from '@angular/core';\nimport { ChartCommonModule } from './common/chart-common.module';\nimport { AreaChartModule } from './area-chart/area-chart.module';\nimport { BarChartModule } from './bar-chart/bar-chart.module';\nimport { BoxChartModule } from './box-chart/box-chart.module';\nimport { BubbleChartModule } from './bubble-chart/bubble-chart.module';\nimport { HeatMapModule } from './heat-map/heat-map.module';\nimport { LineChartModule } from './line-chart/line-chart.module';\nimport { PolarChartModule } from './polar-chart/polar-chart.module';\nimport { NumberCardModule } from './number-card/number-card.module';\nimport { PieChartModule } from './pie-chart/pie-chart.module';\nimport { TreeMapModule } from './tree-map/tree-map.module';\nimport { GaugeModule } from './gauge/gauge.module';\nimport { ngxChartsPolyfills } from './polyfills';\nimport { SankeyModule } from './sankey/sankey.module';\n\n@NgModule({\n exports: [\n ChartCommonModule,\n AreaChartModule,\n BarChartModule,\n BoxChartModule,\n BubbleChartModule,\n HeatMapModule,\n SankeyModule,\n LineChartModule,\n PolarChartModule,\n NumberCardModule,\n PieChartModule,\n TreeMapModule,\n GaugeModule\n ]\n})\nexport class NgxChartsModule {\n constructor() {\n ngxChartsPolyfills();\n }\n}\n","import { timeFormat } from 'd3-time-format';\n\nexport function tickFormat(fieldType, groupByType): (label: string) => string {\n return function (label: string): string {\n if (label === 'No Value' || label === 'Other') {\n return label;\n }\n if (fieldType === 'date' && groupByType === 'groupBy') {\n const formatter = timeFormat('MM/DD/YYYY');\n return formatter(<any>label);\n }\n\n return label.toString();\n };\n}\n","/*\n * Public API Surface of ngx-charts\n */\n\nexport * from './lib/ngx-charts.module';\n\nexport * from './lib/area-chart/area-chart.module';\nexport * from './lib/area-chart/area-chart.component';\nexport * from './lib/area-chart/area-chart-normalized.component';\nexport * from './lib/area-chart/area-chart-stacked.component';\nexport * from './lib/area-chart/area-series.component';\n\nexport * from './lib/bar-chart/bar-chart.module';\nexport * from './lib/bar-chart/bar.component';\nexport * from './lib/bar-chart/bar-horizontal.component';\nexport * from './lib/bar-chart/bar-horizontal-2d.component';\nexport * from './lib/bar-chart/bar-horizontal-normalized.component';\nexport * from './lib/bar-chart/bar-horizontal-stacked.component';\nexport * from './lib/bar-chart/series-horizontal.component';\nexport * from './lib/bar-chart/bar-label.component';\nexport * from './lib/bar-chart/bar-vertical.component';\nexport * from './lib/bar-chart/bar-vertical-2d.component';\nexport * from './lib/bar-chart/bar-vertical-normalized.component';\nexport * from './lib/bar-chart/bar-vertical-stacked.component';\nexport * from './lib/bar-chart/series-vertical.component';\nexport * from './lib/bar-chart/types/bar.model';\nexport * from './lib/bar-chart/types/bar-chart-type.enum';\nexport * from './lib/bar-chart/types/d0-type.enum';\n\nexport * from './lib/box-chart/box-chart.module';\nexport * from './lib/box-chart/box.component';\nexport * from './lib/box-chart/box-chart.component';\nexport * from './lib/box-chart/box-series.component';\n\nexport * from './lib/bubble-chart/bubble-chart.module';\nexport * from './lib/bubble-chart/bubble-chart.component';\nexport * from './lib/bubble-chart/bubble-chart.utils';\nexport * from './lib/bubble-chart/bubble-series.component';\n\nexport * from './lib/common/chart-common.module';\nexport * from './lib/common/legend/legend.component';\nexport * from './lib/common/legend/scale-legend.component';\nexport * from './lib/common/legend/legend-entry.component';\nexport * from './lib/common/legend/advanced-legend.component';\n\nexport * from './lib/common/tooltip/tooltip.module';\nexport * from './lib/common/tooltip/tooltip.service';\nexport * from './lib/common/tooltip/tooltip.component';\nexport * from './lib/common/tooltip/tooltip.directive';\nexport * from './lib/common/tooltip/style.type';\nexport * from './lib/common/tooltip/show.type';\nexport * from './lib/common/tooltip/position/placement-type.enum';\n\nexport * from './lib/common/types/bar-orientation.enum';\nexport * from './lib/common/types/gradient.interface';\nexport * from './lib/common/types/legend.model';\nexport * from './lib/common/types/orientation.enum';\nexport * from './lib/common/types/scale-type.enum';\nexport * from './lib/common/types/text-anchor.enum';\nexport * from './lib/common/types/view-dimension.interface';\n\nexport * from './lib/common/axes/axes.module';\nexport * from './lib/common/axes/axis-label.component';\nexport * from './lib/common/axes/x-axis.component';\nexport * from './lib/common/axes/x-axis-ticks.component';\nexport * from './lib/common/axes/y-axis.component';\nexport * from './lib/common/axes/y-axis-ticks.component';\nexport * from './lib/common/axes/ticks.helper';\n\nexport * from './lib/common/count/count.directive';\nexport * from './lib/common/count/count.helper';\nexport * from './lib/common/timeline/timeline.component';\nexport * from './lib/common/color.helper';\nexport * from './lib/common/charts/chart.component';\n\nexport * from './lib/common/area.component';\nexport * from './lib/common/base-chart.component';\nexport * from './lib/common/circle.component';\nexport * from './lib/common/circle-series.component';\nexport * from './lib/common/grid-layout.helper';\nexport * from './lib/common/grid-panel.component';\nexport * from './lib/common/grid-panel-series.component';\nexport * from './lib/common/svg-linear-gradient.component';\nexport * from './lib/common/svg-radial-gradient.component';\nexport * from './lib/common/tooltip-area.component';\nexport * from './lib/common/tick-format.helper';\nexport * from './lib/common/trim-label.helper';\nexport * from './lib/common/view-dimensions.helper';\nexport * from './lib/common/label.helper';\nexport * from './lib/common/domain.helper';\n\nexport * from './lib/gauge/gauge.module';\nexport * from './lib/gauge/gauge-arc.component';\nexport * from './lib/gauge/gauge-axis.component';\nexport * from './lib/gauge/gauge.component';\nexport * from './lib/gauge/linear-gauge.component';\n\nexport * from './lib/heat-map/heat-map.module';\nexport * from './lib/heat-map/heat-map.component';\nexport * from './lib/heat-map/heat-map-cell.component';\nexport * from './lib/heat-map/heat-map-cell-series.component';\n\nexport * from './lib/sankey/sankey.module';\nexport * from './lib/sankey/sankey.component';\n\nexport * from './lib/line-chart/line-chart.module';\nexport * from './lib/line-chart/line-chart.component';\nexport * from './lib/line-chart/line.component';\nexport * from './lib/line-chart/line-series.component';\n\nexport * from './lib/models/chart-data.model';\n\nexport * from './lib/number-card/number-card.module';\nexport * from './lib/number-card/number-card.component';\nexport * from './lib/number-card/card.component';\nexport * from './lib/number-card/card-series.component';\n\nexport * from './lib/pie-chart/pie-chart.module';\nexport * from './lib/pie-chart/advanced-pie-chart.component';\nexport * from './lib/pie-chart/pie-chart.component';\nexport * from './lib/pie-chart/pie-arc.component';\nexport * from './lib/pie-chart/pie-grid.component';\nexport * from './lib/pie-chart/pie-grid-series.component';\nexport * from './lib/pie-chart/pie-series.component';\nexport * from './lib/pie-chart/pie-label.component';\n\nexport * from './lib/polar-chart/polar-chart.module';\nexport * from './lib/polar-chart/polar-chart.component';\nexport * from './lib/polar-chart/polar-series.component';\n\nexport * from './lib/tree-map/tree-map.module';\nexport * from './lib/tree-map/tree-map.component';\nexport * from './lib/tree-map/tree-map-cell.component';\nexport * from './lib/tree-map/tree-map-cell-series.component';\n\nexport * from './lib/utils/id';\nexport * from './lib/utils/color-sets';\nexport * from './lib/utils/sort';\nexport * from './lib/utils/throttle';\nexport * from './lib/utils/color-utils';\nexport * from './lib/utils/visibility-observer';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["observableFromEvent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;SAIgB,QAAQ,CAAC,IAAS,EAAE,IAAY,EAAE,OAAa;IAC7D,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC;IACxB,IAAI,OAAO,CAAC;IACZ,IAAI,IAAI,CAAC;IACT,IAAI,MAAM,CAAC;IACX,IAAI,OAAO,GAAG,IAAI,CAAC;IACnB,IAAI,QAAQ,GAAG,CAAC,CAAC;IAEjB,SAAS,KAAK;QACZ,QAAQ,GAAG,OAAO,CAAC,OAAO,KAAK,KAAK,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;QACvD,OAAO,GAAG,IAAI,CAAC;QACf,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;KACpC;IAED,OAAO;QACL,MAAM,GAAG,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;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