简体   繁体   English

Highcharts中的动态数据

[英]Dynamic data in Highcharts

Has anyone used the Highcharts Javascript charting library? 有没有人使用过Highcharts Javascript图表库? I have a few questions about it: 我有几个问题:

  • Does it support dynamic data? 它是否支持动态数据? In other words, if I plot a chart and then want to update the data displayed on the chart, do I need to completely unload the chart and start over? 换句话说,如果我绘制图表然后想要更新图表上显示的数据,我是否需要完全卸载图表并重新开始? Or can I update the chart's data in-place? 或者我可以就地更新图表的数据吗?

  • Is there a way to hide grid lines on line/bar charts? 有没有办法在线/条形图上隐藏网格线?

  • The documentation on the site looks a bit thin. 该网站上的文档看起来有点薄。 Are there any more resources online for these charts? 这些图表是否还有更多在线资源?

The Highcharts forum is pretty active and you should be able to find the answers to most of your questions there. Highcharts论坛非常活跃,您应该能够在那里找到大部分问题的答案。

I've used Highcharts and love the interface and the charts that it produces. 我使用过Highcharts并喜欢它产生的界面和图表。

Yes, Highcharts allows you to dynamically modify your charts and you shouldn't have to unload the chart in order to add new series data. 是的,Highcharts允许您动态修改图表,您不必卸载图表以添加新的系列数据。 Here's an example to add new data points to an existing series, and check out Chart.addSeries() if you want to add a whole new series. 这是一个向现有系列添加新数据点的示例,如果要添加全新系列,请查看Chart.addSeries()

A new call to 一个新的电话

new Highcharts.Chart(...)

should do the trick. 应该做的伎俩。 The docs are quite complete, but maybe too young to be helpful enough. 文档相当完整,但可能太年轻,无法提供足够的帮助。 And the support may be better with the commercial license. 商业许可证的支持可能会更好。 Did you check other libs like Flotr ? 你有没有检查像Flotr这样的其他库?

Yes - it supports things you mentioned. 是的 - 它支持你提到的事情。 Here's the sample code http://jsfiddle.net/sdorzak/HsWF2/ 这是sample code http://jsfiddle.net/sdorzak/HsWF2/

also the documentation looks 'thin' but it's pretty good. 文档看起来“很薄”,但它非常好。 I'm starting to discover that you can really do a lot with these charts. 我开始发现你可以用这些图表做很多事情。

Have you looked at Flot.js ? 你看过Flot.js了吗? It relies on JQuery. 它依赖于JQuery。 Very nice, very easy, lightweight, and open source . 非常好,非常容易,轻量级, 开源

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM