how to reduce the space between two bars in highcharts - highcharts

I have only two columns, I want to reduce the space between the first column and the second column. I searched, but it did not help. My charts as flows:
I hope to achieve this effect:
I have only two Columns, but to achieve this goal, I faked three columns, but their nums are all zero.So it looks like two columns, but actually there are five columns.But this is ugly, are there some elegent method?
Any help will be appreciated.

Related

Google Sheets: How to make a stacked/aggregate chart

I have made a bar chart which aggregates my data, but is there any way I can split each bar based on the data it is aggregating - similar to how a stacked bar chart would look?
Here is a bad artists impression (thick blue lines mine). The idea is that it's important to know from looking at the graph if I sold 5 at £1, or 1 at £5.
Ideally this would work even if the price for each item is variable, but that is not essential (eg: if there is a 'hack' with hardcoding Apple = 3, I can live with that.)
I'm also fine inputting helper columns etc, within reason, but I would want to be able to easily continue to add things to the list on the left without having to add new helper columns each time (calculated ones are fine, of course.)
Thanks in advance.
UPDATE: With thanks to Kin Siang below, I ended up implementing a slightly modified version of their solution, which I am posting here for completeness.
I added a very large (but finite) number of helper columns to the right, with a formula in each cell which would look for the nth occurrence of the item in the main list (wrapped in an iferror to make the unused cells blank).
=iferror(index(FILTER($A:$B,$A:$A=$D2),E$1,2))
Theoretically it could run out of space one day, but I have made it suitably large that this should not be an issue. It has the advantage over the other solution that I do not need to sort or otherwise manipulate the input range and can continue trickling in data to the main list and have the chart automatically update.
Yes, it is possible to display the chart in your case, however need some data transpose in order to do so, let me show you the example with dataset
Assuming this is your original data:
First sort the data by alphabet, and enter this formula in new column
=if(G39="",1,if(G40=G39,I39+1,if(G40<>G39,1)))
Next add new column for categorical purpose, by using concatenate function
="Price"&I40
In the transform data for chart purpose, enter this formula to split all price into different row, different column for different product
=sumifs($H$40:$H$47,$G$40:$G$47,$A41,$J$40:$J$47,B$40)
After that i select stack bar chart and ensure the price in under series, in case in 23 will have some problem to set price at series correctly, you can use 33 data create stack bar chart and update the data range again, it will work also
Here is the cute chart you expected, accept if help :)
*When certain fruit has less price record, it is advised to fill in 0, as the data table need in same column (see the orange price 3), although I didnot test if blank

Google sheets filter custom formula is moved by one row

I created a column of total profit in google sheets and my goal is to filter values which are less then 70% of previous profit value (screenshot so you can understand).
But when I apply this condition to the filter custom formula (here) is not filtering the values which are less then 70% but the values before them, instead it is moved by one row (hopefully you will understand).
It may be it is something easy to fix but i really couldn't find out. Thanks for your future advice and time!
*EDIT: https://docs.google.com/spreadsheets/d/1JcHVrpOCLEdMiTF3YD0qvJiHPsi6J2QwFPN-XOfAipY/edit?usp=sharing sheet in view mode
try to shift it:
=$B2/$B1>0.7

With 3 columns how would I apply a formula to the first 2 and display the result in the 3rd?

In Google Sheets I want to get the sum of the first 2 columns and display that result in the 3rd column all the way down. Like this:
I'm hoping for a solution that does this in one step. As I have many rows.
Edit: I am aware of this question: Apply formula to the entire column and it appears to only cover part of what I am asking.
Try:
=arrayformula(if(A2:A<>"",ADD(A2:A,B2:B),""))

Highcharts: stacked column with grouped categories

I'm trying to do a chart with stacked columns but for each column having different entries. I will explain myself better.
I would like to use the demo of Highcharts:
http://www.highcharts.com/demo/column-stacked
But:
In the demo, the series are always the same: John, Jane and Joe. What I need, is to have different series for each column (xAxis category). I tried the plugin "https://raw.github.com/blacklabel/grouped_categories. This is fine to have multiple series grouped, but the grouped series are split into multiple columns: I need just one stacked column for each multiple series.
For example:
I want to group the population living in the west coast: I need a stacked column with the data from CA, WA and so on, And the column should clearly show every state, one on the top of the other. Then, in another column I want to group the population of the east coast, grouping in one column FL, NY and so on.
Can someone please help me?
Many thanks
Vignus

How to create stacked and grouped columns in Highcharts?

I'd like to create a grouped, stacked column chart. There should be two columns (2000, 2050) for each region (OECD, BRICS, ...), and each of the columns has the same multiple categories. Here is what I came up with so far.
The thing is that I have no idea how to display the "2000" and "2050"; as well as how to avoid that the categories are being displayed two times in the legend.
Thanks for any hints!
I solved this (partly) by fiddling with the showInLegend and legendItemClick
See my fiddle: http://jsfiddle.net/b72e0vh4/3/

Resources