Edit

Excel.ChartFill class

Represents the fill formatting for a chart element.

Extends

Remarks

[Api set: ExcelApi 1.1]

Properties

context

The request context associated with the object. This connects the add-in's process to the Office host application's process.

Methods

clear()

Clears the fill color of a chart element.

getSolidColor()

Gets the uniform color fill formatting of a chart element.

setSolidColor(color)

Sets the fill formatting of a chart element to a uniform color.

toJSON()

Overrides the JavaScript toJSON() method in order to provide more useful output when an API object is passed to JSON.stringify(). (JSON.stringify, in turn, calls the toJSON method of the object that's passed to it.) Whereas the original Excel.ChartFill object is an API object, the toJSON method returns a plain JavaScript object (typed as Excel.Interfaces.ChartFillData) that contains shallow copies of any loaded child properties from the original object.

Property Details

context

The request context associated with the object. This connects the add-in's process to the Office host application's process.

context: RequestContext;

Property Value

Method Details

clear()

Clears the fill color of a chart element.

clear(): void;

Returns

void

Remarks

[Api set: ExcelApi 1.1]

getSolidColor()

Gets the uniform color fill formatting of a chart element.

getSolidColor(): OfficeExtension.ClientResult<string>;

Returns

Remarks

[Api set: ExcelApi 1.16]

setSolidColor(color)

Sets the fill formatting of a chart element to a uniform color.

setSolidColor(color: string): void;

Parameters

color

string

HTML color code representing the color of the background, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange").

Returns

void

Remarks

[Api set: ExcelApi 1.1]

toJSON()

Overrides the JavaScript toJSON() method in order to provide more useful output when an API object is passed to JSON.stringify(). (JSON.stringify, in turn, calls the toJSON method of the object that's passed to it.) Whereas the original Excel.ChartFill object is an API object, the toJSON method returns a plain JavaScript object (typed as Excel.Interfaces.ChartFillData) that contains shallow copies of any loaded child properties from the original object.

toJSON(): {
            [key: string]: string;
        };

Returns

{ [key: string]: string; }