How can I render a bar chart horizontally? - azure-application-insights

I'm rendering a bar chart with Kusto using render barchart. My expectation is to see columns displayed on x-axis. Unfortunately with render set to barchart the axis are swapped. Is there an option to swap the axis in Kusto?
customEvents
| summarize event_count=count() by bin(timestamp, 1h)
| render barchart

Silly me. There is dedicated render that swaps axis, and is called columnchart. More info about render can be found here.
customEvents
| summarize event_count=count() by bin(timestamp, 1h)
| render columnchart

Related

In App Insights how to assign text labels to the X-axis values?

Consider the following query:
...
| project minutes, agentCount, maxDOP
| summarize round(avg(minutes)) by agentCount, maxDOP
| order by avg_minutes asc
| project rn=row_number(), avg_minutes, strcat('A', agentCount, 'x', maxDOP, 'M')
| render columnchart
This produces the following graph:
The problem is that the labels down below are sorted lexicographically, which does not correspond to the actual order by avg_minutes. I would like to have these text labels instead of the row numbers on the graph, but I cannot figure out how to do it.
Displaying them inside the bars (turned vertically, of course) is also a solution, if possible. Anything that would make clear which label corresponds to which bar would be much better than the current display.
Column chart is a type of categorical charts allow users to represent a dimension or column on the X-axis of a chart, this is especially useful in histograms.
Coming to your problem -
I would like to have these text labels instead of the row numbers on the graph, but I cannot figure out how to do it.
You can achieve it simply by removing the row number from the project line of the query, as shown below.
...
| project minutes, agentCount, maxDOP
| summarize round(avg(minutes)) by agentCount, maxDOP
| order by avg_minutes asc
| project strcat('A', agentCount, 'x', maxDOP, 'M'), avg_minutes
| render columnchart
I tried something similar with sample data in Azure Data Explorer as and achieved the desired result as shown in the picture below.
I would suggest to read Use Kusto queries document from Microsoft and Chart visualizations document for more information.

Grafana 100% stacked bar chart

How would I achieve this graph?
this is the query i am using
select Region, column1, column2 from table
and the data it returns
is this possible in Grafana? since this is not a time series, i’m not sure… but i wanted to ask anyway, maybe someone knows something…
Bar Chart panel is a first choice for non time series data visualization in the Grafana. Use Orientation: Horizontal and Stacking: 100% + some minor configs may be needed to achieve desired result precisely.

I need to remove labels with 0 value [LibreOffice Calc]

I am creating a very basic dashboard in libreoffice Calc. Right now I am trying to create some piecharts and bar charts. I am facing similar problem with both this type of charts.
Piecharts: I have ALL the labels to the right of the chart, even if those labels have an actual value of 0. I want labels with 0 value not to be displayed.
Bar charts: Similar to Piecharts, I want the chart not to display those X values with 0.
I am using LibreOffice Calc 6.4.7.2
If anyone can help me.
Just filter the source data table
If you want to see the entire data table, you can put the filtering result in another place and build a diagram based on this trimmed data.

How to use stackedbar chart in Web forms?

I have a table consisting of few data.
I have used stacked bar chart in webform. How can i compare the below data ? I trying something like with the y axis with the Machine_name and in the x-axis of having Total, Turn_right and Turn_left.
In stacked bar chart i get something like
.
How am i able to display from the total of 9, Turn right is 2 and turn left is 2. As of the below it adds up which i am not interested.
Note: I am getting the data from sql datasource

Place all axis labels at left and bottom in R lattice xyplot

I would like to alter the default xyplot setting where the axis labels alternate by panel.
xyplot(yield~N | P+K, data=npk)
I realize that it is intentional to avoid overlaps of axis extremes on neighboring panels, but for categorical x-axis labels as shown above, it is not necessary and looks odd for publication.
Is there a way to put all axis labels on the same side as shown below (which I edited in a graphics program)?
While checking to make sure I didn't duplicate a question, I tried some new search terms and found the solution buried in the lengthy xyplot help file.
There is a parameter called “scales” that itself has a bunch of parameters that you can specify, and it has to be in a list. The default for alternating is TRUE and switching it to FALSE will do the trick:
xyplot(yield~N | P+K, data=npk, scales=list(alternating=FALSE))
You can also enter a numeric value for this parameter to determine what side the labels should go on:
xyplot(yield~N | P+K, data=npk, scales=list(alternating=1))
xyplot(yield~N | P+K, data=npk, scales=list(alternating=2))
You can pass it multiple parameters to have each panel behave differently:
xyplot(yield~N | P+K, data=npk, scales=list(alternating=c(1,0)))
Default here is c(1,2)

Resources