score:0
you correctly defined chart_day
globally and even commented it as follows:
global variables - so that chartjs doesn't show old data on hover
the problem however lies in your daychart
function. instead of using the globally defined chart_day
variable, you defined an identically named variable in the local scope of the function.
the solution would be to replace the following code block:
var chart_day = new chart (ctx_day, config)
if (chart_day) {
chart_day.destroy();
chart_day = new chart (ctx_day, config);
chart_day.update();
}
...with this one:
if (chart_day) {
chart_day.destroy();
}
chart_day = new chart (ctx_day, config);
Source: stackoverflow.com
Related Query
- charts.js chart showing old data on hover
- Chartjs Bar Chart showing old data when hovering
- Chart Js Show the old data on mouse hover
- Chart js shows old data on mouse hover
- Chart JS not showing On hover with small data
- Chart js shows old chart data when hover
- Chartjs Bar Chart showing old data when hovering when use of ajax
- Chart.js showing old chart on hover
- chart js showing some weird data at top of charts
- how to remove old data from Chart js on mouse hover using mvc c#?
- ChartJs line chart - display permanent icon above some data points with text on hover
- Charts js only showing 2 data points on sparkline
- chart js chart bar chart not showing data from 0
- Chart JS not showing all data
- Chart js old chart data not clearing
- Charts js and laravel: Render chart after passing in json data
- vue-chart.js : Data available as computed properties, but not showing in chart
- How to customize tooltip on mouse hover of a polar area chart of Angular Charts
- ChartJS/High Charts Radar chart - Different radial axis labels for each category that appear on hover
- ChartJS not showing data for time series bar chart
- Charts are overlapping with old values on mouse hover
- Chart.js Mouse Over Show Old Chart Data
- Charts JS: Doughnut chart and hiding tooltip for specific data index within each dataset
- React Native Chart not showing data
- Hovering over line chart shows old chart data issue in chart.js
- Resetting transform: rotate() by removing and appending canvas not showing data after appending and redrawing chart
- Ajax reload data chat.js showing error on mouse hover on graph
- ChartJS dynamic line chart ghosting back to old data when hovered on
- chart js: when all the values passed to data are zeros, nothing is showing
- Chart Piechart in only show percentage on hover but it shows data and label with percentage both i just want to show percentage only percentage
More Query from same tag
- chartjs line graph points with different color
- Creating a Reusable Chartjs Function
- Tooltip backgroundColor depending on chart color ChartJS
- how to draw Line chart using chart.js and datalabels should be shown
- dynamic line styling in chartjs
- How to get line x value from Label chart js
- Asp.net MVC and Chart js
- How to use chartjs-plugin-trendline with react-chartjs-2
- Chart.js Customize tool tip to show more data
- TypeError: CanvasRenderService is not a constructor
- Flickering of charts and getcontext error with chartjs in the context of Vuejs
- Chart.js time-based bar chart
- Chartjs Custom Legend with Time on Y-axis
- Do not rotate scale title at xAxis
- how to show bar graph on y axis in charjs
- Invalid Date moment.js using Iso yyyy-MM-dd HH:mm:ss
- Laravel query builder for Charts.js
- No rendered annotation line on Line Chart
- Displaying data from simple html form to display in chartjs
- How to change ChartJS font size with javascript?
- Get string[] in razor view javascript from mvc controller
- Populate colors on a Chart.js chart dynamically
- Chart.js 2.2.x - How to access the pixel coordinate of a point in my dataset
- Cant To CHange Chart.js Legend
- I need a PHP query to grab data from the database and use in my bar charts for results
- Chart.js overlapping tooltip text
- Javascript chart display labels
- Is there a way to hide/customize ChartJS' above legend?
- How to draw x axis and y-axis origin line draw in ng2-google-charts?
- Sending data to ChartJsLineChart in ChartJs.Blazor