Visualize simulated BWE as a piecewise constant function.
To facilitate this change, I replaced the graph style with one style
config for lines/interpolation and one style config for points.
The output functions were updated to make use of the new styles.
Bug: None
Change-Id: I42404a8ce274d6e433bcdd6aee4b15b640e78b40
Reviewed-on: https://webrtc-review.googlesource.com/22000
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20645}
diff --git a/rtc_tools/event_log_visualizer/plot_protobuf.cc b/rtc_tools/event_log_visualizer/plot_protobuf.cc
index 1316f63..e5e0a8b 100644
--- a/rtc_tools/event_log_visualizer/plot_protobuf.cc
+++ b/rtc_tools/event_log_visualizer/plot_protobuf.cc
@@ -31,22 +31,21 @@
data_set->add_y_values(point.y);
}
- if (series_list_[i].style == BAR_GRAPH) {
+ if (series_list_[i].line_style == LineStyle::kBar) {
data_set->set_style(webrtc::analytics::ChartStyle::BAR_CHART);
- } else if (series_list_[i].style == LINE_GRAPH) {
+ } else if (series_list_[i].line_style == LineStyle::kLine) {
data_set->set_style(webrtc::analytics::ChartStyle::LINE_CHART);
- } else if (series_list_[i].style == LINE_DOT_GRAPH) {
- data_set->set_style(webrtc::analytics::ChartStyle::LINE_CHART);
- data_set->set_highlight_points(true);
- } else if (series_list_[i].style == LINE_STEP_GRAPH) {
+ } else if (series_list_[i].line_style == LineStyle::kStep) {
data_set->set_style(webrtc::analytics::ChartStyle::LINE_STEP_CHART);
- } else if (series_list_[i].style == DOT_GRAPH) {
+ } else if (series_list_[i].line_style == LineStyle::kNone) {
data_set->set_style(webrtc::analytics::ChartStyle::SCATTER_CHART);
- data_set->set_highlight_points(true);
} else {
data_set->set_style(webrtc::analytics::ChartStyle::UNDEFINED);
}
+ if (series_list_[i].point_style == PointStyle::kHighlight)
+ data_set->set_highlight_points(true);
+
data_set->set_label(series_list_[i].label);
}