|
| | LineChart () |
| |
| virtual const string | getDStype () const override |
| | Get the data type.
|
| |
| void | toggleMouseTrack (bool val) |
| | Enables or disables mouse tracking.
|
| |
| void | toggleSeriesLabel (bool val) |
| | Enables or disables series labels.
|
| |
| void | toggleLogarithmicX (bool val) |
| | Change the X-axis scale to logarithmic.
|
| |
| void | toggleLogarithmicY (bool val) |
| | Change the Y-axis scale to logarithmic.
|
| |
| void | setTitle (string t) |
| | Title of the plot.
|
| |
| string | getTitle () const |
| | Title of the plot.
|
| |
| void | setSubTitle (string s) |
| | Subtitle of the plot.
|
| |
| string | getSubTitle () const |
| | Subtitle of the plot.
|
| |
| void | setYLabel (string yaxisName) |
| | Change the label for the Y-axis.
|
| |
| string | getYLabel () const |
| | Returns the label for the Y-axis.
|
| |
| void | setXLabel (string xaxisName) |
| | Change the label for the X-axis.
|
| |
| string | getXLabel () const |
| | Returns the label for the Y-axis.
|
| |
| void | setLineWidth (string series, int w) |
| | width of line segments in the plot
|
| |
| int | getLineWidth (string series) |
| | Title of the plot.
|
| |
| void | setDataSeries (string seriesName, vector< double > xdata, vector< double > ydata) |
| | Add a series (or update it)
|
| |
| void | setXData (string series, vector< double > xdata) |
| | Changes the X data for a series.
|
| |
| vector< double > | getXData (string series) |
| | Returns the X data for a series.
|
| |
| void | setYData (string series, vector< double > ydata) |
| | Changes the Y data for a series.
|
| |
| vector< double > | getYData (string series) |
| | Returns the Y data for a series.
|
| |
| virtual const string | getDataStructureRepresentation () const override |
| |
| virtual | ~DataStructure ()=default |
| |
Show series of data or functions using a line chart.
Line charts (https://en.wikipedia.org/wiki/Line_chart) are used to represent graphically functions such as f(x) = 3*x+1, or data such as temperature of a liquid on a stove as time passes. A individual function or a set of data is called "series".
A series is represented by two arrays xdata and ydata such that there is a point at (xdata[0], ydata[0]), an other at (xdata[1], ydata[1]), ... One can add a series by passing the two arrays using setDataSeries() or add the arrays individually using setXData() and setYData().
The different series have a label associated with them by default which can be disabled (see toggleSeriesLabel()).
The line width of the plot (if lines are used) is indexed by a pixel size (int) size of 0 means no lines
The data is typically shown with axes that use a linear scale. However, the scale can be changed to logarithmic for each axis individually (see toggleLogarithmicX() and toggleLogarithmic()).
The LineChart can have a title (see getTitle() and setTitle()) and a subtitle (see setSubTitle() and getSubTitle()).
- Author
- Erik Saule, Kalpathi Subramanian
- Date
- 7/16/19