Skip to content

Web Component

The <kline-chart> custom element: attributes, properties and events.

Generated from packages/vue/src/web-component.ts at the pinned commit.

The element is <kline-chart>, built with Vue's defineCustomElement and rendered in a shadow root. Primitive props are reflected as kebab-case attributes; arrays and objects must be set as JavaScript properties. Events are CustomEvents whose detail is the array of emit arguments; each is dispatched under its camelCase and kebab-case name.

Props

AttributePropertyTypeDefault
—symbolsReadonlyArray<SymbolSpec>—
—indicatorsReadonlyArray<ChartIndicatorConfig>—
—customMarkersReadonlyArray<CustomMarkerEntity>—
—marketSessionsChartMountOptions['marketSessions']—
y-padding-pxyPaddingPxnumber20
min-k-widthminKWidthnumber1
max-k-widthmaxKWidthnumber50
right-axis-widthrightAxisWidthnumber0
left-axis-widthleftAxisWidthnumber—
bottom-axis-heightbottomAxisHeightnumber24
price-label-widthpriceLabelWidthnumber60
zoom-levelszoomLevelsnumber20
initial-zoom-levelinitialZoomLevelnumber3
is-fullscreenisFullscreenboolean—
timezonetimezonestring'Asia/Shanghai'
—settingsPartial<ChartSettings>—
—legendLegendOptions—
—customDataCustomDataSource—

Events

Eventdetail
zoom-level-change[level: number, kWidth: number]
toggle-fullscreen[]
update:is-fullscreen[value: boolean]
theme-change[theme: 'light' | 'dark']
k-line-level-change[level: string]
k-line-adjust-change[adjust: 'qfq' | 'hfq' | 'splits' | 'none']
controller-ready[controller: ChartController]

On this page