Saturday, 15 January 2011

How to make flot responsive? -


In the following Bella:

How can I widen the graph? What can change if the window width changes?

code:

  $ (function () {var d1 = []; for (var i = 0; i & lt; 14; i + = 0.5) D1 push ([i, math sin (i)]); var d2 = [[0, 3], [4, 8], [8, 5], [9, 13]]; // a zero different line The symbol is denoted by Segment DD3 = [[0, 12], [7, 12], faucet, [7, 2.5], [12, 2.5]] $. Plot ($ ("# placeholder"), [D1, D2, D3]);});    

Try something like this:

Automatically pull Flot This container is inside. So if your division is responsible then Flot will be liable.

Then if you change the size of your window then you have to do the float again:

You can see to see if the window The size has changed:

  window.onresize = function {event} {...}   

(see:)

No comments:

Post a Comment