Skip to content

React component

Props of <KLineChartWC>, generated from the React wrapper.

Generated from packages/react/src/KLineChartWC.tsx at the pinned commit.

KLineChartWC renders the <kline-chart> custom element and registers it on the client. It forwards the props below as attributes and listens for the two events; other Vue props are not exposed.

Props

PropTypeAttributeDescription
yPaddingPxnumbery-padding-pxVertical padding inside the price pane, in CSS pixels.
minKWidthnumbermin-k-widthNarrowest candle width when zoomed out, in CSS pixels.
maxKWidthnumbermax-k-widthWidest candle width when zoomed in, in CSS pixels.
rightAxisWidthnumberright-axis-widthWidth of the right price axis.
bottomAxisHeightnumberbottom-axis-heightHeight of the bottom time axis.
priceLabelWidthnumberprice-label-widthExtra width of the last-price label, used for the change percentage.
zoomLevelsnumberzoom-levelsNumber of zoom levels.
initialZoomLevelnumberinitial-zoom-levelZoom level at mount, from 1 to zoomLevels.
isFullscreenbooleanis-fullscreenControlled fullscreen state. Leave it unbound and the component manages fullscreen itself.
onZoomLevelChange(detail: { level: number; kWidth: number }) => void—Listens for zoom-level-change. Receives the event's detail, which Vue dispatches as the emit arguments [level, kWidth].
onToggleFullscreen() => void—Listens for toggle-fullscreen.
styleCSSProperties—Applied to the host element.
classNamestring—Applied to the host element.

On this page