Skip to content

Tag: chart.js

Chartjs Bar Chart showing old data when hovering

I have a bar chart that’s created using chart.js. Everything works fine on page load, but when I change the time frame using a daterangepicker, a glitch appears. The new data is brought in, but when I hover over it, the old data is shown. I’m new to javascript so I’m hoping to get some help.…

Using Charts.js with react

I am using React and want to tie it in with Chart.js. The graph below works, but I am not sure how to make a Graph component in React. My Chart.js code looks like the following: I then tried to incorporate this into React. Unfortunately, this didn’t work. My code attempt can be seen here.This is kind of…

Chart area background color chartjs

I have problem with chart js, i want to coloring chart area like image above I try to find configuration from charJs Docs , but nothing matched. its possible or not to change chart area background color? if possible anyone can help me? Html Javascript Here’s my current code jsFiddle so everyone can try …

chart js 2 how to set bar width

I’m using Chart js version: 2.1.4 and I’m not able to limit the bar width. I found two options on stackoverflow or but neither of one works with the mentioned version. Is there a way to solve this issue without manually modifying the chart.js core library? thanks Answer You were right : The attrib…

Skip decimal points on y-axis in chartJS

I am using this library to draw charts in my web app. The issue is that I am having decimal points in my y-axis. You can see that in the image below Is there a way that I can restrict it to only have numbers? This is my code Answer Update: please see an updated answer from @DreamTeK that shows

How can I evenly distribute ticks when using maxTicksLimit?

I made a line chart using Chart.js version 2.1.3. The output is as follow: As you can see, I limited the maximum count of ticks to 8 via maxTicksLimit. However, the distribution is not even. How can I make the ticks distribute evenly? p.s. there are always 289 records in the dataset, and the data is recorded …