menu/anchor's for configuring graph
because there is no "perfect fit for everybody" we should make sure, that all the settings can be configured via the URL, e.g.
.../netjson.html#show_labels=true&linestyle=spline
AND also have a menu (e.g. via show_menu=true) where one can play with the values.
Basti, the idea is great, but configuring params of a JS library via URLs is quite unusual :-)
I would like to keep netjsongraph.js configurable via parameters and JS functions. In the future me or somebody else might develop a simple webapp based on netjsongraph.js which might be customized in other ways (via a webinterface for example).. what do you think?
hmmm, maybe it's unusual - but i cannot say the reason why:
http://stackoverflow.com/questions/11582512/how-to-get-url-parameters-with-javascript/11582513#11582513
function getURLParameter(name) { return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/+/g, '%20'))||null }
myvar = getURLParameter('myvar');
this is cool, is'nt it? (and it avoid updating the files on the webserver over and over again...)