Browse Source

resolve wrong variable and css element

pull/177/head
iepngs 7 years ago
committed by GitHub
parent
commit
52101a6354
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  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');
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