Sam Selikoff
Sam Selikoff

Reputation: 12684

Adding a data overlay to a time series chart

Is something like this possible with d3?

I'd like to see the specific data points on mouseover. I've done it for bar charts, but it seems a little trickier for time series data. Does anyone know of any examples?

Inspecting some of the charts on NVD3's home page reveals that they've added a certain number of points that they reveal on mouseover. Ideally I'd like to have all of them, and display the info in one spot, just like the Google chart. Any ideas?

Upvotes: 1

Views: 1459

Answers (1)

Andrew Staroscik
Andrew Staroscik

Reputation: 2704

It is possible. See here for an example of an x value overlay.

If you want to show the information somewhere other than the mouse position, you can put it in a div anywhere you want on the page. In this example, the div is filled .on("click") but the same process would work .on("mouseover")

Upvotes: 3

Related Questions