Skip to main content

Migration guide

5.20.4 and higher​

Chart core package renamed to @dx-private/dxchart5-core​

What changed

The chart core engine is now shipped as @dx-private/dxchart5-core instead of the public @devexperts/dxcharts-lite package. The chart API did not change in this release — only the package name is different. @dx-private/dxchart5-core is installed automatically as a dependency of @dx-private/dxchart5-react, from the same registry you already use for the other @dx-private packages.

Who is affected

Any integration that imports from @devexperts/dxcharts-lite in its own code (including deep imports from @devexperts/dxcharts-lite/dist/...), or lists @devexperts/dxcharts-lite in its package.json.

How to migrate

  1. Remove @devexperts/dxcharts-lite from your package.json, including any overrides or resolutions entries for it.
  2. Replace @devexperts/dxcharts-lite with @dx-private/dxchart5-core everywhere in your code, including deep imports:
// Before
import { createChart } from '@devexperts/dxcharts-lite';
import { uuid } from '@devexperts/dxcharts-lite/dist/chart/utils/uuid.utils';
// After
import { createChart } from '@dx-private/dxchart5-core';
import { uuid } from '@dx-private/dxchart5-core/dist/chart/utils/uuid.utils';
  1. Check your configuration files as well: bundler aliases, Jest transformIgnorePatterns, Babel includes, ESLint rules.

Note

If you keep @devexperts/dxcharts-lite installed, your old imports will still resolve — but to a separate copy of the core that the chart does not use. This can lead to type errors, failed instanceof checks and a larger bundle, so remove the package rather than leaving it next to the new one.

ZIP file installation

The ZIP file now also contains a dxchart5-core folder. Install it the same way as the other packages:

npm install ../dxchart.lib/dxchart5-core
# or yarn
yarn add ../dxchart.lib/dxchart5-core

5.20.2​

Candle alignment is no longer changed by the countdown​

What changed

Turning on "Countdown to bar close" no longer changes the candle alignment. This fixes the broken viewport when the countdown was turned on for a forex instrument (see 5.20.0).

  • autoApplySessionStartOnCountdown is deprecated and has no effect.
  • A new autoApplyCandleAlignment option in chartReactConfig (disabled by default) sets the alignment from the instrument type every time the instrument changes: 'session_start' for stocks, 'midnight' for forex and crypto.

The default candlesData.candleAlignment value is still 'session_start'. This release does not change it back to 'midnight'.

Who is affected

  • Integrations that set autoApplySessionStartOnCountdown: the option is ignored now.
  • Integrations that want the alignment to follow the instrument type.
  • Integrations that want the pre-5.20.0 'midnight' alignment: follow the 5.20.0 migration steps.

How to migrate

Remove autoApplySessionStartOnCountdown from your chartReactConfig. To switch the alignment automatically when the instrument changes, turn on autoApplyCandleAlignment:

const dependencies = {
// ...
chartReactConfig: {
// Before (5.20.0 – 5.20.1)
// autoApplySessionStartOnCountdown: true,
// After
autoApplyCandleAlignment: true,
},
};

With autoApplyCandleAlignment turned on, the instrument type overrides the alignment the user selected whenever the instrument changes. Instruments of other types keep the current alignment. Leave the option off if you control the alignment yourself through initialChartReactSettings or the setCandlesAlignment API.

5.20.0​

OrderLineStyled component changed​

What changed

The OrderLineStyled component moved from dist/chart/components/trading/order/components/side.styled to dist/chart/components/trading/order-wicks/order-lines-layer.styled. The component itself and its props did not change.

Who is affected

Any integration that imports OrderLineStyled from @dx-private/dxchart5-react/dist/chart/components/trading/order/components/side.styled.

How to migrate

Update the import path:

// Before
import { OrderLineStyled } from '@dx-private/dxchart5-react/dist/chart/components/trading/order/components/side.styled';
// After
import { OrderLineStyled } from '@dx-private/dxchart5-react/dist/chart/components/trading/order-wicks/order-lines-layer.styled';

setTradingItemsDragPriceStep applies to all instruments​

What changed

setTradingItemsDragPriceStep and setTradingItemsDragPriceSteps now accept price brackets: an array of { maxPrice, step } objects, where each step applies to prices below its maxPrice. This lets you define any number of price ranges instead of the fixed below 1 / 1 to 10 / 10 and above ranges. The old { belowOne, oneToTen, aboveTen } object is deprecated but still supported, with the same price ranges as before.

setTradingItemsDragPriceStep also changed behavior. It still sets the step for the current instrument, but it now also stores the step as a fallback for every instrument that has no step of its own. Before 5.20.0, orders and positions of such instruments were dragged without snapping. Now they snap with the last step you passed.

Who is affected

Any integration that calls setTradingItemsDragPriceStep, especially if it calls it only for some instruments (for example, only for futures).

How to migrate

Use setTradingItemsDragPriceSteps instead, with a map of instrument symbols to their steps. Instruments that are not in the map are dragged without snapping, as long as setTradingItemsDragPriceStep is not called. Each call replaces the whole map, so pass all instruments at once:

// Before: sets the step for the current instrument and for all instruments without their own step
api.setTradingItemsDragPriceStep([
{ maxPrice: 3, step: 0.01 },
{ maxPrice: Infinity, step: 0.05 },
]);

// After: sets the steps only for the listed instruments
api.setTradingItemsDragPriceSteps({
AAPL: [
{ maxPrice: 3, step: 0.01 },
{ maxPrice: Infinity, step: 0.05 },
],
'/ES': [{ maxPrice: Infinity, step: 0.25 }],
});

The deprecated object still works in the map:

api.setTradingItemsDragPriceSteps({
AAPL: { belowOne: 0.0001, oneToTen: 0.01, aboveTen: 0.01 },
});

Both functions accept an optional chartId as the second argument. Without it, the steps are applied to all charts.

Candle alignment changed to session start by default​

What changed

The default value of the "Align data with session start" setting (candlesData.candleAlignment in ChartReactSettings) changed from 'midnight' to 'session_start'. The chart passes this value to your ChartDataProvider in options.candleAlignment, so for aggregation periods of 1 hour and higher your provider is asked for candles that start at the session open (for example 09:30) instead of at midnight / on the hour. The new default applies to every instrument type, including forex and crypto.

This release also added the autoApplySessionStartOnCountdown option to chartReactConfig (enabled by default). With this option, turning on "Countdown to bar close" changed the candle alignment depending on the instrument type: 'session_start' for stocks, 'midnight' for forex and crypto. Turning on the countdown for a forex instrument could break the data displayed in the viewport. This was fixed in 5.20.2.

Who is affected

  • Any integration that does not set candlesData.candleAlignment explicitly.
  • Existing end users as well as new ones: saved layouts only store settings that differ from the defaults, so users who were on the old 'midnight' default get 'session_start' after the upgrade.
  • Any ChartDataProvider that uses options.candleAlignment when requesting candles.

How to migrate

We recommend upgrading to 5.20.2 or higher, which fixes the countdown issue. To keep the previous alignment, set it explicitly in initialChartReactSettings. Saved layouts are compared against these settings, so this also restores 'midnight' for existing users who never changed the setting:

const dependencies = {
// ...
initialChartReactSettings: {
candlesData: {
candleAlignment: 'midnight',
},
},
};

If you stay on 5.20.0 or 5.20.1, also turn off the countdown-driven switching:

const dependencies = {
// ...
chartReactConfig: {
autoApplySessionStartOnCountdown: false,
},
};

5.19.1 and higher​

Logo now displayed by default

What changed

Previously, the chart logo was opt-in: no logo was rendered unless you supplied a Logo component through uiOverrides. Starting from this release, the built-in DXcharts logo is rendered by default (bottom-left, theme-aware, with a "Learning hub" hover link). The Logo override is now used to replace or remove the default rather than to add one.

Who is affected

Any integration that does not pass a Logo override. After upgrading, the DXcharts logo will start appearing on the chart where previously there was none. Integrations that already pass their own Logo component are unaffected — their logo continues to replace the default as before.

How to migrate

  • You want to keep the new default DXcharts logo: no action needed.
  • You want your own logo (existing behavior): no change — keep passing your component:
<ChartReactApp uiOverrides={{ Logo: MyLogo }} />
  • You want no logo (previous default when nothing was passed): you must now opt out explicitly with a render-nothing component. Passing null/undefined is not enough — it falls back to the default:
<ChartReactApp uiOverrides={{ Logo: () => null }} />

Note

The internal default logo component is no longer exported from the package. Customize the logo only through the Logo UI override (replace or () => null), not by importing the component directly.

5.18.0 and higher​

Drawings: Support for themes on drawingsConfig property on ChartReactAppConfig​

The drawingsConfig on ChartReactAppConfig now supports per-theme drawing styles.

If you do use a custom config, migrate it to the new ThemedDrawingsConfig structure so each theme gets the right colors and settings. You can still pass a single DrawingConfig directly (the old way); that continues to work but is deprecated and will be removed in a future version. Otherwise, the new themed colors apply automatically, no changes required.

The new config has type ThemedDrawingsConfig:

type ThemedDrawingsConfig = Record<ThemeType, DrawingConfig>;
drawingsConfig: {
dark: DARK_THEME_CONFIG; // colors and settings for dark theme
light: LIGHT_THEME_CONFIG; // same for light theme
cloudDancer: CLOUD_DANCER_THEME_CONFIG; // same for cloudDancer theme
}

Token migration​

For version 5.18.0 and higher, the tokens have been changed. The table below shows the mapping of old tokens to new tokens.

Old tokenNew token
drawing-handle-default-bgdrawing-handle-default
drawing-handle-hover-bgdrawing-handle-hover
drawing-handle-borderdrawing-line
drawing-highlight-bgdrawing-label-x-range-bg
drawing-handle-negative-bgdrawing-highlighter-stroke
drawing-text-bgdrawing-label-text
drawing-tag-bgdrawing-label-x-text
drawing-default-linedrawing-line

5.17.0 and higher​

ChartDataProvider: New fullData option for studies​

A new optional fullData field has been added to FullChartDataOptions interface in the ChartDataProvider. This field is used to request full candle data for study calculations.

interface FullChartDataOptions extends ChartDataOptions {
fromTime?: number;
toTime?: number;
fullData?: boolean; // New field
}

When to use:

  • fullData: true - Return all available candles (required for studies precalculation by the library)
  • fullData: false or undefined - Return data based on the request parameters (fromTime/toTime) for initial load or lazy loading (default behavior)

Important notes:

  • This flag is only relevant if your provider implements lazy loading
  • Studies require all historical data to calculate correctly, so when fullData: true, your provider should return complete historical data
  • If your provider doesn't implement lazy loading and always returns all data, you can ignore this flag
  • Action required: If you have an existing ChartDataProvider implementation with lazy loading, you should update your requestHistoryData method to handle the fullData flag to ensure studies work correctly

Example implementation:

async requestHistoryData(
symbol: string,
aggregation: AggregationPeriod,
options?: FullChartDataOptions,
) {
if (options?.fullData) {
// Return ALL available candles for study calculations
return await fetchAllCandles(symbol, aggregation);
} else {
// Return candles based on your provider's logic:
// - For initial load: use fromTime to return data from that point forward
// - For lazy load: use toTime to return older historical data
// - Or return all data if you don't implement lazy loading
return await fetchCandlesForRange(symbol, aggregation, options);
}
}

OrderProvider and PositionProvider interface changes​

Starting from version 5.17.0, the OrderProvider and PositionProvider interfaces have been updated. The observeOrders, observeExecutedOrders, and observePositions methods now return an unsubscribe callback function instead of void.

Before:

OrderProvider interface:

interface OrderProvider {
observeOrders(symbol: string, dataCallback: (orders: OrderWithId[]) => void): void;
observeExecutedOrders(symbol: string, dataCallback: (orders: ExecutedOrder[]) => void): void;
// ...
}

PositionProvider interface:

interface PositionProvider {
observePositions(symbol: string, dataCallback: (positions: Position[]) => void): void;
// ...
}

After:

OrderProvider interface:

interface OrderProvider {
observeOrders(symbol: string, dataCallback: (orders: OrderWithId[]) => void): () => void;
observeExecutedOrders(symbol: string, dataCallback: (orders: ExecutedOrder[]) => void): () => void;
// ...
}

PositionProvider interface:

interface PositionProvider {
observePositions(symbol: string, dataCallback: (positions: Position[]) => void): () => void;
// ...
}

Implementation examples​

observeOrders:

observeOrders(symbol: string, callback: (data: OrderWithId[]) => void): () => void {
if (!currentOrdersBySymbol[symbol]) {
currentOrdersBySymbol[symbol] = new ReplaySubject<Array<OrderWithId>>();
}
const subscription = currentOrdersBySymbol[symbol].subscribe(callback);
return () => {
subscription.unsubscribe();
};
}

observeExecutedOrders:

observeExecutedOrders(symbol: string, callback: (data: ExecutedOrder[]) => void): () => void {
if (!currentExecutedOrdersBySymbol[symbol]) {
currentExecutedOrdersBySymbol[symbol] = new ReplaySubject<Array<ExecutedOrder>>();
}
const subscription = currentExecutedOrdersBySymbol[symbol].subscribe(callback);
return () => {
subscription.unsubscribe();
};
}

observePositions:

observePositions(symbol: string, callback: (data: Position[]) => void): () => void {
if (!currentPositionsBySymbol[symbol]) {
currentPositionsBySymbol[symbol] = new ReplaySubject<Array<Position>>(1);
}
const subscription = currentPositionsBySymbol[symbol].subscribe(callback);
return () => {
subscription.unsubscribe();
};
}

5.16.0 and higher​

DrawingsClearConfirmationPopup removal​

The drawings-clear-confirmation-popup.component.tsx and its related styled components have been removed. This component was previously used to show a confirmation dialog before clearing all drawings from the chart.

The Drawings Sidebar provides the same functionality for deleting all drawings through its footer buttons. The sidebar is enabled by default in the chart configuration.

The sidebar footer contains a DELETE_DRAWINGS button that directly calls drawingVM.clearDrawings() without a confirmation popup. In addition to the sidebar, users can also clear drawings from the background menu with the "Clear drawings" button.

If you were using the confirmation popup directly:

  1. Remove any imports of drawings-clear-confirmation-popup.component.tsx and related styled components
  2. Ensure the sidebar is enabled in your config (it's enabled by default):
chartReactConfig: {
drawings: {
sidebar: {
enabled: true;
}
}
}

If you need custom confirmation logic, please use the UI Override system to customize the sidebar footer behavior.

Tokens migration​

For version 5.16.0 and higher, the tokens have been changed. The table below shows the mapping of old tokens to new tokens.

Old tokenNew token
icon-active-bgicon-active
icon-active-disabled-default-bgicon-inactive
icon-primary-default-bgicon-primary
icon-secondary-default-bgicon-secondary
icon-disabled-default-bgicon-disabled
input-focused-borderinput-focus-border
input-hovered-borderinput-hover-border
main_chart-bgchart-bg
main_chart-candle-bear-body-active-bgchart-bear-active
main_chart-candle-bear-body-bgchart-bear-default
main_chart-candle-bull-body-active-bgchart-bull-active
main_chart-candle-bull-body-bgchart-bull-default
main_chart-candle-doji-body-active-bgchart-doji-active
main_chart-candle-doji-body-bgchart-doji-default
main_chart-areachart-area
main_chart-border-activechart-border
main_chart-crosshair-label-bgchart-crosshair
main_chart-crosshair-tag-textchart-crosshair-value
main_chart-divider-default-bgchart-divider
main_chart-grid-dot/linechart-grid
main_chart-high-low-indicatorchart-highlow
main_chart-label-inverted-textchart-label-text-inverted
main_chart-label-textchart-label-text
main_chart-loading-textchart-loading-text
main_chart-post_market_data-bgchart-post-market-bg
main_chart-post_market_data-labelchart-post-market-label
main_chart-post_market_data-linechart-post-market-line
main_chart-pre_market_data-bgchart-pre-market-bg
main_chart-pre_market_data-labelchart-pre-market-label
main_chart-pre_market_data-linechart-pre-market-line
main_chart-progress_bar_bgchart-progress-bar
main_chart-resize_bar-default-bgchart-resize-bar
main_chart-resize_bar-hover-bgchart-resize-bar-hover
main_chart-session_break-bgchart-session-break
main_chart-value-textchart-value
main_chart-value-text-borderchart-value-border
main_chart-watermark-textchart-watermark
main_chart-zero_percent-line-bgchart-zero-line
main_chart-scatter-default-bgchart-scatter
button-sell-hovered-bgbutton-sell-hover-bg
button-focus-borderfocus-border
button-buy-hovered-bgbutton-buy-hover-bg
button-primary-defaultbutton-primary-default-bg
button-primary-hoverbutton-primary-hover-bg
button-primary-pressedbutton-primary-active-bg
button-secondary-defaultbutton-secondary-default-bg
button-secondary-hoverbutton-secondary-hover-bg
button-secondary-pressedbutton-secondary-active-bg
drawing-handle_border-bgdrawing-handle-border
drawing-highlight-default-bgdrawing-highlight-bg
drawing-icon_border-bgdrawing-icon-border
drawing-line-default-bgdrawing-default-line
drawing-line-negative-bgdrawing-negative-line
drawing-line-positive-bgdrawing-positive-line
drawing-tag-default-bgdrawing-tag-bg
drawing-text-defaultdrawing-text
mini_toolbar-default-bgfloating-toolbar-bg
position-icon-default-bgposition-close-icon
position_negative-default-bgposition-negative-bg
position_negative-divider-bgposition-negative-divider
position_negative-wick-bgposition-negative-wick
position_positive-default-bgposition-positive-bg
position_positive-divider-bgposition-positive-divider
position_positive-wick-bgposition-positive-wick
dragging_slider-border-default-bgorder-resizer-default-border
dragging_slider-border-hovered-bgorder-resizer-hover-border
dragging_slider-hovered-bgorder-resizer-hover-bg
dragging_slider-default-bgorder-resizer-default-bg
order-border-default-bgorder-default-border
order-border-hover-bgorder-hover-border
order-button-default-bgorder-protection-button-default-bg
order-button-hover-bgorder-protection-button-hover-bg
order-close_button-default-bgorder-close-button-default-bg
order-close_button-hover-bgorder-close-button-hover-bg
order-default-bgorder-default-bg
order-divider-default-bgorder-default-divider
order-divider-selected-bgorder-selected-divider
order-wick-default-bgorder-wick-default
order-wick-hover-bgorder-wick-hover
order_entry-border-bgorder-entry-border
link-hovered-textlink-hover-text
dropdown-default-bgmenu-bg
dropdown-description-textmenu-secondary-text
dropdown-list_item-default-textmenu-primary-text
dropdown-list_item-disabled-textmenu-disabled-text
dropdown-list_item-divider-bgmenu-divider
dropdown-list_item-hovered-bgmenu-item-hover-bg
dropdown-list_item-selected-textmenu-active-text
dropdown_secondary-bgmenu-secondary-bg
dropdown_secondary-list_item_hovered-bgmenu-secondary-item-hover-bg
toolbar-button-default-colortoolbar-button-default-bg
toolbar-button-default-hover-bgtoolbar-button-hover-bg
databox-text-defaultdatabox-primary-default-text
databox-text-disableddatabox-disabled-text
indicator-01indicator-main
indicator-02indicator-secondary
indicator-03indicator-tertiary
indicator-04indicator-half-up
indicator-05indicator-half-down
indicator-06indicator-up
indicator-07indicator-down

5.15.0 and higher​

React 19 migration​

React 17 is no longer supported. dxchart5-react supports React 18.2.0 and higher (recommended version is 19.x.x).