Skip to content

Commit 251b5be

Browse files
iepngsmiguelgrinberg
authored andcommitted
resolve wrong variable and css element (miguelgrinberg#177)
* resolve wrong variable and css element * fixed error variable
1 parent 2360aa4 commit 251b5be

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

examples/wsgi/templates/latency.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ <h2 id="transport">(connecting)</h2>
1515
<script>
1616
// socket
1717
var socket = io.connect('http://' + document.domain + ':' + location.port);
18-
var char = $('chart').get(0);
18+
var chart = $('#chart').get(0);
1919
socket.on('connect', function() {
2020
if (chart.getContext) {
2121
render();
@@ -49,7 +49,7 @@ <h2 id="transport">(connecting)</h2>
4949
function render() {
5050
if (smoothie)
5151
smoothie.stop();
52-
chart.width = document.body.clientWidth;
52+
chart.css('width', $(document).width());
5353
smoothie = new SmoothieChart();
5454
smoothie.streamTo(chart, 1000);
5555
time = new TimeSeries();

0 commit comments

Comments
 (0)