Click or drag to resize

IChartLegend IsVerticalLegend Property

True if vertical legend (a single column of entries); False if horizontal legend (multiple columns of entries). Manual-sized legends always have this bit set to False.
Examples
The following code illustrates use of IsVerticalLegend property:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Create chart and set range</para><para>IChart chart = worksheet.Charts.Add();</para><para>chart.DataRange = worksheet.Range["B2:C6"];</para><para>//Set chart type</para><para>chart.ChartType = ExcelChartType.Cone3DClustered;</para><para>//True if the legend is vertical</para><para>if(chart.Legend.IsVerticalLegend){ //Your code here }</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>

Namespace: Spire.Xls.Core
Assembly: Spire.XLS (in Spire.XLS.dll) Version: 15.4.0.0 (15.4.0.5046)
Syntax
bool IsVerticalLegend { get; set; }

Property Value

Type: Boolean
See Also