I am using charts.js to create a charts for my website. I am unable the remove the legend from the chart. I did not found the solution. This is the first time I am using charts.js library. code: }); Thanks in advance. Answer Here is the documentation https://www.chartjs.org/docs/latest/configuration/legend.ht…
Tag: chart.js
Dynamically change ChartJS Line Chart using Jquery
I’m receiving 3 arrays from server as a response and I’m trying to create a line chart using ChartJS. The line chart turns out to be fine when I feed in the static values but it doesn’t reflect the changes when new data is passed from the server. The arrays after being populated by server re…
Json file data to Chart.JS
I’m trying to add multiple datasets from a json file to a linechart in chart.JS. Here’s my JS code: Here’s my HTML: All other neccessary HTML code is added to make the file valid. There is something wrong with this code i just can’t figure out, I’m able to use the charts to input…
Chart.js- Dates not displaying correctly on chart and axis labels not showing
I’m trying to label my axes on my chart. I’m using chart.js v3.9.1 and I believe I’ve followed the documentation, however the labels aren’t showing up (see below): health_hub_tracker.html: views.py: You will also see that on my x axis- the dates are coming through as a sum. The data I …
Change the border color of a progress bar in quickchart js
i’m using quickchart.js to create a progress bar and i have a problem. When I create a progress bar by assigning it a background color it works but there is a permanent blue border that I can’t remove. Here the first example I tried to change the color of the border but it does not change this bor…
charts.js displays only first x and y value from a json api response
I am trying to render a chart with charts.js with a json api but the rendered chart displays only the first x and y values from the json the json is fetched using xmlhttp json api link https://syed1ahmed.github.io/stage-gear/api.json Answer It seems that Chart.js does not recognize the thousands separators (,…
Chartjs Radar Chart Tooltip not showing correct label
I have the following radar chart, which displays the data fine. However on the tooltip, it is not showing the label (e.g – C), it is just showing the data value twice (e.g – 3). Does anyone know what I am doing wrong? Here is my code: Answer As pointed out by @user2057925, there’s been repor…
Chart.js timeline [Group for single bar]
I would like to create a time line like this: [1]: https://i.stack.imgur.com/RQ819.png But I don’t understand how to put green into the top bar and yellow into the bottom bar. This is what I got so far but I don’t find anything how to make group only for one bar. Answer You need to define a separa…
Passing Response data to chartjs
I want to pass this json response data to a chartjs horizontal bar using angular this is the response : I tried this using x axes and z axes of the horizontal bar of chart js using this code But it seems it doesont work because i alwyas have duplication with different colors like this: i want to regroupe each
How can I highlight a bar in ChartJS when selected in the legend?
I need to change background color of bar when selected it in the legend. When I updated chart with ci.update() color is reset. Answer When the chart.update() is invoked, the chart is re-configuring itself starting from chart.data.datasets and all element options (changed in the meanwhile) are lost. The chart.…