π Changelog
All notable changes to the GoCharting SDK will be documented in this file.
The format is based on Keep a ChangelogΒ , and this project adheres to Semantic VersioningΒ .
[1.0.66] - 2026-04-10
π Fixed
P&L Shows 0 on Multi-Chart Layouts
- FIXED: Position P&L displayed as
0on charts that are loading or mid-symbol-transition in a multi-chart layout - ROOT CAUSE:
dataStore.getState().mainisnull/undefinedwhile a chart panel is initialising. The destructuringlet { ltp, bid, ask } = mainthrew aTypeError,drawOnCanvasexited silently, andposstayed at its initial value of0 - FIX: Added optional chaining β
const _main = dataStore.getState()?.main; let ltp = _main?.ltpβ so all three values gracefully fall through toundefinedand the existing direction-aware fallback chain (Position.bid/Position.askat step 2) resolves the correct mark price
[1.0.65] - 2026-04-09
π Fixed
Direction-Aware P&L Price Selection (Position Lines)
- FIXED: P&L on position order lines now uses the correct bid/ask for each direction β buy positions mark-to-market against bid, sell positions against ask
- CHANGED: Fallback chain priority updated:
DataModel bid/ask(Realtime) βPosition bid/askβDataModel ltpβPosition ltp - ROOT CAUSE: When
DataModel.bid/DataModel.askwere not populated from TradeMessage, the old chain fell back toDataModel.ltp(non-directional) before tryingPosition.bid/Position.ask. For a sell position with bid=75.45/ask=75.50/ltp=75.45, this caused P&L to use 75.45 instead of 75.50 β a 96 EUR discrepancy per 100,000 units at 0.01920099 pnlMultiplier - FIX:
Position.bid/Position.ask(set viasetBrokerAccounts) are now checked at step 2, beforeDataModel.ltp, ensuring direction-aware pricing even when realtime bid/ask havenβt arrived
[1.0.64] - 2026-04-09
π Fixed
P&L Rounding Mismatch
- FIXED: P&L values on chart position lines could differ by ~0.01 from the Positions tab β the SDK used standard
Math.round(half-up) while the host app uses bankerβs rounding (half-even). AddedbankersRound()using exponential notation to match Decimal.jstoDecimalPlaces(2)behavior - FIXED:
pnlMultiplierbecame stale betweensetBrokerAccountscalls for cross-currency instruments β added livepnlMultiplierfield toTradeMessageso the conversion rate updates on every tick (~500ms), eliminating drift proportional to position size and conversion rate change - FIXED: Position P&L stuck at 0 when DataModel bid/ask is null β stale position-level bid/ask from
setBrokerAccounts(equal to entry price) was overriding the valid real-time DataModel ltp. Restructured fallback chain: DataModel bid/ask β DataModel ltp β position-level bid/ask β position-level ltp
Desktop Color Picker
- FIXED: Color picker popup escaped chart container bounds β constrained positioning to
.gocharting-autofit-containerrect instead of viewport - FIXED: Color picker invisible in fullscreen mode β portaled to
document.fullscreenElementinstead ofdocument.body - FIXED: Scrollbar visible when picker content fits within available space β removed unnecessary
maxHeightwhen content fits - FIXED: Picker closed on mouse wheel scroll inside the popup β added window capture-phase wheel event guard
- FIXED: Picker closed when clicking the scrollbar β added scrollbar bounds check in
handleClickOutside - IMPROVED: CSS Anchor Positioning (
anchor-name,position-anchor,anchor()) for auto-follow when Drawing Bar moves, with MutationObserver fallback for non-supporting browsers - IMPROVED: Preset swatches hidden automatically when vertical space is insufficient
Null Event Crash on Mobile
- FIXED:
Cannot read properties of null (reading 'preventDefault')inhandleContextMenuon mobile single tap β added null guarde?.preventDefault()
Stacking Context Trapping Mobile Overlays
- FIXED:
isolation: isolateon the chart container created a stacking context that trapped allposition: fixeddescendants (bottom sheets, color pickers, context menus) β their z-index became local rather than global, rendering them behind the chart. Removedisolation: isolatefrom chart container andDraggablePopup - FIXED: Removed
transform: translateZ(0)fromDraggablePopupβ CSS transforms create a containing block with the same trapping effect asisolation: isolate
Z-Index Normalization
- IMPROVED: Replaced all
z-index: 9999values with a tiered system that avoids competing with host app navigation bars:10β dropdowns, popovers, top bar, bottom bar, error overlays20β drawing toolbar, layers panel30β style pickers (stroke width, dash array, color pickers)50β toasts1049/1050β mobile bottom sheet overlays10001/10002β mobile color picker overlays
[1.0.62] - 2026-04-04
π Fixed
Pan-Left Historical Data Not Loading
- FIXED: Chart did not load additional historical data when panning/dragging left on any timeframe β
getBars()returns UDF format{s, t, o, h, l, c, v}butprocessAdditionalBarsexpected a raw bar array; added UDF-to-array conversion with proper ISO string date formatting inTimeSeriesFeedSDK.fetchMoreBarsFromDatafeed - FIXED:
Cannot read properties of undefined (reading 'sessions')crash inDataModel.populateEndTimesMapduring pan-left data processing β added null guard forsessionGroupToApply
OHLC Values Always Visible on Mobile
- FIXED: OHLC values (Open, High, Low, Close) now always display on mobile β previously gated by crosshair visibility which meant values were never shown on touch-only devices
Price Axis Freeze on Flat Price Data
- FIXED: Price axis collapsed to a single tick label when all visible candles had the same price β D3 scale
normalize(a, a)returnsconstant(0.5), collapsing the Y-axis. Added zero-range domain guard inChartDataModelandresetChartthat expands by Β±10 tick sizes
Update Positions API
- ADDED:
updatePositions()method on the chart instance β allows host apps to dynamically update position fields (e.g.,ltp,bid,ask,pnlMultiplier) without callingsetBrokerAccountsagain - ADDED:
UPDATE_POSITIONSreducer inconfigureBrokerStoreβ merges partial position updates by key
Mobile Color Picker Redesign
- FIXED: Color picker on mobile was not updating drawing color β
handleClickOutsidefired before color change registered; disabled on mobile - FIXED: Mobile color picker z-index stacking β portaled to
document.bodywith z-index 10001/10002 to escape parent stacking context - FIXED: Hue slider change did not propagate to drawing β
handleHueChangecalledsetColorStateinstead ofupdateColor - FIXED:
preventDefaultinside passive touch event listener warning β switched toaddEventListenerwith{ passive: false }via refs - IMPROVED: Redesigned
NativeColorPickerwith modern 32-swatch preset grid and compact saturation/hue/alpha sliders
Mobile Drawing Bar Vertex Tap
- FIXED: Drawing Bar disappeared when tapping end vertices on mobile β
handleSingleTapnow checksisDragInProgressbefore deselection
Layout Sync Checkbox Crashes
- FIXED:
Cannot read properties of undefined (reading 'search')when toggling βSync All Symbolsβ β addedlocation/historyfallbacks for SDK mode (no React Router) - FIXED:
head is not definedwhen toggling βSync Chart Typesβ β added missing import inSideBar.jsx
Toolbar Background Unification
- IMPROVED: Unified top bar background to
theme.set1.theme(black) across all toolbar items, search bar, and dropdowns β eliminates gray background mismatch in dark theme
Mobile Drawer & Context Menu
- FIXED: Mobile drawer scroll blocked by
overflow: hiddenon parent with CSStransformβ removed identity transforms - FIXED: βEdit Settingsβ in context menu triggered drawer conflict on mobile β disabled conflicting click handlers
- FIXED: Options drawer tick selection not updating immediately on mobile
[1.0.61] - 2026-03-27
π Fixed
Position Bid/Ask/LTP Fallback for P/L Calculation
- CHANGED: Position-level
bid/askare used as fallback when DataModelbid/askare null (before live TradeMessage data arrives) - ADDED: Position-level
ltpfallback β when DataModel has no ltp and no bid/ask,options.info.ltpfrom the position object is used - IMPROVED: P/L priority chain is now:
DataModel.bid/askβposition.bid/askβDataModel.ltpβposition.ltp - IMPROVED: Added optional chaining (
options?.info?.bid) for safer property access on position info
Session Data Crash in DataModel
- FIXED: Additional
Cannot read properties of undefined (reading 'sessions')crash inDataModel.jsupdateStartOfSession2β same root cause as the DayBreak fix but in the data processing path
Chart Zoom Mismatch After Layout Change
- FIXED: Chart displays extreme zoom when restoring saved state after switching between single-chart and multi-chart layouts β
ChartDataModelnow saves container width alongside viewport state and scalesnumberOfVisibleCandlesproportionally when width changes significantly
[1.0.60] - 2026-03-26
β¨ Added
Position & Order Visibility (hidden flag)
- ADDED:
hidden?: booleanfield to thePositiontype β allows host apps to control per-position visibility on the chart - ADDED: SDK-side filtering for
hiddenorders and positions inhandleBrokerStoreChangesβ hidden items are excluded from chart drawings while remaining in the broker store data - ADDED:
visibleproperty on order/position drawings now respects thehiddenflag (visible: showOpenOrders && !o.hiddenfor orders,visible: showPositions && !p.hiddenfor positions) - BACKWARD COMPATIBLE: If
hiddenis not set, behavior is identical to previous versions (!undefined === true)
Position Bid/Ask for Accurate P/L Calculation
- ADDED:
bid?: number | nullandask?: number | nullfields to thePositiontype β allows host apps to provide current bid/ask prices for immediate P/L calculation - ADDED: OrderLine P/L calculation now uses position-level bid/ask as fallback when DataModel has no price data (between chart load and first TradeMessage)
- IMPROVED: P/L displays correctly immediately after
setBrokerAccounts()instead of showing empty/zero until the first live trade arrives
π Fixed
Session Data Crash on Multi-Chart Trade Processing
- FIXED:
Cannot read properties of undefined (reading 'sessions')error inDayBreak.jsxandDataModel.jswhen processing trade messages on a newly selected chart β added optional chaining to gracefully handle uninitialized session groups in both rendering and data processing paths
Chart Zoom Mismatch After Layout Change
- FIXED: Chart displays extreme zoom when restoring saved state after switching between single-chart and multi-chart layouts β
ChartDataModelnow saves the container width alongside viewport state and scalesnumberOfVisibleCandlesproportionally when the container width changes significantly on restore
[1.0.59] - 2026-03-25
π Fixed
Top Bar Gray Background Mismatch in Dark Theme
- FIXED: Top bar background now uses
theme.set1.bg4instead ofborderBackgroundβ the gray border color (rgb(53, 60, 66)) was visually mismatched against the chartβs dark background. Both desktop and mobile top bars now blend seamlessly with the chart theme
βShow Position Iconβ Persists After MultiβSingle Chart Switch
- FIXED: Position icons no longer persist incorrectly when switching from multi-chart to single-chart layout β the
brokerStorereducer now handlesLAYOUT_CHANGED, triggering each ChartWidget to re-evaluate and clear stale position drawings from inactive charts
SL/TP Touch Drag on Mobile
- FIXED: SL/TP buttons and order lines can now be dragged via touch on mobile β previously required a two-tap selection gesture that was undiscoverable. OrderLine sub-elements (
tp_line,sl_line,line) now bypass the two-tap selection gate and allow immediate touch-drag - IMPROVED: Touch hit areas for SL/TP buttons enlarged from 10px to 16px tolerance, and drag lines from 7px to 14px β making them easier to grab with a finger
- IMPROVED: Increased spacing between TP/SL buttons and the Close (X) button on mobile β 10px gap between TP and SL, 15px gap between SL and Close, preventing accidental taps on the wrong button
Mobile GoCharting Menu Not Scrollable
- FIXED: Mobile hamburger side panel content is now scrollable β uses
overflow-y: autowithoverscroll-behavior: contain - FIXED:
touchmovehandler on mobile overlay now only prevents scroll on the overlay background itself, allowing panel content to scroll - FIXED: Added
touchstartlisteners for click-outside dismissal on mobile for all dropdown controls
Modals Not Fixed to Viewport
- FIXED:
ConfirmAlertdialogs now always portal todocument.body(or the fullscreen element) β removed fallback tooverlap-manager-rootwhich could be trapped inside CSStransformcontainers
Desktop Menu Rendered Underneath Positions Tab
- FIXED: Top bar dropdown menus (Charts, Study, Templates, etc.) now render correctly β switched from
position: fixedtoposition: absolutewith container-relative coordinates - FIXED: Dropdown z-index increased to render above Positions tab and other overlays
- FIXED:
ChartDropdownContentschanged tooverflow-y: auto, allowing long dropdown lists to scroll - FIXED: Drawings side bar dropdown menus now use
position: absolutewithz-index: 4000
Fullscreen SL/TP Update & Close Modal Not Visible
- FIXED: In fullscreen mode, SL/TP update and close modals are now visible β portals to fullscreen element or
document.body, escaping the chart containerβs CSStransformstacking context
Settings Panel Overflows Chart Container
- FIXED: Settings panel no longer extends below the chart container β
maxHeightnow accounts for the panelβs Y offset and both bottom bars (positions bar and time range bar)
SL/TP Labels Hidden on Mobile
- FIXED: Stop Loss and Take Profit PNL labels on order lines are now hidden when chart width is below 600px, preventing label overlap on small screens
β¨ Added (v1.0.56)
Bid/Ask Price Support for Accurate PNL Calculation
- ADDED: Optional
bidandaskfields toTradeMessagetype for real-time trade data - ADDED:
bidandaskgetters toDataModelclass for accessing best bid/ask prices - IMPROVED: Position PNL calculation now uses bid price for long positions and ask price for short positions when available, providing more accurate unrealized PNL
βοΈ Build & DX Improvements
- ADDED:
build:validatescript β validates package.json has no self-referencing orlink:dependencies before building - IMPROVED:
build:watch:all:typednow uses--kill-others-on-failto terminate all watchers if any process fails
[1.0.55] - 2026-03-08
ποΈ Removed
Keyboard Shortcut Labels from Context Menus
- REMOVED: All keyboard shortcut labels (Home, Shift+I, Ctrl+C, DEL, Alt+X, Shift+Dbl, F6, etc.) that were rendering to the right of context menu items β these were internal hints not relevant to SDK consumers
- PRESERVED: The Lock Aspect Ratio row still displays the current aspect ratio value (rendered as a plain text element, not a shortcut label)
Formula Chart UI
- REMOVED: Formula operator buttons (Γ·, β, +, Γ, ^, 1/x) that appeared in the search bar when focused β formula charts are not part of the SDK feature set
- REMOVED: βPress = to create formula charts.β tooltip that appeared above the symbol search bar
- REMOVED: All formula-related state (
showFormulaeButtons), styled components (Actions,ActionButton,ActionIcon), and theaddOperandmethod
π Fixed
Manage Drawings Popup β Dark Mode Colors
- FIXED: Delete (trash) icon in the Manage Drawings popup is now visible in both light and dark themes β the icon color now uses
theme.set1.fg1instead of inheriting an incorrect cascaded color - FIXED: Drawing ticker name and subtitle text in the Manage Drawings popup now correctly renders in white in dark mode β the card container now explicitly sets
color: theme.set1.fg1 - FIXED: Tab headers (βLocal Drawingsβ, βSynced Layoutβ) in the desktop Manage Drawings popup now correctly inherit the theme foreground color in dark mode
Templates Crash β Null Items in TEMPLATES Array
- FIXED: Opening the Templates dropdown no longer throws
Invariant Violation: key is requiredfor users with certain saved template data β added(favourite.TEMPLATES || []).filter(Boolean)guard to prevent null/undefined items from reaching Reactβs list renderer
Drawing Toolbar Color Selector
- FIXED: The color swatch button in the drawing toolbar now correctly targets the line/stroke color β previously it would target text color (
labelStyle) when a drawing had both stroke and label styles, making it impossible to change the line color from the toolbar
Downshift API Compatibility
- FIXED: Replaced deprecated
downshift.setState({ inputValue })call (removed in Downshift v6) with the currentdownshift.setInputValue()API β preventsTypeError: downshift.setState is not a function
Autosave Debounce Too Slow
- FIXED: Autosave debounce reduced from 5 seconds to 200ms β chart state changes are now persisted almost immediately, preventing data loss when users navigate away quickly
- FIXED: Chart state is now saved on component unmount, ensuring no unsaved changes are lost when the chart is destroyed
Left Side Icons Missing
- FIXED: Left side toolbar icons are now visible and correctly rendered β previously, icons were missing due to styling issues
- ADDED: Regression test cases to prevent future icon visibility regressions
Autofit & Price Axis Overflow
- FIXED: Autofit and price axis now render properly according to the container dimensions β previously, chart content could overflow its container boundaries
- FIXED: Canvas updates correctly in multi-chart layouts, ensuring each chart panel respects its allocated space
π± Mobile UX Improvements
Responsive Mobile Detection
- IMPROVED: Mobile detection (
isMobileFunc) is now fully responsive to viewport resize β previously, mobile/desktop mode was only evaluated on page load and required a browser refresh to update - ADDED: New
useIsMobileReact hook usingResizeObserverwithrequestAnimationFrameto efficiently detect viewport changes without causing ResizeObserver loop errors - MIGRATED: All React components now use the
useIsMobilehook instead of callingisMobileFunc()at module level β class components are wrapped with thin function component wrappers that passisMobileas a prop - FIXED: OHLC tooltip values and indicator titles are now hidden on mobile viewports and shown on desktop, responding dynamically to resize
- ADDED: Positive and negative regression tests covering the hook, viewport detection, OHLC tooltip behavior, and no-module-level-caching guards
Mobile Hamburger Menu Z-Index & Scroll Bleed
- FIXED: Mobile hamburger side panel now renders above all other content with
z-index: 9999β previously, chart elements could overlap the menu - FIXED: Background scroll bleed when the hamburger menu is open is now fully prevented β non-passive
wheelandtouchmoveevent listeners block scroll propagation, and CSStouch-action: nonewithoverscroll-behavior: containprevents touch-based scroll bleed - FIXED: Side panel overlay now portals to
document.bodyto escape CSS stacking contexts created bytransformproperties on ancestor elements
Context Menu Crash on Right-Click
- FIXED: Right-clicking the chart area no longer throws
ReferenceError: iconSize is not definedβChartContextMenuwas missing its localiconSizedeclaration after a v1.0.54 refactor moved it out of module scope
Debug UI Elements Left in Production
- FIXED: Removed debug
<div>overlays (red and lime-green colored boxes with βDEBUG:β text) and[DEBUG ContextMenu]/[DEBUG SeriesContextMenu]console logs that were accidentally committed and visible to all users in production builds
Context Menus Close When Scrolling Inside
- FIXED: Scrolling inside a context menu (e.g., a long list of drawing tools) no longer accidentally closes the menu β the
scrollevent was firing ondocumentinstead of the menu element when the mouse wheel overflowed the menu, causing the scroll-close handler to trigger incorrectly. Fixed by addingif (!(e.target instanceof Element)) returnguard
DrawingsMenu Submenu Dismissed on Scroll
- FIXED: Scrolling inside the Drawings submenu no longer closes it β the submenuβs scroll handler now checks for the
data-drawings-submenuattribute to distinguish its own scroll events from page-level scroll events
OHLC Values Not Hiding on Mobile
- FIXED: Tapping the chevron button to hide OHLC values on mobile now works correctly β
OHLCTooltipnow correctly reads theisMobilestate via theuseIsMobilehook and applies the hidden/visible toggle
Mobile Context Menus Close on Toggle Interaction
- FIXED: On mobile, toggling a setting inside a context menu (e.g., βShow Volumeβ, βLock Price Scaleβ) no longer closes the entire menu β the
useClickOutsideanduseScrollAndKeyboardClosehandlers are now disabled on mobile, so only the explicit X button or overlay tap closes the menu
useIsMobile Resize Performance
- IMPROVED: The
useIsMobilehook now debounces resize events usingrequestAnimationFrame, eliminating redundant re-renders during window resize and preventingResizeObserver loopwarnings in the console
Context Menu Visibility Flash on Mobile
- FIXED: Class-based context menus (e.g., Axes context menu) no longer flash briefly in the wrong position before sliding into place as a bottom sheet on mobile β the
contentRefvisibility logic now correctly defers positioning until after the portal target is measured
Series Context Menu Shows Only Header on Mobile
- FIXED: On mobile (touch-only devices), tapping the series symbol icon to open the βOptionsβ bottom sheet now shows all menu items (Edit Settings, Apply Default, Hide, Copy, Clone, etc.) β previously, the bottom sheet showed only the βOptionsβ header with no content
- ROOT CAUSE:
SeriesContextMenuhad a hardif (mouseXY == null) { return null }guard in its render path. On mobile, no mouse events ever fire, somouseState.mouseXYis alwaysnull, causing the component to returnnullunconditionally and produce an empty sheet - FIX: Made
mouseXYoptional βyValueandx1Displayare now computed only whenmouseXYis available; the PnF vertical-count menu item is conditionally hidden whenx1Displayis null; all other items render regardless
Historical Data Not Loading on Pan Left
- FIXED: Panning the chart left to reveal older historical candles now correctly loads and renders new bars β previously, panning silently fetched data but discarded it without appending to the chart
- ROOT CAUSE:
TimeSeriesFeedSDK.processAdditionalBarsgenerated arequest_idviarequestIDManager.nextRequestID()but never registered it inoriginating_request_id. The_transformmethodβsTS/V2handler checks that set and immediately discards any message with an unknown ID β so all pan-fetched bars were silently dropped. The error was further masked by an emptycatch (error) {}block - FIX: Added
this.originating_request_id.add(request_id)immediately after ID generation inprocessAdditionalBarsβ matching the pattern used by every otherTS/V2request in the codebase
[1.0.53] - 2026-03-03
π Fixed
Touch Interactions for Drawings & TP/SL Order Lines
- FIXED: Touch-dragging TP (Take Profit) and SL (Stop Loss) lines on mobile now works correctly β previously, the touch position was not snapped to the price grid, causing hit-test misses that prevented drag from starting
- FIXED: Tapping cancel (X) buttons on TP/SL and order lines now works on mobile β button hit-test tolerance was increased from 0 to 5px on mobile devices, and touch action button handlers were added (previously only mouse clicks were handled)
- FIXED: Drawing vertex drag on mobile now works reliably β vertex hit-test radius increased from 7px to 14px on touch devices to accommodate finger imprecision
- FIXED: Touch action buttons (close, delete, modify, reverse) on order/position lines now fire correctly on tap β the touch start handler now processes these actions matching the existing mouse handler behavior
- FIXED:
ReferenceError: e is not definedcrash when touch-dragging a drawing vertex β the touch move handler referenced an undefined variableeinstead of the correcteventparameter
Drawing Bar Bottom Sheet on Mobile
- FIXED: The Drawing Bar (toolbar shown when selecting a drawing) now renders its icon buttons correctly in the mobile bottom sheet β previously, the icons were invisible because the container used
height: 100%which resolved to 0 inside the flex-based bottom sheet layout
[1.0.52] - 2026-02-26
π Fixed
Mobile Touch Interactions β Left Toolbar & Price Axis
- FIXED: Right-side price axis (Y-axis) and bottom time axis (X-axis) now respond to touch drag for zooming/scaling on mobile β previously, touch gestures were intercepted by the browser as page scroll
- FIXED: Left drawing toolbar now supports touch scrolling on mobile β users can swipe vertically to scroll through drawing tools
- ADDED:
touch-action: noneon.gocharting-pin,.gocharting-yaxis, and.gocharting-xaxisto prevent browser default touch handling on chart interactive elements
Bottom Bar Visibility on Screen Resize
- FIXED: Bottom bar now correctly shows/hides when the screen is resized
Multichart Data Contamination on Page Reload
- FIXED: In multi-chart layouts (e.g., BTCUSDT + ETHUSDT), refreshing the page or recreating charts no longer causes OHLC data from one chart to bleed into another β previously, the unselected chart would display mixed Open/High values from the wrong symbol with a distorted price scale
- ROOT CAUSE: The
originating_request_idfilter inTimeSeriesFeedSDK._transform()was disabled for theTS/V2(SDK custom datafeed) code path, causing allgetBars()responses to be processed by every chart instance instead of only the requesting one
Position Icons Persist After Multi β Single Chart Switch
- FIXED: In multi-chart mode, enabling βShow Position Iconβ and then switching back to single chart mode no longer leaves stale position icons from other instruments visible β previously, position icons for ALL previously enabled instruments persisted instead of only the active instrument
- ROOT CAUSE: When layout changed from multi-chart to single-chart, surviving
ChartWidgetinstances were not re-evaluating their position drawings because neither the root store trading settings nor the broker store dispatched during the layout switch
Settings & Undo Icons Overlap Content on Scroll
- FIXED: Settings and Undo icons no longer overlap with chart content when scrolling β the CSS
isolationproperty on the chart container creates a proper stacking context that keeps UI controls correctly layered
Wrong Instrument Chart Displayed on Mobile
- FIXED: On mobile, switching instruments no longer causes the chart to display data for the previously selected instrument β the autosave mechanism now correctly persists and restores the active instrument
Multichart Toggle Breaks Unselected Chart Scale
- FIXED: In multi-chart mode, toggling trading features on/off no longer causes the unselected chartβs price scale to jump by thousands of units or distort β this was a side-effect of the same data contamination issue where
getBars()responses were processed by all chart instances instead of only the requesting one (see βMultichart Data Contaminationβ above)
Chart Layout Squeezed by Positions Panel
- FIXED: When the chart is embedded in a flex layout alongside fixed-height panels (e.g., positions table, account info bar), the chartβs top bar (drawing tools, settings icons) and bottom bar (1D/1W/1M timeframe range, timestamp) now always remain visible β previously, the entire chart including its UI bars would collapse to zero height when squeezed by surrounding content
- BEHAVIOR: The chart canvas in the middle shrinks to fit the available space while the top bar and bottom bar stay pinned.
π± Mobile UX Improvements
Bottom Sheet Popups & Context Menus
- IMPROVED: All popups (DraggablePopup, DrawingsMenu, ContextMenu, Settings) now render as bottom sheets on mobile with dimming overlay backdrops, rounded top corners, and swipe-friendly close buttons β replacing floating windows that were difficult to interact with on touch screens
- FIXED: Popups and context menus now portal to
document.bodyon mobile, escaping the chart containerβs CSSisolationstacking context that previously caused overlays to be clipped or hidden behind other elements
Background Scroll Locking
- FIXED: Opening a modal, confirm alert, or popup on mobile no longer allows the background page to scroll underneath β body scroll is locked when overlays are open and restored on close
Touch-Aware Click Outside Detection
- FIXED: The
useClickOutsidehook now properly distinguishes between taps and swipes on mobile β a 10px movement threshold prevents accidental closures of dropdowns, popovers, and menus when users swipe or scroll, only treating gestures with less than 10px of movement as βclick outsideβ
Context Menu Enhancements
- IMPROVED: Context menus on mobile now display a header bar with a context-aware title (βY Scaleβ, βX Axisβ, βChart Optionsβ) and a close button
- FIXED: Axes context menus no longer auto-close on option toggle on mobile β users can toggle multiple settings before manually closing
- CHANGED: Keyboard shortcut labels are hidden on mobile context menus
Tooltip Dismissal on Scroll
- FIXED: Tooltips no longer remain stuck or drift in place when scrolling on mobile β tooltips are automatically dismissed on
scrollandtouchmoveevents
Scrollable Tab Strips
- FIXED: Scrollable tab strips (e.g., drawing tool categories) now support proper touch-based scrolling with manual drag tracking β previously, touch handlers were incorrectly mapped to mouse enter/leave events
- ADDED:
touch-action: noneon tab strip wrappers to prevent browser default scroll from interfering with custom scroll logic
Settings Tab Mobile Layout
- ADDED: Mobile-optimized settings layout with a horizontally scrollable tab strip at the top, scrollable content area in the middle, and a fixed βReset Defaultβ action bar at the bottom β replacing the desktop sidebar-based tab navigation that was not usable on narrow screens
Manage Drawings Popup Rewrite
- IMPROVED: The βManage Drawingsβ popup was rewritten to use the shared
DraggablePortalcomponent on desktop and a bottom sheet on mobile, dramatically reducing code complexity and unifying the UX with other popups - ADDED:
overscrollBehavior: "contain"on the drawing dropdown to prevent scroll bleed into the page
[1.0.51] - 2026-02-25
β¨ Added
CHART_MODE_CHANGED Callback Event
New callback event fired when multi-charting is enabled or disabled (i.e., when the layout switches between single-chart and multi-chart mode).
Event Type: CHART_MODE_CHANGED
Message Type: MultiChartInfo
appCallback: (eventType, message) => {
if (eventType === "CHART_MODE_CHANGED") {
console.log(message.isMultichartingEnabled); // true or false
console.log(message.charts); // Array of ChartSelectedMessage
}
};π Fixed
onClose in appCallback Always Undefined
- FIXED: The
onClosecallback passed in theappCallbackevent object was alwaysundefined. Internal components (e.g., context menu) were passingonCloseas a third argument, but the mediator layer was only accepting two parameters, silently dropping it.onClosenow correctly propagates to the userβs callback for events likePLACE_ORDER,CREATE_ALERT, etc.
Mobile Modal Full-Width on iPhone
- FIXED: Toolbar modals (Interval, Chart Type, Drawings, Indicators, Templates) now correctly use full viewport width on all iPhones, including iPhone 17 Pro Max (440px viewport)
- FIXED: Mobile breakpoint (
screenSize.sm) increased from 430px to 480px to cover newer iPhone viewports - FIXED: Added inline
width: 100%fallback on modal content components to prevent mismatch between JS-based and CSS-based mobile detection
Mobile Modal Backdrop & Scroll Prevention
- FIXED: Backdrop overlay now displays correctly on all iPhones β previously hidden on devices with viewport > 430px due to CSS media query mismatch
- FIXED: Background content no longer scrolls when a modal bottom sheet is open on mobile
- ADDED:
touch-action: noneandoverscroll-behavior: noneon backdrop overlay to block scroll-through on iOS Safari - ADDED:
overscroll-behavior: containon all modal containers to prevent scroll chaining
[1.0.50] - 2026-02-21
β¨ Added
AutoSave - Chart State Persistence
Automatically save and restore chart state across page refreshes using sessionStorage.
Configuration:
const chart = GoChartingSDK.createChart("#chart", {
datafeed: myDatafeed,
symbol: "AAPL",
interval: "1D",
licenseKey: "YOUR_KEY",
autoSave: true, // default β persists chart state across refreshes
});Whatβs Saved:
- Chart layout (single, split, multi-pane)
- Symbols & intervals
- Indicators with parameters
- Drawings (trendlines, Fibonacci, rectangles, etc.)
- Chart settings and appearance
- Theme (light/dark mode)
Details:
- Enabled by default (
autoSave: true) - Uses
sessionStorageβ scoped to the current browser tab - State is automatically cleared when the tab or browser window is closed
- Set
autoSave: falseto always start fresh from props on every load - See Configuration API β autoSave for full documentation
π Fixed
Theme Not Persisting Across Refreshes
- FIXED: Selected theme (Light/Dark) now persists across page refreshes β previously reverted to the default config theme
- FIXED: Theme is now saved to
localStorageimmediately when changed, independent of theautoSavesetting - FIXED: Body CSS classes (
dark/light) are now applied on initial chart load β components that depend on body class for styling now render correctly on first paint - FIXED: Root store subscription now listens for
themeColorchanges, ensuring the UI stays in sync when the theme is updated programmatically
Position Line (Market Order) Rendering
- FIXED: Sell quantity text on position lines no longer truncated β switched to left-aligned text rendering with explicit padding for reliable positioning
- FIXED: Position size now displays as absolute value (no negative sign for sell positions)
- FIXED: Market orders now correctly labeled as βMarket-Sellβ / βMarket-Buyβ instead of falling through to βLimit-Sellβ / βLimit-Buyβ
S/L Box Rendering for Positions
- FIXED: S/L (Stop Loss) horizontal line for positions now renders as dotted line (ShortDash), matching the order line style
- FIXED: S/L size box measurement was using PnL text width instead of quantity width β caused incorrectly sized boxes for position S/L lines
- FIXED: S/L size text for positions now shows absolute quantity instead of raw negative value
T/P Box Rendering for Positions
- FIXED: T/P (Take Profit) size box for positions was missing padding β added consistent
+ 10padding matching order line style - FIXED: T/P size text for positions now shows absolute quantity instead of raw negative value
π§ Enhanced
Mobile-Responsive Order/Position Line Alignment
- IMPROVED: Order, position, and TP/SL boxes now automatically right-align near the price axis on narrow/mobile screens (chart width < 600px)
- IMPROVED: Box positioning is dynamically calculated by pre-measuring content width (size text + order label), minimizing the gap between boxes and the price axis
- IMPROVED: Handles large quantities gracefully β wider size text pushes the box left while keeping the right edge anchored near the price axis
- IMPROVED: TP/SL boxes are clamped to prevent overflow past the chart area on mobile devices
- FIXED: TP/SL assumed buttons (T/P, S/L) no longer overlap with the order box cancel (X) button on mobile β compact layout uses
[TP 30px][SL 30px][5px gap][Order Box]spacing - IMPROVED: A small connecting line draws from the box to the price axis, keeping the UI clean
- DETAILS: On desktop (width >= 600px), the userβs chosen alignment setting (left/middle/right) is respected as before
[1.0.49] - 2026-02-17
π Fixed
Build Process Enhancement
- FIXED: Build issue that prevented some changes from going live
- IMPROVED: Added automatic dependency building before SDK builds
- IMPROVED:
build:depsscript now automatically builds@gocharting/chart-widgetand@gocharting/technical-indicatorspackages - IMPROVED: Integrated dependency builds into
prebuild:webpackandprebuild:vitescripts
TP/SL Line Rendering Improvements
- FIXED: SL (Stop Loss) horizontal line now extends all the way to the price axis
- FIXED: Green connecting line endpoint position corrected to stop at cross button edge (not inside order box)
- FIXED: TP (Take Profit) line to price axis now displays as dotted line (consistent with SL line style)
- FIXED: Green line brightness on left side now matches right side brightness
- IMPROVED: Applied brightness fix to main order line to prevent dimming by volume bars
- IMPROVED: Consistent line rendering across all box alignment modes (left, middle, right)
[1.0.48] - 2026-02-16
π Fixed
Chart Overlaps Bottom Menu on Mobile
- FIXED: Chart body no longer overlaps the bottom menu on mobile devices
- FIXED: Adjusted z-index of chart body to prevent obstruction of menu buttons
- IMPROVED: Better usability on mobile landscape mode
Settings Icon Overlaps Rates Section
- FIXED: Settings icon repositioned to bottom right corner
- FIXED: Settings icon no longer overlaps with the rates section
- IMPROVED: Cleaner chart header layout
Non-functional Keyboard Shortcuts in UI
- FIXED: Removed non-functional keyboard shortcuts (Alt+H, Alt+L, Alt+O, Alt+E) from the UI
- IMPROVED: UI now only displays shortcuts that are actually functional
S/L Label Visibility Issues
- FIXED: S/L label amount no longer truncated on chart
- FIXED: S/L label now visible for large position amounts
- FIXED: Label properly resizes to handle large numeric values
- IMPROVED: Green horizontal line connecting TP/SL to order box now stays bright and visible
- IMPROVED: Line rendering uses
globalCompositeOperationandglobalAlphato prevent dimming from overlapping elements (e.g., volume bars)
OHLC Values Show NaN on Zoom (Mobile)
- FIXED: OHLC (Open, High, Low, Close) values no longer display as NaN when zooming on mobile
- FIXED: Accurate price information maintained after pinch-to-zoom interactions
SL/TP Rate Highlighting
- FIXED: SL or TP rate now highlighted individually when updated alone
- FIXED: Rate highlight no longer requires both SL and TP to be updated together
π§ Enhanced
Order Line Rendering Logic
- IMPROVED: Complete rewrite of green horizontal line drawing logic for TP/SL connections
- IMPROVED: Smart line routing based on TP/SL state:
- When neither TP nor SL is set: Line routes TP button β SL button β Order box
- When TP is set (at different level): Line routes from TP vertical line β Order box
- When SL is set (at different level): SL vertical line joins the horizontal line
- When both TP and SL are set: Clean single segment from TP vertical line to Order box
- IMPROVED: Line visibility guaranteed regardless of overlapping chart elements
[1.0.47] - 2026-02-13
β¨ Added
Multicharting API - getAllCharts() Method
Get information about all charts when multicharting is enabled.
New Method:
getAllCharts()on ChartInstance returnsMultiChartInfoobject
Returns:
isMultichartingEnabled: boolean indicating if multicharting is active (layout !== β1β)charts: array ofChartSelectedMessageobjects with chart details (id, chartId, idx, symbol, interval)
Example:
const chartInfo = chartInstance.getAllCharts();
if (chartInfo.isMultichartingEnabled) {
console.log(`Found ${chartInfo.charts.length} charts`);
chartInfo.charts.forEach((chart) => {
console.log(`Chart ${chart.idx}: ${chart.symbol} @ ${chart.interval}`);
});
}
// Example output:
// {
// isMultichartingEnabled: true,
// charts: [
// { id: "CHART_1", chartId: "CHART_1", idx: 0, symbol: "BTCUSDT", interval: "1H" },
// { id: "CHART_2", chartId: "CHART_2", idx: 1, symbol: "ETHUSDT", interval: "15m" }
// ]
// }Use Cases:
- Programmatically access all chart states in multi-chart layouts
- Synchronize data across multiple charts
- Build custom multi-chart management UIs
- Export/save multi-chart workspace configurations
Context Menu Configuration - Trading Options Control
Control the visibility of Buy/Sell buttons in the right-click context menu.
New Configuration Option:
const chart = createChart(container, {
datafeed: myDatafeed,
symbol: "BTCUSDT",
interval: "1H",
// Control trading options in context menu
contextMenu: {
showTradingOptions: false, // Hide Buy/Sell buttons (default: true)
},
});Use Cases:
- Set to
falsefor view-only charts where trading is not allowed - Set to
true(default) for full trading functionality - Useful for demo accounts or educational platforms
- Compliance requirements for non-trading users
Type Definition:
type ContextMenuOptions = {
/** Show trading options in context menu (default: true) */
showTradingOptions?: boolean;
};RTL (Right-to-Left) Language Support
Enhanced support for RTL languages like Arabic, Hebrew, Farsi, and Urdu.
What Follows RTL:
- β Toolbar and Menus - Top toolbar, drawing tools menu, and all dropdown menus adapt to RTL
- β Submenus - All popup menus and context menus follow RTL direction
- β UI Components - Buttons, dropdowns, and controls align according to RTL
What Stays LTR:
- π Main Chart Layout - Chart canvas, price axis, and time axis remain in LTR for consistency
- π Chart Content - Candlesticks, indicators, and drawings maintain standard orientation
Improvements:
- β
Automatic direction detection from HTML
dirattribute - β Consistent spacing in both LTR and RTL modes
- β Drawing tools menu adapts to RTL layout
- β Dropdown components match HTML direction
- β Fixed alignment issues in RTL mode
Usage:
<!-- Set RTL direction on HTML element -->
<html dir="rtl">
<body>
<div id="chart"></div>
</body>
</html>Result:
- Toolbar and menus will display in RTL (right-to-left)
- Main chart layout remains in LTR for standard chart reading
- Best of both worlds: RTL UI with standard chart orientation
π§ Enhanced
License Verification Retry Mechanism
Improved Reliability:
- License verification now retries up to 3 times on failure
- Better error handling for network issues
- More resilient in unstable network conditions
- Clearer error messages for license validation failures
Benefits:
- Reduced false-positive license errors
- Better user experience in poor network conditions
- Automatic recovery from temporary network issues
[1.0.45] - 2026-02-05
β¨ Position Tracking Enhancements
Position Type Improvements
New Fields for Closed Positions:
- ADDED:
exitPrice?: number | null- Tracks the exit price when a position is closed - ADDED:
closedAt?: string | null- Records the timestamp when a position was closed
Use Cases:
- Track historical position performance
- Calculate realized P&L accurately
- Maintain audit trail of closed positions
- Display position close time in trading history
Example:
const closedPosition: Position = {
// ... existing fields
side: "buy",
size: 0, // Closed position has zero size
exitPrice: 35500.5, // Price at which position was closed
closedAt: "2026-02-05T14:30:00Z", // ISO timestamp of closure
rPnl: 500.5, // Realized P&L
// ... other fields
};Benefits:
- Better position lifecycle management
- Improved trading history tracking
- Enhanced P&L reporting capabilities
- Clearer distinction between open and closed positions
π Migration Notes
These are optional fields - no breaking changes:
- Existing Position objects continue to work without these fields
- Add
exitPriceandclosedAtwhen closing positions for better tracking - Useful for maintaining position history and analytics
[1.0.43] - 2026-02-05
π§ Type System Improvements
Order and Position Type Refinements
Order Type Changes:
- CHANGED:
takeProfittype fromnumber | string | nulltonumber | null - CHANGED:
stopLosstype fromnumber | string | nulltonumber | null - ADDED:
parentOrderId?: stringfield to link TP/SL orders to their parent order
Position Type Changes:
- ADDED:
side: OrderSideas a required field (indicates buy/sell position)
Rationale:
- Improves type safety by removing ambiguous string values
- Enforces proper number parsing at input boundaries
- Makes Order and Position types more consistent
- Better TypeScript type checking and IDE autocomplete
Utility Function Updates
Default Trade Settings:
- CHANGED:
getTakeProfitFromDefaults()now returnsnullinstead of""when defaults are disabled - CHANGED:
getStopLossFromDefaults()now returnsnullinstead of""when defaults are disabled
Benefits:
- Consistent with updated type definitions
- Eliminates empty string edge cases
- Cleaner null handling in trading logic
π Migration Guide
For TypeScript Users
If youβre using TypeScript and have code that assigns string values to takeProfit or stopLoss:
// β Before (v1.0.42 and earlier)
const order: Order = {
// ... other fields
takeProfit: "", // Empty string no longer allowed
stopLoss: "", // Empty string no longer allowed
};
// β
After (v1.0.43+)
const order: Order = {
// ... other fields
takeProfit: null, // Use null for empty values
stopLoss: null, // Use null for empty values
};
// β
Or parse input values to numbers
const order: Order = {
// ... other fields
takeProfit: takeProfitInput ? parseFloat(takeProfitInput) : null,
stopLoss: stopLossInput ? parseFloat(stopLossInput) : null,
};For JavaScript Users
No breaking changes for JavaScript users, but we recommend:
// β
Best practice: Parse input values
const order = {
// ... other fields
takeProfit: takeProfitInput ? parseFloat(takeProfitInput) : null,
stopLoss: stopLossInput ? parseFloat(stopLossInput) : null,
};Position Side Field
All Position objects now require a side field:
const position: Position = {
// ... other required fields
side: "buy", // or "sell" - now required
// ... other fields
};[1.0.42] - 2026-02-04
β‘ Breaking Changes
appCallback Signature Change
The appCallback now receives a single event object instead of 3 separate parameters. This enables better type narrowing in switch/case statements.
// Before (v1.0.41): 3 parameters
appCallback: (eventType, message, onClose) => {
if (eventType === "PLACE_ORDER") {
console.log(message.order);
}
};
// After (v1.0.42): Single event object
appCallback: (event) => {
switch (event.eventType) {
case "CREATE_ORDER":
console.log(event.message.side); // β
message is CreateOrderMessage
break;
case "PLACE_ORDER":
console.log(event.message.order); // β
message is PlaceOrderMessage
break;
}
};Use destructuring for easier migration from old signature
appCallback: ({ eventType, message, onClose }) => {
switch (eventType) {
case "PLACE_ORDER":
console.log(message.order); // β
message is PlaceOrderMessage
break;
}
};π§ Type Improvements
New Event Types
- ADDED:
CREATE_ORDERevent type - Fired when user initiates order creation from chart UI - ADDED:
OPEN_TRADING_WIDGETevent type - Fired when trading widget is opened - ADDED:
CHART_SELECTEDevent type - Fired when a chart is selected in multichart mode
New Message Types
- ADDED:
CreateOrderMessage- Message forCREATE_ORDERevent withside,quantity,price,symbolfields - ADDED:
ClosePositionMessage- Message forCLOSE_POSITIONevent withposition,id,positionIdfields - ADDED:
CancelOrderMessage- Message forCANCEL_ORDERevent withorderfield - ADDED:
AppCallbackEventMapinterface - Maps each event type to its corresponding message type - ADDED:
AppCallbackEventdiscriminated union type - Enables switch/case type narrowing
AppCallbackEventType Cleanup
- REMOVED from union:
PLACE_BASKET_ORDER,GET_ACCOUNT_SUMMARY,CONNECT_BROKER,CREATE_ALERT,DELETE_ALERT,MODIFY_ALERT,OPEN_LAYERS,OPEN_OBJECT_PROPERTIES,OPEN_INDICATORS_MODAL - These event types are still available in
AppCallbackEventMapfor type narrowing but are not part of the primary union - REMOVED:
| (string & {})extensibility pattern - Event types are now strictly typed
OrderShapeUpdateType Additions
- ADDED:
DELETE_STOP_LOSS- Delete stop loss from order - ADDED:
DELETE_TAKE_PROFIT- Delete take profit from order
Order Type Additions
- ADDED:
trailingSLSpread?: number | null- Trailing stop loss spread value
ExcludeOptions Additions
- ADDED:
indicators?: string[]- Array of indicator types to exclude from indicators menu
ModifyPositionMessage Simplified
- UPDATED: Now contains
position: Positionand optionalid?: string - REMOVED:
modifications: Partial<Position>- No longer needed since modification details are in thepositionobject viaupdateandupdateTypefields
Removed Types
- REMOVED:
AppCallbackMessageunion type - Replaced by specific message types inAppCallbackEventMap
π Documentation Improvements
- ADDED: Comprehensive JSDoc examples for all message types (
PlaceOrderMessage,ModifyOrderMessage,ModifyPositionMessage,AlertMessage,DownloadDataMessage,UIEventMessage,CreateOrderMessage,ClosePositionMessage) - UPDATED:
appCallbackJSDoc with switch/case example showing type narrowing
ποΈ Internal Changes
- ADDED:
createChart.jswrapper that converts internal 3-param callback to single event object - CLEANUP: Removed trailing commas from function signatures for consistency
[1.0.41] - 2026-02-03
π§ Type Safety Improvements
Type-Safe Event Handler
- ADDED:
AppCallbackEventMapinterface - Maps each event type to its corresponding message type - UPDATED:
AppCallbackEventHandlernow uses generics for automatic type narrowing based oneventType - ADDED: JSDoc examples for all message types (
PlaceOrderMessage,ModifyOrderMessage,ModifyPositionMessage,AlertMessage,DownloadDataMessage,UIEventMessage)
New Event Types
- ADDED:
CREATE_ORDERevent type - Fired when user initiates order creation from chart UI - ADDED:
CLOSE_POSITIONevent type - Fired when user requests to close a position - ADDED:
OPEN_TRADING_WIDGETevent type - Fired when trading widget is opened
New Message Types
- ADDED:
CreateOrderMessagetype - Message forCREATE_ORDERevent withside,quantity,price,symbolfields - ADDED:
ClosePositionMessagetype - Message forCLOSE_POSITIONevent withposition,id,positionIdfields
// Before: Required manual type casting
appCallback: (eventType, message) => {
if (eventType === "PLACE_ORDER") {
const orderMsg = message as PlaceOrderMessage; // β Manual cast
console.log(orderMsg.order);
}
};
// After: Automatic type narrowing
appCallback: (eventType, message) => {
if (eventType === "PLACE_ORDER") {
console.log(message.order); // β
message is PlaceOrderMessage
} else if (eventType === "CANCEL_ORDER") {
console.log(message.orderId); // β
message is Order
}
};New Runtime Modification Types
- ADDED:
OrderTasktype - Distinguishes between"placement"and"modify"operations - ADDED:
OrderUpdateTypetype - Specifies modification type ("DELETE_SL","DELETE_TP","SHAPE_MODIFY","STANDARD") - ADDED:
OrderShapeUpdateTypetype - Specifies what aspect is being modified ("TAKE_PROFIT","NEW_TAKE_PROFIT","STOP_LOSS","NEW_STOP_LOSS","LIMIT_PRICE") - ADDED:
PositionUpdateTypetype - Always"SHAPE_MODIFY"for positions - ADDED:
PositionShapeUpdateTypetype - Position-specific modifications ("DELETE_STOP_LOSS","DELETE_TAKE_PROFIT","STOP_LOSS","NEW_STOP_LOSS","TAKE_PROFIT","NEW_TAKE_PROFIT")
Order Type Enhancements
- ADDED:
id?: string- Alternative order ID field for broker compatibility (useorder.orderId || order.id) - ADDED:
task?: OrderTask- Operation type for order placement vs modification - ADDED:
update?: OrderUpdateType- Modification type indicator - ADDED:
updateType?: OrderShapeUpdateType- Specific update type when modifying - ADDED:
defaultTradeSettings?: TradingConfig- Default trade settings applied to order - ADDED:
exitPosition?: boolean- Flag indicating order is closing an existing position
Position Type Enhancements
- ADDED:
update?: PositionUpdateType- Modification type indicator - ADDED:
updateType?: PositionShapeUpdateType- Specific update type when modifying TP/SL
New Chart State Types
- ADDED:
UserAuthenticatedtype - User auth state withid,name,emailproperties - ADDED:
ChartObjecttype - Drawing/indicator object withid,kind,type,appearance - ADDED:
SingleChartStatetype - Single chart pane withid,interval,objects - ADDED:
DrawingTemplateConfigtype - Template config keyed by HTML/template ID - ADDED:
DrawingTemplatestype - Templates collection keyed by drawing tool name - ADDED:
AlertConfigtype - Single alert withsymbol,price,condition,message - ADDED:
AlertsCollectiontype - Alerts collection keyed by symbol/ticker
ChartStateConfig & ChartState Improvements
- UPDATED:
appearancenow usesChartAppearanceConfiginstead ofRecord<string, unknown> - UPDATED:
chartsnow usesRecord<string, SingleChartState>for proper typing - UPDATED:
alertsnow usesAlertsCollectionfor proper typing - UPDATED:
drawingTemplatesnow usesDrawingTemplatesfor proper typing - UPDATED:
userAuthenticatednow usesUserAuthenticated | nullfor proper typing
π Fixed
Type Definition Fixes
- FIXED: Invalid character at beginning of
index.d.tsfile (\/**β/**) - FIXED: Duplicate identifier issues - Removed duplicate properties (
zoomAnchor,zoomMultiplier,interaction,bookSettings,tradeSettings) fromChartSettingstype - FIXED: React UMD global errors - Added proper React type imports (
import type * as React from "react")
[1.0.39] - 2026-02-02
π Fixed
Go To Date Navigation Bug
- FIXED: When using βGo To Dateβ to navigate to a date without data (e.g., Jan 1 when data starts Jan 31), panning left now correctly requests data from the first available candleβs date instead of the requested go-to date
- ROOT CAUSE: In
ChartWidget.jsx, the fallback forsession_datewas using the requested go-to date instead of the actual first candleβs timestamp - IMPACT: Eliminates gaps in data when panning after navigating to dates before available data
GoToModal Height Improvements
- FIXED: GoToModal now properly fits within the chart container without overflowing
- FIXED: Removed restrictive
maxHeighton modal-body that was limiting calendar visibility - UPDATED: Modal uses
flex: 1for body to expand and fill available space while keeping header and footer visible
[1.0.38] - 2026-02-02
β¨ Added
Automatic Rows Calculation for Duration-Based Data Fetching
- NEW:
calculateRowsFromTradingHoursfunction indataProvider.js- Automatically calculates the optimal number of bars (rows) to fetch based on:- Exchange trading hours (supports 24/7 markets and session-based markets)
- Market holidays (skips dates marked as holidays in
exchange_info.holidays) - Selected interval (1m, 5m, 1h, 1D, etc.)
- Date range from duration buttons (1D, 5D, 15D, 1M, 3M, 6M, 1Y, 5Y)
- UPDATED: Duration-based requests now pass calculated
rowsinperiodParamsinstead ofnull - UPDATED:
symbolInfo.exchange_infois now properly populated fromresolveSymbolresponse
Example Files Updated
- UPDATED: All example HTML files now use
rowsparameter efficiently:- When
rowsis provided: API called withend+limitonly (no redundantstartparameter) - When
rowsis not provided: Falls back tostart+enddate range
- When
- FILES:
codepen-advanced.html,codepen-advanced2.html,codepen-basic.html,codepen-basic-large.html,multi-basic.html,internationalization-demo.html,multichart-symbol-change-example.html,multichart-symbol-change-example-backup.html
π Usage
When implementing getBars callback, the periodParams now includes a calculated rows value:
getBars: async (symbolInfo, resolution, periodParams, onResult) => {
const { from, to, firstDataRequest, rows, duration } = periodParams;
if (duration && rows) {
// Use end + limit for efficient fetching
const url = `https://api.example.com/kline?symbol=${symbol}&end=${to.getTime()}&limit=${rows}`;
}
};[1.0.37] - 2026-01-30
β¨ Added
Datafeed Documentation
- NEW:
docs/api/datafeed.md- Comprehensive datafeed API documentation - ADDED: Detailed examples for implementing custom datafeeds
- ADDED: Best practices for data provider integration
Examples
- NEW:
examples/codepen-advanced2.html- Advanced integration example with new patterns - UPDATED:
examples/codepen-advanced.html- Enhanced with latest features - UPDATED:
examples/codepen-basic.html- Improved basic integration patterns - UPDATED:
examples/codepen-basic-large.html- Updated for consistency - UPDATED:
examples/multi-basic.html- Multi-chart example improvements - UPDATED:
examples/working-example.html- Working example with latest API - UPDATED:
examples/datafeed.js- Enhanced datafeed implementation
Internal Improvements
- NEW:
selectTickerForChart.js- New Redux module for ticker selection - UPDATED:
dataProvider.js- Enhanced data provider functionality - UPDATED:
ContextMenu.jsx- Improved context menu handling - UPDATED:
chartPageInitialState.js- Updated initial state configuration
π Documentation
Type Definitions
- FIXED:
TradingConfigtype definition - Removed non-existent properties - UPDATED:
TradingConfig@example inindex.d.ts- Shows only actual properties - UPDATED:
ChartConfig.trading@example - Comprehensive configuration example - REMOVED: Obsolete
TradingOptionsinterface from documentation
Configuration Documentation
- FIXED: All examples now use
trading.enableTradinginstead of root-levelenableTrading - FIXED: All examples now use
defaultInitialChartConfig.settings.showCrosshairPlusIcon - REMOVED: 153 lines of incorrect documentation for root-level properties
- UPDATED:
docs/api/configuration.md- Complete TradingConfig documentation with all actual properties - UPDATED:
docs/api/types.md- Accurate type definitions - UPDATED:
docs/guides/configuration.md- Correct configuration patterns - UPDATED:
docs/configuration/disableSearch.md- Fixed examples - UPDATED:
docs/tutorials/basic-integration.md- Correct property usage
SDK Config Overrides
- UPDATED:
docs/SDK_CONFIG_OVERRIDES.md- Replaced non-existent properties with actual ones - UPDATED:
docs/SDK_CONFIG_OVERRIDES_DETAILED.md- Accurate examples and tables - UPDATED:
docs/SDK_CONFIG_OVERRIDES_QUICK_REFERENCE.md- Correct quick reference
API Documentation
- UPDATED:
docs/api/README.md- Fixed initialization examples - UPDATED:
docs/api/chart.md- Corrected 2 configuration examples - UPDATED:
docs/api/trading.md- Fixed 3 examples and parameter table
JSDoc
- REMOVED:
@param {boolean} [config.enableTrading]fromcreateChart.js - REMOVED:
@param {boolean} [config.showCrosshairPlusIcon]fromcreateChart.js - UPDATED: JSDoc examples to show correct configuration structure
π Fixed
Documentation Cleanup - Removed Non-Functional Properties
- REMOVED:
enableTradingfrom rootChartConfigtype definition (was never functional - onlytrading.enableTradingworks) - REMOVED:
showCrosshairPlusIconfrom rootChartConfigtype definition (was never functional - onlydefaultInitialChartConfig.settings.showCrosshairPlusIconworks) - REMOVED: Non-existent
TradingConfigproperties from documentation:defaultBroker- This property never existed in the actual implementationdefaultSize- This property never existed in the actual implementationoneClickTrade- This property never existed in the actual implementationshowOrderPanel- This property never existed in the actual implementation
Note: These were documentation-only fixes. The actual working properties (trading.enableTrading and defaultInitialChartConfig.settings.showCrosshairPlusIcon) remain unchanged and fully functional.
Correct Usage (Always Worked):
const chart = createChart("#container", {
trading: {
enableTrading: true, // β
This always worked
showOpenOrders: true,
showPositions: true,
},
defaultInitialChartConfig: {
settings: {
showCrosshairPlusIcon: false, // β
This always worked
},
},
});Other Fixes
- FIXED: TypeScript IntelliSense now shows only properties that actually exist
- FIXED: Documentation consistency - All 10+ documentation files now use correct property locations
- FIXED: Removed duplicate
enableTradinginstances where both root andtrading.enableTradingwere shown - FIXED:
trading.enabledβtrading.enableTradingin basic-integration.md - FIXED: Removed non-existent
contextMenu.showTradingOptionsproperty
π Statistics
- Files Modified: 32 files across documentation, types, and examples
- Lines Removed: ~220 lines of incorrect documentation
- Lines Added: ~149 lines of correct documentation and examples
- Properties Removed: 4 non-existent properties from documentation
- Examples Fixed: 15+ code examples corrected
- Consistency: 100% - All documentation now matches TypeScript type definitions
[1.0.36] - 2026-01-29
β¨ Added
Trading Configuration
- NEW:
supportStopOrders: false- Disable Stop order options in context menus - NEW:
supportStopLimitOrders: false- Disable StopLimit order options in context menus
Duration-Based Data Fetching
- NEW:
durationproperty added toPeriodParamsingetBarscallback - NEW: When duration buttons (1D, 5D, 15D, 1M, 3M, 6M, 1Y, 5Y) are clicked,
periodParams.durationcontains the duration string - NEW:
firstDataRequest: falsewhen duration is provided, enabling date-range based fetching instead of limit-based - NEW:
getDateRangeForDuration()utility function exported from SDK for calculating start/end dates from duration strings - IMPROVED: Duration buttons now use explicit date ranges (
from/to) instead oflimit=200for more accurate data fetching
π Documentation
TypeScript Examples - Complete Rewrite
- UPDATED:
docs/examples/typescript.md- Complete rewrite with real production code - ADDED: MultiBasicChart component example from demo repository
- ADDED: Proper TypeScript type imports (
ChartInstance,ChartWrapper) - ADDED: React hooks patterns for chart lifecycle management
- ADDED: Symbol switching and resubscribe functionality examples
- ADDED: Complete CSS styling from demo repository
- ADDED: Common issues & solutions section with real-world fixes
- ADDED: Type-safe configuration examples
- REMOVED: Generic/placeholder examples replaced with actual working code
Demo Repository Integration
- ADDED: Demo repository link:
https://github.com/akshay2796/gocharting-sdk-demo - UPDATED:
README.md- Updated βTry the Demoβ section with new repository - UPDATED:
docs/examples/react-integration.md- Added demo repository reference - UPDATED:
docs/examples/typescript-integration.md- Added demo repository reference - UPDATED:
docs/tutorials/quick-start.md- Updated repository links - CLARIFIED: Demo repository is for examples only, not SDK source code
JSDoc Improvements
- ADDED:
src/utils/createChart.js- Missing JSDoc parameters - ADDED:
@param {boolean} [config.disableCompare]- Disable compare functionality - ADDED:
@param {TradingConfig} [config.trading]- Trading configuration object - ADDED:
@param {Object} [config.exclude]- Exclude indicators/features - ADDED:
@param {Function} [config.appCallback]- Application callback function - UPDATED: JSDoc example to include all configuration options
Configuration Documentation
- ADDED:
docs/api/configuration.md- Trading configuration in overview example - UPDATED: Configuration overview to show
tradingobject usage - IMPROVED: Code examples with complete configuration patterns
- REMOVED: βNOT YET IMPLEMENTEDβ sections (merged from remote)
- CLEANED: Focused documentation on implemented features only
Type Definitions Documentation
- VERIFIED:
src/types/index.d.ts- All types complete and accurate - VERIFIED:
docs/api/types.md- Synchronized with type definitions - VERIFIED:
TYPES.md- User-facing documentation up-to-date - CONFIRMED: All trading types (Order, Trade, Position) properly documented
- CONFIRMED:
securityfield usesSymbolInfo | SecurityInfounion type
Related Documentation Updates
- UPDATED:
docs/api/configuration.md- Related Documentation section - ADDED: References to TypeScript Definitions and Trading API
- ADDED: Links to Trading Integration and Basic Integration tutorials
- ORGANIZED: Documentation references into logical sections
- VERIFIED: All referenced files exist and are accessible
π§ Technical Changes
Git Repository Management
- MERGED: Remote branch changes with local documentation improvements
- RESOLVED: Merge conflicts in
docs/api/configuration.md - REMOVED: Duplicate βNOT YET IMPLEMENTEDβ sections from merge
- PRESERVED: Local additions for
enableTradingandtradingdocumentation - CLEANED: File reduced from 960 lines to 390 lines (focused content)
Package Updates
- UPDATED:
package.json- Version or dependency updates (minor)
π Statistics
- Files Modified: 11 files
- Lines Added: 869 lines
- Lines Removed: 397 lines
- Net Change: +472 lines
- Documentation Quality: Significantly improved with real examples
π― Key Improvements
- Real Production Code: Replaced generic examples with actual working code from demo repository
- Type Safety: Complete TypeScript examples with proper type imports and usage
- React Best Practices: Proper hooks, cleanup, and lifecycle management examples
- Demo Repository: Clear separation between SDK source and example repository
- Documentation Accuracy: Verified all docs match actual SDK implementation
- Comprehensive Examples: MultiBasicChart shows symbol switching, resubscribe, error handling
- Developer Experience: Common issues section helps developers solve real problems
π Links
- Demo Repository: https://github.com/akshay2796/gocharting-sdk-demoΒ
- Example Components: MultiBasicChart, ChartSDKAdvanced, AdvancedTradingPage
- Documentation: Complete TypeScript + React integration examples
[1.1.0] - 2025-01-XX
β¨ Added
π§Ή Resource Management & Cleanup
- NEW:
destroy()method for ProfessionalChart component - NEW: Comprehensive cleanup of tick subscriptions and WebSocket streams
- NEW: Automatic cleanup of event listeners and ResizeObserver
- NEW: Memory leak prevention for chart recreation scenarios
- NEW: Proper cleanup documentation and best practices
π Time Marks Support
- NEW: Complete time marks (chart events) implementation
- NEW:
getTimeMarks()method in DataProvider API - NEW: compatible time marks format support
- NEW: Hover tooltips with multi-line support
- NEW: Vertical dashed lines on hover
- NEW: Custom styling options (color, size, label)
- NEW: Professional tooltip design with colored borders
- NEW: Canvas state isolation to prevent style leakage
π¨ Enhanced User Experience
- NEW: Hover interactions with visual feedback
- NEW: Clean tooltip styling matching professional standards
- NEW: Responsive mark sizing based on importance
- NEW: Color-coded event types
- NEW: Single character labels in circles
π Documentation & Examples
- NEW: Comprehensive time marks documentation
- NEW: Interactive HTML demo with sample data
- NEW: API reference for
getTimeMarks() - NEW: Event handling documentation
- NEW: Real-world implementation examples
- NEW: Troubleshooting guide
π§ Technical Improvements
Canvas Rendering
- IMPROVED: Proper canvas state management with save/restore
- IMPROVED: Isolated drawing operations to prevent style conflicts
- IMPROVED: Optimized hit testing for time marks
- IMPROVED: Clean path management with beginPath/closePath
Event System
- IMPROVED: Enhanced hit testing with proper boundary detection
- IMPROVED: Hover state management
- IMPROVED: Event data structure for better extensibility
Data Processing
- IMPROVED: Dedicated
helperTimeMarksfunction for clean separation - IMPROVED: UDF format compatibility
- IMPROVED: Robust data validation with
isTimeMarkshelper - IMPROVED: Support for both
textandtooltipproperties
π Fixed
Canvas Issues
- FIXED: Red dotted border appearing around chart area on hover
- FIXED: Canvas positioning issues with AutoFit containers
- FIXED: Price axis margin calculations
- FIXED: Vertical line positioning accuracy
Resource Management
- FIXED: WebSocket subscription leaks when recreating charts
- FIXED: Multiple tick subscriptions for the same symbol
- FIXED: Memory leaks from uncleaned event listeners
- FIXED: ResizeObserver not being disconnected on chart destruction
- FIXED: Duplicate
componentWillUnmountmethods in ProfessionalChart
Data Handling
- FIXED: Undefined errors when processing time marks
- FIXED: Promise handling in DataProvider methods
- FIXED: Async/await compatibility issues
π API Changes
New Methods
// DataProvider
async getTimeMarks(symbolInfo, from, to, resolution)
// Chart Events (planned)
chart.onTimeMarkHover(callback)
chart.onTimeMarkClick(callback)New Data Formats
// Time Mark Object
{
id: string|number, // Unique identifier
time: number, // Unix timestamp in seconds
color: string, // CSS color
text: string|array, // Tooltip content
label: string, // Single character label
labelFontColor?: string, // Optional label color
minSize?: number // Optional circle size
}π― Usage Examples
Basic Time Marks
class MyDataProvider extends DataProvider {
async getTimeMarks(symbolInfo, from, to, resolution) {
return [
{
id: 1,
time: 1757193488,
color: "red",
text: ["Earnings Report", "Q3 2025"],
label: "E",
},
];
}
}Multi-line Tooltips
{
id: 2,
time: 1757539088,
color: 'blue',
text: [
'Product Launch',
'Revolutionary AI technology',
'Expected 25% revenue boost'
],
label: 'N',
minSize: 30
}π Migration Guide
From Previous Versions
- No breaking changes for existing implementations
- Time marks are optional - existing charts continue to work
- Add
getTimeMarks()method to enable time marks functionality
Recommended Updates
- Implement
getTimeMarks()in your DataProvider - Update documentation to include time marks examples
- Test hover interactions and tooltip display
- Verify canvas positioning with your layout
π Performance
Optimizations
- IMPROVED: Efficient hit testing with boundary calculations
- IMPROVED: Minimal canvas redraws for hover effects
- IMPROVED: Optimized event processing pipeline
- IMPROVED: Reduced memory allocation in drawing operations
π Browser Support
Tested Platforms
- β Chrome 90+
- β Firefox 88+
- β Safari 14+
- β Edge 90+
Canvas Features
- β Canvas 2D context with save/restore
- β Line dash patterns
- β Path management
- β Hit testing with mouse coordinates
[1.0.0] - 2024-12-XX
β¨ Initial Release
π Core Features
- NEW: Professional trading chart component
- NEW: Built-in AutoFit functionality
- NEW: Composition-based DataProvider API
- NEW: Real-time data support
- NEW: Multiple timeframes and intervals
- NEW: Technical indicators
- NEW: Drawing tools
- NEW: Custom themes
π Documentation
- NEW: Complete API documentation
- NEW: Quick start guide
- NEW: Framework integration examples
- NEW: Production deployment guide
π’ Commercial
- NEW: Commercial licensing
- NEW: Enterprise support
- NEW: White-label options
Legend
- β¨ Added: New features
- π§ Changed: Changes in existing functionality
- π Fixed: Bug fixes
- ποΈ Removed: Removed features
- π Security: Security improvements
- π Documentation: Documentation changes