Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[charts] hide empty arcs in the PieChart #13897

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

alexfauquette
Copy link
Member

@alexfauquette alexfauquette commented Jul 19, 2024

Fix #13887

To test

import * as React from "react";
import { PieChart } from "@mui/x-charts/PieChart";

const data = [
  { id: 0, value: 0, label: "series A" },
  { id: 1, value: 15, label: "series B" },
  { id: 2, value: 0, label: "series C" },
];

export default function PieActiveArc() {
  return (
    <PieChart
      series={[
        {
          data,
          highlightScope: { faded: "global", highlighted: "item" },
          faded: { innerRadius: 30, additionalRadius: -30, color: "gray" },
        },
      ]}
      height={200}
    />
  );
}

@alexfauquette alexfauquette added the component: charts This is the name of the generic UI component, not the React module! label Jul 19, 2024
@mui-bot
Copy link

mui-bot commented Jul 19, 2024

Deploy preview: https://deploy-preview-13897--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against d7e3573

@alexfauquette alexfauquette merged commit 5f8d458 into mui:master Jul 19, 2024
18 checks passed
DungTiger pushed a commit to DungTiger/mui-x that referenced this pull request Jul 23, 2024
thomasmoon pushed a commit to thomasmoon/mui-x that referenced this pull request Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: charts This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pie Chart shows a slice for 0 value whenever the object representing a 0 is last in the array
3 participants