@tetacom/svg-charts 1.1.18 → 1.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chart/model/chart-bounds.d.ts +5 -5
- package/chart/service/chart.service.d.ts +1 -1
- package/esm2020/chart/chart-container/chart-container.component.mjs +29 -23
- package/esm2020/chart/directives/zoomable.directive.mjs +8 -9
- package/esm2020/chart/model/chart-bounds.mjs +7 -7
- package/esm2020/chart/service/chart.service.mjs +25 -7
- package/esm2020/chart/service/scale.service.mjs +12 -8
- package/fesm2015/tetacom-svg-charts.mjs +82 -53
- package/fesm2015/tetacom-svg-charts.mjs.map +1 -1
- package/fesm2020/tetacom-svg-charts.mjs +75 -48
- package/fesm2020/tetacom-svg-charts.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tetacom-svg-charts.mjs","sources":["../../src/chart/model/enum/zoom-type.ts","../../src/chart/model/chart-bounds.ts","../../src/chart/model/enum/tooltip-tracking.ts","../../src/chart/model/enum/zoom-behavior-type.ts","../../src/chart/default/default-chart-config.ts","../../src/chart/model/enum/scale-type.ts","../../src/chart/default/default-axis-config.ts","../../src/chart/model/enum/series-type.ts","../../src/chart/model/enum/fill-type.ts","../../src/chart/default/default-series-config.ts","../../src/chart/service/chart.service.ts","../../src/chart/service/zoom.service.ts","../../src/chart/model/enum/axis-orientation.ts","../../src/chart/core/utils/get-text-width.ts","../../src/chart/core/utils/generate-ticks.ts","../../src/chart/core/axis/builders/axis-size-builder.ts","../../src/chart/core/axis/builders/extremes-builder.ts","../../src/chart/core/axis/axis.ts","../../src/chart/service/scale.service.ts","../../src/chart/model/enum/brush-type.ts","../../src/chart/model/i-broadcast-message.ts","../../src/chart/service/broadcast.service.ts","../../src/chart/service/brush.service.ts","../../src/chart/chart-container/tooltip/tooltip.component.ts","../../src/chart/chart-container/tooltip/tooltip.component.html","../../src/chart/chart-container/y-axis/y-axis.component.ts","../../src/chart/chart-container/y-axis/y-axis.component.html","../../src/chart/chart-container/x-axis/x-axis.component.ts","../../src/chart/chart-container/x-axis/x-axis.component.html","../../src/chart/chart-container/gridlines/gridlines.component.ts","../../src/chart/chart-container/gridlines/gridlines.component.html","../../src/chart/chart-container/plotband/plot-band.component.ts","../../src/chart/chart-container/plotband/plot-band.component.html","../../src/chart/chart-container/plotline/plotline.component.ts","../../src/chart/chart-container/plotline/plotline.component.html","../../src/chart/base/series-base.component.ts","../../src/chart/model/enum/drag-point-type.ts","../../src/chart/chart-container/series/linear-series-base.ts","../../src/chart/chart-container/series/line/line-series.component.ts","../../src/chart/chart-container/series/line/line-series.component.html","../../src/chart/chart-container/series/bar/bar-series.component.ts","../../src/chart/chart-container/series/bar/bar-series.component.html","../../src/chart/chart-container/series/scatter-series/scatter-series.component.ts","../../src/chart/chart-container/series/scatter-series/scatter-series.component.html","../../src/chart/chart-container/series/block-series/block-series.component.ts","../../src/chart/chart-container/series/block-series/block-series.component.html","../../src/chart/chart-container/series/block-area-series/block-area-series.component.ts","../../src/chart/chart-container/series/block-area-series/block-area-series.component.html","../../src/chart/chart-container/series/area-series/area-series.component.ts","../../src/chart/chart-container/series/area-series/area-series.component.html","../../src/chart/default/defaultSeriesTypeMapping.ts","../../src/chart/chart-container/series-host/series-host.component.ts","../../src/chart/chart-container/annotation/annotation.component.ts","../../src/chart/chart-container/annotation/annotation.component.html","../../src/chart/directives/zoomable.directive.ts","../../src/chart/directives/brushable.directive.ts","../../src/chart/chart-container/chart-container.component.ts","../../src/chart/chart-container/chart-container.component.html","../../src/chart/legend/legend.component.ts","../../src/chart/legend/legend.component.html","../../src/chart/chart/chart.component.ts","../../src/chart/chart/chart.component.html","../../src/chart/chart.module.ts","../../src/chart/model/plot-band.ts","../../src/chart/model/plot-line.ts","../../src/public-api.ts","../../src/tetacom-svg-charts.ts"],"sourcesContent":["export enum ZoomType {\n x,\n y,\n xy,\n}\n","export class ChartBounds {\n top = 30;\n right = 30;\n bottom = 0;\n left = 0;\n\n constructor(options?: {\n top?: number;\n right?: number;\n bottom?: number;\n left: number;\n }) {\n this.top = options?.top || this.top;\n this.right = options?.right || this.right;\n this.bottom = options?.bottom || this.bottom;\n this.left = options?.left || this.left;\n }\n}\n","export enum TooltipTracking {\n x,\n y,\n}\n","export enum ZoomBehaviorType {\n move,\n wheel\n}\n","import {IChartConfig} from '../model/i-chart-config';\nimport {ZoomType} from '../model/enum/zoom-type';\nimport {ChartBounds} from '../model/chart-bounds';\nimport {TooltipTracking} from '../model/enum/tooltip-tracking';\nimport {ZoomBehaviorType} from \"../model/enum/zoom-behavior-type\";\n\nexport const defaultChartConfig = (): IChartConfig => ({\n zoom: {\n enable: true,\n type: ZoomType.x,\n zoomBehavior: ZoomBehaviorType.move\n },\n bounds: new ChartBounds(),\n legend: {\n enable: true,\n },\n tooltip: {\n enable: true,\n showMarkers: true,\n tracking: TooltipTracking.x,\n padding: {\n x: 16,\n y: 16\n }\n },\n xAxis: [],\n yAxis: [],\n series: [],\n gridLines: {\n enable: true\n }\n});\n","export enum ScaleType {\n linear,\n log,\n pow,\n sqrt,\n time,\n category,\n}\n","import { AxisOptions } from '../model/axis-options';\nimport { ScaleType } from '../model/enum/scale-type';\n\nexport const defaultAxisConfig: AxisOptions = {\n visible: true,\n zoom: true,\n scaleType: {\n type: ScaleType.linear,\n },\n niceTicks: true,\n};\n","export enum SeriesType {\n line,\n bar,\n area,\n scatter,\n block,\n blockArea\n}\n","export enum FillType {\n default,\n gradient,\n}\nexport enum FillDirection {\n x,\n y,\n}\n","import { Series } from '../model/series';\nimport { BasePoint } from '../model/base-point';\nimport { SeriesType } from '../model/enum/series-type';\nimport { FillType } from '../model/enum/fill-type';\n\nexport const defaultSeriesConfig = (): Series<BasePoint> => ({\n data: [],\n type: SeriesType.line,\n xAxisIndex: 0,\n yAxisIndex: 0,\n fillType: FillType.default,\n color: 'coral',\n});\n","import {Injectable} from '@angular/core';\nimport {IChartConfig} from '../model/i-chart-config';\nimport {\n BehaviorSubject,\n filter,\n map,\n Observable, of,\n shareReplay,\n Subject, withLatestFrom,\n} from 'rxjs';\nimport {IChartEvent} from '../model/i-chart-event';\nimport {IDisplayTooltip} from '../model/i-display-tooltip';\nimport {PlotBand} from '../model/plot-band';\nimport {PlotLine} from '../model/plot-line';\nimport {IPointMove} from '../model/i-point-move';\nimport {defaultChartConfig} from '../default/default-chart-config';\nimport {defaultAxisConfig} from '../default/default-axis-config';\nimport {defaultSeriesConfig} from '../default/default-series-config';\nimport {BasePoint} from '../model/base-point';\nimport {Series} from '../model/series';\nimport {Annotation} from \"../model/annotation\";\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ChartService {\n public id: Observable<string>;\n public config: Observable<IChartConfig>;\n public size: Observable<DOMRect>;\n public pointerMove: Observable<PointerEvent>;\n public tooltips: Observable<Map<Series<BasePoint>, IDisplayTooltip>>;\n public plotBandEvent: Observable<IChartEvent<PlotBand>>;\n public plotLineMove: Observable<IChartEvent<PlotLine>>;\n public plotBandClick: Observable<IChartEvent<PlotBand>>;\n public plotBandContextMenu: Observable<IChartEvent<PlotBand>>;\n public pointMove: Observable<IChartEvent<IPointMove>>;\n public annotationMove: Observable<IChartEvent<Annotation>>;\n public annotationClick: Observable<IChartEvent<Annotation>>;\n public annotationContextMenu: Observable<IChartEvent<Annotation>>;\n public chartClick: Observable<IChartEvent<BasePoint>>;\n public chartContextMenu: Observable<IChartEvent<BasePoint>>;\n private config$ = new BehaviorSubject<IChartConfig>(defaultChartConfig());\n private size$ = new BehaviorSubject<DOMRect>(new DOMRectReadOnly());\n private pointerMove$ = new Subject<PointerEvent>();\n private tooltips$ = new BehaviorSubject<Map<Series<BasePoint>, IDisplayTooltip>>(new Map());\n private plotBandEvent$ = new Subject<IChartEvent<PlotBand>>();\n private plotLineMove$ = new Subject<IChartEvent<PlotLine>>();\n private pointMove$ = new Subject<IChartEvent<IPointMove>>();\n private chartClick$ = new Subject<IChartEvent<BasePoint>>();\n private chartContextMenu$ = new Subject<IChartEvent<BasePoint>>();\n private annotationEvent$ = new Subject<IChartEvent<Annotation>>();\n private annotationMove$ = new Subject<IChartEvent<Annotation>>();\n\n constructor() {\n\n this.id = of((Date.now() + Math.random()).toString(36))\n\n this.config = this.config$\n .asObservable()\n .pipe(\n withLatestFrom(this.id),\n map(this.setDefaults),\n map(this.setPreparationData),\n shareReplay({\n bufferSize: 1,\n refCount: true\n })\n );\n\n this.size = this.size$.asObservable();\n\n this.pointerMove = this.pointerMove$.asObservable();\n this.tooltips = this.tooltips$.asObservable();\n this.plotBandEvent = this.plotBandEvent$.asObservable();\n this.plotLineMove = this.plotLineMove$.asObservable();\n this.pointMove = this.pointMove$.asObservable();\n this.chartClick = this.chartClick$.asObservable();\n this.chartContextMenu = this.chartContextMenu$.asObservable();\n this.annotationClick = this.annotationEvent$.asObservable().pipe(filter((_) => _?.event?.type === 'click'));\n this.annotationContextMenu = this.annotationEvent$.asObservable().pipe(filter((_) => _?.event?.type === 'contextmenu'));\n this.annotationMove = this.annotationMove$.asObservable();\n\n this.plotBandClick = this.plotBandEvent$\n .asObservable()\n .pipe(filter((_) => _?.event?.type === 'click'));\n this.plotBandContextMenu = this.plotBandEvent$\n .asObservable()\n .pipe(filter((_) => _?.event?.type === 'contextmenu'));\n }\n\n public setConfig(config: IChartConfig) {\n this.clearTooltips();\n this.config$.next(config);\n }\n\n public setSize(size: DOMRect) {\n this.size$.next(size);\n }\n\n public setPointerMove(event: PointerEvent) {\n this.pointerMove$.next(event);\n }\n\n public setTooltip(tooltip: IDisplayTooltip) {\n const currentTooltips = this.tooltips$.value;\n if (!tooltip.point) {\n currentTooltips.delete(tooltip.series);\n } else {\n currentTooltips.set(tooltip.series, tooltip);\n }\n this.tooltips$.next(new Map<Series<BasePoint>, IDisplayTooltip>(currentTooltips));\n }\n\n public clearTooltips() {\n this.tooltips$.next(new Map());\n }\n\n\n public emitMoveAnnotation(event: IChartEvent<Annotation>) {\n this.annotationMove$.next(event);\n }\n\n public emitAnnotation(event: IChartEvent<Annotation>) {\n this.annotationEvent$.next(event);\n }\n\n public emitPlotband(event: IChartEvent<PlotBand>) {\n this.plotBandEvent$.next(event);\n }\n\n public emitPlotline(event: IChartEvent<PlotLine>) {\n this.plotLineMove$.next(event);\n }\n\n public emitPoint(event: IChartEvent<IPointMove>) {\n this.pointMove$.next(event);\n }\n\n public emitChartClick(event: IChartEvent<BasePoint>) {\n this.chartClick$.next(event);\n }\n\n public emitChartContextMenu(event: IChartEvent<BasePoint>) {\n this.chartContextMenu$.next(event);\n }\n\n private setDefaults(data: [IChartConfig, string]): IChartConfig {\n\n let [config, id] = data;\n\n const defaultConfig = (defaultConfig) => {\n return (source) => {\n return Object.assign({}, defaultConfig, source);\n };\n };\n\n config = Object.assign({}, defaultChartConfig(), config);\n config.id = id;\n\n config.xAxis = config.xAxis.map(defaultConfig(defaultAxisConfig));\n config.yAxis = config.yAxis.map(defaultConfig(defaultAxisConfig));\n config.series = config.series.map(defaultConfig(defaultSeriesConfig()));\n\n config.series = config.series.map((_, index) => {\n return {\n ..._,\n id: _.id ?? index,\n };\n });\n\n config.tooltip = Object.assign(\n {},\n defaultChartConfig().tooltip,\n config.tooltip\n );\n\n config.zoom.syncChannel = config.zoom?.syncChannel ?? id;\n\n return config;\n }\n\n private setPreparationData(config: IChartConfig): IChartConfig {\n if (config.inverted) {\n const xAxes = [...config.xAxis];\n const yAxes = [...config.yAxis];\n\n config.xAxis = yAxes;\n config.yAxis = xAxes;\n\n config.series = config.series?.map((serie) => {\n const x = serie.xAxisIndex;\n const y = serie.yAxisIndex;\n serie.xAxisIndex = y;\n serie.yAxisIndex = x;\n return {\n ...serie,\n data: serie?.data?.map((point) => {\n return {\n ...point,\n x: point?.y,\n y: point?.x,\n x1: point?.y1,\n y1: point?.x1,\n };\n }),\n };\n });\n }\n\n if (config?.brush?.enable) {\n config.yAxis = config.yAxis.map((_) => ({..._, zoom: false}));\n config.xAxis = config.xAxis.map((_) => ({..._, zoom: false}));\n }\n\n return config;\n }\n}\n","import {Injectable} from '@angular/core';\nimport {\n BehaviorSubject,\n Observable,\n shareReplay,\n Subscription,\n} from 'rxjs';\nimport {Axis} from '../core/axis/axis';\nimport {IChartEvent} from '../model/i-chart-event';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ZoomService {\n broadcastSubscription: Subscription[] = [];\n\n zoomed: Observable<IChartEvent<Axis>>;\n private zoomed$ = new BehaviorSubject<IChartEvent<Axis>>(null);\n\n constructor() {\n this.zoomed = this.zoomed$.asObservable().pipe(shareReplay({\n bufferSize: 1,\n refCount: true\n }));\n }\n\n setZoom(zoom: IChartEvent<Axis>) {\n this.zoomed$.next(zoom);\n }\n}\n","export enum AxisOrientation {\n x,\n y\n}\n","export const getTextWidth = (\n inputText?: string | number | null,\n backupRatio = 0.5,\n fontSize = 11\n): number => {\n let text = inputText ?? '';\n text = text.toString();\n\n return fontSize * backupRatio * text.length;\n};\n","import * as d3 from 'd3';\n\nexport function generateTicks(extremes: number[]) {\n const [min, max] = extremes;\n\n const tickCount = 10;\n const tickStep = (max - min) / tickCount;\n\n const ticks = d3\n .range(min, max + tickStep, tickStep)\n .filter((step) => step <= max);\n\n return ticks;\n}\n","import { Axis } from '../axis';\nimport { AxisOrientation } from '../../../model/enum/axis-orientation';\nimport { maxIndex } from 'd3-array';\nimport { getTextWidth } from '../../utils/public-api';\nimport { IBuilder } from '../../../model/i-builder';\n\nexport class AxisSizeBuilder implements IBuilder<Axis, number> {\n private titlePadding = 8;\n private basePadding = 16;\n private backupRatio = 0.58;\n\n build(settings: Axis): number {\n let finalPadding = this.basePadding;\n\n if (settings.orientation === AxisOrientation.y) {\n const formatter = settings.defaultFormatter();\n\n finalPadding += settings.options.title ? this.titlePadding : 0;\n\n const maxElementLengthIndex = maxIndex(\n settings.tickValues,\n (_) => formatter(_).length\n );\n\n finalPadding += getTextWidth(\n formatter(settings.tickValues[maxElementLengthIndex]),\n this.backupRatio\n );\n }\n\n if (settings.orientation === AxisOrientation.x) {\n finalPadding += finalPadding + 20;\n }\n\n return finalPadding;\n }\n}\n","import {IBuilder} from '../../../model/i-builder';\nimport {Axis} from '../axis';\nimport {BasePoint} from '../../../model/base-point';\nimport {AxisOrientation} from '../../../model/enum/axis-orientation';\n\nimport * as d3 from 'd3';\n\nexport class ExtremesBuilder implements IBuilder<Axis, [number, number]> {\n private extentAccessorMap = new Map<AxisOrientation,\n (point: BasePoint) => number>()\n .set(AxisOrientation.x, (_) => _.x)\n .set(AxisOrientation.y, (_) => _.y);\n\n private extremes: [number, number] = [0, 0];\n\n build(settings: Axis): [number, number] {\n const options = settings.options;\n\n const hasMin = options?.min != null;\n const hasMax = options?.max != null;\n\n if (!hasMin || !hasMax) {\n const linkedSeries = settings.linkedSeries();\n const data = linkedSeries.reduce((acc: BasePoint[], current) => {\n return acc.concat(current.data);\n }, []);\n const accessor = this.extentAccessorMap.get(settings.orientation);\n this.extremes = data.length > 1 ? d3.extent(data, accessor) : [0, 0];\n }\n\n if (hasMin) {\n this.extremes[0] = options?.min;\n }\n\n if (hasMax) {\n this.extremes[1] = options?.max;\n }\n return this.extremes;\n }\n}\n","import { IChartConfig } from '../../model/i-chart-config';\nimport { AxisOrientation } from '../../model/enum/axis-orientation';\nimport { Series } from '../../model/series';\nimport { BasePoint } from '../../model/base-point';\nimport * as d3 from 'd3';\nimport { AxisOptions } from '../../model/axis-options';\nimport { AxisSizeBuilder, ExtremesBuilder } from './builders/public-api';\nimport { generateTicks } from '../utils/public-api';\nimport { ScaleType } from '../../model/enum/scale-type';\n\nexport class Axis {\n private chartConfig: IChartConfig;\n private _orientation: AxisOrientation;\n private _index: number;\n private _extremes: [number, number] = [0, 0];\n private _selfSize: number;\n private _ticksValues: number[];\n private _options: AxisOptions;\n private _isFake: boolean;\n\n private defaultFormatters = new Map<ScaleType, any>()\n .set(ScaleType.linear, d3.format(',.2f'))\n .set(ScaleType.time, d3.timeFormat('%B %d, %Y'))\n .set(ScaleType.log, d3.format(',.2f'))\n .set(ScaleType.pow, d3.format(',.2f'))\n .set(ScaleType.sqrt, d3.format(',.2f'));\n\n constructor(config: IChartConfig) {\n this.chartConfig = config;\n }\n\n /**\n * Factory for creating x,y axes\n * @param {AxisOrientation} orientation\n * Axis type\n * @param {IChartConfig} config\n * Chart config\n * @param {number} index\n * Index axis\n * @param {boolean} isFake\n * @return {Axis}\n * New generated axis\n */\n public static createAxis(\n orientation: AxisOrientation,\n config: IChartConfig,\n index: number,\n isFake = false\n ): Axis {\n const axis = new Axis(config);\n axis.setLocate(orientation);\n axis.setIndex(index);\n\n axis.setOptions();\n axis.setExtremes();\n axis.setTicksValues();\n axis.setSelfSize();\n\n axis._isFake = isFake;\n\n return axis;\n }\n\n /**\n *\n * @param {orientation} orientation\n * Set locate axis x or y\n */\n private setLocate(orientation: AxisOrientation): void {\n this._orientation = orientation;\n }\n\n /**\n *\n * @param {number} index\n * Index axis\n */\n private setIndex(index: number): void {\n this._index = index;\n }\n\n /**\n * @return {Array<Series<BasePoint>>}\n * Linked series\n */\n public linkedSeries(): Array<Series<BasePoint>> {\n const linkedFilter = (serie: Series<BasePoint>) =>\n serie[\n this._orientation === AxisOrientation.y ? 'yAxisIndex' : 'xAxisIndex'\n ] === this._index;\n\n return this.chartConfig?.series.filter(linkedFilter);\n }\n\n private setExtremes(): void {\n const builder = new ExtremesBuilder();\n this._extremes = builder.build(this);\n }\n\n private setSelfSize(): void {\n this._selfSize = new AxisSizeBuilder().build(this);\n }\n\n private setTicksValues(): void {\n this._ticksValues = generateTicks(this._extremes);\n }\n\n private setOptions(): void {\n const options =\n this.orientation === AxisOrientation.x\n ? this.chartConfig.xAxis[this.index]\n : this.chartConfig.yAxis[this.index];\n\n this._options = options;\n }\n\n get extremes(): Array<number> {\n return this._extremes;\n }\n\n get orientation(): AxisOrientation {\n return this._orientation;\n }\n\n get selfSize(): number {\n return this._selfSize;\n }\n\n get tickValues(): number[] {\n return this._ticksValues;\n }\n\n get index(): number {\n return this._index;\n }\n\n get options(): AxisOptions {\n return this._options;\n }\n\n get isFake(): boolean {\n return this._isFake;\n }\n\n public defaultFormatter() {\n return this.defaultFormatters.get(this.options.scaleType.type);\n }\n}\n","import {Injectable} from '@angular/core';\nimport * as d3 from 'd3';\nimport {D3ZoomEvent, ZoomTransform} from 'd3';\nimport {Axis} from '../core/axis/axis';\nimport {AxisOrientation} from '../model/enum/axis-orientation';\nimport {IChartConfig} from '../model/i-chart-config';\nimport {ChartService} from './chart.service';\nimport {\n combineLatest,\n map,\n Observable,\n shareReplay,\n withLatestFrom,\n} from 'rxjs';\nimport {IChartEvent} from '../model/i-chart-event';\nimport {ZoomService} from './zoom.service';\nimport {ScaleType} from '../model/enum/scale-type';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ScaleService {\n public yAxisMap: Observable<Map<number, Axis>>;\n public xAxisMap: Observable<Map<number, Axis>>;\n\n public yScaleMap: Observable<Map<number, any>>;\n public xScaleMap: Observable<Map<number, any>>;\n\n private transformCacheX = new Map<number, ZoomTransform>();\n private transformCacheY = new Map<number, ZoomTransform>();\n\n private scaleMapping = new Map<ScaleType, any>()\n .set(ScaleType.linear, d3.scaleLinear)\n .set(ScaleType.time, d3.scaleTime)\n .set(ScaleType.category, d3.scaleOrdinal)\n .set(ScaleType.log, d3.scaleLog)\n .set(ScaleType.pow, d3.scalePow)\n .set(ScaleType.sqrt, d3.scaleSqrt);\n\n constructor(\n private chartService: ChartService,\n private zoomService: ZoomService\n ) {\n this.xAxisMap = combineLatest([\n this.chartService.size,\n this.chartService.config,\n ]).pipe(\n map((data: [DOMRectReadOnly, IChartConfig]) => {\n const [, config] = data;\n const map = new Map<number, Axis>();\n config.xAxis.map((_, index) => {\n map.set(index, Axis.createAxis(AxisOrientation.x, config, index));\n });\n return map;\n }),\n shareReplay({\n bufferSize: 1,\n refCount: true\n })\n );\n\n this.yAxisMap = combineLatest([\n this.chartService.size,\n this.chartService.config,\n ]).pipe(\n map((data: [DOMRectReadOnly, IChartConfig]) => {\n const [, config] = data;\n const map = new Map<number, Axis>();\n config.yAxis.map((_, index) => {\n map.set(index, Axis.createAxis(AxisOrientation.y, config, index));\n });\n\n return map;\n }),\n shareReplay({\n bufferSize: 1,\n refCount: true\n })\n );\n\n this.xScaleMap = combineLatest([\n this.chartService.size,\n this.chartService.config,\n this.zoomService.zoomed,\n ]).pipe(\n withLatestFrom(this.yAxisMap, this.xAxisMap),\n map(\n (\n data: [\n [DOMRectReadOnly, IChartConfig, IChartEvent<Axis>],\n Map<number, Axis>,\n Map<number, Axis>\n ]\n ) => {\n const [[size, config, zoom], yAxes, xAxes] = data;\n\n const map = new Map<number, any>();\n\n const left = [...yAxes.values()]\n .filter((_) => _.options?.visible && _.options?.opposite)\n .reduce((acc, cur) => acc + cur.selfSize, 0);\n\n const right = [...yAxes.values()]\n .filter((_) => _.options?.visible && _.options?.opposite !== true)\n .reduce((acc, cur) => acc + cur.selfSize, 0);\n\n const finalWidth = (size.width || 0) - left - right;\n\n xAxes.forEach((axis) => {\n let domain = axis.extremes;\n\n if (axis?.options.inverted) {\n domain = [...axis.extremes].reverse();\n }\n\n let scale = this.scaleMapping\n .get(axis.options.scaleType.type)()\n .domain(domain)\n .range([0, finalWidth]);\n\n if (axis.options.niceTicks) {\n scale.nice();\n }\n\n if (axis.options.scaleType.type === ScaleType.log) {\n scale.base(axis.options.scaleType.base);\n }\n\n map.set(axis.index, scale);\n\n const hasCache = this.transformCacheX.has(axis.index);\n const shouldRestore =\n zoom?.target?.orientation !== AxisOrientation.x ||\n zoom.target?.index !== axis.index;\n\n if (hasCache && shouldRestore) {\n const restoredTransform = this.transformCacheX.get(axis.index);\n map.set(axis.index, restoredTransform.rescaleX(scale));\n }\n });\n\n if (zoom) {\n const event = zoom.event as D3ZoomEvent<any, any>;\n\n if (zoom.target?.orientation === AxisOrientation.x) {\n const currentScale = map.get(zoom.target.index);\n const rescaled = event.transform.rescaleX(currentScale);\n map.set(zoom.target.index, rescaled);\n\n const axis = xAxes.get(zoom.target.index);\n this.transformCacheX.set(axis.index, event.transform);\n }\n }\n return map;\n }\n ),\n shareReplay({\n bufferSize: 1,\n refCount: true\n })\n );\n\n this.yScaleMap = combineLatest([\n this.chartService.size,\n this.chartService.config,\n this.zoomService.zoomed,\n ]).pipe(\n withLatestFrom(this.yAxisMap, this.xAxisMap),\n map(\n (\n data: [\n [DOMRectReadOnly, IChartConfig, IChartEvent<Axis>],\n Map<number, Axis>,\n Map<number, Axis>\n ]\n ) => {\n const [[size, config, zoom], yAxes, xAxes] = data;\n\n const map = new Map<number, any>();\n\n const top = [...xAxes.values()]\n .filter((_) => _.options?.visible && _.options?.opposite)\n .reduce((acc, cur) => acc + cur.selfSize, 0);\n\n const bottom = [...xAxes.values()]\n .filter((_) => _.options?.visible && _.options?.opposite !== true)\n .reduce((acc, cur) => acc + cur.selfSize, 0);\n\n const finalHeight = (size.height || 0) - top - bottom;\n\n yAxes.forEach((axis) => {\n let domain = axis.extremes;\n\n if (axis.orientation === AxisOrientation.y) {\n domain = [...axis.extremes].reverse();\n }\n\n if (axis?.options.inverted) {\n domain = domain.reverse();\n }\n\n const scale = this.scaleMapping\n .get(axis.options.scaleType.type)()\n .domain(domain)\n .range([0, finalHeight]);\n\n if (axis.options.niceTicks) {\n scale.nice();\n }\n\n if (axis.options.scaleType.type === ScaleType.log) {\n scale.base(axis.options.scaleType.base);\n }\n\n map.set(axis.index, scale);\n\n const hasCache = this.transformCacheY.has(axis.index);\n\n const shouldRestore =\n zoom?.target?.orientation !== AxisOrientation.y ||\n zoom.target?.index !== axis.index;\n\n if (hasCache && shouldRestore) {\n const restoredTransform = this.transformCacheY.get(axis.index);\n map.set(axis.index, restoredTransform.rescaleY(scale));\n }\n });\n\n if (zoom) {\n const event = zoom.event as D3ZoomEvent<any, any>;\n\n if (zoom.target?.orientation === AxisOrientation.y) {\n const currentScale = map.get(zoom.target.index);\n const rescaled = event.transform.rescaleY(currentScale);\n map.set(zoom.target.index, rescaled);\n\n const axis = yAxes.get(zoom.target.index);\n this.transformCacheY.set(axis.index, event.transform);\n }\n }\n\n return map;\n }\n ),\n shareReplay({\n bufferSize: 1,\n refCount: true\n })\n );\n }\n}\n","export enum BrushType {\n x,\n y,\n xy,\n}\n","import {D3BrushEvent, D3ZoomEvent} from 'd3';\nimport {Axis} from '../core/axis/axis';\nimport {BrushType} from './enum/brush-type';\n\nexport class ZoomMessage {\n event: D3ZoomEvent<any, any> | any;\n axis?: Axis;\n brushDomain?: number[];\n chartId: string;\n\n constructor(options?: {\n event: D3ZoomEvent<any, any> | any;\n axis?: Axis;\n brushDomain?: number[]\n chartId: string;\n }) {\n this.event = options?.event;\n this.axis = options?.axis;\n this.brushDomain = options.brushDomain;\n this.chartId = options?.chartId;\n }\n}\n\nexport class BrushMessage {\n event: D3BrushEvent<any>;\n brushType: BrushType;\n selection: number[];\n brushScale?: any;\n\n\n constructor(options?: {\n event: D3BrushEvent<any>;\n brushType: BrushType;\n selection: number[];\n brushScale?: any;\n }) {\n this.event = options?.event;\n this.brushType = options?.brushType;\n this.selection = options?.selection;\n this.brushScale = options?.brushScale;\n }\n}\n\nexport interface IBroadcastMessage<T> {\n channel: string;\n message: T;\n}\n","import { Injectable } from '@angular/core';\nimport {BrushMessage, IBroadcastMessage, ZoomMessage} from '../model/i-broadcast-message';\nimport {filter, map, Observable, ReplaySubject, shareReplay, Subject} from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class BroadcastService {\n private zoomEmitter: Subject<IBroadcastMessage<ZoomMessage>>;\n private brushEmitter: ReplaySubject<IBroadcastMessage<BrushMessage>>;\n\n constructor() {\n this.zoomEmitter = new Subject<IBroadcastMessage<ZoomMessage>>();\n this.brushEmitter = new ReplaySubject<IBroadcastMessage<BrushMessage>>(1)\n }\n\n broadcastZoom(value: IBroadcastMessage<ZoomMessage>) {\n this.zoomEmitter.next(value);\n }\n\n broadcastBrush(value: IBroadcastMessage<BrushMessage>) {\n this.brushEmitter.next(value);\n }\n\n subscribeToZoom(channel: string): Observable<IBroadcastMessage<ZoomMessage>> {\n return this.zoomEmitter.asObservable().pipe(\n filter((msg) => channel && msg.channel === channel),\n shareReplay({\n bufferSize: 1,\n refCount: true\n })\n );\n }\n\n subscribeToBrush(channel: string): Observable<IBroadcastMessage<BrushMessage>> {\n return this.brushEmitter.asObservable().pipe(\n filter((msg) => channel && msg.channel === channel),\n shareReplay({\n bufferSize: 1,\n refCount: true\n })\n );\n }\n}\n","import {ElementRef, Injectable, NgZone} from '@angular/core';\nimport {BrushType} from '../model/enum/brush-type';\nimport * as d3 from 'd3';\nimport {animationFrameScheduler, filter, Subscription, tap} from 'rxjs';\nimport {BroadcastService} from './broadcast.service';\nimport {IChartConfig} from '../model/i-chart-config';\nimport {BrushMessage, IBroadcastMessage, ZoomMessage} from '../model/i-broadcast-message';\nimport {throttleTime} from 'rxjs/operators';\nimport {AxisOrientation} from \"../model/enum/axis-orientation\";\n\n@Injectable({\n providedIn: 'root',\n})\nexport class BrushService {\n broadcastSubscribtion: Subscription;\n\n private brush: d3.BrushBehavior<any>;\n\n private brushMap = new Map<BrushType, d3.BrushBehavior<any>>()\n .set(BrushType.x, d3.brushX())\n .set(BrushType.y, d3.brushY());\n\n private selection: number[];\n\n\n constructor(private broadcastService: BroadcastService, private zone: NgZone) {\n }\n\n applyBrush(\n svgElement: ElementRef,\n config: IChartConfig,\n brushScale: any\n ) {\n this.broadcastSubscribtion?.unsubscribe();\n this.brush?.on('start brush end', null);\n if (config.brush?.enable) {\n this.brush = this.brushMap.get(config?.brush?.type ?? BrushType.x);\n\n const container = d3.select(svgElement.nativeElement);\n\n this.brush.on('start brush end', (_: d3.D3BrushEvent<any>) => {\n if (_.sourceEvent) {\n if (!_.selection) return;\n\n const [from, to] = _.selection as number[];\n\n if (to - from === 0) {\n const selection: number[] = this.selection?.map(brushScale) ?? [config.brush?.from, config.brush?.to].map(brushScale);\n const halfBrushHeight = (selection[1] - selection[0]) / 2;\n\n const invertedSelection: number[] = [from - halfBrushHeight, to + halfBrushHeight].map(brushScale.invert)\n\n if(invertedSelection[1] - invertedSelection[0] > config.brush?.max) {\n container.call(this.brush.move, [Math.floor(invertedSelection[0]), Math.floor(invertedSelection[0] + config.brush?.max)].map(brushScale));\n return;\n }\n\n if(invertedSelection[1] - invertedSelection[0] < config.brush?.min) {\n container.call(this.brush.move, [Math.floor(invertedSelection[0]), Math.ceil(invertedSelection[0] + config.brush?.min)].map(brushScale));\n return;\n }\n\n container.call(this.brush.move, [from - halfBrushHeight, to + halfBrushHeight]);\n return;\n }\n\n\n\n if (brushScale.invert(to) - brushScale.invert(from) > config.brush?.max) {\n container.call(this.brush.move, this.selection ? [this.selection[0], this.selection[0] + config.brush?.max].map(brushScale) : [config.brush?.from, config.brush?.to].map(brushScale));\n return;\n }\n\n if (brushScale.invert(to) - brushScale.invert(from) < config.brush?.min) {\n\n container.call(this.brush.move, this.selection ? [this.selection[0], this.selection[0] + config.brush?.min].map(brushScale) : [config.brush?.from, config.brush?.to].map(brushScale));\n return;\n }\n\n if (_.sourceEvent instanceof MouseEvent) {\n this.selection = _.selection.map(brushScale.invert);\n }\n\n const brushMessage = new BrushMessage({\n event: _,\n selection: [brushScale.invert(from), brushScale.invert(to)],\n brushType: config?.brush?.type ?? BrushType.x,\n brushScale\n });\n\n this.broadcastService.broadcastBrush({\n channel: config?.zoom?.syncChannel,\n message: brushMessage,\n });\n }\n });\n\n\n\n this.zone.runOutsideAngular(() => {\n setTimeout(() => {\n container.call(this.brush);\n\n let domain = brushScale.domain();\n\n\n if (config?.brush?.from) {\n domain[0] = config.brush.from;\n }\n\n if (config?.brush?.to) {\n domain[1] = config.brush.to;\n }\n\n container.call(this.brush.move, this.selection ? this.selection.map(brushScale) : domain.map(brushScale), {});\n\n }, 0);\n })\n\n\n\n this.broadcastSubscribtion = this.broadcastService.subscribeToZoom(config?.zoom?.syncChannel).pipe(\n filter((m: IBroadcastMessage<ZoomMessage>) => {\n return m.message.event.sourceEvent instanceof MouseEvent || m.message.event.sourceEvent instanceof WheelEvent;\n }),\n throttleTime(0, animationFrameScheduler, {trailing: true}),\n tap((m: IBroadcastMessage<ZoomMessage>) => {\n const {message: {brushDomain}} = m;\n\n if(m.message?.axis.index === 0 && m.message?.axis.orientation === AxisOrientation.y && config.brush?.type === BrushType.y || m.message?.axis.orientation === AxisOrientation.x && config.brush?.type === BrushType.x) {\n\n container.call(this.brush.move, [\n brushScale(brushDomain[0]),\n brushScale(brushDomain[1]),\n ]);\n\n if (m.message.event.type === 'end') {\n const brushMessage = new BrushMessage({\n event: null,\n selection: brushDomain,\n brushType: config?.brush?.type ?? BrushType.x,\n brushScale,\n });\n\n this.broadcastService.broadcastBrush({\n channel: config?.zoom?.syncChannel,\n message: brushMessage,\n });\n }\n\n this.selection = brushDomain;\n\n\n\n }\n\n\n\n })\n ).subscribe();\n }\n }\n\n clearPreviousSelection() {\n this.selection = null;\n }\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Input,\n NgZone,\n OnInit,\n} from '@angular/core';\nimport {filter, map, Observable, tap} from 'rxjs';\nimport {ChartService} from '../../service/chart.service';\nimport {ZoomService} from '../../service/zoom.service';\nimport {IDisplayTooltip} from '../../model/i-display-tooltip';\nimport {DomSanitizer, SafeHtml} from '@angular/platform-browser';\nimport {IChartConfig} from '../../model/i-chart-config';\nimport {Series} from '../../model/series';\n\n@Component({\n selector: 'teta-tooltip',\n templateUrl: './tooltip.component.html',\n styleUrls: ['./tooltip.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TooltipComponent implements OnInit {\n @Input() size: DOMRect;\n @Input() config: IChartConfig;\n\n position: Observable<{\n left: string;\n top: string;\n bottom: string;\n right: string;\n }>;\n\n displayTooltips: Observable<SafeHtml>;\n display: Observable<number>;\n\n constructor(\n private svc: ChartService,\n private cdr: ChangeDetectorRef,\n private zoomService: ZoomService,\n private sanitizer: DomSanitizer,\n private _zone: NgZone\n ) {\n }\n\n ngOnInit(): void {\n this.display = this.svc.pointerMove.pipe(\n map((event: PointerEvent) => {\n return event.type === 'mousemove' ? 1 : 0;\n }),\n tap(() => {\n setTimeout(() => {\n this.cdr.detectChanges();\n });\n })\n );\n\n this.position = this.svc.pointerMove.pipe(\n filter((event) => !!event),\n map((_) => {\n return this.getPosition(_);\n }),\n tap(() => this.cdr.detectChanges())\n );\n\n const transformHtml = (html): SafeHtml => {\n return this.sanitizer.bypassSecurityTrustHtml(html);\n };\n\n const defaultFormatter = (tooltips: IDisplayTooltip[]): SafeHtml => {\n let html = '';\n\n tooltips.forEach((_) => {\n const indicatorStyle = `display:block; width: 10px; height: 2px; background-color: ${_?.series?.color}`;\n\n html += `<div class=\"display-flex align-center\"><span class=\"margin-right-1\" style=\"${indicatorStyle}\"></span>\n <span class=\"font-title-3\">${_.series.name}\n <span class=\"font-body-3\">x: ${_.point.x?.toFixed(\n 2\n )} y: ${_.point.y?.toFixed(2)}</span></span></div>`;\n });\n\n return transformHtml(html);\n };\n\n const formatter = this.config?.tooltip?.format;\n\n this.displayTooltips = this.svc.tooltips.pipe(\n map((tooltips: Map<Series<any>, IDisplayTooltip>) => {\n const tooltipList = [...tooltips.values()];\n if (tooltipList?.length < 1) {\n return '';\n }\n const formatted = formatter\n ? transformHtml(formatter(tooltipList))\n : defaultFormatter(tooltipList);\n return formatted;\n })\n );\n }\n\n private getPosition(event: PointerEvent) {\n const centerX = this.size.width / 2;\n const centerY = this.size.height / 2;\n\n const padding = this.config?.tooltip?.padding;\n\n const scene = {\n left: event.pageX > centerX ? 'initial' : `${event.pageX + padding.x}px`,\n top: event.pageY > centerY ? 'initial' : `${event.pageY + padding.y}px`,\n bottom:\n event.pageY > centerY\n ? `${window.innerHeight - event.pageY + padding.y}px`\n : 'initial',\n right:\n event.pageX > centerX\n ? `${window.innerWidth - event.pageX + padding.x}px`\n : 'initial',\n };\n\n return scene;\n }\n}\n","<ng-container *ngIf=\"position | async as p\">\n <div class=\"chart-tooltip color-text-90 bg-background-50 shadow-2 padding-2 border-radius-1\"\n *ngIf=\"displayTooltips | async as tool\"\n [style.position]=\"'fixed'\"\n [style.opacity]=\"display | async\"\n style=\"pointer-events: none; min-width: 200px;\"\n [style.left]=\"p.left\"\n [style.top]=\"p.top\"\n [style.bottom]=\"p.bottom\"\n [style.right]=\"p.right\"\n [innerHTML]=\"tool\">\n </div>\n</ng-container>\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n ViewChild,\n} from '@angular/core';\nimport { Axis } from '../../core/axis/axis';\nimport * as d3 from 'd3';\n\n@Component({\n selector: '[teta-y-axis]',\n templateUrl: './y-axis.component.html',\n styleUrls: ['./y-axis.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class YAxisComponent implements OnInit, AfterViewInit {\n @Input() axis: Axis;\n @Input() set scale(scale: any) {\n this._scale = scale;\n this.draw();\n }\n\n get scale() {\n return this._scale;\n }\n @Input() size: DOMRect;\n @ViewChild('svg', { static: false }) node: ElementRef;\n\n private _alive = true;\n private _scale: any;\n\n constructor() {}\n\n ngOnInit(): void {}\n\n ngOnDestroy(): void {\n this._alive = false;\n }\n\n ngAfterViewInit() {\n this.draw();\n }\n\n getLabelTransform() {\n return `translate(${\n this.axis.options.opposite\n ? this.axis.selfSize - 24\n : -this.axis.selfSize + 24\n }, ${this.size.height / 2}) rotate(${\n this.axis.options.opposite ? '90' : '-90'\n })`;\n }\n\n private draw() {\n if (!this.node || !this.axis) {\n return;\n }\n\n const axis = this.axis.options.opposite\n ? d3\n .axisRight(this.scale)\n .tickFormat(\n this.axis.options.tickFormat ?? this.axis.defaultFormatter()\n )\n : d3\n .axisLeft(this.scale)\n .tickFormat(\n this.axis.options.tickFormat ?? this.axis.defaultFormatter()\n );\n\n d3.select(this.node.nativeElement)\n .call(axis)\n .call((_) => _.select('.domain').remove());\n }\n}\n","<svg:g #svg></svg:g>\n<svg:g class=\"label-axis font-caption\" [attr.transform]=\"getLabelTransform()\">\n <text dy=\"-8px\" text-anchor=\"middle\" dominant-baseline=\"middle\">{{ axis.options.title }}</text>\n</svg:g>\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n SimpleChanges,\n ViewChild,\n} from '@angular/core';\nimport { Axis } from '../../core/axis/axis';\nimport { ScaleService } from '../../service/scale.service';\nimport { ChartService } from '../../service/chart.service';\nimport * as d3 from 'd3';\nimport { ZoomService } from '../../service/zoom.service';\nimport { merge, takeWhile, tap } from 'rxjs';\n\n@Component({\n selector: '[teta-x-axis]',\n templateUrl: './x-axis.component.html',\n styleUrls: ['./x-axis.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class XAxisComponent implements OnInit, OnDestroy, AfterViewInit {\n @Input() axis: Axis;\n @Input() set scale(scale: any) {\n this._scale = scale;\n\n this.draw();\n }\n\n get scale() {\n return this._scale;\n }\n\n @Input() size: DOMRect;\n @ViewChild('svg') node: ElementRef;\n\n private _scale: any;\n private _alive = true;\n\n constructor() {}\n\n ngOnInit(): void {}\n\n ngOnDestroy(): void {\n this._alive = false;\n }\n\n ngAfterViewInit() {\n this.draw();\n }\n\n private draw() {\n if (!this.node || !this.axis) {\n return;\n }\n\n const axis = this.axis.options.opposite\n ? d3\n .axisTop(this.scale)\n .tickFormat(\n this.axis.options.tickFormat ?? this.axis.defaultFormatter()\n )\n : d3\n .axisBottom(this.scale)\n .tickFormat(\n this.axis.options.tickFormat ?? this.axis.defaultFormatter()\n );\n\n d3.select(this.node.nativeElement)\n .call(axis)\n .call((_) => _.select('.domain').remove());\n }\n}\n","<svg:g #svg></svg:g>\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component, Input,\n} from '@angular/core';\n\nimport {ScaleService} from \"../../service/scale.service\";\nimport {map, Observable} from \"rxjs\";\nimport {IChartConfig} from \"../../model/i-chart-config\";\nimport {ChartService} from \"../../service/chart.service\";\n\n@Component({\n selector: '[teta-gridlines]',\n templateUrl: './gridlines.component.html',\n styleUrls: ['./gridlines.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GridlinesComponent implements AfterViewInit {\n\n @Input() size: DOMRect;\n\n config: Observable<IChartConfig>;\n tickYValues: Observable<number[]>;\n tickXValues: Observable<number[]>;\n x: Observable<any>;\n y: Observable<any>;\n\n constructor(private svc: ScaleService, private chartService: ChartService) {\n this.config = this.chartService.config;\n\n this.tickYValues = this.svc.yScaleMap.pipe(map((_) => _.get(0).ticks()));\n this.tickXValues = this.svc.xScaleMap.pipe(map((_) => _.get(0).ticks()));\n\n this.y = this.svc.yScaleMap.pipe(map((_) => _.get(0)));\n this.x = this.svc.xScaleMap.pipe(map((_) => _.get(0)));\n\n\n }\n\n ngAfterViewInit() {\n\n }\n}\n","<ng-container *ngIf=\"{\n xValues: tickXValues | async,\n yValues: tickYValues | async,\n x: x | async,\n y: y | async,\n config: config | async\n} as data\">\n <ng-container *ngIf=\"data.config.gridLines?.showY !== false\">\n <ng-container *ngFor=\"let tick of data.yValues\">\n <svg:line [attr.x1]=\"0\"\n [attr.y1]=\"data.y(tick)\"\n [attr.x2]=\"size?.width\"\n [attr.y2]=\"data.y(tick)\"></svg:line>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"data.config.gridLines?.showX !== false\">\n <ng-container *ngFor=\"let tick of data.xValues\">\n <svg:line [attr.x1]=\"data.x(tick)\"\n [attr.y1]=\"0\"\n [attr.x2]=\"data.x(tick)\"\n [attr.y2]=\"size?.height\"></svg:line>\n </ng-container>\n </ng-container>\n\n</ng-container>\n\n\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostListener,\n Input, OnDestroy\n} from '@angular/core';\n\nimport * as d3 from 'd3';\nimport {PlotBand} from '../../model/plot-band';\nimport {ScaleService} from '../../service/scale.service';\n\nimport {Axis} from '../../core/axis/axis';\nimport {ZoomService} from '../../service/zoom.service';\nimport {AxisOrientation} from '../../model/enum/axis-orientation';\nimport {IChartEvent} from '../../model/i-chart-event';\nimport {ChartService} from '../../service/chart.service';\n\n@Component({\n selector: '[teta-plot-band]',\n templateUrl: './plot-band.component.html',\n styleUrls: ['./plot-band.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PlotBandComponent implements AfterViewInit, OnDestroy {\n @Input() plotBand: PlotBand;\n @Input() axis: Axis;\n @Input() scale: any;\n @Input() size: DOMRect;\n orientation = AxisOrientation;\n resizeElements: any;\n dragElements: any;\n domain: number[];\n\n constructor(\n private scaleService: ScaleService,\n private zoomService: ZoomService,\n private chartService: ChartService,\n private cdr: ChangeDetectorRef,\n private element: ElementRef\n ) {\n }\n\n @HostListener('click', ['$event']) click(event: MouseEvent) {\n this.emit({\n target: this.plotBand,\n event,\n });\n }\n\n @HostListener('contextmenu', ['$event']) contextMenu(event: MouseEvent) {\n this.emit({\n target: this.plotBand,\n event,\n });\n }\n\n emit(event: IChartEvent<PlotBand>) {\n this.chartService.emitPlotband(event);\n }\n\n ngAfterViewInit(): void {\n this.domain = this.scale.domain();\n\n const plotbandElement = d3\n .select(this.element.nativeElement)\n .select('.plotband');\n\n const grabElements = d3\n .select(this.element.nativeElement)\n .selectAll('.grabber');\n\n this.dragElements = d3\n .drag()\n .subject(() => {\n if (this.axis.orientation === AxisOrientation.x) {\n return {x: plotbandElement.attr('x')};\n }\n\n if (this.axis.orientation === AxisOrientation.y) {\n return {y: plotbandElement.attr('y')};\n }\n });\n\n const drag = this.dragElements\n .on(\n 'start drag end',\n (event: d3.D3DragEvent<any, PlotBand, any>, d: PlotBand) => {\n let bandSize = parseFloat(\n plotbandElement.attr(\n this.axis.orientation === AxisOrientation.x ? 'width' : 'height'\n )\n );\n\n d.from = this.scale.invert(\n event[AxisOrientation[this.axis.orientation]]\n );\n\n d.to = this.scale.invert(\n event[AxisOrientation[this.axis.orientation]] + bandSize\n );\n\n this.emit({\n event,\n target: d,\n });\n\n this.cdr.detectChanges();\n }\n );\n\n let grabberKey;\n this.resizeElements = d3\n .drag();\n const resize = this.resizeElements\n .on(\n 'start drag end',\n (event: d3.D3DragEvent<any, PlotBand, any>, d: PlotBand) => {\n requestAnimationFrame(() => {\n if (event?.type === 'start') {\n const {grabber} = event?.sourceEvent?.target?.dataset;\n grabberKey = grabber;\n }\n\n const min = Math.min(...this.domain);\n const max = Math.max(...this.domain);\n\n const minValue = d.min ?? min;\n const maxValue = d.max ?? max;\n\n d[grabberKey] = this.scale.invert(\n event[AxisOrientation[this.axis.orientation]]\n );\n\n if (grabberKey === 'from') {\n const borderMin = d.from <= minValue;\n\n if (d.from >= d.to) {\n d.from = d.to;\n }\n\n if (borderMin) {\n d.from = minValue;\n }\n }\n\n if (grabberKey === 'to') {\n const borderMax = d.to >= maxValue;\n\n if (borderMax) {\n d.to = maxValue;\n }\n\n if (d.to <= d.from) {\n d.to = d.from;\n }\n }\n\n this.emit({\n event,\n target: d,\n });\n\n this.cdr.detectChanges();\n });\n }\n );\n\n plotbandElement.datum<PlotBand>(this.plotBand);\n grabElements.datum<PlotBand>(this.plotBand);\n\n if (this.plotBand.draggable) {\n plotbandElement.call(drag);\n }\n\n if (this.plotBand.resizable) {\n grabElements.call(resize);\n }\n }\n\n ngOnDestroy() {\n this.dragElements.on('start drag end', null);\n this.resizeElements.on('start drag end', null);\n }\n\n get bandSize(): number {\n return Math.abs(\n this.scale(this.plotBand.to) - this.scale(this.plotBand.from)\n );\n }\n\n get height(): number {\n return this.size.height;\n }\n\n get width(): number {\n return this.size.width;\n }\n\n get from(): number {\n return this.scale(this.plotBand.from);\n }\n\n get to(): number {\n return this.scale(this.plotBand.to);\n }\n\n getTextCenter = () => this.scale((this.plotBand.from + this.plotBand.to) / 2);\n\n getFill(d: PlotBand): string {\n if (d.style?.plotBand?.patternImage) {\n return `url(#${d.style.plotBand?.patternImage})`;\n }\n return d.style.plotBand?.fill;\n }\n}\n","<svg:rect\n class=\"plotband\" xmlns:svg=\"http://www.w3.org/1999/html\"\n [class.draggable]=\"plotBand?.draggable === true\"\n [attr.fill]=\"getFill(plotBand)\"\n [attr.opacity]=\"plotBand.style?.plotBand?.opacity\"\n [attr.height]=\"axis.orientation === orientation.x ? height : bandSize\"\n [attr.width]=\"axis.orientation === orientation.x ? bandSize : width\"\n [attr.y]=\"axis.orientation === orientation.y ? from : null\"\n [attr.x]=\"axis.orientation === orientation.x ? from : null\">\n</svg:rect>\n\n<svg:text\n *ngIf=\"axis.orientation === orientation.x\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n class=\"label font-title-2 fill-text-70\"\n [attr.x]=\"getTextCenter()\"\n [attr.transform]=\"'rotate(-90, '+ getTextCenter() +',' + height / 2 + ')'\"\n [attr.y]=\"height / 2\">{{plotBand.label}}\n</svg:text>\n\n<svg:text\n *ngIf=\"axis.orientation === orientation.y\"\n text-anchor=\"middle\"\n class=\"label font-title-2 fill-text-70\"\n dominant-baseline=\"central\"\n [attr.x]=\"getTextCenter()\"\n [attr.y]=\"width / 2\">{{plotBand.label}}\n</svg:text>\n\n<svg:line class=\"display-grabber\"\n *ngIf=\"plotBand.showGrabbers\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'red'\"\n [attr.stroke-width]=\"plotBand.style?.grabbers?.strokeWidth || 4\"\n [attr.stroke-dasharray]=\"plotBand.style?.grabbers?.strokeDasharray\"\n [attr.x1]=\"axis.orientation === orientation.x ? from : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? from : width\"\n [attr.data-grabber]=\"'from'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : from\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : from\">\n</svg:line>\n\n<svg:line class=\"display-grabber\"\n *ngIf=\"plotBand.showGrabbers\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'red'\"\n [attr.stroke-width]=\"plotBand.style?.grabbers?.strokeWidth || 4\"\n [attr.stroke-dasharray]=\"plotBand.style?.grabbers?.strokeDasharray\"\n [attr.x1]=\"axis.orientation === orientation.x ? to : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? to : width\"\n [attr.data-grabber]=\"'to'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : to\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : to\">\n</svg:line>\n\n<svg:line class=\"grabber\"\n [class.x-grabber]=\"axis.orientation === orientation.x\"\n [class.y-grabber]=\"axis.orientation === orientation.y\"\n [class.resizeable]=\"plotBand?.resizable\"\n [attr.stroke]=\"'red'\"\n [attr.stroke-width]=\"8\"\n opacity=\"0\"\n [attr.x1]=\"axis.orientation === orientation.x ? from : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? from : width\"\n [attr.data-grabber]=\"'from'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : from\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : from\">\n</svg:line>\n\n<svg:line class=\"grabber\"\n [class.x-grabber]=\"axis.orientation === orientation.x\"\n [class.y-grabber]=\"axis.orientation === orientation.y\"\n [class.resizeable]=\"plotBand?.resizable\"\n [attr.stroke]=\"'red'\"\n [attr.stroke-width]=\"8\"\n opacity=\"0\"\n [attr.x1]=\"axis.orientation === orientation.x ? to : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? to : width\"\n [attr.data-grabber]=\"'to'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : to\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : to\">\n</svg:line>\n\n\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Input, OnDestroy,\n OnInit,\n} from '@angular/core';\nimport {PlotLine} from '../../model/plot-line';\nimport {Axis} from '../../core/axis/axis';\nimport {AxisOrientation} from '../../model/enum/axis-orientation';\nimport {ZoomService} from '../../service/zoom.service';\nimport {ScaleService} from '../../service/scale.service';\nimport * as d3 from 'd3';\nimport {IChartEvent} from '../../model/i-chart-event';\nimport {ChartService} from '../../service/chart.service';\n\n@Component({\n selector: '[teta-plot-line]',\n templateUrl: './plotline.component.html',\n styleUrls: ['./plotline.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PlotlineComponent implements OnInit, OnDestroy {\n @Input() plotLine: PlotLine;\n @Input() size: DOMRect;\n @Input() axis: Axis;\n @Input() scale: any;\n orientation = AxisOrientation;\n dragElements: any;\n\n private _domain: number[];\n\n constructor(\n private cdr: ChangeDetectorRef,\n private zoomService: ZoomService,\n private scaleService: ScaleService,\n private chartService: ChartService,\n private element: ElementRef\n ) {\n }\n\n ngOnInit(): void {\n this._domain = this.scale.domain();\n\n const plotlineElement = d3\n .select(this.element.nativeElement)\n .select('.plotline');\n\n const grabElement = d3\n .select(this.element.nativeElement)\n .selectAll('.grabber');\n\n this.dragElements = d3\n .drag()\n .subject(() => {\n if (this.axis.orientation === AxisOrientation.y) {\n return {y: plotlineElement.attr('y1')};\n }\n if (this.axis.orientation === AxisOrientation.x) {\n return {x: plotlineElement.attr('x1')};\n }\n });\n const drag = this.dragElements\n .on(\n 'start drag end',\n (event: d3.D3DragEvent<any, PlotLine, any>, d: PlotLine) => {\n d.value = this.scale.invert(\n event[AxisOrientation[this.axis.orientation]]\n );\n\n this.emit({\n event,\n target: d,\n });\n\n this.cdr.detectChanges();\n }\n );\n\n plotlineElement.datum<PlotLine>(this.plotLine);\n grabElement.datum<PlotLine>(this.plotLine);\n\n if (this.plotLine.draggable) {\n grabElement.call(drag);\n }\n }\n\n ngOnDestroy() {\n this.dragElements.on('start drag end', null);\n }\n\n emit(event: IChartEvent<PlotLine>) {\n this.chartService.emitPlotline(event);\n }\n\n get value() {\n return this.scale(this.plotLine.value);\n }\n\n get height(): number {\n return this.size.height;\n }\n\n get width(): number {\n return this.size.width;\n }\n}\n","<svg:line class=\"plotline\"\n [attr.stroke]=\"plotLine.style?.stroke || 'red'\"\n [attr.stroke-width]=\"plotLine.style?.strokeWidth || 4\"\n [attr.stroke-dasharray]=\"plotLine.style?.strokeDasharray\"\n [attr.x1]=\"axis.orientation === orientation.x ? value : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? value : width\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : value\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : value\">\n</svg:line>\n\n\n<svg:text\n *ngIf=\"axis.orientation === orientation.x\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n class=\"label font-title-2 fill-text-70\"\n [attr.x]=\"value\"\n dy=\"2em\"\n [attr.transform]=\"'rotate(-90, '+ value +',' + height / 2 + ')'\"\n [attr.y]=\"height / 2\">{{plotLine.label}}\n</svg:text>\n\n<svg:text\n *ngIf=\"axis.orientation === orientation.y\"\n text-anchor=\"middle\"\n class=\"label font-title-2 fill-text-70\"\n dominant-baseline=\"central\"\n [attr.x]=\"value\"\n [attr.y]=\"width / 2\">{{plotLine.label}}\n</svg:text>\n\n<svg:line class=\"grabber\"\n\n [class.x-grabber]=\"axis.orientation === orientation.x\"\n [class.y-grabber]=\"axis.orientation === orientation.y\"\n [attr.stroke]=\"'red'\"\n [attr.stroke-width]=\"8\"\n opacity=\"0\"\n [attr.x1]=\"axis.orientation === orientation.x ? value : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? value : width\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : value\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : value\">\n</svg:line>\n","import {\n ChangeDetectorRef,\n Component,\n ElementRef,\n Input,\n OnInit,\n} from '@angular/core';\nimport {ChartService} from '../service/chart.service';\nimport {Series} from '../model/series';\nimport {BasePoint} from '../model/base-point';\nimport {ScaleService} from '../service/scale.service';\nimport {ZoomService} from '../service/zoom.service';\nimport {IChartConfig} from '../model/i-chart-config';\n\n@Component({\n template: '',\n})\nexport class SeriesBaseComponent<T extends BasePoint> implements OnInit {\n @Input()\n set config(config: IChartConfig) {\n this._config = config;\n }\n\n get config() {\n return this._config;\n }\n\n @Input()\n set series(series: Series<T>) {\n this._series = series;\n }\n\n get series() {\n return this._series;\n }\n\n protected _series: Series<T>;\n protected _config: IChartConfig;\n\n constructor(\n protected svc: ChartService,\n protected cdr: ChangeDetectorRef,\n protected scaleService: ScaleService,\n protected zoomService: ZoomService,\n protected element: ElementRef\n ) {\n }\n\n ngOnInit(): void {\n }\n}\n","export enum DragPointType {\n x,\n y,\n xy,\n}\n","import {BasePoint} from '../../model/base-point';\nimport {SeriesBaseComponent} from '../../base/series-base.component';\nimport {AfterViewInit, ChangeDetectorRef, Component, ElementRef, OnDestroy, OnInit} from '@angular/core';\nimport {combineLatest, map, Observable, tap, withLatestFrom} from 'rxjs';\nimport {ChartService} from '../../service/chart.service';\nimport {ScaleService} from '../../service/scale.service';\nimport {ZoomService} from '../../service/zoom.service';\nimport * as d3 from 'd3';\nimport {DragPointType} from '../../model/enum/drag-point-type';\nimport {TooltipTracking} from '../../model/enum/tooltip-tracking';\n\n@Component({\n template: '',\n})\nexport class LinearSeriesBase<T extends BasePoint>\n extends SeriesBaseComponent<T>\n implements OnInit, AfterViewInit, OnDestroy {\n transform: Observable<Pick<BasePoint, 'x' | 'y'>>;\n display: Observable<number>;\n path: Observable<string>;\n svgElement: SVGGeometryElement;\n x: any;\n y: any;\n markers: any;\n\n constructor(\n protected override svc: ChartService,\n protected override cdr: ChangeDetectorRef,\n protected override scaleService: ScaleService,\n protected override zoomService: ZoomService,\n protected override element: ElementRef\n ) {\n super(svc, cdr, scaleService, zoomService, element);\n }\n\n override ngOnInit(): void {\n this.transform = this.svc.pointerMove.pipe(\n withLatestFrom(this.scaleService.xScaleMap, this.scaleService.yScaleMap),\n map((data: [PointerEvent, Map<number, any>, Map<number, any>]) => {\n const [event, x, y] = data;\n\n return this.getTransform(event, x, y);\n }),\n tap(() => setTimeout(() => this.cdr.detectChanges()))\n );\n\n this.path = combineLatest([\n this.scaleService.xScaleMap,\n this.scaleService.yScaleMap,\n ]).pipe(\n map((data: [Map<number, any>, Map<number, any>]) => {\n const [x, y] = data;\n this.x = x.get(this.series.xAxisIndex);\n this.y = y.get(this.series.yAxisIndex);\n\n const line = d3\n .line<BasePoint>()\n .defined(\n (point) =>\n point.x !== null &&\n point.y !== null &&\n point.x !== undefined &&\n point.y !== undefined &&\n !isNaN(point.x) &&\n !isNaN(point.y)\n )\n .x((point) => this.x(point.x))\n .y((point) => this.y(point.y));\n return line(this.series.data);\n })\n );\n }\n\n ngOnDestroy() {\n this.markers?.on('start drag end', null);\n this.svc.setTooltip({\n point: null,\n series: this.series,\n });\n }\n\n ngAfterViewInit() {\n const drag = (node, event: d3.D3DragEvent<any, any, any>, d: BasePoint) => {\n if (\n d.marker?.dragType === DragPointType.x ||\n d.marker?.dragType === DragPointType.xy\n ) {\n d.x = this.x.invert(event.x);\n }\n\n if (\n d.marker?.dragType === DragPointType.y ||\n d.marker?.dragType === DragPointType.xy\n ) {\n d.y = this.y.invert(event.y);\n }\n\n this.svc.emitPoint({\n target: {\n series: this.series,\n point: d,\n },\n event,\n });\n\n this.cdr.detectChanges();\n };\n this.markers = d3\n .drag()\n .subject(function (event, d: BasePoint) {\n const node = d3.select(this);\n return {x: node.attr('cx'), y: node.attr('cy')};\n });\n const dragMarkers =\n this.markers.on(\n 'start drag end',\n function (event: d3.D3DragEvent<any, any, any>, d: BasePoint) {\n const node = d3.select(this);\n\n drag(node, event, d);\n }\n );\n\n const draggableMarkers = this.series.data?.filter(\n (_) => _?.marker && _?.marker?.draggable\n );\n\n const element = d3\n .select(this.element.nativeElement)\n .selectAll('.draggable-marker')\n .data(draggableMarkers);\n\n element.call(dragMarkers as any);\n\n this.svgElement = d3\n .select(this.element.nativeElement)\n .select('.line')\n .node() as SVGGeometryElement;\n }\n\n getMarkers() {\n return this.series.data?.filter((_) => _?.marker);\n }\n\n getTransform(\n event: any,\n scaleX: Map<number, any>,\n scaleY: Map<number, any>\n ): Pick<BasePoint, 'x' | 'y'> {\n if (event.type === 'mouseleave') {\n return null;\n }\n const mouse = [event?.offsetX, event?.offsetY];\n const foundX = scaleX.get(this.series.xAxisIndex);\n const foundY = scaleY.get(this.series.yAxisIndex);\n const tooltipTracking = this.config?.tooltip?.tracking;\n const lineIntersection = (\n p0_x,\n p0_y,\n p1_x,\n p1_y,\n p2_x,\n p2_y,\n p3_x,\n p3_y\n ) => {\n const rV = {} as any;\n let s1_x, s1_y, s2_x, s2_y;\n s1_x = p1_x - p0_x;\n s1_y = p1_y - p0_y;\n s2_x = p3_x - p2_x;\n s2_y = p3_y - p2_y;\n\n let s, t;\n s =\n (-s1_y * (p0_x - p2_x) + s1_x * (p0_y - p2_y)) /\n (-s2_x * s1_y + s1_x * s2_y);\n t =\n (s2_x * (p0_y - p2_y) - s2_y * (p0_x - p2_x)) /\n (-s2_x * s1_y + s1_x * s2_y);\n\n if (s >= 0 && s <= 1 && t >= 0 && t <= 1) {\n // Collision detected\n rV.x = p0_x + t * s1_x;\n rV.y = p0_y + t * s1_y;\n }\n\n return rV;\n };\n\n if (tooltipTracking === TooltipTracking.x) {\n const bisect = d3.bisector((_: BasePoint) => _.x).right;\n const pointer = mouse[0];\n\n let x0 = foundX.invert(pointer);\n if (x0 instanceof Date) {\n x0 = x0.getTime();\n }\n const rightId = bisect(this.series.data, x0);\n const range = foundY.range();\n\n const intersect = lineIntersection(\n pointer,\n range[0],\n pointer,\n range[1],\n foundX(this.series.data[rightId - 1]?.x),\n foundY(this.series.data[rightId - 1]?.y),\n foundX(this.series.data[rightId]?.x),\n foundY(this.series.data[rightId]?.y)\n );\n const x = foundX.invert(intersect.x);\n const y = foundY.invert(intersect.y);\n if (x !== null && x !== undefined && !isNaN(x) && y !== null && y !== undefined && !isNaN(y)) {\n this.svc.setTooltip({\n point: {x: foundX.invert(intersect.x), y: foundY.invert(intersect.y)},\n series: this.series,\n });\n } else {\n this.svc.setTooltip({\n point: null,\n series: this.series,\n });\n }\n\n return {\n x: intersect.x,\n y: intersect.y,\n };\n }\n\n if (tooltipTracking === TooltipTracking.y) {\n const bisect = d3.bisector((_: BasePoint) => _.y).right;\n\n let y0 = foundY.invert(mouse[1]);\n if (y0 instanceof Date) {\n y0 = y0.getTime();\n }\n const rightId = bisect(this.series.data, y0);\n const range = foundX.range();\n\n const intersect = lineIntersection(\n range[0],\n mouse[1],\n range[1],\n mouse[1],\n foundX(this.series.data[rightId - 1]?.x),\n foundY(this.series.data[rightId - 1]?.y),\n foundX(this.series.data[rightId]?.x),\n foundY(this.series.data[rightId]?.y)\n );\n\n const x = foundX.invert(intersect.x);\n const y = foundY.invert(intersect.y);\n\n if (x !== null && x !== undefined && !isNaN(x) && y !== null && y !== undefined && !isNaN(y)) {\n this.svc.setTooltip({\n point: {x: foundX.invert(intersect.x), y: foundY.invert(intersect.y)},\n series: this.series,\n });\n } else {\n this.svc.setTooltip({\n point: null,\n series: this.series,\n });\n }\n\n return {\n x: intersect.x,\n y: intersect.y,\n };\n }\n }\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef, OnDestroy,\n OnInit,\n} from '@angular/core';\nimport {ChartService} from '../../../service/chart.service';\nimport {BasePoint} from '../../../model/base-point';\nimport {ScaleService} from '../../../service/scale.service';\nimport {ZoomService} from '../../../service/zoom.service';\nimport {LinearSeriesBase} from '../linear-series-base';\n\n@Component({\n selector: 'svg:svg[teta-line-series]',\n templateUrl: './line-series.component.html',\n styleUrls: ['./line-series.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LineSeriesComponent<T extends BasePoint>\n extends LinearSeriesBase<T>\n implements OnInit, AfterViewInit, OnDestroy {\n\n constructor(\n protected override svc: ChartService,\n protected override cdr: ChangeDetectorRef,\n protected override scaleService: ScaleService,\n protected override zoomService: ZoomService,\n protected override element: ElementRef\n ) {\n super(svc, cdr, scaleService, zoomService, element);\n }\n}\n","<svg:path\n class=\"line\"\n [attr.d]=\"path | async\"\n [attr.stroke]=\"series.color\"\n [attr.stroke-dasharray]=\"series.style?.strokeDasharray\"\n [attr.stroke-width]=\"series.style?.strokeWidth\"\n fill=\"none\">\n</svg:path>\n<ng-container *tuiLet=\"transform | async as t\">\n <svg:circle\n *ngIf=\"t?.x !=null && t?.y!=null\"\n r=\"3\"\n [attr.fill]=\"series.color\"\n [attr.transform]=\"'translate('+ t.x +', '+ t.y +')'\"\n >\n </svg:circle>\n</ng-container>\n<ng-container *ngIf=\"getMarkers() as markers\">\n <svg:circle\n class=\"marker\"\n *ngFor=\"let point of markers\"\n [class.draggable-marker]=\"point?.marker?.draggable\"\n [attr.r]=\"point.marker.style?.radius ?? 5\"\n [attr.fill]=\"point.marker.style?.fill ?? 'transparent'\"\n [attr.stroke]=\"point.marker.style?.stroke ?? 'none'\"\n [attr.stroke-width]=\"point.marker.style?.strokeWidth\"\n [attr.stroke-dasharray]=\"point.marker.style?.strokeDasharray\"\n [attr.cx]=\"x(point.x)\"\n [attr.cy]=\"y(point.y)\"\n >\n </svg:circle>\n</ng-container>\n\n\n\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n OnChanges,\n OnInit,\n SimpleChanges,\n} from '@angular/core';\nimport { SeriesBaseComponent } from '../../../base/series-base.component';\nimport { BasePoint } from '../../../model/base-point';\nimport { ChartService } from '../../../service/chart.service';\nimport { ScaleService } from '../../../service/scale.service';\nimport { ZoomService } from '../../../service/zoom.service';\nimport { map, Observable } from 'rxjs';\nimport { SeriesType } from '../../../model/enum/series-type';\nimport * as d3 from 'd3';\n\n@Component({\n selector: 'svg:svg[teta-bar-series]',\n templateUrl: './bar-series.component.html',\n styleUrls: ['./bar-series.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BarSeriesComponent<T extends BasePoint>\n extends SeriesBaseComponent<T>\n implements OnInit, OnChanges\n{\n x: Observable<any>;\n x1: Observable<any>;\n y: Observable<any>;\n\n barSeriesCount: Observable<number>;\n\n Math: any = Math;\n\n constructor(\n protected override svc: ChartService,\n protected override cdr: ChangeDetectorRef,\n protected override scaleService: ScaleService,\n protected override zoomService: ZoomService,\n protected override element: ElementRef\n ) {\n super(svc, cdr, scaleService, zoomService, element);\n }\n\n override ngOnInit(): void {\n this.barSeriesCount = this.svc.config.pipe(\n map((_) => {\n const count = _.series.filter(\n (_) =>\n _.type === SeriesType.bar && _.xAxisIndex === this.series.xAxisIndex\n );\n\n return count.length;\n })\n );\n\n this.x1 = this.scaleService.xScaleMap.pipe(\n map((_) => {\n const x = _.get(this.series.xAxisIndex);\n const range = x.range();\n const domain = this.series.data.map((_) => _.x);\n\n return d3\n .scaleBand<number>()\n .range([0, range[1]])\n .domain(domain)\n .padding(0.1);\n })\n );\n\n this.x = this.scaleService.xScaleMap.pipe(\n map((_) => _.get(this.series.xAxisIndex))\n );\n\n this.y = this.scaleService.yScaleMap.pipe(\n map((_) => _.get(this.series.yAxisIndex))\n );\n }\n\n mouseenter(point: BasePoint) {\n this.svc.setTooltip({\n point: point,\n series: this.series,\n });\n }\n\n mouseleave(point: BasePoint) {\n this.svc.setTooltip({\n point: null,\n series: this.series,\n });\n }\n\n ngOnChanges(changes: SimpleChanges) {}\n}\n","<ng-container *ngIf=\"{\n x: x | async,\n x1: x1 | async,\n y: y | async,\n barSeriesCount: barSeriesCount | async\n} as data\">\n <ng-container *ngIf=\"data.barSeriesCount > 1\">\n <svg:rect\n *ngFor=\"let point of series.data\"\n (mouseenter)=\"mouseenter(point)\"\n (mouseleave)=\"mouseleave(point)\"\n [attr.x]=\"data.x(point.x) + (series.id * data.x1.bandwidth() / data.barSeriesCount)\"\n [attr.y]=\"point.y > 0 ? data.y(point.y) : data.y(0)\"\n [attr.width]=\"data.x1.bandwidth() / data.barSeriesCount\"\n [attr.height]=\"Math.abs(data.y(point.y) - data.y(0))\"\n [attr.fill]=\"series.color\"\n ></svg:rect>\n </ng-container>\n <ng-container *ngIf=\"data.barSeriesCount === 1\">\n <svg:rect\n *ngFor=\"let point of series.data\"\n (mouseenter)=\"mouseenter(point)\"\n (mouseleave)=\"mouseleave(point)\"\n [attr.x]=\"data.x(point.x)\"\n [attr.y]=\"point.y > 0 ? data.y(point.y) : data.y(0)\"\n [attr.width]=\"data.x1.bandwidth()\"\n [attr.height]=\"Math.abs(data.y(point.y) - data.y(0))\"\n [attr.fill]=\"point.color ?? series.color\"\n ></svg:rect>\n </ng-container>\n</ng-container>\n\n","import {AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, OnInit} from '@angular/core';\nimport {BasePoint} from '../../../model/base-point';\nimport {SeriesBaseComponent} from '../../../base/series-base.component';\nimport {map, Observable} from 'rxjs';\nimport {ChartService} from '../../../service/chart.service';\nimport {ScaleService} from '../../../service/scale.service';\nimport {ZoomService} from '../../../service/zoom.service';\n\n@Component({\n selector: 'svg:svg[teta-scatter-series]',\n templateUrl: './scatter-series.component.html',\n styleUrls: ['./scatter-series.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ScatterSeriesComponent<T extends BasePoint>\n extends SeriesBaseComponent<T>\n implements OnInit, AfterViewInit {\n transform: Observable<Pick<BasePoint, 'x' | 'y'>>;\n display: Observable<number>;\n path: Observable<string>;\n svgElement: SVGGeometryElement;\n x: Observable<any>;\n y: Observable<any>;\n\n constructor(\n protected override svc: ChartService,\n protected override cdr: ChangeDetectorRef,\n protected override scaleService: ScaleService,\n protected override zoomService: ZoomService,\n protected override element: ElementRef\n ) {\n super(svc, cdr, scaleService, zoomService, element);\n }\n\n override ngOnInit(): void {\n this.x = this.scaleService.xScaleMap.pipe(map(_ => _.get(this.series.xAxisIndex)));\n this.y = this.scaleService.yScaleMap.pipe(map(_ => _.get(this.series.yAxisIndex)));\n }\n\n ngAfterViewInit() {\n }\n\n mouseenter(point: BasePoint) {\n this.svc.setTooltip({\n point: point,\n series: this.series,\n });\n }\n\n mouseleave(point: BasePoint) {\n this.svc.setTooltip({\n point: null,\n series: this.series,\n });\n }\n}\n","<ng-container *ngIf=\"{\n y: y | async,\n x: x | async\n} as scales\">\n <svg:circle\n class=\"line\"\n *ngFor=\"let point of series.data\"\n (mouseenter)=\"mouseenter(point)\"\n (mouseleave)=\"mouseleave(point)\"\n [attr.cx]=\"scales.x(point.x)\"\n [attr.cy]=\"scales.y(point.y)\"\n [attr.r]=\"series.style?.radius ?? 1\"\n [attr.stroke]=\"point.color ?? series.color\"\n [attr.fill]=\"point.color ?? series.color\"\n [attr.stroke-width]=\"series.style?.strokeWidth\">\n </svg:circle>\n</ng-container>\n\n\n\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n OnInit,\n} from '@angular/core';\nimport {BasePoint} from '../../../model/base-point';\nimport {SeriesBaseComponent} from '../../../base/series-base.component';\nimport {map, Observable} from 'rxjs';\nimport {ChartService} from '../../../service/chart.service';\nimport {ScaleService} from '../../../service/scale.service';\nimport {ZoomService} from '../../../service/zoom.service';\nimport {FillType} from '../../../model/enum/fill-type';\n\n@Component({\n selector: 'svg:svg[teta-block-series]',\n templateUrl: './block-series.component.html',\n styleUrls: ['./block-series.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BlockSeriesComponent<T extends BasePoint>\n extends SeriesBaseComponent<T>\n implements OnInit, AfterViewInit {\n x: Observable<any>;\n y: Observable<any>;\n displayPoints: Observable<BasePoint[]>;\n fillType = FillType;\n id: string;\n\n constructor(\n protected override svc: ChartService,\n protected override cdr: ChangeDetectorRef,\n protected override scaleService: ScaleService,\n protected override zoomService: ZoomService,\n protected override element: ElementRef\n ) {\n super(svc, cdr, scaleService, zoomService, element);\n this.id = (Date.now() + Math.random()).toString(36);\n\n }\n\n override ngOnInit(): void {\n const defaultVisiblePixels = 0;\n\n this.x = this.scaleService.xScaleMap.pipe(\n map((_) => _.get(this.series.xAxisIndex))\n );\n this.y = this.scaleService.yScaleMap.pipe(\n map((_) => _.get(this.series.yAxisIndex))\n );\n\n this.displayPoints = this.y.pipe(\n map((y) => {\n return this.series.data.filter((point, index, arr) => {\n const height = Math.abs(y(point.y1) - y(point.y));\n const [min, max] = y.domain();\n\n const visibleCondition =\n height > defaultVisiblePixels &&\n (point.y >= min ||\n point.y1 >= min ||\n arr[index + 1]?.y >= min ||\n arr[index + 1]?.y1 >= min) &&\n (point.y <= max ||\n point.y1 <= max ||\n arr[index - 1]?.y <= max ||\n arr[index - 1]?.y1 <= max);\n\n return visibleCondition;\n });\n })\n );\n }\n\n mouseenter(point: BasePoint) {\n this.svc.setTooltip({\n point: point,\n series: this.series,\n });\n }\n\n mouseleave(point: BasePoint) {\n this.svc.setTooltip({\n point: null,\n series: this.series,\n });\n }\n ngAfterViewInit() {\n }\n}\n","<ng-container *ngIf=\"{\n y: y | async,\n x: x | async,\n points: displayPoints | async\n} as data\">\n <svg:defs *ngIf=\"series?.fillType === fillType.gradient\">\n <svg:linearGradient [id]=\"'gradient-fill-' + id\" gradientUnits=\"userSpaceOnUse\"\n x1=\"0%\"\n [attr.y1]=\"config?.inverted ? '0%' : '100%'\"\n [attr.x2]=\"config?.inverted ? '100%' : '0%'\"\n y2=\"0%\">\n <svg:stop offset=\"0%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0\"></svg:stop>\n <svg:stop offset=\"5%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.1\"></svg:stop>\n <svg:stop offset=\"20%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.2\"></svg:stop>\n <svg:stop offset=\"60%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.5\"></svg:stop>\n <svg:stop offset=\"100%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.9\"></svg:stop>\n </svg:linearGradient>\n </svg:defs>\n <ng-container *ngFor=\"let point of data.points\">\n <svg:g (mouseenter)=\"mouseenter(point)\"\n (mouseleave)=\"mouseleave(point)\">\n <svg:rect\n x=\"0\"\n [attr.y]=\"data.y(point.y)\"\n [attr.height]=\"data.y(point.y1) - data.y(point.y)\"\n [attr.fill]=\"series.fillType === fillType.gradient ? 'url(#gradient-fill-'+id+')' : point.iconId ? 'url(#pattern'+point.iconId+')' : point.color ?? series.color\"\n [attr.fill-opacity]=\"series.style?.fillOpacity\"\n width=\"100%\">\n </svg:rect>\n <svg:text *ngIf=\"point.text && data.y(point.y1) - data.y(point.y) > 8\"\n x=\"50%\"\n [attr.y]=\"(data.y(point.y1) + data.y(point.y)) / 2\"\n alignment-baseline=\"middle\"\n text-anchor=\"middle\">{{ point.text }}\n </svg:text>\n <svg:line x1=\"0\" x2=\"100%\" [attr.y1]=\"data.y(point.y)\" [attr.y2]=\"data.y(point.y)\"\n [attr.stroke]=\"point.iconId ? 'var(--color-text-10)' : point.color ?? series.color\"></svg:line>\n <svg:line x1=\"0\" x2=\"100%\" [attr.y1]=\"data.y(point.y1)\" [attr.y2]=\"data.y(point.y1)\"\n [attr.stroke]=\"point.iconId ? 'var(--color-text-10)' : point.color ?? series.color\"></svg:line>\n </svg:g>\n </ng-container>\n\n\n</ng-container>\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n OnInit,\n} from '@angular/core';\nimport {SeriesBaseComponent} from '../../../base/series-base.component';\nimport {BasePoint} from '../../../model/base-point';\nimport {ChartService} from '../../../service/chart.service';\nimport {ScaleService} from '../../../service/scale.service';\nimport {ZoomService} from '../../../service/zoom.service';\nimport {map, Observable} from 'rxjs';\nimport {FillType} from '../../../model/enum/fill-type';\n\n@Component({\n selector: 'svg:svg[teta-block-area-series]',\n templateUrl: './block-area-series.component.html',\n styleUrls: ['./block-area-series.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BlockAreaSeriesComponent<T extends BasePoint>\n extends SeriesBaseComponent<T>\n implements OnInit, AfterViewInit {\n x: Observable<any>;\n y: Observable<any>;\n displayPoints: Observable<BasePoint[]>;\n fillType = FillType;\n id: string;\n\n constructor(\n protected override svc: ChartService,\n protected override cdr: ChangeDetectorRef,\n protected override scaleService: ScaleService,\n protected override zoomService: ZoomService,\n protected override element: ElementRef\n ) {\n super(svc, cdr, scaleService, zoomService, element);\n this.id = (Date.now() + Math.random()).toString(36);\n }\n\n override ngOnInit(): void {\n const defaultVisiblePixels = 3;\n\n this.x = this.scaleService.xScaleMap.pipe(\n map((_) => _.get(this.series.xAxisIndex))\n );\n this.y = this.scaleService.yScaleMap.pipe(\n map((_) => _.get(this.series.yAxisIndex))\n );\n\n this.displayPoints = this.y.pipe(\n map((y) => {\n return this.series.data.filter((point, index, arr) => {\n const height = Math.abs(y(point.y1) - y(point.y));\n const [min, max] = y.domain();\n\n const visibleCondition =\n height > defaultVisiblePixels &&\n (point.y >= min ||\n point.y1 >= min ||\n arr[index + 1]?.y >= min ||\n arr[index + 1]?.y1 >= min) &&\n (point.y <= max ||\n point.y1 <= max ||\n arr[index - 1]?.y <= max ||\n arr[index - 1]?.y1 <= max);\n\n return visibleCondition;\n });\n })\n );\n }\n\n ngAfterViewInit() {\n }\n\n mouseenter(point: BasePoint) {\n this.svc.setTooltip({\n point: point,\n series: this.series,\n });\n }\n\n mouseleave(point: BasePoint) {\n this.svc.setTooltip({\n point: null,\n series: this.series,\n });\n }\n}\n","<ng-container *ngIf=\"{\n y: y | async,\n x: x | async,\n points: displayPoints | async\n} as data\">\n <svg:defs *ngIf=\"series?.fillType === fillType.gradient\">\n <svg:linearGradient [id]=\"'gradient-fill-' + id\"\n gradientUnits=\"userSpaceOnUse\"\n x1=\"0%\"\n [attr.y1]=\"config?.inverted ? '0%' : '100%'\"\n [attr.x2]=\"config?.inverted ? '100%' : '0%'\"\n y2=\"0%\">\n <svg:stop offset=\"0%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0\"></svg:stop>\n <svg:stop offset=\"5%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.1\"></svg:stop>\n <svg:stop offset=\"20%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.2\"></svg:stop>\n <svg:stop offset=\"60%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.5\"></svg:stop>\n <svg:stop offset=\"100%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.9\"></svg:stop>\n </svg:linearGradient>\n </svg:defs>\n <ng-container *ngFor=\"let point of data.points\">\n <svg:g (mouseenter)=\"mouseenter(point)\"\n (mouseleave)=\"mouseleave(point)\">\n <svg:rect\n *ngIf=\"!!config.inverted\"\n [attr.x]=\"data.x(0) < data.x(point.x) ? data.x(0) : data.x(point.x)\"\n [attr.y]=\"data.y(point.y)\"\n [attr.height]=\"data.y(point.y1) - data.y(point.y)\"\n [attr.width]=\"data.x(0) < data.x(point.x) ? data.x(point.x) - data.x(0) : data.x(0) - data.x(point.x)\"\n [attr.stroke]=\"point.iconId ? '' : point.color ?? series.color\"\n [attr.stroke-dasharray]=\"series.style?.strokeDasharray\"\n [attr.stroke-width]=\"series.style?.strokeWidth\"\n [attr.fill]=\"series.fillType === fillType.gradient ? 'url(#gradient-fill-'+id+')' : point.iconId ? 'url(#pattern'+point.iconId+')' : point.color ?? series.color\"\n [attr.fill-opacity]=\"series.style?.fillOpacity\">\n </svg:rect>\n <svg:rect\n *ngIf=\"!config.inverted\"\n [attr.x]=\"data.x(point.x)\"\n [attr.y]=\"data.y(0)\"\n [attr.height]=\"data.y(0) - data.y(point.y)\"\n [attr.width]=\"data.x(point.x1) - data.x(point.x)\"\n [attr.stroke]=\"point.iconId ? '' : point.color ?? series.color\"\n [attr.stroke-dasharray]=\"series.style?.strokeDasharray\"\n [attr.stroke-width]=\"series.style?.strokeWidth\"\n [attr.fill]=\"series.fillType === fillType.gradient ? 'url(#gradient-fill-'+id+')' : point.iconId ? 'url(#pattern'+point.iconId+')' : point.color ?? series.color\"\n [attr.fill-opacity]=\"series.style?.fillOpacity\">\n </svg:rect>\n <svg:text *ngIf=\"point.text\"\n x=\"50%\"\n [attr.y]=\"(data.y(point.y1) + data.y(point.y)) / 2\"\n alignment-baseline=\"middle\"\n text-anchor=\"middle\">{{ point.text }}\n </svg:text>\n\n <!-- <svg:line x1=\"0\" x2=\"100%\" [attr.y1]=\"data.y(point.y)\" [attr.y2]=\"data.y(point.y)\" [attr.stroke]=\"point.iconId ? 'var(--color-text-10)' : point.color ?? series.color\"></svg:line>-->\n <!-- <svg:line x1=\"0\" x2=\"100%\" [attr.y1]=\"data.y(point.y1)\" [attr.y2]=\"data.y(point.y1)\" [attr.stroke]=\"point.iconId ? 'var(--color-text-10)' : point.color ?? series.color\"></svg:line>-->\n\n </svg:g>\n </ng-container>\n\n\n</ng-container>\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef, OnDestroy,\n OnInit,\n} from '@angular/core';\nimport {BasePoint} from '../../../model/base-point';\nimport {ChartService} from '../../../service/chart.service';\nimport {ScaleService} from '../../../service/scale.service';\nimport {ZoomService} from '../../../service/zoom.service';\nimport {FillDirection, FillType} from '../../../model/enum/fill-type';\nimport {LinearSeriesBase} from '../linear-series-base';\nimport {combineLatest, map, Observable} from 'rxjs';\nimport * as d3 from 'd3';\n\n@Component({\n selector: 'svg:svg[teta-area-series]',\n templateUrl: './area-series.component.html',\n styleUrls: ['./area-series.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AreaSeriesComponent<T extends BasePoint>\n extends LinearSeriesBase<T>\n implements OnInit, AfterViewInit, OnDestroy {\n areaPath: Observable<string>;\n\n fillDirection = FillDirection;\n fillType = FillType;\n id: string;\n\n constructor(\n protected override svc: ChartService,\n protected override cdr: ChangeDetectorRef,\n protected override scaleService: ScaleService,\n protected override zoomService: ZoomService,\n protected override element: ElementRef\n ) {\n super(svc, cdr, scaleService, zoomService, element);\n this.id = (Date.now() + Math.random()).toString(36);\n }\n\n override ngOnInit() {\n super.ngOnInit();\n this.areaPath = combineLatest([\n this.scaleService.xScaleMap,\n this.scaleService.yScaleMap,\n ]).pipe(\n map(\n (\n data: [Map<number, any>, Map<number, any>]\n ) => {\n const [x, y] = data;\n this.x = x.get(this.series.xAxisIndex);\n this.y = y.get(this.series.yAxisIndex);\n this.x = x.get(this.series.xAxisIndex);\n this.y = y.get(this.series.yAxisIndex);\n\n const area = d3\n .area<BasePoint>()\n .defined(\n (point) =>\n point.x !== null &&\n point.y !== null &&\n !isNaN(point.x) &&\n !isNaN(point.y)\n );\n\n area\n .x1((_) =>\n _.x1 !== null && _.x1 !== undefined ? this.x(_.x1) : this.x(0)\n )\n .x0((_) => this.x(_.x))\n\n .y((_) =>\n this.y(_.y)\n );\n return area(this.series.data);\n }\n )\n );\n }\n}\n","<svg:defs *ngIf=\"series?.fillType === fillType.gradient\">\n <svg:linearGradient [id]=\"'gradient-fill-' + id\" gradientUnits=\"userSpaceOnUse\"\n x1=\"0%\"\n [attr.y1]=\"config?.inverted || series?.fillDirection === fillDirection.y ? '0%' : '100%'\"\n [attr.x2]=\"config?.inverted || series?.fillDirection === fillDirection.y ? '100%' : '0%'\"\n y2=\"0%\">\n <svg:stop offset=\"0%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0\"></svg:stop>\n <svg:stop offset=\"5%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.1\"></svg:stop>\n <svg:stop offset=\"20%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.2\"></svg:stop>\n <svg:stop offset=\"60%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.5\"></svg:stop>\n <svg:stop offset=\"100%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.8\"></svg:stop>\n </svg:linearGradient>\n</svg:defs>\n<svg:path\n class=\"area\"\n [attr.d]=\"areaPath | async\"\n [attr.stroke-width]=\"0\"\n [attr.fill-opacity]=\"series.style?.fillOpacity\"\n [attr.fill]=\"series.fillType === fillType.gradient ? 'url(#gradient-fill-'+id+')' : series.style.fill ?? series.color\">\n</svg:path>\n<svg:path\n class=\"area\"\n fill=\"none\"\n [attr.d]=\"path | async\"\n [attr.stroke]=\"series.color\"\n [attr.stroke-dasharray]=\"series.style?.strokeDasharray\"\n [attr.stroke-width]=\"series.style?.strokeWidth\">\n</svg:path>\n<ng-container *tuiLet=\"transform | async as t\">\n <svg:circle\n *ngIf=\"t?.x !=null && t?.y !=null\"\n r=\"3\"\n [attr.fill]=\"series.color\"\n [attr.transform]=\"'translate('+ t.x +', '+ t.y +')'\"\n >\n </svg:circle>\n</ng-container>\n<ng-container *ngIf=\"getMarkers() as markers\">\n <svg:circle\n class=\"marker\"\n *ngFor=\"let point of markers\"\n [class.draggable-marker]=\"point?.marker?.draggable\"\n [attr.r]=\"point.marker.style?.radius ?? 5\"\n [attr.fill]=\"point.marker.style?.fill ?? 'transparent'\"\n [attr.stroke]=\"point.marker.style?.stroke ?? 'none'\"\n [attr.stroke-width]=\"point.marker.style?.strokeWidth\"\n [attr.stroke-dasharray]=\"point.marker.style?.strokeDasharray\"\n [attr.cx]=\"x(point.x)\"\n [attr.cy]=\"y(point.y)\"\n >\n </svg:circle>\n</ng-container>\n\n\n\n","import {SeriesType} from '../model/enum/series-type';\nimport {SeriesBaseComponent} from '../base/series-base.component';\nimport {LineSeriesComponent} from '../chart-container/series/line/line-series.component';\nimport {BarSeriesComponent} from '../chart-container/series/bar/bar-series.component';\nimport {ScatterSeriesComponent} from '../chart-container/series/scatter-series/scatter-series.component';\nimport {BlockSeriesComponent} from '../chart-container/series/block-series/block-series.component';\nimport {BlockAreaSeriesComponent} from '../chart-container/series/block-area-series/block-area-series.component';\nimport {AreaSeriesComponent} from '../chart-container/series/area-series/area-series.component';\n\nexport const defaultSeriesTypeMapping = new Map<SeriesType,\n typeof SeriesBaseComponent>()\n .set(SeriesType.line, LineSeriesComponent)\n .set(SeriesType.bar, BarSeriesComponent)\n .set(SeriesType.scatter, ScatterSeriesComponent)\n .set(SeriesType.block, BlockSeriesComponent)\n .set(SeriesType.area, AreaSeriesComponent)\n .set(SeriesType.blockArea, BlockAreaSeriesComponent);\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ComponentRef,\n Input, OnDestroy,\n OnInit,\n SimpleChanges,\n ViewContainerRef,\n} from '@angular/core';\nimport {SeriesBaseComponent} from '../../base/series-base.component';\nimport {LineSeriesComponent} from '../series/line/line-series.component';\nimport {Series} from '../../model/series';\nimport {BasePoint} from '../../model/base-point';\nimport {IChartConfig} from '../../model/i-chart-config';\nimport {defaultSeriesTypeMapping} from '../../default/defaultSeriesTypeMapping';\n\n@Component({\n selector: '[teta-series-host]',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SeriesHostComponent<T extends BasePoint> implements OnInit, OnDestroy {\n @Input() config: IChartConfig;\n @Input() series: Series<T>;\n\n private _init = false;\n private _componentRef: ComponentRef<any>;\n\n constructor(\n private viewContainerRef: ViewContainerRef\n ) {\n }\n\n ngOnInit(): void {\n if (!SeriesBaseComponent.isPrototypeOf(this.series.component)) {\n this.series.component =\n defaultSeriesTypeMapping.get(this.series.type) || LineSeriesComponent;\n }\n\n this._componentRef = this.viewContainerRef.createComponent(\n this.series.component\n );\n this._componentRef.instance.config = this.config;\n this._componentRef.instance.series = this.series;\n this._init = true;\n }\n\n ngOnDestroy(): void {\n this._componentRef.destroy();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (this._init && (changes.hasOwnProperty('series') || changes.hasOwnProperty('config'))) {\n this._componentRef.instance.config = this.config;\n this._componentRef.instance.series = this.series;\n this._componentRef.injector.get(ChangeDetectorRef).detectChanges();\n }\n }\n}\n","import {\n ChangeDetectionStrategy, ChangeDetectorRef,\n Component,\n ElementRef, HostListener,\n Input, OnDestroy,\n ViewChild,\n} from '@angular/core';\nimport {Annotation} from '../../model/annotation';\nimport * as d3 from 'd3';\nimport {map, Observable} from 'rxjs';\nimport {ScaleService} from '../../service/scale.service';\nimport {ChartService} from '../../service/chart.service';\n\n@Component({\n selector: '[teta-annotation]',\n templateUrl: './annotation.component.html',\n styleUrls: ['./annotation.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class AnnotationComponent implements OnDestroy {\n @Input() set annotation(annotation: Annotation) {\n this._annotation = annotation;\n }\n\n get annotation(): Annotation {\n return this._annotation;\n }\n\n @ViewChild('annotationNode', {static: false})\n set node(node: ElementRef) {\n this._node = node;\n this.init();\n this.cdr.detectChanges();\n }\n\n get node() {\n return this._node;\n }\n\n x: Observable<any>;\n y: Observable<any>;\n\n private drag: d3.DragBehavior<any, any, any>;\n private _annotation: Annotation;\n private _node: ElementRef;\n\n constructor(\n private scaleService: ScaleService,\n private cdr: ChangeDetectorRef,\n private chartService: ChartService) {\n this.x = this.scaleService.xScaleMap.pipe(map((_) => _.get(this.annotation.xAxisIndex ?? 0)));\n this.y = this.scaleService.yScaleMap.pipe(map((_) => _.get(this.annotation.yAxisIndex ?? 0)));\n this.drag = d3.drag();\n }\n\n @HostListener('click', ['$event']) click(event: MouseEvent) {\n this.chartService.emitAnnotation({\n event,\n target: this.annotation\n });\n }\n\n @HostListener('contextmenu', ['$event']) contextMenu(event: MouseEvent) {\n this.chartService.emitAnnotation({\n event,\n target: this.annotation\n });\n }\n\n\n ngOnDestroy() {\n this.drag.on('drag end', null);\n }\n\n private init() {\n\n d3.select(this.node.nativeElement).datum(this.annotation);\n\n if (this.annotation.draggable) {\n this.drag.on('drag end', (event, d: Annotation) => {\n d.dx += event.dx;\n d.dy += event.dy;\n this.cdr.detectChanges();\n this.chartService.emitMoveAnnotation({\n event,\n target: d\n });\n });\n d3.select(this.node.nativeElement).call(this.drag);\n }\n }\n}\n","<ng-container *ngIf=\"{\n x: x | async,\n y: y | async\n } as data\">\n <svg:circle\n [attr.r]=\"annotation.style?.radius ?? 5\"\n [attr.cx]=\"data.x(annotation.point.x)\"\n [attr.fill]=\"annotation?.style?.fill ?? 'var(--color-text-90)'\"\n [attr.cy]=\"data.y(annotation.point.y)\">\n </svg:circle>\n <svg:line\n [attr.x1]=\"data.x(annotation.point.x)\"\n [attr.y1]=\"data.y(annotation.point.y)\"\n [attr.x2]=\"data.x(annotation.point.x) + (annotation.dx ?? 0)\"\n [attr.y2]=\"data.y(annotation.point.y) + (annotation.dy ?? 0)\"\n [attr.stroke]=\"annotation.style?.stroke ?? 'var(--color-text-90)'\"\n [attr.stroke-width]=\"annotation.style?.strokeWidth ?? 1\"\n [attr.stroke-dasharray]=\"annotation.style?.strokeDasharray ?? null\"\n >\n </svg:line>\n <svg:foreignObject\n class=\"position-absolute\"\n [attr.width]=\"node?.nativeElement.offsetWidth ?? 0\"\n [attr.height]=\"node?.nativeElement.offsetHeight ?? 0\"\n [attr.x]=\"data.x(annotation.point.x) + (annotation.dx ?? 0) - 10\"\n [attr.y]=\"data.y(annotation.point.y) + (annotation.dy ?? 0) - 10\">\n <div\n #annotationNode\n [style.background-color]=\"annotation.style?.fill ?? 'var(--color-text-90)'\"\n [style.cursor]=\"annotation?.draggable ? 'move' : 'default'\"\n class=\"color-text-10 padding-h-2\"\n style=\"border-radius: 2px; display: inline-block;\">\n <ng-container *ngIf=\"annotation.template;else default\">\n <ng-container *ngTemplateOutlet=\"annotation.template;context: {$implicit: annotation}\"></ng-container>\n </ng-container>\n </div>\n </svg:foreignObject>\n</ng-container>\n<ng-template #default>\n {{ annotation.note?.label}}\n</ng-template>\n","import {\n AfterViewInit,\n Directive,\n ElementRef,\n HostBinding,\n HostListener,\n Input,\n NgZone,\n OnDestroy,\n} from '@angular/core';\nimport {ZoomService} from '../service/zoom.service';\nimport {IChartConfig} from '../model/i-chart-config';\nimport {Axis} from '../core/axis/axis';\nimport * as d3 from 'd3';\nimport {D3ZoomEvent, ZoomBehavior, zoomIdentity} from 'd3';\nimport {ZoomType} from '../model/enum/zoom-type';\nimport {AxisOrientation} from '../model/enum/axis-orientation';\nimport {BrushMessage, IBroadcastMessage, ZoomMessage} from '../model/i-broadcast-message';\nimport {BrushType} from '../model/enum/brush-type';\nimport {BroadcastService} from '../service/broadcast.service';\nimport {debounceTime, tap} from 'rxjs/operators';\nimport {combineLatest, filter, takeWhile} from 'rxjs';\nimport {ChartService} from \"../service/chart.service\";\nimport {ZoomBehaviorType} from \"../model/enum/zoom-behavior-type\";\n\n@Directive({\n selector: '[tetaZoomable]',\n})\nexport class ZoomableDirective implements OnDestroy, AfterViewInit {\n @Input() config: IChartConfig;\n @Input() axis?: Axis;\n @Input() size: DOMRect;\n @Input() brushScale?: any;\n\n\n @HostBinding('class.zoomable') private zoomable = false;\n\n private _element: d3.Selection<SVGElement, any, any, any>;\n private zoomAxis: Axis;\n private zoom: ZoomBehavior<any, any>;\n private alive = true;\n\n private currentTransform = zoomIdentity;\n private currentSelection;\n\n constructor(\n private elementRef: ElementRef,\n private zoomService: ZoomService,\n private broadcastService: BroadcastService,\n private chartService: ChartService,\n private zone: NgZone\n ) {\n }\n\n ngOnInit() {\n if (this.axis?.options?.zoom || this.config?.zoom?.enable) {\n this.zoomable = true;\n }\n }\n\n\n zoomed = (event: D3ZoomEvent<any, any>) => {\n\n if (event.sourceEvent) {\n if (Object.keys(event.sourceEvent).length !== 0) {\n if (this.currentTransform === event.transform && event.type !== 'end') {\n return;\n }\n\n const origin = this.brushScale.copy().domain(this.zoomAxis.extremes);\n\n let domain = this.config.zoom?.type === ZoomType.y ?\n event.transform.rescaleY(origin).domain() :\n event.transform.rescaleX(origin).domain();\n\n const message = new ZoomMessage({\n event,\n axis: this.zoomAxis,\n brushDomain: domain,\n chartId: this.config.id\n });\n\n this.broadcastService.broadcastZoom({\n channel: this.config?.zoom?.syncChannel,\n message,\n });\n }\n\n this.zoomService.setZoom({\n event,\n target: this.zoomAxis\n });\n\n this.currentTransform = event.transform;\n }\n };\n\n ngAfterViewInit() {\n\n const enable = this.axis?.options?.zoom && this.axis?.options.visible !== false || this.config?.zoom?.enable;\n\n if (!enable) {\n return;\n }\n\n this._element = d3.select(this.elementRef.nativeElement);\n this.zoom = d3\n .zoom()\n .extent([\n [0, 0],\n [this.size.width, this.size.height],\n ]);\n\n if (this.config.zoom?.limitTranslateByData) {\n this.zoom.translateExtent([[0, 0], [this.size.width, this.size.height]])\n }\n\n\n const commonZoomAxis = Axis.createAxis(\n this.config?.zoom.type === ZoomType.x ? AxisOrientation.x : AxisOrientation.y,\n this.config,\n 0,\n true\n );\n\n this.zoomAxis = this.axis ?? commonZoomAxis;\n\n if (enable) {\n\n const maxZoom = this.config.zoom?.max ? (this.zoomAxis.extremes[1] - this.zoomAxis.extremes[0]) / this.config.zoom?.max : this.config.zoom?.limitZoomByData ? 1 : 0;\n const minZoom = this.config.zoom?.min ? (this.zoomAxis.extremes[1] - this.zoomAxis.extremes[0]) / this.config.zoom?.min : Infinity;\n\n this.zoom.scaleExtent([maxZoom, minZoom]);\n\n this.zoom.on('start zoom end', this.zoomed)\n this._element.call(this.zoom)\n .on('dblclick.zoom', null)\n\n\n if(this.config?.zoom?.zoomBehavior === ZoomBehaviorType.wheel) {\n\n let wheeling;\n let type: 'start' | 'zoom' | 'end' = 'start';\n\n const origin = this.brushScale.copy().domain(this.zoomAxis.extremes);\n\n this.zoom\n .filter((event) => event.ctrlKey)\n .wheelDelta((event) => {\n const delta = this.config?.zoom.type === ZoomType.x ? -event.deltaX : -event.deltaY\n return delta * 0.002\n })\n\n this._element.on('wheel', (event) => {\n event.preventDefault();\n\n if(event.ctrlKey) {\n return;\n }\n\n\n const emit = (type: string) => {\n\n let transform = zoomIdentity;\n const delta = type === 'end' ? 0 : this.config.zoom?.type === ZoomType.y ? event.deltaY : event.deltaX;\n\n if(this.config.zoom?.type === ZoomType.y) {\n transform = transform.translate(0, this.currentTransform.y - delta);\n }\n\n if(this.config.zoom?.type === ZoomType.x) {\n transform = transform.translate(this.currentTransform.x - delta, 0);\n }\n\n transform = transform.scale(this.currentTransform.k);\n\n let domain = this.config.zoom?.type === ZoomType.y ?\n transform.rescaleY(origin).domain() :\n transform.rescaleX(origin).domain();\n\n\n const message = new ZoomMessage({\n event: {\n sourceEvent: event,\n transform,\n type\n },\n axis: this.zoomAxis,\n brushDomain: domain,\n chartId: this.config.id\n });\n\n this.zoomService.setZoom({\n event: {\n sourceEvent: event,\n transform,\n type\n },\n target: this.zoomAxis\n });\n\n this.broadcastService.broadcastZoom({\n channel: this.config?.zoom?.syncChannel,\n message,\n });\n\n this._element.call(this.zoom.transform, transform);\n\n this.currentTransform = transform;\n }\n\n this.zone.runOutsideAngular(() => {\n clearTimeout(wheeling);\n emit(type)\n type = 'zoom';\n wheeling = setTimeout(() => {\n type = 'end';\n emit(type)\n\n\n type = 'start';\n }, 400)\n })\n\n\n })\n }\n\n\n }\n\n\n // Subscribe to zoom events\n this.broadcastService.subscribeToZoom(this.config?.zoom.syncChannel).pipe(\n takeWhile((_) => this.alive),\n filter((m: IBroadcastMessage<ZoomMessage>) => m.message.event.sourceEvent instanceof MouseEvent || m.message.event.sourceEvent instanceof WheelEvent),\n filter((m: IBroadcastMessage<ZoomMessage>) => {\n return this.zoomAxis.index === m.message?.axis?.index && this.zoomAxis.orientation === m.message?.axis?.orientation;\n }),\n tap((m: IBroadcastMessage<ZoomMessage>) => {\n if (this.config.id !== m.message.chartId) {\n this._element.call(this.zoom.transform, m.message.event.transform, null, {});\n } else {\n if (m.message.axis.isFake && !this.zoomAxis.isFake || !m.message.axis.isFake && this.zoomAxis.isFake) {\n this._element.call(this.zoom.transform, m.message.event.transform);\n }\n }\n })\n ).subscribe();\n\n\n // Subscribe to brush events x or y\n\n if ((this.config.brush?.type === BrushType.x && this.zoomAxis.orientation === AxisOrientation.x) ||\n (this.config.brush?.type === BrushType.y && this.zoomAxis.orientation === AxisOrientation.y)) {\n\n combineLatest([this.broadcastService.subscribeToBrush(this.config?.zoom.syncChannel), this.chartService.size]).pipe(\n takeWhile((_) => this.alive),\n debounceTime(150),\n filter((data: [IBroadcastMessage<BrushMessage>, DOMRect]) => Boolean(data[0].message.selection)),\n tap((data: [IBroadcastMessage<BrushMessage>, DOMRect]) => {\n\n const [m] = data;\n\n const currentTransform = d3.zoomTransform(\n this._element.node()\n );\n\n if (!m.message.event && this.currentSelection && currentTransform.k !== 1) {\n return;\n }\n\n this.currentSelection = m.message.selection;\n\n\n this.updateZoom(m);\n\n }),\n ).subscribe();\n }\n }\n\n\n ngOnDestroy(): void {\n this.zoom?.on('start zoom end', null);\n this._element?.on('wheel', null);\n\n this.alive = false;\n }\n\n private updateZoom(m: IBroadcastMessage<BrushMessage>) {\n\n const s = m.message.selection;\n this.brushScale.domain(this.zoomAxis.extremes);\n const domain = this.brushScale.domain();\n\n const scale = (domain[1] - domain[0]) / (s[1] - s[0]);\n\n let transform = zoomIdentity.scale(scale);\n\n if (m.message?.brushType === BrushType.x) {\n transform = transform.translate(-this.brushScale(s[0]), 0);\n }\n if (m.message?.brushType === BrushType.y) {\n transform = transform.translate(0, -this.brushScale(s[0]));\n }\n\n this._element.transition().duration(150).call(\n this.zoom.transform,\n transform,\n null,\n {}\n );\n }\n}\n","import {\n AfterViewInit,\n Directive,\n ElementRef,\n Input,\n OnInit,\n SimpleChanges,\n} from '@angular/core';\nimport { IChartConfig } from '../model/i-chart-config';\nimport { BrushService } from '../service/brush.service';\nimport { ChartService } from '../service/chart.service';\n\n@Directive({\n selector: '[tetaBrushable]',\n})\nexport class BrushableDirective implements OnInit, AfterViewInit {\n @Input() config: IChartConfig;\n @Input() brushScale: any;\n\n constructor(\n private brushService: BrushService,\n private chartService: ChartService,\n private element: ElementRef\n ) {}\n\n ngOnInit() {}\n\n ngAfterViewInit() {\n\n }\n\n ngOnChanges(changes: SimpleChanges) {\n\n if(changes.hasOwnProperty('config')) {\n this.brushService.clearPreviousSelection();\n }\n\n this.brushService.applyBrush(\n this.element,\n this.config,\n this.brushScale\n );\n }\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef, OnDestroy,\n OnInit,\n} from '@angular/core';\nimport {IChartConfig} from '../model/i-chart-config';\nimport {ChartService} from '../service/chart.service';\nimport {\n animationFrameScheduler,\n combineLatest,\n map,\n Observable,\n shareReplay,\n tap,\n withLatestFrom,\n} from 'rxjs';\nimport {Axis} from '../core/axis/axis';\nimport {AxisOrientation} from '../model/enum/axis-orientation';\nimport {ScaleService} from '../service/scale.service';\nimport {ZoomService} from '../service/zoom.service';\nimport {BrushType} from '../model/enum/brush-type';\nimport {throttleTime} from \"rxjs/operators\";\n\ntype Opposite = boolean;\n\n@Component({\n selector: 'teta-chart-container',\n templateUrl: './chart-container.component.html',\n styleUrls: ['./chart-container.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChartContainerComponent implements OnInit, OnDestroy {\n config: Observable<IChartConfig>;\n\n yAxisMap: Observable<Map<number, Axis>>;\n xAxisMap: Observable<Map<number, Axis>>;\n yScaleMap: Observable<Map<number, any>>;\n xScaleMap: Observable<Map<number, any>>;\n size: Observable<DOMRect>;\n visibleRect: Observable<any>;\n\n brushScale: Observable<any>;\n\n private _observer: ResizeObserver;\n\n private filterPositionMap = new Map<Opposite,\n (axis: Axis) => (_: Axis) => boolean>()\n .set(\n true,\n (axis) => (_: Axis) =>\n _.options.opposite && _.options.visible && axis.index <= _.index\n )\n .set(\n false,\n (axis) => (_: Axis) =>\n _.options.opposite !== true &&\n _.options.visible &&\n _.index <= axis.index\n );\n\n constructor(\n private _svc: ChartService,\n private _cdr: ChangeDetectorRef,\n private _scaleService: ScaleService,\n private _zoomService: ZoomService,\n private _elementRef: ElementRef\n ) {\n this.config = this._svc.config;\n this.size = this._svc.size;\n this.yAxisMap = this._scaleService.yAxisMap;\n this.xAxisMap = this._scaleService.xAxisMap;\n\n this.yScaleMap = this._scaleService.yScaleMap.pipe(\n throttleTime(0, animationFrameScheduler, {trailing: true}),\n tap(() => this._cdr.detectChanges()),\n shareReplay({\n bufferSize: 1,\n refCount: true\n }));\n\n this.xScaleMap = this._scaleService.xScaleMap.pipe(\n throttleTime(0, animationFrameScheduler, {trailing: true}),\n tap(() => this._cdr.detectChanges()),\n shareReplay({\n bufferSize: 1,\n refCount: true\n }));\n\n this.brushScale = combineLatest([\n this._scaleService.xScaleMap,\n this._scaleService.yScaleMap,\n ]).pipe(\n withLatestFrom(this.config),\n map((data: [[Map<number, any>, Map<number, any>], IChartConfig]) => {\n const [[x, y], config] = data;\n\n return config.brush?.type === BrushType.x\n ? x.get(0)\n : y.get(0);\n }),\n\n shareReplay({\n bufferSize: 1,\n refCount: true\n })\n );\n\n this.visibleRect = combineLatest([\n this.size,\n this.xAxisMap,\n this.yAxisMap\n ]).pipe(\n throttleTime(0, animationFrameScheduler, {trailing: true}),\n map(\n (\n data: [DOMRect, Map<number, any>, Map<number, any>]\n ) => {\n const [size, x, y] = data;\n const yAxesArray = [...y.values()];\n const xAxesArray = [...x.values()];\n const left = yAxesArray\n .filter((_) => _.options.opposite !== true && _.options.visible)\n .reduce(this.sumSize, 0);\n\n const right = yAxesArray\n .filter((_) => _.options.opposite && _.options.visible)\n .reduce(this.sumSize, 0);\n\n const bottom = xAxesArray\n .filter((_) => _.options.opposite !== true && _.options.visible)\n .reduce(this.sumSize, 0);\n\n const top = xAxesArray\n .filter((_) => _.options.opposite && _.options.visible)\n .reduce(this.sumSize, 0);\n return {\n x: left,\n y: top,\n width: size.width - left - right,\n height: size.height - top - bottom,\n };\n }\n ),\n tap(() => setTimeout(() => this._cdr.detectChanges()))\n );\n }\n\n ngOnInit(): void {\n this._observer = new ResizeObserver((entries: ResizeObserverEntry[]) => {\n\n requestAnimationFrame(() => {\n if (\n !Array.isArray(entries) ||\n !entries.length ||\n entries[0].contentRect.width <= 0 ||\n entries[0].contentRect.height <= 0\n ) {\n return;\n }\n this._svc.setSize(entries[0].contentRect);\n\n });\n\n\n });\n this._observer.observe(this._elementRef.nativeElement);\n }\n\n ngOnDestroy() {\n this._observer.disconnect();\n }\n\n private sumSize = (acc, curr) => acc + curr.selfSize;\n\n getTranslate(axis?: Axis, size?: DOMRect): Observable<string> {\n return combineLatest([this.xAxisMap, this.yAxisMap]).pipe(\n map((data: [Map<number, Axis>, Map<number, Axis>]) => {\n const [x, y] = data;\n const xAxesArray = [...x.values()];\n const yAxesArray = [...y.values()];\n\n const oppositeFilter = this.filterPositionMap.get(true);\n const nonOppositeFilter = this.filterPositionMap.get(false);\n\n const oppositeOffsetY = yAxesArray.filter(oppositeFilter(axis));\n const nonOppositeOffsetY = yAxesArray.filter(nonOppositeFilter(axis));\n\n const oppositeOffsetX = xAxesArray.filter(oppositeFilter(axis));\n const nonOppositeOffsetX = xAxesArray.filter(nonOppositeFilter(axis));\n\n const oppositeTranslateY = oppositeOffsetY.reduce(\n (acc, curr) => acc + curr.selfSize,\n 0\n );\n const nonOppisteTranslateY = nonOppositeOffsetY.reduce(\n (acc, curr) => acc + curr.selfSize,\n 0\n );\n\n const oppositeTranslateX = oppositeOffsetX.reduce(\n (acc, curr) => acc + curr.selfSize,\n 0\n );\n\n const nonOppisteTranslateX = nonOppositeOffsetX.reduce(\n (acc, curr) => acc + curr.selfSize,\n 0\n );\n\n const left = yAxesArray\n .filter((_) => _.options.visible && _.options.opposite !== true)\n .reduce((acc, curr) => acc + curr.selfSize, 0);\n\n const top = xAxesArray\n .filter((_) => _.options.visible && _.options.opposite === true)\n .reduce((acc, curr) => acc + curr.selfSize, 0);\n\n if (axis.orientation === AxisOrientation.x) {\n return `translate(${left}, ${\n axis.options.opposite\n ? oppositeTranslateX\n : size.height - nonOppisteTranslateX\n })`;\n }\n\n if (axis.orientation === AxisOrientation.y) {\n return `translate(${\n axis.options.opposite\n ? size.width - oppositeTranslateY\n : nonOppisteTranslateY\n }, ${top})`;\n }\n\n return 'translate(0, 0)';\n })\n );\n }\n\n identify(index, item) {\n return item.value.index;\n }\n\n click(event: PointerEvent, xScales: Map<number, any>, yScales: Map<number, any>) {\n const x = xScales.get(0);\n const y = yScales.get(0);\n this._svc.emitChartClick({\n event: event,\n target: {\n x: x.invert(event.offsetX),\n y: y.invert(event.offsetY)\n }\n });\n }\n\n contextMenu(event: MouseEvent, xScales: Map<number, any>, yScales: Map<number, any>) {\n const x = xScales.get(0);\n const y = yScales.get(0);\n this._svc.emitChartContextMenu({\n event: event,\n target: {\n x: x.invert(event.offsetX),\n y: y.invert(event.offsetY)\n }\n });\n }\n\n mouseMove(event) {\n this._svc.setPointerMove(event);\n }\n\n mouseLeave(event) {\n this._svc.setPointerMove(event);\n }\n}\n","<ng-container *ngIf=\"{\n size: size | async,\n config: config | async,\n xAxisMap: xAxisMap | async,\n yAxisMap: yAxisMap | async,\n xScaleMap: xScaleMap | async,\n yScaleMap: yScaleMap | async,\n visibleRect: visibleRect | async,\n brushScale: brushScale | async\n} as data\" xmlns:svg=\"http://www.w3.org/1999/html\">\n <teta-tooltip *ngIf=\"data.config?.tooltip?.enable\"\n [size]=\"data.size\"\n [config]=\"data.config\"></teta-tooltip>\n <ng-container *ngIf=\"data.visibleRect?.width > 0 && data.visibleRect?.height > 0 && data.xScaleMap && data.yScaleMap\">\n <svg height=\"100%\" width=\"100%\" class=\"position-absolute\">\n <g class=\"y-axis-container\">\n <ng-container *ngFor=\"let item of data.yAxisMap | keyvalue;\">\n <ng-container *ngIf=\"item.value.options.visible\">\n <g\n teta-y-axis\n [axis]=\"item.value\"\n [scale]=\"data.yScaleMap.get(item.key)\"\n [size]=\"data.size\"\n [attr.transform]=\"getTranslate(item.value, data.size) | async\"></g>\n <rect\n tetaZoomable\n fill-opacity=\"0\"\n [brushScale]=\"data.brushScale\"\n [axis]=\"item.value\"\n [config]=\"data.config\"\n [size]=\"data.size\"\n [attr.x]=\"item.value.options.opposite ? 0 : -item.value.selfSize\"\n [attr.y]=\"0\"\n [attr.height]=\"data.size.height\"\n [attr.width]=\"item.value.selfSize\"\n [attr.transform]=\"getTranslate(item.value, data.size) | async\"></rect>\n </ng-container>\n\n </ng-container>\n </g>\n <g class=\"x-axis-container\">\n <ng-container *ngFor=\"let item of data.xAxisMap | keyvalue;\">\n <ng-container *ngIf=\"item.value.options.visible && data.xScaleMap && data.yScaleMap\">\n <g\n teta-x-axis\n [axis]=\"item.value\"\n [scale]=\"data.xScaleMap.get(item.key)\"\n [size]=\"data.size\"\n [attr.transform]=\"getTranslate(item.value, data.size) | async\"></g>\n <rect\n tetaZoomable\n fill-opacity=\"0\"\n [brushScale]=\"data.brushScale\"\n [axis]=\"item.value\"\n [config]=\"data.config\"\n [size]=\"data.size\"\n [attr.x]=\"0\"\n [attr.y]=\"0\"\n [attr.width]=\"data.size.width\"\n [attr.height]=\"item.value.selfSize\"\n [attr.transform]=\"getTranslate(item.value, data.size) | async\"></rect>\n </ng-container>\n </ng-container>\n </g>\n </svg>\n </ng-container>\n <ng-container *ngIf=\"data.visibleRect?.width > 0 && data.visibleRect?.height > 0 && data.xScaleMap && data.yScaleMap\">\n <svg\n tetaBrushable\n tetaZoomable\n class=\"position-absolute\"\n [size]=\"data.size\"\n [brushScale]=\"data.brushScale\"\n [config]=\"data.config\"\n [attr.width]=\"data.visibleRect.width\"\n [attr.height]=\"data.visibleRect.height\"\n [attr.viewBox]=\"'0 0 ' + data.visibleRect.width + ' ' + data.visibleRect.height\"\n [style.transform]=\"'translate('+ data.visibleRect.x +'px, '+ data.visibleRect.y +'px)'\"\n (contextmenu)=\"contextMenu($event, data.xScaleMap, data.yScaleMap)\"\n (click)=\"click($event, data.xScaleMap, data.yScaleMap)\"\n (mouseleave)=\"mouseLeave($event)\"\n (mousemove)=\"mouseMove($event)\">\n\n <g class=\"gridlines\"\n teta-gridlines\n *ngIf=\"data.config.gridLines?.enable !== false\"\n [size]=\"data.size\"\n [config]=\"data.config\"></g>\n\n <g class=\"x-axis-plotband-container\">\n <ng-container *ngFor=\"let axis of data.config.xAxis; let i = index\">\n <g teta-plot-band *ngFor=\"let plotBand of axis.plotBands\"\n [plotBand]=\"plotBand\"\n [scale]=\"data.xScaleMap.get(i)\"\n [size]=\"data.size\"\n [axis]=\"data.xAxisMap.get(i)\"></g>\n </ng-container>\n </g>\n <g class=\"y-axis-plotband-container\">\n <ng-container *ngFor=\"let axis of data.config.yAxis; let i = index\">\n <g teta-plot-band *ngFor=\"let plotBand of axis.plotBands\"\n [plotBand]=\"plotBand\"\n [scale]=\"data.yScaleMap.get(i)\"\n [size]=\"data.size\"\n [axis]=\"data.yAxisMap.get(i)\"></g>\n </ng-container>\n </g>\n <g class=\"x-axis-plotline-container\">\n <ng-container *ngFor=\"let axis of data.config.xAxis; let i = index\">\n <g teta-plot-line *ngFor=\"let plotLine of axis.plotLines\"\n [plotLine]=\"plotLine\"\n [scale]=\"data.xScaleMap.get(i)\"\n [size]=\"data.size\"\n [axis]=\"data.xAxisMap.get(i)\"></g>\n </ng-container>\n </g>\n <g class=\"y-axis-plotline-container\">\n <ng-container *ngFor=\"let axis of data.config.yAxis; let i = index\">\n <g teta-plot-line *ngFor=\"let plotLine of axis.plotLines\"\n [plotLine]=\"plotLine\"\n [scale]=\"data.yScaleMap.get(i)\"\n [size]=\"data.size\"\n [axis]=\"data.yAxisMap.get(i)\"></g>\n </ng-container>\n </g>\n <g class=\"series-container\">\n <g teta-series-host\n *ngFor=\"let series of data.config.series\"\n [config]=\"data.config\"\n [series]=\"series\"></g>\n </g>\n <g class=\"annotations\">\n <g teta-annotation\n *ngFor=\"let annotation of data.config.annotations\"\n [annotation]=\"annotation\"></g>\n </g>\n </svg>\n\n </ng-container>\n</ng-container>\n","import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Input,\n} from '@angular/core';\nimport { Series } from '../model/series';\nimport { BasePoint } from '../model/base-point';\nimport { SeriesType } from '../model/enum/series-type';\n\n@Component({\n selector: 'teta-legend',\n templateUrl: './legend.component.html',\n styleUrls: ['./legend.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LegendComponent {\n private sizeMapping = new Map<SeriesType, number>()\n .set(SeriesType.line, 2)\n .set(SeriesType.scatter, 12)\n .set(SeriesType.bar, 12)\n .set(SeriesType.area, 2)\n .set(SeriesType.block, 12)\n .set(SeriesType.blockArea, 2);\n\n @Input() series: Array<Series<BasePoint>>;\n @HostBinding('class.padding-bottom-4') classLegend = true;\n\n constructor() {}\n\n getHeight(serie: Series<BasePoint>) {\n return this.sizeMapping.get(serie.type ?? SeriesType.line);\n }\n}\n","<ng-container *ngFor=\"let serie of series\" class=\"padding-bottom-4\">\n <div *ngIf=\"serie?.showInLegend !== false\">\n <div class=\"legend-item\">\n <div class=\"legend-icon-form\" [style.height.px]=\"getHeight(serie)\" [style.background-color]=\"serie.color\"></div>\n <div class=\"legend-label\">{{ serie.name }}</div>\n </div>\n </div>\n</ng-container>\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n} from '@angular/core';\nimport {ChartService} from '../service/chart.service';\nimport {IChartConfig} from '../model/i-chart-config';\nimport {BasePoint} from '../model/base-point';\nimport {Series} from '../model/series';\nimport {ZoomService} from '../service/zoom.service';\nimport {ScaleService} from '../service/scale.service';\nimport {BrushService} from '../service/brush.service';\nimport {IChartEvent} from '../model/i-chart-event';\nimport {PlotLine} from '../model/plot-line';\nimport {PlotBand} from '../model/plot-band';\nimport {IPointMove} from '../model/i-point-move';\nimport {map, Observable, takeWhile, withLatestFrom} from 'rxjs';\nimport {Annotation} from '../model/annotation';\nimport {TooltipTracking} from '../model/enum/tooltip-tracking';\n\n@Component({\n selector: 'teta-svg-chart',\n templateUrl: './chart.component.html',\n styleUrls: ['./chart.component.scss'],\n providers: [ChartService, ZoomService, ScaleService, BrushService],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChartComponent implements OnInit, OnChanges, OnDestroy {\n legendSeries: Array<Series<BasePoint>>;\n hasSeriesData: Observable<boolean>;\n svcConfig: Observable<IChartConfig>;\n @Output()\n pointerMove: EventEmitter<IChartEvent<Map<number, number>>> = new EventEmitter<IChartEvent<Map<number, number>>>();\n\n @Output()\n plotBandsMove: EventEmitter<IChartEvent<PlotBand>> = new EventEmitter<IChartEvent<PlotBand>>();\n\n @Output()\n plotBandClick: EventEmitter<IChartEvent<PlotBand>> = new EventEmitter<IChartEvent<PlotBand>>();\n\n @Output()\n plotBandContextMenu: EventEmitter<IChartEvent<PlotBand>> = new EventEmitter<IChartEvent<PlotBand>>();\n\n @Output()\n plotLinesMove: EventEmitter<IChartEvent<PlotLine>> = new EventEmitter<IChartEvent<PlotLine>>();\n\n @Output()\n pointMove: EventEmitter<IChartEvent<IPointMove>> = new EventEmitter<IChartEvent<IPointMove>>();\n\n @Output()\n chartClick: EventEmitter<IChartEvent<BasePoint>> = new EventEmitter<IChartEvent<BasePoint>>();\n\n @Output()\n chartContextMenu: EventEmitter<IChartEvent<BasePoint>> = new EventEmitter<IChartEvent<BasePoint>>();\n\n @Output()\n annotationContextMenu: EventEmitter<IChartEvent<Annotation>> = new EventEmitter<IChartEvent<Annotation>>();\n\n @Output()\n annotationClick: EventEmitter<IChartEvent<Annotation>> = new EventEmitter<IChartEvent<Annotation>>();\n\n @Output()\n annotationMove: EventEmitter<IChartEvent<Annotation>> = new EventEmitter<IChartEvent<Annotation>>();\n\n @Input() set config(config: IChartConfig) {\n this.chartService.setConfig(config);\n }\n\n private _alive = true;\n\n constructor(public chartService: ChartService,\n private _zoomService: ZoomService,\n private _scaleService: ScaleService) {\n this.svcConfig = this.chartService.config;\n this.hasSeriesData = this.svcConfig.pipe(\n map(\n (_) => _.series?.length > 0 && _.series?.some((_) => _.data?.length > 0)\n )\n );\n }\n\n ngOnChanges(changes: SimpleChanges) {\n }\n\n ngOnInit(): void {\n this.chartService.pointerMove\n .pipe(\n takeWhile(() => this._alive),\n withLatestFrom(this._scaleService.xScaleMap, this._scaleService.yScaleMap, this.chartService.config)\n )\n .subscribe((data: [PointerEvent, Map<number, any>, Map<number, any>, IChartConfig]) => {\n const [event, x, y, config] = data;\n const tooltipTracking = config?.tooltip?.tracking;\n if (tooltipTracking === TooltipTracking.y) {\n const result = new Map<number, number>();\n y.forEach((value, key) => {\n result.set(key, value.invert(event.offsetY));\n });\n this.pointerMove.emit({\n event: event,\n target: result\n });\n } else {\n const result = new Map<number, number>();\n x.forEach((value, key) => {\n result.set(key, value.invert(event.offsetX));\n });\n this.pointerMove.emit({\n event: event,\n target: result\n });\n }\n });\n\n this.chartService.plotBandEvent\n .pipe(takeWhile(() => this._alive))\n .subscribe((_) => {\n this.plotBandsMove.emit(_);\n });\n\n this.chartService.plotLineMove.pipe(takeWhile(() => this._alive)).subscribe((_) => {\n this.plotLinesMove.emit(_);\n });\n\n this.chartService.pointMove.pipe(takeWhile(() => this._alive)).subscribe((_) => {\n this.pointMove.emit(_);\n });\n\n this.chartService.chartClick\n .pipe(\n takeWhile(() => this._alive)\n ).subscribe((_) => {\n this.chartClick.emit(_);\n });\n\n this.chartService.chartContextMenu\n .pipe(\n takeWhile(() => this._alive)\n ).subscribe((_) => {\n this.chartContextMenu.emit(_);\n });\n\n this.chartService.plotBandClick\n .pipe(\n takeWhile(() => this._alive))\n .subscribe((_) => {\n this.plotBandClick.emit(_);\n });\n\n this.chartService.plotBandContextMenu\n .pipe(\n takeWhile(() => this._alive))\n .subscribe((_) => {\n this.plotBandContextMenu.emit(_);\n });\n\n this.chartService.annotationContextMenu\n .pipe(\n takeWhile(() => this._alive))\n .subscribe((_) => {\n this.annotationContextMenu.emit(_);\n });\n\n this.chartService.annotationClick\n .pipe(\n takeWhile(() => this._alive))\n .subscribe((_) => {\n this.annotationClick.emit(_);\n });\n\n this.chartService.annotationMove\n .pipe(\n takeWhile(() => this._alive))\n .subscribe((_) => {\n this.annotationMove.emit(_);\n });\n\n\n }\n\n ngAfterViewInit() {\n }\n\n ngOnDestroy() {\n this._alive = false;\n this._zoomService.broadcastSubscription?.forEach((sub) => {\n sub.unsubscribe();\n });\n }\n}\n","<ng-container *ngIf=\"{\n hasSeriesData: hasSeriesData | async,\n svcConfig: svcConfig | async\n} as data\">\n <ng-container *ngIf=\"data.hasSeriesData === true else noData\">\n <div class=\"column column_auto\">\n <teta-chart-container class=\"chart-container\"></teta-chart-container>\n </div>\n <teta-legend *ngIf=\"data.svcConfig.legend?.enable === true\" [series]=\"data.svcConfig.series\"></teta-legend>\n </ng-container>\n</ng-container>\n<ng-template #noData>\n <div class=\"column column_auto align-center justify-content-center\">\n <span class=\"font-body-3 color-text-40\">Данные отсутствуют</span>\n </div>\n</ng-template>\n","import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {ChartComponent} from './chart/chart.component';\nimport {SeriesHostComponent} from './chart-container/series-host/series-host.component';\nimport {ChartContainerComponent} from './chart-container/chart-container.component';\nimport {LegendComponent} from './legend/legend.component';\nimport {SeriesBaseComponent} from './base/series-base.component';\nimport {LineSeriesComponent} from './chart-container/series/line/line-series.component';\nimport {GridlinesComponent} from './chart-container/gridlines/gridlines.component';\nimport {XAxisComponent} from './chart-container/x-axis/x-axis.component';\nimport {YAxisComponent} from './chart-container/y-axis/y-axis.component';\nimport {PlotlineComponent} from './chart-container/plotline/plotline.component';\nimport {PlotBandComponent} from './chart-container/plotband/plot-band.component';\nimport {BarSeriesComponent} from './chart-container/series/bar/bar-series.component';\nimport {TooltipComponent} from './chart-container/tooltip/tooltip.component';\nimport {ZoomableDirective} from './directives/zoomable.directive';\nimport {BrushableDirective} from './directives/brushable.directive';\nimport {ScatterSeriesComponent} from './chart-container/series/scatter-series/scatter-series.component';\nimport {BlockSeriesComponent} from './chart-container/series/block-series/block-series.component';\nimport {BlockAreaSeriesComponent} from './chart-container/series/block-area-series/block-area-series.component';\nimport {AreaSeriesComponent} from './chart-container/series/area-series/area-series.component';\nimport {AnnotationComponent} from './chart-container/annotation/annotation.component';\nimport {LinearSeriesBase} from './chart-container/series/linear-series-base';\nimport {TuiLetModule} from '@taiga-ui/cdk';\n\n@NgModule({\n declarations: [\n ChartComponent,\n SeriesHostComponent,\n ChartContainerComponent,\n LegendComponent,\n SeriesBaseComponent,\n LinearSeriesBase,\n LineSeriesComponent,\n GridlinesComponent,\n XAxisComponent,\n YAxisComponent,\n PlotlineComponent,\n PlotBandComponent,\n BarSeriesComponent,\n TooltipComponent,\n ZoomableDirective,\n BrushableDirective,\n AreaSeriesComponent,\n ScatterSeriesComponent,\n BlockSeriesComponent,\n BlockAreaSeriesComponent,\n AnnotationComponent,\n ],\n exports: [\n ChartComponent,\n LegendComponent,\n SeriesBaseComponent,\n LineSeriesComponent,\n BarSeriesComponent,\n ScatterSeriesComponent,\n AreaSeriesComponent,\n BlockSeriesComponent,\n BlockAreaSeriesComponent,\n ],\n imports: [CommonModule, TuiLetModule],\n})\nexport class ChartModule {\n}\n","import { SvgAttributes } from './svg-attributes';\n\nexport class PlotBand {\n id?: number | string;\n name?: string;\n from: number;\n to: number;\n label?: string;\n showGrabbers?: boolean;\n draggable?: boolean;\n resizable?: boolean;\n min?: number;\n max?: number;\n style?: {\n plotBand?: SvgAttributes;\n grabbers?: SvgAttributes;\n };\n\n constructor(options?: {\n id?: number | string;\n name?: string;\n from: number;\n to: number;\n label?: string;\n showGrabbers?: boolean;\n draggable?: boolean;\n resizable?: boolean;\n min?: number;\n max?: number;\n style?: {\n plotBand?: SvgAttributes;\n grabbers?: SvgAttributes;\n };\n }) {\n this.id = options?.id;\n this.name = options?.name;\n this.from = options?.from;\n this.to = options?.to;\n this.label = options?.label;\n this.showGrabbers =\n options?.showGrabbers != null ? options.showGrabbers : true;\n this.draggable = options?.draggable != null ? options?.draggable : false;\n this.resizable = options?.resizable != null ? options?.resizable : true;\n this.min = options?.min;\n this.max = options?.max;\n this.style = options?.style;\n }\n}\n","import {SvgAttributes} from './svg-attributes';\n\nexport class PlotLine {\n id?: number | string;\n name?: string;\n value: number;\n label?: string;\n min?: number;\n max?: number;\n draggable?: boolean;\n style?: SvgAttributes;\n\n constructor(options?: {\n id?: number | string;\n name?: string;\n value: number;\n label?: string;\n min?: number;\n max?: number;\n draggable?: boolean;\n style?: SvgAttributes;\n }) {\n this.id = options?.id;\n this.name = options?.name;\n this.value = options?.value;\n this.label = options?.label;\n this.min = options?.min;\n this.max = options?.max;\n this.draggable = options?.draggable;\n this.style = options?.style;\n }\n}\n","/*\n * Public API Surface of chart\n */\n\nexport * from './chart/chart.module';\nexport * from './chart/service/public-api';\nexport * from './chart/base/series-base.component';\nexport * from './chart/chart/chart.component';\nexport * from './chart/legend/legend.component';\nexport * from './chart/model/public-api';\nexport * from './chart/chart-container/series/public-api';\nexport * from './chart/core/axis/axis';\n","/**\n * Generated bundle index. Do not ed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art/model/enum/tooltip-tracking.ts","../../src/chart/model/enum/zoom-behavior-type.ts","../../src/chart/default/default-chart-config.ts","../../src/chart/model/enum/scale-type.ts","../../src/chart/default/default-axis-config.ts","../../src/chart/model/enum/series-type.ts","../../src/chart/model/enum/fill-type.ts","../../src/chart/default/default-series-config.ts","../../src/chart/service/chart.service.ts","../../src/chart/service/zoom.service.ts","../../src/chart/model/enum/axis-orientation.ts","../../src/chart/core/utils/get-text-width.ts","../../src/chart/core/utils/generate-ticks.ts","../../src/chart/core/axis/builders/axis-size-builder.ts","../../src/chart/core/axis/builders/extremes-builder.ts","../../src/chart/core/axis/axis.ts","../../src/chart/service/scale.service.ts","../../src/chart/model/enum/brush-type.ts","../../src/chart/model/i-broadcast-message.ts","../../src/chart/service/broadcast.service.ts","../../src/chart/service/brush.service.ts","../../src/chart/chart-container/tooltip/tooltip.component.ts","../../src/chart/chart-container/tooltip/tooltip.component.html","../../src/chart/chart-container/y-axis/y-axis.component.ts","../../src/chart/chart-container/y-axis/y-axis.component.html","../../src/chart/chart-container/x-axis/x-axis.component.ts","../../src/chart/chart-container/x-axis/x-axis.component.html","../../src/chart/chart-container/gridlines/gridlines.component.ts","../../src/chart/chart-container/gridlines/gridlines.component.html","../../src/chart/chart-container/plotband/plot-band.component.ts","../../src/chart/chart-container/plotband/plot-band.component.html","../../src/chart/chart-container/plotline/plotline.component.ts","../../src/chart/chart-container/plotline/plotline.component.html","../../src/chart/base/series-base.component.ts","../../src/chart/model/enum/drag-point-type.ts","../../src/chart/chart-container/series/linear-series-base.ts","../../src/chart/chart-container/series/line/line-series.component.ts","../../src/chart/chart-container/series/line/line-series.component.html","../../src/chart/chart-container/series/bar/bar-series.component.ts","../../src/chart/chart-container/series/bar/bar-series.component.html","../../src/chart/chart-container/series/scatter-series/scatter-series.component.ts","../../src/chart/chart-container/series/scatter-series/scatter-series.component.html","../../src/chart/chart-container/series/block-series/block-series.component.ts","../../src/chart/chart-container/series/block-series/block-series.component.html","../../src/chart/chart-container/series/block-area-series/block-area-series.component.ts","../../src/chart/chart-container/series/block-area-series/block-area-series.component.html","../../src/chart/chart-container/series/area-series/area-series.component.ts","../../src/chart/chart-container/series/area-series/area-series.component.html","../../src/chart/default/defaultSeriesTypeMapping.ts","../../src/chart/chart-container/series-host/series-host.component.ts","../../src/chart/chart-container/annotation/annotation.component.ts","../../src/chart/chart-container/annotation/annotation.component.html","../../src/chart/directives/zoomable.directive.ts","../../src/chart/directives/brushable.directive.ts","../../src/chart/chart-container/chart-container.component.ts","../../src/chart/chart-container/chart-container.component.html","../../src/chart/legend/legend.component.ts","../../src/chart/legend/legend.component.html","../../src/chart/chart/chart.component.ts","../../src/chart/chart/chart.component.html","../../src/chart/chart.module.ts","../../src/chart/model/plot-band.ts","../../src/chart/model/plot-line.ts","../../src/public-api.ts","../../src/tetacom-svg-charts.ts"],"sourcesContent":["export enum ZoomType {\n x,\n y,\n xy,\n}\n","export class ChartBounds {\n top?: number = 0;\n right?: number = 0;\n bottom?: number = 0;\n left?: number = 0;\n\n constructor(options?: {\n top?: number;\n right?: number;\n bottom?: number;\n left?: number;\n }) {\n this.top = options?.top || 0;\n this.right = options?.right || 0;\n this.bottom = options?.bottom || 0;\n this.left = options?.left || 0;\n }\n}\n","export enum TooltipTracking {\n x,\n y,\n}\n","export enum ZoomBehaviorType {\n move,\n wheel\n}\n","import {IChartConfig} from '../model/i-chart-config';\nimport {ZoomType} from '../model/enum/zoom-type';\nimport {ChartBounds} from '../model/chart-bounds';\nimport {TooltipTracking} from '../model/enum/tooltip-tracking';\nimport {ZoomBehaviorType} from \"../model/enum/zoom-behavior-type\";\n\nexport const defaultChartConfig = (): IChartConfig => ({\n zoom: {\n enable: true,\n type: ZoomType.x,\n zoomBehavior: ZoomBehaviorType.move\n },\n bounds: new ChartBounds(),\n legend: {\n enable: true,\n },\n tooltip: {\n enable: true,\n showMarkers: true,\n tracking: TooltipTracking.x,\n padding: {\n x: 16,\n y: 16\n }\n },\n xAxis: [],\n yAxis: [],\n series: [],\n gridLines: {\n enable: true\n }\n});\n","export enum ScaleType {\n linear,\n log,\n pow,\n sqrt,\n time,\n category,\n}\n","import { AxisOptions } from '../model/axis-options';\nimport { ScaleType } from '../model/enum/scale-type';\n\nexport const defaultAxisConfig: AxisOptions = {\n visible: true,\n zoom: true,\n scaleType: {\n type: ScaleType.linear,\n },\n niceTicks: true,\n};\n","export enum SeriesType {\n line,\n bar,\n area,\n scatter,\n block,\n blockArea\n}\n","export enum FillType {\n default,\n gradient,\n}\nexport enum FillDirection {\n x,\n y,\n}\n","import { Series } from '../model/series';\nimport { BasePoint } from '../model/base-point';\nimport { SeriesType } from '../model/enum/series-type';\nimport { FillType } from '../model/enum/fill-type';\n\nexport const defaultSeriesConfig = (): Series<BasePoint> => ({\n data: [],\n type: SeriesType.line,\n xAxisIndex: 0,\n yAxisIndex: 0,\n fillType: FillType.default,\n color: 'coral',\n});\n","import { Injectable } from '@angular/core';\nimport { IChartConfig } from '../model/i-chart-config';\nimport {\n BehaviorSubject,\n filter,\n map,\n Observable,\n of,\n shareReplay,\n Subject,\n withLatestFrom,\n} from 'rxjs';\nimport { IChartEvent } from '../model/i-chart-event';\nimport { IDisplayTooltip } from '../model/i-display-tooltip';\nimport { PlotBand } from '../model/plot-band';\nimport { PlotLine } from '../model/plot-line';\nimport { IPointMove } from '../model/i-point-move';\nimport { defaultChartConfig } from '../default/default-chart-config';\nimport { defaultAxisConfig } from '../default/default-axis-config';\nimport { defaultSeriesConfig } from '../default/default-series-config';\nimport { BasePoint } from '../model/base-point';\nimport { Series } from '../model/series';\nimport { Annotation } from '../model/annotation';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ChartService {\n public id: Observable<string>;\n public config: Observable<IChartConfig>;\n public size: Observable<DOMRect>;\n public pointerMove: Observable<PointerEvent>;\n public tooltips: Observable<Map<Series<BasePoint>, IDisplayTooltip>>;\n public plotBandEvent: Observable<IChartEvent<PlotBand>>;\n public plotLineMove: Observable<IChartEvent<PlotLine>>;\n public plotBandClick: Observable<IChartEvent<PlotBand>>;\n public plotBandContextMenu: Observable<IChartEvent<PlotBand>>;\n public pointMove: Observable<IChartEvent<IPointMove>>;\n public annotationMove: Observable<IChartEvent<Annotation>>;\n public annotationClick: Observable<IChartEvent<Annotation>>;\n public annotationContextMenu: Observable<IChartEvent<Annotation>>;\n public chartClick: Observable<IChartEvent<BasePoint>>;\n public chartContextMenu: Observable<IChartEvent<BasePoint>>;\n private config$ = new BehaviorSubject<IChartConfig>(defaultChartConfig());\n private size$ = new BehaviorSubject<DOMRect>(new DOMRectReadOnly());\n private pointerMove$ = new Subject<PointerEvent>();\n private tooltips$ = new BehaviorSubject<\n Map<Series<BasePoint>, IDisplayTooltip>\n >(new Map());\n private plotBandEvent$ = new Subject<IChartEvent<PlotBand>>();\n private plotLineMove$ = new Subject<IChartEvent<PlotLine>>();\n private pointMove$ = new Subject<IChartEvent<IPointMove>>();\n private chartClick$ = new Subject<IChartEvent<BasePoint>>();\n private chartContextMenu$ = new Subject<IChartEvent<BasePoint>>();\n private annotationEvent$ = new Subject<IChartEvent<Annotation>>();\n private annotationMove$ = new Subject<IChartEvent<Annotation>>();\n\n constructor() {\n this.id = of((Date.now() + Math.random()).toString(36));\n\n this.config = this.config$.asObservable().pipe(\n withLatestFrom(this.id),\n map(this.setDefaults),\n map(this.setPreparationData),\n shareReplay({\n bufferSize: 1,\n refCount: true,\n })\n );\n\n this.size = this.size$.asObservable();\n\n this.pointerMove = this.pointerMove$.asObservable();\n this.tooltips = this.tooltips$.asObservable();\n this.plotBandEvent = this.plotBandEvent$.asObservable();\n this.plotLineMove = this.plotLineMove$.asObservable();\n this.pointMove = this.pointMove$.asObservable();\n this.chartClick = this.chartClick$.asObservable();\n this.chartContextMenu = this.chartContextMenu$.asObservable();\n this.annotationClick = this.annotationEvent$\n .asObservable()\n .pipe(filter((_) => _?.event?.type === 'click'));\n this.annotationContextMenu = this.annotationEvent$\n .asObservable()\n .pipe(filter((_) => _?.event?.type === 'contextmenu'));\n this.annotationMove = this.annotationMove$.asObservable();\n\n this.plotBandClick = this.plotBandEvent$\n .asObservable()\n .pipe(filter((_) => _?.event?.type === 'click'));\n this.plotBandContextMenu = this.plotBandEvent$\n .asObservable()\n .pipe(filter((_) => _?.event?.type === 'contextmenu'));\n }\n\n public setConfig(config: IChartConfig) {\n this.clearTooltips();\n this.config$.next(config);\n }\n\n public setSize(size: DOMRect) {\n this.size$.next(size);\n }\n\n public setPointerMove(event: PointerEvent) {\n this.pointerMove$.next(event);\n }\n\n public setTooltip(tooltip: IDisplayTooltip) {\n const currentTooltips = this.tooltips$.value;\n if (!tooltip.point) {\n currentTooltips.delete(tooltip.series);\n } else {\n currentTooltips.set(tooltip.series, tooltip);\n }\n this.tooltips$.next(\n new Map<Series<BasePoint>, IDisplayTooltip>(currentTooltips)\n );\n }\n\n public clearTooltips() {\n this.tooltips$.next(new Map());\n }\n\n public emitMoveAnnotation(event: IChartEvent<Annotation>) {\n this.annotationMove$.next(event);\n }\n\n public emitAnnotation(event: IChartEvent<Annotation>) {\n this.annotationEvent$.next(event);\n }\n\n public emitPlotband(event: IChartEvent<PlotBand>) {\n this.plotBandEvent$.next(event);\n }\n\n public emitPlotline(event: IChartEvent<PlotLine>) {\n this.plotLineMove$.next(event);\n }\n\n public emitPoint(event: IChartEvent<IPointMove>) {\n this.pointMove$.next(event);\n }\n\n public emitChartClick(event: IChartEvent<BasePoint>) {\n this.chartClick$.next(event);\n }\n\n public emitChartContextMenu(event: IChartEvent<BasePoint>) {\n this.chartContextMenu$.next(event);\n }\n\n private setDefaults(data: [IChartConfig, string]): IChartConfig {\n let [config, id] = data;\n\n const defaultConfig = (defaultConfig) => {\n return (source) => {\n return Object.assign({}, defaultConfig, source);\n };\n };\n\n config = Object.assign({}, defaultChartConfig(), config);\n config.id = id;\n\n config.xAxis = config.xAxis.map(defaultConfig(defaultAxisConfig));\n config.yAxis = config.yAxis.map(defaultConfig(defaultAxisConfig));\n config.series = config.series.map(defaultConfig(defaultSeriesConfig()));\n\n config.series = config.series.map((_, index) => {\n return {\n ..._,\n id: _.id ?? index,\n };\n });\n\n const oppositeYCount = config.yAxis?.filter((_) => _.opposite);\n const oppositeXCount = config.xAxis?.filter((_) => _.opposite);\n\n const nonOppositeYCount = config.yAxis?.filter((_) => !_.opposite);\n const nonOppositeXCount = config.xAxis?.filter((_) => !_.opposite);\n\n if (nonOppositeXCount?.length > 1) {\n config.bounds.bottom = 0;\n }\n\n if (oppositeXCount?.length > 1) {\n config.bounds.top = 0;\n }\n\n if (nonOppositeYCount?.length > 1) {\n config.bounds.left = 0;\n }\n\n if (oppositeYCount?.length > 1) {\n config.bounds.right = 0;\n }\n\n config.tooltip = Object.assign(\n {},\n defaultChartConfig().tooltip,\n config.tooltip\n );\n\n config.zoom.syncChannel = config.zoom?.syncChannel ?? id;\n\n return config;\n }\n\n private setPreparationData(config: IChartConfig): IChartConfig {\n if (config.inverted) {\n const xAxes = [...config.xAxis];\n const yAxes = [...config.yAxis];\n\n config.xAxis = yAxes;\n config.yAxis = xAxes;\n\n config.series = config.series?.map((serie) => {\n const x = serie.xAxisIndex;\n const y = serie.yAxisIndex;\n serie.xAxisIndex = y;\n serie.yAxisIndex = x;\n return {\n ...serie,\n data: serie?.data?.map((point) => {\n return {\n ...point,\n x: point?.y,\n y: point?.x,\n x1: point?.y1,\n y1: point?.x1,\n };\n }),\n };\n });\n }\n\n if (config?.brush?.enable) {\n config.yAxis = config.yAxis.map((_) => ({ ..._, zoom: false }));\n config.xAxis = config.xAxis.map((_) => ({ ..._, zoom: false }));\n }\n\n return config;\n }\n}\n","import {Injectable} from '@angular/core';\nimport {\n BehaviorSubject,\n Observable,\n shareReplay,\n Subscription,\n} from 'rxjs';\nimport {Axis} from '../core/axis/axis';\nimport {IChartEvent} from '../model/i-chart-event';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ZoomService {\n broadcastSubscription: Subscription[] = [];\n\n zoomed: Observable<IChartEvent<Axis>>;\n private zoomed$ = new BehaviorSubject<IChartEvent<Axis>>(null);\n\n constructor() {\n this.zoomed = this.zoomed$.asObservable().pipe(shareReplay({\n bufferSize: 1,\n refCount: true\n }));\n }\n\n setZoom(zoom: IChartEvent<Axis>) {\n this.zoomed$.next(zoom);\n }\n}\n","export enum AxisOrientation {\n x,\n y\n}\n","export const getTextWidth = (\n inputText?: string | number | null,\n backupRatio = 0.5,\n fontSize = 11\n): number => {\n let text = inputText ?? '';\n text = text.toString();\n\n return fontSize * backupRatio * text.length;\n};\n","import * as d3 from 'd3';\n\nexport function generateTicks(extremes: number[]) {\n const [min, max] = extremes;\n\n const tickCount = 10;\n const tickStep = (max - min) / tickCount;\n\n const ticks = d3\n .range(min, max + tickStep, tickStep)\n .filter((step) => step <= max);\n\n return ticks;\n}\n","import { Axis } from '../axis';\nimport { AxisOrientation } from '../../../model/enum/axis-orientation';\nimport { maxIndex } from 'd3-array';\nimport { getTextWidth } from '../../utils/public-api';\nimport { IBuilder } from '../../../model/i-builder';\n\nexport class AxisSizeBuilder implements IBuilder<Axis, number> {\n private titlePadding = 8;\n private basePadding = 16;\n private backupRatio = 0.58;\n\n build(settings: Axis): number {\n let finalPadding = this.basePadding;\n\n if (settings.orientation === AxisOrientation.y) {\n const formatter = settings.defaultFormatter();\n\n finalPadding += settings.options.title ? this.titlePadding : 0;\n\n const maxElementLengthIndex = maxIndex(\n settings.tickValues,\n (_) => formatter(_).length\n );\n\n finalPadding += getTextWidth(\n formatter(settings.tickValues[maxElementLengthIndex]),\n this.backupRatio\n );\n }\n\n if (settings.orientation === AxisOrientation.x) {\n finalPadding += finalPadding + 20;\n }\n\n return finalPadding;\n }\n}\n","import {IBuilder} from '../../../model/i-builder';\nimport {Axis} from '../axis';\nimport {BasePoint} from '../../../model/base-point';\nimport {AxisOrientation} from '../../../model/enum/axis-orientation';\n\nimport * as d3 from 'd3';\n\nexport class ExtremesBuilder implements IBuilder<Axis, [number, number]> {\n private extentAccessorMap = new Map<AxisOrientation,\n (point: BasePoint) => number>()\n .set(AxisOrientation.x, (_) => _.x)\n .set(AxisOrientation.y, (_) => _.y);\n\n private extremes: [number, number] = [0, 0];\n\n build(settings: Axis): [number, number] {\n const options = settings.options;\n\n const hasMin = options?.min != null;\n const hasMax = options?.max != null;\n\n if (!hasMin || !hasMax) {\n const linkedSeries = settings.linkedSeries();\n const data = linkedSeries.reduce((acc: BasePoint[], current) => {\n return acc.concat(current.data);\n }, []);\n const accessor = this.extentAccessorMap.get(settings.orientation);\n this.extremes = data.length > 1 ? d3.extent(data, accessor) : [0, 0];\n }\n\n if (hasMin) {\n this.extremes[0] = options?.min;\n }\n\n if (hasMax) {\n this.extremes[1] = options?.max;\n }\n return this.extremes;\n }\n}\n","import { IChartConfig } from '../../model/i-chart-config';\nimport { AxisOrientation } from '../../model/enum/axis-orientation';\nimport { Series } from '../../model/series';\nimport { BasePoint } from '../../model/base-point';\nimport * as d3 from 'd3';\nimport { AxisOptions } from '../../model/axis-options';\nimport { AxisSizeBuilder, ExtremesBuilder } from './builders/public-api';\nimport { generateTicks } from '../utils/public-api';\nimport { ScaleType } from '../../model/enum/scale-type';\n\nexport class Axis {\n private chartConfig: IChartConfig;\n private _orientation: AxisOrientation;\n private _index: number;\n private _extremes: [number, number] = [0, 0];\n private _selfSize: number;\n private _ticksValues: number[];\n private _options: AxisOptions;\n private _isFake: boolean;\n\n private defaultFormatters = new Map<ScaleType, any>()\n .set(ScaleType.linear, d3.format(',.2f'))\n .set(ScaleType.time, d3.timeFormat('%B %d, %Y'))\n .set(ScaleType.log, d3.format(',.2f'))\n .set(ScaleType.pow, d3.format(',.2f'))\n .set(ScaleType.sqrt, d3.format(',.2f'));\n\n constructor(config: IChartConfig) {\n this.chartConfig = config;\n }\n\n /**\n * Factory for creating x,y axes\n * @param {AxisOrientation} orientation\n * Axis type\n * @param {IChartConfig} config\n * Chart config\n * @param {number} index\n * Index axis\n * @param {boolean} isFake\n * @return {Axis}\n * New generated axis\n */\n public static createAxis(\n orientation: AxisOrientation,\n config: IChartConfig,\n index: number,\n isFake = false\n ): Axis {\n const axis = new Axis(config);\n axis.setLocate(orientation);\n axis.setIndex(index);\n\n axis.setOptions();\n axis.setExtremes();\n axis.setTicksValues();\n axis.setSelfSize();\n\n axis._isFake = isFake;\n\n return axis;\n }\n\n /**\n *\n * @param {orientation} orientation\n * Set locate axis x or y\n */\n private setLocate(orientation: AxisOrientation): void {\n this._orientation = orientation;\n }\n\n /**\n *\n * @param {number} index\n * Index axis\n */\n private setIndex(index: number): void {\n this._index = index;\n }\n\n /**\n * @return {Array<Series<BasePoint>>}\n * Linked series\n */\n public linkedSeries(): Array<Series<BasePoint>> {\n const linkedFilter = (serie: Series<BasePoint>) =>\n serie[\n this._orientation === AxisOrientation.y ? 'yAxisIndex' : 'xAxisIndex'\n ] === this._index;\n\n return this.chartConfig?.series.filter(linkedFilter);\n }\n\n private setExtremes(): void {\n const builder = new ExtremesBuilder();\n this._extremes = builder.build(this);\n }\n\n private setSelfSize(): void {\n this._selfSize = new AxisSizeBuilder().build(this);\n }\n\n private setTicksValues(): void {\n this._ticksValues = generateTicks(this._extremes);\n }\n\n private setOptions(): void {\n const options =\n this.orientation === AxisOrientation.x\n ? this.chartConfig.xAxis[this.index]\n : this.chartConfig.yAxis[this.index];\n\n this._options = options;\n }\n\n get extremes(): Array<number> {\n return this._extremes;\n }\n\n get orientation(): AxisOrientation {\n return this._orientation;\n }\n\n get selfSize(): number {\n return this._selfSize;\n }\n\n get tickValues(): number[] {\n return this._ticksValues;\n }\n\n get index(): number {\n return this._index;\n }\n\n get options(): AxisOptions {\n return this._options;\n }\n\n get isFake(): boolean {\n return this._isFake;\n }\n\n public defaultFormatter() {\n return this.defaultFormatters.get(this.options.scaleType.type);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as d3 from 'd3';\nimport { D3ZoomEvent, ZoomTransform } from 'd3';\nimport { Axis } from '../core/axis/axis';\nimport { AxisOrientation } from '../model/enum/axis-orientation';\nimport { IChartConfig } from '../model/i-chart-config';\nimport { ChartService } from './chart.service';\nimport {\n combineLatest,\n map,\n Observable,\n shareReplay,\n withLatestFrom,\n} from 'rxjs';\nimport { IChartEvent } from '../model/i-chart-event';\nimport { ZoomService } from './zoom.service';\nimport { ScaleType } from '../model/enum/scale-type';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ScaleService {\n public yAxisMap: Observable<Map<number, Axis>>;\n public xAxisMap: Observable<Map<number, Axis>>;\n\n public yScaleMap: Observable<Map<number, any>>;\n public xScaleMap: Observable<Map<number, any>>;\n\n private transformCacheX = new Map<number, ZoomTransform>();\n private transformCacheY = new Map<number, ZoomTransform>();\n\n private scaleMapping = new Map<ScaleType, any>()\n .set(ScaleType.linear, d3.scaleLinear)\n .set(ScaleType.time, d3.scaleTime)\n .set(ScaleType.category, d3.scaleOrdinal)\n .set(ScaleType.log, d3.scaleLog)\n .set(ScaleType.pow, d3.scalePow)\n .set(ScaleType.sqrt, d3.scaleSqrt);\n\n constructor(\n private chartService: ChartService,\n private zoomService: ZoomService\n ) {\n this.xAxisMap = combineLatest([\n this.chartService.size,\n this.chartService.config,\n ]).pipe(\n map((data: [DOMRectReadOnly, IChartConfig]) => {\n const [, config] = data;\n const map = new Map<number, Axis>();\n config.xAxis.map((_, index) => {\n map.set(index, Axis.createAxis(AxisOrientation.x, config, index));\n });\n return map;\n }),\n shareReplay({\n bufferSize: 1,\n refCount: true,\n })\n );\n\n this.yAxisMap = combineLatest([\n this.chartService.size,\n this.chartService.config,\n ]).pipe(\n map((data: [DOMRectReadOnly, IChartConfig]) => {\n const [, config] = data;\n const map = new Map<number, Axis>();\n config.yAxis.map((_, index) => {\n map.set(index, Axis.createAxis(AxisOrientation.y, config, index));\n });\n\n return map;\n }),\n shareReplay({\n bufferSize: 1,\n refCount: true,\n })\n );\n\n this.xScaleMap = combineLatest([\n this.chartService.size,\n this.chartService.config,\n this.zoomService.zoomed,\n ]).pipe(\n withLatestFrom(this.yAxisMap, this.xAxisMap),\n map(\n (\n data: [\n [DOMRectReadOnly, IChartConfig, IChartEvent<Axis>],\n Map<number, Axis>,\n Map<number, Axis>\n ]\n ) => {\n const [[size, config, zoom], yAxes, xAxes] = data;\n\n const map = new Map<number, any>();\n\n const left = [...yAxes.values()]\n .filter((_) => _.options?.visible && _.options?.opposite)\n .reduce((acc, cur) => acc + cur.selfSize, 0);\n\n const right = [...yAxes.values()]\n .filter((_) => _.options?.visible && _.options?.opposite !== true)\n .reduce((acc, cur) => acc + cur.selfSize, 0);\n\n const finalWidth = (size.width || 0) - left - right;\n\n xAxes.forEach((axis) => {\n let domain = axis.extremes;\n\n if (axis?.options.inverted) {\n domain = [...axis.extremes].reverse();\n }\n\n let scale = this.scaleMapping\n .get(axis.options.scaleType.type)()\n .domain(domain)\n .range([0, finalWidth - config.bounds.right]);\n\n if (axis.options.niceTicks) {\n scale.nice();\n }\n\n if (axis.options.scaleType.type === ScaleType.log) {\n scale.base(axis.options.scaleType.base);\n }\n\n map.set(axis.index, scale);\n\n const hasCache = this.transformCacheX.has(axis.index);\n const shouldRestore =\n zoom?.target?.orientation !== AxisOrientation.x ||\n zoom.target?.index !== axis.index;\n\n if (hasCache && shouldRestore) {\n const restoredTransform = this.transformCacheX.get(axis.index);\n map.set(axis.index, restoredTransform.rescaleX(scale));\n }\n });\n\n if (zoom) {\n const event = zoom.event as D3ZoomEvent<any, any>;\n\n if (zoom.target?.orientation === AxisOrientation.x) {\n const currentScale = map.get(zoom.target.index);\n const rescaled = event.transform.rescaleX(currentScale);\n map.set(zoom.target.index, rescaled);\n\n const axis = xAxes.get(zoom.target.index);\n this.transformCacheX.set(axis.index, event.transform);\n }\n }\n return map;\n }\n ),\n shareReplay({\n bufferSize: 1,\n refCount: true,\n })\n );\n\n this.yScaleMap = combineLatest([\n this.chartService.size,\n this.chartService.config,\n this.zoomService.zoomed,\n ]).pipe(\n withLatestFrom(this.yAxisMap, this.xAxisMap),\n map(\n (\n data: [\n [DOMRectReadOnly, IChartConfig, IChartEvent<Axis>],\n Map<number, Axis>,\n Map<number, Axis>\n ]\n ) => {\n const [[size, config, zoom], yAxes, xAxes] = data;\n\n const map = new Map<number, any>();\n\n const top = [...xAxes.values()]\n .filter((_) => _.options?.visible && _.options?.opposite)\n .reduce((acc, cur) => acc + cur.selfSize, 0);\n\n const bottom = [...xAxes.values()]\n .filter((_) => _.options?.visible && _.options?.opposite !== true)\n .reduce((acc, cur) => acc + cur.selfSize, 0);\n\n const finalHeight =\n (size.height || 0) -\n top -\n bottom -\n config?.bounds?.top -\n config.bounds?.bottom;\n\n yAxes.forEach((axis) => {\n let domain = axis.extremes;\n\n if (axis.orientation === AxisOrientation.y) {\n domain = [...axis.extremes].reverse();\n }\n\n if (axis?.options.inverted) {\n domain = domain.reverse();\n }\n\n const scale = this.scaleMapping\n .get(axis.options.scaleType.type)()\n .domain(domain)\n .range([config.bounds.top, finalHeight]);\n\n if (axis.options.niceTicks) {\n scale.nice();\n }\n\n if (axis.options.scaleType.type === ScaleType.log) {\n scale.base(axis.options.scaleType.base);\n }\n\n map.set(axis.index, scale);\n\n const hasCache = this.transformCacheY.has(axis.index);\n\n const shouldRestore =\n zoom?.target?.orientation !== AxisOrientation.y ||\n zoom.target?.index !== axis.index;\n\n if (hasCache && shouldRestore) {\n const restoredTransform = this.transformCacheY.get(axis.index);\n map.set(axis.index, restoredTransform.rescaleY(scale));\n }\n });\n\n if (zoom) {\n const event = zoom.event as D3ZoomEvent<any, any>;\n\n if (zoom.target?.orientation === AxisOrientation.y) {\n const currentScale = map.get(zoom.target.index);\n const rescaled = event.transform.rescaleY(currentScale);\n map.set(zoom.target.index, rescaled);\n\n const axis = yAxes.get(zoom.target.index);\n this.transformCacheY.set(axis.index, event.transform);\n }\n }\n\n return map;\n }\n ),\n shareReplay({\n bufferSize: 1,\n refCount: true,\n })\n );\n }\n}\n","export enum BrushType {\n x,\n y,\n xy,\n}\n","import {D3BrushEvent, D3ZoomEvent} from 'd3';\nimport {Axis} from '../core/axis/axis';\nimport {BrushType} from './enum/brush-type';\n\nexport class ZoomMessage {\n event: D3ZoomEvent<any, any> | any;\n axis?: Axis;\n brushDomain?: number[];\n chartId: string;\n\n constructor(options?: {\n event: D3ZoomEvent<any, any> | any;\n axis?: Axis;\n brushDomain?: number[]\n chartId: string;\n }) {\n this.event = options?.event;\n this.axis = options?.axis;\n this.brushDomain = options.brushDomain;\n this.chartId = options?.chartId;\n }\n}\n\nexport class BrushMessage {\n event: D3BrushEvent<any>;\n brushType: BrushType;\n selection: number[];\n brushScale?: any;\n\n\n constructor(options?: {\n event: D3BrushEvent<any>;\n brushType: BrushType;\n selection: number[];\n brushScale?: any;\n }) {\n this.event = options?.event;\n this.brushType = options?.brushType;\n this.selection = options?.selection;\n this.brushScale = options?.brushScale;\n }\n}\n\nexport interface IBroadcastMessage<T> {\n channel: string;\n message: T;\n}\n","import { Injectable } from '@angular/core';\nimport {BrushMessage, IBroadcastMessage, ZoomMessage} from '../model/i-broadcast-message';\nimport {filter, map, Observable, ReplaySubject, shareReplay, Subject} from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class BroadcastService {\n private zoomEmitter: Subject<IBroadcastMessage<ZoomMessage>>;\n private brushEmitter: ReplaySubject<IBroadcastMessage<BrushMessage>>;\n\n constructor() {\n this.zoomEmitter = new Subject<IBroadcastMessage<ZoomMessage>>();\n this.brushEmitter = new ReplaySubject<IBroadcastMessage<BrushMessage>>(1)\n }\n\n broadcastZoom(value: IBroadcastMessage<ZoomMessage>) {\n this.zoomEmitter.next(value);\n }\n\n broadcastBrush(value: IBroadcastMessage<BrushMessage>) {\n this.brushEmitter.next(value);\n }\n\n subscribeToZoom(channel: string): Observable<IBroadcastMessage<ZoomMessage>> {\n return this.zoomEmitter.asObservable().pipe(\n filter((msg) => channel && msg.channel === channel),\n shareReplay({\n bufferSize: 1,\n refCount: true\n })\n );\n }\n\n subscribeToBrush(channel: string): Observable<IBroadcastMessage<BrushMessage>> {\n return this.brushEmitter.asObservable().pipe(\n filter((msg) => channel && msg.channel === channel),\n shareReplay({\n bufferSize: 1,\n refCount: true\n })\n );\n }\n}\n","import {ElementRef, Injectable, NgZone} from '@angular/core';\nimport {BrushType} from '../model/enum/brush-type';\nimport * as d3 from 'd3';\nimport {animationFrameScheduler, filter, Subscription, tap} from 'rxjs';\nimport {BroadcastService} from './broadcast.service';\nimport {IChartConfig} from '../model/i-chart-config';\nimport {BrushMessage, IBroadcastMessage, ZoomMessage} from '../model/i-broadcast-message';\nimport {throttleTime} from 'rxjs/operators';\nimport {AxisOrientation} from \"../model/enum/axis-orientation\";\n\n@Injectable({\n providedIn: 'root',\n})\nexport class BrushService {\n broadcastSubscribtion: Subscription;\n\n private brush: d3.BrushBehavior<any>;\n\n private brushMap = new Map<BrushType, d3.BrushBehavior<any>>()\n .set(BrushType.x, d3.brushX())\n .set(BrushType.y, d3.brushY());\n\n private selection: number[];\n\n\n constructor(private broadcastService: BroadcastService, private zone: NgZone) {\n }\n\n applyBrush(\n svgElement: ElementRef,\n config: IChartConfig,\n brushScale: any\n ) {\n this.broadcastSubscribtion?.unsubscribe();\n this.brush?.on('start brush end', null);\n if (config.brush?.enable) {\n this.brush = this.brushMap.get(config?.brush?.type ?? BrushType.x);\n\n const container = d3.select(svgElement.nativeElement);\n\n this.brush.on('start brush end', (_: d3.D3BrushEvent<any>) => {\n if (_.sourceEvent) {\n if (!_.selection) return;\n\n const [from, to] = _.selection as number[];\n\n if (to - from === 0) {\n const selection: number[] = this.selection?.map(brushScale) ?? [config.brush?.from, config.brush?.to].map(brushScale);\n const halfBrushHeight = (selection[1] - selection[0]) / 2;\n\n const invertedSelection: number[] = [from - halfBrushHeight, to + halfBrushHeight].map(brushScale.invert)\n\n if(invertedSelection[1] - invertedSelection[0] > config.brush?.max) {\n container.call(this.brush.move, [Math.floor(invertedSelection[0]), Math.floor(invertedSelection[0] + config.brush?.max)].map(brushScale));\n return;\n }\n\n if(invertedSelection[1] - invertedSelection[0] < config.brush?.min) {\n container.call(this.brush.move, [Math.floor(invertedSelection[0]), Math.ceil(invertedSelection[0] + config.brush?.min)].map(brushScale));\n return;\n }\n\n container.call(this.brush.move, [from - halfBrushHeight, to + halfBrushHeight]);\n return;\n }\n\n\n\n if (brushScale.invert(to) - brushScale.invert(from) > config.brush?.max) {\n container.call(this.brush.move, this.selection ? [this.selection[0], this.selection[0] + config.brush?.max].map(brushScale) : [config.brush?.from, config.brush?.to].map(brushScale));\n return;\n }\n\n if (brushScale.invert(to) - brushScale.invert(from) < config.brush?.min) {\n\n container.call(this.brush.move, this.selection ? [this.selection[0], this.selection[0] + config.brush?.min].map(brushScale) : [config.brush?.from, config.brush?.to].map(brushScale));\n return;\n }\n\n if (_.sourceEvent instanceof MouseEvent) {\n this.selection = _.selection.map(brushScale.invert);\n }\n\n const brushMessage = new BrushMessage({\n event: _,\n selection: [brushScale.invert(from), brushScale.invert(to)],\n brushType: config?.brush?.type ?? BrushType.x,\n brushScale\n });\n\n this.broadcastService.broadcastBrush({\n channel: config?.zoom?.syncChannel,\n message: brushMessage,\n });\n }\n });\n\n\n\n this.zone.runOutsideAngular(() => {\n setTimeout(() => {\n container.call(this.brush);\n\n let domain = brushScale.domain();\n\n\n if (config?.brush?.from) {\n domain[0] = config.brush.from;\n }\n\n if (config?.brush?.to) {\n domain[1] = config.brush.to;\n }\n\n container.call(this.brush.move, this.selection ? this.selection.map(brushScale) : domain.map(brushScale), {});\n\n }, 0);\n })\n\n\n\n this.broadcastSubscribtion = this.broadcastService.subscribeToZoom(config?.zoom?.syncChannel).pipe(\n filter((m: IBroadcastMessage<ZoomMessage>) => {\n return m.message.event.sourceEvent instanceof MouseEvent || m.message.event.sourceEvent instanceof WheelEvent;\n }),\n throttleTime(0, animationFrameScheduler, {trailing: true}),\n tap((m: IBroadcastMessage<ZoomMessage>) => {\n const {message: {brushDomain}} = m;\n\n if(m.message?.axis.index === 0 && m.message?.axis.orientation === AxisOrientation.y && config.brush?.type === BrushType.y || m.message?.axis.orientation === AxisOrientation.x && config.brush?.type === BrushType.x) {\n\n container.call(this.brush.move, [\n brushScale(brushDomain[0]),\n brushScale(brushDomain[1]),\n ]);\n\n if (m.message.event.type === 'end') {\n const brushMessage = new BrushMessage({\n event: null,\n selection: brushDomain,\n brushType: config?.brush?.type ?? BrushType.x,\n brushScale,\n });\n\n this.broadcastService.broadcastBrush({\n channel: config?.zoom?.syncChannel,\n message: brushMessage,\n });\n }\n\n this.selection = brushDomain;\n\n\n\n }\n\n\n\n })\n ).subscribe();\n }\n }\n\n clearPreviousSelection() {\n this.selection = null;\n }\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Input,\n NgZone,\n OnInit,\n} from '@angular/core';\nimport {filter, map, Observable, tap} from 'rxjs';\nimport {ChartService} from '../../service/chart.service';\nimport {ZoomService} from '../../service/zoom.service';\nimport {IDisplayTooltip} from '../../model/i-display-tooltip';\nimport {DomSanitizer, SafeHtml} from '@angular/platform-browser';\nimport {IChartConfig} from '../../model/i-chart-config';\nimport {Series} from '../../model/series';\n\n@Component({\n selector: 'teta-tooltip',\n templateUrl: './tooltip.component.html',\n styleUrls: ['./tooltip.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TooltipComponent implements OnInit {\n @Input() size: DOMRect;\n @Input() config: IChartConfig;\n\n position: Observable<{\n left: string;\n top: string;\n bottom: string;\n right: string;\n }>;\n\n displayTooltips: Observable<SafeHtml>;\n display: Observable<number>;\n\n constructor(\n private svc: ChartService,\n private cdr: ChangeDetectorRef,\n private zoomService: ZoomService,\n private sanitizer: DomSanitizer,\n private _zone: NgZone\n ) {\n }\n\n ngOnInit(): void {\n this.display = this.svc.pointerMove.pipe(\n map((event: PointerEvent) => {\n return event.type === 'mousemove' ? 1 : 0;\n }),\n tap(() => {\n setTimeout(() => {\n this.cdr.detectChanges();\n });\n })\n );\n\n this.position = this.svc.pointerMove.pipe(\n filter((event) => !!event),\n map((_) => {\n return this.getPosition(_);\n }),\n tap(() => this.cdr.detectChanges())\n );\n\n const transformHtml = (html): SafeHtml => {\n return this.sanitizer.bypassSecurityTrustHtml(html);\n };\n\n const defaultFormatter = (tooltips: IDisplayTooltip[]): SafeHtml => {\n let html = '';\n\n tooltips.forEach((_) => {\n const indicatorStyle = `display:block; width: 10px; height: 2px; background-color: ${_?.series?.color}`;\n\n html += `<div class=\"display-flex align-center\"><span class=\"margin-right-1\" style=\"${indicatorStyle}\"></span>\n <span class=\"font-title-3\">${_.series.name}\n <span class=\"font-body-3\">x: ${_.point.x?.toFixed(\n 2\n )} y: ${_.point.y?.toFixed(2)}</span></span></div>`;\n });\n\n return transformHtml(html);\n };\n\n const formatter = this.config?.tooltip?.format;\n\n this.displayTooltips = this.svc.tooltips.pipe(\n map((tooltips: Map<Series<any>, IDisplayTooltip>) => {\n const tooltipList = [...tooltips.values()];\n if (tooltipList?.length < 1) {\n return '';\n }\n const formatted = formatter\n ? transformHtml(formatter(tooltipList))\n : defaultFormatter(tooltipList);\n return formatted;\n })\n );\n }\n\n private getPosition(event: PointerEvent) {\n const centerX = this.size.width / 2;\n const centerY = this.size.height / 2;\n\n const padding = this.config?.tooltip?.padding;\n\n const scene = {\n left: event.pageX > centerX ? 'initial' : `${event.pageX + padding.x}px`,\n top: event.pageY > centerY ? 'initial' : `${event.pageY + padding.y}px`,\n bottom:\n event.pageY > centerY\n ? `${window.innerHeight - event.pageY + padding.y}px`\n : 'initial',\n right:\n event.pageX > centerX\n ? `${window.innerWidth - event.pageX + padding.x}px`\n : 'initial',\n };\n\n return scene;\n }\n}\n","<ng-container *ngIf=\"position | async as p\">\n <div class=\"chart-tooltip color-text-90 bg-background-50 shadow-2 padding-2 border-radius-1\"\n *ngIf=\"displayTooltips | async as tool\"\n [style.position]=\"'fixed'\"\n [style.opacity]=\"display | async\"\n style=\"pointer-events: none; min-width: 200px;\"\n [style.left]=\"p.left\"\n [style.top]=\"p.top\"\n [style.bottom]=\"p.bottom\"\n [style.right]=\"p.right\"\n [innerHTML]=\"tool\">\n </div>\n</ng-container>\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n ViewChild,\n} from '@angular/core';\nimport { Axis } from '../../core/axis/axis';\nimport * as d3 from 'd3';\n\n@Component({\n selector: '[teta-y-axis]',\n templateUrl: './y-axis.component.html',\n styleUrls: ['./y-axis.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class YAxisComponent implements OnInit, AfterViewInit {\n @Input() axis: Axis;\n @Input() set scale(scale: any) {\n this._scale = scale;\n this.draw();\n }\n\n get scale() {\n return this._scale;\n }\n @Input() size: DOMRect;\n @ViewChild('svg', { static: false }) node: ElementRef;\n\n private _alive = true;\n private _scale: any;\n\n constructor() {}\n\n ngOnInit(): void {}\n\n ngOnDestroy(): void {\n this._alive = false;\n }\n\n ngAfterViewInit() {\n this.draw();\n }\n\n getLabelTransform() {\n return `translate(${\n this.axis.options.opposite\n ? this.axis.selfSize - 24\n : -this.axis.selfSize + 24\n }, ${this.size.height / 2}) rotate(${\n this.axis.options.opposite ? '90' : '-90'\n })`;\n }\n\n private draw() {\n if (!this.node || !this.axis) {\n return;\n }\n\n const axis = this.axis.options.opposite\n ? d3\n .axisRight(this.scale)\n .tickFormat(\n this.axis.options.tickFormat ?? this.axis.defaultFormatter()\n )\n : d3\n .axisLeft(this.scale)\n .tickFormat(\n this.axis.options.tickFormat ?? this.axis.defaultFormatter()\n );\n\n d3.select(this.node.nativeElement)\n .call(axis)\n .call((_) => _.select('.domain').remove());\n }\n}\n","<svg:g #svg></svg:g>\n<svg:g class=\"label-axis font-caption\" [attr.transform]=\"getLabelTransform()\">\n <text dy=\"-8px\" text-anchor=\"middle\" dominant-baseline=\"middle\">{{ axis.options.title }}</text>\n</svg:g>\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n SimpleChanges,\n ViewChild,\n} from '@angular/core';\nimport { Axis } from '../../core/axis/axis';\nimport { ScaleService } from '../../service/scale.service';\nimport { ChartService } from '../../service/chart.service';\nimport * as d3 from 'd3';\nimport { ZoomService } from '../../service/zoom.service';\nimport { merge, takeWhile, tap } from 'rxjs';\n\n@Component({\n selector: '[teta-x-axis]',\n templateUrl: './x-axis.component.html',\n styleUrls: ['./x-axis.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class XAxisComponent implements OnInit, OnDestroy, AfterViewInit {\n @Input() axis: Axis;\n @Input() set scale(scale: any) {\n this._scale = scale;\n\n this.draw();\n }\n\n get scale() {\n return this._scale;\n }\n\n @Input() size: DOMRect;\n @ViewChild('svg') node: ElementRef;\n\n private _scale: any;\n private _alive = true;\n\n constructor() {}\n\n ngOnInit(): void {}\n\n ngOnDestroy(): void {\n this._alive = false;\n }\n\n ngAfterViewInit() {\n this.draw();\n }\n\n private draw() {\n if (!this.node || !this.axis) {\n return;\n }\n\n const axis = this.axis.options.opposite\n ? d3\n .axisTop(this.scale)\n .tickFormat(\n this.axis.options.tickFormat ?? this.axis.defaultFormatter()\n )\n : d3\n .axisBottom(this.scale)\n .tickFormat(\n this.axis.options.tickFormat ?? this.axis.defaultFormatter()\n );\n\n d3.select(this.node.nativeElement)\n .call(axis)\n .call((_) => _.select('.domain').remove());\n }\n}\n","<svg:g #svg></svg:g>\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component, Input,\n} from '@angular/core';\n\nimport {ScaleService} from \"../../service/scale.service\";\nimport {map, Observable} from \"rxjs\";\nimport {IChartConfig} from \"../../model/i-chart-config\";\nimport {ChartService} from \"../../service/chart.service\";\n\n@Component({\n selector: '[teta-gridlines]',\n templateUrl: './gridlines.component.html',\n styleUrls: ['./gridlines.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GridlinesComponent implements AfterViewInit {\n\n @Input() size: DOMRect;\n\n config: Observable<IChartConfig>;\n tickYValues: Observable<number[]>;\n tickXValues: Observable<number[]>;\n x: Observable<any>;\n y: Observable<any>;\n\n constructor(private svc: ScaleService, private chartService: ChartService) {\n this.config = this.chartService.config;\n\n this.tickYValues = this.svc.yScaleMap.pipe(map((_) => _.get(0).ticks()));\n this.tickXValues = this.svc.xScaleMap.pipe(map((_) => _.get(0).ticks()));\n\n this.y = this.svc.yScaleMap.pipe(map((_) => _.get(0)));\n this.x = this.svc.xScaleMap.pipe(map((_) => _.get(0)));\n\n\n }\n\n ngAfterViewInit() {\n\n }\n}\n","<ng-container *ngIf=\"{\n xValues: tickXValues | async,\n yValues: tickYValues | async,\n x: x | async,\n y: y | async,\n config: config | async\n} as data\">\n <ng-container *ngIf=\"data.config.gridLines?.showY !== false\">\n <ng-container *ngFor=\"let tick of data.yValues\">\n <svg:line [attr.x1]=\"0\"\n [attr.y1]=\"data.y(tick)\"\n [attr.x2]=\"size?.width\"\n [attr.y2]=\"data.y(tick)\"></svg:line>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"data.config.gridLines?.showX !== false\">\n <ng-container *ngFor=\"let tick of data.xValues\">\n <svg:line [attr.x1]=\"data.x(tick)\"\n [attr.y1]=\"0\"\n [attr.x2]=\"data.x(tick)\"\n [attr.y2]=\"size?.height\"></svg:line>\n </ng-container>\n </ng-container>\n\n</ng-container>\n\n\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostListener,\n Input, OnDestroy\n} from '@angular/core';\n\nimport * as d3 from 'd3';\nimport {PlotBand} from '../../model/plot-band';\nimport {ScaleService} from '../../service/scale.service';\n\nimport {Axis} from '../../core/axis/axis';\nimport {ZoomService} from '../../service/zoom.service';\nimport {AxisOrientation} from '../../model/enum/axis-orientation';\nimport {IChartEvent} from '../../model/i-chart-event';\nimport {ChartService} from '../../service/chart.service';\n\n@Component({\n selector: '[teta-plot-band]',\n templateUrl: './plot-band.component.html',\n styleUrls: ['./plot-band.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PlotBandComponent implements AfterViewInit, OnDestroy {\n @Input() plotBand: PlotBand;\n @Input() axis: Axis;\n @Input() scale: any;\n @Input() size: DOMRect;\n orientation = AxisOrientation;\n resizeElements: any;\n dragElements: any;\n domain: number[];\n\n constructor(\n private scaleService: ScaleService,\n private zoomService: ZoomService,\n private chartService: ChartService,\n private cdr: ChangeDetectorRef,\n private element: ElementRef\n ) {\n }\n\n @HostListener('click', ['$event']) click(event: MouseEvent) {\n this.emit({\n target: this.plotBand,\n event,\n });\n }\n\n @HostListener('contextmenu', ['$event']) contextMenu(event: MouseEvent) {\n this.emit({\n target: this.plotBand,\n event,\n });\n }\n\n emit(event: IChartEvent<PlotBand>) {\n this.chartService.emitPlotband(event);\n }\n\n ngAfterViewInit(): void {\n this.domain = this.scale.domain();\n\n const plotbandElement = d3\n .select(this.element.nativeElement)\n .select('.plotband');\n\n const grabElements = d3\n .select(this.element.nativeElement)\n .selectAll('.grabber');\n\n this.dragElements = d3\n .drag()\n .subject(() => {\n if (this.axis.orientation === AxisOrientation.x) {\n return {x: plotbandElement.attr('x')};\n }\n\n if (this.axis.orientation === AxisOrientation.y) {\n return {y: plotbandElement.attr('y')};\n }\n });\n\n const drag = this.dragElements\n .on(\n 'start drag end',\n (event: d3.D3DragEvent<any, PlotBand, any>, d: PlotBand) => {\n let bandSize = parseFloat(\n plotbandElement.attr(\n this.axis.orientation === AxisOrientation.x ? 'width' : 'height'\n )\n );\n\n d.from = this.scale.invert(\n event[AxisOrientation[this.axis.orientation]]\n );\n\n d.to = this.scale.invert(\n event[AxisOrientation[this.axis.orientation]] + bandSize\n );\n\n this.emit({\n event,\n target: d,\n });\n\n this.cdr.detectChanges();\n }\n );\n\n let grabberKey;\n this.resizeElements = d3\n .drag();\n const resize = this.resizeElements\n .on(\n 'start drag end',\n (event: d3.D3DragEvent<any, PlotBand, any>, d: PlotBand) => {\n requestAnimationFrame(() => {\n if (event?.type === 'start') {\n const {grabber} = event?.sourceEvent?.target?.dataset;\n grabberKey = grabber;\n }\n\n const min = Math.min(...this.domain);\n const max = Math.max(...this.domain);\n\n const minValue = d.min ?? min;\n const maxValue = d.max ?? max;\n\n d[grabberKey] = this.scale.invert(\n event[AxisOrientation[this.axis.orientation]]\n );\n\n if (grabberKey === 'from') {\n const borderMin = d.from <= minValue;\n\n if (d.from >= d.to) {\n d.from = d.to;\n }\n\n if (borderMin) {\n d.from = minValue;\n }\n }\n\n if (grabberKey === 'to') {\n const borderMax = d.to >= maxValue;\n\n if (borderMax) {\n d.to = maxValue;\n }\n\n if (d.to <= d.from) {\n d.to = d.from;\n }\n }\n\n this.emit({\n event,\n target: d,\n });\n\n this.cdr.detectChanges();\n });\n }\n );\n\n plotbandElement.datum<PlotBand>(this.plotBand);\n grabElements.datum<PlotBand>(this.plotBand);\n\n if (this.plotBand.draggable) {\n plotbandElement.call(drag);\n }\n\n if (this.plotBand.resizable) {\n grabElements.call(resize);\n }\n }\n\n ngOnDestroy() {\n this.dragElements.on('start drag end', null);\n this.resizeElements.on('start drag end', null);\n }\n\n get bandSize(): number {\n return Math.abs(\n this.scale(this.plotBand.to) - this.scale(this.plotBand.from)\n );\n }\n\n get height(): number {\n return this.size.height;\n }\n\n get width(): number {\n return this.size.width;\n }\n\n get from(): number {\n return this.scale(this.plotBand.from);\n }\n\n get to(): number {\n return this.scale(this.plotBand.to);\n }\n\n getTextCenter = () => this.scale((this.plotBand.from + this.plotBand.to) / 2);\n\n getFill(d: PlotBand): string {\n if (d.style?.plotBand?.patternImage) {\n return `url(#${d.style.plotBand?.patternImage})`;\n }\n return d.style.plotBand?.fill;\n }\n}\n","<svg:rect\n class=\"plotband\" xmlns:svg=\"http://www.w3.org/1999/html\"\n [class.draggable]=\"plotBand?.draggable === true\"\n [attr.fill]=\"getFill(plotBand)\"\n [attr.opacity]=\"plotBand.style?.plotBand?.opacity\"\n [attr.height]=\"axis.orientation === orientation.x ? height : bandSize\"\n [attr.width]=\"axis.orientation === orientation.x ? bandSize : width\"\n [attr.y]=\"axis.orientation === orientation.y ? from : null\"\n [attr.x]=\"axis.orientation === orientation.x ? from : null\">\n</svg:rect>\n\n<svg:text\n *ngIf=\"axis.orientation === orientation.x\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n class=\"label font-title-2 fill-text-70\"\n [attr.x]=\"getTextCenter()\"\n [attr.transform]=\"'rotate(-90, '+ getTextCenter() +',' + height / 2 + ')'\"\n [attr.y]=\"height / 2\">{{plotBand.label}}\n</svg:text>\n\n<svg:text\n *ngIf=\"axis.orientation === orientation.y\"\n text-anchor=\"middle\"\n class=\"label font-title-2 fill-text-70\"\n dominant-baseline=\"central\"\n [attr.x]=\"getTextCenter()\"\n [attr.y]=\"width / 2\">{{plotBand.label}}\n</svg:text>\n\n<svg:line class=\"display-grabber\"\n *ngIf=\"plotBand.showGrabbers\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'red'\"\n [attr.stroke-width]=\"plotBand.style?.grabbers?.strokeWidth || 4\"\n [attr.stroke-dasharray]=\"plotBand.style?.grabbers?.strokeDasharray\"\n [attr.x1]=\"axis.orientation === orientation.x ? from : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? from : width\"\n [attr.data-grabber]=\"'from'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : from\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : from\">\n</svg:line>\n\n<svg:line class=\"display-grabber\"\n *ngIf=\"plotBand.showGrabbers\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'red'\"\n [attr.stroke-width]=\"plotBand.style?.grabbers?.strokeWidth || 4\"\n [attr.stroke-dasharray]=\"plotBand.style?.grabbers?.strokeDasharray\"\n [attr.x1]=\"axis.orientation === orientation.x ? to : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? to : width\"\n [attr.data-grabber]=\"'to'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : to\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : to\">\n</svg:line>\n\n<svg:line class=\"grabber\"\n [class.x-grabber]=\"axis.orientation === orientation.x\"\n [class.y-grabber]=\"axis.orientation === orientation.y\"\n [class.resizeable]=\"plotBand?.resizable\"\n [attr.stroke]=\"'red'\"\n [attr.stroke-width]=\"8\"\n opacity=\"0\"\n [attr.x1]=\"axis.orientation === orientation.x ? from : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? from : width\"\n [attr.data-grabber]=\"'from'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : from\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : from\">\n</svg:line>\n\n<svg:line class=\"grabber\"\n [class.x-grabber]=\"axis.orientation === orientation.x\"\n [class.y-grabber]=\"axis.orientation === orientation.y\"\n [class.resizeable]=\"plotBand?.resizable\"\n [attr.stroke]=\"'red'\"\n [attr.stroke-width]=\"8\"\n opacity=\"0\"\n [attr.x1]=\"axis.orientation === orientation.x ? to : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? to : width\"\n [attr.data-grabber]=\"'to'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : to\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : to\">\n</svg:line>\n\n\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Input, OnDestroy,\n OnInit,\n} from '@angular/core';\nimport {PlotLine} from '../../model/plot-line';\nimport {Axis} from '../../core/axis/axis';\nimport {AxisOrientation} from '../../model/enum/axis-orientation';\nimport {ZoomService} from '../../service/zoom.service';\nimport {ScaleService} from '../../service/scale.service';\nimport * as d3 from 'd3';\nimport {IChartEvent} from '../../model/i-chart-event';\nimport {ChartService} from '../../service/chart.service';\n\n@Component({\n selector: '[teta-plot-line]',\n templateUrl: './plotline.component.html',\n styleUrls: ['./plotline.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PlotlineComponent implements OnInit, OnDestroy {\n @Input() plotLine: PlotLine;\n @Input() size: DOMRect;\n @Input() axis: Axis;\n @Input() scale: any;\n orientation = AxisOrientation;\n dragElements: any;\n\n private _domain: number[];\n\n constructor(\n private cdr: ChangeDetectorRef,\n private zoomService: ZoomService,\n private scaleService: ScaleService,\n private chartService: ChartService,\n private element: ElementRef\n ) {\n }\n\n ngOnInit(): void {\n this._domain = this.scale.domain();\n\n const plotlineElement = d3\n .select(this.element.nativeElement)\n .select('.plotline');\n\n const grabElement = d3\n .select(this.element.nativeElement)\n .selectAll('.grabber');\n\n this.dragElements = d3\n .drag()\n .subject(() => {\n if (this.axis.orientation === AxisOrientation.y) {\n return {y: plotlineElement.attr('y1')};\n }\n if (this.axis.orientation === AxisOrientation.x) {\n return {x: plotlineElement.attr('x1')};\n }\n });\n const drag = this.dragElements\n .on(\n 'start drag end',\n (event: d3.D3DragEvent<any, PlotLine, any>, d: PlotLine) => {\n d.value = this.scale.invert(\n event[AxisOrientation[this.axis.orientation]]\n );\n\n this.emit({\n event,\n target: d,\n });\n\n this.cdr.detectChanges();\n }\n );\n\n plotlineElement.datum<PlotLine>(this.plotLine);\n grabElement.datum<PlotLine>(this.plotLine);\n\n if (this.plotLine.draggable) {\n grabElement.call(drag);\n }\n }\n\n ngOnDestroy() {\n this.dragElements.on('start drag end', null);\n }\n\n emit(event: IChartEvent<PlotLine>) {\n this.chartService.emitPlotline(event);\n }\n\n get value() {\n return this.scale(this.plotLine.value);\n }\n\n get height(): number {\n return this.size.height;\n }\n\n get width(): number {\n return this.size.width;\n }\n}\n","<svg:line class=\"plotline\"\n [attr.stroke]=\"plotLine.style?.stroke || 'red'\"\n [attr.stroke-width]=\"plotLine.style?.strokeWidth || 4\"\n [attr.stroke-dasharray]=\"plotLine.style?.strokeDasharray\"\n [attr.x1]=\"axis.orientation === orientation.x ? value : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? value : width\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : value\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : value\">\n</svg:line>\n\n\n<svg:text\n *ngIf=\"axis.orientation === orientation.x\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n class=\"label font-title-2 fill-text-70\"\n [attr.x]=\"value\"\n dy=\"2em\"\n [attr.transform]=\"'rotate(-90, '+ value +',' + height / 2 + ')'\"\n [attr.y]=\"height / 2\">{{plotLine.label}}\n</svg:text>\n\n<svg:text\n *ngIf=\"axis.orientation === orientation.y\"\n text-anchor=\"middle\"\n class=\"label font-title-2 fill-text-70\"\n dominant-baseline=\"central\"\n [attr.x]=\"value\"\n [attr.y]=\"width / 2\">{{plotLine.label}}\n</svg:text>\n\n<svg:line class=\"grabber\"\n\n [class.x-grabber]=\"axis.orientation === orientation.x\"\n [class.y-grabber]=\"axis.orientation === orientation.y\"\n [attr.stroke]=\"'red'\"\n [attr.stroke-width]=\"8\"\n opacity=\"0\"\n [attr.x1]=\"axis.orientation === orientation.x ? value : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? value : width\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : value\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : value\">\n</svg:line>\n","import {\n ChangeDetectorRef,\n Component,\n ElementRef,\n Input,\n OnInit,\n} from '@angular/core';\nimport {ChartService} from '../service/chart.service';\nimport {Series} from '../model/series';\nimport {BasePoint} from '../model/base-point';\nimport {ScaleService} from '../service/scale.service';\nimport {ZoomService} from '../service/zoom.service';\nimport {IChartConfig} from '../model/i-chart-config';\n\n@Component({\n template: '',\n})\nexport class SeriesBaseComponent<T extends BasePoint> implements OnInit {\n @Input()\n set config(config: IChartConfig) {\n this._config = config;\n }\n\n get config() {\n return this._config;\n }\n\n @Input()\n set series(series: Series<T>) {\n this._series = series;\n }\n\n get series() {\n return this._series;\n }\n\n protected _series: Series<T>;\n protected _config: IChartConfig;\n\n constructor(\n protected svc: ChartService,\n protected cdr: ChangeDetectorRef,\n protected scaleService: ScaleService,\n protected zoomService: ZoomService,\n protected element: ElementRef\n ) {\n }\n\n ngOnInit(): void {\n }\n}\n","export enum DragPointType {\n x,\n y,\n xy,\n}\n","import {BasePoint} from '../../model/base-point';\nimport {SeriesBaseComponent} from '../../base/series-base.component';\nimport {AfterViewInit, ChangeDetectorRef, Component, ElementRef, OnDestroy, OnInit} from '@angular/core';\nimport {combineLatest, map, Observable, tap, withLatestFrom} from 'rxjs';\nimport {ChartService} from '../../service/chart.service';\nimport {ScaleService} from '../../service/scale.service';\nimport {ZoomService} from '../../service/zoom.service';\nimport * as d3 from 'd3';\nimport {DragPointType} from '../../model/enum/drag-point-type';\nimport {TooltipTracking} from '../../model/enum/tooltip-tracking';\n\n@Component({\n template: '',\n})\nexport class LinearSeriesBase<T extends BasePoint>\n extends SeriesBaseComponent<T>\n implements OnInit, AfterViewInit, OnDestroy {\n transform: Observable<Pick<BasePoint, 'x' | 'y'>>;\n display: Observable<number>;\n path: Observable<string>;\n svgElement: SVGGeometryElement;\n x: any;\n y: any;\n markers: any;\n\n constructor(\n protected override svc: ChartService,\n protected override cdr: ChangeDetectorRef,\n protected override scaleService: ScaleService,\n protected override zoomService: ZoomService,\n protected override element: ElementRef\n ) {\n super(svc, cdr, scaleService, zoomService, element);\n }\n\n override ngOnInit(): void {\n this.transform = this.svc.pointerMove.pipe(\n withLatestFrom(this.scaleService.xScaleMap, this.scaleService.yScaleMap),\n map((data: [PointerEvent, Map<number, any>, Map<number, any>]) => {\n const [event, x, y] = data;\n\n return this.getTransform(event, x, y);\n }),\n tap(() => setTimeout(() => this.cdr.detectChanges()))\n );\n\n this.path = combineLatest([\n this.scaleService.xScaleMap,\n this.scaleService.yScaleMap,\n ]).pipe(\n map((data: [Map<number, any>, Map<number, any>]) => {\n const [x, y] = data;\n this.x = x.get(this.series.xAxisIndex);\n this.y = y.get(this.series.yAxisIndex);\n\n const line = d3\n .line<BasePoint>()\n .defined(\n (point) =>\n point.x !== null &&\n point.y !== null &&\n point.x !== undefined &&\n point.y !== undefined &&\n !isNaN(point.x) &&\n !isNaN(point.y)\n )\n .x((point) => this.x(point.x))\n .y((point) => this.y(point.y));\n return line(this.series.data);\n })\n );\n }\n\n ngOnDestroy() {\n this.markers?.on('start drag end', null);\n this.svc.setTooltip({\n point: null,\n series: this.series,\n });\n }\n\n ngAfterViewInit() {\n const drag = (node, event: d3.D3DragEvent<any, any, any>, d: BasePoint) => {\n if (\n d.marker?.dragType === DragPointType.x ||\n d.marker?.dragType === DragPointType.xy\n ) {\n d.x = this.x.invert(event.x);\n }\n\n if (\n d.marker?.dragType === DragPointType.y ||\n d.marker?.dragType === DragPointType.xy\n ) {\n d.y = this.y.invert(event.y);\n }\n\n this.svc.emitPoint({\n target: {\n series: this.series,\n point: d,\n },\n event,\n });\n\n this.cdr.detectChanges();\n };\n this.markers = d3\n .drag()\n .subject(function (event, d: BasePoint) {\n const node = d3.select(this);\n return {x: node.attr('cx'), y: node.attr('cy')};\n });\n const dragMarkers =\n this.markers.on(\n 'start drag end',\n function (event: d3.D3DragEvent<any, any, any>, d: BasePoint) {\n const node = d3.select(this);\n\n drag(node, event, d);\n }\n );\n\n const draggableMarkers = this.series.data?.filter(\n (_) => _?.marker && _?.marker?.draggable\n );\n\n const element = d3\n .select(this.element.nativeElement)\n .selectAll('.draggable-marker')\n .data(draggableMarkers);\n\n element.call(dragMarkers as any);\n\n this.svgElement = d3\n .select(this.element.nativeElement)\n .select('.line')\n .node() as SVGGeometryElement;\n }\n\n getMarkers() {\n return this.series.data?.filter((_) => _?.marker);\n }\n\n getTransform(\n event: any,\n scaleX: Map<number, any>,\n scaleY: Map<number, any>\n ): Pick<BasePoint, 'x' | 'y'> {\n if (event.type === 'mouseleave') {\n return null;\n }\n const mouse = [event?.offsetX, event?.offsetY];\n const foundX = scaleX.get(this.series.xAxisIndex);\n const foundY = scaleY.get(this.series.yAxisIndex);\n const tooltipTracking = this.config?.tooltip?.tracking;\n const lineIntersection = (\n p0_x,\n p0_y,\n p1_x,\n p1_y,\n p2_x,\n p2_y,\n p3_x,\n p3_y\n ) => {\n const rV = {} as any;\n let s1_x, s1_y, s2_x, s2_y;\n s1_x = p1_x - p0_x;\n s1_y = p1_y - p0_y;\n s2_x = p3_x - p2_x;\n s2_y = p3_y - p2_y;\n\n let s, t;\n s =\n (-s1_y * (p0_x - p2_x) + s1_x * (p0_y - p2_y)) /\n (-s2_x * s1_y + s1_x * s2_y);\n t =\n (s2_x * (p0_y - p2_y) - s2_y * (p0_x - p2_x)) /\n (-s2_x * s1_y + s1_x * s2_y);\n\n if (s >= 0 && s <= 1 && t >= 0 && t <= 1) {\n // Collision detected\n rV.x = p0_x + t * s1_x;\n rV.y = p0_y + t * s1_y;\n }\n\n return rV;\n };\n\n if (tooltipTracking === TooltipTracking.x) {\n const bisect = d3.bisector((_: BasePoint) => _.x).right;\n const pointer = mouse[0];\n\n let x0 = foundX.invert(pointer);\n if (x0 instanceof Date) {\n x0 = x0.getTime();\n }\n const rightId = bisect(this.series.data, x0);\n const range = foundY.range();\n\n const intersect = lineIntersection(\n pointer,\n range[0],\n pointer,\n range[1],\n foundX(this.series.data[rightId - 1]?.x),\n foundY(this.series.data[rightId - 1]?.y),\n foundX(this.series.data[rightId]?.x),\n foundY(this.series.data[rightId]?.y)\n );\n const x = foundX.invert(intersect.x);\n const y = foundY.invert(intersect.y);\n if (x !== null && x !== undefined && !isNaN(x) && y !== null && y !== undefined && !isNaN(y)) {\n this.svc.setTooltip({\n point: {x: foundX.invert(intersect.x), y: foundY.invert(intersect.y)},\n series: this.series,\n });\n } else {\n this.svc.setTooltip({\n point: null,\n series: this.series,\n });\n }\n\n return {\n x: intersect.x,\n y: intersect.y,\n };\n }\n\n if (tooltipTracking === TooltipTracking.y) {\n const bisect = d3.bisector((_: BasePoint) => _.y).right;\n\n let y0 = foundY.invert(mouse[1]);\n if (y0 instanceof Date) {\n y0 = y0.getTime();\n }\n const rightId = bisect(this.series.data, y0);\n const range = foundX.range();\n\n const intersect = lineIntersection(\n range[0],\n mouse[1],\n range[1],\n mouse[1],\n foundX(this.series.data[rightId - 1]?.x),\n foundY(this.series.data[rightId - 1]?.y),\n foundX(this.series.data[rightId]?.x),\n foundY(this.series.data[rightId]?.y)\n );\n\n const x = foundX.invert(intersect.x);\n const y = foundY.invert(intersect.y);\n\n if (x !== null && x !== undefined && !isNaN(x) && y !== null && y !== undefined && !isNaN(y)) {\n this.svc.setTooltip({\n point: {x: foundX.invert(intersect.x), y: foundY.invert(intersect.y)},\n series: this.series,\n });\n } else {\n this.svc.setTooltip({\n point: null,\n series: this.series,\n });\n }\n\n return {\n x: intersect.x,\n y: intersect.y,\n };\n }\n }\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef, OnDestroy,\n OnInit,\n} from '@angular/core';\nimport {ChartService} from '../../../service/chart.service';\nimport {BasePoint} from '../../../model/base-point';\nimport {ScaleService} from '../../../service/scale.service';\nimport {ZoomService} from '../../../service/zoom.service';\nimport {LinearSeriesBase} from '../linear-series-base';\n\n@Component({\n selector: 'svg:svg[teta-line-series]',\n templateUrl: './line-series.component.html',\n styleUrls: ['./line-series.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LineSeriesComponent<T extends BasePoint>\n extends LinearSeriesBase<T>\n implements OnInit, AfterViewInit, OnDestroy {\n\n constructor(\n protected override svc: ChartService,\n protected override cdr: ChangeDetectorRef,\n protected override scaleService: ScaleService,\n protected override zoomService: ZoomService,\n protected override element: ElementRef\n ) {\n super(svc, cdr, scaleService, zoomService, element);\n }\n}\n","<svg:path\n class=\"line\"\n [attr.d]=\"path | async\"\n [attr.stroke]=\"series.color\"\n [attr.stroke-dasharray]=\"series.style?.strokeDasharray\"\n [attr.stroke-width]=\"series.style?.strokeWidth\"\n fill=\"none\">\n</svg:path>\n<ng-container *tuiLet=\"transform | async as t\">\n <svg:circle\n *ngIf=\"t?.x !=null && t?.y!=null\"\n r=\"3\"\n [attr.fill]=\"series.color\"\n [attr.transform]=\"'translate('+ t.x +', '+ t.y +')'\"\n >\n </svg:circle>\n</ng-container>\n<ng-container *ngIf=\"getMarkers() as markers\">\n <svg:circle\n class=\"marker\"\n *ngFor=\"let point of markers\"\n [class.draggable-marker]=\"point?.marker?.draggable\"\n [attr.r]=\"point.marker.style?.radius ?? 5\"\n [attr.fill]=\"point.marker.style?.fill ?? 'transparent'\"\n [attr.stroke]=\"point.marker.style?.stroke ?? 'none'\"\n [attr.stroke-width]=\"point.marker.style?.strokeWidth\"\n [attr.stroke-dasharray]=\"point.marker.style?.strokeDasharray\"\n [attr.cx]=\"x(point.x)\"\n [attr.cy]=\"y(point.y)\"\n >\n </svg:circle>\n</ng-container>\n\n\n\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n OnChanges,\n OnInit,\n SimpleChanges,\n} from '@angular/core';\nimport { SeriesBaseComponent } from '../../../base/series-base.component';\nimport { BasePoint } from '../../../model/base-point';\nimport { ChartService } from '../../../service/chart.service';\nimport { ScaleService } from '../../../service/scale.service';\nimport { ZoomService } from '../../../service/zoom.service';\nimport { map, Observable } from 'rxjs';\nimport { SeriesType } from '../../../model/enum/series-type';\nimport * as d3 from 'd3';\n\n@Component({\n selector: 'svg:svg[teta-bar-series]',\n templateUrl: './bar-series.component.html',\n styleUrls: ['./bar-series.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BarSeriesComponent<T extends BasePoint>\n extends SeriesBaseComponent<T>\n implements OnInit, OnChanges\n{\n x: Observable<any>;\n x1: Observable<any>;\n y: Observable<any>;\n\n barSeriesCount: Observable<number>;\n\n Math: any = Math;\n\n constructor(\n protected override svc: ChartService,\n protected override cdr: ChangeDetectorRef,\n protected override scaleService: ScaleService,\n protected override zoomService: ZoomService,\n protected override element: ElementRef\n ) {\n super(svc, cdr, scaleService, zoomService, element);\n }\n\n override ngOnInit(): void {\n this.barSeriesCount = this.svc.config.pipe(\n map((_) => {\n const count = _.series.filter(\n (_) =>\n _.type === SeriesType.bar && _.xAxisIndex === this.series.xAxisIndex\n );\n\n return count.length;\n })\n );\n\n this.x1 = this.scaleService.xScaleMap.pipe(\n map((_) => {\n const x = _.get(this.series.xAxisIndex);\n const range = x.range();\n const domain = this.series.data.map((_) => _.x);\n\n return d3\n .scaleBand<number>()\n .range([0, range[1]])\n .domain(domain)\n .padding(0.1);\n })\n );\n\n this.x = this.scaleService.xScaleMap.pipe(\n map((_) => _.get(this.series.xAxisIndex))\n );\n\n this.y = this.scaleService.yScaleMap.pipe(\n map((_) => _.get(this.series.yAxisIndex))\n );\n }\n\n mouseenter(point: BasePoint) {\n this.svc.setTooltip({\n point: point,\n series: this.series,\n });\n }\n\n mouseleave(point: BasePoint) {\n this.svc.setTooltip({\n point: null,\n series: this.series,\n });\n }\n\n ngOnChanges(changes: SimpleChanges) {}\n}\n","<ng-container *ngIf=\"{\n x: x | async,\n x1: x1 | async,\n y: y | async,\n barSeriesCount: barSeriesCount | async\n} as data\">\n <ng-container *ngIf=\"data.barSeriesCount > 1\">\n <svg:rect\n *ngFor=\"let point of series.data\"\n (mouseenter)=\"mouseenter(point)\"\n (mouseleave)=\"mouseleave(point)\"\n [attr.x]=\"data.x(point.x) + (series.id * data.x1.bandwidth() / data.barSeriesCount)\"\n [attr.y]=\"point.y > 0 ? data.y(point.y) : data.y(0)\"\n [attr.width]=\"data.x1.bandwidth() / data.barSeriesCount\"\n [attr.height]=\"Math.abs(data.y(point.y) - data.y(0))\"\n [attr.fill]=\"series.color\"\n ></svg:rect>\n </ng-container>\n <ng-container *ngIf=\"data.barSeriesCount === 1\">\n <svg:rect\n *ngFor=\"let point of series.data\"\n (mouseenter)=\"mouseenter(point)\"\n (mouseleave)=\"mouseleave(point)\"\n [attr.x]=\"data.x(point.x)\"\n [attr.y]=\"point.y > 0 ? data.y(point.y) : data.y(0)\"\n [attr.width]=\"data.x1.bandwidth()\"\n [attr.height]=\"Math.abs(data.y(point.y) - data.y(0))\"\n [attr.fill]=\"point.color ?? series.color\"\n ></svg:rect>\n </ng-container>\n</ng-container>\n\n","import {AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, OnInit} from '@angular/core';\nimport {BasePoint} from '../../../model/base-point';\nimport {SeriesBaseComponent} from '../../../base/series-base.component';\nimport {map, Observable} from 'rxjs';\nimport {ChartService} from '../../../service/chart.service';\nimport {ScaleService} from '../../../service/scale.service';\nimport {ZoomService} from '../../../service/zoom.service';\n\n@Component({\n selector: 'svg:svg[teta-scatter-series]',\n templateUrl: './scatter-series.component.html',\n styleUrls: ['./scatter-series.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ScatterSeriesComponent<T extends BasePoint>\n extends SeriesBaseComponent<T>\n implements OnInit, AfterViewInit {\n transform: Observable<Pick<BasePoint, 'x' | 'y'>>;\n display: Observable<number>;\n path: Observable<string>;\n svgElement: SVGGeometryElement;\n x: Observable<any>;\n y: Observable<any>;\n\n constructor(\n protected override svc: ChartService,\n protected override cdr: ChangeDetectorRef,\n protected override scaleService: ScaleService,\n protected override zoomService: ZoomService,\n protected override element: ElementRef\n ) {\n super(svc, cdr, scaleService, zoomService, element);\n }\n\n override ngOnInit(): void {\n this.x = this.scaleService.xScaleMap.pipe(map(_ => _.get(this.series.xAxisIndex)));\n this.y = this.scaleService.yScaleMap.pipe(map(_ => _.get(this.series.yAxisIndex)));\n }\n\n ngAfterViewInit() {\n }\n\n mouseenter(point: BasePoint) {\n this.svc.setTooltip({\n point: point,\n series: this.series,\n });\n }\n\n mouseleave(point: BasePoint) {\n this.svc.setTooltip({\n point: null,\n series: this.series,\n });\n }\n}\n","<ng-container *ngIf=\"{\n y: y | async,\n x: x | async\n} as scales\">\n <svg:circle\n class=\"line\"\n *ngFor=\"let point of series.data\"\n (mouseenter)=\"mouseenter(point)\"\n (mouseleave)=\"mouseleave(point)\"\n [attr.cx]=\"scales.x(point.x)\"\n [attr.cy]=\"scales.y(point.y)\"\n [attr.r]=\"series.style?.radius ?? 1\"\n [attr.stroke]=\"point.color ?? series.color\"\n [attr.fill]=\"point.color ?? series.color\"\n [attr.stroke-width]=\"series.style?.strokeWidth\">\n </svg:circle>\n</ng-container>\n\n\n\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n OnInit,\n} from '@angular/core';\nimport {BasePoint} from '../../../model/base-point';\nimport {SeriesBaseComponent} from '../../../base/series-base.component';\nimport {map, Observable} from 'rxjs';\nimport {ChartService} from '../../../service/chart.service';\nimport {ScaleService} from '../../../service/scale.service';\nimport {ZoomService} from '../../../service/zoom.service';\nimport {FillType} from '../../../model/enum/fill-type';\n\n@Component({\n selector: 'svg:svg[teta-block-series]',\n templateUrl: './block-series.component.html',\n styleUrls: ['./block-series.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BlockSeriesComponent<T extends BasePoint>\n extends SeriesBaseComponent<T>\n implements OnInit, AfterViewInit {\n x: Observable<any>;\n y: Observable<any>;\n displayPoints: Observable<BasePoint[]>;\n fillType = FillType;\n id: string;\n\n constructor(\n protected override svc: ChartService,\n protected override cdr: ChangeDetectorRef,\n protected override scaleService: ScaleService,\n protected override zoomService: ZoomService,\n protected override element: ElementRef\n ) {\n super(svc, cdr, scaleService, zoomService, element);\n this.id = (Date.now() + Math.random()).toString(36);\n\n }\n\n override ngOnInit(): void {\n const defaultVisiblePixels = 0;\n\n this.x = this.scaleService.xScaleMap.pipe(\n map((_) => _.get(this.series.xAxisIndex))\n );\n this.y = this.scaleService.yScaleMap.pipe(\n map((_) => _.get(this.series.yAxisIndex))\n );\n\n this.displayPoints = this.y.pipe(\n map((y) => {\n return this.series.data.filter((point, index, arr) => {\n const height = Math.abs(y(point.y1) - y(point.y));\n const [min, max] = y.domain();\n\n const visibleCondition =\n height > defaultVisiblePixels &&\n (point.y >= min ||\n point.y1 >= min ||\n arr[index + 1]?.y >= min ||\n arr[index + 1]?.y1 >= min) &&\n (point.y <= max ||\n point.y1 <= max ||\n arr[index - 1]?.y <= max ||\n arr[index - 1]?.y1 <= max);\n\n return visibleCondition;\n });\n })\n );\n }\n\n mouseenter(point: BasePoint) {\n this.svc.setTooltip({\n point: point,\n series: this.series,\n });\n }\n\n mouseleave(point: BasePoint) {\n this.svc.setTooltip({\n point: null,\n series: this.series,\n });\n }\n ngAfterViewInit() {\n }\n}\n","<ng-container *ngIf=\"{\n y: y | async,\n x: x | async,\n points: displayPoints | async\n} as data\">\n <svg:defs *ngIf=\"series?.fillType === fillType.gradient\">\n <svg:linearGradient [id]=\"'gradient-fill-' + id\" gradientUnits=\"userSpaceOnUse\"\n x1=\"0%\"\n [attr.y1]=\"config?.inverted ? '0%' : '100%'\"\n [attr.x2]=\"config?.inverted ? '100%' : '0%'\"\n y2=\"0%\">\n <svg:stop offset=\"0%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0\"></svg:stop>\n <svg:stop offset=\"5%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.1\"></svg:stop>\n <svg:stop offset=\"20%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.2\"></svg:stop>\n <svg:stop offset=\"60%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.5\"></svg:stop>\n <svg:stop offset=\"100%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.9\"></svg:stop>\n </svg:linearGradient>\n </svg:defs>\n <ng-container *ngFor=\"let point of data.points\">\n <svg:g (mouseenter)=\"mouseenter(point)\"\n (mouseleave)=\"mouseleave(point)\">\n <svg:rect\n x=\"0\"\n [attr.y]=\"data.y(point.y)\"\n [attr.height]=\"data.y(point.y1) - data.y(point.y)\"\n [attr.fill]=\"series.fillType === fillType.gradient ? 'url(#gradient-fill-'+id+')' : point.iconId ? 'url(#pattern'+point.iconId+')' : point.color ?? series.color\"\n [attr.fill-opacity]=\"series.style?.fillOpacity\"\n width=\"100%\">\n </svg:rect>\n <svg:text *ngIf=\"point.text && data.y(point.y1) - data.y(point.y) > 8\"\n x=\"50%\"\n [attr.y]=\"(data.y(point.y1) + data.y(point.y)) / 2\"\n alignment-baseline=\"middle\"\n text-anchor=\"middle\">{{ point.text }}\n </svg:text>\n <svg:line x1=\"0\" x2=\"100%\" [attr.y1]=\"data.y(point.y)\" [attr.y2]=\"data.y(point.y)\"\n [attr.stroke]=\"point.iconId ? 'var(--color-text-10)' : point.color ?? series.color\"></svg:line>\n <svg:line x1=\"0\" x2=\"100%\" [attr.y1]=\"data.y(point.y1)\" [attr.y2]=\"data.y(point.y1)\"\n [attr.stroke]=\"point.iconId ? 'var(--color-text-10)' : point.color ?? series.color\"></svg:line>\n </svg:g>\n </ng-container>\n\n\n</ng-container>\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n OnInit,\n} from '@angular/core';\nimport {SeriesBaseComponent} from '../../../base/series-base.component';\nimport {BasePoint} from '../../../model/base-point';\nimport {ChartService} from '../../../service/chart.service';\nimport {ScaleService} from '../../../service/scale.service';\nimport {ZoomService} from '../../../service/zoom.service';\nimport {map, Observable} from 'rxjs';\nimport {FillType} from '../../../model/enum/fill-type';\n\n@Component({\n selector: 'svg:svg[teta-block-area-series]',\n templateUrl: './block-area-series.component.html',\n styleUrls: ['./block-area-series.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BlockAreaSeriesComponent<T extends BasePoint>\n extends SeriesBaseComponent<T>\n implements OnInit, AfterViewInit {\n x: Observable<any>;\n y: Observable<any>;\n displayPoints: Observable<BasePoint[]>;\n fillType = FillType;\n id: string;\n\n constructor(\n protected override svc: ChartService,\n protected override cdr: ChangeDetectorRef,\n protected override scaleService: ScaleService,\n protected override zoomService: ZoomService,\n protected override element: ElementRef\n ) {\n super(svc, cdr, scaleService, zoomService, element);\n this.id = (Date.now() + Math.random()).toString(36);\n }\n\n override ngOnInit(): void {\n const defaultVisiblePixels = 3;\n\n this.x = this.scaleService.xScaleMap.pipe(\n map((_) => _.get(this.series.xAxisIndex))\n );\n this.y = this.scaleService.yScaleMap.pipe(\n map((_) => _.get(this.series.yAxisIndex))\n );\n\n this.displayPoints = this.y.pipe(\n map((y) => {\n return this.series.data.filter((point, index, arr) => {\n const height = Math.abs(y(point.y1) - y(point.y));\n const [min, max] = y.domain();\n\n const visibleCondition =\n height > defaultVisiblePixels &&\n (point.y >= min ||\n point.y1 >= min ||\n arr[index + 1]?.y >= min ||\n arr[index + 1]?.y1 >= min) &&\n (point.y <= max ||\n point.y1 <= max ||\n arr[index - 1]?.y <= max ||\n arr[index - 1]?.y1 <= max);\n\n return visibleCondition;\n });\n })\n );\n }\n\n ngAfterViewInit() {\n }\n\n mouseenter(point: BasePoint) {\n this.svc.setTooltip({\n point: point,\n series: this.series,\n });\n }\n\n mouseleave(point: BasePoint) {\n this.svc.setTooltip({\n point: null,\n series: this.series,\n });\n }\n}\n","<ng-container *ngIf=\"{\n y: y | async,\n x: x | async,\n points: displayPoints | async\n} as data\">\n <svg:defs *ngIf=\"series?.fillType === fillType.gradient\">\n <svg:linearGradient [id]=\"'gradient-fill-' + id\"\n gradientUnits=\"userSpaceOnUse\"\n x1=\"0%\"\n [attr.y1]=\"config?.inverted ? '0%' : '100%'\"\n [attr.x2]=\"config?.inverted ? '100%' : '0%'\"\n y2=\"0%\">\n <svg:stop offset=\"0%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0\"></svg:stop>\n <svg:stop offset=\"5%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.1\"></svg:stop>\n <svg:stop offset=\"20%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.2\"></svg:stop>\n <svg:stop offset=\"60%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.5\"></svg:stop>\n <svg:stop offset=\"100%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.9\"></svg:stop>\n </svg:linearGradient>\n </svg:defs>\n <ng-container *ngFor=\"let point of data.points\">\n <svg:g (mouseenter)=\"mouseenter(point)\"\n (mouseleave)=\"mouseleave(point)\">\n <svg:rect\n *ngIf=\"!!config.inverted\"\n [attr.x]=\"data.x(0) < data.x(point.x) ? data.x(0) : data.x(point.x)\"\n [attr.y]=\"data.y(point.y)\"\n [attr.height]=\"data.y(point.y1) - data.y(point.y)\"\n [attr.width]=\"data.x(0) < data.x(point.x) ? data.x(point.x) - data.x(0) : data.x(0) - data.x(point.x)\"\n [attr.stroke]=\"point.iconId ? '' : point.color ?? series.color\"\n [attr.stroke-dasharray]=\"series.style?.strokeDasharray\"\n [attr.stroke-width]=\"series.style?.strokeWidth\"\n [attr.fill]=\"series.fillType === fillType.gradient ? 'url(#gradient-fill-'+id+')' : point.iconId ? 'url(#pattern'+point.iconId+')' : point.color ?? series.color\"\n [attr.fill-opacity]=\"series.style?.fillOpacity\">\n </svg:rect>\n <svg:rect\n *ngIf=\"!config.inverted\"\n [attr.x]=\"data.x(point.x)\"\n [attr.y]=\"data.y(0)\"\n [attr.height]=\"data.y(0) - data.y(point.y)\"\n [attr.width]=\"data.x(point.x1) - data.x(point.x)\"\n [attr.stroke]=\"point.iconId ? '' : point.color ?? series.color\"\n [attr.stroke-dasharray]=\"series.style?.strokeDasharray\"\n [attr.stroke-width]=\"series.style?.strokeWidth\"\n [attr.fill]=\"series.fillType === fillType.gradient ? 'url(#gradient-fill-'+id+')' : point.iconId ? 'url(#pattern'+point.iconId+')' : point.color ?? series.color\"\n [attr.fill-opacity]=\"series.style?.fillOpacity\">\n </svg:rect>\n <svg:text *ngIf=\"point.text\"\n x=\"50%\"\n [attr.y]=\"(data.y(point.y1) + data.y(point.y)) / 2\"\n alignment-baseline=\"middle\"\n text-anchor=\"middle\">{{ point.text }}\n </svg:text>\n\n <!-- <svg:line x1=\"0\" x2=\"100%\" [attr.y1]=\"data.y(point.y)\" [attr.y2]=\"data.y(point.y)\" [attr.stroke]=\"point.iconId ? 'var(--color-text-10)' : point.color ?? series.color\"></svg:line>-->\n <!-- <svg:line x1=\"0\" x2=\"100%\" [attr.y1]=\"data.y(point.y1)\" [attr.y2]=\"data.y(point.y1)\" [attr.stroke]=\"point.iconId ? 'var(--color-text-10)' : point.color ?? series.color\"></svg:line>-->\n\n </svg:g>\n </ng-container>\n\n\n</ng-container>\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef, OnDestroy,\n OnInit,\n} from '@angular/core';\nimport {BasePoint} from '../../../model/base-point';\nimport {ChartService} from '../../../service/chart.service';\nimport {ScaleService} from '../../../service/scale.service';\nimport {ZoomService} from '../../../service/zoom.service';\nimport {FillDirection, FillType} from '../../../model/enum/fill-type';\nimport {LinearSeriesBase} from '../linear-series-base';\nimport {combineLatest, map, Observable} from 'rxjs';\nimport * as d3 from 'd3';\n\n@Component({\n selector: 'svg:svg[teta-area-series]',\n templateUrl: './area-series.component.html',\n styleUrls: ['./area-series.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AreaSeriesComponent<T extends BasePoint>\n extends LinearSeriesBase<T>\n implements OnInit, AfterViewInit, OnDestroy {\n areaPath: Observable<string>;\n\n fillDirection = FillDirection;\n fillType = FillType;\n id: string;\n\n constructor(\n protected override svc: ChartService,\n protected override cdr: ChangeDetectorRef,\n protected override scaleService: ScaleService,\n protected override zoomService: ZoomService,\n protected override element: ElementRef\n ) {\n super(svc, cdr, scaleService, zoomService, element);\n this.id = (Date.now() + Math.random()).toString(36);\n }\n\n override ngOnInit() {\n super.ngOnInit();\n this.areaPath = combineLatest([\n this.scaleService.xScaleMap,\n this.scaleService.yScaleMap,\n ]).pipe(\n map(\n (\n data: [Map<number, any>, Map<number, any>]\n ) => {\n const [x, y] = data;\n this.x = x.get(this.series.xAxisIndex);\n this.y = y.get(this.series.yAxisIndex);\n this.x = x.get(this.series.xAxisIndex);\n this.y = y.get(this.series.yAxisIndex);\n\n const area = d3\n .area<BasePoint>()\n .defined(\n (point) =>\n point.x !== null &&\n point.y !== null &&\n !isNaN(point.x) &&\n !isNaN(point.y)\n );\n\n area\n .x1((_) =>\n _.x1 !== null && _.x1 !== undefined ? this.x(_.x1) : this.x(0)\n )\n .x0((_) => this.x(_.x))\n\n .y((_) =>\n this.y(_.y)\n );\n return area(this.series.data);\n }\n )\n );\n }\n}\n","<svg:defs *ngIf=\"series?.fillType === fillType.gradient\">\n <svg:linearGradient [id]=\"'gradient-fill-' + id\" gradientUnits=\"userSpaceOnUse\"\n x1=\"0%\"\n [attr.y1]=\"config?.inverted || series?.fillDirection === fillDirection.y ? '0%' : '100%'\"\n [attr.x2]=\"config?.inverted || series?.fillDirection === fillDirection.y ? '100%' : '0%'\"\n y2=\"0%\">\n <svg:stop offset=\"0%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0\"></svg:stop>\n <svg:stop offset=\"5%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.1\"></svg:stop>\n <svg:stop offset=\"20%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.2\"></svg:stop>\n <svg:stop offset=\"60%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.5\"></svg:stop>\n <svg:stop offset=\"100%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.8\"></svg:stop>\n </svg:linearGradient>\n</svg:defs>\n<svg:path\n class=\"area\"\n [attr.d]=\"areaPath | async\"\n [attr.stroke-width]=\"0\"\n [attr.fill-opacity]=\"series.style?.fillOpacity\"\n [attr.fill]=\"series.fillType === fillType.gradient ? 'url(#gradient-fill-'+id+')' : series.style.fill ?? series.color\">\n</svg:path>\n<svg:path\n class=\"area\"\n fill=\"none\"\n [attr.d]=\"path | async\"\n [attr.stroke]=\"series.color\"\n [attr.stroke-dasharray]=\"series.style?.strokeDasharray\"\n [attr.stroke-width]=\"series.style?.strokeWidth\">\n</svg:path>\n<ng-container *tuiLet=\"transform | async as t\">\n <svg:circle\n *ngIf=\"t?.x !=null && t?.y !=null\"\n r=\"3\"\n [attr.fill]=\"series.color\"\n [attr.transform]=\"'translate('+ t.x +', '+ t.y +')'\"\n >\n </svg:circle>\n</ng-container>\n<ng-container *ngIf=\"getMarkers() as markers\">\n <svg:circle\n class=\"marker\"\n *ngFor=\"let point of markers\"\n [class.draggable-marker]=\"point?.marker?.draggable\"\n [attr.r]=\"point.marker.style?.radius ?? 5\"\n [attr.fill]=\"point.marker.style?.fill ?? 'transparent'\"\n [attr.stroke]=\"point.marker.style?.stroke ?? 'none'\"\n [attr.stroke-width]=\"point.marker.style?.strokeWidth\"\n [attr.stroke-dasharray]=\"point.marker.style?.strokeDasharray\"\n [attr.cx]=\"x(point.x)\"\n [attr.cy]=\"y(point.y)\"\n >\n </svg:circle>\n</ng-container>\n\n\n\n","import {SeriesType} from '../model/enum/series-type';\nimport {SeriesBaseComponent} from '../base/series-base.component';\nimport {LineSeriesComponent} from '../chart-container/series/line/line-series.component';\nimport {BarSeriesComponent} from '../chart-container/series/bar/bar-series.component';\nimport {ScatterSeriesComponent} from '../chart-container/series/scatter-series/scatter-series.component';\nimport {BlockSeriesComponent} from '../chart-container/series/block-series/block-series.component';\nimport {BlockAreaSeriesComponent} from '../chart-container/series/block-area-series/block-area-series.component';\nimport {AreaSeriesComponent} from '../chart-container/series/area-series/area-series.component';\n\nexport const defaultSeriesTypeMapping = new Map<SeriesType,\n typeof SeriesBaseComponent>()\n .set(SeriesType.line, LineSeriesComponent)\n .set(SeriesType.bar, BarSeriesComponent)\n .set(SeriesType.scatter, ScatterSeriesComponent)\n .set(SeriesType.block, BlockSeriesComponent)\n .set(SeriesType.area, AreaSeriesComponent)\n .set(SeriesType.blockArea, BlockAreaSeriesComponent);\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ComponentRef,\n Input, OnDestroy,\n OnInit,\n SimpleChanges,\n ViewContainerRef,\n} from '@angular/core';\nimport {SeriesBaseComponent} from '../../base/series-base.component';\nimport {LineSeriesComponent} from '../series/line/line-series.component';\nimport {Series} from '../../model/series';\nimport {BasePoint} from '../../model/base-point';\nimport {IChartConfig} from '../../model/i-chart-config';\nimport {defaultSeriesTypeMapping} from '../../default/defaultSeriesTypeMapping';\n\n@Component({\n selector: '[teta-series-host]',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SeriesHostComponent<T extends BasePoint> implements OnInit, OnDestroy {\n @Input() config: IChartConfig;\n @Input() series: Series<T>;\n\n private _init = false;\n private _componentRef: ComponentRef<any>;\n\n constructor(\n private viewContainerRef: ViewContainerRef\n ) {\n }\n\n ngOnInit(): void {\n if (!SeriesBaseComponent.isPrototypeOf(this.series.component)) {\n this.series.component =\n defaultSeriesTypeMapping.get(this.series.type) || LineSeriesComponent;\n }\n\n this._componentRef = this.viewContainerRef.createComponent(\n this.series.component\n );\n this._componentRef.instance.config = this.config;\n this._componentRef.instance.series = this.series;\n this._init = true;\n }\n\n ngOnDestroy(): void {\n this._componentRef.destroy();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (this._init && (changes.hasOwnProperty('series') || changes.hasOwnProperty('config'))) {\n this._componentRef.instance.config = this.config;\n this._componentRef.instance.series = this.series;\n this._componentRef.injector.get(ChangeDetectorRef).detectChanges();\n }\n }\n}\n","import {\n ChangeDetectionStrategy, ChangeDetectorRef,\n Component,\n ElementRef, HostListener,\n Input, OnDestroy,\n ViewChild,\n} from '@angular/core';\nimport {Annotation} from '../../model/annotation';\nimport * as d3 from 'd3';\nimport {map, Observable} from 'rxjs';\nimport {ScaleService} from '../../service/scale.service';\nimport {ChartService} from '../../service/chart.service';\n\n@Component({\n selector: '[teta-annotation]',\n templateUrl: './annotation.component.html',\n styleUrls: ['./annotation.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class AnnotationComponent implements OnDestroy {\n @Input() set annotation(annotation: Annotation) {\n this._annotation = annotation;\n }\n\n get annotation(): Annotation {\n return this._annotation;\n }\n\n @ViewChild('annotationNode', {static: false})\n set node(node: ElementRef) {\n this._node = node;\n this.init();\n this.cdr.detectChanges();\n }\n\n get node() {\n return this._node;\n }\n\n x: Observable<any>;\n y: Observable<any>;\n\n private drag: d3.DragBehavior<any, any, any>;\n private _annotation: Annotation;\n private _node: ElementRef;\n\n constructor(\n private scaleService: ScaleService,\n private cdr: ChangeDetectorRef,\n private chartService: ChartService) {\n this.x = this.scaleService.xScaleMap.pipe(map((_) => _.get(this.annotation.xAxisIndex ?? 0)));\n this.y = this.scaleService.yScaleMap.pipe(map((_) => _.get(this.annotation.yAxisIndex ?? 0)));\n this.drag = d3.drag();\n }\n\n @HostListener('click', ['$event']) click(event: MouseEvent) {\n this.chartService.emitAnnotation({\n event,\n target: this.annotation\n });\n }\n\n @HostListener('contextmenu', ['$event']) contextMenu(event: MouseEvent) {\n this.chartService.emitAnnotation({\n event,\n target: this.annotation\n });\n }\n\n\n ngOnDestroy() {\n this.drag.on('drag end', null);\n }\n\n private init() {\n\n d3.select(this.node.nativeElement).datum(this.annotation);\n\n if (this.annotation.draggable) {\n this.drag.on('drag end', (event, d: Annotation) => {\n d.dx += event.dx;\n d.dy += event.dy;\n this.cdr.detectChanges();\n this.chartService.emitMoveAnnotation({\n event,\n target: d\n });\n });\n d3.select(this.node.nativeElement).call(this.drag);\n }\n }\n}\n","<ng-container *ngIf=\"{\n x: x | async,\n y: y | async\n } as data\">\n <svg:circle\n [attr.r]=\"annotation.style?.radius ?? 5\"\n [attr.cx]=\"data.x(annotation.point.x)\"\n [attr.fill]=\"annotation?.style?.fill ?? 'var(--color-text-90)'\"\n [attr.cy]=\"data.y(annotation.point.y)\">\n </svg:circle>\n <svg:line\n [attr.x1]=\"data.x(annotation.point.x)\"\n [attr.y1]=\"data.y(annotation.point.y)\"\n [attr.x2]=\"data.x(annotation.point.x) + (annotation.dx ?? 0)\"\n [attr.y2]=\"data.y(annotation.point.y) + (annotation.dy ?? 0)\"\n [attr.stroke]=\"annotation.style?.stroke ?? 'var(--color-text-90)'\"\n [attr.stroke-width]=\"annotation.style?.strokeWidth ?? 1\"\n [attr.stroke-dasharray]=\"annotation.style?.strokeDasharray ?? null\"\n >\n </svg:line>\n <svg:foreignObject\n class=\"position-absolute\"\n [attr.width]=\"node?.nativeElement.offsetWidth ?? 0\"\n [attr.height]=\"node?.nativeElement.offsetHeight ?? 0\"\n [attr.x]=\"data.x(annotation.point.x) + (annotation.dx ?? 0) - 10\"\n [attr.y]=\"data.y(annotation.point.y) + (annotation.dy ?? 0) - 10\">\n <div\n #annotationNode\n [style.background-color]=\"annotation.style?.fill ?? 'var(--color-text-90)'\"\n [style.cursor]=\"annotation?.draggable ? 'move' : 'default'\"\n class=\"color-text-10 padding-h-2\"\n style=\"border-radius: 2px; display: inline-block;\">\n <ng-container *ngIf=\"annotation.template;else default\">\n <ng-container *ngTemplateOutlet=\"annotation.template;context: {$implicit: annotation}\"></ng-container>\n </ng-container>\n </div>\n </svg:foreignObject>\n</ng-container>\n<ng-template #default>\n {{ annotation.note?.label}}\n</ng-template>\n","import {AfterViewInit, Directive, ElementRef, HostBinding, Input, NgZone, OnDestroy,} from '@angular/core';\nimport {ZoomService} from '../service/zoom.service';\nimport {IChartConfig} from '../model/i-chart-config';\nimport {Axis} from '../core/axis/axis';\nimport * as d3 from 'd3';\nimport {D3ZoomEvent, ZoomBehavior, zoomIdentity} from 'd3';\nimport {ZoomType} from '../model/enum/zoom-type';\nimport {AxisOrientation} from '../model/enum/axis-orientation';\nimport {BrushMessage, IBroadcastMessage, ZoomMessage} from '../model/i-broadcast-message';\nimport {BrushType} from '../model/enum/brush-type';\nimport {BroadcastService} from '../service/broadcast.service';\nimport {debounceTime, tap} from 'rxjs/operators';\nimport {combineLatest, filter, takeWhile} from 'rxjs';\nimport {ChartService} from \"../service/chart.service\";\nimport {ZoomBehaviorType} from \"../model/enum/zoom-behavior-type\";\n\n@Directive({\n selector: '[tetaZoomable]',\n})\nexport class ZoomableDirective implements OnDestroy, AfterViewInit {\n @Input() config: IChartConfig;\n @Input() axis?: Axis;\n @Input() size: DOMRect;\n @Input() brushScale?: any;\n\n\n @HostBinding('class.zoomable') private zoomable = false;\n\n private _element: d3.Selection<SVGElement, any, any, any>;\n private zoomAxis: Axis;\n private zoom: ZoomBehavior<any, any>;\n private alive = true;\n\n private currentTransform = zoomIdentity;\n private currentSelection;\n\n constructor(\n private elementRef: ElementRef,\n private zoomService: ZoomService,\n private broadcastService: BroadcastService,\n private chartService: ChartService,\n private zone: NgZone\n ) {\n }\n\n ngOnInit() {\n if (this.axis?.options?.zoom || this.config?.zoom?.enable) {\n this.zoomable = this.config?.zoom?.zoomBehavior === ZoomBehaviorType.move;\n }\n }\n\n\n zoomed = (event: D3ZoomEvent<any, any>) => {\n\n if (event.sourceEvent) {\n if (Object.keys(event.sourceEvent).length !== 0) {\n if (this.currentTransform === event.transform && event.type !== 'end') {\n return;\n }\n\n const origin = this.brushScale.copy().domain(this.zoomAxis.extremes);\n\n let domain = this.config.zoom?.type === ZoomType.y ?\n event.transform.rescaleY(origin).domain() :\n event.transform.rescaleX(origin).domain();\n\n const message = new ZoomMessage({\n event,\n axis: this.zoomAxis,\n brushDomain: domain,\n chartId: this.config.id\n });\n\n this.broadcastService.broadcastZoom({\n channel: this.config?.zoom?.syncChannel,\n message,\n });\n }\n\n this.zoomService.setZoom({\n event,\n target: this.zoomAxis\n });\n\n this.currentTransform = event.transform;\n }\n };\n\n ngAfterViewInit() {\n\n const enable = this.axis?.options?.zoom && this.axis?.options.visible !== false || this.config?.zoom?.enable;\n\n if (!enable) {\n return;\n }\n\n this._element = d3.select(this.elementRef.nativeElement);\n this.zoom = d3\n .zoom()\n .extent([\n [0, 0],\n [this.size.width, this.size.height],\n ]);\n\n if (this.config.zoom?.limitTranslateByData) {\n this.zoom.translateExtent([[0, 0], [this.size.width, this.size.height]])\n }\n\n\n const commonZoomAxis = Axis.createAxis(\n this.config?.zoom.type === ZoomType.x ? AxisOrientation.x : AxisOrientation.y,\n this.config,\n 0,\n true\n );\n\n this.zoomAxis = this.axis ?? commonZoomAxis;\n\n if (enable) {\n\n const maxZoom = this.config.zoom?.max ? (this.zoomAxis.extremes[1] - this.zoomAxis.extremes[0]) / this.config.zoom?.max : this.config.zoom?.limitZoomByData ? 1 : 0;\n const minZoom = this.config.zoom?.min ? (this.zoomAxis.extremes[1] - this.zoomAxis.extremes[0]) / this.config.zoom?.min : Infinity;\n\n this.zoom.scaleExtent([maxZoom, minZoom]);\n\n this.zoom.on('start zoom end', this.zoomed)\n this._element.call(this.zoom).on('dblclick.zoom', null)\n\n\n if(this.config?.zoom?.zoomBehavior === ZoomBehaviorType.wheel) {\n\n let wheeling;\n let type: 'start' | 'zoom' | 'end' = 'start';\n\n const origin = this.brushScale.copy().domain(this.zoomAxis.extremes);\n\n this.zoom\n .filter((event) => event.ctrlKey && event.type === 'wheel')\n .wheelDelta((event) => {\n const delta = this.config?.zoom.type === ZoomType.x ? -event.deltaX : -event.deltaY\n return delta * 0.002\n })\n\n this._element.on('wheel', (event) => {\n event.preventDefault();\n\n if(event.ctrlKey) {\n return;\n }\n\n\n const emit = (type: string) => {\n\n let transform = zoomIdentity;\n const delta = type === 'end' ? 0 : this.config.zoom?.type === ZoomType.y ? event.deltaY : event.deltaX;\n\n if(this.config.zoom?.type === ZoomType.y) {\n transform = transform.translate(0, this.currentTransform.y - delta / 2);\n }\n\n if(this.config.zoom?.type === ZoomType.x) {\n transform = transform.translate(this.currentTransform.x - delta / 2, 0);\n }\n\n transform = transform.scale(this.currentTransform.k);\n\n let domain = this.config.zoom?.type === ZoomType.y ?\n transform.rescaleY(origin).domain() :\n transform.rescaleX(origin).domain();\n\n\n const message = new ZoomMessage({\n event: {\n sourceEvent: event,\n transform,\n type\n },\n axis: this.zoomAxis,\n brushDomain: domain,\n chartId: this.config.id\n });\n\n this.zoomService.setZoom({\n event: {\n sourceEvent: event,\n transform,\n type\n },\n target: this.zoomAxis\n });\n\n this.broadcastService.broadcastZoom({\n channel: this.config?.zoom?.syncChannel,\n message,\n });\n\n this._element.call(this.zoom.transform, transform);\n\n this.currentTransform = transform;\n }\n\n this.zone.runOutsideAngular(() => {\n clearTimeout(wheeling);\n emit(type)\n type = 'zoom';\n wheeling = setTimeout(() => {\n type = 'end';\n emit(type)\n type = 'start';\n }, 300)\n })\n\n })\n }\n }\n\n\n // Subscribe to zoom events\n this.broadcastService.subscribeToZoom(this.config?.zoom.syncChannel).pipe(\n takeWhile((_) => this.alive),\n filter((m: IBroadcastMessage<ZoomMessage>) => m.message.event.sourceEvent instanceof MouseEvent || m.message.event.sourceEvent instanceof WheelEvent),\n filter((m: IBroadcastMessage<ZoomMessage>) => {\n return this.zoomAxis.index === m.message?.axis?.index && this.zoomAxis.orientation === m.message?.axis?.orientation;\n }),\n tap((m: IBroadcastMessage<ZoomMessage>) => {\n if (this.config.id !== m.message.chartId) {\n this._element.call(this.zoom.transform, m.message.event.transform, null, {});\n } else {\n if (m.message.axis.isFake && !this.zoomAxis.isFake || !m.message.axis.isFake && this.zoomAxis.isFake) {\n this._element.call(this.zoom.transform, m.message.event.transform);\n }\n }\n })\n ).subscribe();\n\n\n // Subscribe to brush events x or y\n\n if ((this.config.brush?.type === BrushType.x && this.zoomAxis.orientation === AxisOrientation.x) ||\n (this.config.brush?.type === BrushType.y && this.zoomAxis.orientation === AxisOrientation.y)) {\n\n combineLatest([this.broadcastService.subscribeToBrush(this.config?.zoom.syncChannel), this.chartService.size]).pipe(\n takeWhile((_) => this.alive),\n debounceTime(150),\n filter((data: [IBroadcastMessage<BrushMessage>, DOMRect]) => Boolean(data[0].message.selection)),\n tap((data: [IBroadcastMessage<BrushMessage>, DOMRect]) => {\n\n const [m] = data;\n\n const currentTransform = d3.zoomTransform(\n this._element.node()\n );\n\n if (!m.message.event && this.currentSelection && currentTransform.k !== 1) {\n return;\n }\n\n this.currentSelection = m.message.selection;\n\n\n this.updateZoom(m);\n\n }),\n ).subscribe();\n }\n }\n\n\n ngOnDestroy(): void {\n this.zoom?.on('start zoom end', null);\n this._element?.on('wheel', null);\n\n this.alive = false;\n }\n\n private updateZoom(m: IBroadcastMessage<BrushMessage>) {\n\n const s = m.message.selection;\n this.brushScale.domain(this.zoomAxis.extremes);\n const domain = this.brushScale.domain();\n\n const scale = (domain[1] - domain[0]) / (s[1] - s[0]);\n\n let transform = zoomIdentity.scale(scale);\n\n if (m.message?.brushType === BrushType.x) {\n transform = transform.translate(-this.brushScale(s[0]), 0);\n }\n if (m.message?.brushType === BrushType.y) {\n transform = transform.translate(0, -this.brushScale(s[0]));\n }\n\n this._element.call(\n this.zoom.transform,\n transform,\n null,\n {}\n );\n }\n}\n","import {\n AfterViewInit,\n Directive,\n ElementRef,\n Input,\n OnInit,\n SimpleChanges,\n} from '@angular/core';\nimport { IChartConfig } from '../model/i-chart-config';\nimport { BrushService } from '../service/brush.service';\nimport { ChartService } from '../service/chart.service';\n\n@Directive({\n selector: '[tetaBrushable]',\n})\nexport class BrushableDirective implements OnInit, AfterViewInit {\n @Input() config: IChartConfig;\n @Input() brushScale: any;\n\n constructor(\n private brushService: BrushService,\n private chartService: ChartService,\n private element: ElementRef\n ) {}\n\n ngOnInit() {}\n\n ngAfterViewInit() {\n\n }\n\n ngOnChanges(changes: SimpleChanges) {\n\n if(changes.hasOwnProperty('config')) {\n this.brushService.clearPreviousSelection();\n }\n\n this.brushService.applyBrush(\n this.element,\n this.config,\n this.brushScale\n );\n }\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n OnDestroy,\n OnInit,\n} from '@angular/core';\nimport { IChartConfig } from '../model/i-chart-config';\nimport { ChartService } from '../service/chart.service';\nimport {\n animationFrameScheduler,\n combineLatest,\n map,\n Observable,\n shareReplay,\n tap,\n withLatestFrom,\n} from 'rxjs';\nimport { Axis } from '../core/axis/axis';\nimport { AxisOrientation } from '../model/enum/axis-orientation';\nimport { ScaleService } from '../service/scale.service';\nimport { ZoomService } from '../service/zoom.service';\nimport { BrushType } from '../model/enum/brush-type';\nimport { throttleTime } from 'rxjs/operators';\n\ntype Opposite = boolean;\n\n@Component({\n selector: 'teta-chart-container',\n templateUrl: './chart-container.component.html',\n styleUrls: ['./chart-container.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChartContainerComponent implements OnInit, OnDestroy {\n config: Observable<IChartConfig>;\n\n yAxisMap: Observable<Map<number, Axis>>;\n xAxisMap: Observable<Map<number, Axis>>;\n yScaleMap: Observable<Map<number, any>>;\n xScaleMap: Observable<Map<number, any>>;\n size: Observable<DOMRect>;\n visibleRect: Observable<any>;\n\n brushScale: Observable<any>;\n\n private _observer: ResizeObserver;\n\n private filterPositionMap = new Map<\n Opposite,\n (axis: Axis) => (_: Axis) => boolean\n >()\n .set(\n true,\n (axis) => (_: Axis) =>\n _.options.opposite && _.options.visible && axis.index <= _.index\n )\n .set(\n false,\n (axis) => (_: Axis) =>\n _.options.opposite !== true &&\n _.options.visible &&\n _.index <= axis.index\n );\n\n constructor(\n private _svc: ChartService,\n private _cdr: ChangeDetectorRef,\n private _scaleService: ScaleService,\n private _zoomService: ZoomService,\n private _elementRef: ElementRef\n ) {\n this.config = this._svc.config;\n this.size = this._svc.size;\n this.yAxisMap = this._scaleService.yAxisMap;\n this.xAxisMap = this._scaleService.xAxisMap;\n\n this.yScaleMap = this._scaleService.yScaleMap.pipe(\n throttleTime(0, animationFrameScheduler, { trailing: true }),\n tap(() => this._cdr.detectChanges()),\n shareReplay({\n bufferSize: 1,\n refCount: true,\n })\n );\n\n this.xScaleMap = this._scaleService.xScaleMap.pipe(\n throttleTime(0, animationFrameScheduler, { trailing: true }),\n tap(() => this._cdr.detectChanges()),\n shareReplay({\n bufferSize: 1,\n refCount: true,\n })\n );\n\n this.brushScale = combineLatest([\n this._scaleService.xScaleMap,\n this._scaleService.yScaleMap,\n ]).pipe(\n withLatestFrom(this.config),\n map((data: [[Map<number, any>, Map<number, any>], IChartConfig]) => {\n const [[x, y], config] = data;\n\n return config.brush?.type === BrushType.x ? x.get(0) : y.get(0);\n }),\n\n shareReplay({\n bufferSize: 1,\n refCount: true,\n })\n );\n\n this.visibleRect = combineLatest([\n this.size,\n this.xAxisMap,\n this.yAxisMap,\n ]).pipe(\n throttleTime(0, animationFrameScheduler, { trailing: true }),\n withLatestFrom(this.config),\n map(\n (\n data: [[DOMRect, Map<number, any>, Map<number, any>], IChartConfig]\n ) => {\n const [[size, x, y], config] = data;\n const yAxesArray = [...y.values()];\n const xAxesArray = [...x.values()];\n const left = yAxesArray\n .filter((_) => _.options.opposite !== true && _.options.visible)\n .reduce(this.sumSize, 0);\n\n const right = yAxesArray\n .filter((_) => _.options.opposite && _.options.visible)\n .reduce(this.sumSize, 0);\n\n const bottom = xAxesArray\n .filter((_) => _.options.opposite !== true && _.options.visible)\n .reduce(this.sumSize, 0);\n\n const top = xAxesArray\n .filter((_) => _.options.opposite && _.options.visible)\n .reduce(this.sumSize, 0);\n return {\n x: left + config.bounds?.left,\n y: top + config.bounds?.top,\n width:\n size.width -\n left -\n right -\n config.bounds?.left -\n config.bounds?.right,\n height:\n size.height -\n top -\n bottom -\n config.bounds?.top -\n config.bounds?.bottom,\n };\n }\n ),\n tap(() => setTimeout(() => this._cdr.detectChanges()))\n );\n }\n\n ngOnInit(): void {\n this._observer = new ResizeObserver((entries: ResizeObserverEntry[]) => {\n requestAnimationFrame(() => {\n if (\n !Array.isArray(entries) ||\n !entries.length ||\n entries[0].contentRect.width <= 0 ||\n entries[0].contentRect.height <= 0\n ) {\n return;\n }\n this._svc.setSize(entries[0].contentRect);\n });\n });\n this._observer.observe(this._elementRef.nativeElement);\n }\n\n ngOnDestroy() {\n this._observer.disconnect();\n }\n\n private sumSize = (acc, curr) => acc + curr.selfSize;\n\n getTranslate(axis?: Axis, size?: DOMRect): Observable<string> {\n return combineLatest([this.xAxisMap, this.yAxisMap]).pipe(\n withLatestFrom(this.config),\n map((data: [[Map<number, Axis>, Map<number, Axis>], IChartConfig]) => {\n const [[x, y], config] = data;\n const xAxesArray = [...x.values()];\n const yAxesArray = [...y.values()];\n\n const oppositeFilter = this.filterPositionMap.get(true);\n const nonOppositeFilter = this.filterPositionMap.get(false);\n\n const oppositeOffsetY = yAxesArray.filter(oppositeFilter(axis));\n const nonOppositeOffsetY = yAxesArray.filter(nonOppositeFilter(axis));\n\n const oppositeOffsetX = xAxesArray.filter(oppositeFilter(axis));\n const nonOppositeOffsetX = xAxesArray.filter(nonOppositeFilter(axis));\n\n const oppositeTranslateY = oppositeOffsetY.reduce(\n (acc, curr) => acc + curr.selfSize,\n 0\n );\n const nonOppisteTranslateY = nonOppositeOffsetY.reduce(\n (acc, curr) => acc + curr.selfSize,\n 0\n );\n\n const oppositeTranslateX = oppositeOffsetX.reduce(\n (acc, curr) => acc + curr.selfSize,\n 0\n );\n\n const nonOppisteTranslateX = nonOppositeOffsetX.reduce(\n (acc, curr) => acc + curr.selfSize,\n 0\n );\n\n const left = yAxesArray\n .filter((_) => _.options.visible && _.options.opposite !== true)\n .reduce((acc, curr) => acc + curr.selfSize, config.bounds?.left);\n\n const top = xAxesArray\n .filter((_) => _.options.visible && _.options.opposite === true)\n .reduce((acc, curr) => acc + curr.selfSize, config.bounds?.top);\n\n if (axis.orientation === AxisOrientation.x) {\n return `translate(${left}, ${\n axis.options.opposite\n ? oppositeTranslateX\n : size.height - nonOppisteTranslateX\n })`;\n }\n\n if (axis.orientation === AxisOrientation.y) {\n return `translate(${\n axis.options.opposite\n ? size.width - oppositeTranslateY\n : nonOppisteTranslateY\n }, ${top})`;\n }\n\n return 'translate(0, 0)';\n })\n );\n }\n\n identify(index, item) {\n return item.value.index;\n }\n\n click(\n event: PointerEvent,\n xScales: Map<number, any>,\n yScales: Map<number, any>\n ) {\n const x = xScales.get(0);\n const y = yScales.get(0);\n this._svc.emitChartClick({\n event: event,\n target: {\n x: x.invert(event.offsetX),\n y: y.invert(event.offsetY),\n },\n });\n }\n\n contextMenu(\n event: MouseEvent,\n xScales: Map<number, any>,\n yScales: Map<number, any>\n ) {\n const x = xScales.get(0);\n const y = yScales.get(0);\n this._svc.emitChartContextMenu({\n event: event,\n target: {\n x: x.invert(event.offsetX),\n y: y.invert(event.offsetY),\n },\n });\n }\n\n mouseMove(event) {\n this._svc.setPointerMove(event);\n }\n\n mouseLeave(event) {\n this._svc.setPointerMove(event);\n }\n}\n","<ng-container *ngIf=\"{\n size: size | async,\n config: config | async,\n xAxisMap: xAxisMap | async,\n yAxisMap: yAxisMap | async,\n xScaleMap: xScaleMap | async,\n yScaleMap: yScaleMap | async,\n visibleRect: visibleRect | async,\n brushScale: brushScale | async\n} as data\" xmlns:svg=\"http://www.w3.org/1999/html\">\n <teta-tooltip *ngIf=\"data.config?.tooltip?.enable\"\n [size]=\"data.size\"\n [config]=\"data.config\"></teta-tooltip>\n <ng-container *ngIf=\"data.visibleRect?.width > 0 && data.visibleRect?.height > 0 && data.xScaleMap && data.yScaleMap\">\n <svg height=\"100%\" width=\"100%\" class=\"position-absolute\">\n <g class=\"y-axis-container\">\n <ng-container *ngFor=\"let item of data.yAxisMap | keyvalue;\">\n <ng-container *ngIf=\"item.value.options.visible\">\n <g\n teta-y-axis\n [axis]=\"item.value\"\n [scale]=\"data.yScaleMap.get(item.key)\"\n [size]=\"data.size\"\n [attr.transform]=\"getTranslate(item.value, data.size) | async\"></g>\n <rect\n tetaZoomable\n fill-opacity=\"0\"\n [brushScale]=\"data.brushScale\"\n [axis]=\"item.value\"\n [config]=\"data.config\"\n [size]=\"data.size\"\n [attr.x]=\"item.value.options.opposite ? 0 : -item.value.selfSize\"\n [attr.y]=\"0\"\n [attr.height]=\"data.size.height\"\n [attr.width]=\"item.value.selfSize\"\n [attr.transform]=\"getTranslate(item.value, data.size) | async\"></rect>\n </ng-container>\n\n </ng-container>\n </g>\n <g class=\"x-axis-container\">\n <ng-container *ngFor=\"let item of data.xAxisMap | keyvalue;\">\n <ng-container *ngIf=\"item.value.options.visible && data.xScaleMap && data.yScaleMap\">\n <g\n teta-x-axis\n [axis]=\"item.value\"\n [scale]=\"data.xScaleMap.get(item.key)\"\n [size]=\"data.size\"\n [attr.transform]=\"getTranslate(item.value, data.size) | async\"></g>\n <rect\n tetaZoomable\n fill-opacity=\"0\"\n [brushScale]=\"data.brushScale\"\n [axis]=\"item.value\"\n [config]=\"data.config\"\n [size]=\"data.size\"\n [attr.x]=\"0\"\n [attr.y]=\"0\"\n [attr.width]=\"data.size.width\"\n [attr.height]=\"item.value.selfSize\"\n [attr.transform]=\"getTranslate(item.value, data.size) | async\"></rect>\n </ng-container>\n </ng-container>\n </g>\n </svg>\n </ng-container>\n <ng-container *ngIf=\"data.visibleRect?.width > 0 && data.visibleRect?.height > 0 && data.xScaleMap && data.yScaleMap\">\n <svg\n tetaBrushable\n tetaZoomable\n class=\"position-absolute\"\n [size]=\"data.size\"\n [brushScale]=\"data.brushScale\"\n [config]=\"data.config\"\n [attr.width]=\"data.visibleRect.width\"\n [attr.height]=\"data.visibleRect.height\"\n [attr.viewBox]=\"'0 0 ' + data.visibleRect.width + ' ' + data.visibleRect.height\"\n [style.transform]=\"'translate('+ data.visibleRect.x +'px, '+ data.visibleRect.y +'px)'\"\n (contextmenu)=\"contextMenu($event, data.xScaleMap, data.yScaleMap)\"\n (click)=\"click($event, data.xScaleMap, data.yScaleMap)\"\n (mouseleave)=\"mouseLeave($event)\"\n (mousemove)=\"mouseMove($event)\">\n\n <g class=\"gridlines\"\n teta-gridlines\n *ngIf=\"data.config.gridLines?.enable !== false\"\n [size]=\"data.size\"\n [config]=\"data.config\"></g>\n\n <g class=\"x-axis-plotband-container\">\n <ng-container *ngFor=\"let axis of data.config.xAxis; let i = index\">\n <g teta-plot-band *ngFor=\"let plotBand of axis.plotBands\"\n [plotBand]=\"plotBand\"\n [scale]=\"data.xScaleMap.get(i)\"\n [size]=\"data.size\"\n [axis]=\"data.xAxisMap.get(i)\"></g>\n </ng-container>\n </g>\n <g class=\"y-axis-plotband-container\">\n <ng-container *ngFor=\"let axis of data.config.yAxis; let i = index\">\n <g teta-plot-band *ngFor=\"let plotBand of axis.plotBands\"\n [plotBand]=\"plotBand\"\n [scale]=\"data.yScaleMap.get(i)\"\n [size]=\"data.size\"\n [axis]=\"data.yAxisMap.get(i)\"></g>\n </ng-container>\n </g>\n <g class=\"x-axis-plotline-container\">\n <ng-container *ngFor=\"let axis of data.config.xAxis; let i = index\">\n <g teta-plot-line *ngFor=\"let plotLine of axis.plotLines\"\n [plotLine]=\"plotLine\"\n [scale]=\"data.xScaleMap.get(i)\"\n [size]=\"data.size\"\n [axis]=\"data.xAxisMap.get(i)\"></g>\n </ng-container>\n </g>\n <g class=\"y-axis-plotline-container\">\n <ng-container *ngFor=\"let axis of data.config.yAxis; let i = index\">\n <g teta-plot-line *ngFor=\"let plotLine of axis.plotLines\"\n [plotLine]=\"plotLine\"\n [scale]=\"data.yScaleMap.get(i)\"\n [size]=\"data.size\"\n [axis]=\"data.yAxisMap.get(i)\"></g>\n </ng-container>\n </g>\n <g class=\"series-container\">\n <g teta-series-host\n *ngFor=\"let series of data.config.series\"\n [config]=\"data.config\"\n [series]=\"series\"></g>\n </g>\n <g class=\"annotations\">\n <g teta-annotation\n *ngFor=\"let annotation of data.config.annotations\"\n [annotation]=\"annotation\"></g>\n </g>\n </svg>\n\n </ng-container>\n</ng-container>\n","import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Input,\n} from '@angular/core';\nimport { Series } from '../model/series';\nimport { BasePoint } from '../model/base-point';\nimport { SeriesType } from '../model/enum/series-type';\n\n@Component({\n selector: 'teta-legend',\n templateUrl: './legend.component.html',\n styleUrls: ['./legend.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LegendComponent {\n private sizeMapping = new Map<SeriesType, number>()\n .set(SeriesType.line, 2)\n .set(SeriesType.scatter, 12)\n .set(SeriesType.bar, 12)\n .set(SeriesType.area, 2)\n .set(SeriesType.block, 12)\n .set(SeriesType.blockArea, 2);\n\n @Input() series: Array<Series<BasePoint>>;\n @HostBinding('class.padding-bottom-4') classLegend = true;\n\n constructor() {}\n\n getHeight(serie: Series<BasePoint>) {\n return this.sizeMapping.get(serie.type ?? SeriesType.line);\n }\n}\n","<ng-container *ngFor=\"let serie of series\" class=\"padding-bottom-4\">\n <div *ngIf=\"serie?.showInLegend !== false\">\n <div class=\"legend-item\">\n <div class=\"legend-icon-form\" [style.height.px]=\"getHeight(serie)\" [style.background-color]=\"serie.color\"></div>\n <div class=\"legend-label\">{{ serie.name }}</div>\n </div>\n </div>\n</ng-container>\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n} from '@angular/core';\nimport {ChartService} from '../service/chart.service';\nimport {IChartConfig} from '../model/i-chart-config';\nimport {BasePoint} from '../model/base-point';\nimport {Series} from '../model/series';\nimport {ZoomService} from '../service/zoom.service';\nimport {ScaleService} from '../service/scale.service';\nimport {BrushService} from '../service/brush.service';\nimport {IChartEvent} from '../model/i-chart-event';\nimport {PlotLine} from '../model/plot-line';\nimport {PlotBand} from '../model/plot-band';\nimport {IPointMove} from '../model/i-point-move';\nimport {map, Observable, takeWhile, withLatestFrom} from 'rxjs';\nimport {Annotation} from '../model/annotation';\nimport {TooltipTracking} from '../model/enum/tooltip-tracking';\n\n@Component({\n selector: 'teta-svg-chart',\n templateUrl: './chart.component.html',\n styleUrls: ['./chart.component.scss'],\n providers: [ChartService, ZoomService, ScaleService, BrushService],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChartComponent implements OnInit, OnChanges, OnDestroy {\n legendSeries: Array<Series<BasePoint>>;\n hasSeriesData: Observable<boolean>;\n svcConfig: Observable<IChartConfig>;\n @Output()\n pointerMove: EventEmitter<IChartEvent<Map<number, number>>> = new EventEmitter<IChartEvent<Map<number, number>>>();\n\n @Output()\n plotBandsMove: EventEmitter<IChartEvent<PlotBand>> = new EventEmitter<IChartEvent<PlotBand>>();\n\n @Output()\n plotBandClick: EventEmitter<IChartEvent<PlotBand>> = new EventEmitter<IChartEvent<PlotBand>>();\n\n @Output()\n plotBandContextMenu: EventEmitter<IChartEvent<PlotBand>> = new EventEmitter<IChartEvent<PlotBand>>();\n\n @Output()\n plotLinesMove: EventEmitter<IChartEvent<PlotLine>> = new EventEmitter<IChartEvent<PlotLine>>();\n\n @Output()\n pointMove: EventEmitter<IChartEvent<IPointMove>> = new EventEmitter<IChartEvent<IPointMove>>();\n\n @Output()\n chartClick: EventEmitter<IChartEvent<BasePoint>> = new EventEmitter<IChartEvent<BasePoint>>();\n\n @Output()\n chartContextMenu: EventEmitter<IChartEvent<BasePoint>> = new EventEmitter<IChartEvent<BasePoint>>();\n\n @Output()\n annotationContextMenu: EventEmitter<IChartEvent<Annotation>> = new EventEmitter<IChartEvent<Annotation>>();\n\n @Output()\n annotationClick: EventEmitter<IChartEvent<Annotation>> = new EventEmitter<IChartEvent<Annotation>>();\n\n @Output()\n annotationMove: EventEmitter<IChartEvent<Annotation>> = new EventEmitter<IChartEvent<Annotation>>();\n\n @Input() set config(config: IChartConfig) {\n this.chartService.setConfig(config);\n }\n\n private _alive = true;\n\n constructor(public chartService: ChartService,\n private _zoomService: ZoomService,\n private _scaleService: ScaleService) {\n this.svcConfig = this.chartService.config;\n this.hasSeriesData = this.svcConfig.pipe(\n map(\n (_) => _.series?.length > 0 && _.series?.some((_) => _.data?.length > 0)\n )\n );\n }\n\n ngOnChanges(changes: SimpleChanges) {\n }\n\n ngOnInit(): void {\n this.chartService.pointerMove\n .pipe(\n takeWhile(() => this._alive),\n withLatestFrom(this._scaleService.xScaleMap, this._scaleService.yScaleMap, this.chartService.config)\n )\n .subscribe((data: [PointerEvent, Map<number, any>, Map<number, any>, IChartConfig]) => {\n const [event, x, y, config] = data;\n const tooltipTracking = config?.tooltip?.tracking;\n if (tooltipTracking === TooltipTracking.y) {\n const result = new Map<number, number>();\n y.forEach((value, key) => {\n result.set(key, value.invert(event.offsetY));\n });\n this.pointerMove.emit({\n event: event,\n target: result\n });\n } else {\n const result = new Map<number, number>();\n x.forEach((value, key) => {\n result.set(key, value.invert(event.offsetX));\n });\n this.pointerMove.emit({\n event: event,\n target: result\n });\n }\n });\n\n this.chartService.plotBandEvent\n .pipe(takeWhile(() => this._alive))\n .subscribe((_) => {\n this.plotBandsMove.emit(_);\n });\n\n this.chartService.plotLineMove.pipe(takeWhile(() => this._alive)).subscribe((_) => {\n this.plotLinesMove.emit(_);\n });\n\n this.chartService.pointMove.pipe(takeWhile(() => this._alive)).subscribe((_) => {\n this.pointMove.emit(_);\n });\n\n this.chartService.chartClick\n .pipe(\n takeWhile(() => this._alive)\n ).subscribe((_) => {\n this.chartClick.emit(_);\n });\n\n this.chartService.chartContextMenu\n .pipe(\n takeWhile(() => this._alive)\n ).subscribe((_) => {\n this.chartContextMenu.emit(_);\n });\n\n this.chartService.plotBandClick\n .pipe(\n takeWhile(() => this._alive))\n .subscribe((_) => {\n this.plotBandClick.emit(_);\n });\n\n this.chartService.plotBandContextMenu\n .pipe(\n takeWhile(() => this._alive))\n .subscribe((_) => {\n this.plotBandContextMenu.emit(_);\n });\n\n this.chartService.annotationContextMenu\n .pipe(\n takeWhile(() => this._alive))\n .subscribe((_) => {\n this.annotationContextMenu.emit(_);\n });\n\n this.chartService.annotationClick\n .pipe(\n takeWhile(() => this._alive))\n .subscribe((_) => {\n this.annotationClick.emit(_);\n });\n\n this.chartService.annotationMove\n .pipe(\n takeWhile(() => this._alive))\n .subscribe((_) => {\n this.annotationMove.emit(_);\n });\n\n\n }\n\n ngAfterViewInit() {\n }\n\n ngOnDestroy() {\n this._alive = false;\n this._zoomService.broadcastSubscription?.forEach((sub) => {\n sub.unsubscribe();\n });\n }\n}\n","<ng-container *ngIf=\"{\n hasSeriesData: hasSeriesData | async,\n svcConfig: svcConfig | async\n} as data\">\n <ng-container *ngIf=\"data.hasSeriesData === true else noData\">\n <div class=\"column column_auto\">\n <teta-chart-container class=\"chart-container\"></teta-chart-container>\n </div>\n <teta-legend *ngIf=\"data.svcConfig.legend?.enable === true\" [series]=\"data.svcConfig.series\"></teta-legend>\n </ng-container>\n</ng-container>\n<ng-template #noData>\n <div class=\"column column_auto align-center justify-content-center\">\n <span class=\"font-body-3 color-text-40\">Данные отсутствуют</span>\n </div>\n</ng-template>\n","import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {ChartComponent} from './chart/chart.component';\nimport {SeriesHostComponent} from './chart-container/series-host/series-host.component';\nimport {ChartContainerComponent} from './chart-container/chart-container.component';\nimport {LegendComponent} from './legend/legend.component';\nimport {SeriesBaseComponent} from './base/series-base.component';\nimport {LineSeriesComponent} from './chart-container/series/line/line-series.component';\nimport {GridlinesComponent} from './chart-container/gridlines/gridlines.component';\nimport {XAxisComponent} from './chart-container/x-axis/x-axis.component';\nimport {YAxisComponent} from './chart-container/y-axis/y-axis.component';\nimport {PlotlineComponent} from './chart-container/plotline/plotline.component';\nimport {PlotBandComponent} from './chart-container/plotband/plot-band.component';\nimport {BarSeriesComponent} from './chart-container/series/bar/bar-series.component';\nimport {TooltipComponent} from './chart-container/tooltip/tooltip.component';\nimport {ZoomableDirective} from './directives/zoomable.directive';\nimport {BrushableDirective} from './directives/brushable.directive';\nimport {ScatterSeriesComponent} from './chart-container/series/scatter-series/scatter-series.component';\nimport {BlockSeriesComponent} from './chart-container/series/block-series/block-series.component';\nimport {BlockAreaSeriesComponent} from './chart-container/series/block-area-series/block-area-series.component';\nimport {AreaSeriesComponent} from './chart-container/series/area-series/area-series.component';\nimport {AnnotationComponent} from './chart-container/annotation/annotation.component';\nimport {LinearSeriesBase} from './chart-container/series/linear-series-base';\nimport {TuiLetModule} from '@taiga-ui/cdk';\n\n@NgModule({\n declarations: [\n ChartComponent,\n SeriesHostComponent,\n ChartContainerComponent,\n LegendComponent,\n SeriesBaseComponent,\n LinearSeriesBase,\n LineSeriesComponent,\n GridlinesComponent,\n XAxisComponent,\n YAxisComponent,\n PlotlineComponent,\n PlotBandComponent,\n BarSeriesComponent,\n TooltipComponent,\n ZoomableDirective,\n BrushableDirective,\n AreaSeriesComponent,\n ScatterSeriesComponent,\n BlockSeriesComponent,\n BlockAreaSeriesComponent,\n AnnotationComponent,\n ],\n exports: [\n ChartComponent,\n LegendComponent,\n SeriesBaseComponent,\n LineSeriesComponent,\n BarSeriesComponent,\n ScatterSeriesComponent,\n AreaSeriesComponent,\n BlockSeriesComponent,\n BlockAreaSeriesComponent,\n ],\n imports: [CommonModule, TuiLetModule],\n})\nexport class ChartModule {\n}\n","import { SvgAttributes } from './svg-attributes';\n\nexport class PlotBand {\n id?: number | string;\n name?: string;\n from: number;\n to: number;\n label?: string;\n showGrabbers?: boolean;\n draggable?: boolean;\n resizable?: boolean;\n min?: number;\n max?: number;\n style?: {\n plotBand?: SvgAttributes;\n grabbers?: SvgAttributes;\n };\n\n constructor(options?: {\n id?: number | string;\n name?: string;\n from: number;\n to: number;\n label?: string;\n showGrabbers?: boolean;\n draggable?: boolean;\n resizable?: boolean;\n min?: number;\n max?: number;\n style?: {\n plotBand?: SvgAttributes;\n grabbers?: SvgAttributes;\n };\n }) {\n this.id = options?.id;\n this.name = options?.name;\n this.from = options?.from;\n this.to = options?.to;\n this.label = options?.label;\n this.showGrabbers =\n options?.showGrabbers != null ? options.showGrabbers : true;\n this.draggable = options?.draggable != null ? options?.draggable : false;\n this.resizable = options?.resizable != null ? options?.resizable : true;\n this.min = options?.min;\n this.max = options?.max;\n this.style = options?.style;\n }\n}\n","import {SvgAttributes} from './svg-attributes';\n\nexport class PlotLine {\n id?: number | string;\n name?: string;\n value: number;\n label?: string;\n min?: number;\n max?: number;\n draggable?: boolean;\n style?: SvgAttributes;\n\n constructor(options?: {\n id?: number | string;\n name?: string;\n value: number;\n label?: string;\n min?: number;\n max?: number;\n draggable?: boolean;\n style?: SvgAttributes;\n }) {\n this.id = options?.id;\n this.name = options?.name;\n this.value = options?.value;\n this.label = options?.label;\n this.min = options?.min;\n this.max = options?.max;\n this.draggable = options?.draggable;\n this.style = options?.style;\n }\n}\n","/*\n * Public API Surface of chart\n */\n\nexport * from './chart/chart.module';\nexport * from './chart/service/public-api';\nexport * from './chart/base/series-base.component';\nexport * from './chart/chart/chart.component';\nexport * from './chart/legend/legend.component';\nexport * from './chart/model/public-api';\nexport * from './chart/chart-container/series/public-api';\nexport * from './chart/core/axis/axis';\n","/**\n * Generated bundle index. Do not edit.\n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