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
- Remove
@devexperts/dxcharts-litefrom yourpackage.json, including anyoverridesorresolutionsentries for it. - Replace
@devexperts/dxcharts-litewith@dx-private/dxchart5-coreeverywhere 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';
- 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).
autoApplySessionStartOnCountdownis deprecated and has no effect.- A new
autoApplyCandleAlignmentoption inchartReactConfig(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.candleAlignmentexplicitly. - 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
ChartDataProviderthat usesoptions.candleAlignmentwhen 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
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/undefinedis 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 token | New token |
|---|---|
| drawing-handle-default-bg | drawing-handle-default |
| drawing-handle-hover-bg | drawing-handle-hover |
| drawing-handle-border | drawing-line |
| drawing-highlight-bg | drawing-label-x-range-bg |
| drawing-handle-negative-bg | drawing-highlighter-stroke |
| drawing-text-bg | drawing-label-text |
| drawing-tag-bg | drawing-label-x-text |
| drawing-default-line | drawing-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: falseorundefined- 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
ChartDataProviderimplementation with lazy loading, you should update yourrequestHistoryDatamethod to handle thefullDataflag 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:
- Remove any imports of
drawings-clear-confirmation-popup.component.tsxand related styled components - 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 token | New token |
|---|---|
| icon-active-bg | icon-active |
| icon-active-disabled-default-bg | icon-inactive |
| icon-primary-default-bg | icon-primary |
| icon-secondary-default-bg | icon-secondary |
| icon-disabled-default-bg | icon-disabled |
| input-focused-border | input-focus-border |
| input-hovered-border | input-hover-border |
| main_chart-bg | chart-bg |
| main_chart-candle-bear-body-active-bg | chart-bear-active |
| main_chart-candle-bear-body-bg | chart-bear-default |
| main_chart-candle-bull-body-active-bg | chart-bull-active |
| main_chart-candle-bull-body-bg | chart-bull-default |
| main_chart-candle-doji-body-active-bg | chart-doji-active |
| main_chart-candle-doji-body-bg | chart-doji-default |
| main_chart-area | chart-area |
| main_chart-border-active | chart-border |
| main_chart-crosshair-label-bg | chart-crosshair |
| main_chart-crosshair-tag-text | chart-crosshair-value |
| main_chart-divider-default-bg | chart-divider |
| main_chart-grid-dot/line | chart-grid |
| main_chart-high-low-indicator | chart-highlow |
| main_chart-label-inverted-text | chart-label-text-inverted |
| main_chart-label-text | chart-label-text |
| main_chart-loading-text | chart-loading-text |
| main_chart-post_market_data-bg | chart-post-market-bg |
| main_chart-post_market_data-label | chart-post-market-label |
| main_chart-post_market_data-line | chart-post-market-line |
| main_chart-pre_market_data-bg | chart-pre-market-bg |
| main_chart-pre_market_data-label | chart-pre-market-label |
| main_chart-pre_market_data-line | chart-pre-market-line |
| main_chart-progress_bar_bg | chart-progress-bar |
| main_chart-resize_bar-default-bg | chart-resize-bar |
| main_chart-resize_bar-hover-bg | chart-resize-bar-hover |
| main_chart-session_break-bg | chart-session-break |
| main_chart-value-text | chart-value |
| main_chart-value-text-border | chart-value-border |
| main_chart-watermark-text | chart-watermark |
| main_chart-zero_percent-line-bg | chart-zero-line |
| main_chart-scatter-default-bg | chart-scatter |
| button-sell-hovered-bg | button-sell-hover-bg |
| button-focus-border | focus-border |
| button-buy-hovered-bg | button-buy-hover-bg |
| button-primary-default | button-primary-default-bg |
| button-primary-hover | button-primary-hover-bg |
| button-primary-pressed | button-primary-active-bg |
| button-secondary-default | button-secondary-default-bg |
| button-secondary-hover | button-secondary-hover-bg |
| button-secondary-pressed | button-secondary-active-bg |
| drawing-handle_border-bg | drawing-handle-border |
| drawing-highlight-default-bg | drawing-highlight-bg |
| drawing-icon_border-bg | drawing-icon-border |
| drawing-line-default-bg | drawing-default-line |
| drawing-line-negative-bg | drawing-negative-line |
| drawing-line-positive-bg | drawing-positive-line |
| drawing-tag-default-bg | drawing-tag-bg |
| drawing-text-default | drawing-text |
| mini_toolbar-default-bg | floating-toolbar-bg |
| position-icon-default-bg | position-close-icon |
| position_negative-default-bg | position-negative-bg |
| position_negative-divider-bg | position-negative-divider |
| position_negative-wick-bg | position-negative-wick |
| position_positive-default-bg | position-positive-bg |
| position_positive-divider-bg | position-positive-divider |
| position_positive-wick-bg | position-positive-wick |
| dragging_slider-border-default-bg | order-resizer-default-border |
| dragging_slider-border-hovered-bg | order-resizer-hover-border |
| dragging_slider-hovered-bg | order-resizer-hover-bg |
| dragging_slider-default-bg | order-resizer-default-bg |
| order-border-default-bg | order-default-border |
| order-border-hover-bg | order-hover-border |
| order-button-default-bg | order-protection-button-default-bg |
| order-button-hover-bg | order-protection-button-hover-bg |
| order-close_button-default-bg | order-close-button-default-bg |
| order-close_button-hover-bg | order-close-button-hover-bg |
| order-default-bg | order-default-bg |
| order-divider-default-bg | order-default-divider |
| order-divider-selected-bg | order-selected-divider |
| order-wick-default-bg | order-wick-default |
| order-wick-hover-bg | order-wick-hover |
| order_entry-border-bg | order-entry-border |
| link-hovered-text | link-hover-text |
| dropdown-default-bg | menu-bg |
| dropdown-description-text | menu-secondary-text |
| dropdown-list_item-default-text | menu-primary-text |
| dropdown-list_item-disabled-text | menu-disabled-text |
| dropdown-list_item-divider-bg | menu-divider |
| dropdown-list_item-hovered-bg | menu-item-hover-bg |
| dropdown-list_item-selected-text | menu-active-text |
| dropdown_secondary-bg | menu-secondary-bg |
| dropdown_secondary-list_item_hovered-bg | menu-secondary-item-hover-bg |
| toolbar-button-default-color | toolbar-button-default-bg |
| toolbar-button-default-hover-bg | toolbar-button-hover-bg |
| databox-text-default | databox-primary-default-text |
| databox-text-disabled | databox-disabled-text |
| indicator-01 | indicator-main |
| indicator-02 | indicator-secondary |
| indicator-03 | indicator-tertiary |
| indicator-04 | indicator-half-up |
| indicator-05 | indicator-half-down |
| indicator-06 | indicator-up |
| indicator-07 | indicator-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).