Impostare il testo del riempimento della voce della legenda del grafico su nessuno utilizzando Aspose.Cells

Contents
[ ]

Il codice di esempio seguente imposta su none il testo della seconda voce della legenda del grafico. Si prega di scaricare ilfile excel di esempio utilizzato in questo codice e ilfile excel di output generato da esso per il vostro riferimento.

Lo screenshot seguente evidenzia l’effetto di questo codice sufile excel di esempio.

cose da fare:immagine_alt_testo

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
// Open the template file.
Workbook workbook = new Workbook(dataDir + "Sample.xlsx");
// Access the first worksheet
Worksheet sheet = workbook.Worksheets[0];
// Access the first chart inside the sheet
Chart chart = sheet.Charts[0];
// Set text of second legend entry fill to none
chart.Legend.LegendEntries[1].IsTextNoFill = true;
// Save the workbook in xlsx format
workbook.Save(dataDir + "ChartLegendEntry_out.xlsx", SaveFormat.Xlsx);