简体   繁体   English

如何仅使用带有日期的d3.time.scale显示图形

[英]How to display graph using d3.time.scale with day only

I want to draw a graph to display the time. 我想画一个图来显示时间。 i just want to see the day in the x axis not the time. 我只想在x轴上看到日期而不是时间。 However, after trying a lot of solutions, i still cannot eliminate 12PM between two consequence days. 但是,在尝试了很多解决方案之后,我仍然无法在两个结果日之间消除12PM。 Example: https://bl.ocks.org/mbostock/3306147 示例: https//bl.ocks.org/mbostock/3306147

我只是找到解决方案:scale.ticks(d3.time.day,1)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用d3.time.scale()时如何设置日期范围 - How to set date range when using d3.time.scale() 如何使用d3.time.scale为一天中的每个小时和一周中的每一天创建标签 - how to use d3.time.scale to create label for each hour of day and each day of week 将X值映射到d3.time.scale()中的日期 - Map X-values to a Date in d3.time.scale() 如何在不缩放绑定到时间线的其他形状的情况下放大/缩小d3.time.scale - How to zoom in/out d3.time.scale without scaling other shapes bound to timeline 如何使用d3.time.scale()生成一个间隔均匀的日期数组? - How to use d3.time.scale() to generate an array of evenly spaced dates? 在dc.js系列中为d3.time.scale()添加自定义刻度/标记 - Add a custom tick / marker for d3.time.scale() in a dc.js seriesChart 如何获得(日,时间)的d3 tickFormat但只显示时间是否相同? - How to have d3 tickFormat of (day, time) but only show time if day is the same? d3时间刻度 - 图表上的最后一个条形图出现在图表外部 - d3 time scale - last bar on graph is appearing outside of the graph 如何使d3js图形比例尺上的文本与图形一起? - how to make text on d3js graph scale together with graph? 使用d3创建条形图时,如何将条形高度与比例尺上的数字相关联? - While creating a bar graph using d3 how to associate the bar height with the numbers on the scale?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM