![]() |
Bridges-Python 3.5.0-dev1
Bridges(Python API)
|
Support for drawing Bar charts. More...
Public Member Functions | |
__init__ (self) | |
get_data_structure_type (self) | |
None | add_data_series (self, str name, list[float] values) |
Add a series of data. | |
get_data_structure_representation (self) | |
Protected Attributes | |
_c_label | |
_v_label | |
_title | |
_subtitle | |
_tt_suffix | |
_orientation | |
_series_data | |
_cats | |
Properties | |
title = property | |
Get title of the plot. | |
subtitle = property | |
Get subtitle of the plot. | |
value_label = property | |
Get label for the value axis. | |
categories_label = property | |
Get label for the categories axis. | |
orientation = property | |
Get orientation of the bar chart. | |
tooltip_suffix = property | |
the tooltip suffix | |
categories = property | |
Get categories for this bar chart. | |
Support for drawing Bar charts.
Bar charts (https://en.wikipedia.org/wiki/Bar_chart) are used to represent categorical data as a series of rectangular bars with length proportional to the values they represent.
Series in a bar chart provides data for a number of categories (sometimes called bins). Categories are defined using BarChart.categories and the series are added using BarChart.add_data_series(). The series are rendered in the order in which they were added. Once a series has been added, it can not be modified.
One should always define the categories before adding data. Changing the categories after series have been added will throw exceptions; adding series with different number of values than the number of categories will throw an exception.
The Bar charts can have a title, subtitle. The charts can be horizontal or vertically oriented, using BarChart.orientation.
A tooltip indicating the value of a series in a particular bin is displayed by hovering on a bar. One can append a string to the value using barchart.tooltip_suffix to specify units in the tooltip if desired.
bridges.bar_chart.BarChart.__init__ | ( | self | ) |
None bridges.bar_chart.BarChart.add_data_series | ( | self, | |
str | name, | ||
list[float] | values | ||
) |
Add a series of data.
This will throw an exception if the data vector does not have the same size as the number of categories.
This will throw exceptions if two series have the same name.
name indicates the name of the data to add values values of that serie for each category
bridges.bar_chart.BarChart.get_data_structure_representation | ( | self | ) |
bridges.bar_chart.BarChart.get_data_structure_type | ( | self | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
Get categories for this bar chart.
|
static |
Get label for the categories axis.
|
static |
Get orientation of the bar chart.
Will always be either "horizontal" or "vertical"
|
static |
Get subtitle of the plot.
|
static |
Get title of the plot.
|
static |
the tooltip suffix
This string is appended to the values in the hover tooltip.
|
static |
Get label for the value axis.