javascript - Dygraphs vertical line with label -


i need place vertical line label on dygraph national holiday line in example - http://www.fusioncharts.com/dev/chart-attributes.html?chart=msline

i have searched google 2 hours , can't find examples. can shoot me example or put me on right track? thanks.

best practice today add highlighted region using underlay callback (example).

try specifying "underlaycallback" option within "new dygraph()" call. use html canvas context draw line.

on creating graph:

// graph range on x axis: var xmin=0, xmax=1; // horizontal line y value: var yvalue = 0.5;  new dygraph(document.getelementbyid('garph'), data, {     // graph options     underlaycallback: function(ctx, area, dygraph) {         var xleft =  dygraph.todomcoords(min, yvalue);         var xright = dygraph.todomcoords(max, yvalue);         ctx.strokestyle = 'black';         ctx.beginpath();         ctx.moveto(xleft[0],  xleft[1] );         ctx.lineto(xright[0], xright[1]);         ctx.closepath();         ctx.stroke();     } }); 

note general example, haven't shown own code.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -