Commit 96dbaed5 authored by Xiaowu Zhang's avatar Xiaowu Zhang

ors_wendelin: resize

parent c1e3fd26
/*global window, rJS, RSVP, console, Plotly */
/*jslint nomen: true, indent: 2 */
(function (window, rJS, RSVP, Plotly, wendelin) {
(function (window, rJS, RSVP, Plotly, wendelin, loopEventListener) {
"use strict";
var gadget_klass = rJS(window);
......@@ -10,8 +10,13 @@
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("jio_get", "jio_get")
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
.ready(function (gadget) {
gadget.property_dict = {};
.declareService(function () {
var gadget = this;
return loopEventListener(window, 'resize', false, function () {
Plotly.Plots.resize(gadget.element.querySelector('.graph-initial-success-rate'));
Plotly.Plots.resize(gadget.element.querySelector('.graph-added-success-rate'));
});
})
.declareMethod('render', function (option_dict) {
var gadget = this,
......@@ -96,7 +101,8 @@
*/
'title' : 'Initial E-RAB establishment success rate',
'xaxis': {
'autorange': true
'autorange': true,
'autosize': true
},
'yaxis': {
title: {
......@@ -117,7 +123,8 @@
},*/
'title' : 'Added E-RAB establishment success rate',
'xaxis': {
'autorange': true
'autorange': true,
'autosize': true
},
'yaxis': {
title: {
......@@ -129,4 +136,4 @@
});
});
}(window, rJS, RSVP, Plotly, wendelin));
}(window, rJS, RSVP, Plotly, wendelin, loopEventListener));
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1007.27183.21155.35225</string> </value>
<value> <string>1007.32863.55523.57719</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>1680269791.01</float>
<float>1680610679.89</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -71,8 +71,13 @@
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("jio_get", "jio_get")
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
.ready(function (gadget) {
gadget.property_dict = {};
.declareService(function () {
var gadget = this;
return loopEventListener(window, 'resize', false, function () {
Plotly.Plots.resize(gadget.element.querySelector('.upload-link'));
Plotly.Plots.resize(gadget.element.querySelector('.download-link'));
});
})
.declareMethod('render', function (option_dict) {
var gadget = this,
......@@ -136,7 +141,8 @@
},*/
'title' : 'Download Link',
'xaxis': {
'autorange': true
'autorange': true,
'autosize': true
/*
'rangeslider': {
//range: [date[0], date[date.length - 1]]
......@@ -161,7 +167,8 @@
},*/
'title' : 'Upload Link',
'xaxis': {
'autorange': true
'autorange': true,
'autosize': true
/*
'rangeslider': {
'range': [date[0], date[date.length - 1]]
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1007.27304.20791.50176</string> </value>
<value> <string>1007.32864.56533.30259</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>1680277088.07</float>
<float>1680610637.0</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