1 of 1 people found this helpful
This is not currently possible with the JS API. The API also basically creates an iframe view of the dashboard instead of creating it inline, so you would have trouble formatting inside the iframe with CSS as well.
Thank you for your response. I had anticipated that it might not be possible.
Anyway, is there any other way we can control text formatting of Tableau for responsive purposes?
If you have the dashboard set to "automatic" or "range", it will rearrange the font to fit inside the newly sized boxes, but it does not seem to make it larger.
At TC15, they announced some mobile/tablet changes that would switch out dashboard formatting based on the viewport.
You could do something similar by having two different dashboards and switching them out dynamically, based on the user's screensize.
Thank you for your response. Actually, I'm working with the ranges option right now. But this has some limitations. After around 700px and below, the tables stop shrinking and the part which do not fit the screen size are hidden without a scrollbar.
The feature you mentioned, finding the viewport and switching the dashboards, actually we have been doing that for some time now. But we don't use Tableau Script or feature for that, we have written our own custom code to do that.
We are actually trying to make that single dashboard work across all device sizes and have gained some success but the Internal data of Tableau just isn't as flexible. Some of them get squeezed and data are hidden under another data disturbing the information.
They recently rolled out 9.2 but still there aren't much promising features for mobile viewing yet. I saw the tableau IOS app for mobile and I thought to myself, why would they develop an IOS app to use the Tableau instead of making it better viewable from mobile devices first? I'm not sure how the app actually works yet.