score:1
Accepted answer
well, then you can use different ids for different charts.not even this every jquery or js plugin can be used like this.
<canvas id="yourid1" width="400" height="400"></canvas><canvas id="yourid2" width="400" height="400"></canvas>
var ctx = document.getElementById("yourid2");
var myChart = new Chart(ctx, {
type: 'bar',
data: {
labels:......///and so on for your another charts
var ctx = document.getElementById("yourid1");
var myChart = new Chart(ctx, {
type: 'bar',
data: {
labels:.......///not the complete code. just reference
same again with another id for different charts
<canvas id="yourid2" width="400" height="400"></canvas>
var ctx = document.getElementById("yourid2");
var myChart = new Chart(ctx, {
type: 'bar',
data: {
labels:......///and so on for your another charts
Source: stackoverflow.com
Related Query
- How can I load multiple Chartjs charts with different data on the same page?
- How to render multiple Chart.JS charts on the same page with AJAX data and variables
- multiple chartjs charts with the same configuration but different data
- Want to multiple charts on same page with different data
- How do I create multiple charts at the same page with angular?
- How to reuse a Chartjs Chart component in with different Data and get past the **Canvas is already in use** error?
- Trying to get multiple chart.js charts to load on the same page
- Two data sets with different time instances on the same ChartJs chart
- How I can add the predict data and the actual data in the same graph with ChartJS?
- How do I make many ChartJS charts on the same page to have the same height and also even column width?
- How to achieve the best possible performance with mutable data and real-time charts in React?
- chartjs - how to set the order in which the different charts are displayed
- How to properly feed data to ChartJS with different number of x(labels) and y(data) points
- When I added a funnel chart to chartjs all the charts are load compressed until resize page
- multiple charts js in page but with same tooltips (about last chart)
- How to add left padding for my charts done in ChartJs and my Google Map so it is not glued to the limit of the page on the left
- How can I pass the data into the chartjs label?
- ChartJS tooltip values aren't matching the data after updating multiple charts
- django + chart.js : Cannot get two bar charts on the same graph with appropriate data
- How to make multiple stacked charts to share the same yAxis?
- ChartJS - Graphic with multiple values on the same date
- How do I prevent Chartjs tooltip callback returning multiple instances of the same value?
- How can I set 3 color to the same chartjs bar?
- Multiple charts not loading on the same page
- How do I customize the chart.js tooltip? Two labels have the same data, which I want to show you with each data
- How to print multiple items with the same charts? any directions?
- Chartjs charts drawing with the same colour after update
- how to plot multiple time series in chartjs where each time series has different times
- Page with multiple chart.js charts to pdf
- ChartJS - Donut charts with multiple rings
More Query from same tag
- How to change X-axis interval in chart.js
- Populate colors on a Chart.js chart dynamically
- Find intersection between the chart lines in chartjs
- Read google sheet json data into chartjs
- Refreshing the image of a chart using chart.js
- beforeDraw in Chart JS 3.5.x
- How to show only the data points that have a change in Chartjs?
- Click every label onload ChartJS
- How can I keep label string length from affecting size of a Polar Area chart?
- vue-chartjs cannot display the labels and datasets
- drawing line chart with chartjs
- How can I make my backgroundColor in Chart.js match up with a reversed order y axis?
- I can't add data to chartjs from codeigniter
- Updating chart.js bar graph in real time
- chart.js show no charts in IE11
- How do you plot scatter graph with chart.js
- Show values on each arc doughnut Chart.js
- Round pie chart in rectangular canvas
- Chart.js and EJS: Display String, Not Calculation Result
- Why is chart.js not working with angular JS
- loading json file to create chart
- Chart JS, Choose different Y-axis for different datasets
- How to stop resizing chart.js in case hovered and out of boundaries?
- How to add tooltips to chart.js graph
- chart.js chart distorted with fixed width
- How do I incorporate Luxon timezone options with chart.js?
- Cannot read property 'getElementAtEvent' of undefined, Typescript
- Chartjs in format Line is full points
- chart.js remove on hover effect
- Enter an array of datasets into the dataset field of ChartJs