[go: nahoru, domu]

Skip to content
This repository has been archived by the owner on Oct 17, 2022. It is now read-only.

ReactJS friendly version? #166

Open
michaelgriffithus opened this issue Aug 16, 2018 · 2 comments
Open

ReactJS friendly version? #166

michaelgriffithus opened this issue Aug 16, 2018 · 2 comments

Comments

@michaelgriffithus
Copy link

Is there any way you can provide a ReactJS (16.x) friendly version, or provide guidance on how to convert/use the graph with ReactJS?

@germanattanasio
Copy link
Contributor

I guess you are talking about the Sunburst. Maybe you can look for that chart in the react-d3 library. We don't have this on our roadmap for this year.

@mwadden
Copy link
mwadden commented Feb 7, 2020

Take a look at personality-sunburst-chart. It's not React specific but you can easily wrap it in a component:

import React, {useEffect, useRef} from 'react';
import PersonalitySunburstChart from 'personality-sunburst-chart/lib/charts/v3-d3v4';

export default function PersonalityInsightsChart({data}) {
  const chartRef = useRef(null);
  useEffect(() => {
    const chart = new PersonalitySunburstChart({
      element: chartRef.current,
      version: 'v3'
    });

    chart.show(data);
  }, [data]);

  return (<div ref={chartRef} />);
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants