> For the complete documentation index, see [llms.txt](https://flutter.wednesday.is/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://flutter.wednesday.is/charts/guides/radial-charts/charts/pie-and-donut-chart/slicedata.md).

# SliceData

Jumping back to our previous example, we provided two `SliceData` to show a PieChart containing two slices.

`SliceData` defines the pie piece in a PieChart. It also provides the `radius` of the Pie and styling options should you choose to customize each individual pie slices.

Let's modify the original PieChart example, and represent every Pie with a Different Radius.

{% tabs %}
{% tab title="Code Sample" %}

```dart
...
import 'package:chart_it/chart_it.dart';

class TestPieCharts extends StatefulWidget {
  const TestPieCharts({Key? key}) : super(key: key);

  @override
  State<TestPieCharts> createState() => _TestPieChartsState();
}

class _TestPieChartsState extends State<TestPieCharts> {
  @override
  Widget build(BuildContext context) {
    return PieChart(
      data: PieSeries(
        slices: <SliceData>[
          SliceData(
            label: (_, value) => 'Quarter 1',
            style: SliceDataStyle(
              color: Colors.pink,
              radius: 90,
            ),
            value: 18,
          ),
          SliceData(
            label: (_, value) => 'Quarter 2',
            style: SliceDataStyle(
              color: Colors.orange,
              radius: 130,
            ),
            value: 32,
          ),
          SliceData(
            label: (_, value) => 'Quarter 3',
            style: SliceDataStyle(
              color: Colors.cyanAccent,
              radius: 100,
            ),
            value: 48,
          ),
          SliceData(
            label: (_, value) => 'Quarter 4',
            style: SliceDataStyle(
              color: Colors.blueAccent,
              radius: 110,
            ),
            value: 76,
          ),
        ],
      ),
    );
  }
}
```

{% endtab %}

{% tab title="Result" %}

<figure><img src="/files/OEQRPLAMWcH3uKdX4Fca" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

{% hint style="info" %}
Even if you can provide custom radius for a pie slice, it won't exceed the `max_radius` limit which is calculated internally based on the Widget's Constraints.
{% endhint %}

### Class Properties

| Name       | Type              | Required                               | Default Value |
| ---------- | ----------------- | -------------------------------------- | ------------- |
| value      | `num`             | <mark style="color:red;">true</mark>   | -             |
| style      | `SliceDataStyle?` | <mark style="color:blue;">false</mark> | `null`        |
| label      | `SliceMapper?`    | <mark style="color:blue;">false</mark> | `null`        |
| labelStyle | `ChartTextStyle?` | <mark style="color:blue;">false</mark> | `null`        |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://flutter.wednesday.is/charts/guides/radial-charts/charts/pie-and-donut-chart/slicedata.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
