高库存设置 [英] HighStock setup

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

问题描述

我正在与 HighStock 合作为不同公司的股票创建图表.在 API 中,它没有告诉我如何检索有关股票的数据,它只是在 JSON 文件中检索它.我想知道是否可以传入股票参数(例如:'AAPL' 或 'GOOG')来检索此信息.

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 用于节省昂贵的数据检查和长序列索引.因此,如果您的图表大于 1000 个数据点,您必须进行一些服务器端处理才能显示图表.这个示例 解释并说明了该原则.请注意缩放级别更改时数据点的图表间隔如何更改.起初间隔是每月,当你放大它会变成半月、每周、每天、每小时,然后完全放大到分钟.

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 检索信息.您必须自己编写该功能的代码.我建议使用服务器端代码从 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.

因此,请努力尝试生成完成所有这些所需的代码.如果您在此过程中有任何具体问题,请联系我们.

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.

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

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