Add flag to enable shared x-axis for local event log visualization.

Bug: None
Change-Id: I4aea047c905aa8acbe25fd325bc92bb65b8d0826
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132557
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27583}
diff --git a/rtc_tools/event_log_visualizer/main.cc b/rtc_tools/event_log_visualizer/main.cc
index 7992b1c..25e5bfb 100644
--- a/rtc_tools/event_log_visualizer/main.cc
+++ b/rtc_tools/event_log_visualizer/main.cc
@@ -214,6 +214,12 @@
     true,
     "Normalize the log timestamps so that the call starts at time 0.");
 
+WEBRTC_DEFINE_bool(shared_xaxis,
+                   false,
+                   "Share x-axis between all plots so that zooming in one plot "
+                   "updates all the others too. A downside is that certain "
+                   "operations like panning become much slower.");
+
 WEBRTC_DEFINE_bool(protobuf_output,
                    false,
                    "Output charts as protobuf instead of python code.");
@@ -294,7 +300,7 @@
   if (FLAG_protobuf_output) {
     collection.reset(new webrtc::ProtobufPlotCollection());
   } else {
-    collection.reset(new webrtc::PythonPlotCollection());
+    collection.reset(new webrtc::PythonPlotCollection(FLAG_shared_xaxis));
   }
 
   if (FLAG_plot_incoming_packet_sizes) {