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
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