Representing sparse data in a Highcharts series - highcharts

I'm trying to generate a stacked column chart. What I want is similar to this JSfiddle example. However, I have around 30 categories and 1000 series. The series are rather sparse. There are only about 200 values. But because highcharts needs each series to have values across the x-axis categories, I'm forced to submit 1000 series each having 30 values (mostly zeroes). The chart takes over a minute to render. How can I improve this performance?

There is another way you can pass the data to highcharts, where you specify x and y for each point. This means you can skip the 0 values. In the fiddle you quoted, I modified one line to be:
data: [{x:1,y:5}, {x:3,y:7}],
http://jsfiddle.net/rh9aK/
I expect that 1000 series and 30 categories may still be too much, but this is worth a try.
One other thing, have you made sure that you don't have any series which only contain zeros ? If so, you may as well remove them before rendering.

JS charts, in you case, will produce too many DOM elements. It will be too complex for browser. You need some server-side solution which generate graps inside image.

Related

How could I get values of indicators used in a chart in MetaTrader 4?

I need to get the opened indicators values (a bunch of this) from a current chart of MetaTrader 4 (by using mql4), and export this values on python (by using ZeroMQ library), in order to create a dictionary of this values and using it for other purpose. I just do that for candlestick data, but that's quite simple. I know there's ChartIndicatorTotal to know number of total indicators on the chart, and ChartIndicatorName to know the names of the indicators on the chart, but I don't know how I should use this functions in order to get the values I want.

timeline chart not drawing "null" data

when I use the data below in a google sheets timeline chart it doesn't plot 29/04/2019 5% and 10% leaving a gap in a chart, how can I resolve this? the chart should be unaffected by empty fields.
Date 5% Target 10% Target Actual
22/04/2019 120.6 120.6 120.6
29/04/2019 119.5
22/07/2019 114.57 108.54
22/10/2019 108.84 97.69
22/01/2020 103.40 87.92
22/04/2020 98.23 79.13
22/07/2020 93.32 71.21
22/10/2020 88.65 64.09
22/01/2021 84.22 57.68
22/04/2021 80.01 51.91
22/07/2021 76.01 46.72
22/10/2021 72.21 42.05
22/01/2022 68.60 37.85
22/04/2022 65.17 34.06
22/07/2022 61.91 30.65
22/10/2022 58.81 27.59
22/01/2023 55.87 24.83
22/04/2023 53.08 22.35
22/07/2023 50.43 20.11
I have tried adding another dataset and I get the error
each values column may be followed by one or two annotation columns. column number 4 is of type date
Here is a link to the spreadsheet
There are gaps in your data, so you're going to have gaps in your chart. That's just how Timeline Chart works. There are ways of having charts skip gaps, but you have the 29th as a date, so it is explicitly part of your timeline.
The least burdensome remedy is usually to chart a different dataset living elsewhere, filtered down live from your input values, but meeting your charting requirements. E.g. elsewhere in your file have it list only the rows where 5% Target is populated with something like =FILTER(B2:E,LEN(C2:C)) and then chart that.
If that's not what you really want, then you need to decide what you really want. A time-cropped chart to only include fully-populated date ranges? A chart with made-up values extrapolated from surrounding data? Those and some other options are not trivial, so you'll need to really determine your requirements and look into how they can be achieved.

elasticsearch - time series - search time intersection between two indexes

I have two indexes. Each one of them has time and value.
click to see the data structure
In the example above I would like to find a specific time where Index2.val-Index1.val>70
Note that the values do not change from the last time entry which means that if a value is set to 20 on the 1-1-14 it will be the same on the 2-1-14 if no entry exists.
A solution can be fetching both of the vectors and do it with a linear algorithm but I suppose that the performance will be bad.
Is there an out of the box solution for that?
Thanks
David

HighChart with large amount of data(complex structure) not working

I have a demo project to show inventory trends, and the inventory of each product is frequently, there may be hundreds of inventory points in one day. Now I need to show the inventory report of one week,a month and more, the problem comes out---I have two series, one line disappeared when the points come to neer 3000(not accurate);the chart displays nothing when the amout of data is large(such as 7000 points and more) completely!
The demo is here CODE:demo here, the format of datapoints are like the demo, error occures when the point number is large,such as 4000 and more, you can try to mock up large data of this demo to find the problem.
Actully I see million points of data shows fine in others' demo, then I tried to min the size of the data points but failed, the problem still exists. How can I solve the problem?
You need to increase turboThreshold parameter, but for huge data we recommen to use Highstock which uses dataGrouping module, allowing to increase performance.

How to overcome missing values in Highstock-Stockchart?

Maybe I'm looking over it but I don't think this is a setting in the chart (otherwise my excuses in advance).
I have some values over 3 years about the workload of a printserver. For some days I have 24 values (one per hour), for other days I have no values (in the database, because the value is 0 and it would be overkill to create records with value 0).
The visible chart doesn't seem to take those missing values into account, although each value is identified by the Unix Timestamp and the chart could fill up the missing values as 0.
Is this possible with an option in the chart or do I have to rebuild my data and fill up the missing values myself?
You can see this clearly on this image (not enough points to upload images).
http://driezel.be/Values.png
Unforutnately highstock doesn't support parsing your data, but You can try to set tickInterval (http://api.highcharts.com/highstock#xAxis.tickInterval) or prepare data with correct values, before highstock initialization.

Resources