score:1
Accepted answer
the problem is with extra datasets params xaxisid
and yaxisid
.
it seems they're not set correctly, so when vue-charts tries getting references to those dom elements, it gets undefined
, thus the error.
you should either remove those params, or add those elements (via options or manually)
here is a working version of the app
ps: also, if you need to get a random number from the interval [-100, 100], you should use math.round(math.random() * 200) - 100
.
in your version, it always returns either 1, or 0 (because math.random takes no parameters and always returns a value between 1 and 0)
Source: stackoverflow.com
Related Query
- Unable to draw a scatter chart with vue-charts
- Vue Chart 3 - Doughnut Charts with Text in the Middle (Trouble registering a plugin)
- Unable to get chartjs to draw a chart with dynamic data (variable not hardcoded)
- ChartJS - Draw chart with label by month, data by day
- How do I draw a vertical line on a horizontal bar chart with ChartJS?
- Chart.js - Draw bar chart with multiple labels
- Can we draw a Line Chart with both solid and dotted line in it?
- Mixed chart scatter plot with chart.js
- How to draw a chart with Chart.JS?
- Chart.js - Draw charts with opposite bars - How to set both the y-axis ends to positive number?
- Chart JS : Getting issue with draw bar chart
- Vue Chart.js Doughnut Chart with rounded and spaced arcs (vue3-chart-v2)
- Flask with Chart JS Scatter Plot struggle
- How to make dynamic chart using Vue component with chart-js
- Chart.js : Controller for Scatter chart doesn't work for draw function
- Angular 10 - Chart.js to draw chart in Array with convas id on runtime
- Unable to create Stacked Grouped Bar Chart with chart.js / react-chartjs-2 in React
- Draw y-axis inside the graph area with chart js
- what is wrong with my code ? java script chart position
- chartjs-plugin-dragdata isn''t working with scatter charts
- Draw multiple chart in one page with Chart.js
- Chart.js unable to render the chart with data reactjs
- How to create a chart.js scatter chart with data from two lists
- Chart.js Draw a Stacked Bar Chart with Limit Line
- I am using chart js to draw a chart. I did everything right but i don't know why the x axis and y axis label is not comming in chart. code below
- Draw stacked horizontal bar chart with Average line using ChartJS
- Chart changes different on zoom when using multiple charts with chart.js and flask
- Unable to hide x axis for horizontal bar chart vue js
- Charts with previous data appear when hovering the cursor over the chart in Chart.js
- Background color does not work when trying to create my data before using scatter chart with chart.js
More Query from same tag
- Render Chart on second template by clicking icon on the first template
- ChartJS tooltip when having multiple lines on a time graph
- How do I increase the space between the Legend and the Chart when using angular-chart.js?
- How to create a gantt chart using Chart.js and populate dates?
- How to Sum values from different objects in Django?
- ChartJS pie chart, "filling" each segment to indicate another dimension
- Return List<object> from webservice
- How to use chartjs-plugin-datalabels for specific charts using vue-chart.js
- Bar Chart in Angular JS Using Chartjs
- How can I create a long tail chart with chart.js
- Passing data to highcharts from javascript array or variable
- Changing cursor to pointer on Chart.js bar chart when hover (mousemove) event is disabled?
- Width and Height in Chart.js
- HTML tags enable in Default tooltip labels in chart.js
- ChartJS set styling on the last point only
- chart.js filltext object moved when tooltip is generated because of legend not displaying
- Chart.js Legend Padding-Left
- Ng2-Charts Linechart only showing first 2 two values
- django 'LineChart' object has no attribute 'get'
- How to prevent tick labels from "jumping" when drawn with ChartJS BeforeDraw
- Single Stacked bar with three sections in Angular
- Angular 2 ng2-charts doughnut text in the middle disappears on mouse hover
- Syntax error : Cannot use import statement outside a module in Vue2 chart js
- Chart JS, backgroundColor not showing
- ChartJS and Flask, how to pass data?
- Chartjs - how to make line position to vertical center and how to display dotted sharp in the backround?
- Set Scope in Angular-Charts.js after rendering
- Is it possible to have tick stepSize for each dataset in Chart.js?
- How to display the labels in doughnut chart using ng2 charts?
- Chartjs: Need help on drawing a vertical line when hovering cursor