stufisher / freeboard-flot-extended Goto Github PK
View Code? Open in Web Editor NEWFlot Plotting for Freeboard.io
Flot Plotting for Freeboard.io
How can I add the options structure to the flot chart?
For example for changing the legend position I would need something like this:
$.plot($("#flotcontainer"),
[
{label:"data1", data:data1},
{label:"data2", data:data2},
{label:"data3", data:data3}
],
options
);
where options is:
options = {
legend:{
noColumns: 0,
backgroundColor: "green",
position: pos
}
};
How it work the x-axis time? I don't know how to put the time. Furthermore, when I make a push in my api, the other values disappaer.
Thanks!
Would be nice to see that you add proper instructions...
I return same data as you used in the example, trying to push any data to be shown and it doesn't work...
Only time it works is if i copy paste values structure directly into the form...
for example, i push to mqtt server this data:
[{label: 'one', data: [[0,2],[1,3],[2,5]] }, { label: 'two', data: [[0,1.3],[1,3.5],[2,4]] }]
with key:
"something"
and i try to fetch it like this:
var new_data = datasources["datasource"];
if (new_data["topic"] == "mytopic/something")
{
return new_data["msg"];
}
And nothing....
If i put console.log there to identify what it returns, it works ok, it returns same "string" which works if i just statically past in the value field....
Even this would not work:
return "[{label: 'one', data: [[0,2],[1,3],[2,5]]}]";
but this would work:
[{label: 'one', data: [[0,2],[1,3],[2,5]]}]
Does this have the ability to be used with Dweet datasources? I can get it working fine with static data for the value, but it doesn't display anything when that is changed to a dweet source
Hi,
I really like those charts - but I´m looking for a way to use this with "historical data" coming from a JSON or CSV file.
Use case:
I have a URL that provides a JSON file that always has the latest 2 hours of temperatur data (including time stamps). I would like to get that charted when the dashboard is loaded.
Also, it should poll the JSON periodically to get the latest data and update the chart with it.
Freeboard is great - but it really focusses on real time data and I would like some historical data and can´t get that to work ...
An example how to do that would be highly appreciated, sorry if that seems a stupid request, but I can´t get it to work. I´m getting confused by your sample for line chart that has as value the following:
"value": "[[[1,2],[2,3],[4,5]]]"
I would have expected the value to be [1,2],[2,3],[4,5] ?
Thanks - MacSass
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.