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
0
votes
2 answers

Chart.js : How I change the x axes ticks labels alignment in any sizes?

How can I move my labels on my x axes in between another x axes label. Nothing seems to work and I was unable to find anything on the docs. Is there a workaround? I'm using line chart time…
rakesh shrestha
  • 1,335
  • 19
  • 37
0
votes
1 answer

How to increase the size of the donut or pie chart and keep the legend next to it in chart JS?

This is how the donut chart looks with the legend And when I set legend -> display to false this is how the donut chart looks I want the donut size to be as big as the second photo along with the legend next to it on the right like the first…
0
votes
2 answers

ERROR TypeError: Cannot read property 'testMethod' of undefined

I have following code for component.ts export class HomeComponent implements OnInit { Linecap = {}; dataArray=[]; constructor(private chartGetDataService: ChartGetDataService) { } ngOnInit(): void { this.chartPlotting(); …
0
votes
1 answer

react-chartjs-2 bar touches the top

When the data is filled it hits the top of the line. is there any option to limit the top, and I need the show the number with money symbol. I need to change the x-axis to show more than the top limit. is there any option to it
Ajith Rock
  • 90
  • 6
0
votes
0 answers

ChartJS doughnut - Multi line label with click event listener

I am using ChartJS library to render the doughnut chart. I have custom labels to show with the event listener. I tried by using chartjs-plugin-datalabels and chartjs-plugin-labels, but no luck maybe I am not an expert in CSS. The final doughnut is…
0
votes
1 answer

(Lifecycle problem?) React Chart js-2 not updating data from componentDidMount

I am trying to populate chart data from my backend. Although I am fetching data and pushing data in componentDidMount, the Bars or Scatters are not loaded on page load. If I change my screen width in inspect mode in google dev tools, it starts…
YLO
  • 39
  • 7
0
votes
3 answers

How to send an array of object as a prop?

I have a state which is an object containing an array and that array contains an object which looks something like this [{"tone":"negative","value":0},{"tone":"neutral","value":91},{"tone":"positive","value":9}]. So I want to plot a bar chart…
henrydoe
  • 398
  • 2
  • 7
  • 22
0
votes
1 answer

Need help styling chart JS Radar chart

I am trying to style the background the below linked radar chart and would like to be able to Set the color of the radar lines Set the thickness Set the scale from 0-100 Set the Font size I think this has to be done via 'options' (as this is not…
David
  • 15
  • 4
0
votes
1 answer

react-chartjs2 manage max value

There is my chartjs2 horizontal bar chart. I want to manage max value. If you see second chart, max value is 14, and min value is 13. I want to manage the max and min gap. I mean, I want the second chart to display x-coordinate's min value is 10…
0
votes
2 answers

How to use same backgroundcolors out of an array to unknown data in chartjs?

I am generating a bar chart via chartjs. I have a predefined backgroundcolor array with 5 colors. I don't know how much data I get from my sql query. But I would like to use the predifened backgroundcolor. As soon as I have more than 5 data records,…
Ben
  • 73
  • 7
0
votes
1 answer

Multiple datasets with one data value chartjs

Im trying to create a line chart with multiple datasets but with only one data value inside, its posible? Because i tried a lot of modes but always i get undefined in the options, or all the data always in one column. My code example is the…
0
votes
1 answer

chartJS line chart not plotting values that are less than minY

I am facing issue while plotting line chart using chart-js lib. Here is the codepen : https://codepen.io/bhupendra1011/pen/gObEpJQ, where I set the min Y value as below: yAxes: [{ ticks: { min: minY, …
Bhupendra
  • 1,196
  • 16
  • 39
0
votes
1 answer

chartjs create scrolling on the x axis

i have created the chart, but how would i make it so that there is a scrollbar and that the values are not so tightly compacted, so that you can read it, like the spacing is like a center meter for each x value. as you can see in the jsfiddle it…
Seabizkit
  • 2,417
  • 2
  • 15
  • 32
0
votes
1 answer

Chartjs show seconds on the x axis and volume on the y

I would like to show y as time and x and volume of something I basically if it takes 8.5 secs to do say 10 000 volume or 1000 000 I would like to have time on the x axis and volume on the y axis. Time is not relative to a date, its time as in…
Seabizkit
  • 2,417
  • 2
  • 15
  • 32
0
votes
1 answer

How to filter react-chartjs-2

I am using react-chartjs-2 in my project, and I am creating a grouped stacked bar chart with it, to remove duplicate labels I have created a custom generateLabels function, but the problem with custom generateLabels function is that when I click on…
user10070377