Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Tue Mar 20, 2018 11:21 am

Hi,

I am using Spire.Presentation, Version=3.3.0.9040 in my .Net application. I am getting an issue in Column Clustered chart . I have attached an image(horizontal-category-axis_misplaced.JPG) of Column Clustered chart .You can see that horizontal category axis is misplaced.
It was working fine with the same code when I was using previous version of DLL (Spire.Presentation 2.4).
Please have a look at the code I am using:-

RectangleF rect = new RectangleF(x, y, width, height);
IChart chart = presentation.Slides[slideNumber - 1].Shapes.AppendChart(Spire.Presentation.Charts.ChartType.ColumnClustered, rect);
chart.PrimaryValueAxis.TextRotationAngle = 80;
chart.ChartTitle.TextProperties.Text = " ";
chart.ChartTitle.TextProperties.IsCentered = true;
chart.ChartTitle.Height = 1;
chart.HasTitle = true;
chart.HasLegend = false;
chart.PlotArea.Height = 150;
//remove grid lines
chart.PrimaryValueAxis.MajorGridTextLines.FillType = FillFormatType.None;
chart.SecondaryValueAxis.MajorGridTextLines.FillType = FillFormatType.None;
chart.PrimaryCategoryAxis.TickLabelPosition = TickLabelPositionType.TickLabelPositionNextToAxis;
chart.PrimaryCategoryAxis.HasMultiLvlLbl = true;
//remove horinzotal and vertical axis.
chart.PrimaryValueAxis.IsVisible = false;
chart.SecondaryValueAxis.IsVisible = false;
chart.SecondaryCategoryAxis.IsVisible = false;
// remove series
chart.Series.RemoveAt(0);
chart.Series.RemoveAt(1);
//set font size
chart.PrimaryCategoryAxis.TextProperties.Paragraphs[0].DefaultCharacterProperties.FontHeight = 9;
chart.PrimaryValueAxis.TextProperties.Paragraphs[0].DefaultCharacterProperties.FontHeight = 9;
//set border
chart.Series[0].Line.FillType = FillFormatType.Solid;
chart.Series[0].Line.SolidFillColor.Color = Color.White;
chart.Series[0].Fill.SolidColor.KnownColor = KnownColors.Gray;

InitChartData(chart, dataTable);
chart.GapWidth = 350;

chart.Series[0].DataLabels.Add();
chart.Series[0].DataLabels.LabelValueVisible = true;
chart.Series[0].DataLabels.TextProperties.Paragraphs[0].DefaultCharacterProperties.FontHeight = 9;



Please assist me as soon as possible.

Thanks
Amit

amitmishra0406
 
Posts: 1
Joined: Wed Mar 14, 2018 11:40 am

Wed Mar 21, 2018 5:50 am

Dear Amit,

Thanks for your inquiry.
I simulated your datatable data to test your scenario but didn't find the issue. To help us evaluate your issue precisely on our end, please share us with your datatable file as well as full code. Thanks in advance.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1195
Joined: Tue Sep 27, 2016 1:06 am

Fri Mar 23, 2018 9:07 am

Hello,

Greetings from E-iceblue support team.
How is your issue going? Could you please give us some feedback at your convenience?
Thanks in advance.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1195
Joined: Tue Sep 27, 2016 1:06 am

Return to Spire.Presentation