Grafana: x-axis text overlapped in Series mode - histogram

I am using Grafana to build a histogram like below (Mode is Series, not Time).
The category text at the x-axis are overlapped. Is there a way to break each category text into two or more lines?
Also, why is it saying "data points outside time range"? Thanks!

You can manipulate the legend by for example using alias() in your query. You can add html tags, for example alias(Abnormal Sound<br>Detect) will be displayed in two lines. Of course, it depends on your query if / how you can use this.
As for your second question, without a query I would assume, that your query has a missing $timefilter also ordering the result by time can help.

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

How to create two histograms on one plot with shared axis?

I tried to plot arrival delay and departure delay columns separately, it's clear the distributions are different.
I would like to show them on the same plot, but whenever I try to do so, both plots became one identical shaped distribution although I'm plotting two different columns! What am I doing wrong?
Thank you for your help in advance.
You need a Departure Delay (bin) field. You can create one by selecting Departure Delay in the data pane on the left sidebar and selecting Create bin.
Once you have that new field, you can place it on the Columns shelf next to the other bin field and just put SUM([Number of Records]) on the Rows shelf — getting rid of both CNT() fields.
That should let you see both histograms.
To answer your question about why your previous approach yielded the same chart, you were binning data in both cases by the Arrival delay.
The CNT([xxx]) fields are misleading. That just counts the number of records that have a non-null value in the [xxx] field. If [xxx] always has a value, its equivalent to SUM[Number of Records]). The bin field is what matters.

sumif function in excel to display percentage based on text

I am attempting to display a progress percentage in a single cell based on the choice of "completion" from a data validation list that spans multiple columns and cells.
I have attached a screen grab that will hopefully better explain. I would like the "Overall status cell (B3) to display the percentage of "Completes" that will track overall progress of requirements.
I have narrowed to a "sumif" function based on research and former templates but cannot achieve the desired result. Any help would be excellent. Thank you in advance.
You would want to do a =(COUNTIF(C5:C100, "Completed")/COUNTA(C5:C100)).
Obviously, you might want to change the range.
E2A: =SUMIF adds numbers together. Because you're looking at Text, you'll want to do a =COUNTIF and =COUNTA.

Highcharts Column chart Series data formatting change

I have a simple column chart where the yAxis series data contains numeric strings in the millions and tens of millions. The chart therefore displays the graph numbers like this: "12.5M"(on the side of the grid) and in the points tooltip it is being displayed with a decimal point at the end. How do I make the data be shown in the thousands with commas? Will the chart be adjusted automatically to display more grid lines and raise the columns higher? Thanks a lot in advance.
I would have added an image, however it seems that that requires more reputation points. Sorry. Here's a link to it Screenshot
1) you can change the formatting of the axis labels by setting your own format with the formatter function
http://api.highcharts.com/highcharts#yAxis.labels.formatter
2) you can change the number of ticks by setting a tickInterval or tickPixel interval setting
http://api.highcharts.com/highcharts#yAxis.tickInterval
http://api.highcharts.com/highcharts#yAxis.tickPixelInterval
3) You can change how much extra space is added at the top/how many ticks there are, in part, by setting the maxPadding setting to 0
http://api.highcharts.com/highcharts#yAxis.maxPadding
When you have a small chart like the one you posted, Highcharts will often have trouble adapting its normal tick pattern, and you will often end up with just a min and max tick by default.
It's pretty easy to work these setting to get what you need though.

High Charts add variance instead of values

Hi am using high charts in my website and they are just awesome.I wold like to know whether there is any option to include variance in graph instead of the original values like the one in below snip.
instead of displaying the values of each bars i would like to display the difference between two.Is this possible?Thanks in advance
You need to enabled dataLabels for one series, and disable for second one. Then in dataLabels.formatter you need to compare values, and return value you want.

Resources