We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to set the chart axis title orientation?

Hello.


I can’t find how to set the orientation of a chart’s value/category axis title.
How can I do that?
My value axis title is horizontal by default and I really don’t like this.
I thought that would be an easy thing to do…


Thanks,
Kostas.

Hi Kostas,

I have observed the requirements shared by you. Please try using following sample to serve the purpose. Please share, if i may help you further in this regard.

//Setting value axis title
chart.ValueAxis.HasTitle = true;
PortionEx valtitle = chart.ValueAxis.Title.Text.Paragraphs[0].Portions[0];
valtitle.Text = “Primary Axis”;
valtitle.PortionFormat.FillFormat.FillType = FillTypeEx.Solid;
valtitle.PortionFormat.FillFormat.SolidFillColor.Color = Color.Gray;
valtitle.PortionFormat.FontHeight = 20;
valtitle.PortionFormat.FontBold = NullableBool.True;
valtitle.PortionFormat.FontItalic = NullableBool.True;
chart.ValueAxis.Title.Text.TextVerticalType = TextVerticalTypeEx.Vertical270;

Many Thanks,

Thanks. It was right under my nose.

I just thought this property was used for sth else…
However, I have the impression that there is another problem with retrieving the value of this property (chart.ValueAxis.Title.Text.TextVerticalType) from a PPTX file.
I have a sample application attached. The two new generated charts should have their value axis title vertical, while they become horizontal.

The copying is done in this line and it seems correct:
CopyTextFrameFormat(lDestChart.ValueAxis.Title.Text, lSrcChart.ValueAxis.Title.Text, pCopyImmutable);
Probably the property value that I copy is wrong?
Best Regards,
Kostas

Hi Kostas,

I have observed the requirement shared and have observed the issue while reading the vertical type rather than applying the property to new target text frame. It is read as horizontal instead of vertical. I have created an issue with ID SLIDESNET-34538 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

We are sorry for your inconvenience,