Out Side Labels don´t work in Pie Chart 3d?

C

Claudio Heidel

Hi again, I´m using OWC11 to make 3D Pie Charts.
I would like make the pie with OutSideLabels... but it don´t work, only accept centered labels.
Is possible make it outside?

The example code is follow:

Microsoft.Office.Interop.Owc11.ChartSpaceClass oChartSpace = new Microsoft.Office.Interop.Owc11.ChartSpaceClass ();

oChartSpace.Clear();
oChartSpace.Border.Color = ChartColorIndexEnum.chColorNone;
oChartSpace.Charts.Add(0);
oChartSpace.Charts[0].HasTitle = false;
oChartSpace.Charts[0].Type = ChartChartTypeEnum.chChartTypePieExploded3D;
oChartSpace.Charts[0].ChartDepth = 125;
oChartSpace.Charts[0].AspectRatio = 80;
oChartSpace.Charts[0].HasLegend = false;

oChartSpace.Charts[0].SeriesCollection.Add(0);
oChartSpace.Charts[0].SeriesCollection[0].Explosion = 20;
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection.Add ();
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].HasPercentage = true;
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].HasValue = false;
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].HasCategoryName = true;
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Separator = "\n";
oChartSpace.Charts[0].SeriesCollection[0].Caption = String.Empty;
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Font.Name = "verdana";
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Font.Size = 7;
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Font.Bold = true;
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Font.Color = "red";

// Here is the problem, only accept Centered position
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Position = ChartDataLabelPositionEnum.chLabelPositionCenter;

// I like use follow but don´t work

oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Position = ChartDataLabelPositionEnum.chLabelPositionOutsideEnd;

Very Thanks
Claudio Heidel
 
A

Alvin Bruney [MVP - ASP.NET]

drawing on the outside of the chart is not supported by default. You would have to use custom drawing for that. One approach is described in this article. http://support.microsoft.com/default.aspx?scid=kb;en-us;555162

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc
Hi again, I´m using OWC11 to make 3D Pie Charts.
I would like make the pie with OutSideLabels... but it don´t work, only accept centered labels.
Is possible make it outside?

The example code is follow:

Microsoft.Office.Interop.Owc11.ChartSpaceClass oChartSpace = new Microsoft.Office.Interop.Owc11.ChartSpaceClass ();

oChartSpace.Clear();
oChartSpace.Border.Color = ChartColorIndexEnum.chColorNone;
oChartSpace.Charts.Add(0);
oChartSpace.Charts[0].HasTitle = false;
oChartSpace.Charts[0].Type = ChartChartTypeEnum.chChartTypePieExploded3D;
oChartSpace.Charts[0].ChartDepth = 125;
oChartSpace.Charts[0].AspectRatio = 80;
oChartSpace.Charts[0].HasLegend = false;

oChartSpace.Charts[0].SeriesCollection.Add(0);
oChartSpace.Charts[0].SeriesCollection[0].Explosion = 20;
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection.Add ();
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].HasPercentage = true;
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].HasValue = false;
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].HasCategoryName = true;
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Separator = "\n";
oChartSpace.Charts[0].SeriesCollection[0].Caption = String.Empty;
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Font.Name = "verdana";
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Font.Size = 7;
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Font.Bold = true;
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Font.Color = "red";

// Here is the problem, only accept Centered position
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Position = ChartDataLabelPositionEnum.chLabelPositionCenter;

// I like use follow but don´t work

oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Position = ChartDataLabelPositionEnum.chLabelPositionOutsideEnd;

Very Thanks
Claudio Heidel
 
C

Claudio Heidel

Thanks for you reply
"Alvin Bruney [MVP - ASP.NET]" <www.lulu.com/owc> escribió en el mensaje drawing on the outside of the chart is not supported by default. You would have to use custom drawing for that. One approach is described in this article. http://support.microsoft.com/default.aspx?scid=kb;en-us;555162

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc
Hi again, I´m using OWC11 to make 3D Pie Charts.
I would like make the pie with OutSideLabels... but it don´t work, only accept centered labels.
Is possible make it outside?

The example code is follow:

Microsoft.Office.Interop.Owc11.ChartSpaceClass oChartSpace = new Microsoft.Office.Interop.Owc11.ChartSpaceClass ();

oChartSpace.Clear();
oChartSpace.Border.Color = ChartColorIndexEnum.chColorNone;
oChartSpace.Charts.Add(0);
oChartSpace.Charts[0].HasTitle = false;
oChartSpace.Charts[0].Type = ChartChartTypeEnum.chChartTypePieExploded3D;
oChartSpace.Charts[0].ChartDepth = 125;
oChartSpace.Charts[0].AspectRatio = 80;
oChartSpace.Charts[0].HasLegend = false;

oChartSpace.Charts[0].SeriesCollection.Add(0);
oChartSpace.Charts[0].SeriesCollection[0].Explosion = 20;
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection.Add ();
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].HasPercentage = true;
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].HasValue = false;
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].HasCategoryName = true;
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Separator = "\n";
oChartSpace.Charts[0].SeriesCollection[0].Caption = String.Empty;
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Font.Name = "verdana";
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Font.Size = 7;
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Font.Bold = true;
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Font.Color = "red";

// Here is the problem, only accept Centered position
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Position = ChartDataLabelPositionEnum.chLabelPositionCenter;

// I like use follow but don´t work

oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Position = ChartDataLabelPositionEnum.chLabelPositionOutsideEnd;

Very Thanks
Claudio Heidel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top