mcaule / d3-timeseries

Time series charting library based on d3.js
143 stars 39 forks source link

How to define #chart in the tutorials #5

Closed zhaottcrystal closed 7 years ago

zhaottcrystal commented 7 years ago

Dear Author, In your first example shown `

//data :

  | // [{date:new Date('2013-01-01'),n:120,n3:200},...]   | var chart = d3.timeseries()   | .addSerie(data,{x:'date',y:'n',diff:'n3'},{interpolate:'monotone',color:"#333"})   | .width(900)   |     | chart('#chart')

` I am wondering how do you define "#chart" in your examples. I did not find it in your source code. Thanks a lot for your help! Much appreciated!

Best, Tingting

mcaule commented 7 years ago

#chart is a selector for a div defined in the html. You can pass a document node.