user1840255
user1840255

Reputation: 287

Plotting extra linear data on D3 js graph

Check out this fiddle, using D3 and plotting a line graph against dates.

http://jsfiddle.net/T546B/172/

I want to plot some further data on my graph and want to know if its possible, I would ideally like the graph to look like below:-

enter image description here

The extra data is linear and doesn't have a price value and I want it to be included somewhere near the middle of the graph. The data array would be in a format along the lines of:-

var eventArray = [[startdate, enddate, name]];

I was basically wondering if this is possible, plotting two types of data, using different SVG elements on one graph. - not sure how to approach this problem. Any help appreciated!

Upvotes: 0

Views: 116

Answers (1)

tomtomtom
tomtomtom

Reputation: 1522

you just need to set up a second line generator with the coordinates that you want for x and y

Upvotes: 2

Related Questions