ChartPoint Class

Represents a single point in a series in a chart.
Inheritance Hierarchy
SystemObject
  Aspose.Cells.ChartsChartPoint

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

The ChartPoint type exposes the following members.

Properties
  NameDescription
Public propertyArcEndPointXPx
Gets the x coordinate of ending point for the pie section after calls Chart.Calculate() method. Applies to Pie and Doughnut chart.
Public propertyArcEndPointYPx
Gets the y coordinate of ending point for the pie section after calls Chart.Calculate() method. Applies to Pie and Doughnut chart.
Public propertyArcStartPointXPx
Gets the x coordinate of starting point for the pie section after calls Chart.Calculate() method. Applies to Pie and Doughnut chart.
Public propertyArcStartPointYPx
Gets the y coordinate of starting point for the pie section after calls Chart.Calculate() method. Applies to Pie and Doughnut chart.
Public propertyArea
Gets the area.
Public propertyBorder
Gets the border.
Public propertyBorderWidthPx
Gets the width of border in units of pixels after calls Chart.Calculate() method.
Public propertyDataLabels
Returns a DataLabels object that represents the data label associated with the point.
Public propertyEndAngle
Gets the ending angle for the pie section, measured in degrees clockwise from the x-axis after calls Chart.Calculate() method. Applies to Pie chart.
Public propertyExplosion
The distance of an open pie slice from the center of the pie chart is expressed as a percentage of the pie diameter.
Public propertyInnerArcEndPointXPx
Gets the x coordinate of ending point for the pie section after calls Chart.Calculate() method. Applies to Doughnut chart.
Public propertyInnerArcEndPointYPx
Gets the y coordinate of ending point for the pie section after calls Chart.Calculate() method. Applies to Doughnut chart.
Public propertyInnerArcStartPointXPx
Gets the x coordinate of starting point for the pie section after calls Chart.Calculate() method. Applies to Doughnut chart.
Public propertyInnerArcStartPointYPx
Gets the y coordinate of starting point for the pie section after calls Chart.Calculate() method. Applies to Doughnut chart.
Public propertyInnerRadiusPx
Gets the inner radius of doughnut slice in units of pixels after calls Chart.Calculate() method. Applies to Doughnut chart.
Public propertyIsInSecondaryPlot
Gets or sets a value indicates whether this data points is in the second pie or bar on a pie of pie or bar of pie chart
Public propertyMarker
Gets the marker.
Public propertyMarkerBackgroundColor Obsolete.
Represents the marker background color in a line chart, scatter chart, or radar chart.
Public propertyMarkerBackgroundColorSetType Obsolete.
Gets or sets the marker background color set type.
Public propertyMarkerForegroundColor Obsolete.
Represents the marker foreground color in a line chart, scatter chart, or radar chart.
Public propertyMarkerForegroundColorSetType Obsolete.
Gets or sets the marker foreground color set type.
Public propertyMarkerSize Obsolete.
Represents the marker size in a line chart, scatter chart, or radar chart.
Public propertyMarkerStyle Obsolete.
Represents the marker style in a line chart, scatter chart, or radar chart.
Public propertyRadiusPx
Gets the radius of bubble, pie or doughnut in units of pixels after calls Chart.Calculate() method.
Public propertyShadow
True if the chartpoint has a shadow.
Public propertyShapeHeight
Gets the height in units of 1/4000 of chart's height after calls Chart.Calculate() method.
Public propertyShapeHeightPx
Gets the height in units of pixels after calls Chart.Calculate() method.
Public propertyShapeProperties
Gets the object that holds the visual shape properties of the ChartPoint.
Public propertyShapeWidth
Gets the width in units of 1/4000 of chart's width after calls Chart.Calculate() method.
Public propertyShapeWidthPx
Gets the width in units of pixels after calls Chart.Calculate() method.
Public propertyShapeX
Gets the x coordinate of the upper left corner in units of 1/4000 of chart's width after calls Chart.Calculate() method.
Public propertyShapeXPx
Gets the x coordinate of the upper left corner in units of pixels after calls Chart.Calculate() method.
Public propertyShapeY
Gets the y coordinate of the upper left corner in units of 1/4000 of chart's height after calls Chart.Calculate() method.
Public propertyShapeYPx
Gets the y coordinate of the upper left corner in units of pixels after calls Chart.Calculate() method.
Public propertyStartAngle
Gets the starting angle for the pie section, measured in degrees clockwise from the x-axis after calls Chart.Calculate() method. Applies to Pie chart.
Public propertyXValue
Gets or sets the X value of the chart point.
Public propertyXValueType
Gets X value type of the chart point.
Public propertyYValue
Gets or sets the Y value of the chart point.
Public propertyYValueType
Gets Y value type of the chart point.
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetBottomPointCount
Gets the number of bottom points after calls Chart.Calculate() method.
Public methodGetBottomPointXPx
Gets x-coordinate of the bottom point of shape after calls Chart.Calculate() method. Applies 3D charts: Column3D, Bar3D, Cone, Cylinder, Pyramid
Public methodGetBottomPointYPx
Gets y-coordinate of the bottom point of shape after calls Chart.Calculate() method. Applies 3D charts: Column3D, Bar3D, Cone, Cylinder, Pyramid
Public methodGetHashCode (Inherited from Object.)
Public methodGetOnCategoryAxisPointCount
Gets the number of the points on category axis after calls Chart.Calculate() method. Only applies to area chart.
Public methodGetOnCategoryAxisPointXPx
Gets x-coordinate of the point on category axis after calls Chart.Calculate() method. Only applies to Area chart.
Public methodGetOnCategoryAxisPointYPx
Gets y-coordinate of the point on category axis after calls Chart.Calculate() method. Only applies to Area chart.
Public methodGetTopPointCount
Gets the number of top points after calls Chart.Calculate() method.
Public methodGetTopPointXPx
Gets x-coordinate of the top point of shape after calls Chart.Calculate() method. Applies 3D charts: Column3D, Bar3D, Cone, Cylinder, Pyramid and Area3D
Public methodGetTopPointYPx
Gets y-coordinate of the top point of shape after calls Chart.Calculate() method. Applies 3D charts: Column3D, Bar3D, Cone, Cylinder, Pyramid and Area3D
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Examples
[C#]

//Instantiating a Workbook object
Workbook workbook = new Workbook();

//Obtaining the reference of the first worksheet
Worksheet worksheet = workbook.Worksheets[0];

//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 "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 chart to the worksheet
int chartIndex = worksheet.Charts.Add(ChartType.PieExploded, 5, 0, 25, 10);

//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 "B3"
chart.NSeries.Add("A1:B3", true);

//Show Data Labels 
chart.NSeries[0].DataLabels.IsValueShown = true;

for (int i = 0; i  < chart.NSeries[0].Points.Count; i++)
{
    //Get Data Point
    ChartPoint point = chart.NSeries[0].Points[i];
    //Set Pir Explosion
    point.Explosion = 15;
    //Set Border Color
    point.Border.Color = System.Drawing.Color.Red;
}

//Saving the Excel file
workbook.Save("D:\\book1.xls");

[VB.NET]

'Instantiating a Workbook object
Dim workbook As New Workbook()

'Obtaining the reference of the first worksheet
Dim worksheet As Worksheet = workbook.Worksheets(0)

'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 "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 chart to the worksheet
Dim chartIndex As Integer = worksheet.Charts.Add(ChartType.PieExploded, 5, 0, 25, 10)

'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 "B3"
chart.NSeries.Add("A1:B3", True)

'Show Data Labels 
chart.NSeries(0).DataLabels.IsValueShown = True

For i As Integer = 0 To chart.NSeries(0).Points.Count - 1
    'Get Data Point
    Dim point As ChartPoint = chart.NSeries(0).Points(i)
    'Set Pir Explosion
    point.Explosion = 15
    'Set Border Color
    point.Border.Color = System.Drawing.Color.Red
Next i

'Saving the Excel file
workbook.Save("D:\book1.xls")
See Also