Bar Chart
On this page you will find instructions on how to set up a Bar Chart.
Bar Charts are ideal to compare values of the same category for different items of another category (e.g. Participants by state) or to compare value changes over a period of time for a single category (e.g. Participants by year).
How to add a configuration
If your needed configuration is not listed here, check out https://nivo.rocks/
Click on the Additional Settings Button and Edit Dashboard on the dashboard. The edit buttons for the widgets on this dashboard will now be visible.
Open the edit mode of the chart
Â
a popover will open. Click on the type of chart you want to edit (one chart widget can hold several charts).
click on settings and the chart editor opens.
When opening the Chart Editor, you have the possibility to change the chart configuration by entering code snippets in the Configuration.
The changes will be displayed in the Preview on the right.
Configuration must always be enclosed in curly brackets and if there more configurations than one seperated by a comma.
Example:
{
indexBy: 'value',
colorBy: 'index'
}
Colors
Change the colors for each element of a data series. If there are more elements than colors, the color selection starts from the top.
New matching color palettes can be created here: coolers.co
{
indexBy: 'value',
colorBy: 'index',
colors: [
'#003874',
'#8fbd3e',
'#A7C6DA',
'#A53F2B',
'#A68383',
'#9BC28C'
]
}
Change color of labels
The color needs to be in the Hex format.
labelTextColor: '#ffffff'
Maximum Value
Adjust the maximum value of the x-axis
Titel of axis and Adjustment
Horizontal
Horizontal display of bars.
Grouped
Stacked
Show percentage
Add absolute/percentage value switch
Legend
anchor: ' '
: Defines legend anchor relative to chart's viewport.
Options: ‘top-left’, ‘top', ‘top-right’, ‘left’, ‘center’, ‘right’, ‘bottom-left’, ‘bottom’ and 'bottom-right’.
direction: 'column'
: Legend direction, must be one of 'column' or 'row'.
translateX:
: Placement of the legend on the x-axis
translateY:
: Placement of the legend on the y-axis
Logaritmic scaling
Rotation of x-axis label
Axis labels for non-integer values
When the aggregation returns non-interger values the following code snippet needs to be entered.
Number of values in the Y-axis
Axis Labels
Note: the font size function does not affect labels