radial-dendrogram-d3
the adial-dendrogram-d3
is a javascript library for create adial-dendrogram
by d3
. Technicals: d3, typescript, react
Example usage
import { Chart, Source } from 'radial-dendrogram-d3'
const Example = (): JSX.Element => {
const [loading, setLoading] = useState<boolean>(false);
const fetchData = async (node?: Source) => {
setLoading(true);
return new Promise<Source>((resolve) => {
setTimeout(() => {
resolve(loopdata(node?.name));
}, 1500);
})
.then((res) => res)
.finally(() => setLoading(false));
};
return (
<>
<Chart
container={{ r: 200 }}
bgColor="rgb(211,211,211)"
loading={loading}
fetchData={fetchData}
imageUrl="https://picsum.photos/200/300"
/>
</>
);
};
Note*: I exported a component, you can render it to see easily
import { Example } from 'radial-dendrogram-d3'
<Example />