How to overcome missing values in Highstock-Stockchart? - highcharts

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.

Related

Google Data Studio Dates and Text

I am having trouble with two things trying to setup my report on Google Data Studio.
Using numbers with dates.
I have some numeric values to use with dates. However, I have the same date for different values and google sums up those values and I need them separated.
Also, when a certain day does not have any value, google gives it value 0 and I cant have that because the value isnt 0, I just need it to skip those days. I have generated a graph as an example.
I can´t generate a graph using text as a dimension. I think I am doing something wrong but I wasn´t able to.
Table:
Graph:
1) On the line chart, set the date as dimension, set the city as the breakdown dimension, the clicks as the metric.
2) create a chart filter and exclude when the "clicks are null"

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

Google Spreadsheet a column mirrors a different columns values when it shouldnt be

Ive been working on a spreadsheet to examine something. I was converting a recursive formula into a linear one. The initial value or first state was 60. To get to the second state you 240. This is done by taking the previous state, doubling it, and adding 120. Which leads to the 3rd and 4th states of 600 and 1320. Now this base formula was clear enough that the (60+120)*2^(n-1)-120 accurately expresses it.
My second part comes from needing to add in the ability to decrease the costs while still staying true to the state. So the last formula only works when the cost reduction is 0. After considerable effort (I kept having minor rounding errors) I arrived at (ROUND(60-60*0.015*B$2)+(120-round(120*rounddown(B$2/3)*0.03,0)))*2^($A2-1)-(120-round(120*rounddown(B$2/3)*0.03,0)).
To test the formulas I created a table with the following values, with a2=1 to a5=4, and b2=0 to h2=6. Now I was using google spreadsheets to examine the information. When I populate the table I found that all the values were correct with the formula, except on G. On G the values are identical to F.
So to try and correct this I have deleted the information from the cells, deleted the columns, and even tried again in a new spreadsheet. But in all cases G=F when it should not. I cant figure out why I'm getting a duplicate column.
The information on row 3 is the values that it should be using.
The expected values are G4=55, G5=226, G6=568, G7=1252.
In case anyone wanted to know, I finally managed to solve the issue. I needed to round in one more place. The following is the formula that has worked for my current testing.
sum((ROUND(60-round(60*0.015*A$2))+(120-round(120*rounddown(A$2/3)*0.03,0)))*2^($A25-1)-(120-round(120*rounddown(A$2/3)*0.03,0)))

Representing sparse data in a Highcharts series

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.

Resources