Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selectMarksByValueAsync function doesn't select the data correctly in a Viz #75

Open
rdelhaise-wiiisdom opened this issue Jul 15, 2024 · 0 comments

Comments

@rdelhaise-wiiisdom
Copy link

Hello,
We recently found out that the selectMarksByValueAsync function is not working properly with a RangeValue as SelectionCriteria.

We used a sample workbook that you can find in the attached file to open a viz on Tableau Cloud with the latest version of the embedding API.
The worksheet represents a SUM(Sales) graph; we want to select every mark between 0 and 20,000.

Steps to reproduce:

  1. Open the viz.

  2. Create a SelectionCriteria as follows:

{
      fieldName: "SUM(Sales)",
      value: {
        min: 0,
        max: 20000
      }
}

Note: we did not add a nullOption here as it's not mandatory but we also tested with all the possible nullOptions.

  1. call the selectMarksByValueAsync function with the select-add selectionUpdateType.

Observed behaviour:

=> Many marks are selected even the ones outside the 0 < value < 20 000 range.

-OR-

=> No values are selected

Expected behaviour:

=> Only the marks in the 0 < value < 20 000 range are selected.

Note: We created a glitch.io with minimalist code to reproduce this issue easily:

  1. Click on the load button (you potentially need to manually log to Tableau if the token is not present on your browser)
  2. Click on the "Select marks" button

If the link to the viz to open does not work, you can easily edit here on l.12 of script.js

Worksheet | Embedding API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant