PulseActions | Tableau Embedding API

Interface PulseActions

Actions related to events and state of the Pulse metric

interface PulseActions {
    addFilter(fieldName: string, value: string): void;
    applyFilterAsync(
        fieldName: string,
        values: PulseFieldValueArray,
        updateType: FilterUpdateType,
        options: FilterOptions,
    ): Promise<string>;
    applyFiltersAsync(
        filters: {
            fieldName: string;
            options: FilterOptions;
            updateType: FilterUpdateType;
            values: PulseFieldValueArray;
        }[],
    ): Promise<string[]>;
    applyTimeDimensionAsync(timeDimension: PulseTimeDimension): Promise<void>;
    clearAllFiltersAsync(): Promise<void>;
    clearFilterAsync(fieldNames: string): Promise<string>;
    clearFiltersAsync(fieldNames: string[]): Promise<string[]>;
    getFiltersAsync(): Promise<PulseFilter[]>;
    getTimeDimensionAsync(): Promise<PulseTimeDimension>;
    resize(): void;
}

Hierarchy (View Summary)

Index

Methods

  • Use this method to filter the Pulse metric before initialization. If used after initialization, it will re-render the metric. For filtering after initialization, use the other filtering methods, such as applyFilterAsync.

    If you add the same filter fields using the addFilter() method and by using the <pulse-filter> element in the <tableau-pulse> web component, you might experience unexpected behavior.

    Parameters

    • fieldName: string

      The name of the field to filter on.

    • value: string

      Single value or a list of comma separated values to filter on.

      pulse.addFilter('Region', 'Central,West');
      

    Returns void

  • Applies the list of provided categorical filter values to the Pulse metric.

    Parameters

    Returns Promise<string>

    The field name that the filter is applied on.

  • Applies at least one categorical filter value to the Pulse metric.

    Parameters

    Returns Promise<string[]>

    The field names that the filter was applied on.

  • Applies the time dimension to the Pulse metric.

    Parameters

    Returns Promise<void>

  • Resets all the existing filters on the Pulse metric.

    Returns Promise<void>

  • Resets the existing filter for the given field on the Pulse metric.

    Parameters

    • fieldNames: string

    Returns Promise<string>

    The field to clear filter on.

  • Resets the existing filter for the given fields on the Pulse metric.

    Parameters

    • fieldNames: string[]

      The name of the fields to clear filter on.

    Returns Promise<string[]>

    The fields to clear filter on.

  • Gets a list of filters for the Pulse metric.

    Returns Promise<PulseFilter[]>

    The list of filters.

  • Use this method to readjust the dimensions of the embedded Pulse metric in response to things like a window resize, device orientation change, or parent container resize.

    window.addEventListener('resize', () => pulse.resize());

    new ResizeObserver(() => pulse.resize()).observe(pulse.parentElement);

    Returns void