All Your Shape are Belong to Us.

Mike Klaczynski's picture
Posted by Mike Klaczynskion April 25, 2014

Editor's note: Matt York is a long-time Software Developer extraordinaire at Tableau.

Want to borrow custom shapes from a Tableau Public workbook? That used to be an adventure.

Now there’s the Tableau Custom Shape Extractor

After adding to your bookmarks bar:

Follow these instructions if you need help adding the shapes to Tableau.

A couple vizs to try:

What is this magic? How does it work?

First a little background on how Tableau stores custom shapes.

Tableau saves workbooks as xml in a twb file. When a workbook uses custom shapes, Tableau converts the custom shape image files into text and saves them in the xml.

Heaps of random characters! Those random characters are the shape image data stored as text (base64 encoded).

The good thing about this approach: the twb can be passed around to different computers and the custom shapes go with it. No need to pass around custom shape folders.

The bad thing about this approach: there’s no easy way to reuse the custom shapes in other workbooks unless you have access to the original shape files.
Of course, on Tableau Public you don’t have access to the original shape files.

Over the years enterprising folks used hacks to extract shapes from the Public workbooks. The hacks follow this pattern:

  1. Download the twbx (a packaged workbook)
  2. Unzip the twbx (a twbx is just a zip folder with data, twb, and other supporting files)
  3. Locate the twb in the unzipped folders
  4. Open the twb as an xml file
  5. Convert the base64 encoded image data to images

Can’t we write some code that does this for us?

Yes. Yes we can. Yes we did.

Here’s what happens when you click the bookmarklet:

  1. Your Browser sends the url of the viz to the Shapes Web Server
  2. The Shapes Web Server requests the twbx from Tableau Public
  3. Tableau Public delivers the twbx
  4. The web server extracts the shapes from the twbx, and zips them together
  5. You download the zipped shapes


Happy vizzing and long live Jigglypuff.


So I am reading this blog entry and it's well written and has some cool technical description behind the implementation (save for the title which seems awkward when read back).

I was looking for the bookmarklet but your picture that notifies the user of the bookmarklet points to empty space.

I am wondering if this link "shapeextractor" on "" is suppose to bke the bookmarklet. I tried to drag it to the bookmarks bar but it didn't seem to work (using Avast Ultimate 2014 Build 2).

I might just have to manual make a bookmark.

Oh I found the bookmarklet.

The picture that notifies the user is to place the idea inside the mind of the user.

Click the link "Customs Shape Extractor" link and when that page loads the same picture you saw with the arrow will have a green button within the picture. This green button is the bookmarklet that can be dragged to the Bookmark Bar.

I guess you're just hosting the Bookmarklet on Heroku's platform.

When I add custom shapes to my chart there are borders around each of them. Is there any way to delete the borders?