@kumo-charts/vue
API 레퍼런스는 소스 코드의 주석에서 생성되며 영어로만 제공됩니다.
import { … } from '@kumo-charts/vue';
Functions
useKumoChartfunction소스
function useKumoChart<const M extends readonly ChartModule[] = readonly []>(
target: Ref<HTMLElement | null>,
options?: MaybeRefOrGetter<CreateChartOptions<M> | undefined>
): ShallowRef<Chart<M> | null>
Creates a chart inside target once it is mounted, with the modules of the options as they
are then, and destroys it on unmount. The other options and their changes are applied with
chart.applyOptions().
const container = useTemplateRef<HTMLDivElement>('container');
const chart = useKumoChart(container, { modules: [indicators(allIndicators)], locale: 'zh-CN' });Components
KumoChartcomponent소스
const KumoChart = defineComponent({ … })
Vue 3 component around createChart(). modules are read when the chart is created. Props
replace the chart's data, orders, markers or alerts whenever their value changes; every event of
the chart and its modules is re-emitted (e.g. @crosshair-move, @order-drag), plus @ready
with the chart instance. Stream real-time bars with chart.data.update(); manage indicators
and drawings through the instance and persist them with chart.saveState().
modules?: readonly ChartModule[]The chart's modules, such as [indicators(allIndicators)], read when it is created.
options?: ChartOptionsInput & Readonly<Record<string, unknown>>Applied with chart.applyOptions(), the options of the modules too.
data?: readonly BarInput[]Replaces all bars when the array or interval changes.
interval?: IntervalInputResolution of data, such as '1m'; needed for timeframe and chart.data.addTrades().
timeframe?: IntervalInput | nullThe displayed timeframe, such as '15m'; null shows the source resolution.
transform?: BarTransformInput | nullBuilds the displayed bars, e.g. { type: 'renko' }; null shows the timeframe's bars.
orders?: readonly OrderInput[]Needs the orders module.
markers?: readonly MarkerInput[]Needs the markers module.
alerts?: readonly AlertInput[]Needs the alerts module.
Types
KumoChartEventMaptype소스
type KumoChartEventMap = AllEventMap
The events of the chart and of its modules; those of a module the chart lacks never fire.
KumoChartEventNametype소스
type KumoChartEventName = keyof KumoChartEventMap
The name of an event of the chart or of one of its modules.
KumoChartPropstype소스
type KumoChartProps = ExtractPublicPropTypes<typeof kumoChartProps>
What KumoChart takes as props, for typing a wrapper or a props object.