チャート凡例のエントリの塗りつぶしを「なし」に設定する方法(Aspose.Cells for Node.js via C++使用)

Contents
[ ]

次のサンプルコードは、チャートの2番目の凡例エントリの塗りつぶしのテキストを無効に設定します。このコードで使用される サンプルExcelファイル とその生成される 出力Excelファイル をダウンロードして参照してください。

次のスクリーンショットは、このコードがsample excel fileに与える影響を示しています。

todo:image_alt_text

const path = require("path");
const AsposeCells = require("aspose.cells.node");

// The path to the documents directory.
const dataDir = path.join(__dirname, "data");

// Open the template file.
const workbook = new AsposeCells.Workbook(path.join(dataDir, "Sample.xlsx"));

// Access the first worksheet
const sheet = workbook.getWorksheets().get(0);

// Access the first chart inside the sheet
const chart = sheet.getCharts().get(0);

// Set text of second legend entry fill to none
chart.getLegend().getLegendEntries().get(1).setIsTextNoFill(true);

// Save the workbook in xlsx format
workbook.save(path.join(dataDir, "ChartLegendEntry_out.xlsx"), AsposeCells.SaveFormat.Xlsx);