score:0
the following line is redundant.
var ctx = document.getelementbyid($this.attr('id'));
instead, the $this
variable is already a pointer to the element.
meaning - you can do:
var plot = new chart($this, {
type: 'line',
data: data,
});
my guess is that php is not creating two different id's, and javascript is left confused.
Source: stackoverflow.com
Related Query
- Displaying multiple line graphs on one page
- Multiple Graphs on one page
- ChartJS Line Graph - Multiple Lines, Show one Value on Tooltip
- Chart.js - displaying multiple line charts using multiple labels
- Multiple charts in one page with chart.js
- Chart.js - Creating multiple charts on one page
- Chartjs.org Chart only displaying in one page
- Displaying line chart for multiple months using chart.js
- Angular 5, Chart.js displaying multiple charts, one on each tab
- Chart.js: One function for multiple graphs
- Why is the html page only displaying one of the charts?
- Draw multiple chart in one page with Chart.js
- Multiple charts in one page - Chartjs
- Multiple chart on one page using chart.js and Flask app
- Chart js multiple pie chart on one page
- ChartJS incorrect plot when plotting multiple line charts in one graph
- Displaying line chart for multiple datasets using chart.js
- Diplay multiple chart js Diagrams on one page
- Show multiple line graphs on the same chart using chart JS
- Having problems displaying multiple charts on a page
- Page with multiple chart.js charts to pdf
- How to display value of only one datapoint in line chart
- Adding Chart.js line chart to Jinja2/Flask html page from JS file
- Can Chart.js combines Line Chart and Bar Chart in one canvas
- Chart.js - mixing bar and line graphs - can I get the lines to fill the full column?
- Chart.js line chart is not displaying
- how to create multiple chart on one component vue
- How to display only one label in a multi line char?
- Chart.js Multiple charts with one common legend
- Multiple charts on same page not working - ng2-charts
More Query from same tag
- implementing horizontal bar chart
- ChartJS Add data from string
- Using vue-charts.js, I cannot get hoverOffset to work with doughnut
- Add shadow Chart.js
- Is it possible to show labels for all lines?
- How to increase right spacing in Chart.js 2.6.0?
- How to sort stacked bar chart on certain value of bar in charts.js
- ChartJS How to set color to just one bar
- How to change chartjs ticks orientation to 'slope right'?
- how to change the Y-axis values from float number to integer in chartjs?
- How can I show Bootstrap modal when on click in individual bars in chart.js
- Chart.js line chart is cut off at the top?
- How to pass sql query data onto the datasets field of chartjs using nodejs (ejs)
- Chart js animating a line while changing x-axis labels
- how can i put a chart in a div with *ngIf
- Performance issue, what causes it?
- js error: while trying to display graph using chart.js: Uncaught TypeError: Cannot read property 'call' of undefined
- How to have more controls over the borderColor per arc segment for chart.js pie charts
- Chart.js how to change width of color
- Legend position is not vertically in middle in Donut chart
- ChartJS scatterplot multi-line tooltip, one box
- Does the chartjs supports localization?
- Chartjs with JSP
- Chartjs, plot data based with unequal time intervals
- How to format date parsed from ASPX JSON via AJAX?
- In Chart.js, how do I hide certain axis labels from a stacked bar chart?
- Single bar with background Chart.js
- ChartJS Arrays Acting as One Item
- How to remove a label in top of bar in chartjs chart
- Chart.js not rendering chart with data from mySQL database