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 Oct 11, 2016 4:20 pm

Hi

how do I force the Column3DStacked to show all the X-Axis labels. At the moment it will stagger then them, show one label, then a blank space, then next label.

I know one way of working around it is to reduce the

chart.PrimaryCategoryAxis.TextProperties.Paragraphs[0].DefaultCharacterProperties.FontHeight

but I was hoping there was a chart setting to set this.

Regards

Mark

markfarrer
 
Posts: 8
Joined: Wed Sep 28, 2016 9:53 am

Wed Oct 12, 2016 8:19 am

Dear markfarrer ,

Thanks for your inquiry. Could you please provide us your document to help us do an investigation?

Thanks,
Nina
E-iceblue support team
User avatar

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

Wed Oct 12, 2016 9:14 am

Hi Nina

this is my code C# Code


#region Chart

#region Chart - Define

RectangleF rect = new RectangleF(30, 30, pptSize.Width - 60, pptSize.Height - 60);
IChart chart = slide.Shapes.AppendChart(Spire.Presentation.Charts.ChartType.Column3DStacked, rect);

#endregion

#region Chart - Title

chart.HasTitle = true;
chart.ChartTitle.TextProperties.Text = "Group Score";
chart.ChartTitle.TextProperties.TextRange.LatinFont = new TextFont("Arial");
chart.ChartTitle.TextProperties.TextRange.IsBold = TriState.True;
chart.ChartTitle.TextProperties.TextRange.FontHeight = 24;
chart.ChartTitle.TextProperties.TextRange.Fill.FillType = FillFormatType.Solid;
chart.ChartTitle.TextProperties.TextRange.Fill.SolidColor.Color = ColorTranslator.FromHtml("#375A32");
chart.ChartTitle.TextProperties.IsCentered = true;
chart.ChartTitle.Height = 10;

#endregion

#region Chart - Legend

chart.HasLegend = false;

#endregion

#region Chart - Font

chart.PrimaryCategoryAxis.TextProperties.Paragraphs[0].DefaultCharacterProperties.FontHeight = 8;
chart.PrimaryCategoryAxis.TextRotationAngle = -45;
chart.PrimaryCategoryAxis.MinorTickMark = TickMarkType.TickMarkNone;

#endregion

#region Chart - Y-Axis

chart.PrimaryValueAxis.IsAutoMax = false;
chart.PrimaryValueAxis.IsAutoMin = false;
chart.PrimaryValueAxis.MinValue = 0f;
chart.PrimaryValueAxis.MaxValue = 100f;

#endregion

#region Chart - Main

DataTable dataTable = Common_DataGetRegionMarketScores(_clientPath, _regionID, _marketID, _surveyKey);
Common_InitChartData(chart, dataTable);

chart.Series.SeriesLabel = chart.ChartData["B1", "B1"];
chart.Categories.CategoryLabels = chart.ChartData["A2", "A" + (dataTable.Rows.Count + 1)];
chart.Series[0].Values = chart.ChartData["B2", "B" + (dataTable.Rows.Count + 1)];
chart.Series[0].Fill.FillType = FillFormatType.Solid;
chart.Series[0].Fill.SolidColor.Color = ColorOutlet;

#endregion

#region Chart - Set Region/National text and Colours

Common_SetRegionNationlTextColours( chart);

#endregion

#endregion

markfarrer
 
Posts: 8
Joined: Wed Sep 28, 2016 9:53 am

Thu Oct 13, 2016 7:30 am

Hello,

Sorry for late reply. I am afraid currently there is no a chart setting to set this, and I have posted the issue to our Dev team, once there is update, we will let you know.

Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Thu Nov 17, 2016 2:31 am

Hi,

Thanks for your waiting.
Your issue has been resolved with the new version of Spire.Presentation(Version:2.7.11). Please download it and add the following codes.
Code: Select all
chart.PrimaryCategoryAxis.IsAutomaticTickLabelSpacing = false;
chart.PrimaryCategoryAxis.TickLabelSpacing = 1;

Sincerely,
Nina
E-iceblue support team
User avatar

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

Fri Nov 18, 2016 8:30 am

Hello,

Has your issue been resolved? Could you please give us some feedback at your convenience?

Thanks,
Nina
E-iceblue support team
User avatar

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

Return to Spire.Presentation