# SimpleBar

The `SimpleBar` is a type of `BarGroup` which accepts only one `yValue` and tells the Widget to draw a Single Bar of height representing the `yValue`.

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

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

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

  @override
  State<TestBarCharts> createState() => _TestBarChartsState();
}

class _TestBarChartsState extends State<TestBarCharts> {
  @override
  Widget build(BuildContext context) {
    return BarChart(
      ... // any chart configs
      data: BarSeries(
        barData: <BarGroup>[
          SimpleBar(
            xValue: 1,
            yValue: BarData(yValue: 23),
          ),
          SimpleBar(
            xValue: 2,
            yValue: BarData(yValue: 44),
          ),
          SimpleBar(
            xValue: 3,
            yValue: BarData(yValue: 35),
          ),
        ],
      ),
    );
  }
}
```

{% endtab %}

{% tab title="Result" %}

<figure><img src="https://672051664-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JD7NLiao8wvvuzkAjT9%2Fuploads%2FdMBhBnU4mtk2teNdptJn%2FScreenshot%202023-04-26%20at%2012.18.16%20PM.png?alt=media&#x26;token=fe3b3ca3-73ba-485b-b44f-69617368de85" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

### Class Properties

<table><thead><tr><th width="142">Name</th><th width="272">Type</th><th width="200">Required</th><th>Default Value</th></tr></thead><tbody><tr><td>xValue</td><td><code>num</code></td><td><mark style="color:red;">true</mark></td><td>-</td></tr><tr><td>yValue</td><td><code>num</code></td><td><mark style="color:red;">true</mark></td><td>-</td></tr><tr><td>padding</td><td><code>double</code></td><td><mark style="color:blue;">false</mark></td><td><code>10.0</code></td></tr><tr><td>style</td><td><code>BarDataStyle?</code></td><td><mark style="color:blue;">false</mark></td><td><code>null</code></td></tr></tbody></table>
