Enum WeightType

WeightType enumeration

Enumerates the weight types for a picture border or a chart line.

public enum WeightType

Values

NameValueDescription
HairLine-1Represents the weight of hair line.
MediumLine1Represents the weight of medium line.
SingleLine0Represents the weight of single line.
WideLine2Represents the weight of wide line.

Examples

using System;
using Aspose.Cells;
using Aspose.Cells.Charts;
using Aspose.Cells.Drawing;

namespace AsposeCellsExamples
{
    public class DrawingClassWeightTypeDemo
    {
        public static void Run()
        {
            Workbook workbook = new Workbook();
            Worksheet worksheet = workbook.Worksheets[0];
            
            // Add a chart and get its chart area
            int chartIndex = worksheet.Charts.Add(ChartType.Column, 5, 5, 15, 15);
            Chart chart = worksheet.Charts[chartIndex];
            ChartArea chartArea = chart.ChartArea;
            
            // Set border weight type
            chartArea.Border.Weight = WeightType.WideLine;
            
            // Verify the weight type
            Console.WriteLine("Chart Area Border Weight: " + chartArea.Border.Weight);
            
            // Save the workbook
            workbook.Save("WeightTypeDemo.xlsx");
        }
    }
}

See Also