I have an ordinary line chart filled with weekly data from a table. Some weeks have no data but these instances are not marked with null or 0.
The table can look something like this:
201734 45
201735 63
201738 68
201739 53
201740 76
So have this:
As you can see it's impossible to see that there are missing weeks between week 35 and 38.
I want it to look like this:
where the line between two values have been erased when the difference between two weeks are not 1: 201738 - 201735 != 1
My code looks similar to: https://jsfiddle.net/eumLdkjb/1/
Any ideas on how to do this?
Thanks!
Create categotries array inside xAxis with missing names along with the breaks.
API Reference:
http://api.highcharts.com/highcharts/xAxis.categories
http://api.highcharts.com/highcharts/xAxis.breaks
Example:
https://jsfiddle.net/1nz4kcum/
You have to create array in a such a way that, y axis value will be null, for example current case:
['201736', null],['201737', null]
https://jsfiddle.net/vsj5jmnz/
Related
I'm trying to figure out how to collect the value that is always in LINE 9 of texts with this same template:
Aposta
Sport: 11.718.177
Compartilhar
Feita por
Privado
em 25/06/2021 às 10:04
Vitória
10:04 25/06/2021
Katerina Siniakova - Sorribes Tormo, Sara
2nd set jogo 6 - vencedor
Vitória
Katerina Siniakova
1,30
2-0
In this case, the value of LINE 9 is:
Vitória
I tried to use:
=TRANSPOSE(SPLIT(A1,"
"))
And after creating a column with the separate values, I tried using QUERY to remove the first lines of text and using LIMIT 9 to keep only the value of ROW 9, but QUERY joins the values from other lines and ends up giving a wrong value.
Note: I will need to use it to analyze texts like this on several different lines in Column A, so I should look for an option that can also be used as ARRAY so I don't need to put a different formula on each line.
This will give you the 9th column of an array split by carriage returns:
=INDEX(SPLIT(A2:A,CHAR(10),0,0),,9)
This may be far more simple than I think. What I'm trying to do is use the ArrayFormula to copy an existing formula to all the rows in a particular column.
To begin with, I have several columns along the lines of:
What I'm doing is adding the first three numbers and multiplying them by the fourth. I also have an IF condition in which, if the fourth column is blank, I leave the value in column 5 blank.
Now, I'm trying to convert this to an ArrayFormula to repeat this for all the rows in column 5.
So I went from:
=IF(ISBLANK(E2)=TRUE,,SUM((B2+C2+D2)*E2))
to this:
=ArrayFormula(IF(ISBLANK(E2:E)=TRUE,,SUM((B2+C2+D2)*E2)))
But what this does is, when I add a new row, ALL of the values in column 5 are set to the same value. Here is an example:
So, my first thought was to set the range on the SUM formula and change it to:
=ArrayFormula(IF(ISBLANK(E2:E)=TRUE,,SUM((B2:B+C2:C+D2:C)*E2:E)))
But that just makes all the values to sum of all of what the individual values should be...so, in my example, it works out to 435 (60 + 135 + 240).
What am I doing wrong here? The values in column 5 should be different in each row (e.g., row 2 should be 135 and row 3 should be 240).
Thanks!
use:
=ARRAYFORMULA(IF(ISBLANK(E2:E)=TRUE,, (B2:B+C2:C+D2:D)*E2:E))
SUM is not supported under AF
I'm trying to populate a column with the last known price at the end of a batch of orders.
Please see an example attached.
I need the last price known from columns "price". Please note that there is not always value.
I tried something like this : =LOOKUP(B2:H2,"price",B3:H3<>"")
But it didn't really work.
(the nos 18 and 3 in column "I" are just examples. I need the green 3 results),thx.
Maybe try:
=INDEX(FILTER(B3:H3,B$2:H$2="price"),COUNTIFS(B$2:H$2,"price",B3:H3,"<>"))
If there could be empty gaps in your data, try this alternative:
=INDEX(A3:H3,MAX(COLUMN(A3:H3)*(A$2:H$2="price")*(A3:H3<>"")))
I'm trying to search through two columns with a given value. For example:
A(values)
0-2
3-4
5-6
7-8
9-10
B
275
285
295
305
330
now say I have 3 as a given value. I would like to compare it with the range of values in A so in a logical sense it would fall under 3-4 and return 285.
I think Vlookup would take part ... maybe an if statement.
It may be simpler to change your A values and use a formula like:
=vlookup(D1,A:B,2)
In which case any value greater than 9 would also return 330 (unless say an IF clause precludes that).
vlookup without a fourth parameter makes inexact matches (as well as exact) and when the first column of the lookup range is sorted ascending will chose the match appropriate to the highest value that is less than the search_key.
Does this formula work as you want:
=LOOKUP(3,ARRAYFORMULA(VALUE(LEFT(FILTER(A:A,LEN(A:A)),SEARCH("-",FILTER(A:A,LEN(A:A)))-1))),FILTER(B:B,LEN(B:B)))
In addition, if you use 'closed ranges' you can try something like:
=ArrayFormula(VLOOKUP("3", {REGEXEXTRACT(A2:A6, "(\d+)-"), B2:B6}, 2, 1))
I have a linear chart with null values as you can see in the first link.
For example my value for the 18th may is calculated between the 18 and the 19.
`http://jsfiddle.net/29WKr/2/`
For the 20th I've a NULL value but I'd like to have a line between the 19 and the 20 like the second picture. I don't want a value for the 20th (I could put the same value as the 19 and have my line but in that case we don't see there is a hole) like here:
`http://jsfiddle.net/29WKr/3/`
In fact I need something like the second chart but with keeping the null value and have a line.
Thanks a lot,
Set connectNulls: true see: http://jsfiddle.net/Fusher/29WKr/4/ .