vasturiano / sunburst-chart

A sunburst interactive chart web component for visualizing hierarchical data
https://vasturiano.github.io/sunburst-chart/example/flare/
MIT License
292 stars 89 forks source link

Styling colors #95

Open vinicius-gregorio opened 2 years ago

vinicius-gregorio commented 2 years ago

How can I style colors in the chart? Not by node, but a color for the whole chart, i having some issues.

I'm using React with react-kapsule.

Any article/documentation recommended so I can properly do it?

What I want:

the code i currently have: (not different for what you have seen)

const SunburstChart: React.FunctionComponent = () => {
  const chart = Sunburst();
  chart.data(data);

  const ReactSunburst = fromKapsule<{
    width: number;
    height: number;
    data: Object;
  }>(Sunburst, {
    methodNames: ["focusNode"],
  });
  return (
    <div>
      <ReactSunburst width={300} height={300} data={data} />
    </div>
  );
};

export { SunburstChart };