Questions tagged [chart.js2]

Chart.js is a JavaScript library for creating animated, interactive graphs for inclusion on web pages.

Chart.js2 is a updated and newer version of Chart.js.

See Official Version Documentation for a list of what's new in v2.5.0.

For more information on Chart.js, check out the original tag.

438 questions
0
votes
1 answer

Chart.JS custom y axis labels with text that has value

I want to make a bar graph like this.. is it possible in chart.js? assuming that OK, Difficult, and Problematic has its own value.. Example: Problematic = 11 or more Difficult = 6 - 10 OK = 0 - 5
Jesign
  • 35
  • 6
0
votes
1 answer

Passing Global Options to line Chart in 2.1.6/Chart.js

Here is my jsfiddle explaining the issue I am facing. I want to basically pass the options object (to disable fill and bezier curves) like I could have done in the older versions... https://jsfiddle.net/xjdvngwe/ Basically I want to achieve passing…
Puneet Gupta
  • 2,237
  • 13
  • 17
0
votes
0 answers

How to add curvatures on bars in Chart.js v2.0

I've tried all resources online and they apply to version 1.6. Also went through the code, but wasn't able to find something in regards to the bar style...has anyone solved this? thanks var data = { labels: ["T", "Last Week", "S"], datasets:…
0
votes
3 answers

How To Format Scale Numbers in Chart.js v2

First of all, I apologize if my question is a slightly the same as others question. I searched for a solution and found 3 similar questions, yet none of them worked in my case, because the examples I found use Chart.js v1. I saw a sample using a…
0
votes
1 answer

Chart.js bar chart change the label position X-axis

I'm new to chart.js. I want to draw a bar chart with x axis label not centered, but in the place where two bars join. This is what I need to create https://i.imgsafe.org/12dcb3ea20.png But in my current implementation (in the below image) labels are…
Sachith Deshan N
  • 160
  • 4
  • 14
-1
votes
2 answers

Implement a cash flow timeline

I'm trying to implement a timeline for cash inflow and outflow like this: I cannot figure out if there is any chart type which might help. Is it possible to implement such a chart?
Megidd
  • 7,089
  • 6
  • 65
  • 142
-1
votes
1 answer

My chart has a decreasing Y axis, needs to start at +3 and go up to -3

I tried reverse=true in the yAxes settings but that does not seem to make a difference. It always assumes that the min < max in the ticks settings. Is this possible?
sureshvv
  • 4,234
  • 1
  • 26
  • 32
-1
votes
1 answer

How Can I Change the Y-axis labels to be shown as strings other than number in Chart.js?

I am creating a chart.js line graph with -y-axis values up to almost a million. and the values on the y axis are 0 100000 200000 300000 400000 and so on. This can be tiresome to read and I want to change it for those numbers to strings that say 100k…
Tamir Polyakov
  • 134
  • 4
  • 10
-1
votes
1 answer

Chart.js multiple datas between labels

i am using chart.js to display data. I would like to display several points per label. A picture is better than sentences, here is an example of a poker platform : We see that between the labels several points are recorded. Here is my code with…
Camille Colvray
  • 420
  • 3
  • 16
-1
votes
1 answer

How is it possible to make curved bar chart or curved column charts in chart.js?

We are trying to create curved column similar to the image below, it doesnt look possible in chart.js Any suggestions regarding this?
icemaker
  • 83
  • 1
  • 4
-1
votes
1 answer

Chart.js: How to access the chart from a page containing multiple charts while using onClick option in legend?

I have multiple charts in a single page and i wanted to add a custom onClick action to the charts. Below code is from chart.js documentation. It shows how to add the action when there is a single…
-1
votes
2 answers

Store database infos into json array to use in chart.js

I'm trying to store MySQL info into a JSON array so I can use it in Chart.js to refresh the chart without refreshing the page. I tried adding sensors info to an array but for some reason, it is only outputting the last info sent. My database has 3…
Joao
  • 79
  • 1
  • 8
-1
votes
1 answer

Generate Chart With 2 Datasets Charts.js

I can get my chart to display with 1 dataset no problem, but adding in the second one to the syntax below gives me an error of Uncaught Syntax Error: Unexpected Token } This is my syntax - what is causing the issue? var ctx =…
IcyPopTarts
  • 494
  • 1
  • 12
  • 25
-1
votes
1 answer

How to show one chart at a time?

I have the code up till the current state shown in https://jsfiddle.net/sbLgktm2/6/ I want to only show one graph at a time Eg. After clicking dropdown item1, a barchart appears, if I click dropdown item2, I want to remove the bar chart plotted for…
Edwin
  • 63
  • 1
  • 9
-1
votes
2 answers

Why is my Line Chart not displaying (Chart.JS)?

I'm displaying a pie chart and a bar chart, but my line chart, with the same type of code, does not display, and I wonder why. Here is my code: HTML . . .
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
1 2 3
29
30