59 explicit Graph(QCustomPlot* parent, QCPAxis* keyAxis =
nullptr, QCPAxis* valueAxis =
nullptr);
Represents a single data graph within a QCustomPlot, managing its data, visual style,...
Definition graph.h:25
void setName(const QString &name)
Sets the name of the graph.
Definition graph.cpp:36
QCPGraph * graph() const
Retrieves the underlying QCPGraph object.
Definition graph.h:118
QCPGraph * graph_
Definition graph.h:144
QRgb color() const
Retrieves the color of the graph.
Definition graph.cpp:47
QString name() const
Retrieves the name of the graph.
Definition graph.h:70
bool visible_
Definition graph.h:156
QCPBars * bars() const
Retrieves the underlying QCPBars object.
Definition graph.h:124
PlotStyles
Defines the available visual styles for plotting data.
Definition graph.h:37
@ psDot
Definition graph.h:45
@ psStepLine
Definition graph.h:40
@ psStackedBar
Definition graph.h:44
@ psCircle
Definition graph.h:50
@ psBar
Definition graph.h:43
@ psLine
Definition graph.h:38
@ psImpulse
Definition graph.h:42
@ psDotLine
Definition graph.h:39
@ psPlus
Definition graph.h:49
@ psDotStepLine
Definition graph.h:41
@ psCross
Definition graph.h:48
@ psSquare
Definition graph.h:46
@ psDiamond
Definition graph.h:47
bool setPlotStyle(PlotStyles style)
Sets the visual style of the plot.
Definition graph.cpp:125
bool removeFromLegend()
Removes the graph from the parent plot's legend.
Definition graph.cpp:104
const qreal graph_line_width_
Definition graph.h:32
static constexpr double default_y_axis_factor_
Definition graph.h:29
QString name_
Definition graph.h:150
bool visible() const
Checks if the graph is currently visible.
Definition graph.h:94
QBrush color_
Definition graph.h:153
QCPBars * bars_
Definition graph.h:147
~Graph()
Destroys the Graph.
Definition graph.cpp:27
QCustomPlot * parent_
Definition graph.h:141
void setVisible(bool visible)
Sets the visibility of the graph.
Definition graph.cpp:77
double yAxisFactor() const
Retrieves the scaling factor for the Y-axis.
Definition graph.h:106
void applyCurrentColor()
Applies the currently set color to the underlying graphical elements.
Definition graph.cpp:58
void setYAxisFactor(double y_axis_factor)
Sets the scaling factor for the Y-axis.
Definition graph.cpp:88
double y_axis_factor_
Definition graph.h:159
void setColor(const QRgb color)
Sets the color of the graph.
Definition graph.cpp:52
void clearAllData()
Clears all data points currently loaded into the graph.
Definition graph.cpp:115
bool addToLegend()
Adds the graph to the parent plot's legend.
Definition graph.cpp:93