本文介绍了如何用新的Highchart而不是jQuery创建一个新的Highstock图表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


$ b

$('#container')。highchart('Stockchart', config);



如何通过简单地使用新建立股票图表?例如:

var chart = new Highchart('Stockchart',config)



我尝试过,并且这... ...
$ b

var chart = new HighStock(config)

...没有运气。

解决方案

I搜索更多并最终找到它。

要做到这一点,你的代码是这样的:

chart = new Highcharts.StockChart(令人讨厌的是,他们说...无论如何,它有两个构造函数,Highcharts.Chart和Highcharts.StockChart。


p>

All the examples on the Highchart website creates a stockchart using:

$('#container').highchart('Stockchart', config);

How do I create a stock chart by simply using new? eg:

var chart = new Highchart('Stockchart', config)

I tried that, and this...

var chart = new HighStock(config)

...with no luck.

解决方案

I googled more and eventually found it.
To do it you code like this:

chart = new Highcharts.StockChart(config)

Annoying that they say that... anyway yeah, it has two constructors, Highcharts.Chart and Highcharts.StockChart.

这篇关于如何用新的Highchart而不是jQuery创建一个新的Highstock图表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-16 12:06