Index: webrtc/tools/event_log_visualizer/plot_base.h |
diff --git a/webrtc/tools/event_log_visualizer/plot_base.h b/webrtc/tools/event_log_visualizer/plot_base.h |
index e2bec2df78cb75b842cab7863727a1f46ebf2bd4..d6f4616545fe121ab1efb307303f862b2b140a58 100644 |
--- a/webrtc/tools/event_log_visualizer/plot_base.h |
+++ b/webrtc/tools/event_log_visualizer/plot_base.h |
@@ -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,18 @@ 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) { |
michaelt
2017/03/13 15:36:42
Shouldn't we code this in the cc file ?
terelius
2017/03/14 17:13:59
Yes. Done.
|
+ series_list_.emplace_back(label, style); |
+ return &series_list_.back(); |
+ } |
+ |
+ // Add a new TimeSeries to the plot. |
+ TimeSeries* AddTimeSeries(const std::string& label, PlotStyle style) { |
+ series_list_.emplace_back(label, style); |
+ return &series_list_.back(); |
+ } |
+ |
std::vector<TimeSeries> series_list_; |
protected: |