@rekurt/openkline-vue

Vue 3 wrapper for @rekurt/openkline-core — component and useOHLCVChart composable.
205 1
Install
npm install @rekurt/openkline-vue
Latest Version:0.1.0
Vue:3
License:MIT
Last Updated:Oct 9, 2026
Links: GitHub  ·  npm
Maintainer: rekurt

@rekurt/openkline-vue

Vue 3 wrapper for OpenKline

An idiomatic <OHLCVChart> component and a useOHLCVChart composable — full API parity with the framework-agnostic @rekurt/openkline-core charting engine.

CI License: MIT Vue TypeScript


Ecosystem

Package Repository Role
@rekurt/openkline-core rekurt/openkline Engine: rendering, data, interaction, indicators, drawings.
@rekurt/openkline-react rekurt/openkline-react React 18+/19 wrapper.
@rekurt/openkline-vue this repo Vue 3 wrapper.

Install

npm install @rekurt/openkline-core@^0.2.0 @rekurt/openkline-vue

For development from a repository checkout, this repo uses a tested core 0.2.0 tarball at vendor/rekurt-openkline-core.tgz. Application installations use the npm peer dependency shown above.


Usage

<script setup lang="ts">
import { ref } from 'vue';
import { OHLCVChart } from '@rekurt/openkline-vue';
import type { Candle, IndicatorConfig } from '@rekurt/openkline-core';

defineProps<{ candles: Candle[] }>();

const chartRef = ref<InstanceType<typeof OHLCVChart>>();
const indicators = ref<IndicatorConfig[]>([
  { type: 'sma', period: 20 },
  { type: 'rsi', period: 14 },
]);

function goLive() {
  chartRef.value?.goToLive();
}
</script>

<template>
  <div style="width: 100%; height: 600px">
    <OHLCVChart
      ref="chartRef"
      symbol="BTC/USDT"
      resolution="1H"
      :data="candles"
      theme="auto"
      chart-type="candles"
      v-model:indicators="indicators"
      @hover="(info) => console.log('hovered', info?.index)"
      @error="(err) => console.error('[openkline]', err)"
    />
    <button @click="goLive">Go live</button>
  </div>
</template>

The useOHLCVChart composable is exported for callers that want to manage the chart instance imperatively instead of through the component.


Why a wrapper, not a rewrite

All chart logic lives in @rekurt/openkline-core. This package owns only the Vue glue — mounting the canvas, syncing reactive props to engine calls, and exposing the instance. That is why it tracks the core's features automatically and stays at full API parity with the vanilla and React entry points.


Development

npm install          # installs deps incl. the vendored core tarball
npm run build        # tsup → dist/ (esm + cjs + d.ts)
npm test             # vitest (jsdom)
npm run lint         # ESLint, --max-warnings 0
npm run typecheck    # strict tsc (run after build — example needs dist/)
npm run dev:example  # vite demo app → http://localhost:5175
npm run update:core  # refresh vendor/rekurt-openkline-core.tgz from the monorepo

The example/ workspace is a full-featured Vite demo (drawing tools, indicators, live simulation, Heikin-Ashi/Renko transforms, PNG export).


License

MIT © OpenKline contributors

Related Packages

@tradecanvas/vue

Vue 3 component for @tradecanvas/chart — reactive props, template ref, zero boil...

2,250 27
tradingraph

Based on rpiontik chart https://github.com/rpiontik/crypto-chart

1,152 0
vue-chartjs-financial

Financial (Candlestick/Ohlc) charts with chartjs.org and npm package vue-chartjs

3,033 7
vue-canvas-gauges

Canvas gauges component is based on canvas-gauges for Vue

2,723
vue2-canvas-gauges

Canvas gauges component is based on canvas-gauges for Vue2

1,034

Version History

Version Released Vue License
0.1.0 >=3.3 MIT
Pre-releases (1)
Version Released License
0.0.0-stage