تعطيل التفاف النص لتسميات البيانات في المخطط
Contents
[
Hide
]
Microsoft يسمح Excel 2013 للمستخدمين بالتفاف أو إلغاء التفاف النص داخل تسميات البيانات في المخطط. بشكل افتراضي ، يكون النص الموجود داخل تسميات البيانات في المخطط في حالة الالتفاف.
يوفر Aspose.Cells أDataLabels.IsTextWrapped الخاصية التي يمكنك تعيين صواب أو خطأ على تمكين أو تعطيل التفاف النص لتسميات البيانات على التوالي.
يوضح نموذج التعليمات البرمجية أدناه كيفية تعطيل التفاف النص لتسميات البيانات في المخطط.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); | |
// Load the sample Excel file inside the workbook object | |
Workbook workbook = new Workbook(dataDir + "sample.xlsx"); | |
// Access the first worksheet | |
Worksheet worksheet = workbook.Worksheets[0]; | |
// Access the first chart inside the worksheet | |
Chart chart = worksheet.Charts[0]; | |
// Disable the Text Wrapping of Data Labels in all Series | |
chart.NSeries[0].DataLabels.IsTextWrapped = false; | |
chart.NSeries[1].DataLabels.IsTextWrapped = false; | |
chart.NSeries[2].DataLabels.IsTextWrapped = false; | |
// Save the workbook | |
workbook.Save(dataDir + "Output_out.xlsx"); |