Pass label and plot style to the TimeSeries' constructor.
BUG=webrtc:7323 Review-Url: https://codereview.webrtc.org/2750583002 Cr-Commit-Position: refs/heads/master@{#17237}
This commit is contained in:
@ -28,6 +28,10 @@ struct TimeSeriesPoint {
|
||||
|
||||
struct TimeSeries {
|
||||
TimeSeries() = default;
|
||||
TimeSeries(const char* label, PlotStyle style)
|
||||
: label(label), style(style), points() {}
|
||||
TimeSeries(const std::string& label, PlotStyle style)
|
||||
: label(label), style(style), points() {}
|
||||
TimeSeries(TimeSeries&& other)
|
||||
: label(std::move(other.label)),
|
||||
style(other.style),
|
||||
@ -97,6 +101,10 @@ class Plot {
|
||||
// Sets the title of the plot.
|
||||
void SetTitle(std::string title);
|
||||
|
||||
// Add a new TimeSeries to the plot.
|
||||
TimeSeries* AddTimeSeries(const char* label, PlotStyle style);
|
||||
TimeSeries* AddTimeSeries(const std::string& label, PlotStyle style);
|
||||
|
||||
std::vector<TimeSeries> series_list_;
|
||||
|
||||
protected:
|
||||
|
Reference in New Issue
Block a user