d3.js - Adding event marks to a line chart -


i have line chart finder set nvd3 using example @ http://nvd3.org/examples/linewithfocus.html

i want have custom events show on chart @ specific times. example, if x-axis ranges 10.00 - 11.00 am, want have circles/colored ticks @ 10.15, 10.30 , 10.45 each indicating different event (say "event 1", "event 2" , "event 3")

any suggestions on how or examples of chart having such feature me

posting needs in future:

i able achieve using nvd3 itself. trick have x axis points of interest (events in case) , feed them array chart.xaxis.tickvalues()

then, case, modified css grid lines:

.nv-x.nv-axis.nvd3-svg line {         stroke:red; } 

then, in order make ticks interactive, used

chart.lines.dispatch.on('elementclick', function(e) {      //handle logic here }) 

hope helps.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -