LegendEntry

ChartSeries.LegendEntry property

يحصل على إدخال أسطورة لسلسلة الرسم البياني هذه.

public ChartLegendEntry LegendEntry { get; }

أمثلة

يوضح كيفية العمل مع خط الأسطورة.

Document doc = new Document(MyDir + "Reporting engine template - Chart series.docx");
Chart chart = ((Shape)doc.GetChild(NodeType.Shape, 0, true)).Chart;

ChartLegend chartLegend = chart.Legend;
// تعيين حجم الخط الافتراضي لجميع إدخالات الأسطورة.
chartLegend.Font.Size = 14;
// تغيير الخط لإدخال الأسطورة المحددة.
chartLegend.LegendEntries[1].Font.Italic = true;
chartLegend.LegendEntries[1].Font.Size = 12;
// الحصول على إدخال الأسطورة لسلسلة الرسم البياني.
ChartLegendEntry legendEntry = chart.Series[0].LegendEntry;

doc.Save(ArtifactsDir + "Charts.LegendFont.docx");

أنظر أيضا