Index: webrtc/rtc_tools/event_log_visualizer/plot_base.h |
diff --git a/webrtc/rtc_tools/event_log_visualizer/plot_base.h b/webrtc/rtc_tools/event_log_visualizer/plot_base.h |
index bdcea2e5c3e27be7ff224e975dfd39e63d600caf..19b696d7c82af3d078543f5ade46a6691cd25387 100644 |
--- a/webrtc/rtc_tools/event_log_visualizer/plot_base.h |
+++ b/webrtc/rtc_tools/event_log_visualizer/plot_base.h |
@@ -40,19 +40,45 @@ struct TimeSeries { |
TimeSeries(TimeSeries&& other) |
: label(std::move(other.label)), |
style(other.style), |
+ color(other.color), |
points(std::move(other.points)) {} |
TimeSeries& operator=(TimeSeries&& other) { |
label = std::move(other.label); |
style = other.style; |
+ color = other.color; |
points = std::move(other.points); |
return *this; |
} |
std::string label; |
PlotStyle style; |
+ std::string color; |
terelius
2017/07/04 12:22:01
This is not used as far as I can tell. Furthermore
philipel
2017/07/04 12:55:10
Removed.
Not sure I understand what you mean by s
terelius
2017/07/07 13:42:01
What I mean is that "connect these point with a li
philipel
2017/07/11 14:12:35
To represent some data using a LINE_GRAPH, LINE_DO
|
std::vector<TimeSeriesPoint> points; |
}; |
+struct Interval { |
+ Interval() = default; |
+ Interval(double begin, double end) : begin(begin), end(end) {} |
+ |
+ double begin; |
+ double end; |
+}; |
+ |
+struct IntervalSeries { |
+ enum Orientation { kHorizontal, kVertical }; |
+ |
+ IntervalSeries() = default; |
+ IntervalSeries(const std::string& label, |
+ const std::string& color, |
+ IntervalSeries::Orientation orientation) |
+ : label(label), color(color), orientation(orientation) {} |
+ |
+ std::string label; |
+ std::string color; |
+ Orientation orientation; |
+ std::vector<Interval> intervals; |
+}; |
+ |
// A container that represents a general graph, with axes, title and one or |
// more data series. A subclass should define the output format by overriding |
// the Draw() method. |
@@ -109,6 +135,9 @@ class Plot { |
// Add a new TimeSeries to the plot. |
void AppendTimeSeries(TimeSeries&& time_series); |
+ // Add a new IntervalSeries to the plot. |
+ void AppendIntervalSeries(IntervalSeries&& interval_series); |
+ |
// Add a new TimeSeries to the plot if the series contains contains data. |
// Otherwise, the call has no effect and the timeseries is destroyed. |
void AppendTimeSeriesIfNotEmpty(TimeSeries&& time_series); |
@@ -122,6 +151,7 @@ class Plot { |
std::string yaxis_label_; |
std::string title_; |
std::vector<TimeSeries> series_list_; |
+ std::vector<IntervalSeries> interval_list_; |
}; |
class PlotCollection { |