Page 1 of 1
Legend drawing
Posted: Thu Dec 18, 2008 5:07 pm
by 14045174
I have users, who have created reports, including charts, in our Win32 app. Now, when we convert those reports to .NET, the legends look different. It appears, that you have added some space to the left of each text column, making them a little nicer, but wider, then it used to be. So now, the legend, which was located at the bottom (or top) of the report and used to take just one line, is shown in two lines and breaks the whole report. It is not as big of an issue with legends on either side, but top and bottom options are broken for these users. Some of the reports have very little room to play with, and adding a whole new line for a legend is not acceptable. In Win32 version, similar problem could be solved by playing with inter-char option for a font, but this feature is lost (as far as I can tell) in .NET version. Any other ideas, how can I fix those reports during conversion? We are talking about possibly thousands of reports, so it has to be done programmatically at the conversion time and the resulting report has to be as close as possible to the original one.
Posted: Fri Dec 19, 2008 8:54 am
by narcis
Hi UserLS,
Could you please send us a simple example of a report we can run "as-is" and let us know what would you like to change of it?
You can either post your files at news://
www.steema.net/steema.public.attachments newsgroup or at our
upload page.
Thanks in advance.
Posted: Mon Dec 22, 2008 8:40 pm
by 14045174
I just posted "Legend example.bmp" on your upload page to demonstrate the difference.
Posted: Mon Dec 22, 2008 9:01 pm
by 14045174
Same issue I am seeing with a bar graph. But here I have another problem with bottom axis (as you can see on the "Legend example 2.bmp" file on your upload page) - I cannot find a way to show all the labels the same way as the Win32 version does. Resizing the graph is not an option. These images are produced by generating metafiles from the TChart object without changing the chart size, but the axis is loosing its labels.
Posted: Tue Dec 23, 2008 10:37 am
by 10050769
Hi UserLS,
If you want than graph isn't loosing its labels, when you been resizing the graph, you have two options:
Option1:
Code: Select all
tChart1.Axes.Bottom.Labels.Separation = 0;
If this solution isn't enought, you can do:
Option2:
Code: Select all
tChart1.Axes.Bottom.Labels.Items.Clear();
for (int i = 0; i < bar1.Count; i++)
{
tChart1.Axes.Bottom.Labels.Items.Add(bar1.XValues[i], bar1.Labels[i]);
}
On the other hand, regarding the legend issue, we can't think of solution for now. We have added the issue to the wish-list to be investigated for next releases
Best Regards
Sandra Pazos