ExcelScript.ChartFill interface
Представляет форматирование заливки для элемента диаграммы.
Замечания
Примеры
/**
* This sample sets the fill color of a chart series.
* This assumes the active worksheet has a stock chart (e.g., Volume-High-Low-Close).
*/
function main(workbook: ExcelScript.Workbook) {
// Get the first chart on the active worksheet.
const sheet = workbook.getActiveWorksheet();
const chart = sheet.getCharts()[0];
// Set the fill color for the first series (volume).
const volumeSeries = chart.getSeries()[0];
volumeSeries.getFormat().getFill().setSolidColor("#B0C4DE");
}
Методика
| clear() | Очищает цвет заливки элемента диаграммы. |
| get |
Возвращает равномерное форматирование цветовой заливки элемента диаграммы. |
| set |
Устанавливает форматирование заливки элемента диаграммы на единый цвет. |
Подробнее о методе
clear()
Очищает цвет заливки элемента диаграммы.
clear(): void;
Возвращает
void
getSolidColor()
Возвращает равномерное форматирование цветовой заливки элемента диаграммы.
getSolidColor(): string;
Возвращает
string
setSolidColor(color)
Устанавливает форматирование заливки элемента диаграммы на единый цвет.
setSolidColor(color: string): void;
Параметры
- color
-
string
Html-код цвета, представляющий цвет фона, в форме #RRGGBB (например, "FFA500") или в виде именованного цвета HTML (например, "оранжевый").
Возвращает
void
Примеры
/**
* This sample sets a solid fill color for a chart series.
* This assumes the active worksheet has a stock chart (e.g., Volume-Open-High-Low-Close).
*/
function main(workbook: ExcelScript.Workbook) {
// Get the first chart on the active worksheet.
const sheet = workbook.getActiveWorksheet();
const chart = sheet.getCharts()[0];
// Set the fill color to light steel blue for the first series.
const volumeSeries = chart.getSeries()[0];
volumeSeries.getFormat().getFill().setSolidColor("#B0C4DE");
}