SpreadJS 13
GC.Spread.Sheets.Slicers Namespace / ItemSlicer type / style Method
The style of the item slicer.
In This Topic
    style Method
    In This Topic
    Gets or sets the style of the item slicer.
    Syntax
    var instance = new GC.Spread.Sheets.Slicers.ItemSlicer(name, slicerData, columnName);
    var returnValue; // Type: any
    returnValue = instance.style(value);
    function style( 
       value : Object
    ) : any;

    Parameters

    value
    The style of the item slicer.

    Return Value

    If no value is set, returns The style of the item slicer; otherwise, returns the item slicer.
    Example
    The style is json data, its json schema is as follows:
    {
         "$schema" : "http://json-schema.org/draft-04/schema#",
         "title" : "style",
         "type" : "object",
         "properties" : {
             "wholeSlicerStyle" : {
                 "$ref" : "#/definitions/StyleInfo"
             },
             "headerStyle" : {
                 "$ref" : "#/definitions/StyleInfo"
             },
             "selectedItemWithDataStyle" : {
                 "$ref" : "#/definitions/StyleInfo"
             },
             "selectedItemWithNoDataStyle" : {
                 "$ref" : "#/definitions/StyleInfo"
             },
             "unSelectedItemWithDataStyle" : {
                 "$ref" : "#/definitions/StyleInfo"
             },
             "unSelectedItemWithNoDataStyle" : {
                 "$ref" : "#/definitions/StyleInfo"
             },
             "hoveredSelectedItemWithDataStyle" : {
                 "$ref" : "#/definitions/StyleInfo"
             },
             "hoveredSelectedItemWithNoDataStyle" : {
                 "$ref" : "#/definitions/StyleInfo"
             },
             "hoveredUnSelectedItemWithDataStyle" : {
                 "$ref" : "#/definitions/StyleInfo"
             },
             "hoveredUnSelectedItemWithNoDataStyle" : {
                 "$ref" : "#/definitions/StyleInfo"
             }
         },
         "definitions" : {
             "StyleInfo" : {
                 "type" : "object",
                 "properties" : {
                         "backColor" : {
                                 "type" : "string"
                         },
                         "foreColor" : {
                                 "type" : "string"
                         },
                         "font" : {
                                 "type" : "string"
                         },
                         "borderLeft" : {
                                 "$ref" : "#/definitions/SlicerBorder"
                         },
                         "borderTop" : {
                                 "$ref" : "#/definitions/SlicerBorder"
                         },
                         "borderRight" : {
                                 "$ref" : "#/definitions/SlicerBorder"
                         },
                         "borderBottom" : {
                                 "$ref" : "#/definitions/SlicerBorder"
                         },
                     "textDecoration":{
                         "type" : "string"
                     }
                 }
             },
             "SlicerBorder":{
                 "type":"object",
                 "properties":{
                     "borderWidth":{
                             "type":"number"
                     },
                     "borderStyle":{
                             "type":"string"
                     },
                     "borderColor":{
                             "type":"string"
                     }
              }
             }
         }
     }
    See Also

    Reference

    ItemSlicer type