-
-
Notifications
You must be signed in to change notification settings - Fork 829
-
Hi,
I'm new to chartjs.
I want to ask is there an option to pass data as the documentation suggests?
like
<Bar v-if="chartData !== null" :data="chartData" :options="options" />
....
ChartJS.register(Title, Tooltip, Legend,BarController, BarElement, CategoryScale, LinearScale)
....
type: 'bar',
data: {
datasets: [{
data: [{ x: 'Sales', y: 20 }, { x: 'Revenue', y: 10 }]
}]
}
I tried to copy samples from the documentation because my implementation didn't work properly.
I get the error:
[Vue warn]: Unhandled error during execution of mounted hook
at <Anonymous ref=fn<reforwardRef> type="bar" data=
Object { type: "bar", data: {...} }
... >
at <Anonymous key=0 data=
Object { type: "bar", data: {...} }
options=
Object { scales: {...}, parsing: {...} }
>
at <Graphs>
at <VMain>
at <VApp>
at <VLayout>
at <VCard>
at <App>
at <App>
Uncaught TypeError: nextDatasets is undefined
setDatasets vue-chartjs.js:78
cloneData vue-chartjs.js:96
renderChart vue-chartjs.js:127
createHook chunk-SE5EWVSA.js:3455
callWithErrorHandling chunk-SE5EWVSA.js:1415
callWithAsyncErrorHandling chunk-SE5EWVSA.js:1423
__weh chunk-SE5EWVSA.js:3439
flushPostFlushCbs chunk-SE5EWVSA.js:1570
render2 chunk-SE5EWVSA.js:6141
mount chunk-SE5EWVSA.js:4791
mount chunk-SE5EWVSA.js:8688
<anonymous> main.ts:23
if so, what are the plugins required for that to work?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment