Questions tagged [react-chartjs]

interactive react charting components using the chart.js framework

interactive react charting components using the chart.js framework

585 questions
0
votes
1 answer

fetch nested object from array in JavaScript?

I have data like that const Power = [ { "Week": [ {"x": "Monday", "y": 11}, {"x": "Tuseday", "y": 12}, {"x": "Wednesday", "y": 17}, {"x": "Thursday", "y": 18}, {"x": "Friday", "y": 19}, {"x": "Saturday",…
Vijay Gehlot
  • 80
  • 1
  • 10
0
votes
1 answer

React-chartjs-2 - Each dataset needs a unique key

I am getting this warning when i try to render my chart with two datasets. (just a warning it renders fine) [react-chartjs-2] Warning: Each dataset needs a unique key. By default, the "label" property on each dataset is used. Alternatively, you may…
bmccormick
  • 75
  • 1
  • 8
0
votes
1 answer

How do I prevent Chartjs tooltip callback returning multiple instances of the same value?

I am using Chartjs with React. I have a cryptocurrency price chart with three datasets with one being a list of prices, one being a horizontal line that is tangent to the initial price and another horizontal line that is a tangent of the highest…
0
votes
2 answers

react-chartjs-2 chart.js: How to make strokewidth of dougnut chart thin?

I am implementing one doughnut chart in react js by using react-chart.js-2 chart.js, but I want to customize it according to my requirements, I have done already some customization, but one I need to do is, to make the width of chart thin. Current…
0
votes
1 answer

Unable to change y-axis value dynamically based on data for Stacked bar chart in reactjs

My Objective to show the y-axis value dynamically in the chart. If my data contains below 100 i.e(highest value in data = 75) then it should show 80 as highest number in y-axis. it should not show 500 in the y-axis.
Sandhya
  • 401
  • 2
  • 10
  • 24
0
votes
2 answers

How do I draw chart only after promise is returned in React?

I am using the React wrapper for Chartjs. I use the fetch API to call the Nomics API to get data and store it in some arrays. I then want to use the arrays in a new Chartjs instance. Everything works except for the rendering of my chart and I think…
TDonnally
  • 67
  • 10
0
votes
1 answer

React Chart Js Class Component

I converted my code to a class component and things started to break. I figured out where it's breaking but I can't seem to figure out why its breaking. Think you guys can help me out? What happens is when I change the name in this input field (red…
Nikster
  • 427
  • 5
  • 14
0
votes
1 answer

How to make labels on both side from horizontal bar chart js

I want to make side labels for double horizontal bar on both side like this: pic 1, pic 2 can someone help me idk how to do it, im new in react and chartjs this post continued from: How to make multiple horizontal bar chartjs here's what i…
CepotOi
  • 5
  • 6
0
votes
2 answers

How to make multiple horizontal bar chartjs

I want to make horizontal bar chart using chartjs in react like this: chart i want to make but i end up doing like this chart i make can someon help me please, im new in react and chartjs Here's the continuation of this post: How to make labels on…
CepotOi
  • 5
  • 6
0
votes
1 answer

React Flow Chart : Automatic Layout

There are a few options available to create an automatic layout using react flow chart. (chart has been created using npm package react-flow-chart) I have tried the 2 mentioned below: npm package react-flow-chart provides smartRouting config…
Keval Bhogayata
  • 4,422
  • 3
  • 13
  • 36
0
votes
1 answer

React Flow Chart: Input Text not working properly inside chart nodes

I have been using npm package react-flow-chart for creating flow chart. Now, I have added a text input component inside every node, but, when I type, the onChange event of my component is not triggering !! Is there any property of chart that affects…
Keval Bhogayata
  • 4,422
  • 3
  • 13
  • 36
0
votes
0 answers

Get percentage of line bar chartjs

React ChartJS. How can I make a chart like this? I have normal type Line bar but I want to get the percentage too. Thanks.
Henrique Mota
  • 134
  • 1
  • 11
0
votes
1 answer

Getting (X,Y) point on mouse click on chart

I am using react Chartjs's scatter chart to plot a line chart for a set of X,Y points. I am trying to get the X and Y points when user right clicks anywhere on the chart by passing following function to onClick. options={ ... …
srinivast6
  • 309
  • 3
  • 8
0
votes
1 answer

Updating Chartjs Data with Response from POST Call?

I am currently using react-chartjs-2 to be able to insert a chart into a react component. I am importing the data and options of the chart which are located in another js file. In my app, I am also making a POST call which returns some data in it's…
0
votes
1 answer

ChartJS - Issues with positioning and viewing various components of horizontal bar

I have a React HorizontalBar component being used like so:
The options supplied are: { title: { display: true, text: 'My Title', }, …
noblerare
  • 10,277
  • 23
  • 78
  • 140