Interface Pulse
disableExploreFilter?: boolean;
height?: string | number;
iframeAttributeClass?: string;
iframeAttributeLoading?: string;
iframeAttributeStyle?: string;
layout?: PulseLayout;
src?: null | string;
theme?: string;
timeDimension?: PulseTimeDimension;
token?: string;
width?: string | number;
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
Properties
Methods
addFilter
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
- fieldName: string
applyFilterAsync
- applyFilterAsync(
fieldName: string,
values: PulseFieldValueArray,
updateType: FilterUpdateType,
options: FilterOptions,
): Promise<string>Applies the list of provided categorical filter values to the Pulse metric.
Parameters
- fieldName: string
The name of the field to filter on.
- values: PulseFieldValueArray
The list of values to filter on.
- updateType: FilterUpdateType
The update type of this filter (add, all, remove, replace).
- options: FilterOptions
Returns Promise<string>
The field name that the filter is applied on.
- fieldName: string
applyFiltersAsync
- applyFiltersAsync(
filters: {
fieldName: string;
options: FilterOptions;
updateType: FilterUpdateType;
values: PulseFieldValueArray;
}[],
): Promise<string[]>Applies at least one categorical filter value to the Pulse metric.
Parameters
- filters: {
fieldName: string;
options: FilterOptions;
updateType: FilterUpdateType;
values: PulseFieldValueArray;
}[]The set of filters to apply.
Returns Promise<string[]>
The field names that the filter was applied on.
- filters: {
applyTimeDimensionAsync
Applies the time dimension to the Pulse metric.
Parameters
- timeDimension: PulseTimeDimension
The time dimension to apply
Returns Promise<void>
- timeDimension: PulseTimeDimension
clearAllFiltersAsync
Resets all the existing filters on the Pulse metric.
Returns Promise<void>
clearFilterAsync
Resets the existing filter for the given field on the Pulse metric.
Parameters
- fieldNames: string
Returns Promise<string>
The field to clear filter on.
clearFiltersAsync
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.
- fieldNames: string[]
getFiltersAsync
getTimeDimensionAsync
Gets the current time dimension applied to the Pulse metric.
Returns Promise<PulseTimeDimension>
The current time dimension.
resize
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
Properties
OptionaldisableExploreFilter
Indicates whether the explore filter is hidden or visible.
<tableau-pulse id="tableauPulse" disable-explore-filter>
Optionalheight
Represents height in pixels Can be any valid CSS size specifier. If not specified, defaults to the published height of the view.
OptionaliframeAttributeClass
The value of the 'class' attribute of the embedded iframe providing access to any
custom selectors defined in the <iframe-style> child tag.
<tableau-pulse id="tableauViz" iframe-attr-class="red-border">
<iframe-style>
.red-border {
border: 1px solid red;
}
</iframe-style>
</tableau-pulse>
OptionaliframeAttributeLoading
The value of the 'loading' attribute of the embedded iframe. See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#loading
<tableau-viz id="tableauViz" iframe-attr-loading="lazy" />
<tableau-authoring-viz id="tableauViz" iframe-attr-loading="lazy" />
<tableau-pulse id="tableauPulse" iframe-attr-loading="lazy" />
OptionaliframeAttributeStyle
The value of the 'style' attribute of the embedded iframe.
<tableau-viz id="tableauViz" iframe-attr-style="border: 1px solid red" />
<tableau-authoring-viz id="tableauViz" iframe-attr-style="border: 1px solid red" />
<tableau-pulse id="tableauPulse" iframe-attr-style="border: 1px solid red" />
Optionallayout
Specifies the desired custom layout of the Pulse metric.
<tableau-pulse id="tableauPulse" layout="card">
Optionalsrc
The viz src
Optionaltheme
The Base64-encoded string representation of the Pulse theme object.
OptionaltimeDimension
Specifies the desired time dimension to apply to the Pulse metric by default.
<tableau-pulse id="tableauPulse" time-dimension="MonthToDate">
Optionaltoken
The token used for authorization
<tableau-viz id="tableauViz" token="some-token-containing-clientId" />
<tableau-authoring-viz id="tableauViz" token="some-token-containing-clientId" />
<tableau-pulse id="tableauPulse" token="some-token-containing-clientId" />
Optionalwidth
Represents width in pixels Can be any valid CSS size specifier. If not specified, defaults to the published width of the view.
The interface for the top-level Pulse object.