0

How to implement rest api to radial bar chart in react.js using rechart?

I can't call my api to my radial bar chart using rechart.

https://recharts.org/en-US/api/RadialBar

  • Hi Narul ! You can check the guidelines https://stackoverflow.com/help/how-to-ask to write you question with more details – Kevin Martins May 30 '22 at 15:17
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community May 30 '22 at 15:17

1 Answers1

0

Create a component where you call your REST API using axios for example

 getData = async (): Promise<string> => {
       let dataJSON = await axios.get('http://webcode.me');
            return dataJSON;
        }
    };

Then you can display your chart as shown in this example https://codesandbox.io/s/simple-radial-bar-chart-qf8fz

Maha BENJEBARA
  • 232
  • 4
  • 12