Bridges-C++  3.4.5-dev1-6-g935685a
Bridges(C++ API)
Public Member Functions | List of all members
bridges::datastructure::BarChart Class Reference

#include <BarChart.h>

Inheritance diagram for bridges::datastructure::BarChart:
bridges::datastructure::DataStructure

Public Member Functions

 BarChart ()
 
virtual const string getDStype () const override
 Get the data type. More...
 
void setTitle (std::string t)
 Title of the plot. More...
 
std::string getTitle () const
 Title of the plot. More...
 
void setSubTitle (const std::string &s)
 set subtitle of the plot More...
 
std::string getSubTitle () const
 get the subtitle of the plot More...
 
void setValueLabel (const std::string &vAxisName)
 Change the label for the value axis. More...
 
std::string getValueLabel () const
 Returns the label for the value axis. More...
 
void setCategoriesLabel (const std::string &cAxisName)
 Change the label for categoryt axis. More...
 
std::string getCategoriesLabel () const
 Returns the axis label for the categories. More...
 
void setBarOrientation (const std::string &orient)
 sets the bar chart orientation More...
 
std::string getBarOrientation () const
 gets the bar chart orientation More...
 
void setTooltipSuffix (const std::string &suffix)
 sets the tooltip suffix More...
 
std::string getTooltipSuffix () const
 gets the tooltip suffix More...
 
void setCategories (std::vector< std::string > categories)
 set the categories for this bar chart More...
 
void addDataSeries (std::string seriesName, std::vector< double > data)
 Add a series of data. More...
 
virtual const std::string getDataStructureRepresentation () const override
 get the data structure representation as a JSON More...
 
- Public Member Functions inherited from bridges::datastructure::DataStructure
virtual ~DataStructure ()=default
 

Constructor & Destructor Documentation

◆ BarChart()

bridges::datastructure::BarChart::BarChart ( )
inline

Member Function Documentation

◆ addDataSeries()

void bridges::datastructure::BarChart::addDataSeries ( std::string  seriesName,
std::vector< double >  data 
)
inline

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.

Parameters
seriesNameindicates the name of the data to add
datavalues of that serie for each category

◆ getBarOrientation()

std::string bridges::datastructure::BarChart::getBarOrientation ( ) const
inline

gets the bar chart orientation

Returns
orientation (either "horizontal" or "vertical")

◆ getCategoriesLabel()

std::string bridges::datastructure::BarChart::getCategoriesLabel ( ) const
inline

Returns the axis label for the categories.

Returns
label shown for the categories

◆ getDataStructureRepresentation()

virtual const std::string bridges::datastructure::BarChart::getDataStructureRepresentation ( ) const
inlineoverridevirtual

get the data structure representation as a JSON

Implements bridges::datastructure::DataStructure.

◆ getDStype()

virtual const string bridges::datastructure::BarChart::getDStype ( ) const
inlineoverridevirtual

Get the data type.

Returns
name of the data type (used internally)

Implements bridges::datastructure::DataStructure.

◆ getSubTitle()

std::string bridges::datastructure::BarChart::getSubTitle ( ) const
inline

get the subtitle of the plot

Returns
the subtitle to be shown

◆ getTitle()

std::string bridges::datastructure::BarChart::getTitle ( ) const
inline

Title of the plot.

Returns
the title to be shown

◆ getTooltipSuffix()

std::string bridges::datastructure::BarChart::getTooltipSuffix ( ) const
inline

gets the tooltip suffix

Returns
suffix

◆ getValueLabel()

std::string bridges::datastructure::BarChart::getValueLabel ( ) const
inline

Returns the label for the value axis.

Returns
label shown for the value axis

◆ setBarOrientation()

void bridges::datastructure::BarChart::setBarOrientation ( const std::string &  orient)
inline

sets the bar chart orientation

Parameters
orientcan be 'horizontal' or 'vertical'. (Throws exception on other values)

◆ setCategories()

void bridges::datastructure::BarChart::setCategories ( std::vector< std::string >  categories)
inline

set the categories for this bar chart

Will throw an exception if there are already data series defined.

Parameters
categoriesNames of different categories

◆ setCategoriesLabel()

void bridges::datastructure::BarChart::setCategoriesLabel ( const std::string &  cAxisName)
inline

Change the label for categoryt axis.

Parameters
cAxisNamelabel to use for the category axis

◆ setSubTitle()

void bridges::datastructure::BarChart::setSubTitle ( const std::string &  s)
inline

set subtitle of the plot

Parameters
sthe subtitle to be shown

◆ setTitle()

void bridges::datastructure::BarChart::setTitle ( std::string  t)
inline

Title of the plot.

Parameters
tthe title to be shown

◆ setTooltipSuffix()

void bridges::datastructure::BarChart::setTooltipSuffix ( const std::string &  suffix)
inline

sets the tooltip suffix

This appends a string to the values in the hover tooltip.

Parameters
suffix

◆ setValueLabel()

void bridges::datastructure::BarChart::setValueLabel ( const std::string &  vAxisName)
inline

Change the label for the value axis.

Parameters
vAxisNamelabel to show for the value axis

The documentation for this class was generated from the following file: