Questions tagged [chartjs-2.6.0]

Chart.js is a JavaScript library for creating animated, interactive graphs for inclusion on web pages. This tag is for version 2.6.0 specific questions.

Chart.js 2.6.0

Chart.js is a javascript library that can be used to easily create animated, interactive graphs to include on web pages.

Version 2.6 provides improved stability, a new documention and new features like an advanced area chart.

Further Information

Related tags

291 questions
2
votes
1 answer

How do I smoothen the edges of a radar chart in chart js?

I'm trying to make a radar chart with smooth edges as in the Chart JS sample of a radar chart http://www.chartjs.org/samples/latest/charts/area/radar.html I tried looking for it in the documentation and figured that it could be lineTension property…
FledglingDeveloper
  • 381
  • 4
  • 6
  • 12
2
votes
1 answer

ChartJs - Double tooltip Top and Bottom on hover

I'm trying to render a double tooltip when hovering on a point of a line chart. Like this: I didn't find absolutely nothing on the web. Someone knows how to achieve it?
Univers3
  • 935
  • 1
  • 13
  • 34
2
votes
1 answer

Can I bind an onclick event and edit a point in chartjs

I am using chartjs for making a small project. I am getting some confusion and hard luck in editing the points. Is there any function in this library I can bind an onclick event to which will show me a pop up and I can remove the point? Here is…
fat potato
  • 503
  • 1
  • 9
  • 29
2
votes
3 answers

ChartJs chart won't update new values

first and foremost, sorry about the broken english. I'm using ChartJS to generate charts for a while, but today I stumbled in a problem that I can't seem to find an answer. I'm using a function to add data dynamically to my chart, then update…
urukh
  • 360
  • 1
  • 3
  • 17
2
votes
2 answers

Draw borders on line chartjs

I'm using ChartJS to create a line chart with elements. I'm wondering if it possible to set borders on left and right of a element? This is my chart and it gets confusing if you have two elements next to each other and they have the same…
Bombebak
  • 114
  • 2
  • 11
2
votes
1 answer

Filter a legend Item with Chartjs.org V2.7

I am building a series of doughnut charts and I would like to remove the second item in the legend, so when I generate the legend with the generateLegend() method I just want to get the first value. In the documentation there is an option that reads…
ryangus
  • 679
  • 3
  • 8
  • 22
2
votes
0 answers

How to add a button to a chart.js graph

How do I add a button inside a chart.js graph? I want to create a pie chart with drill down. The drill down effect is actually pretty easy with a chart onClick function. But I want to add a button to go to the top level to the canvas. I do not want…
Nicolas Gehlert
  • 2,626
  • 18
  • 39
1
vote
1 answer

chartjs: unable to create Stacked Chart

I feel stupid but I don't understand where I'm going wrong :( I'm trying to build a stacked bar chart through chartjs but I obtain only a chart with grouped labels: const ctx = document.getElementById('bar-chart') var chart = new Chart(ctx, { …
Stefano Radaelli
  • 1,088
  • 2
  • 15
  • 35
1
vote
1 answer

Chartjs color the background of chart after specific values with dark grey color

I am new to ChartJS and due to server constraints I am using ChartJS 2.9.4 using cdnjs and I want to color the background of line chart from 60-80 ==> light grey with background text in right side as Significant with dotted lines 80-100 ==> dark…
Nitin Sharma
  • 21
  • 1
  • 7
1
vote
1 answer

Horizontal line for bar chart

Information: Chart.js v3.8.2 https://www.chartjs.org new Chart(document.getElementById('esneklik').getContext('2d'), { type: 'bar', data: { labels: ['test','test 2'], datasets: [{ label: ' ', data: [24,20], …
1
vote
1 answer

How can I assign green for an uptrend in line chart in chart-js and red for a downtrend in chart-js?

I want to assign green for an uptrend in line chart in chart-js and red for a downtrend in chart-js. I am relatively new to chartjs and I am not sure how to access the data elements to spot an uptrend or a downtrend. import React, { useEffect } from…
1
vote
1 answer

Is there anyway to overlap one barchart with another in chart js without stacking them?

I tried using the stack and offset but it does not seem to work This is my code: import React, { useEffect } from 'react'; import { Bar } from 'react-chartjs-2'; import useWindowWidth from 'wa-shared/src/hooks/useWindowWidth'; const state = { …
1
vote
1 answer

How to reuse a Chartjs Chart component in with different Data and get past the **Canvas is already in use** error?

I have a boxplot component in my Vue project and I want to reuse it on the same page for a table I am building. However, despite the fact that my data is different, I still get this Canvas is already in use. Chart with ID '0' must be destroyed…
LovelyAndy
  • 841
  • 8
  • 22
1
vote
1 answer

Chart js showing squares

I am using the npm module chartjs-node-canvas to create the chart and add it to my xlsx file . I am getting the wanted result without running my app as a dokcer container . Here the result got after running my app with docker : And here is my…
1
vote
1 answer

ChartJS Horizontal bars barely visible with 50 records on the Y axis

Is there a way to set the vertical thickness of the horizontal bars in ChartJS(3.7.0). Or change the zoom level or something? I have a recordset with 50 rows which should show 50 horizontal bars. However when the chart is rendered. The lines…
Dan
  • 2,209
  • 3
  • 23
  • 44