highstock

Show gap of missing data with Highstock

帅比萌擦擦* 提交于 2019-12-05 11:41:29
Using Highstock to chart a sorted time serie: [[timestamp, value], ...] The datasource is sampled at irregular intervals. As result the distances between two points (in the time axis) varies. If two adjacent points are separated for more than 5 minutes I want to show a gap in the chart. Using the gapSize option doesn't work, because it doesn't allows to specify the 'size' of the gap as a function of time. Showing gaps is already a part of Highstock, I just need a way to specify it as a fixed amount of time (5 minutes). Ideas? Btw, beside that the plot works great. Here's a slightly unclean way

How to create a new Highstock chart with new Highchart and not jquery?

╄→гoц情女王★ 提交于 2019-12-05 04:03:12
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. kidcapital 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. 来源: https://stackoverflow.com/questions/16071593/how-to-create-a

Adding a series dynamically with HighCharts Stock Charts

筅森魡賤 提交于 2019-12-05 00:49:12
问题 I have the following code: http://jsfiddle.net/maniator/vTjW8/ var createChartTemplate = function() { return { chart: new Highcharts.StockChart({ chart: { renderTo: 'container' }, series: [] }), addSeries: function(name) { this.chart.addSeries({ name: name, data: [], id: Math.floor(Math.random()*1000) }); }, addPoint: function(data, series) { var seriesIndex = this.seriesExists(series); if (!(seriesIndex === false)) { this.chart.series[seriesIndex].addPoint(data, false); } this.chart.redraw()

HighStock setup

陌路散爱 提交于 2019-12-04 21:59:13
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 Website HighStock Examples 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

Show value of last point as label or tooltip on Highcharts Stock Chart

不想你离开。 提交于 2019-12-04 11:49:56
I have multiple data series with different scale in one stock chart (HighCharts). I want to connect each series to it's axis or show value of last point of each series on it (something like data label but just for last point of each series) $(function () { $('#container').highcharts({ chart: { renderTo: 'container' }, xAxis: [{ type: 'datetime' }], yAxis: [{ opposite: true, lineWidth: 1 },{ opposite: true, lineWidth: 1 }], series: [{ data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], pointStart: Date.UTC(2010, 0, 1), pointInterval: 24 * 3600 * 1000, // one

Highcharts add series dynamically

浪子不回头ぞ 提交于 2019-12-04 07:01:43
I want to add some series (I get the series data from a webservice as a 3dim array (and returning it as json) - I dont know the number of series I will get, so I have to load the series data dynamically). In javascript I am building an object: (like this highstock example: http://jsfiddle.net/gh/get/jquery/1.9.1/highslide-software/highcharts.com/tree/master/samples/stock/demo/compare/ ) seriesOptions[i] = { name: namearray[i], data: dataarray }; e.g. result: [Object { name="Series", data=[[1041375600000, 29,9]]}] I was trying to add the series like this: $.each(seriesOptions, function (itemNo,

Highcharts not displaying data at some zoom levels

送分小仙女□ 提交于 2019-12-04 06:28:20
I'm using Highcharts/Highstock to plot a fairly large amount of data (~10,000 points). The data consists of Date objects on the X axis and floats on the Y, formatted as such: [[(date), 1.728], [(date), 0.346], ...] . The dates are always 1 hour apart and there are no gaps in the data. When the chart's range is >= 21 days (such that at least 21 days of data is graphed), the chart appears correctly. Whenever the range is less than that, though, the chart becomes blank and the tooltip displays each point as having a Y-value of 0.0. The Y values for those points do exist in the array (I can see

Highcharts Marimekko chart refresh

雨燕双飞 提交于 2019-12-04 06:21:46
问题 The script below builds a basic Marimekko chart where the x-values are cumulative. This is awesome as an exciting way to plot data. http://jsfiddle.net/Guill84/1o926coh/ Unfortunately, when you toggle areas in the legend, the script simply 'hides' the areas concerned, meaning that there are gaps in the chart. How could I amend this script so the "allSeries" array is recalculated each time a button in the legend is toggled? To repeat and hopefully clarify what I'm after: tHe idea is that if I

Adding a series dynamically with HighCharts Stock Charts

萝らか妹 提交于 2019-12-03 16:52:28
I have the following code: http://jsfiddle.net/maniator/vTjW8/ var createChartTemplate = function() { return { chart: new Highcharts.StockChart({ chart: { renderTo: 'container' }, series: [] }), addSeries: function(name) { this.chart.addSeries({ name: name, data: [], id: Math.floor(Math.random()*1000) }); }, addPoint: function(data, series) { var seriesIndex = this.seriesExists(series); if (!(seriesIndex === false)) { this.chart.series[seriesIndex].addPoint(data, false); } this.chart.redraw(); }, seriesExists: function(series) { var seriesIndex = false; $.each(this.chart.series, function(index

How to get series's id in Highcharts / Highstock

一曲冷凌霜 提交于 2019-12-03 14:36:56
How to get Series's id? In the API there is only name and data etc. But don't have id. How could I get id from series? I'm using the following way to loop all series in chart. $(chart.series).each(function(i, serie){ // Want to get serie's id }); EDIT: I found i can get id using the follow way. I'm not sure is it the right way? $(chart.series).each(function(i, serie){ console.log(serie.options.id); }); If you know the id of series already you can get a reference to the series by chart.get(ID) If you want to loop through all the series and list all the IDs of series, do this: $(chart.series)