[]
Sheets.Slicers.CustomTimelineThemeManager
↳ CustomTimelineThemeManager
• new CustomTimelineThemeManager(workbook)
Represents a custom timeline slicer theme manager that can manage all custom timeline slicer themes.
| Name | Type | Description |
|---|---|---|
workbook |
Workbook |
The workbook. |
CustomThemeManagerBase.constructor
▸ add(theme): undefined | TimelineStyle
add a new timeLine theme.
example
// add a new timeLine theme named "custom0"
var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
let timeLineStyle = spread.customTimelineThemes.add("custom0");
let wholeTimelineStyle = new GC.Spread.Sheets.Slicers.TimelineStyleInfo();
wholeTimelineStyle.backColor = "#0C66E4";
timeLineStyle.wholeTimelineStyle(wholeTimelineStyle);
| Name | Type | Description |
|---|---|---|
theme |
string | TimelineStyle |
the new timeLine theme or just a new timeLine theme name you want to add. |
undefined | TimelineStyle
return the newly added timeLine theme, if the named timeLine theme is existed, failed to add timeLine theme and return undefined
▸ all(): TimelineStyle[]
get the timeLine themes collection.
example
// get all timeLine timeLine themes
let timeLineStylesCollection = spread.customTimelineThemes.all();
Array<GC.Spread.Sheets.Slicers.TimelineStyle>
▸ get(name): undefined | TimelineStyle
get the timeLine theme by name.
example
// get timeLine theme
timeLineStyle = spread.customTimelineThemes.get("custom0");
| Name | Type | Description |
|---|---|---|
name |
string |
the specific name of the timeLine theme to get |
undefined | TimelineStyle
If the corresponding timeLine theme with the spefic name is found, return the theme; otherwise, return undefined.
▸ remove(name): void
remove the timeLine theme by name.
example
// delete timeLine theme
spread.customTimelineThemes.remove("custom0");
| Name | Type | Description |
|---|---|---|
name |
string |
the specific name of the timeLine theme to remove |
void
▸ update(oldThemeName, newTheme): void
update the timeline slicer theme.
example
// update timeline slicer theme
timelineStyle = spread.customTimelineThemes.update("custom0", new GC.Spread.Sheets.Slicers.TimelineStyle());
| Name | Type | Description |
|---|---|---|
oldThemeName |
string |
the specific name of the timeline slicer theme to update |
newTheme |
TimelineStyle |
the specific name of the timeline slicer theme to update |
void