---
title: "Bar Chart Widget"
manual: "Dashboard"
version: "main"
permalink: "https://docs.typo3.org/permalink/typo3/cms-dashboard:bar-chart-widget@main"
source: "Widgets/BarChartWidget.rst"
rendered: "2026-09-30T05:15:21+00:00"
---

# Bar Chart Widget {#bar-chart-widget}

Widgets using this class will show a bar chart with the provided data.

This kind of widgets are useful if you want to show some statistics of for example
historical data.

-   **class BarChartWidget**

    -   *Fully qualified name:* `\TYPO3\CMS\Dashboard\Widgets\BarChartWidget`

![Bar chart widget with a bar chart of system log errors](../Images/Widgets/BarChartWidget.png)

## Example {#bar-chart-widget-example}

**Excerpt from EXT:dashboard/Configuration/Services.yaml**

```yaml
services:
  dashboard.widget.sysLogErrors:
    class: 'TYPO3\CMS\Dashboard\Widgets\BarChartWidget'
    arguments:
      $dataProvider: '@TYPO3\CMS\Dashboard\Widgets\Provider\SysLogErrorsDataProvider'
      $buttonProvider: '@TYPO3\CMS\Dashboard\Widgets\Provider\SysLogButtonProvider'
      $options:
        refreshAvailable: true
    tags:
      - name: dashboard.widget
        identifier: 'sysLogErrors'
        groupNames: 'systemInfo'
        title: 'LLL:EXT:dashboard/Resources/Private/Language/locallang.xlf:widgets.sysLogErrors.title'
        description: 'LLL:EXT:dashboard/Resources/Private/Language/locallang.xlf:widgets.sysLogErrors.description'
        iconIdentifier: 'content-widget-chart-bar'
        height: 'medium'
        width: 'medium'
```

## Options {#bar-chart-widget-options}

-   **refreshAvailable**

    -   *Type:* boolean
    -   *Default:* `false`

    Boolean value, either `false` or `true`.

    Provides a refresh button to backend users to refresh the widget.
    If the option is omitted `false` is assumed.

## Dependencies {#bar-chart-widget-dependencies}

-   **$dataProvider**

    -   *Type:* `\TYPO3\CMS\Dashboard\Widgets\ChartDataProviderInterface`

    To add data to a Bar Chart widget, you need to have a DataProvider that implements
    the interface `\TYPO3\CMS\Dashboard\Widgets\ChartDataProviderInterface`.

    See [Implement graph widget](https://docs.typo3.org/permalink/typo3/cms-dashboard:graph-widget-implementation@main) for further information.

-   **$buttonProvider**

    -   *Type:* `\TYPO3\CMS\Dashboard\Widgets\ButtonProviderInterface`

    Optionally you can add a button with a link to some additional data.
    This button should be provided by a ButtonProvider that implements the interface
    `\TYPO3\CMS\Dashboard\Widgets\ButtonProviderInterface`.

    See [Adding button to Widget](https://docs.typo3.org/permalink/typo3/cms-dashboard:adding-buttons@main) for further info and configuration options.
