javascript - Error bars on single points in dygraphs? -


i'm using dygraphs display data errors. theoretical data fine, since makes "error band" around line - great. however, experimental data based on discrete measurements, adding kind of data able display measured points respective error - not drawing error bands nearest available points.

i add nan point on each side of data points make error band invisible, - name suggests - invisible, when hovering on point can't see error.

is there way implement error bars single data points? when mixed errorbands enabled series?

here jsfiddle showing case. line should normal line errorband, line b points per-point errors.

thanks lot!

you can using custom plotter:

function singleerrorplotter(e) {   var ctx = e.drawingcontext;   var points = e.points;   var g = e.dygraph;   var color = e.color;   ctx.save();   ctx.strokestyle = e.color;    (var = 0; < points.length; i++) {     var p = points[i];     var center_x = p.canvasx;     if (isnan(p.y_bottom)) continue;      var low_y = g.todomycoord(p.yval_minus),         high_y = g.todomycoord(p.yval_plus);      ctx.beginpath();     ctx.moveto(center_x, low_y);     ctx.lineto(center_x, high_y);     ctx.stroke();   }    ctx.restore(); } 

here's updated version of fiddle uses this.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -