javascript - Use minute(of the day) for showing hours in dc js x axis -
i have minutes of day i.e., form 0 1440.
currently showing these minutes is, how show hours. example:
3:am ......... 4:am.........5:am
i tried several others things no luck till now.
here doing currently:
.x(d3.scale.linear().range(1, chartwidth).domain([1, 1440]))
and here have tried:
d3.time.scale().domain([new date(2013,0,2), new date(2013, 0, 3)])
this show time how want graph doesn't show up.
sounds may not have set .xunits
correctly. want .xunits(d3.time.hours)
doing.
https://github.com/dc-js/dc.js/blob/master/web/docs/api-latest.md#xunitsxunits-function
basically, .xunits has match scale.
this common gotcha dc.js , we'd eliminate xunits, don't know how to. used determine number of points/bars.
Comments
Post a Comment