One way to do this could be to place 'discrete' sum(number of records) on the size shelf of the first axis in every sheet and nothing on size on the second axis. The size slider should be pulled all the way to the right on both the axes. This will make sure you have identically sized 1st and 2nd axis on every sheet, provided you have number of records on all sheets from the same data source.
I took a slightly different approach than Pooja...
- On all sheets move the size slider all the way to the right
- Then in each sheet drop the Measure Name field on the Size shelf for All Mark shelves (both axis).
- Float the sheets on the dashboard directly (not within a container)
- Set Fit to Entire view
- Make the two sheets the exact same size
- Put them side-by-side and line up the horizontal axis borders exactly, so the axis spaces are the same (note in a dual axis both top & bottom adjust at the same time).
Here's the result:
You'll note that the pink bar is 2-3 pixels smaller, but I think that has to do with the Axis borders not being perfectly aligned (which is difficult to do). But hopefully that's close enough. Let me know what version you are using (it's not 9.2) and I can post a workbook for you.
EDIT: To get the right bar to be the big one, you'll have to Edit the Size legend and use Reversed:
Pooja, Shawn --
First Shawn -- Maybe floating these will be smarter than putting them in a container. This thing is going to have to scroll because of the number of these charts. It's a front page dashboard with a pile of these sheets. Each one is a high-level view, and each will have drill-downs to its own dashboard for details. Today there are 16 high level sheets. Over time even more will likely be added. I just threw them in a container for ... I don't know why. Well, actually, yes ... having them stacked in a container lets me control the width of them all uniformly, but that's noise, really. I can set them one by one through the size coordinates easily enough. The dashboard will scroll whether or not the sheets are in a container... So I'll look at that. AND, the axis headers will not be displayed, so that complication will not impact me.
Pooja -- I hadn't thought about putting a value on size. I was sliding the slider to get the width. However I don't want Tableau picking the widths for me. I want to select them. After a bunch of wrangling and visual hair-splitting, the sales/profit bars in the attached updated workbook are the approximate proportions and fonts we've settled on. (And it's not really sales and profits so don't get hung up on those specifics. Just look at the proportions for the bars.)
Also, there are multiple data sources involved here. But right now I'm trying to play with a hard-coded constant calc field. Shawn has me pointed in the direction of sizing the sheets uniformly. Now I just need to propagate bar widths consistently. Once I get one that appeals to them, I want to find something better than just trying to like them up by eye.
So far, using a calc field just gives me a very skinny bar...
superstore -- resize 2.twbx 1,010.7 KB
Right now the sample workbook is 9.0, but I can just as easily play in 9.2 if you would prefer that.
OK, given all that I think you just need to do this:
- Set both Size sliders to the far right
- Create two calculated fields, Top Bar & Bottom Bar, each containing just a 1. (Move to Dimension window.)
- Put them on the Size Shelf on the appropriate Marks Card
- Set the Top Bar Size to Reversed
- Keep the Bottom Bar Size at the default
It seems that in the Default configuration T will use the 'Smallest' size, and the Reversed configuration uses the Largest size. By using these two fields throughout I'm fairly sure you will get uniformity throughout no matter what the data source. Essentially we are playing on Tableau's tendency of using uniform defaults, and working it to our advantage for change .
9.2 workbook attached.
superstore -- resize 2 SW.twbx 1,004.7 KB
I'm still messing with an uncalibrated slider there.
2 of 2 people found this helpful
I would never due this because it's not supported by Tableau (for those following along make a copy of your workbook I'm not responsible for you breaking it), but you can hack the xml to change the size values. Once you get use to the xml format it's not hard to do. Caveat: depending on your pill arrangement and etc etc these values appear in different areas. In your case look for the following in your favorite text editor:
<mark class='Bar' />
Then underneath that look for.
What ever the next values are you can hard code to your hearts content. Same goes for the dashboard placement / size of the sheets. For that part just look at the end of the xml and look for <zones>. Of course, this might not be a choice for you but it can be done and there is not eyeballing the size mark.
P.S Did I mention this is not supported by Tableau?
Not supported, but the best answer yet!
Now THAT is what I'm looking for!!!!
I've done other hacks like that in the XML (such as inserting itentitical things onto a series of dashboards), but I never considered looking for the size in the XML. Of course it's in there!!
PS: You should have mentioned that this is unsupported.
Glad I could help!
Just to follow up a bit on this, I had to poke around to find the right incidence of 'size' because it's used in different contexts within the XML, as you can imagine. And in my case I have two different ones per sheet because I have two different bars per sheet. But it's pretty cool. Just save successive iterations of the file with different names, open and check your work.
And I figured it would work this way, but it was nice to confirm ... Tableau has some gangly looking values in there. Example:
<format attr='size' value='1.08546230234'/>
But I could change that value to '1.1' (or whatever I decided upon) and didn't have to pad out with a pile of zeros. For the record, to make sure I found the right place, I first changed it to 3.0, which bloated the width and clearly told me I was messing with the right stuff.
Also (and this was the second part of my question) I can set the height of the overall sheet so that they'll also all be consistent. For each sheet, near the top of the <style> section is the part that sets the height. It looks like this.
<format attr='height' field='[sqlproxy.xxxx.yyyy].[:Measure Names]' value='177' />
In my case, for testing purposes, I changed what tableau had there (value='77') to 177, and the sheet grew accordingly after I saved and opened the new one.
Geraldo -- You shook the right tree for me. Thanks, man !!
"Just to follow up a bit on this, I had to poke around to find the right incidence of 'size' because it's used in different contexts within the XML, as you can imagine. And in my case I have two different ones per sheet because I have two different bars per sheet. But it's pretty cool."
Hence my caveat! Although, if you scroll up you'll get the worksheet name before the mark element so you can find at least what sheet you're in. Other useful information to find while playing with the xml:
<worksheet name='Sheet 2'>
<dashboard name='Dashboard 1'>
<mark class='Bar' />
<color column='[Sample - Superstore - English (Extract)].[:Measure Names]' />
These parent elements will help you find where you're at in the workbook/xml. I found it easier to start with one dimension/measure/worksheet in your data source drag and drop and see what happens.
"Tableau has some gangly looking values in there."
As for all the decimal places, my wild guess is the I EEE floating point standard Tableau uses. (link below) I played around with negative numbers and they didn't take so I knew there was some limitation on those values.
“Just save successive iterations of the file with different names, open and check your work.”
Not fully tested but I’m pretty sure the range for the bar size is 0 – 2.
Also, you’re very welcome!
P.S. This is not supported by Tableau