Open refjord opened 2 years ago
A clear and concise description of what the bug is.
Hi guys,
I'm trying to access the ref using a setup as described in the docs:
<template> <LineChart ref="chart" :chartData="data" :options="options" /> </template> <script lang="ts"> import { defineComponent, ref, onMounted } from "vue"; import { LineChart } from "vue-chart-3"; import { Chart, registerables } from "chart.js"; import gradient from "chartjs-plugin-gradient"; Chart.register(...registerables); export default defineComponent({ props: ["data"], name: "Chart", components: { LineChart }, setup() { const lineRef = ref(); onMounted(() => { console.log(lineRef.value); }) return lineRef; },
The value of ref always returns undefined. Is there something I'm missing?
vue-chart-3
3.1.8
same here
same
Describe the bug
A clear and concise description of what the bug is.
Hi guys,
I'm trying to access the ref using a setup as described in the docs:
The value of ref always returns undefined. Is there something I'm missing?
Version of
vue-chart-3
3.1.8
Version of Vue