Comments (7)
We're taking a look at this.
from extensions-api.
Great to hear! This would allow me to strip a really ugly hack out of my extension code 😅
from extensions-api.
@tjallingt What is the locale of you Desktop instance set to? If it's not en-US, can you try reproducing with it set to en-US?
from extensions-api.
My locale is set to en-US:
from extensions-api.
OK, It does have to do with your machine's locale and therefore how Tableau is displaying the parameter. With my os language set to English, I could not reproduce this ('0.1' showed 10.00% in the param), but then I changed my os language to French and that changed how Tableau was displaying the value in the param to 10,00% (similar to your screenshot). Now, I have to pass in '0,1' for it to work and '0.1' throws an error.
So in a way that feels consistent, but I also repro'd what you said about param.currentValue returning '0.1' even when the param is using commas for delimeters. So that is inconsistent and we also have to make sure the allowableValues gives you the right info to know what to pass in.
Thanks for letting us know about this.
from extensions-api.
Hey @Kovner thanks for your response, great to hear you figured out what is causing this strange behaviour 👍
So i see two bugs and a feature request here, the bugs (as i see it):
- the allowableValues is giving me a value that does not match what changeValueAsync expects
- the locale returned by tableau is somehow not the locale that is actually used for localisation of the data (if my locale was causing this problem why did tableau report my locale to be
en-us
?)
The feature request concerns the fact that obviously string representations of numeric values are not perfect (especially when casting is made difficult by different localisations of the same value). It would be great if allowableValues and changeValueAsync would just use floating point numbers for percentages.
I'm assuming the reason the extension API is spitting out strings is somehow tied to how Tableau is handling this data internally so there might not be a quick fix for that but perhaps the extension api could supply us with a localisation method that takes care of correctly formatting percentages for changeValueAsync (and all the other places values are expected to be localised of course)
from extensions-api.
Yep, I agree with all of that. We'll look into it soon, but I'm not sure whether any related fixes will be in v1 of Extensions API or post-v1. And if it's post-v1, we'll have to be sure to not make breaking changes.
from extensions-api.
Related Issues (20)
- Embedded extensions not respecting the "Hide" login prompt setting HOT 2
- Consider removing Community Portal from docs HOT 3
- Future documentation improvements
- Permission mismatch on Tableau Server/Online HOT 2
- Transparency for non sandboxed extensions HOT 4
- Tooltips do not display on dashboards with an extension - 2021.4 HOT 1
- Kepler.gl Extension breaks in 2021.1+ versions of Tableau Desktop HOT 3
- No way to apply parameters to data retrieved HOT 3
- Can't start extension after adding a table HOT 3
- Using Sets on filter causes getMarksAsync error HOT 4
- Artifactory links need to be replaced in Tutorial\ReactVersion\yarn.lock HOT 2
- MarksInfo undefined using getSummaryDataAsync HOT 1
- npm tableau/tabextsandbox has vulnerabilities HOT 2
- The extension javascript files contain sourceMappingURL, but not the actual map files. HOT 6
- Finding the padding on a dashboard object HOT 1
- Extensions API crashes when dashboard contains worksheet with lots of data. HOT 8
- Question / Possible Issue: Working with Azure App Service deployment is non-responsive HOT 2
- Extension API crashes while extracting worksheet data HOT 1
- Extension api breaks when there is no data in sheet, Issue related to DataTableReader HOT 9
- Command "." not found when running "npm run tslint"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from extensions-api.