Imposta il testo dell ingresso della legenda del grafico su nessuno usando Aspose.Cells for Node.js via C++

Contents
[ ]

Il codice di esempio seguente imposta il testo del secondo riempimento dell’elemento legenda del grafico su nessuno. Scarica il file Excel di esempio utilizzato in questo codice e il file Excel di output generato da esso per ulteriori informazioni.

screenshoot seguente evidenzia l’effetto di questo codice sul file Excel di esempio.

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);