Skip to content

Commit 4b3bae5

Browse files
Keelaro1dxcity
authored and
dxcity
committed
Pull request #5517: Bugfix/DXCF-5684 indicators studies td sequential perfectsetupbuy sell color applied to wrong
Merge in DXCHARTS/dxchart5 from bugfix/DXCF-5684-indicators-studies-td-sequential-perfectsetupbuy-sell-color-applied-to-wrong to master * commit '4df9f92608fcf381b2e8ac94e78a6be1d806d1a6': [DXCF-5684] Indicators (Studies) - [TD Sequential] - PerfectSetupBuy/Sell color applied to wrong candles // init [DXCF-5684] Indicators (Studies) - [TD Sequential] - PerfectSetupBuy/Sell color applied to wrong candles // init GitOrigin-RevId: ff98a29af38a945f283381a486e50a5a2c4c1473
1 parent 208cfa7 commit 4b3bae5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/chart/drawers/data-series-drawers/color-candle.drawer.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/*
2-
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
2+
* Copyright (C) 2019 - 2025 Devexperts Solutions IE Limited
33
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
44
* If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
55
*/
66
import { ChartModel } from '../../components/chart/chart.model';
77
import { DataSeriesModel, VisualSeriesPoint } from '../../model/data-series.model';
88
import { unitToPixels } from '../../model/scaling/viewport.model';
99
import { floorToDPR } from '../../utils/device/device-pixel-ratio.utils';
10-
import { round } from '../../utils/math.utils';
10+
import { floor } from '../../utils/math.utils';
1111
import { ChartDrawerConfig, SeriesDrawer } from '../data-series.drawer';
1212

1313
/**
@@ -27,7 +27,7 @@ export class ColorCandleDrawer implements SeriesDrawer {
2727
const config = model.getPaintConfig(idx);
2828
ctx.fillStyle = drawerConfig.singleColor ?? config.color;
2929
points.forEach(p => {
30-
const visualCandle = this.chartModel.getVisualCandle(round(p.centerUnit));
30+
const visualCandle = this.chartModel.getVisualCandle(floor(p.centerUnit));
3131
const value = p.close;
3232
if (visualCandle && value === 1) {
3333
const zoomX = this.chartModel.scale.zoomX;

0 commit comments

Comments
 (0)