I'm writing an ASP.NET site and I was told to add a graph to one of the pages.
The graph must use a third-side DOJO class to draw the graph.
I'm having some problem with it.
The graph tag looks something like this :
<div class="graph" type="dojo.special.graph" datasource="myModel">
where the datasource for that graph is:
<div class="Data" type="dojo.special.Datasource" url="myDB.json" id="MyModel">
So, this graph is fueled using the JSON file.
The problem is when I want to change the JSON file to another, lets say, insead of "myDB.json" to "myASP_DB.json"
problem is that when I change it (using Java Script code...something along MyModel.url="myASP_DB.json") the graph won't refresh itself, though it's datasource does.
I do understand where the problem lays - the tag is created once on pageload, so does the graph, and than it doesn't change (although the model does).
What I'm trying to achieve here is that after I will change the url attribute of "MyModel", the graph tag will refresh itself, thus causing the graph to update.
How do you think I might achieve this? and am I assuming correctly that refreshing it will cause the graph to update?
Thanks a lot
View Complete Post