diff --git a/docs/codesandbox/cli/model/html.ts b/docs/codesandbox/cli/model/html.ts index 48ce1ae2..2d022d86 100644 --- a/docs/codesandbox/cli/model/html.ts +++ b/docs/codesandbox/cli/model/html.ts @@ -14,7 +14,7 @@ interface HTMLImport { export const isHTMLFile = (filepath: string) => getFileName(filepath)?.includes('html') ?? false; -export const combineRelativeParsedImportToAbsolute = (htmlFile: string, originalFilepath: string) => +export const combineRelativeParsedImportToAbsolute = (htmlFile: string, originalFilepath: string) => path.resolve(htmlFile, `../${originalFilepath}`); export const parseHTMLImports = (htmlFilepath: string, html: string): HTMLImport[] => { @@ -87,9 +87,9 @@ export const HTMLFilesToCSBPayload = (htmlFiles: string[]): CodeSandboxPayload = const htmlContent = getFileContent(htmlFile); const parsedHTMLImports = parseHTMLImports(htmlFile, htmlContent); - const csbPayloadFromHTMLImports = filesToCSBPayload( - parsedHTMLImports.map(i => combineRelativeParsedImportToAbsolute(htmlFile, i.originalFilepath)), - ); + const csbPayloadFromHTMLImports = filesToCSBPayload(parsedHTMLImports.map(i => + combineRelativeParsedImportToAbsolute(htmlFile, i.originalFilepath) + )); htmlCSBPayload = concatCSBPayload(htmlCSBPayload, csbPayloadFromHTMLImports); const htmlContentWithNewImports = replaceHTMLImports(htmlContent, parsedHTMLImports); diff --git a/docs/how-to/custom-drawer/README.md b/docs/how-to/custom-drawer/README.md index 8f605f8e..f75c9768 100644 --- a/docs/how-to/custom-drawer/README.md +++ b/docs/how-to/custom-drawer/README.md @@ -53,6 +53,7 @@ List of default drawer types: 'HIT_TEST_DRAWINGS', 'GRID', 'VOLUMES', + 'UNDERLAY_VOLUMES_AREA', 'X_AXIS', 'Y_AXIS', 'HIGH_LOW', diff --git a/src/chart/__tests__/chart.test.ts b/src/chart/__tests__/chart.test.ts index d6ef284a..bf0d4289 100644 --- a/src/chart/__tests__/chart.test.ts +++ b/src/chart/__tests__/chart.test.ts @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited - * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. - * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. - */ import './env'; import { createChart } from '../../index'; import { generateCandlesDataTS } from '../utils/candles-generator-ts.utils'; diff --git a/src/chart/__tests__/env.ts b/src/chart/__tests__/env.ts index 8b5e760d..26c6bcc6 100644 --- a/src/chart/__tests__/env.ts +++ b/src/chart/__tests__/env.ts @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited - * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. - * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. - */ /* @see https://jestjs.io/docs/29.4/manual-mocks#mocking-methods-which-are-not-implemented-in-jsdom */ Object.defineProperty(window, 'matchMedia', { writable: true, diff --git a/src/chart/__tests__/model/date-time.formatter.test.ts b/src/chart/__tests__/model/date-time.formatter.test.ts index 9def1f3d..efe2c45b 100644 --- a/src/chart/__tests__/model/date-time.formatter.test.ts +++ b/src/chart/__tests__/model/date-time.formatter.test.ts @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited - * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. - * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. - */ import '../env'; import { formatDate, getShortDays, getShortMonths } from '../../model/date-time.formatter'; import { getDefaultConfig } from '../../chart.config'; diff --git a/src/chart/animation/canvas-animation.ts b/src/chart/animation/canvas-animation.ts index 2b1a3096..3d313236 100644 --- a/src/chart/animation/canvas-animation.ts +++ b/src/chart/animation/canvas-animation.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/animation/types/animation.ts b/src/chart/animation/types/animation.ts index 69f5418d..50166aba 100644 --- a/src/chart/animation/types/animation.ts +++ b/src/chart/animation/types/animation.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/animation/types/color-alpha-animation.ts b/src/chart/animation/types/color-alpha-animation.ts index a2a77bec..d7296467 100644 --- a/src/chart/animation/types/color-alpha-animation.ts +++ b/src/chart/animation/types/color-alpha-animation.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/animation/types/color-transition-animation.ts b/src/chart/animation/types/color-transition-animation.ts index 10da281d..f89e4d25 100644 --- a/src/chart/animation/types/color-transition-animation.ts +++ b/src/chart/animation/types/color-transition-animation.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/animation/types/viewport-movement-animation.ts b/src/chart/animation/types/viewport-movement-animation.ts index 633c5564..616f59be 100644 --- a/src/chart/animation/types/viewport-movement-animation.ts +++ b/src/chart/animation/types/viewport-movement-animation.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/animation/viewport-model-animation.ts b/src/chart/animation/viewport-model-animation.ts index c93e2273..3b10b56c 100644 --- a/src/chart/animation/viewport-model-animation.ts +++ b/src/chart/animation/viewport-model-animation.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/bootstrap.ts b/src/chart/bootstrap.ts index a87b94e2..459e8884 100755 --- a/src/chart/bootstrap.ts +++ b/src/chart/bootstrap.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/canvas/canvas-bounds-container.ts b/src/chart/canvas/canvas-bounds-container.ts index f68d13f5..cbb33299 100644 --- a/src/chart/canvas/canvas-bounds-container.ts +++ b/src/chart/canvas/canvas-bounds-container.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -540,40 +540,14 @@ export class CanvasBoundsContainer { const oldPecNumber = visiblePecRatios.filter(ratio => ratio !== undefined).length; // if ratio in undefined for a given pane it means that it's a new pane const newPecNumber = pecRatios.filter(ratio => ratio === undefined).length; - const paneIsAdded = newPecNumber > 0; - let freeRatioForPec = 0; let freeRatio = 0; let ratioForOldPec = 1; let ratioForNewPec = 0; - if (paneIsAdded) { + if (newPecNumber > 0) { [ratioForOldPec, ratioForNewPec] = getHeightRatios(visiblePecNumber); + chartRatio *= ratioForOldPec; } - - //#region chart height ratio logic - if (this.graphsHeightRatio[CHART_UUID] === 0) { - chartRatio = 0; - } - - if (this.graphsHeightRatio[CHART_UUID] !== 0) { - if (paneIsAdded) { - chartRatio = 1 * ratioForOldPec; - } else { - // pec ratio values before recalculating and new chart ratio - const currentHeightRatioValues = Object.values(this.graphsHeightRatio).reduce( - (prev, curr) => (curr += prev), - ); - - // chart is hidden and one of the pec is removed - // since the chart height ratio is new, the currentHeightRatioValues could be > 1, it happens if make chart visible again - if (currentHeightRatioValues < 1 && this.graphsHeightRatio[CHART_UUID] !== 0) { - chartRatio += 1 - currentHeightRatioValues; - } - } - } - - //#endregion - // this means we should keep in mind only new panes if (oldPecNumber === 0) { chartRatio = 1 - ratioForNewPec * newPecNumber; @@ -1009,15 +983,13 @@ export class CanvasBoundsContainer { } // paneCounter=chartHeightRatio: 0=1, 1=0.8, 2=0.6, 3=0.5, 4=0.4, 5=0.4 -// ratios requirements table: https://confluence.in.devexperts.com/display/UI/Chart+Navigation#ChartNavigation-2Graphsadjustablesizes const DEFAULT_RATIOS: Record = { 0: 1, 1: 0.8, 2: 0.6, 3: 0.5, 4: 0.4, - 5: 0.4, - 6: 0.4, + 5: 0.2, }; // NOTE: pec stands for panes except main chart diff --git a/src/chart/canvas/canvas-chart-html.ts b/src/chart/canvas/canvas-chart-html.ts index 14bf14d2..1f6116db 100644 --- a/src/chart/canvas/canvas-chart-html.ts +++ b/src/chart/canvas/canvas-chart-html.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/canvas/chart-elements.ts b/src/chart/canvas/chart-elements.ts index 93de6d20..e32dc410 100644 --- a/src/chart/canvas/chart-elements.ts +++ b/src/chart/canvas/chart-elements.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/canvas/cursor.handler.ts b/src/chart/canvas/cursor.handler.ts index 662879b0..a895e281 100644 --- a/src/chart/canvas/cursor.handler.ts +++ b/src/chart/canvas/cursor.handler.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/canvas/layout-creator.ts b/src/chart/canvas/layout-creator.ts index b85787f2..73bb3470 100644 --- a/src/chart/canvas/layout-creator.ts +++ b/src/chart/canvas/layout-creator.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/canvas/y-axis-bounds.container.ts b/src/chart/canvas/y-axis-bounds.container.ts index be5da8b9..19f121e0 100644 --- a/src/chart/canvas/y-axis-bounds.container.ts +++ b/src/chart/canvas/y-axis-bounds.container.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/chart.config.ts b/src/chart/chart.config.ts index b2e311ba..261cbe4f 100644 --- a/src/chart/chart.config.ts +++ b/src/chart/chart.config.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -14,7 +14,6 @@ import { DrawerType } from './drawers/drawing-manager'; import { DateTimeFormatter, TimeFormatterConfig } from './model/date-time.formatter'; import { DEFAULT_MERGE_OPTIONS, merge, MergeOptions } from './utils/merge.utils'; import { DeepPartial } from './utils/object.utils'; -import { Candle, defaultSortCandles } from './model/candle.model'; export const MAIN_FONT = 'Open Sans Semibold, sans-serif'; @@ -110,7 +109,6 @@ export const getDefaultConfig = (): FullChartConfig => ({ histogram: { barCapSize: 1, }, - sortCandles: defaultSortCandles, }, yAxis: { type: 'regular', @@ -578,6 +576,7 @@ export const getDefaultConfig = (): FullChartConfig => ({ 'GRID', 'X_AXIS', 'Y_AXIS', + 'UNDERLAY_VOLUMES_AREA', 'DYNAMIC_OBJECTS', 'WATERMARK', 'N_MAP_CHART', @@ -979,8 +978,6 @@ export interface ChartConfigComponentsChart { selectedWidth: number; minCandlesOffset: number; histogram: ChartConfigComponentsHistogram; - // optional because backward compability - sortCandles?: (candles: Candle[]) => Candle[]; } export interface ChartConfigComponentsEvents { diff --git a/src/chart/chart.ts b/src/chart/chart.ts index c2f2cf77..a341d9eb 100644 --- a/src/chart/chart.ts +++ b/src/chart/chart.ts @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited - * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. - * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. - */ import ChartBootstrap from './bootstrap'; import { BarType, PartialChartConfig } from './chart.config'; import { CandleSeries } from './components/chart/chart.component'; diff --git a/src/chart/components/chart/basic-scale.ts b/src/chart/components/chart/basic-scale.ts index de3513dd..1cffda52 100644 --- a/src/chart/components/chart/basic-scale.ts +++ b/src/chart/components/chart/basic-scale.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/chart/candle-width-calculator.functions.ts b/src/chart/components/chart/candle-width-calculator.functions.ts index c38a561d..675fcfe3 100644 --- a/src/chart/components/chart/candle-width-calculator.functions.ts +++ b/src/chart/components/chart/candle-width-calculator.functions.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/chart/chart-area-pan.handler.ts b/src/chart/components/chart/chart-area-pan.handler.ts index f27b6fe5..7d4b70cd 100644 --- a/src/chart/components/chart/chart-area-pan.handler.ts +++ b/src/chart/components/chart/chart-area-pan.handler.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/chart/chart-base.model.ts b/src/chart/components/chart/chart-base.model.ts index 70bc75b9..ebea9d84 100644 --- a/src/chart/components/chart/chart-base.model.ts +++ b/src/chart/components/chart/chart-base.model.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -50,11 +50,7 @@ export class ChartBaseModel { * @param timestamp */ // TODO think how to make this function like candleFromX - public dataFromTimestamp( - timestamp: Timestamp, - shouldExtrapolate: boolean = true, - selectedDataPoints: DataPoint[] = this.mainDataPoints, - ): VisualPoint { + public dataFromTimestamp(timestamp: Timestamp, shouldExtrapolate: boolean = true, selectedDataPoints: DataPoint[] = this.mainDataPoints): VisualPoint { const result = searchCandleIndex(timestamp, shouldExtrapolate, selectedDataPoints, this.period); return this.dataFromIdx(result.index); } diff --git a/src/chart/components/chart/chart.model.ts b/src/chart/components/chart/chart.model.ts index 38c75a24..4194bc03 100755 --- a/src/chart/components/chart/chart.model.ts +++ b/src/chart/components/chart/chart.model.ts @@ -233,7 +233,7 @@ export class ChartModel extends ChartBaseElement { instrument: ChartInstrument = this.mainCandleSeries.instrument, recalculateAndUpdate = true, ): CandleSeriesModel | undefined { - const preparedCandles = this.prepareCandles(candles); + const preparedCandles = prepareCandles(candles); // set correct indexes based on main candles timestamp const reindexCandles = this.reindexCandlesBasedOnSeries(this.mainCandleSeries.dataPoints, preparedCandles); // ensure there are no gaps in new candles @@ -270,7 +270,7 @@ export class ChartModel extends ChartBaseElement { this.mainInstrumentChangedSubject.next(mainSeries.instrument); } this.rememberCurrentTimeframe(); - const preparedCandles = this.prepareCandles(mainSeries.candles); + const preparedCandles = prepareCandles(mainSeries.candles); this.mainCandleSeries.clearData(); reindexCandles(preparedCandles); this.mainCandleSeries.dataPoints = preparedCandles; @@ -364,7 +364,7 @@ export class ChartModel extends ChartBaseElement { return; } - const preparedCandles = this.prepareCandles(mainSeries.candles); + const preparedCandles = prepareCandles(mainSeries.candles); const updateResult = updateCandles(this.mainCandleSeries.dataPoints, preparedCandles); const updatedCandles = updateResult.candles; reindexCandles(updatedCandles); @@ -372,7 +372,7 @@ export class ChartModel extends ChartBaseElement { // re-create series secondarySeries.map(series => { - const preparedCandles = this.prepareCandles(series.candles); + const preparedCandles = prepareCandles(series.candles); const updatedCandles = updateCandles( this.findSecondarySeriesBySymbol(series.instrument?.symbol ?? '')?.dataPoints ?? [], preparedCandles, @@ -1170,13 +1170,6 @@ export class ChartModel extends ChartBaseElement { this.candlesUpdatedSubject.next(); this.canvasModel.fireDraw(); } - - private prepareCandles = (candles: PartialCandle[]): Candle[] => { - const prepared = candles.map(prepareCandle).filter(isCandle); - const { sortCandles } = this.config.components.chart; - - return sortCandles ? sortCandles(prepared) : prepared; - }; } export interface UpdateCandlesResult { @@ -1185,6 +1178,11 @@ export interface UpdateCandlesResult { candles: Candle[]; } +const sortCandles = (candles: Candle[]): Candle[] => + candles.slice().sort((a, b) => (a.timestamp === b.timestamp ? 0 : a.timestamp > b.timestamp ? 1 : -1)); + +const prepareCandles = (candles: PartialCandle[]): Candle[] => sortCandles(candles.map(prepareCandle).filter(isCandle)); + const findFirstNotEmptyCandle = (candles: Array, startIdx: number, iterateStep: number): Candle | undefined => { if (startIdx >= candles.length) { return candles[candles.length - 1]; diff --git a/src/chart/components/chart/data-series.high-low-provider.ts b/src/chart/components/chart/data-series.high-low-provider.ts index fd704657..7ace0e8b 100644 --- a/src/chart/components/chart/data-series.high-low-provider.ts +++ b/src/chart/components/chart/data-series.high-low-provider.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/chart/fake-visual-candle.ts b/src/chart/components/chart/fake-visual-candle.ts index 2a8ebe02..de0dab32 100644 --- a/src/chart/components/chart/fake-visual-candle.ts +++ b/src/chart/components/chart/fake-visual-candle.ts @@ -1,13 +1,8 @@ -/* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited - * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. - * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. - */ -import { Candle, nameDirection } from '../../model/candle.model'; -import { DataSeriesPoint, VisualSeriesPoint } from '../../model/data-series.model'; -import { Index, Pixel, Unit } from '../../model/scaling/viewport.model'; -import VisualCandle from '../../model/visual-candle'; -import { DEFAULT_PERIOD, fakeCandle, fakeDataPoint } from './fake-candles'; +import { Candle, nameDirection } from "../../model/candle.model"; +import { DataSeriesPoint, VisualSeriesPoint } from "../../model/data-series.model"; +import { Index, Pixel, Unit } from "../../model/scaling/viewport.model"; +import VisualCandle from "../../model/visual-candle"; +import { DEFAULT_PERIOD, fakeCandle, fakeDataPoint } from "./fake-candles"; /** * Generates fake candle for left and right "out of data range" zones. @@ -73,4 +68,4 @@ export const fakeVisualPoint = ( x = firstCandle.centerUnit - offsetFromFirst; } return new VisualSeriesPoint(x, candle.close); -}; +}; \ No newline at end of file diff --git a/src/chart/components/chart/price.formatter.ts b/src/chart/components/chart/price.formatter.ts index ca980144..74f59890 100644 --- a/src/chart/components/chart/price.formatter.ts +++ b/src/chart/components/chart/price.formatter.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/chart/secondary-chart-colors-pool.ts b/src/chart/components/chart/secondary-chart-colors-pool.ts index 07b3e729..c5eb5e38 100644 --- a/src/chart/components/chart/secondary-chart-colors-pool.ts +++ b/src/chart/components/chart/secondary-chart-colors-pool.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/cross_tool/cross-tool.component.ts b/src/chart/components/cross_tool/cross-tool.component.ts index 7b75ed6c..2feec13f 100644 --- a/src/chart/components/cross_tool/cross-tool.component.ts +++ b/src/chart/components/cross_tool/cross-tool.component.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -63,11 +63,22 @@ export class CrossToolComponent extends ChartBaseElement { private registerDefaultDrawerTypes() { this.registerCrossToolTypeDrawer( 'cross-and-labels', - new CrossAndLabelsDrawerType(this.config, this.canvasBoundsContainer, this.paneManager, () => true), + new CrossAndLabelsDrawerType( + this.config, + this.canvasBoundsContainer, + this.paneManager, + () => true, + ), ); this.registerCrossToolTypeDrawer( 'just-labels', - new CrossAndLabelsDrawerType(this.config, this.canvasBoundsContainer, this.paneManager, () => true, true), + new CrossAndLabelsDrawerType( + this.config, + this.canvasBoundsContainer, + this.paneManager, + () => true, + true, + ), ); this.registerCrossToolTypeDrawer('none', new NoneDrawerType()); } diff --git a/src/chart/components/cross_tool/cross-tool.drawer.ts b/src/chart/components/cross_tool/cross-tool.drawer.ts index ac8018c4..1a5bede9 100644 --- a/src/chart/components/cross_tool/cross-tool.drawer.ts +++ b/src/chart/components/cross_tool/cross-tool.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/cross_tool/cross-tool.model.ts b/src/chart/components/cross_tool/cross-tool.model.ts index 3206f6f2..84d78ffb 100644 --- a/src/chart/components/cross_tool/cross-tool.model.ts +++ b/src/chart/components/cross_tool/cross-tool.model.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/cross_tool/types/cross-and-labels.drawer.ts b/src/chart/components/cross_tool/types/cross-and-labels.drawer.ts index dc3639cc..25fb9a06 100644 --- a/src/chart/components/cross_tool/types/cross-and-labels.drawer.ts +++ b/src/chart/components/cross_tool/types/cross-and-labels.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/cross_tool/types/none.drawer.ts b/src/chart/components/cross_tool/types/none.drawer.ts index 6bdadab2..9f0347e2 100644 --- a/src/chart/components/cross_tool/types/none.drawer.ts +++ b/src/chart/components/cross_tool/types/none.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/dran-n-drop_helper/drag-n-drop-x.component.ts b/src/chart/components/dran-n-drop_helper/drag-n-drop-x.component.ts index 8eae1195..a70d77c9 100644 --- a/src/chart/components/dran-n-drop_helper/drag-n-drop-x.component.ts +++ b/src/chart/components/dran-n-drop_helper/drag-n-drop-x.component.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/dran-n-drop_helper/drag-n-drop-y.component.ts b/src/chart/components/dran-n-drop_helper/drag-n-drop-y.component.ts index 9932bc0c..e0d7a27b 100644 --- a/src/chart/components/dran-n-drop_helper/drag-n-drop-y.component.ts +++ b/src/chart/components/dran-n-drop_helper/drag-n-drop-y.component.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/dran-n-drop_helper/drag-n-drop.component.ts b/src/chart/components/dran-n-drop_helper/drag-n-drop.component.ts index 3ea8eed9..e666a51e 100644 --- a/src/chart/components/dran-n-drop_helper/drag-n-drop.component.ts +++ b/src/chart/components/dran-n-drop_helper/drag-n-drop.component.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/dynamic-objects/dynamic-objects.component.ts b/src/chart/components/dynamic-objects/dynamic-objects.component.ts index e4f2a2d3..14507e46 100644 --- a/src/chart/components/dynamic-objects/dynamic-objects.component.ts +++ b/src/chart/components/dynamic-objects/dynamic-objects.component.ts @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited - * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. - * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. - */ import { DrawingManager } from '../../drawers/drawing-manager'; import { CanvasModel } from '../../model/canvas.model'; import { ChartBaseElement } from '../../model/chart-base-element'; diff --git a/src/chart/components/dynamic-objects/dynamic-objects.drawer.ts b/src/chart/components/dynamic-objects/dynamic-objects.drawer.ts index 0d8d0630..52a7cf9e 100644 --- a/src/chart/components/dynamic-objects/dynamic-objects.drawer.ts +++ b/src/chart/components/dynamic-objects/dynamic-objects.drawer.ts @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited - * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. - * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. - */ import { Drawer } from '../../drawers/drawing-manager'; import { CanvasModel } from '../../model/canvas.model'; import { DynamicObjectsModel } from './dynamic-objects.model'; diff --git a/src/chart/components/dynamic-objects/dynamic-objects.model.ts b/src/chart/components/dynamic-objects/dynamic-objects.model.ts index 7efa493f..d59bb16d 100644 --- a/src/chart/components/dynamic-objects/dynamic-objects.model.ts +++ b/src/chart/components/dynamic-objects/dynamic-objects.model.ts @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited - * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. - * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. - */ import { BehaviorSubject } from 'rxjs'; import { ChartBaseElement } from '../../model/chart-base-element'; import { LinkedList, ListNode } from '../../utils/linkedList.utils'; diff --git a/src/chart/components/events/events-hit-test.drawer.ts b/src/chart/components/events/events-hit-test.drawer.ts index 27e76618..9fcbf53b 100644 --- a/src/chart/components/events/events-hit-test.drawer.ts +++ b/src/chart/components/events/events-hit-test.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/events/events.component.ts b/src/chart/components/events/events.component.ts index 7d6a6baf..62bbdb2a 100644 --- a/src/chart/components/events/events.component.ts +++ b/src/chart/components/events/events.component.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/events/events.drawer.ts b/src/chart/components/events/events.drawer.ts index 2c6cac01..9284daf7 100644 --- a/src/chart/components/events/events.drawer.ts +++ b/src/chart/components/events/events.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -201,6 +201,7 @@ export class EventsDrawer implements Drawer { ctx.strokeStyle = this.config.colors.xAxis.backgroundColor; ctx.fillRect(x - width / 2, xAxisBounds.y + 1, width, xAxisBounds.height - 1); + ctx.fillStyle = this.config.colors.events[event.type].color; ctx.fillText(labelText, x - width / 2, y); } diff --git a/src/chart/components/events/events.model.ts b/src/chart/components/events/events.model.ts index 818d9374..513287b1 100644 --- a/src/chart/components/events/events.model.ts +++ b/src/chart/components/events/events.model.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/grid/grid.component.ts b/src/chart/components/grid/grid.component.ts index e0369aa8..8c9ca0f3 100644 --- a/src/chart/components/grid/grid.component.ts +++ b/src/chart/components/grid/grid.component.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/grid/grid.drawer.ts b/src/chart/components/grid/grid.drawer.ts index 06875781..1be196f9 100644 --- a/src/chart/components/grid/grid.drawer.ts +++ b/src/chart/components/grid/grid.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/high_low/high-low.component.ts b/src/chart/components/high_low/high-low.component.ts index 9fbd3cc1..d77e3695 100644 --- a/src/chart/components/high_low/high-low.component.ts +++ b/src/chart/components/high_low/high-low.component.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/high_low/high-low.drawer.ts b/src/chart/components/high_low/high-low.drawer.ts index 81a3a699..f8e6f748 100644 --- a/src/chart/components/high_low/high-low.drawer.ts +++ b/src/chart/components/high_low/high-low.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/highlights/highlights.component.ts b/src/chart/components/highlights/highlights.component.ts index 64f8af1f..d7bab814 100644 --- a/src/chart/components/highlights/highlights.component.ts +++ b/src/chart/components/highlights/highlights.component.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/highlights/highlights.drawer.ts b/src/chart/components/highlights/highlights.drawer.ts index fd75a584..f159f316 100644 --- a/src/chart/components/highlights/highlights.drawer.ts +++ b/src/chart/components/highlights/highlights.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/highlights/highlights.model.ts b/src/chart/components/highlights/highlights.model.ts index d36ab8c3..700c847d 100644 --- a/src/chart/components/highlights/highlights.model.ts +++ b/src/chart/components/highlights/highlights.model.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/hit-test/hit-test.component.ts b/src/chart/components/hit-test/hit-test.component.ts index 7c8bbaf5..d76318a9 100644 --- a/src/chart/components/hit-test/hit-test.component.ts +++ b/src/chart/components/hit-test/hit-test.component.ts @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited - * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. - * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. - */ import { distinctUntilChanged } from 'rxjs/operators'; import { CanvasAnimation } from '../../animation/canvas-animation'; import EventBus from '../../events/event-bus'; diff --git a/src/chart/components/labels_generator/numeric-axis-labels.generator.ts b/src/chart/components/labels_generator/numeric-axis-labels.generator.ts index 8e1343fe..d2b0c822 100644 --- a/src/chart/components/labels_generator/numeric-axis-labels.generator.ts +++ b/src/chart/components/labels_generator/numeric-axis-labels.generator.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/navigation_map/navigation-map-move.handler.ts b/src/chart/components/navigation_map/navigation-map-move.handler.ts index d07d3f9a..9745f046 100644 --- a/src/chart/components/navigation_map/navigation-map-move.handler.ts +++ b/src/chart/components/navigation_map/navigation-map-move.handler.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/navigation_map/navigation-map.component.ts b/src/chart/components/navigation_map/navigation-map.component.ts index 4b61ba35..96d59c36 100644 --- a/src/chart/components/navigation_map/navigation-map.component.ts +++ b/src/chart/components/navigation_map/navigation-map.component.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/navigation_map/navigation-map.drawer.ts b/src/chart/components/navigation_map/navigation-map.drawer.ts index 46f0685f..023a3a31 100644 --- a/src/chart/components/navigation_map/navigation-map.drawer.ts +++ b/src/chart/components/navigation_map/navigation-map.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/navigation_map/navigation-map.model.ts b/src/chart/components/navigation_map/navigation-map.model.ts index e2238402..7bb9cdb8 100644 --- a/src/chart/components/navigation_map/navigation-map.model.ts +++ b/src/chart/components/navigation_map/navigation-map.model.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/pan/chart-pan.component.ts b/src/chart/components/pan/chart-pan.component.ts index b9b91c8d..456177b8 100644 --- a/src/chart/components/pan/chart-pan.component.ts +++ b/src/chart/components/pan/chart-pan.component.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/pane/extent/y-extent-component.ts b/src/chart/components/pane/extent/y-extent-component.ts index 587c87cc..1854c8da 100644 --- a/src/chart/components/pane/extent/y-extent-component.ts +++ b/src/chart/components/pane/extent/y-extent-component.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/pane/pane-hit-test.controller.ts b/src/chart/components/pane/pane-hit-test.controller.ts index d17e8d85..76d4c63b 100644 --- a/src/chart/components/pane/pane-hit-test.controller.ts +++ b/src/chart/components/pane/pane-hit-test.controller.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/pane/pane-manager.component.ts b/src/chart/components/pane/pane-manager.component.ts index a443f64f..eb92dfba 100644 --- a/src/chart/components/pane/pane-manager.component.ts +++ b/src/chart/components/pane/pane-manager.component.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/pane/pane.component.ts b/src/chart/components/pane/pane.component.ts index 37a5dca2..f3f68e06 100644 --- a/src/chart/components/pane/pane.component.ts +++ b/src/chart/components/pane/pane.component.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/resizer/bar-resizer.component.ts b/src/chart/components/resizer/bar-resizer.component.ts index 3a6985c7..a16811e3 100644 --- a/src/chart/components/resizer/bar-resizer.component.ts +++ b/src/chart/components/resizer/bar-resizer.component.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/resizer/bar-resizer.drawer.ts b/src/chart/components/resizer/bar-resizer.drawer.ts index 6024e7c5..742c5c1f 100644 --- a/src/chart/components/resizer/bar-resizer.drawer.ts +++ b/src/chart/components/resizer/bar-resizer.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/snapshot/snapshot.component.ts b/src/chart/components/snapshot/snapshot.component.ts index 6e266137..af10c69d 100644 --- a/src/chart/components/snapshot/snapshot.component.ts +++ b/src/chart/components/snapshot/snapshot.component.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/volumes/separate-volumes.component.ts b/src/chart/components/volumes/separate-volumes.component.ts index e0740b0b..87360aa4 100644 --- a/src/chart/components/volumes/separate-volumes.component.ts +++ b/src/chart/components/volumes/separate-volumes.component.ts @@ -1,9 +1,10 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ import { FullChartConfig } from '../../chart.config'; +import { DrawingManager } from '../../drawers/drawing-manager'; import { ChartBaseElement } from '../../model/chart-base-element'; import { Pixel, Unit } from '../../model/scaling/viewport.model'; import { ChartComponent } from '../chart/chart.component'; @@ -18,6 +19,7 @@ export class SeparateVolumesComponent extends ChartBaseElement { public pane: PaneComponent | undefined; constructor( private chartComponent: ChartComponent, + private drawingManager: DrawingManager, public config: FullChartConfig, private volumesModel: VolumesModel, private paneManager: PaneManager, @@ -72,6 +74,7 @@ export class SeparateVolumesComponent extends ChartBaseElement { deactiveSeparateVolumes() { this.paneManager.removePane(SeparateVolumesComponent.UUID); delete this.pane; + this.drawingManager.removeDrawerByName('UNDERLAY_VOLUMES_AREA'); } /** diff --git a/src/chart/components/volumes/volume-color-resolvers.functions.ts b/src/chart/components/volumes/volume-color-resolvers.functions.ts index 20e21f40..47c9266b 100644 --- a/src/chart/components/volumes/volume-color-resolvers.functions.ts +++ b/src/chart/components/volumes/volume-color-resolvers.functions.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/volumes/volumes.component.ts b/src/chart/components/volumes/volumes.component.ts index aa2f4707..032caf2a 100644 --- a/src/chart/components/volumes/volumes.component.ts +++ b/src/chart/components/volumes/volumes.component.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -43,7 +43,13 @@ export class VolumesComponent extends ChartBaseElement { const volumesModel = new VolumesModel(chartComponent, scale); this.volumesModel = volumesModel; this.addChildEntity(volumesModel); - this.separateVolumes = new SeparateVolumesComponent(chartComponent, config, volumesModel, paneManager); + this.separateVolumes = new SeparateVolumesComponent( + chartComponent, + drawingManager, + config, + volumesModel, + paneManager, + ); this.volumesDrawer = new VolumesDrawer( config, this.volumesModel, diff --git a/src/chart/components/volumes/volumes.drawer.ts b/src/chart/components/volumes/volumes.drawer.ts index b13bd968..f79d00f3 100644 --- a/src/chart/components/volumes/volumes.drawer.ts +++ b/src/chart/components/volumes/volumes.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -118,11 +118,11 @@ export class VolumesDrawer implements DynamicModelDrawer { nextX !== undefined ? nextX - x : floorToDPR(unitToPixels(vCandle.width, viewportModel.zoomX)); if (this.config.components.volumes.showSeparately) { const y = floorToDPR(viewportModel.toY(vCandle.candle.volume)); - const height = ceilToDPR(viewportModel.toY(0)) - y; + const height = floorToDPR(viewportModel.toY(0)) - y; this.drawVolume(canvasModel, vCandle, x, y, width, height); } else { const zoomY = volumeMax / (fullVHeight / OVERLAY_VOLUME_TOTAL_HEIGHT_DIVISOR); - const height = Math.max(ceilToDPR(unitToPixels(vCandle.candle.volume, zoomY)), 2); + const height = Math.max(unitToPixels(vCandle.candle.volume, zoomY), 2); const y = floorToDPR(bounds.y + fullVHeight - height); this.drawVolume(canvasModel, vCandle, x, y, width, height); } @@ -161,7 +161,7 @@ export class VolumesDrawer implements DynamicModelDrawer { ctx.lineTo(x, ceilToDPR(yEnd)); ctx.stroke(); } else { - ctx.fillRect(x, y, width, height); + ctx.fillRect(x, y, width, ceilToDPR(height)); } } } diff --git a/src/chart/components/volumes/volumes.formatter.ts b/src/chart/components/volumes/volumes.formatter.ts index 67c5a38a..4309d46b 100644 --- a/src/chart/components/volumes/volumes.formatter.ts +++ b/src/chart/components/volumes/volumes.formatter.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -37,4 +37,4 @@ export const volumeFormatter = (value: number, precision = 1) => { } return format(value); -}; +}; \ No newline at end of file diff --git a/src/chart/components/volumes/volumes.model.ts b/src/chart/components/volumes/volumes.model.ts index 210a8629..2e2238ab 100644 --- a/src/chart/components/volumes/volumes.model.ts +++ b/src/chart/components/volumes/volumes.model.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/watermark/water-mark.component.ts b/src/chart/components/watermark/water-mark.component.ts index 1156f560..a1d4cae4 100644 --- a/src/chart/components/watermark/water-mark.component.ts +++ b/src/chart/components/watermark/water-mark.component.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -15,6 +15,16 @@ import { ChartModel } from '../chart/chart.model'; import { PaneManager } from '../pane/pane-manager.component'; import { WaterMarkDrawer } from './water-mark.drawer'; +export interface WaterMarkConfig { + isVisible?: boolean; + fontFamily?: string; + firstRowFontSize?: number; + firstRowBottomPadding?: number; + secondRowFontSize?: number; + secondRowBottomPadding?: number; + thirdRowFontSize?: number; +} + export interface WaterMarkData { firstRow?: string; secondRow?: string; @@ -93,22 +103,23 @@ export class WaterMarkComponent extends ChartBaseElement { /** * Sets the watermark configuration for the chart. - * @param {ChartConfigComponentsWaterMark} watermarkConfig - The configuration object for the watermark. + * @param {WaterMarkConfig} watermarkConfig - The configuration object for the watermark. * @returns {void} */ - public setWaterMarkConfig(watermarkConfig: ChartConfigComponentsWaterMark): void { + public setWaterMarkConfig(watermarkConfig: WaterMarkConfig): void { if (!watermarkConfig || !this.config.components) { return; } if (!this.config.components.waterMark) { this.config.components.waterMark = JSON.parse(JSON.stringify(watermarkConfig)); } else { - const newWatermark: Partial = {}; + const newWatermark: WaterMarkConfig = {}; merge(newWatermark, watermarkConfig); merge(newWatermark, this.config.components.waterMark); // eslint-disable-next-line no-restricted-syntax - this.config.components.waterMark = newWatermark as ChartConfigComponentsWaterMark; + this.config.components.waterMark = newWatermark as ChartConfigComponentsWaterMark & + Required; } this.canvasModel.fireDraw(); } diff --git a/src/chart/components/watermark/water-mark.drawer.ts b/src/chart/components/watermark/water-mark.drawer.ts index 832f5dc4..04280d9b 100644 --- a/src/chart/components/watermark/water-mark.drawer.ts +++ b/src/chart/components/watermark/water-mark.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/x_axis/numeric-x-axis-labels.generator.ts b/src/chart/components/x_axis/numeric-x-axis-labels.generator.ts index 457f5b9e..427ed72e 100644 --- a/src/chart/components/x_axis/numeric-x-axis-labels.generator.ts +++ b/src/chart/components/x_axis/numeric-x-axis-labels.generator.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/x_axis/time/parser/time-formats-matchers.functions.ts b/src/chart/components/x_axis/time/parser/time-formats-matchers.functions.ts index 2c3a4326..24bdfdaa 100644 --- a/src/chart/components/x_axis/time/parser/time-formats-matchers.functions.ts +++ b/src/chart/components/x_axis/time/parser/time-formats-matchers.functions.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/x_axis/time/parser/time-formats-parser.functions.ts b/src/chart/components/x_axis/time/parser/time-formats-parser.functions.ts index 2eb9b6c2..43ea1a63 100644 --- a/src/chart/components/x_axis/time/parser/time-formats-parser.functions.ts +++ b/src/chart/components/x_axis/time/parser/time-formats-parser.functions.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -86,7 +86,7 @@ export const parseTimeFormatsFromKey = (format: TimeFormatWithDuration): ParsedT }; } else { console.warn( - `${format} is not fit, check the documentation to see available formats in dxchart-lite documentation.`, + `${format} is not fit, check the documentation to see available formats https://webdev.prosp.devexperts.com:8095/docs/chart/x-axis`, ); return null; } diff --git a/src/chart/components/x_axis/time/parser/time-formats-validators.functions.ts b/src/chart/components/x_axis/time/parser/time-formats-validators.functions.ts index 559ad16b..1e817179 100644 --- a/src/chart/components/x_axis/time/parser/time-formats-validators.functions.ts +++ b/src/chart/components/x_axis/time/parser/time-formats-validators.functions.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/x_axis/time/parser/time-formats.model.ts b/src/chart/components/x_axis/time/parser/time-formats.model.ts index 3a8bac38..2507156a 100644 --- a/src/chart/components/x_axis/time/parser/time-formats.model.ts +++ b/src/chart/components/x_axis/time/parser/time-formats.model.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/x_axis/time/x-axis-weights.functions.ts b/src/chart/components/x_axis/time/x-axis-weights.functions.ts index 3b2117b3..0b7f9a49 100644 --- a/src/chart/components/x_axis/time/x-axis-weights.functions.ts +++ b/src/chart/components/x_axis/time/x-axis-weights.functions.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/x_axis/time/x-axis-weights.generator.ts b/src/chart/components/x_axis/time/x-axis-weights.generator.ts index cb0c3ebc..f2278665 100644 --- a/src/chart/components/x_axis/time/x-axis-weights.generator.ts +++ b/src/chart/components/x_axis/time/x-axis-weights.generator.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/x_axis/x-axis-draw.functions.ts b/src/chart/components/x_axis/x-axis-draw.functions.ts index 623c8249..77ec480a 100644 --- a/src/chart/components/x_axis/x-axis-draw.functions.ts +++ b/src/chart/components/x_axis/x-axis-draw.functions.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/x_axis/x-axis-labels.drawer.ts b/src/chart/components/x_axis/x-axis-labels.drawer.ts index 574acabd..ae718304 100644 --- a/src/chart/components/x_axis/x-axis-labels.drawer.ts +++ b/src/chart/components/x_axis/x-axis-labels.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/x_axis/x-axis-labels.generator.ts b/src/chart/components/x_axis/x-axis-labels.generator.ts index 637b3ae7..874a1d93 100644 --- a/src/chart/components/x_axis/x-axis-labels.generator.ts +++ b/src/chart/components/x_axis/x-axis-labels.generator.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/x_axis/x-axis-labels.model.ts b/src/chart/components/x_axis/x-axis-labels.model.ts index da9fa9c4..6ad378e8 100644 --- a/src/chart/components/x_axis/x-axis-labels.model.ts +++ b/src/chart/components/x_axis/x-axis-labels.model.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/x_axis/x-axis-scale.handler.ts b/src/chart/components/x_axis/x-axis-scale.handler.ts index 90f8c746..c2eb8cd8 100644 --- a/src/chart/components/x_axis/x-axis-scale.handler.ts +++ b/src/chart/components/x_axis/x-axis-scale.handler.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -122,7 +122,7 @@ export class XAxisScaleHandler extends ChartBaseElement { this.hitTestCanvasModel.hitTestDrawersPredicateSubject.next(true); }; - public setDblTapCallback = (cb: () => void) => (this.dblTapCallback = cb); + public setDblTapCallback = (cb: () => void) => this.dblTapCallback = cb; - public setDblClickCallback = (cb: () => void) => (this.dblClickCallback = cb); + public setDblClickCallback = (cb: () => void) => this.dblClickCallback = cb; } diff --git a/src/chart/components/x_axis/x-axis-time-labels.drawer.ts b/src/chart/components/x_axis/x-axis-time-labels.drawer.ts index 37ac9457..ac2ffc6b 100644 --- a/src/chart/components/x_axis/x-axis-time-labels.drawer.ts +++ b/src/chart/components/x_axis/x-axis-time-labels.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/y_axis/label-color.functions.ts b/src/chart/components/y_axis/label-color.functions.ts index 1e937186..39d8a117 100644 --- a/src/chart/components/y_axis/label-color.functions.ts +++ b/src/chart/components/y_axis/label-color.functions.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/y_axis/numeric-y-axis-labels.generator.ts b/src/chart/components/y_axis/numeric-y-axis-labels.generator.ts index b9fd3937..9f386cc8 100644 --- a/src/chart/components/y_axis/numeric-y-axis-labels.generator.ts +++ b/src/chart/components/y_axis/numeric-y-axis-labels.generator.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/y_axis/price_labels/data-series-y-axis-labels.provider.ts b/src/chart/components/y_axis/price_labels/data-series-y-axis-labels.provider.ts index 3d806fc0..c4a1fc67 100644 --- a/src/chart/components/y_axis/price_labels/data-series-y-axis-labels.provider.ts +++ b/src/chart/components/y_axis/price_labels/data-series-y-axis-labels.provider.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/y_axis/price_labels/labels-positions-calculator.ts b/src/chart/components/y_axis/price_labels/labels-positions-calculator.ts index 6ab85b8e..7ccaae15 100644 --- a/src/chart/components/y_axis/price_labels/labels-positions-calculator.ts +++ b/src/chart/components/y_axis/price_labels/labels-positions-calculator.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/y_axis/price_labels/last-candle-labels.provider.ts b/src/chart/components/y_axis/price_labels/last-candle-labels.provider.ts index 5c07f8a4..82fbd377 100644 --- a/src/chart/components/y_axis/price_labels/last-candle-labels.provider.ts +++ b/src/chart/components/y_axis/price_labels/last-candle-labels.provider.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/y_axis/price_labels/price-label.drawer.ts b/src/chart/components/y_axis/price_labels/price-label.drawer.ts index b0a5b7f2..01f7a2b2 100644 --- a/src/chart/components/y_axis/price_labels/price-label.drawer.ts +++ b/src/chart/components/y_axis/price_labels/price-label.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -77,7 +77,7 @@ export function drawLabel( const showLine = isLineVisible(bounds, labelY, labelBoxHeight); const _drawDescription = () => - showDescription && drawDescription(backgroundCtx, ctx, bounds, paneBounds, visualLabel, config); + showDescription && drawDescription(backgroundCtx, ctx, bounds, paneBounds, visualLabel, config); let lineXStart: number; let lineXEnd: number; diff --git a/src/chart/components/y_axis/price_labels/y-axis-labels.model.ts b/src/chart/components/y_axis/price_labels/y-axis-labels.model.ts index 9bb85e71..a402b027 100644 --- a/src/chart/components/y_axis/price_labels/y-axis-labels.model.ts +++ b/src/chart/components/y_axis/price_labels/y-axis-labels.model.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/y_axis/price_labels/y-axis-price-labels.drawer.ts b/src/chart/components/y_axis/price_labels/y-axis-price-labels.drawer.ts index 635944a9..49cc898c 100644 --- a/src/chart/components/y_axis/price_labels/y-axis-price-labels.drawer.ts +++ b/src/chart/components/y_axis/price_labels/y-axis-price-labels.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/y_axis/y-axis-base-labels.model.ts b/src/chart/components/y_axis/y-axis-base-labels.model.ts index 9455326e..86b00c21 100644 --- a/src/chart/components/y_axis/y-axis-base-labels.model.ts +++ b/src/chart/components/y_axis/y-axis-base-labels.model.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/y_axis/y-axis-labels.drawer.ts b/src/chart/components/y_axis/y-axis-labels.drawer.ts index 6df23f00..3d649182 100644 --- a/src/chart/components/y_axis/y-axis-labels.drawer.ts +++ b/src/chart/components/y_axis/y-axis-labels.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -267,4 +267,4 @@ export function getLabelYOffset( */ export function checkLabelInBoundaries(centralY: number, bounds: Bounds, labelBoxHeight: number) { return !(centralY < bounds.y + labelBoxHeight / 2 || centralY > bounds.y + bounds.height - labelBoxHeight / 2); -} +} \ No newline at end of file diff --git a/src/chart/components/y_axis/y-axis-scale.handler.ts b/src/chart/components/y_axis/y-axis-scale.handler.ts index d9549881..c3ef3a20 100644 --- a/src/chart/components/y_axis/y-axis-scale.handler.ts +++ b/src/chart/components/y_axis/y-axis-scale.handler.ts @@ -1,15 +1,10 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ import { Subject } from 'rxjs'; -import { - CanvasBoundsContainer, - CanvasElement, - DEFAULT_MIN_PANE_HEIGHT, - HitBoundsTest, -} from '../../canvas/canvas-bounds-container'; +import { CanvasBoundsContainer, CanvasElement, DEFAULT_MIN_PANE_HEIGHT, HitBoundsTest } from '../../canvas/canvas-bounds-container'; import { YAxisConfig } from '../../chart.config'; import EventBus from '../../events/event-bus'; import { ChartBaseElement } from '../../model/chart-base-element'; @@ -68,8 +63,7 @@ export class YAxisScaleHandler extends ChartBaseElement { canvasInputListener, panning, { - dragPredicate: () => - panning.chartAreaPanHandler.chartPanningOptions.vertical && config.type !== 'percent', + dragPredicate: () => panning.chartAreaPanHandler.chartPanningOptions.vertical && config.type !== 'percent', }, ); this.addChildEntity(dragNDropYComponent); @@ -154,7 +148,7 @@ export class YAxisScaleHandler extends ChartBaseElement { this.hitTestCanvasModel.hitTestDrawersPredicateSubject.next(true); }; - public setDblTapCallback = (cb: () => void) => (this.dblTapCallback = cb); + public setDblTapCallback = (cb: () => void) => this.dblTapCallback = cb; - public setDblClickCallback = (cb: () => void) => (this.dblClickCallback = cb); -} + public setDblClickCallback = (cb: () => void) => this.dblClickCallback = cb; +} \ No newline at end of file diff --git a/src/chart/components/y_axis/y-axis.component.ts b/src/chart/components/y_axis/y-axis.component.ts index 1c8f2e37..807c89b0 100644 --- a/src/chart/components/y_axis/y-axis.component.ts +++ b/src/chart/components/y_axis/y-axis.component.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/components/y_axis/y-axis.drawer.ts b/src/chart/components/y_axis/y-axis.drawer.ts index 16913056..a5e8554d 100644 --- a/src/chart/components/y_axis/y-axis.drawer.ts +++ b/src/chart/components/y_axis/y-axis.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -49,21 +49,21 @@ export class YAxisDrawer implements Drawer { const labels = yAxisComponent.model.baseLabelsModel.labels; const bounds: Bounds = yAxisComponent.getBounds(); - const ctx = this.canvasModel.ctx; + const ctx = this.canvasModel.ctx; - // draw axis background rect animation - ctx.fillStyle = this.getBackgroundColor(); - ctx.fillRect(bounds.x, bounds.y, bounds.width, bounds.height); + // draw axis background rect animation + ctx.fillStyle = this.getBackgroundColor(); + ctx.fillRect(bounds.x, bounds.y, bounds.width, bounds.height); const font = getFontFromConfig(yAxisComponent.state); - const fontHeight = calculateSymbolHeight(font, ctx); + const fontHeight = calculateSymbolHeight(font, ctx); - const textColor = this.getLabelTextColor(); - ctx.save(); - clipToBounds(ctx, bounds); + const textColor = this.getLabelTextColor(); + ctx.save(); + clipToBounds(ctx, bounds); this.drawLabels(ctx, labels, bounds, fontHeight, font, textColor, yAxisComponent); - ctx.restore(); - } + ctx.restore(); + } }); } diff --git a/src/chart/components/y_axis/y-axis.model.ts b/src/chart/components/y_axis/y-axis.model.ts index 0b38f96d..7757085a 100644 --- a/src/chart/components/y_axis/y-axis.model.ts +++ b/src/chart/components/y_axis/y-axis.model.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/drawers/chart-background.drawer.ts b/src/chart/drawers/chart-background.drawer.ts index 03432fad..f372136f 100644 --- a/src/chart/drawers/chart-background.drawer.ts +++ b/src/chart/drawers/chart-background.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -25,12 +25,7 @@ export class BackgroundDrawer implements Drawer { this.canvasModel.clear(); const ctx = this.canvasModel.ctx; if (this.config.colors.chartAreaTheme.backgroundMode === 'gradient') { - const grd = ctx.createLinearGradient( - 0, - 0 + this.canvasModel.height / 2, - this.canvasModel.width, - 0 + this.canvasModel.height / 2, - ); + const grd = ctx.createLinearGradient(0, 0 + this.canvasModel.height / 2, this.canvasModel.width, 0 + this.canvasModel.height / 2); grd.addColorStop(0, this.config.colors.chartAreaTheme.backgroundGradientTopColor); grd.addColorStop(1, this.config.colors.chartAreaTheme.backgroundGradientBottomColor); ctx.fillStyle = grd; diff --git a/src/chart/drawers/chart-type-drawers/area.drawer.ts b/src/chart/drawers/chart-type-drawers/area.drawer.ts index 07d02c5b..9d679938 100644 --- a/src/chart/drawers/chart-type-drawers/area.drawer.ts +++ b/src/chart/drawers/chart-type-drawers/area.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/drawers/chart-type-drawers/bar.drawer.ts b/src/chart/drawers/chart-type-drawers/bar.drawer.ts index e18f8631..bbef1a01 100644 --- a/src/chart/drawers/chart-type-drawers/bar.drawer.ts +++ b/src/chart/drawers/chart-type-drawers/bar.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/drawers/chart-type-drawers/baseline.drawer.ts b/src/chart/drawers/chart-type-drawers/baseline.drawer.ts index 922945be..888fb05b 100644 --- a/src/chart/drawers/chart-type-drawers/baseline.drawer.ts +++ b/src/chart/drawers/chart-type-drawers/baseline.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/drawers/chart-type-drawers/candle.drawer.ts b/src/chart/drawers/chart-type-drawers/candle.drawer.ts index de712b99..0f134c68 100644 --- a/src/chart/drawers/chart-type-drawers/candle.drawer.ts +++ b/src/chart/drawers/chart-type-drawers/candle.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/drawers/chart-type-drawers/histogram.drawer.ts b/src/chart/drawers/chart-type-drawers/histogram.drawer.ts index b81734ae..554520ec 100644 --- a/src/chart/drawers/chart-type-drawers/histogram.drawer.ts +++ b/src/chart/drawers/chart-type-drawers/histogram.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/drawers/chart-type-drawers/line.drawer.ts b/src/chart/drawers/chart-type-drawers/line.drawer.ts index 1e9fdec7..d7efbbdd 100644 --- a/src/chart/drawers/chart-type-drawers/line.drawer.ts +++ b/src/chart/drawers/chart-type-drawers/line.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/drawers/chart-type-drawers/scatter-plot.drawer.ts b/src/chart/drawers/chart-type-drawers/scatter-plot.drawer.ts index 9d83991d..7cb82d61 100644 --- a/src/chart/drawers/chart-type-drawers/scatter-plot.drawer.ts +++ b/src/chart/drawers/chart-type-drawers/scatter-plot.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/drawers/clear-canvas.drawer.ts b/src/chart/drawers/clear-canvas.drawer.ts index e9d1736e..46a08d41 100644 --- a/src/chart/drawers/clear-canvas.drawer.ts +++ b/src/chart/drawers/clear-canvas.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/drawers/composite.drawer.ts b/src/chart/drawers/composite.drawer.ts index 15e4b289..a5586849 100644 --- a/src/chart/drawers/composite.drawer.ts +++ b/src/chart/drawers/composite.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/drawers/data-series-drawers/candle-series-wrapper.ts b/src/chart/drawers/data-series-drawers/candle-series-wrapper.ts index 061a8b8c..4ae59599 100644 --- a/src/chart/drawers/data-series-drawers/candle-series-wrapper.ts +++ b/src/chart/drawers/data-series-drawers/candle-series-wrapper.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/drawers/data-series-drawers/color-candle.drawer.ts b/src/chart/drawers/data-series-drawers/color-candle.drawer.ts index 1c6922f7..530f5898 100644 --- a/src/chart/drawers/data-series-drawers/color-candle.drawer.ts +++ b/src/chart/drawers/data-series-drawers/color-candle.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/drawers/data-series-drawers/data-series-drawers.utils.ts b/src/chart/drawers/data-series-drawers/data-series-drawers.utils.ts index 499e9fcc..0c326e38 100644 --- a/src/chart/drawers/data-series-drawers/data-series-drawers.utils.ts +++ b/src/chart/drawers/data-series-drawers/data-series-drawers.utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/drawers/data-series-drawers/difference-cloud.drawer.ts b/src/chart/drawers/data-series-drawers/difference-cloud.drawer.ts index 4d38a5e4..ea111841 100644 --- a/src/chart/drawers/data-series-drawers/difference-cloud.drawer.ts +++ b/src/chart/drawers/data-series-drawers/difference-cloud.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/drawers/data-series-drawers/histogram.drawer.ts b/src/chart/drawers/data-series-drawers/histogram.drawer.ts index ecd186ae..dbc07f64 100644 --- a/src/chart/drawers/data-series-drawers/histogram.drawer.ts +++ b/src/chart/drawers/data-series-drawers/histogram.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/drawers/data-series-drawers/linear.drawer.ts b/src/chart/drawers/data-series-drawers/linear.drawer.ts index 506b3588..77c9193d 100644 --- a/src/chart/drawers/data-series-drawers/linear.drawer.ts +++ b/src/chart/drawers/data-series-drawers/linear.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/drawers/data-series-drawers/points.drawer.ts b/src/chart/drawers/data-series-drawers/points.drawer.ts index 9011f9ad..24fa91ce 100644 --- a/src/chart/drawers/data-series-drawers/points.drawer.ts +++ b/src/chart/drawers/data-series-drawers/points.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/drawers/data-series-drawers/rectangular-tool.drawer.ts b/src/chart/drawers/data-series-drawers/rectangular-tool.drawer.ts index 1fbb8108..9516d99c 100644 --- a/src/chart/drawers/data-series-drawers/rectangular-tool.drawer.ts +++ b/src/chart/drawers/data-series-drawers/rectangular-tool.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/drawers/data-series-drawers/text.drawer.ts b/src/chart/drawers/data-series-drawers/text.drawer.ts index 2afe7a2a..ef47a309 100644 --- a/src/chart/drawers/data-series-drawers/text.drawer.ts +++ b/src/chart/drawers/data-series-drawers/text.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/drawers/data-series-drawers/trend-histogram.drawer.ts b/src/chart/drawers/data-series-drawers/trend-histogram.drawer.ts index 26784bf2..1374c831 100644 --- a/src/chart/drawers/data-series-drawers/trend-histogram.drawer.ts +++ b/src/chart/drawers/data-series-drawers/trend-histogram.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/drawers/data-series-drawers/triangle.drawer.ts b/src/chart/drawers/data-series-drawers/triangle.drawer.ts index 7e7ad438..89f5e75b 100644 --- a/src/chart/drawers/data-series-drawers/triangle.drawer.ts +++ b/src/chart/drawers/data-series-drawers/triangle.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/drawers/data-series.drawer.ts b/src/chart/drawers/data-series.drawer.ts index 793691f3..45751c52 100644 --- a/src/chart/drawers/data-series.drawer.ts +++ b/src/chart/drawers/data-series.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/drawers/drawing-manager.ts b/src/chart/drawers/drawing-manager.ts index 37902277..cfd96570 100644 --- a/src/chart/drawers/drawing-manager.ts +++ b/src/chart/drawers/drawing-manager.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -23,6 +23,7 @@ const drawerTypes = [ 'OVER_SERIES_CLEAR', 'HIT_TEST_DRAWINGS', 'GRID', + 'UNDERLAY_VOLUMES_AREA', 'X_AXIS', 'Y_AXIS', 'HIGH_LOW', diff --git a/src/chart/drawers/ht-data-series.drawer.ts b/src/chart/drawers/ht-data-series.drawer.ts index edd1a6d4..8cbbfb02 100644 --- a/src/chart/drawers/ht-data-series.drawer.ts +++ b/src/chart/drawers/ht-data-series.drawer.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/events/event-bus.ts b/src/chart/events/event-bus.ts index 8beed6d8..5d514490 100644 --- a/src/chart/events/event-bus.ts +++ b/src/chart/events/event-bus.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/events/events.ts b/src/chart/events/events.ts index cec7aae2..59afdf2f 100644 --- a/src/chart/events/events.ts +++ b/src/chart/events/events.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/inputhandlers/candle-tap.handler.ts b/src/chart/inputhandlers/candle-tap.handler.ts index cff161c4..b655533a 100644 --- a/src/chart/inputhandlers/candle-tap.handler.ts +++ b/src/chart/inputhandlers/candle-tap.handler.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/inputhandlers/chart-resize.handler.ts b/src/chart/inputhandlers/chart-resize.handler.ts index 0abd4009..a4c9efee 100644 --- a/src/chart/inputhandlers/chart-resize.handler.ts +++ b/src/chart/inputhandlers/chart-resize.handler.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/inputhandlers/cross-event-producer.component.ts b/src/chart/inputhandlers/cross-event-producer.component.ts index d126740c..047367aa 100644 --- a/src/chart/inputhandlers/cross-event-producer.component.ts +++ b/src/chart/inputhandlers/cross-event-producer.component.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/inputhandlers/hover-producer.component.ts b/src/chart/inputhandlers/hover-producer.component.ts index 7ce5cbe3..badfc75e 100644 --- a/src/chart/inputhandlers/hover-producer.component.ts +++ b/src/chart/inputhandlers/hover-producer.component.ts @@ -1,10 +1,9 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ import { BehaviorSubject, merge } from 'rxjs'; -import { filter, switchMap } from 'rxjs/operators'; import { CHART_UUID, CanvasBoundsContainer, CanvasElement } from '../canvas/canvas-bounds-container'; import { FullChartConfig } from '../chart.config'; import { ChartModel } from '../components/chart/chart.model'; @@ -95,16 +94,11 @@ export class HoverProducerComponent extends ChartBaseElement { protected doActivate() { super.doActivate(); this.addRxSubscription( - // required for initial legend initialization, do not show cross tool - this.chartModel.candlesSetSubject - .pipe( - // check the scale is valid before doing candle-based hover event - switchMap(() => this.scale.initialViewportValidSubject.pipe(filter(Boolean))), - ) - .subscribe(() => { - const lastCandle = this.chartModel.getLastVisualCandle(); - lastCandle && this.createAndFireHoverFromCandle(lastCandle); - }), + this.chartModel.candlesSetSubject.subscribe(() => { + // required for initial legend initialization, do not show cross tool + const lastCandle = this.chartModel.getLastVisualCandle(); + lastCandle && this.createAndFireHoverFromCandle(lastCandle); + }), ); this.addRxSubscription( this.chartModel.candlesUpdatedSubject.subscribe(() => { diff --git a/src/chart/inputhandlers/main-canvas-touch.handler.ts b/src/chart/inputhandlers/main-canvas-touch.handler.ts index ed2d8d1b..300e40cd 100644 --- a/src/chart/inputhandlers/main-canvas-touch.handler.ts +++ b/src/chart/inputhandlers/main-canvas-touch.handler.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/inputlisteners/canvas-input-listener.component.ts b/src/chart/inputlisteners/canvas-input-listener.component.ts index b1d8fb85..2e971257 100644 --- a/src/chart/inputlisteners/canvas-input-listener.component.ts +++ b/src/chart/inputlisteners/canvas-input-listener.component.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/model/baseline.model.ts b/src/chart/model/baseline.model.ts index b15c2ad5..8958b66a 100644 --- a/src/chart/model/baseline.model.ts +++ b/src/chart/model/baseline.model.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/model/bounds.model.ts b/src/chart/model/bounds.model.ts index 3d2833dc..b164dd44 100644 --- a/src/chart/model/bounds.model.ts +++ b/src/chart/model/bounds.model.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/model/candle-hover.ts b/src/chart/model/candle-hover.ts index ca901520..d0d9b680 100644 --- a/src/chart/model/candle-hover.ts +++ b/src/chart/model/candle-hover.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/model/candle-series-high-low.provider.ts b/src/chart/model/candle-series-high-low.provider.ts index 115555ae..7b684bed 100644 --- a/src/chart/model/candle-series-high-low.provider.ts +++ b/src/chart/model/candle-series-high-low.provider.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/model/candle-series.model.ts b/src/chart/model/candle-series.model.ts index caca5387..7800687f 100644 --- a/src/chart/model/candle-series.model.ts +++ b/src/chart/model/candle-series.model.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/model/candle.model.ts b/src/chart/model/candle.model.ts index dfbd9158..3e4018d1 100755 --- a/src/chart/model/candle.model.ts +++ b/src/chart/model/candle.model.ts @@ -29,9 +29,6 @@ export interface Candle { readonly vwap?: number; } -export const defaultSortCandles = (candles: Candle[]): Candle[] => - candles.slice().sort((a, b) => (a.timestamp === b.timestamp ? 0 : a.timestamp > b.timestamp ? 1 : -1)); - export const generateCandleId = (timestamp: number, hashValue: number | string): string => { return `${timestamp}_${hashCode(hashValue.toString())}`; }; diff --git a/src/chart/model/canvas.model.ts b/src/chart/model/canvas.model.ts index 2ecfd5d2..8d769af6 100644 --- a/src/chart/model/canvas.model.ts +++ b/src/chart/model/canvas.model.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/model/chart-base-element.ts b/src/chart/model/chart-base-element.ts index 80e315c8..6993dd7b 100644 --- a/src/chart/model/chart-base-element.ts +++ b/src/chart/model/chart-base-element.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/model/compare-series-hover.ts b/src/chart/model/compare-series-hover.ts index 7b702403..e8042bf3 100644 --- a/src/chart/model/compare-series-hover.ts +++ b/src/chart/model/compare-series-hover.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/model/data-series-view.ts b/src/chart/model/data-series-view.ts index fa81ea09..c7ac54dd 100644 --- a/src/chart/model/data-series-view.ts +++ b/src/chart/model/data-series-view.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/model/data-series.config.ts b/src/chart/model/data-series.config.ts index 9bad3897..f8a91518 100644 --- a/src/chart/model/data-series.config.ts +++ b/src/chart/model/data-series.config.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/model/data-series.model.ts b/src/chart/model/data-series.model.ts index c18341a4..558d0734 100644 --- a/src/chart/model/data-series.model.ts +++ b/src/chart/model/data-series.model.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -20,7 +20,7 @@ import { } from './data-series.config'; import { HighLowWithIndex, ScaleModel } from './scale.model'; import { HighLowProvider } from './scaling/auto-scale.model'; -import { Index, Pixel, Unit, Viewable } from './scaling/viewport.model'; +import { Index, Unit, Viewable } from './scaling/viewport.model'; /** * Properties are named in order to match VisualCandle interface @@ -30,14 +30,14 @@ export class VisualSeriesPoint { /** * returns y coordinate in pixels */ - y(viewable: Viewable): Pixel { + y(viewable: Viewable): Unit { return floorToDPR(viewable.toY(this.close)); } /** * returns x coordinate in pixels */ - x(viewable: Viewable): Pixel { - return viewable.toX(this.centerUnit); + x(viewable: Viewable): Unit { + return floorToDPR(viewable.toX(this.centerUnit)); } clone(): VisualSeriesPoint { diff --git a/src/chart/model/date-time.formatter.ts b/src/chart/model/date-time.formatter.ts index ae9bc115..b5bf813f 100644 --- a/src/chart/model/date-time.formatter.ts +++ b/src/chart/model/date-time.formatter.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -222,4 +222,4 @@ export const formatDate = (date: Date, patternStr: string, daysOfWeek: string[], return patternStr; }; const twoDigitPad = (num: string | number) => (typeof num === 'number' && num < 10 ? '0' + num : num); -//#endregion +//#endregion \ No newline at end of file diff --git a/src/chart/model/hit-test-canvas.model.ts b/src/chart/model/hit-test-canvas.model.ts index add08846..9d1d9067 100644 --- a/src/chart/model/hit-test-canvas.model.ts +++ b/src/chart/model/hit-test-canvas.model.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/model/main-candle-series.model.ts b/src/chart/model/main-candle-series.model.ts index bd70ee13..89839b25 100644 --- a/src/chart/model/main-candle-series.model.ts +++ b/src/chart/model/main-candle-series.model.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/model/scale.model.ts b/src/chart/model/scale.model.ts index 8309bb5b..7c772628 100644 --- a/src/chart/model/scale.model.ts +++ b/src/chart/model/scale.model.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -181,7 +181,7 @@ export class ScaleModel extends ViewportModel { } private zoomXTo(state: ViewportModelState, zoomIn: boolean, forceNoAnimation?: boolean) { - const initialStateCopy = this.export(); + const initialStateCopy = { ...state }; const constrainedState = this.scalePostProcessor(initialStateCopy, state); this.zoomReached = this.calculateZoomReached(constrainedState.zoomX, zoomIn); diff --git a/src/chart/model/scaling/auto-scale.model.ts b/src/chart/model/scaling/auto-scale.model.ts index 4c400695..363616eb 100644 --- a/src/chart/model/scaling/auto-scale.model.ts +++ b/src/chart/model/scaling/auto-scale.model.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/model/scaling/constrait.functions.ts b/src/chart/model/scaling/constrait.functions.ts index f1e405a4..f77d98b5 100644 --- a/src/chart/model/scaling/constrait.functions.ts +++ b/src/chart/model/scaling/constrait.functions.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -46,4 +46,4 @@ export const candleEdgesConstrait = ( newState.xStart = normalizedXStart; newState.xEnd = normalizedXEnd; return newState; -}; +}; \ No newline at end of file diff --git a/src/chart/model/scaling/lock-ratio.model.ts b/src/chart/model/scaling/lock-ratio.model.ts index 198d37fc..5289b095 100644 --- a/src/chart/model/scaling/lock-ratio.model.ts +++ b/src/chart/model/scaling/lock-ratio.model.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/model/scaling/move-chart.functions.ts b/src/chart/model/scaling/move-chart.functions.ts index a23522d5..60a38302 100644 --- a/src/chart/model/scaling/move-chart.functions.ts +++ b/src/chart/model/scaling/move-chart.functions.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/model/scaling/viewport.model.ts b/src/chart/model/scaling/viewport.model.ts index f396a4f9..54f0884e 100644 --- a/src/chart/model/scaling/viewport.model.ts +++ b/src/chart/model/scaling/viewport.model.ts @@ -1,9 +1,9 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -import { BehaviorSubject, Subject } from 'rxjs'; +import { Subject } from 'rxjs'; import { distinctUntilChanged, map, share } from 'rxjs/operators'; import { ChartBaseElement } from '../chart-base-element'; import { ViewportMovementAnimation } from '../../animation/types/viewport-movement-animation'; @@ -151,18 +151,10 @@ export abstract class ViewportModel extends ChartBaseElement implements Viewable distinctUntilChanged((p, c) => p.start === c.start && p.end === c.end), share(), ); - public initialViewportValidSubject = new BehaviorSubject(false); //endregion protected doActivate(): void { super.doActivate(); - - this.addRxSubscription( - this.changed.subscribe(() => { - !this.initialViewportValidSubject.getValue() && - this.initialViewportValidSubject.next(this.isViewportValid()); - }), - ); } protected doDeactivate(): void { diff --git a/src/chart/model/scaling/x-zooming.functions.ts b/src/chart/model/scaling/x-zooming.functions.ts index 6b3d9485..52efd193 100644 --- a/src/chart/model/scaling/x-zooming.functions.ts +++ b/src/chart/model/scaling/x-zooming.functions.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/model/time-zone.model.ts b/src/chart/model/time-zone.model.ts index 86774557..cf33fef2 100644 --- a/src/chart/model/time-zone.model.ts +++ b/src/chart/model/time-zone.model.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -106,9 +106,11 @@ export class TimeZoneModel { // so we have to subtract localOffset from current time return time => { return new Date( - time + getTimezoneOffset(timezone, time) + new Date(time).getTimezoneOffset() * timeMultiplier, + time + + getTimezoneOffset(timezone, time) + + new Date(time).getTimezoneOffset() * timeMultiplier, ); }; } } -} +} \ No newline at end of file diff --git a/src/chart/model/visual-candle.ts b/src/chart/model/visual-candle.ts index 576b9d3b..a2772bab 100644 --- a/src/chart/model/visual-candle.ts +++ b/src/chart/model/visual-candle.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/__tests__/array.utils.test.ts b/src/chart/utils/__tests__/array.utils.test.ts index a930684a..7eff0ff4 100644 --- a/src/chart/utils/__tests__/array.utils.test.ts +++ b/src/chart/utils/__tests__/array.utils.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/__tests__/math.utils.test.ts b/src/chart/utils/__tests__/math.utils.test.ts index b0961798..edd24dd9 100644 --- a/src/chart/utils/__tests__/math.utils.test.ts +++ b/src/chart/utils/__tests__/math.utils.test.ts @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited - * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. - * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. - */ import { clamp } from '../math.utils'; describe('math.utils', () => { diff --git a/src/chart/utils/__tests__/object.utils.test.ts b/src/chart/utils/__tests__/object.utils.test.ts index b7dd25c2..8d99d227 100644 --- a/src/chart/utils/__tests__/object.utils.test.ts +++ b/src/chart/utils/__tests__/object.utils.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/__tests__/priceIncrementsUtils.test.ts b/src/chart/utils/__tests__/priceIncrementsUtils.test.ts index 1a45728d..16379642 100644 --- a/src/chart/utils/__tests__/priceIncrementsUtils.test.ts +++ b/src/chart/utils/__tests__/priceIncrementsUtils.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/array.utils.ts b/src/chart/utils/array.utils.ts index 0d1dfa60..1554aa89 100644 --- a/src/chart/utils/array.utils.ts +++ b/src/chart/utils/array.utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/auto-period-detector.utils.ts b/src/chart/utils/auto-period-detector.utils.ts index ec5ae962..34c04e74 100644 --- a/src/chart/utils/auto-period-detector.utils.ts +++ b/src/chart/utils/auto-period-detector.utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/candles-generator-ts.utils.ts b/src/chart/utils/candles-generator-ts.utils.ts index 2d675a30..3a5117c8 100644 --- a/src/chart/utils/candles-generator-ts.utils.ts +++ b/src/chart/utils/candles-generator-ts.utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/candles.utils.ts b/src/chart/utils/candles.utils.ts index 6ee98d12..4b968b3e 100644 --- a/src/chart/utils/candles.utils.ts +++ b/src/chart/utils/candles.utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/canvas/canvas-drawing-functions.utils.ts b/src/chart/utils/canvas/canvas-drawing-functions.utils.ts index 81d7fa85..0f95f5b2 100644 --- a/src/chart/utils/canvas/canvas-drawing-functions.utils.ts +++ b/src/chart/utils/canvas/canvas-drawing-functions.utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/canvas/canvas-font-measure-tool.utils.ts b/src/chart/utils/canvas/canvas-font-measure-tool.utils.ts index ec01fdcd..7a998c07 100644 --- a/src/chart/utils/canvas/canvas-font-measure-tool.utils.ts +++ b/src/chart/utils/canvas/canvas-font-measure-tool.utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/canvas/canvas-text-functions.utils.ts b/src/chart/utils/canvas/canvas-text-functions.utils.ts index 4c048afe..1085d460 100644 --- a/src/chart/utils/canvas/canvas-text-functions.utils.ts +++ b/src/chart/utils/canvas/canvas-text-functions.utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/color.utils.ts b/src/chart/utils/color.utils.ts index 4d70b75b..ed9a6348 100644 --- a/src/chart/utils/color.utils.ts +++ b/src/chart/utils/color.utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/device/browser.utils.ts b/src/chart/utils/device/browser.utils.ts index 290efa67..88d4cca1 100644 --- a/src/chart/utils/device/browser.utils.ts +++ b/src/chart/utils/device/browser.utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/device/device-detector.utils.ts b/src/chart/utils/device/device-detector.utils.ts index 8578b523..7d0ebe1e 100644 --- a/src/chart/utils/device/device-detector.utils.ts +++ b/src/chart/utils/device/device-detector.utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/device/device-pixel-ratio.utils.ts b/src/chart/utils/device/device-pixel-ratio.utils.ts index bb2050ef..a763226c 100644 --- a/src/chart/utils/device/device-pixel-ratio.utils.ts +++ b/src/chart/utils/device/device-pixel-ratio.utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/device/touchpad.utils.ts b/src/chart/utils/device/touchpad.utils.ts index 4399c0a3..17ca1ac5 100644 --- a/src/chart/utils/device/touchpad.utils.ts +++ b/src/chart/utils/device/touchpad.utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/dom.utils.ts b/src/chart/utils/dom.utils.ts index 1f00fdc7..b9553bc6 100644 --- a/src/chart/utils/dom.utils.ts +++ b/src/chart/utils/dom.utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/function.utils.ts b/src/chart/utils/function.utils.ts index 473d4fe7..55eed1e8 100644 --- a/src/chart/utils/function.utils.ts +++ b/src/chart/utils/function.utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/linkedList.utils.ts b/src/chart/utils/linkedList.utils.ts index 0e15b7e1..672eb246 100644 --- a/src/chart/utils/linkedList.utils.ts +++ b/src/chart/utils/linkedList.utils.ts @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited - * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. - * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. - */ export class ListNode { public data: T; public next: ListNode | null; diff --git a/src/chart/utils/math.utils.ts b/src/chart/utils/math.utils.ts index 1bafde7d..8d2da5aa 100644 --- a/src/chart/utils/math.utils.ts +++ b/src/chart/utils/math.utils.ts @@ -1,7 +1,7 @@ import { StringTMap } from './object.utils'; /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/merge.utils.ts b/src/chart/utils/merge.utils.ts index db52c86e..bbf90e83 100644 --- a/src/chart/utils/merge.utils.ts +++ b/src/chart/utils/merge.utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/object.utils.ts b/src/chart/utils/object.utils.ts index cba6e8eb..1fbac63f 100644 --- a/src/chart/utils/object.utils.ts +++ b/src/chart/utils/object.utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/performance/animation-frame-cache.utils.ts b/src/chart/utils/performance/animation-frame-cache.utils.ts index f48a2b3c..4c0b2ef1 100644 --- a/src/chart/utils/performance/animation-frame-cache.utils.ts +++ b/src/chart/utils/performance/animation-frame-cache.utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/performance/debounce.utils.ts b/src/chart/utils/performance/debounce.utils.ts index 7132ba81..6f589496 100644 --- a/src/chart/utils/performance/debounce.utils.ts +++ b/src/chart/utils/performance/debounce.utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/performance/memoize.utils.ts b/src/chart/utils/performance/memoize.utils.ts index 0deee725..c8c04cc2 100644 --- a/src/chart/utils/performance/memoize.utils.ts +++ b/src/chart/utils/performance/memoize.utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/performance/request-animation-frame-throttle.utils.ts b/src/chart/utils/performance/request-animation-frame-throttle.utils.ts index 1a727fbc..26981c6f 100644 --- a/src/chart/utils/performance/request-animation-frame-throttle.utils.ts +++ b/src/chart/utils/performance/request-animation-frame-throttle.utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/performance/throttle.utils.ts b/src/chart/utils/performance/throttle.utils.ts index 5ceb62fc..cbd499a8 100644 --- a/src/chart/utils/performance/throttle.utils.ts +++ b/src/chart/utils/performance/throttle.utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/chart/utils/price-increments.utils.ts b/src/chart/utils/price-increments.utils.ts index f6ea2637..850fa748 100644 --- a/src/chart/utils/price-increments.utils.ts +++ b/src/chart/utils/price-increments.utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -140,8 +140,9 @@ export class PriceIncrementsUtils { } } + // TODO review dxFeed precision format export const precisionsToIncrement = (price: number, precisions: number[]) => { const precision = lastOf(precisions) ?? 1; return Math.pow(10, -precision); -}; +} \ No newline at end of file diff --git a/src/chart/utils/timezone.utils.ts b/src/chart/utils/timezone.utils.ts index 74921899..61c4df3b 100644 --- a/src/chart/utils/timezone.utils.ts +++ b/src/chart/utils/timezone.utils.ts @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited - * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. - * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. - */ /** * Get a cached Intl.DateTimeFormat instance for the IANA `timeZone`. This can be used * to get deterministic local date/time output according to the `en-US` locale which diff --git a/src/chart/utils/uuid.utils.ts b/src/chart/utils/uuid.utils.ts index 5a8aad8e..e10a7973 100644 --- a/src/chart/utils/uuid.utils.ts +++ b/src/chart/utils/uuid.utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/index.dev.ts b/src/index.dev.ts index 13792214..acfaf04c 100644 --- a/src/index.dev.ts +++ b/src/index.dev.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/src/index.ts b/src/index.ts index 7790ff5c..449ca954 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */