Highcharts - 系列跳过日期 [英] Highcharts - Skip date in series
问题描述
像周末一样缺少天。我需要它仍然显示一天,但不需要任何数据。
2010年4月1日,50件成交
2010年4月2日,53件成交
2010年4月7日, 10美元卖出
(我有超过1000年的记录跨越几年 - 所以我也会添加一个缩放比例)
所以图表应该仍然显示4月1日至7日,但没有3-6的数据。 (该行只会从2-7开始)。
有关如何做到这一点的任何想法?
谢谢,
Josh
请看这里: http://highcharts.com/ref/#series 'data'属性的第二个例子。
你只需要转换mysql日期,将其转换为UNIX时间戳(UNIX_TIMESTAMP()),然后乘以1000(JS需要时间(微秒))...
So I'm pulling some data from a database and getting a UNIX Timestamp and a number. So lets say N (number) was sold on D (date).
There are days missing, like the weekend. I need it to still display the day, but not require any data. It's a line chart.
April 1 2010, 50 sold
April 2 2010, 53 sold
April 7 2010, 10 sold
(I have over a 1,000 records spanning a several years - so I will add a zoom as well)
So the chart should still show April 1-7 but have no data for 3-6. (the line would just go from 2-7).
Any ideas on how to do this?
Thanks, Josh
take a look here: http://highcharts.com/ref/#series second example of 'data' property.
You just have to convert mysql date, convert it to UNIX timestamp (UNIX_TIMESTAMP()), and then multiply it by 1000 (JS needs time in microseconds)...
这篇关于Highcharts - 系列跳过日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!