Aspose Legend properties

Hi,


Can you suggest how it is possible to make legened looks nice?
Problem: When a lot of text in legend appeared it is not fully shown, only several items, but we want to see all texts. I have found in excel several properties by which we can to make it, how I can set them via Aspose.Cells ?

Also is it possible to remove a huge free spaces between text items in legend ( in the vertical direction )?

I have attached two screenshots:
now.png - how it is now
will_be.png, how we want to make it, also excel properties are here.

P.S. I don’t know why but screenshots are not attached, or I got error, when trying to open them,
I can send them via e-mail with link to message.

Thank you in advance.

Hi,


Well, there are some properties that you may try to set via Aspose.Cells for Java APIs accordingly.

See some code segments below:

//…

Legend legend = chart.getLegend();
legend.setWidth(value);
legend.setHeight(value);

legend.setAutomaticSize(true);

//Get the Font to specify your desired options.
Font font = legend.getTextFont();

//Setting the font name to "Times New Roman"
font.setName(“Times New Roman”);

//Setting font size to 10
font.setSize(10);

//etc.

Hope, this helps.

Thank you.

Hi Amjad,


Thank you for your answer.
Is it also possible to change font in Leneged, I’m intersted in tab: ‘Character Spacing’?

Can I change font, in case charater spacing property,
Spacing -> Condenesed, by 1 pt ???

See screenshot - CharacterSpacing.png



Hi,


It looks like a new feature and is not supported currently. I have logged it with an id: CELLSJAVA-40056. for your need. We will look into it soon.

Thank you.
Hi Amjad,

Thank you.

Is it possible to remove vast space in the legend now?
( solution which Aspose currently supports ) ?

Hi,


As we have logged your with an id: CELLSJAVA-40056. and we are working on it. Once we have any update, we will let you know here.

For Legend item spaces, you may try to set Legend’s height and width if it works fine. e.g You may try some attributes for Chart.Legend API i.e. Width, Height, X, Y etc.

Thank you.