Conversion of a stacked bar chart to a 100% proportional stacked bar chart - charts

I am currently working on a dashboard to analyze the job market in Singapore. I made a stacked bar chart for job functions vs career level. My supervisor asked me to create a proportional stacked bar chart to see the clear difference in ratios of the career levels.
The dimensions I used was Job Function (jobs of specific industry such as accounting, admin etc) and Career level (jobs of career level such as entry middle and senior) and
The expressions I used was Count(Job Function). The issue is I can't make a proportional chart as the count of jobs varies for each career level for every job function.

Without seeing a sample of the data and exactly how you are displaying it I cannot give you an example.
From what I understand you want the min and max values in the chart (on y axis) to not change based on your selections?
You would have to create a variable and get the max value for said chart, and use set analysis to ignore selections. You would then use this variable in your Properties->Axes->Scale on the object/chart.

Related

Merging Percentage Lines with The Bars in Tableau Desktop

I have a graph that shows the ratio (count) of payable vs. processed words among the total words on stacked bars. I would also like to display the same ratio in percentages in lines overlapping the bars.
At the moment I have them in two separate graphs, but I want to merge them so that it takes less space in my dashboard view. I am unable to select the dual combination view as it requires two measures and even though I keep trying to cmd+click+drag the percentage measure pill to my marks, it's only changing the calculations in the bars but not allowing me to select the dual combination view.
Since the percentages are basically the ratio of the green/total in the bars, I don't think I need any complicated configurations for displaying it, however, I am also failing to achieve what I want.
Could you please tell me how to do this visualization?
Edit: I noticed that the reason I couldn't generate the dual combination view was that I had three date pills (year, quarter, month), and by removing two of them, I'm able to generate the dual combination view, but it's far from what I'm looking for as it's only splitting the stacked bar into bar+line.
Neeku, I certainly understand the desire to minimize "real estate" in your dashboard. If I understand your needs correctly, I believe that overlaying a transparent-background chart over the first chart might meet your needs, if a dual-axis chart doesn't work for you (for example, if you wanted to overlay a line chart on a column chart that is itself already dual axis).
By way of example, here is a simple Sample Superstore dashboard with a line chart on top and a stacked column at the bottom.
simple dashboard
Change the line chart to "Floating"
Size it to fit over your column chart and change the background to transparent by clicking anywhere in the line chart and select "Format"
...Format Shading
...and "None" for the color selection
Your line chart is now an overlay, but it's pretty messy.
Click on the line chart and hide field labels,
...turn off "Show Header" for each pill in the line chart
Clean things up and it should look better:
Note: one big issue with this approach is that you will not be able to click to select chart elements of the underlying chart.

Time Stack Chart with years as horizontal axis

I want to add a stacked chart but could not find a way to customize the time-axis.
Currently my x-axis refers to days, however, I search for a way to display years. Since I want a stacked chart that changes over time, I believe I need to use the 'Time Stack Chart' (see screenshot). I would also be happy with simply several stacked bars next to each other (each bar represents one year), but the 'Bar Chart' only supports one bar (I believe).
My model collects data from different sources on the last day of the year and then my chart should display this value for the year, categorized by source. I have tried with different data sets, both where the time is the horizontal value and where it is not.
When I use a dataset where one value is 'Years' (through the getYear() function) this works fine for plots, but not when I want to have a stacked chart (which by default depends on the time).
Is there a solution to this?
Please let me know if you need further information!
You need to go to the appearance part, time axis format, set it to yyyy. Also in the scale section, you need to change model time units to years.

Tableau - Fixed count of datapoints per pane

I'm trying to build a shewhart-style control chart in Tableau and having trouble with setting a fixed sample size for the data points plotted on the chart. Consistent sample sizes are critical for setting accurate control limits so I'm dead in the water until I can specify that tableau only use 10-30 random rows to calculate each point on the chart.
I thought I could accomplish this by returning a random number in my query and filtering on the top N results for each pane but I can't seem to wrap my head around how to actually execute that.

Grafana bar graph sorting, lower values not visible

I have a bar graph in Grafana (with InfluxDb). Its grouped by time and a tag. But I noticed that the large values are being drawn over the lower values.
Example below. You can see the points where the lower value bars are. I would expect that the lower values are drawn on top. Is this a setting?
Query:
Looking at your data it appears to be showing the time spent in each component of a request pipeline, so my suggestion would be to present them as stacked bars, which will better represent how each contributes to the total time spent.
You can enable stacked mode on the Display tab of the graph edit panel.
If you're more interested in seeing how each item compares to the others, then maybe a line or point plot would be easier to read, especially as superimposed bars will be be assumed to be stacked by most viewers.

How to apply horizontal break to a d3.js bar chart

I am using Rickshaw (based on d3.js) to plot stacked bar charts. The problem is that the first bar is usually way more higher than the others, ruining the visual feedback.
Using logarithmic scale is (I guess) not an option here, because then the proportions between stacks in a bar will get broken. I wanted to introduce a horizontal break like in following image:
However, I cannot find any out-of-the box feature of Rickshaw or d3.js to do something like this. Any suggestions on how to make one?
This would require quite a bit of additional work. Here's an outline of what you would have to do.
Create two scales, one for the lower part and one for the upper. Set domains and ranges accordingly.
Pass values to the lower scale, capping them at the maximum domain value such that bars that are longer will reach the maximum.
Pass values to the upper scale, filtering those that are lower than the minimum.
You basically need to create two graphs that are aligned with each other to give the impression that there's just one. If you keep that in mind, doing it shouldn't be too difficult.
Here's a quick and dirty proof of concept that uses the linear scale's .clamp(true) to prevent the bars from becoming too long for values outside the domain.
The d3fc-discontinuous-scale component adapts any other scale (for example a d3 linear scale) and adding the concept of discontinuities. These discontinuities are determined via a 'discontinuity provider', which can be used to create one or more 'gaps' in a scale.
For example, to remove a range, you can construct a scale as follows:
var scale = scaleDiscontinuous(scaleLinear())
.discontinuityProvider(discontinuityRange([50, 75]))
Here is a complete example that shows how to use this to create a 'break' in a scale in order to render values that have large gaps in their overall range.
https://bl.ocks.org/ColinEberhardt/b60919a17c0b14d745c881f48effe681