personality-insights-nodejs
personality-insights-nodejs copied to clipboard
ReactJS friendly version?
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?
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.
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} />);
}