Comments (6)
Hm, interesting. But I think it's a jQuery problem with how the document.ready
event
works - if you add a console.log inside the function, it won't get called
either. Try
this instead:
setTimeout(function() {
var d1 = [];
for (var i = 0; i < 14; i += 0.5)
d1.push([i, Math.sin(i)]);
var d2 = [[0, 3], [4, 8], [8, 5], [9, 13]];
$.plot($("#placeholder"), [ d1, d2 ]);
},1000);
Hope this helps?
Original comment by olau%[email protected]
on 7 Dec 2007 at 10:20
from flot.
Hi, this has helped actually, thanks! Can you clarify what that line of code
does? I
do not code with jQuery and am not familiar, maybe it'd be something useful to
add to
your readme.
Thanks!
Original comment by [email protected]
on 7 Dec 2007 at 12:03
from flot.
Also, thanks. It's finally great to see a graph rendering within my software. I
was
using plotr until it broke with the latest prototype and now the author of that
blogged flot so I thought I'd try it, the only downfall is that I now have to
load
another large library.
Original comment by [email protected]
on 7 Dec 2007 at 12:17
from flot.
$(function () { ... }) is short-hand for $(document).ready(function () {...}).
It's
documented here:
http://docs.jquery.com/Events/ready#fn
Or in a more gentle manner in one of the tutorials here:
http://docs.jquery.com/Tutorials
The short story: You normally wrap your Javascript inside the document.ready
handler,
just about the opposite of what you've done :-), like this:
$(function () {
setTimeout(function() {
var d1 = [];
for (var i = 0; i < 14; i += 0.5)
d1.push([i, Math.sin(i)]);
var d2 = [[0, 3], [4, 8], [8, 5], [9, 13]];
$.plot($("#placeholder"), [ d1, d2 ]);
},1000);
});
Original comment by [email protected]
on 7 Dec 2007 at 12:49
from flot.
Great, thanks. Again, perhaps add it to your readme. Other than that I would
say
this issue is closed.
Original comment by [email protected]
on 7 Dec 2007 at 1:25
from flot.
Sure.
Original comment by olau%[email protected]
on 7 Dec 2007 at 3:28
- Changed state: Fixed
from flot.
Related Issues (20)
- Non-time axis tick-generation broken when reusing plots HOT 1
- $.plot.formatDate() no longer accessible HOT 1
- flot inside a tab
- Not Plotting In Safari
- Standardize fill and fillColor across bar and pie charts
- "steps" without extra points HOT 1
- there is a error in the file jquery.flot.pie.js!
- threshold function and tooltips not working together HOT 1
- xaxis tick marks for time series isshe when over 24 hours. v0.8.
- In case of long number transferred to x axis, its overlaps. HOT 1
- Invalid Bar Alignment
- Check if a point is already highlighted
- Error Bars not playing nicely with time plugin (x-axis auto scales to origin 1970)
- Showing data pionts in stacked chart
- plot hover
- "offset" parameter for bar charts
- Duplicate plot rendering of Flot graph HOT 1
- Flot doesn't handle summertime (BST) correctly. HOT 1
- Can I change the tickColor for only one tick
- Legend label is not displayed if label is empty string
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flot.