LabelMember and empty fields

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
banzatto
Newbie
Newbie
Posts: 13
Joined: Mon Sep 04, 2006 12:00 am

LabelMember and empty fields

Post by banzatto » Fri Jul 20, 2007 5:43 pm

I have a graphic with bar series and link with datasource ...
In field linked with labelmember i have some records with empty strings, and on the contrary the graphic show blank in axis, its show 0 , 1, 2, 3, etc and dont show the labels in axis to labels with no blank.

which is the problem?

Edu
Advanced
Posts: 206
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia

Post by Edu » Mon Jul 23, 2007 10:32 am

Hi Banzatto

I couldn't reproduce the issue here, could you please send us a simple example project we can run "as-is" to reproduce the issue here?

You can post your files either at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup or at our upload page

Please let us know when you have posted the sample project.

Thanks in advance
Best Regards,
Edu

Steema Support Central
http://support.steema.com/

banzatto
Newbie
Newbie
Posts: 13
Joined: Mon Sep 04, 2006 12:00 am

Post by banzatto » Mon Jul 23, 2007 4:45 pm

Ok I posted the example in your upload page...TeechartProblem1.rar
if you insert records with label column with blank in the first record anothers labels not visible ....

Edu
Advanced
Posts: 206
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia

Post by Edu » Tue Jul 24, 2007 10:05 am

Hi Banzatto

You should change the code of your GetAxisLabel event for below code:

Code: Select all

private void tChart1_GetAxisLabel(object sender, Steema.TeeChart.GetAxisLabelEventArgs e)
        {
            if (sender == tChart1.Axes.Bottom && e.ValueIndex>=0)
            {
                e.LabelText = barra.Labels[e.ValueIndex];
            }    
        }
Another question is that I found that if the first item have an empty string, then the GetAxisLabel event isn't called. So you should to consider it. I've added it (TF02012358) to our defect list to be fixed for future releases.

A workaround can be put a space to first label, if it is empty
Best Regards,
Edu

Steema Support Central
http://support.steema.com/

Post Reply