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.
The widget "Number of errors in system log" shipped with the dashboard extension is a bar chart widget.
Example
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
-
refreshAvailable -
- Type
- boolean
- Default
false
Boolean value, either
falseortrue.Provides a refresh button to backend users to refresh the widget. If the option is omitted
falseis assumed.
Dependencies
-
- Type
\TYPO3\CMS\ Dashboard\ Widgets\ Chart Data Provider Interface
To add data to a Bar Chart widget, you need to have a DataProvider that implements the interface
Chart.Data Provider Interface See Implement graph widget for further information.
-
- Type
\TYPO3\CMS\ Dashboard\ Widgets\ Button Provider Interface
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
Button.Provider Interface See Adding button to Widget for further info and configuration options.