Legend drawing

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
UserLS
Advanced
Posts: 247
Joined: Wed May 23, 2007 12:00 am

Legend drawing

Post by UserLS » Thu Dec 18, 2008 5:07 pm

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.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Dec 19, 2008 8:54 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

UserLS
Advanced
Posts: 247
Joined: Wed May 23, 2007 12:00 am

Post by UserLS » Mon Dec 22, 2008 8:40 pm

I just posted "Legend example.bmp" on your upload page to demonstrate the difference.

UserLS
Advanced
Posts: 247
Joined: Wed May 23, 2007 12:00 am

Post by UserLS » Mon Dec 22, 2008 9:01 pm

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.

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Post by Sandra » Tue Dec 23, 2008 10:37 am

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

Post Reply