|
| add(s0, 400.0, 21.445172413793106) - pushes element to s0 array. add(s0, 500.0, 21.34892634242958 ... so on... 16 points in total are present in this array. |
| var data = [ |
| { data : s0, label : "Win" , points : { show : true , fillColor: ['green', 'green'], fill : true}, color:"green", fill : true }, |
| { data : s1, label : "Loss" , points : { show : true , fillColor: ['red', 'red'], fill : true}, color:"red", fill : true }, |
| { data : s2, label : "Pending" , points : { show : true , fillColor: ['black', 'black'], fill : true}, color:"black", fill : true }, |
| { data : s3, label : "Price Logarithmic" , points : { show : false } , lines : { show : true }, color:"#00A8F0", fill : true }, |
| |
| var settings = { |
| mouse : { |
| track: true, |
| lineColor: 'black', |
| relative: true, |
| position: 'ne', |
| sensibility: 1, // => The smaller this value, the more precise you've to point |
| trackDecimals: 2, |
| trackFormatter: function(o) { return format(o); }, |
| selection : { mode : 'x', fps : 30 } |
| }, |
| xaxis : { |
| min : 0.0, |
| max : 1100.0, |
| }, |
| yaxis : { |
| min : 0.0, |
| max : 3.1675656411617134E7, |
| }, |
| grid : { |
| verticalLines : true, |
| backgroundColor : { |
| colors : [[0,'#fff'], [1,'#ccc']], |
| start : 'top', |
| end : 'bottom' |
| } |
| }, |
| legend : { |
| container : getById("leg17"), |
| }, |
| points : { |
| show : true, |
| stacked : true, |
| horizontal : false, |
| barWidth : chart17BarWidth_, |
| lineWidth : 1, |
| shadowSize : 3 |
| }, |
| title : "", |
| subtitle : "Price/Volume" |
| }; |
|
|
| options = { |
| selection : { mode : 'x', fps : 30 } |
| } |
| function drawGraph (opts) { |
| var o = Flotr._.extend(Flotr._.clone(options), opts || {}); |
| return Flotr.draw(container, data, o); |
| } |
| graph = drawGraph(); |
| Flotr.EventAdapter.observe(container, 'flotr:select', function (area) { |
| graph = drawGraph( |
| { |
| xaxis: {min:area.x1, max:area.x2}, |
| yaxis: {min:area.y1, max:area.y2} |
| }); |
| }); |
| Flotr.EventAdapter.observe(container, 'flotr:click', function () { drawGraph(); }); |
| }) |
| (getById("chart17")); |
| }
The data points on the chart got disappeared during zooming process however the data variable still holds the values. |