Sha256: e9cfcd52796c3248c177e4deb777c3e7d0a2761f5672e1fc59c1b8da9511aedc
Contents?: true
Size: 1.71 KB
Versions: 8
Compression:
Stored size: 1.71 KB
Contents
(function() { $(document).ready(function() { return window.default_plot_options = { plot_bgcolor: $('#plot-style').css("background-color"), paper_bgcolor: $('#plot-style').css("background-color"), font: { color: $('#plot-style').css("color"), family: $('pre').css("font-family") }, titlefont: { color: $('#plot-style').css("color"), family: $('body').css("font-family") }, yaxis: { gridcolor: $('#plot-style > .tickmarks').css("color") }, xaxis: { gridcolor: $('#plot-style > .tickmarks').css("color") }, margin: { t: 10, b: 40 } }; }); $.event.special.removed = { remove: function(o) { if (o.handler) { return o.handler(); } } }; $.extend(WSClient.prototype.actions, { plot: function(data) { var plotDiv, target; target = this.__parent.check_target(data); this.__plots || (this.__plots = {}); plotDiv = target.find("#plot-" + data.id); if (plotDiv.size() === 0) { plotDiv = $("<div class='plot' id='plot-" + data.id + "'></div>"); this.__parent.add(plotDiv, target, data); $(window).resize(function() { return Plotly.relayout(plotDiv[0], { width: plotDiv.width(), height: plotDiv.height() }); }); return Plotly.newPlot(plotDiv[0], data.data, $.extend({ width: plotDiv.width() }, window.default_plot_options, data)); } else { plotDiv[0].data = data.data; Plotly.redraw(plotDiv[0]); if (data.layout) { return Plotly.relayout(plotDiv[0], data); } } } }); }).call(this);
Version data entries
8 entries across 8 versions & 1 rubygems