Repository navigation
Releases
v1.0.2
Bumps klinecharts to ^10.1.0. No breaking API changes. Upstream release notes: https://github.com/klinecharts/KLineChart/releases/tag/v10.1.0
Added
- New reactive prop
layoutOptions?: DeepPartial<Layout>on<KLineChart>, forwarded to the new klinecharts 10.1.0setLayoutOptions()instance method (updates default layout options after initialization). The matchinggetLayoutOptions()is available on the chart instance viaref/useKLineChart.
Changed
- Bumped
klinechartsto^10.1.0(root + docs). Upstream additions:setLayoutOptions()/getLayoutOptions()instance methods, and callbacks (CompareColorCallback) for dynamically assigning colors to candlesticks, indicator OHLC bars, and last-price lines/labels — the color-callback types flow through transparently viaexport * from "klinecharts". Upstream optimizations and fixes: time-axis tick generation now selects and caches ticks by time hierarchy (display stability + scrolling performance); fixes forscrollByDistanceconflicting with an active fling-scroll animation, axis scrolling/scaling stopping when the pointer leaves the axis while dragging, rapid-click sequence detection, logarithmic y-axis labels and coordinate conversion for ranges containing negative/zero/sub-1 prices, and duplicate overlay y-axis labels on non-default axes in multi-axis panes. - Updated
minimumReleaseAgeExcludeinpnpm-workspace.yamltoklinecharts@10.1.0so fresh upstream releases pass the CI install policy. - Expanded the test mock (
mockChart.ts) withsetLayoutOptions/getLayoutOptionsstubs, and covered thelayoutOptionsprop forwarding in the reactive-props test.
Verified: typecheck, lint, 26 tests, and a clean build all pass.
v1.0.1
Bumps klinecharts to ^10.0.1. The 10.0.1 release is a bugfix/quality release — no breaking API changes or new APIs. Upstream improvements include smoother mobile inertial scrolling, better touch handling (prevents page scrolling/browser gestures while dragging), area chart ripple lifecycle fixes, and canvas rendering scheduling/DPR handling. Bug fixes cover the built-in PVT indicator formula, rgbToHex channel handling, hsla/transparent color regex validation, and declaration-file builds.
Changed
- Bumped
klinechartsto^10.0.1(root + docs). The only type-level change upstream is an internal refactor ofIndicatorFigureStyle(extractedIndicatorFigureStyleBase), which the wrapper does not reference directly, soexport * from "klinecharts"continues to forward it transparently. - Removed the stale
docs/pnpm-lock.yaml; the docs project is a workspace member governed by the rootpnpm-lock.yaml.
Verified: typecheck, lint, 26 tests, and a clean build all pass.
v1.0.0
First stable release. Targets the klinecharts 10.0.0 stable release and ships a full Starlight documentation site.
Breaking
- Upgraded to the klinecharts 10.0.0 stable release. The
createIndicatorinstance API changed fromcreateIndicator(value, options)tocreateIndicator(value, isStack)—paneId/yAxisIdare now properties of theIndicatorCreatevalue itself.useIndicatorwas rewritten accordingly. useIndicatornow returns the indicator id instead of the pane id (klinecharts v10 returns an indicator id fromcreateIndicator).- The
pane/paneOptionsoptions of<KLineChart.Indicator>/useIndicatorare nowPartial<PaneOptions>(applied viasetPaneOptions) to match the new klinecharts v10setPaneOptionssignature. This restores thepane={{ height: 80 }}shorthand that became invalid after thePaneOptionstype gained required fields.
Added
- New
<KLineChart.YAxis>declarative sub-component anduseYAxis(options)hook for managing standalone Y axes, leveraging klinecharts v10's multi-YAxis support (createYAxis/removeYAxis). - New
useYAxes(filter?)reactive hook that readschart.getYAxes()and re-renders on visible-range change (mirrorsusePane).
Changed
- Bumped
klinechartsto^10.0.0. useIndicatornow applies thepaneoption live viasetPaneOptions(targeting the indicator's pane id) and theyAxisoption viaoverrideYAxis(sincecreateIndicatoralready creates the axis,createYAxiswould be a no-op). Recreating the indicator only triggers on identity changes (name,isStack,pane.id), not on pane-option tweaks.- Expanded the test mock (
mockChart.ts) withcreateYAxis,removeYAxis,getYAxes, and a realisticgetIndicatorsstub so the indicator pane/yAxis wiring can be exercised in tests.
Documentation
- Added a full Starlight documentation site in
docs/(28 pages: getting started, guides, component & hook reference). It includes a live, interactive chart demo migrated from the oldexample/app. - Removed the standalone
example/Vite app — its demo now lives in the docs site (docs/src/components/demo/). - Removed the dead duplicate
UseIndicatorOptions/UseOverlayOptionsinterfaces fromsrc/types.ts(the canonical versions live next to their hooks).
v0.3.0
Breaking
- Renamed the
onScrollprop toonChartScroll. The old name collided with the native DOMonScrollhandler that is passed through to the container element. The chart scroll action is unaffected; only the React callback prop changed.
Added
- Strongly typed event callbacks.
onCrosshairChangenow receives aCrosshair,onCandleBarClickaKLineData,onZoom/onChartScrolltheir{ scale }/{ distance }payloads, etc. ExposedActionPayloadMapandTypedActionCallback<T>helper types. - New reactive props:
hotkey(setHotkey),xAxis(overrideXAxis),yAxis(overrideYAxis). - New hooks:
useCrosshair,useVisibleRange,useBarSpace,useDataList,usePanefor reactive chart state. subscribeChartAction(chart, type, handler)internal helper exported for advanced consumers.<KLineChart.Widget>now retries resolving the target DOM node on the next animation frame when the pane is not laid out yet.- Vitest smoke test suite covering lifecycle (incl. StrictMode), reactive props, hooks, typed events, and indicator/overlay lifecycle.
Fixed
dataprop no longer recreates the internal data loader wrapper on every render; the array identity is now the effect dependency andmoreis passed as{ forward: false, backward: false }.zoomAnchoris now forwarded to klinecharts unchanged instead of imposing default{ main: "cursor", xAxis: "cursor" }values.useIndicator/useOverlayno longer issue a redundantoverrideIndicator/overrideOverlaycall immediately after creation.useIndicatornow recreates the indicator whenpaneoryAxischange (klinecharts has no API to reassign them post-creation).- Removed a dead StrictMode guard and the redundant external
ResizeObserver(klinecharts v10 manages its own). useChartEventcallback parameter is now typed viaTypedActionCallback<T>.
Changed
- Cleaned up duplicate type re-exports in
src/types.ts(now only defines React-specific types; klinecharts types still flow throughexport * from "klinecharts"). - Removed unused dev dependencies (
@typescript-eslint/eslint-plugin,@typescript-eslint/parser). - Dropped the
prepare: npm run buildscript sopnpm installno longer triggers a full build in CI. tsconfig.jsonnow type-checkstests/as well; raisedlibtoES2022.
v0.2.1
Changed
- Bumped
klinechartsto^10.0.0-beta3. No public API changes in this wrapper.
Note
- klinecharts
beta3adjusts the RSI indicator calculation, so RSI values may differ frombeta2. It also adds custom hot keys and a continuous drawing mode (with a built-inbrushtool), plus fixes for overlay scrolling,createOverlayrestoration, backward data-loading callbacks, and theresizemethod.
v0.1.0
First public release.
Added
<KLineChart>core component for wrappingklinechartsv10 beta API.- Support for declarative simple data using the
data: KLineData[]prop. - Declarative sub-components for dynamic chart composition:
<KLineChart.Indicator>,<KLineChart.Overlay>, and<KLineChart.Widget>. - React Hooks for imperative instances (
useKLineChart), event subscriptions (useChartEvent). - Independent UI lifecycle management utilizing React
useId()for preventing excessive redrawing. - Re-exports of all underlying TypeScript interfaces and typings from
klinecharts.
Fixed
- Action subscriptions lifecycle preventing early returns explicitly dropping callbacks.
- Hook dependency loops regenerating overly aggressive chart components upon parameter override natively.
v0.2.0
Changed
- Bumped
klinechartsto^10.0.0-beta2. - Aligned
createIndicatorusage with the new v10 signaturecreateIndicator(value, options), whereisStack,pane, andyAxisare grouped into a single options object. - Renamed the
<KLineChart.Indicator>/useIndicatorpaneOptionsprop topaneto match KLineCharts v10. The oldpaneOptionsname still works as a deprecated alias.
Added
yAxis(YAxisOverride) option on<KLineChart.Indicator>/useIndicatorfor per-indicator Y axis overrides.