I'd be interested in what you come up with, as I've occasionally wanted to do something similar.
I think the minimum bar (or any mark) width is 2 pixels, which you can get by selecting Fit height / width / entire view. If the number of rows is greater than the number of pixels/2, Tableau will start dropping rows (in the case of a discrete dimension). You can workaround this somewhat by putting the worksheet in a dashboard and selecting a dashboard size that is ~2x the number of rows. But the max dashboard height, width is 4000 pixels. Perhaps you could use paging to go through a screen of data at a time or wrap the rows.
Emil, in the future please include a packaged workbook with some sample data, it would save time in making responses without having to manufacture data. See So Your Question Didn't Get Answered... for details.
Jim, I didn't know the minimum size was 2 pixels…fascinating. Here's a bar and a line, the line looks smaller than the bar, but it's a little fuzzy, like some shading or anti-aliasing is going on:
here's a 400% blown up screenshot of a bar, and it's 2 pixels:
And here's a line, also at 400% - yep, there's some shading there:
I did a test with the lines with no spacing and only 1px wide, the anti-aliasing causes a problem. Where I circled the image, the antialiasing of the darker blue line makes the shorter lighter blue line look like it's taller when at at full resolution.
So, 2px bars it is. (Though I wonder how Tableau works with Retina displays, is that 2px really 2px on the Retina display, or is it 4px)?
Here's a way to get 2px wide bars with no spacing:
- Build your worksheet
- Set the Size slider to be 0
- On the Color Shelf, turn off Borders.
- Make sure you are using a continuous dimension or measure on Columns.
- Fix the Columns continuous pill's axis size to have Start = minimum value of continuous pill -1 and End = maximum value of continuous pill +1. This is because Tableau draws bars on the center of each tick, so if we have the axis range the same as the data range then Tableau will cut off the first and last bars.
- Put the worksheet in a dashboard. If it's just one worksheet in a dashboard in a tiled layout, the width needs to be:
2 pixels * number of bars = N pixels
+ 8 pixel padding margin * 2 sides = 16 pixels
+ 1 pixel border margin * 2 sides = 2 pixels
+ space at end of axis = 1 pixel
For a floating element, use the same equation for the width of the view, only take out the 16 pixels from the padding margin.
I set up both in the attached.
Finally, I recommend against using red/green in a view like this because red/green color blind folks wouldn't be able to make out the difference between the bars.
2 pixel bars.twbx.zip 29.9 KB
Thanks for the suggestion of including workbook. I did so in my latest post on another topic.