HighStock设置 [英] HighStock setup

查看:321
本文介绍了HighStock设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我与HighStock合作,为各公司的股票的图表。在API中,它并没有告诉我如何检索有关股票的数据,它只是检索它在一个JSON文件。我想知道,如果一个股票的参数(例如:'AAPL'或'歌')。可以传递中检索这些信息

I am working with HighStock to create a chart for stocks of various companies. In the API, it does not tell me how to retrieve the data about a stock, it is simply retrieving it in a JSON file. I am wondering if a stock parameter (Example: 'AAPL' or 'GOOG') can be passed in to retrieve this information.

HighStock网站

HighStock例子

推荐答案

在Highcharts / Highstock图表有预设的 turboThreshold 用于保存在一长串昂贵的数据检查和索引。所以,如果你有一个图表,比1​​000个数据点大,你必须做一些服务器端处理,以便能够显示图表。这<一个href=\"http://www.highcharts.com/component/content/article/2-news/48-loading-millions-of-points-in-highcharts\"相对=nofollow> 示例 解释和说明这一原则。请注意如何当缩放级别改变了数据点的变化图表间隔。起初,当你放大它改变半每月,每周,每天,每小时,然后当分钟完全放大的时间间隔为每月。

The Highcharts/Highstock charts by default have turboThreshold that is used to save on expensive data checking and indexing in long series. So if you have a chart that is larger than the 1000 data points you have to do some server side processing to be able to display the chart. This example explains and illustrates that principle. Notice how when the zoom level changes the charts interval of data points changes. At first the interval is monthly as you zoom in it changes to semi-monthly, weekly, daily, hourly, and then when fully zoomed in minute.

样品 显示正在在服务器上完成,以处理当前的缩放级别。

This sample shows what is being done on the server to handle the current zoom level.

Highstock图没有任何(多个)参数来检索任何库存API的信息。你必须code,它的功能你自己。我会建议使用服务器端的code获得来自API的信息。然后该数据格式化为与点的系列,并将其发送到Highstock图表。记住,如果你有大量的数据点,以显示你将它发送到图表之前做一些处理。如果你发送一个系列有太多的数据点的图表,图表根本不会显示系列。

Highstock charts do not have any parameter(s) to retrieve information from any stock API. You have to code that functionality yourself. What I would suggest is using server side code to get the information from the API. Then format that data into a series with points and send it to the Highstock chart. keep in mind if you have a lot of data point to display you will have to do some sort of processing before sending it to the chart. If you send a series to a chart that has too many data points, the chart will simply not show the series.

那么,做努力在试图生产完成这一切所需的code。如果在此过程中有任何具体问题,打我们。

So, make an effort at trying to produce the code needed to accomplish all of this. If you have any specific question during the process, hit us up.

这篇关于HighStock设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆