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
- I want to hide the label in a tooltip because it shows undefined
- ChartJs 2 How to remove numbers from the doughnut chart on loading
- Chart.js: only show labels on x-axis for data points
- Charts.js - Bar chart different colors for value intervals not working
- Chart.js set Doughnut background-color?
- 'barradius' for Barchart in ChartJS is not working
- MongoDB based data is not populating in Chart.js
- Dynamically changing chartjs tick colours
- Chart.js, dashed line, full width chart
- Chart.js: Disable Y-Axis, when graph is disabled via Legend
- Fix ChartJS Values not Well Displayed
- How to remove gridlines and grid labels in Chartjs Radar?
- How to change orientation of the main y-axis label in charts.js?
- Bar chart is not grouped properly in chartjs
- Streaming Real-time data with react and chartjs-plugin-streaming paused
- How to unregister chartjs-plugin-labels globally?
- How to make animated bar graph with canvas?
- Css style not working well when resizing chart height in angular application
- how to show bar value on the top of each bar in chartjs
- Google charts: Error: Row 0 has 1 columns, but must have 2
- Remove x-axis label/text in chart.js
- Create a prop for a chart.js pie chart
- Chart.js not showing value on top of bars
- ChartJS v2 - Outer arc when hover on a pie/doughnut segment
- 2 or more charts on same page?
- Chart.js 2.x animation onComplete not responding
- Passing Data from Controller to ChartJS
- Chart.js Bar chart : display labels
- how to use chartJS to show breakdown of selected data
- Chart bundle js is not showing dynamic data