Labels from multiple series overlap - highcharts

I have a container within which multiple series are displayed; I'm getting the data for the series from somewhere out of my reach. Each series has a label attached to it's last value.
The problem is that when the values from several series are close to each other, the labels overlap each other. I tried a couple of things which didn't work; I realize now the problem was I tried to adjust the settings of the individual series while what I need should somehow apply to combinations of series. I had no luck trying to find out how to get what I need.
Here's my fiddle. You can see there how the label "70" completely overlaps label "71" so the latter is not visible at all. If I remove the "70" label from the chart, "71" can be seen.
`http://jsfiddle.net/oybn2kax/8/`
Is there anything that can be done so that the labels are displayed in a way for both of them to be visible even if the values are close to each other?
Thanks a lot for your help and have a good time!

Related

Data on a dual y-axis chart is not graphing properly. How do I fix it?

I'm trying to graph two data sets on the same graph with two different y-axis. They are both over the same overall time scale (~330 hours), but the individual observations are different. When I graph the data I get one set formatted and graphed correctly, but the other is squeezed all the way to the right of the chart.
Is there any way to fix this issue? Thanks
I've tried switiching which elasped hours is the x-axis, but it always results in one correctly graphed set and one messed up set.

Hide some Legend Items in Line Chart

I have my line chart showing all the data properly, including some annotated values which are meant to act as the label in the last data point for the lines. I wanted to do it this way so that I don't have to show literally every data label for every data point.
I have everything working correctly, but I noticed I am unable to remove the annotated legend item without removing the series. By removing the series, I lose the label. Below is my chart.
As you can see, the last data points are working as labels (1092 for example). The problem is you can also see each annotated item in the legend (the colored dashes with no text next to them). How can I only show the legend items for Gained (green), Lost (red), Net (gained - lost) (yellow), and Total (blue), without the other dashes? Is this doable?
I am also open to seeing if there is another way to have only the last data point have a data label in Google Sheets. I was just working off of this tutorial.
Below is a screenshot of some of my data rows in an accompanying sheet.
as long as the annotation column is specified as 'Label' for the primary column you shouldn't be seeing the former in legend

Google Sheets Formula Sometimes does not work with Merged Cells

So I have created an invoice spreadsheet in Google Sheets and have used merged cells extensively in order to create a cleaner look for the invoice.
Here is the problem that I am having: sometimes, my simple subtraction formula does not give me a correct result. The formula is supposed to subtract the Unsold balance (cell V27) from the Beginning Balance (cell R27).
Again, there is nothing wrong with the formula itself, as it works correctly 99% of the time, but every now and then, it just gives me an answer matching the Beginning Balance.
Also here is a link to a copy of the spreadsheet for anyone willing to take a look. https://docs.google.com/spreadsheets/d/1bf_QE-u36mo4AKyqg7Dk11gwoR0p5g0qveIazR83Xbk/edit?usp=sharing
Has anyone else ever had this situation happen to them? What could possibly be causing it, and more importantly, how can it be fixed to be more reliable?
Those of us who work professionally developing Sheets solutions have a few basic rules that we follow and encourage others not to break. Among them is "Never merge cells anywhere that calculations or comparisons will be (or ever might be) performed or assessed."
While what you're seeing might seem to be a glitch, I wouldn't call it that. Merged cells don't really get rid of the cells you don't see. For instance, your cell R27 doesn't "get rid of" cells S27, T27 and U27. It just holds them in memory, presumably empty. But remember that, inside Sheets' "memory," it doesn't "see" a grid. It's just 1's and 0's. When a grid is new and no cells are merged, Sheets "finds" each cell (using the best analogy I can give) counting over and down by 1's and 0's that are very small and tightly packed. Hold that thought...
Also note that many people are surprised when they have multiple complex calculations going on and get a returned answer that is off from what they expect in a cell further down the calculation chain. This is because Sheets uses floating decimal points. For instance, "one divided by three" is about 0.333. But in reality, that extends very far out: 0.33333333333333333333. But that can't go on forever or Sheets wouldn't be able to run. So at some point it gets truncated. Eventually, those extra decimal-extras will start to add up and bump numbers up (or down) by small degrees. All of this is handled by the same 1's and 0's that run everything else.
Back to merged cells. Finding and accurately "reading" merged cells gets less accurate the more of them you merge, because the process is relative to other cell locations in memory. After a while, the "floating decimal point" nature of Sheets starts to lose track, especially (I've observed) if you've got merged cells using the same sort of relative formula reference that you're using (e.g., a lot of your stacked merged cells are referencing yet another merged cell: BB2. So (again by analogy), Sheets is trying to "guess where it is by using clues." Perhaps it found something correctly in merged cells Z-AA-AB-AC23 that referenced merged cells BB2-BB3-BC2-BC3; but that time, you asked it to add merged cells R-S-T-U23 and V-W-X-Y23 and subtract merged cells V-W-X-Y24 ... where in the following set of merged cells, Z-AA-AB-AC24, you still asked for the BB2-BB3-BC2-BC3 reference but not the V-W-X-Y24 subtraction. And so on...
To add to this, you've got row heights changed all over the place. Some are set to specific heights, while others are fit to data.
You get the picture.
If Sheets is trying to find things by moving over and down from cell A1, but there is no regularity, sometimes, it just throws it's hands up and says, "Where the h-double-hockey-sticks am I anymore?" When you then reload the sheet or delete and replace the formula, it starts out at A1 again and plays Chutes and Ladders on the broken board and might shift one "floating" teeny-weeny 1 or 0 a different way from last time... and find what you wanted it to find again.
You also-also wind up with a sheet that is 56 columns across, when you probably only needed it to be 12 or 15. Likewise, you've extended the number of rows beyond what it needed to be. So you're slowing down your processing by a lot.
THE SHORT VERSION:
As nice as merged cells might look, they are a computing nightmare. I've been working with spreadsheets since they were invented, and I've literally never had a need for merged cells (though I've occasionally used them in areas that are purely aesthetic).
THE SOLUTIONS:
1.) Remake the sheet without merged cells.
-or-
2.) Try encompassing all of the merged-but-hidden cells in your calculations. This at least gives Sheets a wider net to cast. For instance, in your example above, you reference this formula:
=IF($BB$2<>"Rental","",R27-V27)
Try (where possible) to include the whole range you merged:
=IF($BB$2<>"Rental", "", SUM(R27:U27) - SUM(V27:Y27) )
Technically, you could also include all cells in the BB2-BB3-BC2-BC3 merge:
=IF(AND($BB$2<>"Rental", $BB$3<>"Rental", $BC$2<>"Rental", $BC$3<>"Rental"), "", SUM(R27:U27) - SUM(V27:Y27) )
However, try the shorter route with just the SUMmed merged ranges and see if it holds up. If so, stick with that. If not, go with referencing every cell in ranges you merged.
You've clearly put a lot of work into setting up this sheet. So I'm sure this isn't the easy answer you were hoping to hear. But I hope it does give you some direction for next steps.
For me, the simplest solution is to lock-reference the uppermost cell of the merged cells.
Instead of referencing in the top formula as B2, reference as $B$2. This way, your formulas in other cells will reference the same value as required.
USE LOCK-REFERENCING:
$B$2

Highcharts compare different dates ranges

I'd like to use highstock to compare two different time ranges together.
For example, for two data sets, one that shows the max temp for each day in Jan and the other one for Feb (for example), I'd like them to be shown one above the other, with the x-axis being the "same" one for both.
I can't do it with categories, because the data is being fed automatically, so each data point has its own time, so the x-axis is datetime.
I wanted to know if it was possible to simply have two graphs overlapping, with one graph having the normal x-axis at the bottom, and the other one having on top of the graph, so even when the data is for different times, it's shown overlapping. I can't find this problem anywhere.
Found the answer on this thread. Hope it helps!
Overlay 2 series of data of different length with highcharts
Essential Chart can be used with different date ranges with multiple axes. example source
The community license provides the whole suite of products for free if you qualify.
Note: I work for Syncfusion.

Highcharts - zooming to single day pushes column off graph

When zooming to a single date on a column graph with two series one of the columns gets pushed outside of the chart drawing area.
You can see it in action here http://alfred.stlouisfed.org/graph/?g=Sfs
and here is a screenshot of the dev inspector highlighting where it appears off the graph edge
Has anyone seen this before? Or have any idea what settings may be affecting it? It works okay if you zoom out to two dates, but unfortunetly the product owners are insisting on only showing one date.
Thanks!
Every two columns of your data is for three months, not for a day. The chart selects a starting point for every timerange and sticks to it. If you zoom in the empty area in the scale of a day you will see nothing. So correct your data, or your scale of zooming.

Resources