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