D3.js y-Axis time scale
D3.js y-Axis time scale
是否有可能在D3.js中具有时间缩放y轴的折线图?
我找到了文档:https://github.com/mbostock/d3/wiki/Time-Scales
并且y轴似乎没有限制
你有例子吗?
这与使用线性比例尺几乎相同:
var svg = d3.select('#your_svg_id').select("svg")
.attr('width', 300)
.attr('height', 300)
.append("g");
var yScale = d3.time.scale()
.domain([new Date(1980, 0, 1), new Date() ])
.range([100, 0]);
// Domian being the from and to date and range the from to positioning of the axis
svg.append("svg:g")
.attr("class", "y axis")
.call(yAxisGen);
相关文章:
- Datetime格式为Friendly Time.Moment JS输出错误
- Selectboxit Load Time
- 使用-webkit transform:scale()缩放图像
- Problems with d3.scale.ordinal
- 当点击今天按钮时,Bootstrap Date Time Picker未选择当前时间
- 当绑定到Date()-对象时,如何格式化input[time]的值
- d3.event.scale 包含用于触摸设备的缩放 NaN
- 使用 d3.scale.log() 时,地平线图不可见
- Javascript Date() object with NULL Time
- Understanding setInterval(function() {...}, time)
- Node.js console.time()在PHP中等效
- javascript time EST/CST
- Javascript if/else工作不正常[Time Formatting AM/PM]
- Javascript Time问题不认为我介于startTime和endTime之间
- Different date time formatting output on java & moment j
- Time a jQuery fadeTo Effect?
- JavaScript time
- d3:应用 scale() 变换时元素移动
- 将X值映射到d3.time.scale()中的Date
- D3.js y-Axis time scale