Visualisation is currently horribly tied to the rivers model, and to a fixed number of measurements - I've basically taken the old code from the hackday and hooked it into a Backbone View, which isn't quite in the spirit of the new code.
To make it better we need to do the following:
Extract a configuration that we can put into the bootsrapped data, kinda like how we load a schema object to determine what forms to show, we need a visualisation object that we can use to determine how to graph the data.
Decouple the code which extracts data for the graph drawing function from specifics of the model. We should be able to just say: "Take these two data fields of these experiments, and plot them on x and y". This relies heavily on having the data as an Array, rather than as multiple separate fields. We'll also have to deal with making the data of the same dimensions if it's not, ie: graphing width against depth when we have 6 depths and 1 width.
Make it fix both x and y axes in the way that we currently fix the x axis.
Make it round the units on the graphs with a bit less precision: 1.222434 is a bit overkill. Ideally making them all the same.
For now, losing the little extra labels we add like width/depth would probably make this easier - in the future it would be good to add some new Views which can dump this information out easily, or give it in a tabular form for example.
Visualisation is currently horribly tied to the rivers model, and to a fixed number of measurements - I've basically taken the old code from the hackday and hooked it into a Backbone View, which isn't quite in the spirit of the new code.
To make it better we need to do the following: