Browse Source

resolve wrong variable and css element (#177)

* resolve wrong variable and css element

* fixed error variable
pull/228/head
iepngs 6 years ago
committed by Miguel Grinberg
parent
commit
251b5be9df
  1. 4
      examples/wsgi/templates/latency.html

4
examples/wsgi/templates/latency.html

@ -15,7 +15,7 @@
<script> <script>
// socket // socket
var socket = io.connect('http://' + document.domain + ':' + location.port); var socket = io.connect('http://' + document.domain + ':' + location.port);
var char = $('chart').get(0); var chart = $('#chart').get(0);
socket.on('connect', function() { socket.on('connect', function() {
if (chart.getContext) { if (chart.getContext) {
render(); render();
@ -49,7 +49,7 @@
function render() { function render() {
if (smoothie) if (smoothie)
smoothie.stop(); smoothie.stop();
chart.width = document.body.clientWidth; chart.css('width', $(document).width());
smoothie = new SmoothieChart(); smoothie = new SmoothieChart();
smoothie.streamTo(chart, 1000); smoothie.streamTo(chart, 1000);
time = new TimeSeries(); time = new TimeSeries();

Loading…
Cancel
Save