Class Floor
Class Floor
Namespace: Aspose.Cells.Charts
Assembly: Aspose.Cells.dll (25.2.0)
Đóng gói đối tượng đại diện cho mặt sàn của biểu đồ 3-D.
public class Floor : Area
Kế thừa
Kế thừa
Các thành viên kế thừa
Area.BackgroundColor, Area.ForegroundColor, Area.Formatting, Area.InvertIfNegative, Area.FillFormat, Area.Transparency, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Ví dụ
//Khởi tạo lớp License
Aspose.Cells.License license = new Aspose.Cells.License();
//Chỉ truyền tên của tệp bản quyền nhúng trong assembly
license.SetLicense("Aspose.Cells.lic");
//Khởi tạo đối tượng workbook
Workbook workbook = new Workbook();
//Lấy bộ sưu tập ô
Cells cells = workbook.Worksheets[0].Cells;
//Đặt giá trị vào các ô
cells["A1"].PutValue(1);
cells["A2"].PutValue(2);
cells["A3"].PutValue(3);
//lấy bộ sưu tập biểu đồ
ChartCollection charts = workbook.Worksheets[0].Charts;
//thêm một biểu đồ mới
int index = charts.Add(ChartType.Column3DStacked, 5, 0, 15, 5);
//lấy biểu đồ vừa thêm
Chart chart = charts[index];
//đặt nseries cho biểu đồ
chart.NSeries.Add("A1:A3", true);
//Hiện nhãn dữ liệu
chart.NSeries[0].DataLabels.ShowValue = true;
//Lấy mặt sàn của biểu đồ
Floor floor = chart.Floor;
//đặt viền của mặt sàn thành màu đỏ
floor.Border.Color = System.Drawing.Color.Red;
//đặt định dạng điền
floor.FillFormat.SetPresetColorGradient(GradientPresetType.CalmWater, GradientStyleType.DiagonalDown, 2);
//lưu tệp
workbook.Save(@"dest.xls");
'Khởi tạo lớp License
Dim license As New Aspose.Cells.License()
'Chỉ truyền tên của tệp bản quyền nhúng trong assembly
license.SetLicense("Aspose.Cells.lic")
'Khởi tạo đối tượng workbook
Dim workbook As Workbook = New Workbook()
'Lấy bộ sưu tập ô
Dim cells As Cells = workbook.Worksheets(0).Cells
'Đặt giá trị vào các ô
cells("A1").PutValue(1)
cells("A2").PutValue(2)
cells("A3").PutValue(3)
'lấy bộ sưu tập biểu đồ
Dim charts As ChartCollection = workbook.Worksheets(0).Charts
'thêm một biểu đồ mới
Dim index As Integer = charts.Add(ChartType.Column3DStacked, 5, 0, 15, 5)
'lấy biểu đồ vừa thêm
Dim chart As Chart = charts(index)
'đặt nseries cho biểu đồ
chart.NSeries.Add("A1:A3", True)
'Hiện nhãn dữ liệu
chart.NSeries(0).DataLabels.ShowValue = True
'Lấy mặt sàn của biểu đồ
Dim floor As Floor = chart.Floor
'đặt viền của mặt sàn thành màu đỏ
floor.Border.Color = System.Drawing.Color.Red
'đặt định dạng điền
floor.FillFormat.SetPresetColorGradient(GradientPresetType.CalmWater, GradientStyleType.DiagonalDown, 2)
'lưu tệp
workbook.Save("dest.xls")
Trường
m_SpPr
protected ShapePropertyCollection m_SpPr
Giá trị trường
Thuộc tính
Border
Lấy hoặc đặt viền Aspose.Cells.Drawing.Line.
public Line Border { get; set; }