Skip to content

AG Charts pie chart is not shown correctly #841

Discussion options

You must be logged in to vote

I am not sure what the answer is. But there a couple of things that might be worth trying.

There is currently a warning in the console.

AG Charts - unable to set [label] in dJ - property is unknown

It might be worth looking closer at options object, and comparing that to what the documentation expects.

Also, I don't think we need to have a useEffect here. Instead we could use derived state.

import { AgChartsReact } from "ag-charts-react";
import * as Styled from "./PieChart.styled";

export function PieChart({ chartData }) {
  // We directly derive chartOptions from chartData without using useState.
  const chartOptions = {
    legend: { enabled: false },
    series: [
      {
        type: 

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Roland-Hufnagel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Web
Labels
None yet
2 participants