[]
        
(Showing Draft Content)

GC.Spread.Sheets.Slicers.CustomTimelineThemeManager

Class: CustomTimelineThemeManager

Sheets.Slicers.CustomTimelineThemeManager

Hierarchy

Table of contents

Constructors

Methods

Constructors

constructor

new CustomTimelineThemeManager(workbook)

Represents a custom timeline slicer theme manager that can manage all custom timeline slicer themes.

Parameters

Name Type Description
workbook Workbook The workbook.

Overrides

CustomThemeManagerBase.constructor

Methods

add

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);

Parameters

Name Type Description
theme string | TimelineStyle the new timeLine theme or just a new timeLine theme name you want to add.

Returns

undefined | TimelineStyle

return the newly added timeLine theme, if the named timeLine theme is existed, failed to add timeLine theme and return undefined


all

all(): TimelineStyle[]

get the timeLine themes collection.

example

// get all timeLine timeLine themes
let timeLineStylesCollection = spread.customTimelineThemes.all();

Returns

TimelineStyle[]

Array<GC.Spread.Sheets.Slicers.TimelineStyle>


get

get(name): undefined | TimelineStyle

get the timeLine theme by name.

example

// get timeLine theme
timeLineStyle = spread.customTimelineThemes.get("custom0");

Parameters

Name Type Description
name string the specific name of the timeLine theme to get

Returns

undefined | TimelineStyle

If the corresponding timeLine theme with the spefic name is found, return the theme; otherwise, return undefined.


remove

remove(name): void

remove the timeLine theme by name.

example

// delete timeLine theme
spread.customTimelineThemes.remove("custom0");

Parameters

Name Type Description
name string the specific name of the timeLine theme to remove

Returns

void


update

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());

Parameters

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

Returns

void