Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Highstock 来显示基于时间的值。我需要获取图表中显示的日期范围以用于其他目的。有没有一些简单的方法来获得开始值?
使用getExtremes
var extremes = chart.xAxis[0].getExtremes(), start = new Date(extremes.min), end = new Date(extremes.max);
chart.axes[0].dataMax chart.axes[0].dataMin