DisplayUnitLabel Class

Represents the display unit label.
Inheritance Hierarchy

Namespace:  Aspose.Cells.Charts
Assembly:  Aspose.Cells (in Aspose.Cells.dll) Version: 20.10.0.0 (20.10)
Syntax
public class DisplayUnitLabel : ChartTextFrame

The DisplayUnitLabel type exposes the following members.

Properties
  NameDescription
Public propertyArea
Gets the area.
(Inherited from ChartFrame.)
Public propertyAutoScaleFont
True if the text in the object changes font size when the object size changes. The default value is True.
(Overrides ChartFrameAutoScaleFont.)
Public propertyBackground Obsolete.
Gets and sets the display mode of the background
(Inherited from ChartFrame.)
Public propertyBackgroundMode
Gets and sets the display mode of the background
(Inherited from ChartFrame.)
Public propertyBorder
Gets the border.
(Inherited from ChartFrame.)
Public propertyDefaultHeight
Represents height of default position
(Inherited from ChartFrame.)
Public propertyDefaultWidth
Represents width of default position
(Inherited from ChartFrame.)
Public propertyDefaultX
Represents x of default position
(Inherited from ChartFrame.)
Public propertyDefaultY
Represents y of default position
(Inherited from ChartFrame.)
Public propertyDirectionType
Gets and sets the direction of text.
(Inherited from ChartTextFrame.)
Public propertyFont
Gets a Font object of the specified ChartFrame object.
(Overrides ChartFrameFont.)
Public propertyHeight
Gets or sets the height of frame in units of 1/4000 of the chart area.
(Inherited from ChartFrame.)
Public propertyIsAutomaticSize
Indicates whether the chart frame is automatic sized.
(Inherited from ChartFrame.)
Public propertyIsAutoText
Indicates the text is auto generated.
(Inherited from ChartTextFrame.)
Public propertyIsDefaultPosBeSet
Indicates whether default position(DefaultX, DefaultY, DefaultWidth and DefaultHeight) are set.
(Inherited from ChartFrame.)
Public propertyIsDeleted
Indicates whether this data labels is deleted.
(Inherited from ChartTextFrame.)
Public propertyIsInnerMode
Indicates whether the size of the plot area size includes the tick marks, and the axis labels. False specifies that the size shall determine the size of the plot area, the tick marks, and the axis labels.
(Inherited from ChartFrame.)
Public propertyIsResizeShapeToFitText
Gets or sets whether a shape should be auto-fit to fully contain the text described within it. Auto-fitting is when text within a shape is scaled in order to contain all the text inside.
(Inherited from ChartTextFrame.)
Public propertyIsTextWrapped
Gets or sets a value indicating whether the text is wrapped.
(Inherited from ChartTextFrame.)
Public propertyLinkedSource
Gets and sets a reference to the worksheet.
(Inherited from ChartTextFrame.)
Public propertyReadingOrder
Represents text reading order.
(Inherited from ChartTextFrame.)
Public propertyRotationAngle
Represents text rotation angle.
(Inherited from ChartTextFrame.)
Public propertyShadow
True if the frame has a shadow.
(Inherited from ChartFrame.)
Public propertyShapeProperties
Gets the ShapeProperties object.
(Inherited from ChartFrame.)
Public propertyText
Gets or sets the text of display unit label.
(Overrides ChartTextFrameText.)
Public propertyTextDirection Obsolete.
Represents text reading order.
(Inherited from ChartTextFrame.)
Public propertyTextFont Obsolete.
Gets a Font object of the specified ChartFrame object.
(Inherited from ChartFrame.)
Public propertyTextHorizontalAlignment
Gets and sets the text horizontal alignment.
(Inherited from ChartTextFrame.)
Public propertyTextVerticalAlignment
Gets or sets the text vertical alignment of text.
(Inherited from ChartTextFrame.)
Public propertyWidth
Gets or sets the width of frame in units of 1/4000 of the chart area.
(Inherited from ChartFrame.)
Public propertyX
Gets or sets the x coordinate of the upper left corner in units of 1/4000 of the chart area.
(Inherited from ChartFrame.)
Public propertyY
Gets or sets the y coordinate of the upper left corner in units of 1/4000 of the chart area.
(Inherited from ChartFrame.)
Methods
  NameDescription
Public methodCharacters
Returns a Characters object that represents a range of characters within the text.
(Inherited from ChartTextFrame.)
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodSetPositionAuto
Set position of the frame to automatic
(Inherited from ChartFrame.)
Public methodToString (Inherited from Object.)
Fields
  NameDescription
Protected fieldhorizontal (Inherited from ChartTextFrame.)
Protected fieldm_AutoScaleFont (Inherited from ChartFrame.)
Protected fieldm_BackgroundMode (Inherited from ChartFrame.)
Protected fieldm_CharsList (Inherited from ChartTextFrame.)
Protected fieldm_deleted (Inherited from ChartTextFrame.)
Protected fieldm_font (Inherited from ChartFrame.)
Protected fieldm_fontIndex (Inherited from ChartFrame.)
Protected fieldm_isAutoSize (Inherited from ChartFrame.)
Protected fieldm_IsAutoText (Inherited from ChartTextFrame.)
Protected fieldm_IsAutoXPos (Inherited from ChartFrame.)
Protected fieldm_IsAutoYPos (Inherited from ChartFrame.)
Protected fieldrotation (Inherited from ChartTextFrame.)
Protected fieldvertical (Inherited from ChartTextFrame.)
Examples
[C#]

//Instantiating a Workbook object
Workbook workbook = new Workbook();
//Adding a new worksheet to the Excel object
int sheetIndex = workbook.Worksheets.Add();
//Obtaining the reference of the newly added worksheet by passing its sheet index
Worksheet worksheet = workbook.Worksheets[sheetIndex];
//Adding a sample value to "A1" cell
worksheet.Cells["A1"].PutValue(50);
//Adding a sample value to "A2" cell
worksheet.Cells["A2"].PutValue(100);
//Adding a sample value to "A3" cell
worksheet.Cells["A3"].PutValue(150);
//Adding a sample value to "A4" cell
worksheet.Cells["A4"].PutValue(200);
//Adding a sample value to "B1" cell
worksheet.Cells["B1"].PutValue(60);
//Adding a sample value to "B2" cell
worksheet.Cells["B2"].PutValue(32);
//Adding a sample value to "B3" cell
worksheet.Cells["B3"].PutValue(50);
//Adding a sample value to "B4" cell
worksheet.Cells["B4"].PutValue(40);
//Adding a sample value to "C1" cell as category data
worksheet.Cells["C1"].PutValue("Q1");
//Adding a sample value to "C2" cell as category data
worksheet.Cells["C2"].PutValue("Q2");
//Adding a sample value to "C3" cell as category data
worksheet.Cells["C3"].PutValue("Y1");
//Adding a sample value to "C4" cell as category data
worksheet.Cells["C4"].PutValue("Y2");
//Adding a chart to the worksheet
int chartIndex = worksheet.Charts.Add(ChartType.Column, 5, 0, 15, 5);
//Accessing the instance of the newly added chart
Chart chart = worksheet.Charts[chartIndex];
//Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B4"
chart.NSeries.Add("A1:B4", true);
//Setting the data source for the category data of NSeries
chart.NSeries.CategoryData = "C1:C4";
//Setting the display unit of value(Y) axis.
chart.ValueAxis.DisplayUnit = DisplayUnitType.Hundreds;
DisplayUnitLabel displayUnitLabel = chart.ValueAxis.DisplayUnitLabel;
//Setting the custom display unit label
displayUnitLabel.Text = "100";
//Saving the Excel file
workbook.Save("C:\\book1.xls");

[Visual Basic]

'Instantiating a Workbook object
Dim workbook As Workbook = New Workbook()
'Adding a new worksheet to the Excel object
Dim sheetIndex As Int32 = workbook.Worksheets.Add()
'Obtaining the reference of the newly added worksheet by passing its sheet index
Dim worksheet As Worksheet = workbook.Worksheets(sheetIndex)
'Adding a sample value to "A1" cell
worksheet.Cells("A1").PutValue(50)
'Adding a sample value to "A2" cell
worksheet.Cells("A2").PutValue(100)
'Adding a sample value to "A3" cell
worksheet.Cells("A3").PutValue(150)
'Adding a sample value to "A4" cell
worksheet.Cells("A4").PutValue(200)
'Adding a sample value to "B1" cell
worksheet.Cells("B1").PutValue(60)
'Adding a sample value to "B2" cell
worksheet.Cells("B2").PutValue(32)
'Adding a sample value to "B3" cell
worksheet.Cells("B3").PutValue(50)
'Adding a sample value to "B4" cell
worksheet.Cells("B4").PutValue(40)
'Adding a sample value to "C1" cell as category data
worksheet.Cells("C1").PutValue("Q1")
'Adding a sample value to "C2" cell as category data
worksheet.Cells("C2").PutValue("Q2")
'Adding a sample value to "C3" cell as category data
worksheet.Cells("C3").PutValue("Y1")
'Adding a sample value to "C4" cell as category data
worksheet.Cells("C4").PutValue("Y2")
'Adding a chart to the worksheet
Dim chartIndex As Int32 = worksheet.Charts.Add(ChartType.Column, 5, 0, 15, 5)
'Accessing the instance of the newly added chart
Dim chart As Chart = worksheet.Charts(chartIndex)
'Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B4"
chart.NSeries.Add("A1:B4", True)
'Setting the data source for the category data of NSeries
Chart.NSeries.CategoryData = "C1:C4"
'Setting the display unit of value(Y) axis.
chart.ValueAxis.DisplayUnit = DisplayUnitType.Hundreds
Dim displayUnitLabel As DisplayUnitLabel = chart.ValueAxis.DisplayUnitLabel
'Setting the custom display unit label
displayUnitLabel.Text = "100"
'Saving the Excel file
workbook.Save("C:\\book1.xls")
See Also