Skip to content
This repository was archived by the owner on Aug 23, 2025. It is now read-only.
This repository was archived by the owner on Aug 23, 2025. It is now read-only.

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

@rdelhaise-wiiisdom

Description

@rdelhaise-wiiisdom

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions