Commit ef76d507 authored by Xiaowu Zhang's avatar Xiaowu Zhang

ors_wendelin: hide/show group trace together

parent 7b26b31b
......@@ -51,6 +51,7 @@
type: 'scatter',
line: color,
name: 'IPThp.' + i,
legendgroup: 'legendgroup' + i,
hovertemplate: 'Date: %{x}<br>Download: %{y} Mbit/s'
});
data_list.push({
......@@ -62,6 +63,7 @@
opacity: 0.3,
showlegend: false,
fill: 'tonexty',
legendgroup: 'legendgroup' + i,
hoverinfo: 'none'
});
}
......@@ -98,7 +100,9 @@
raw_dl_lo,
raw_dl_hi,
raw_ul_lo,
raw_ul_hi;
raw_ul_hi,
download_link = gadget.element.querySelector('.download-link'),
upload_link = gadget.element.querySelector('.upload-link');
for (i = 0; i < graph_data.length; i += 1) {
if (date.indexOf(graph_data[i][0]) == -1) {
date.push(graph_data[i][0]);
......@@ -131,7 +135,7 @@
download_data = getPlotData(dl_lo, dl_hi, date);
upload_data = getPlotData(ul_lo, ul_hi, date);
Plotly.newPlot(
gadget.element.querySelector('.download-link'),
download_link,
download_data,
{
/*
......@@ -157,7 +161,7 @@
);
Plotly.newPlot(
gadget.element.querySelector('.upload-link'),
upload_link,
upload_data,
{
/*
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1007.32864.56533.30259</string> </value>
<value> <string>1007.34352.37418.49595</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>1680610637.0</float>
<float>1680699889.54</float>
<string>UTC</string>
</tuple>
</state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment