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

Free Support Forum - aspose.com

Aspose Cells Chart properties

Hi,

I’m pretty new to Aspose Cells Charts and I’m trying to figure out how to set / do certain things. I’m not sure if there is any documentation or sample which can show me all I want to know, but at the moment, the guessing game has got me quite frustrated.

If you look at the attached Excel sheet’s chart, I want the following :

The Chart’s background should be white so that the white bars will blend in and thus not visible - I tried both _chart.PlotArea.Area.BackgroundColor = Color.White; as well as _chart.ChartArea.Area.BackgroundColor = Color.White; (this one actually changes a lot of this to black ?!?!?)
What is the correct property ?

The vertical descriptions should be totally vertical and not at the current angle. I tried _chart.CategoryAxis.TickLabels.DirectionType = ChartTextDirectionType.Vertical, but that does not seem to work ? Or do I need to enlarge that area and how do I do that ?

Book1.zip (16.3 KB)

Any help would be appreciated to get my issues resolved, and what would be even more helpful would be how does one ‘find’ the setting you want.

Regards,

Alex

@AlexCaudron,

If you need to set chart’s plot area/chart area filling color, kindly use ForegroundColor attribute instead. Please try the following sample code for your needs for your reference:
e.g.
Sample code:

.........

            _chart.ChartArea.Area.ForegroundColor = Color.White;
            _chart.PlotArea.Area.ForegroundColor = Color.White;
            _chart.CategoryAxis.TickLabels.DirectionType = ChartTextDirectionType.Rotate90;

            //chart.CategoryAxis.TickLabels.RotationAngle = 45;
.........

We recommend you to kindly see the topics in the section regarding charts for your complete reference.

Thank you for this. I did go through the section you sent a link to, however, if you are not familiar with the graph it is rather difficult to figure out if something is on the PlotArea etc (or which object belongs to what other object).

As time goes by I will most probably get the hang of it…

Alex

@AlexCaudron,

Sure, it takes a little time to get familiar with the Chart related APIs. Feel free to write us back if you have further queries or questions, we will be happy to assist you soon.