wb.timelineStyles
WorkbookTimelineStyles
9 methods
getDefault
→ Promise<string>getDefault(): Promise<string>;Get the workbook's default timeline style preset. Returns 'light1' if not explicitly set.
setDefault
→ Promise<void>setDefault(style: string | null): Promise<void>;| Parameter | Type | Required |
|---|---|---|
| style | string | null | required |
Set the workbook's default timeline style preset. Pass null to reset to 'light1'.
getCount
→ Promise<number>getCount(): Promise<number>;Get the number of built-in timeline styles.
getItem
→ Promise<TimelineStyleInfo | null>getItem(name: string): Promise<TimelineStyleInfo | null>;| Parameter | Type | Required |
|---|---|---|
| name | string | required |
Get a specific timeline style by name. Returns null if not found.
list
→ Promise<TimelineStyleInfo[]>list(): Promise<TimelineStyleInfo[]>;List all built-in timeline styles.
add
→ Promise<string>add(name: string, style: SlicerCustomStyle, makeUniqueName?: boolean): Promise<string>;| Parameter | Type | Required |
|---|---|---|
| name | string | required |
| style | SlicerCustomStyle | required |
| makeUniqueName | boolean | optional |
Add a new custom named timeline style. @param name - Desired style name. @param style - Custom style definition. @param makeUniqueName - When true, auto-appends a suffix if the name collides. Default: false. @returns The final name assigned to the style (may differ from `name` when `makeUniqueName` is true).
get
→ Promise<NamedTimelineStyle | null>get(name: string): Promise<NamedTimelineStyle | null>;| Parameter | Type | Required |
|---|---|---|
| name | string | required |
Get a custom named timeline style by name, or null if not found.
remove
→ Promise<void>remove(name: string): Promise<void>;| Parameter | Type | Required |
|---|---|---|
| name | string | required |
Remove a custom named timeline style. @param name - The name of the style to remove.
duplicate
→ Promise<string>duplicate(name: string): Promise<string>;| Parameter | Type | Required |
|---|---|---|
| name | string | required |
Duplicate an existing named timeline style. @param name - The name of the style to duplicate. @returns The name of the newly created copy.