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

Is it a bug? Value of pie chart showed twice react-chart.js and Chart.PieceLabel.js

I made a pie chart using react-chart.js and Chart.PieceLabel.js. I could show the value of slice of pie chart. I could show the value with % thanks to this question Displaying pie chart data value of each slices using react-chartjs-2 However,…
aaayumi
  • 1,224
  • 8
  • 27
  • 47
0
votes
0 answers

Is it possible to pass data in global variable to chart.js?

I'm making a pic chart using Chart.js with React.js(react-chartjs-2 ). My data set is stored in global variable and I want to use them to make a pie chart. Currently when I use the data in global variable, the data is not reflected in the pie chart.…
aaayumi
  • 1,224
  • 8
  • 27
  • 47
0
votes
1 answer

Uncaught ReferenceError: require is not defined using react-chartjs.min.js

I am very new to react.js. pardon me if the question is too silly i would want to build a line chart. i have decided to go ahead with react.js ,chart.js and react-chartjs.min.js. I have included the script for react-chartjs.min in my cshtml, i have…
Maddy
  • 105
  • 1
  • 11
0
votes
2 answers

Charjs 2 with reactjs

I am totally new to reactjs library. I found this library very interesting and want to implement in my chart-analyzing project(which is Java based spring project). Basically I want to implement it conventional way, do not want to install npm or any…
krishna
  • 123
  • 1
  • 1
  • 12
0
votes
1 answer

react-chartjs state update error

I made a React.JS component, which draws charts using react-chartjs wrapper around the chart.js library. I am getting an error on update, as if my data was corrupted. I am thinking that maybe something is wrong with the context, maybe, as I don't…
Moshe Shmukler
  • 1,270
  • 2
  • 21
  • 43
0
votes
1 answer

React js with react-chart js, does not render doughnut chart

I want to use react-chartjs for my statistics page. So I am currently testing each components of react-chartjs such as bar chart and line chart. For rendering bar chart and line chart, I made simple datasets and it works fine. However, for doughnut…
D.R
  • 829
  • 4
  • 16
  • 30
0
votes
2 answers

React button does not render more than once

I have a button for rendering new components (actually charts, i have simplified the example to only show text) which adds a text to the page the first time it's clicked, but won't add any new text-objects to the page with further clicks. I've…
0
votes
1 answer

Show the latest labels in a bar chart with React.js using react-chartjs

I am working on creating a bar chart in React.js using react-chartjs library. I am able to get the bar chart to display but since my data is huge and it is collected for every 10 seconds. The bar chart displays something like My dataset for it…
Shubham Khatri
  • 270,417
  • 55
  • 406
  • 400
0
votes
1 answer

ReactChart is not showing up

I am using react-chart for rendering line chart in my application. line chart in not showing up. Its creating a canvas inside div tag with id "main1". lchart.js file: var React = require('React'); var LineChart = require("react-chart").Line; var…
user2194838
  • 337
  • 2
  • 8
  • 24
0
votes
1 answer

Getting a Chart is not defined ReferenceError with in React + React-chartjs

I think the error comes from me calling an empty object or something similar to that? Code is below import React from 'react'; export default class ChartGraph extends React.Component { componentDidMount() { let chartCanvas =…
intercoder
  • 2,171
  • 7
  • 23
  • 34
-1
votes
1 answer

how to manage gap for same categoryType in react-chart js 2

import React from "react"; import { Chart as ChartJS, CategoryScale, LinearScale, BarElement, Title, Tooltip, Legend } from "chart.js"; import { Bar } from "react-chartjs-2"; import faker from "faker"; ChartJS.register( …
-1
votes
1 answer

npm install errors (setting up a react website template)

I get a compatibility error with react version of the project against my latest version when running the command npm install npm WARN ERESOLVE overriding peer dependency npm WARN While resolving: mini-create-react-context@0.4.1 npm WARN Found:…
-1
votes
1 answer

TypeError: Cannot read properties of undefined (reading 'map') ReactChartjs

This is the code: import React from 'react'; import {connect} from 'react-redux'; import {vote} from '../store/actions'; import BarChart from "../services/BarChart"; import {color} from '../services/color' const Poll = ({poll, vote}) => { …
-1
votes
1 answer

How to make bars dashed in chart js?

Hello Everyone I am new to chart JS , I need to make bars dashed . I am currenlty using version - "chart.js": "^3.7.0" , I need my bars look like This Image
-1
votes
1 answer

How to populate entire box inside a React chart (between two axes)

I am having a little bit of problems when it comes to using the ChartJS library with React.js. Basically, what I am trying to do is to fetch the data from the specific endpoint and when I get that data I want to populate the chart with it. The…
Samke11
  • 385
  • 5
  • 17
1 2 3
38
39