hello.
i've adapted your sample code for "custom charts" to create a pie chart. my code (below) creates the PlotArea to the left and the Legend to the right.
the last thing i need to do is remove the border from the PlotArea. this seems simple enough:
chart.PlotArea.Border.IsVisible = False
however this unexpectedly resets the PlotArea to take up the full width of the chart area.
also i tried:
chart.PlotArea.Border.Color = System.Drawing.Color.White
but this does the very same thing!
please help! cheers, rob johnson
- - - - - - - - - -
Dim workbook As Aspose.Excel.Excel = New Aspose.Excel.Excel
Dim worksheet As worksheet = workbook.Worksheets(0)
worksheet.Cells("A1").PutValue("Finance")
worksheet.Cells("B1").PutValue(5)
worksheet.Cells("A2").PutValue("Underwriting")
worksheet.Cells("B2").PutValue(1)
worksheet.Cells("A3").PutValue("Advisory")
worksheet.Cells("B3").PutValue(1)
Dim intChartIndex As Integer = worksheet.Charts.Add(ChartType.Pie3D, 0, 3, 10, 8)
Dim chart As chart = worksheet.Charts(intChartIndex)
chart.Title.Text = "Overdue Action Points by Area"
chart.Title.TextFont.Size = 9
chart.Title.TextFont.Color = System.Drawing.Color.Black
chart.Title.TextFont.IsBold = True
chart.Legend.Position = LegendPositionType.Right
chart.Legend.TextFont.Size = 9
chart.NSeries.Add("B1:B3", True)
chart.NSeries(0).Type = ChartType.Pie3D
chart.NSeries.CategoryData = "A1:A3"
'chart.PlotArea.Border.IsVisible = False
Return workbook