chartjs-chart-smith icon indicating copy to clipboard operation
chartjs-chart-smith copied to clipboard

React JS wrapper

Open dvcorreia opened this issue 6 years ago • 4 comments

Can Chart.smith.js be integrated in to chart.js react wrappers that already exist, like https://github.com/jerairrest/react-chartjs-2 ?

dvcorreia avatar Mar 09 '18 00:03 dvcorreia

+1

Oxicode avatar May 12 '20 02:05 Oxicode

At the time I got it to work, somehow. I had to down version the react-chartjs-2/chart.js dependency:

  "resolutions": {
    "react-chartjs-2/chart.js": "2.7.2"
  },

You can check it here https://github.com/dvcorreia/pocket-vna/blob/master/client/src/components/Content/Graphs/SmithChart.jsx

dvcorreia avatar May 12 '20 14:05 dvcorreia

There's a simple React example in the Docs now https://www.chartjs.org/chartjs-chart-smith/examples

I need to work on updating to the latest Chart.js (v2.9.3) which is likely why you've had to pin react-chartjs-2 to an older version

etimberg avatar May 23 '20 01:05 etimberg

I've published a new version, v0.3.0 that I quickly tested against chart.js 2.9.3. It looked like it worked with no code changes.

https://www.npmjs.com/package/chartjs-chart-smith/v/0.3.0

etimberg avatar May 23 '20 02:05 etimberg