score:1
Accepted answer
can try passing the 2 values of the bar with the setchart() function , like this :
function setchart(d1,d2) {
...
data [ d1 , d2 ]
and the extraction of the value can be done while calling the function :
reference = data.reference
forecastdata = data.forecastdata
d1 = ...
d2 = ...
setchart(d1,d2)
Source: stackoverflow.com
Related Query
- django + chart.js : Cannot get two bar charts on the same graph with appropriate data
- Two data sets with different time instances on the same ChartJs chart
- Bar Chart With 2 Different Attribute Of The Same Variable [Chart.Js]
- How can i get the Chart JS Bar Graph Bar Label and Value on click?
- Chartjs 2 - Stacked bar and unstacked line on same chart with same y axis
- How to make bar chart animation where all bars grow at the same speed?
- Horizontal bar with two yaxes chart js
- Vue Chart 3 - Doughnut Charts with Text in the Middle (Trouble registering a plugin)
- How can I load multiple Chartjs charts with different data on the same page?
- Chart.js -> line chart -> multiple points with the same X
- Display Bar chart values in the graph - ChartJS
- Why are my two charts repeating the same label?
- How to reuse a Chartjs Chart component in with different Data and get past the **Canvas is already in use** error?
- Issue with chartjs linear gradient for the mixed bar chart in ReactJS is not calculated for each individual Bars
- Create bar chart with chart.js where space per bar is the same, overall chart size adjusted
- Two charts using same options, but I need different titles for the charts
- How to add labels on top of the chart bar with Chart.js 2
- Trying to get multiple chart.js charts to load on the same page
- Draw y-axis inside the graph area with chart js
- How can I get my Chart.JS bar chart to stack two data values together on each bar, and print a calculated value on each bar?
- How can I reduce the spacing between my legend and chart proper in my Chart.JS bar chart, and increase it in the graph area?
- Bar chart (chart.js) with only 2 points does not show one of the bars
- ChartJS - would like to create a mixed chart with horizontal Bar and a dot to represent the answer from the current user
- Can't render two charts on the same page from chart.js
- How I can add the predict data and the actual data in the same graph with ChartJS?
- Two chart for the same set of data - Chart.js
- How to render multiple Chart.JS charts on the same page with AJAX data and variables
- Show the latest labels in a bar chart with React.js using react-chartjs
- Bar chart with two sets of labels in Quickchart
- Chart js bar with the highest value is a different color among the rest - React
More Query from same tag
- ChartJS not displaying time data using Moment.js
- How to display data with percentage from database in pie chartjs?
- Chart.js "minBarLength" not working as intended?
- Chart JS title passed from Django - issue with apostrophe '
- Change mouse cursor to pointer in charts js
- Line chart plotting multiple points for duplicate data on x and y axis using chart.js
- Page with multiple chart.js charts to pdf
- Charts js only showing 2 data points on sparkline
- chart.js v2 - how to 'fill' the graph when using time scale
- Full width bars in Chart.js version 2.7.2
- How to set the data of chart in angular which is taken from the backend nodejs api that is store in mongodb and showing on the html page
- Why is here a number?
- How to hide a portion of chart or a div in Angular?
- Chart.JS Get Json data for chart and return dataset where a type equals a certain type
- Vue3 Chart.js not rendering
- How to set ticks on axes dynamically with chart.js?
- How to call a JavaScript file inside a PHP if/else statement?
- load external json data file in to chartjs in the angular component
- To display data from mock server into chartjs using ember
- chart.js chart distorted with fixed width
- JQuery Line Chart's X Axis not display in ASP.NET, C#, SQL Server
- Multiple line labels for chart js
- Stacked Horizontal Bars not in align Chart JS
- Data Labels on top of points in line charts
- Stacked Group Bar from Chart.js : Can I give each stack group a unique color?
- how to show bar value on the top of each bar in chartjs
- Chart.js: bar chart first bar and last bar not displaying in full
- ChartJS dynamic line chart ghosting back to old data when hovered on
- Display all tooltips in chartjs
- Chart.js does not display stacked data with linear axis and fixed steps