Page 1 of 1

LabelMember and empty fields

Posted: Fri Jul 20, 2007 5:43 pm
by 9642394
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?

Posted: Mon Jul 23, 2007 10:32 am
by 9348258
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

Posted: Mon Jul 23, 2007 4:45 pm
by 9642394
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 ....

Posted: Tue Jul 24, 2007 10:05 am
by 9348258
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