I have a question the same as :
http://groups.google.com/group/dygraphs-users/browse_thread/thread/1c949ca36bd9fff7/26a8a11bbcd1f49b?q=#26a8a11bbcd1f49b
And atfer create Dygraph by csv file ,then I want continue update data
to Dygraph .
Every 100 miliseconds, I call the function in .js below:
$(function (updateData) {
data = [];
if (myDyGraph== null) {
data = [];
myDyGraph= new
Dygraph(document.getElementById("graphId"), "myData.csv",
{
});
}
else {
var t = new Date();
var x =formatDate(t,'yyyy/MM/dd HH:mm:ss');
data.push([x, updateData]); // updateData is decimal
type
myDyGraph.updateOptions({ 'file': data] });
}
});
and myData.csv like this :
Date,Price
2012/04/19 00:01:02 , 123
2012/04/19 01:02:03 , 345
2012/04/19 04:05:06 , 678
I drawed dygraph with myData.csv at the first time call function
above . But I can't update data by use updateOptions at the next
call . My DyGraph is always display empty when call updateOptions .
How can I update data to my graph ?