Skip to Content
Changelog

πŸ“‹ 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 0 on charts that are loading or mid-symbol-transition in a multi-chart layout
  • ROOT CAUSE: dataStore.getState().main is null/undefined while a chart panel is initialising. The destructuring let { ltp, bid, ask } = main threw a TypeError, drawOnCanvas exited silently, and pos stayed at its initial value of 0
  • FIX: Added optional chaining β€” const _main = dataStore.getState()?.main; let ltp = _main?.ltp β€” so all three values gracefully fall through to undefined and the existing direction-aware fallback chain (Position.bid/Position.ask at 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.ask were not populated from TradeMessage, the old chain fell back to DataModel.ltp (non-directional) before trying Position.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 via setBrokerAccounts) are now checked at step 2, before DataModel.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). Added bankersRound() using exponential notation to match Decimal.js toDecimalPlaces(2) behavior
  • FIXED: pnlMultiplier became stale between setBrokerAccounts calls for cross-currency instruments β€” added live pnlMultiplier field to TradeMessage so 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-container rect instead of viewport
  • FIXED: Color picker invisible in fullscreen mode β€” portaled to document.fullscreenElement instead of document.body
  • FIXED: Scrollbar visible when picker content fits within available space β€” removed unnecessary maxHeight when 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') in handleContextMenu on mobile single tap β€” added null guard e?.preventDefault()

Stacking Context Trapping Mobile Overlays

  • FIXED: isolation: isolate on the chart container created a stacking context that trapped all position: fixed descendants (bottom sheets, color pickers, context menus) β€” their z-index became local rather than global, rendering them behind the chart. Removed isolation: isolate from chart container and DraggablePopup
  • FIXED: Removed transform: translateZ(0) from DraggablePopup β€” CSS transforms create a containing block with the same trapping effect as isolation: isolate

Z-Index Normalization

  • IMPROVED: Replaced all z-index: 9999 values with a tiered system that avoids competing with host app navigation bars:
    • 10 β€” dropdowns, popovers, top bar, bottom bar, error overlays
    • 20 β€” drawing toolbar, layers panel
    • 30 β€” style pickers (stroke width, dash array, color pickers)
    • 50 β€” toasts
    • 1049/1050 β€” mobile bottom sheet overlays
    • 10001/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} but processAdditionalBars expected a raw bar array; added UDF-to-array conversion with proper ISO string date formatting in TimeSeriesFeedSDK.fetchMoreBarsFromDatafeed
  • FIXED: Cannot read properties of undefined (reading 'sessions') crash in DataModel.populateEndTimesMap during pan-left data processing β€” added null guard for sessionGroupToApply

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) returns constant(0.5), collapsing the Y-axis. Added zero-range domain guard in ChartDataModel and resetChart that 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 calling setBrokerAccounts again
  • ADDED: UPDATE_POSITIONS reducer in configureBrokerStore β€” merges partial position updates by key

Mobile Color Picker Redesign

  • FIXED: Color picker on mobile was not updating drawing color β€” handleClickOutside fired before color change registered; disabled on mobile
  • FIXED: Mobile color picker z-index stacking β€” portaled to document.body with z-index 10001/10002 to escape parent stacking context
  • FIXED: Hue slider change did not propagate to drawing β€” handleHueChange called setColorState instead of updateColor
  • FIXED: preventDefault inside passive touch event listener warning β€” switched to addEventListener with { passive: false } via refs
  • IMPROVED: Redesigned NativeColorPicker with 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 β€” handleSingleTap now checks isDragInProgress before deselection

Layout Sync Checkbox Crashes

  • FIXED: Cannot read properties of undefined (reading 'search') when toggling β€œSync All Symbols” β€” added location/history fallbacks for SDK mode (no React Router)
  • FIXED: head is not defined when toggling β€œSync Chart Types” β€” added missing import in SideBar.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: hidden on parent with CSS transform β€” 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/ask are used as fallback when DataModel bid/ask are null (before live TradeMessage data arrives)
  • ADDED: Position-level ltp fallback β€” when DataModel has no ltp and no bid/ask, options.info.ltp from 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 in DataModel.js updateStartOfSession2 β€” 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 β€” ChartDataModel now saves container width alongside viewport state and scales numberOfVisibleCandles proportionally when width changes significantly

[1.0.60] - 2026-03-26

✨ Added

Position & Order Visibility (hidden flag)

  • ADDED: hidden?: boolean field to the Position type β€” allows host apps to control per-position visibility on the chart
  • ADDED: SDK-side filtering for hidden orders and positions in handleBrokerStoreChanges β€” hidden items are excluded from chart drawings while remaining in the broker store data
  • ADDED: visible property on order/position drawings now respects the hidden flag (visible: showOpenOrders && !o.hidden for orders, visible: showPositions && !p.hidden for positions)
  • BACKWARD COMPATIBLE: If hidden is not set, behavior is identical to previous versions (!undefined === true)

Position Bid/Ask for Accurate P/L Calculation

  • ADDED: bid?: number | null and ask?: number | null fields to the Position type β€” 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 in DayBreak.jsx and DataModel.js when 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 β€” ChartDataModel now saves the container width alongside viewport state and scales numberOfVisibleCandles proportionally 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.bg4 instead of borderBackground β€” 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 brokerStore reducer now handles LAYOUT_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: auto with overscroll-behavior: contain
  • FIXED: touchmove handler on mobile overlay now only prevents scroll on the overlay background itself, allowing panel content to scroll
  • FIXED: Added touchstart listeners for click-outside dismissal on mobile for all dropdown controls

Modals Not Fixed to Viewport

  • FIXED: ConfirmAlert dialogs now always portal to document.body (or the fullscreen element) β€” removed fallback to overlap-manager-root which could be trapped inside CSS transform containers

Desktop Menu Rendered Underneath Positions Tab

  • FIXED: Top bar dropdown menus (Charts, Study, Templates, etc.) now render correctly β€” switched from position: fixed to position: absolute with container-relative coordinates
  • FIXED: Dropdown z-index increased to render above Positions tab and other overlays
  • FIXED: ChartDropdownContents changed to overflow-y: auto, allowing long dropdown lists to scroll
  • FIXED: Drawings side bar dropdown menus now use position: absolute with z-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 CSS transform stacking context

Settings Panel Overflows Chart Container

  • FIXED: Settings panel no longer extends below the chart container β€” maxHeight now 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 bid and ask fields to TradeMessage type for real-time trade data
  • ADDED: bid and ask getters to DataModel class 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:validate script β€” validates package.json has no self-referencing or link: dependencies before building
  • IMPROVED: build:watch:all:typed now uses --kill-others-on-fail to 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 the addOperand method

πŸ› 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.fg1 instead 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 required for 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 current downshift.setInputValue() API β€” prevents TypeError: 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 useIsMobile React hook using ResizeObserver with requestAnimationFrame to efficiently detect viewport changes without causing ResizeObserver loop errors
  • MIGRATED: All React components now use the useIsMobile hook instead of calling isMobileFunc() at module level β€” class components are wrapped with thin function component wrappers that pass isMobile as 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 wheel and touchmove event listeners block scroll propagation, and CSS touch-action: none with overscroll-behavior: contain prevents touch-based scroll bleed
  • FIXED: Side panel overlay now portals to document.body to escape CSS stacking contexts created by transform properties on ancestor elements

Context Menu Crash on Right-Click

  • FIXED: Right-clicking the chart area no longer throws ReferenceError: iconSize is not defined β€” ChartContextMenu was missing its local iconSize declaration 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 scroll event was firing on document instead of the menu element when the mouse wheel overflowed the menu, causing the scroll-close handler to trigger incorrectly. Fixed by adding if (!(e.target instanceof Element)) return guard

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-submenu attribute 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 β€” OHLCTooltip now correctly reads the isMobile state via the useIsMobile hook 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 useClickOutside and useScrollAndKeyboardClose handlers are now disabled on mobile, so only the explicit X button or overlay tap closes the menu

useIsMobile Resize Performance

  • IMPROVED: The useIsMobile hook now debounces resize events using requestAnimationFrame, eliminating redundant re-renders during window resize and preventing ResizeObserver loop warnings 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 contentRef visibility 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: SeriesContextMenu had a hard if (mouseXY == null) { return null } guard in its render path. On mobile, no mouse events ever fire, so mouseState.mouseXY is always null, causing the component to return null unconditionally and produce an empty sheet
  • FIX: Made mouseXY optional β€” yValue and x1Display are now computed only when mouseXY is available; the PnF vertical-count menu item is conditionally hidden when x1Display is 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.processAdditionalBars generated a request_id via requestIDManager.nextRequestID() but never registered it in originating_request_id. The _transform method’s TS/V2 handler 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 empty catch (error) {} block
  • FIX: Added this.originating_request_id.add(request_id) immediately after ID generation in processAdditionalBars β€” matching the pattern used by every other TS/V2 request 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 defined crash when touch-dragging a drawing vertex β€” the touch move handler referenced an undefined variable e instead of the correct event parameter

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: none on .gocharting-pin, .gocharting-yaxis, and .gocharting-xaxis to 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_id filter in TimeSeriesFeedSDK._transform() was disabled for the TS/V2 (SDK custom datafeed) code path, causing all getBars() 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 ChartWidget instances 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 isolation property 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.body on mobile, escaping the chart container’s CSS isolation stacking 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 useClickOutside hook 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 scroll and touchmove events

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: none on 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 DraggablePortal component 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 onClose callback passed in the appCallback event object was always undefined. Internal components (e.g., context menu) were passing onClose as a third argument, but the mediator layer was only accepting two parameters, silently dropping it. onClose now correctly propagates to the user’s callback for events like PLACE_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: none and overscroll-behavior: none on backdrop overlay to block scroll-through on iOS Safari
  • ADDED: overscroll-behavior: contain on 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: false to 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 localStorage immediately when changed, independent of the autoSave setting
  • 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 themeColor changes, 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 + 10 padding 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:deps script now automatically builds @gocharting/chart-widget and @gocharting/technical-indicators packages
  • IMPROVED: Integrated dependency builds into prebuild:webpack and prebuild:vite scripts

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 globalCompositeOperation and globalAlpha to 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 returns MultiChartInfo object

Returns:

  • isMultichartingEnabled: boolean indicating if multicharting is active (layout !== β€œ1”)
  • charts: array of ChartSelectedMessage objects 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 false for 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 dir attribute
  • βœ… 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 exitPrice and closedAt when 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: takeProfit type from number | string | null to number | null
  • CHANGED: stopLoss type from number | string | null to number | null
  • ADDED: parentOrderId?: string field to link TP/SL orders to their parent order

Position Type Changes:

  • ADDED: side: OrderSide as 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 returns null instead of "" when defaults are disabled
  • CHANGED: getStopLossFromDefaults() now returns null instead 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; } };
Tip

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_ORDER event type - Fired when user initiates order creation from chart UI
  • ADDED: OPEN_TRADING_WIDGET event type - Fired when trading widget is opened
  • ADDED: CHART_SELECTED event type - Fired when a chart is selected in multichart mode

New Message Types

  • ADDED: CreateOrderMessage - Message for CREATE_ORDER event with side, quantity, price, symbol fields
  • ADDED: ClosePositionMessage - Message for CLOSE_POSITION event with position, id, positionId fields
  • ADDED: CancelOrderMessage - Message for CANCEL_ORDER event with order field
  • ADDED: AppCallbackEventMap interface - Maps each event type to its corresponding message type
  • ADDED: AppCallbackEvent discriminated 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 AppCallbackEventMap for 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: Position and optional id?: string
  • REMOVED: modifications: Partial<Position> - No longer needed since modification details are in the position object via update and updateType fields

Removed Types

  • REMOVED: AppCallbackMessage union type - Replaced by specific message types in AppCallbackEventMap

πŸ“ Documentation Improvements

  • ADDED: Comprehensive JSDoc examples for all message types (PlaceOrderMessage, ModifyOrderMessage, ModifyPositionMessage, AlertMessage, DownloadDataMessage, UIEventMessage, CreateOrderMessage, ClosePositionMessage)
  • UPDATED: appCallback JSDoc with switch/case example showing type narrowing

πŸ—οΈ Internal Changes

  • ADDED: createChart.js wrapper 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: AppCallbackEventMap interface - Maps each event type to its corresponding message type
  • UPDATED: AppCallbackEventHandler now uses generics for automatic type narrowing based on eventType
  • ADDED: JSDoc examples for all message types (PlaceOrderMessage, ModifyOrderMessage, ModifyPositionMessage, AlertMessage, DownloadDataMessage, UIEventMessage)

New Event Types

  • ADDED: CREATE_ORDER event type - Fired when user initiates order creation from chart UI
  • ADDED: CLOSE_POSITION event type - Fired when user requests to close a position
  • ADDED: OPEN_TRADING_WIDGET event type - Fired when trading widget is opened

New Message Types

  • ADDED: CreateOrderMessage type - Message for CREATE_ORDER event with side, quantity, price, symbol fields
  • ADDED: ClosePositionMessage type - Message for CLOSE_POSITION event with position, id, positionId fields
// 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: OrderTask type - Distinguishes between "placement" and "modify" operations
  • ADDED: OrderUpdateType type - Specifies modification type ("DELETE_SL", "DELETE_TP", "SHAPE_MODIFY", "STANDARD")
  • ADDED: OrderShapeUpdateType type - Specifies what aspect is being modified ("TAKE_PROFIT", "NEW_TAKE_PROFIT", "STOP_LOSS", "NEW_STOP_LOSS", "LIMIT_PRICE")
  • ADDED: PositionUpdateType type - Always "SHAPE_MODIFY" for positions
  • ADDED: PositionShapeUpdateType type - 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 (use order.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: UserAuthenticated type - User auth state with id, name, email properties
  • ADDED: ChartObject type - Drawing/indicator object with id, kind, type, appearance
  • ADDED: SingleChartState type - Single chart pane with id, interval, objects
  • ADDED: DrawingTemplateConfig type - Template config keyed by HTML/template ID
  • ADDED: DrawingTemplates type - Templates collection keyed by drawing tool name
  • ADDED: AlertConfig type - Single alert with symbol, price, condition, message
  • ADDED: AlertsCollection type - Alerts collection keyed by symbol/ticker

ChartStateConfig & ChartState Improvements

  • UPDATED: appearance now uses ChartAppearanceConfig instead of Record<string, unknown>
  • UPDATED: charts now uses Record<string, SingleChartState> for proper typing
  • UPDATED: alerts now uses AlertsCollection for proper typing
  • UPDATED: drawingTemplates now uses DrawingTemplates for proper typing
  • UPDATED: userAuthenticated now uses UserAuthenticated | null for proper typing

πŸ› Fixed

Type Definition Fixes

  • FIXED: Invalid character at beginning of index.d.ts file (\/** β†’ /**)
  • FIXED: Duplicate identifier issues - Removed duplicate properties (zoomAnchor, zoomMultiplier, interaction, bookSettings, tradeSettings) from ChartSettings type
  • 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 for session_date was 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 maxHeight on modal-body that was limiting calendar visibility
  • UPDATED: Modal uses flex: 1 for 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: calculateRowsFromTradingHours function in dataProvider.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 rows in periodParams instead of null
  • UPDATED: symbolInfo.exchange_info is now properly populated from resolveSymbol response

Example Files Updated

  • UPDATED: All example HTML files now use rows parameter efficiently:
    • When rows is provided: API called with end + limit only (no redundant start parameter)
    • When rows is not provided: Falls back to start + end date range
  • 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: TradingConfig type definition - Removed non-existent properties
  • UPDATED: TradingConfig @example in index.d.ts - Shows only actual properties
  • UPDATED: ChartConfig.trading @example - Comprehensive configuration example
  • REMOVED: Obsolete TradingOptions interface from documentation

Configuration Documentation

  • FIXED: All examples now use trading.enableTrading instead of root-level enableTrading
  • 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] from createChart.js
  • REMOVED: @param {boolean} [config.showCrosshairPlusIcon] from createChart.js
  • UPDATED: JSDoc examples to show correct configuration structure

πŸ› Fixed

Documentation Cleanup - Removed Non-Functional Properties

  • REMOVED: enableTrading from root ChartConfig type definition (was never functional - only trading.enableTrading works)
  • REMOVED: showCrosshairPlusIcon from root ChartConfig type definition (was never functional - only defaultInitialChartConfig.settings.showCrosshairPlusIcon works)
  • REMOVED: Non-existent TradingConfig properties from documentation:
    • defaultBroker - This property never existed in the actual implementation
    • defaultSize - This property never existed in the actual implementation
    • oneClickTrade - This property never existed in the actual implementation
    • showOrderPanel - 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 enableTrading instances where both root and trading.enableTrading were shown
  • FIXED: trading.enabled β†’ trading.enableTrading in basic-integration.md
  • FIXED: Removed non-existent contextMenu.showTradingOptions property

πŸ“Š 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: duration property added to PeriodParams in getBars callback
  • NEW: When duration buttons (1D, 5D, 15D, 1M, 3M, 6M, 1Y, 5Y) are clicked, periodParams.duration contains the duration string
  • NEW: firstDataRequest: false when 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 of limit=200 for 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 trading object 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: security field uses SymbolInfo | SecurityInfo union type
  • 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 enableTrading and trading documentation
  • 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

  1. Real Production Code: Replaced generic examples with actual working code from demo repository
  2. Type Safety: Complete TypeScript examples with proper type imports and usage
  3. React Best Practices: Proper hooks, cleanup, and lifecycle management examples
  4. Demo Repository: Clear separation between SDK source and example repository
  5. Documentation Accuracy: Verified all docs match actual SDK implementation
  6. Comprehensive Examples: MultiBasicChart shows symbol switching, resubscribe, error handling
  7. Developer Experience: Common issues section helps developers solve real problems

[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 helperTimeMarks function for clean separation
  • IMPROVED: UDF format compatibility
  • IMPROVED: Robust data validation with isTimeMarks helper
  • IMPROVED: Support for both text and tooltip properties

πŸ› 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 componentWillUnmount methods 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
  1. Implement getTimeMarks() in your DataProvider
  2. Update documentation to include time marks examples
  3. Test hover interactions and tooltip display
  4. 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
Last updated on