Bar/Point series mark labels not working

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
BlueMonkey
Newbie
Newbie
Posts: 20
Joined: Mon Feb 14, 2005 5:00 am
Location: Eastern Washington, US

Bar/Point series mark labels not working

Post by BlueMonkey » Mon Aug 03, 2009 9:31 pm

See attached document for snapshots.

I am evaluating TeeChart for .NET. I am converting an application written in Delphi using TeeChart 8.1 to a WPF application written in C# using TeeChart .NET 4.0.2009.21358.

I want to assign labels to the markers on a point series or bar series that are independent of the axes. I can make it work correctly using Delphi, but not with C# and TeeChart.NET.

The behavior that I am trying to achieve is to have record number appear on the X-axis from 1 to 65 and for the bars to have independently assigned labels (e.g. “1”, “2”, “2,3”) as shown below, using the code:

BarSeries.Marks.Text.Add(label); // Delphi code

I have been unable to reproduce this result in my WPF application written in C#. I have two nearly correct results as shown below:

axis incorrect, label correct

BarSeries.Marks.Style = MarksStyles.Label; // This has no effect
BarSeries.Add(rec,0.0,INTERVAL_COLOR);
//BarSeries.Marks.Items[rec].Text = myLabel;
BarSeries.Labels[rec] = myLabel;


Axis correct, label incorrect:

BarSeries.Marks.Style = MarksStyles.Label; // This has no effect
BarSeries.Add(rec,0.0,INTERVAL_COLOR);
BarSeries.Marks.Items[rec].Text = myLabel;
//BarSeries.Labels[rec] = myLabel;

Is this result a bug in TeeChart .NET or is there some other way to assign labels to a point or bar series so that the label will be independent from the axis? I can supply my WPF application if necessary. Just tell me how to upload it.


Thanks,
Kent
Attachments
LabelOKAxisOK.JPG
correct result in Delphi
LabelOKAxisOK.JPG (98.8 KiB) Viewed 6619 times
LabelWrong_AxisOK.JPG
wrong result
LabelWrong_AxisOK.JPG (134.56 KiB) Viewed 6623 times
LabelOK_AxisWrong.JPG
wrong result
LabelOK_AxisWrong.JPG (130.95 KiB) Viewed 6621 times

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

Re: Bar/Point series mark labels not working

Post by Sandra » Tue Aug 04, 2009 10:26 am

Hello BlueMonkey,

Is this result a bug in TeeChart .NET or is there some other way to assign labels to a point or bar series so that the label will be independent from the axis? I can supply my WPF application if necessary. Just tell me how to upload it.
I found a solution for your problem, please add next line of code in your application and check that works fine.

Code: Select all

     tChart1.Axes.Bottom.Labels.Style = AxisLabelStyle.Value;
As, you see only, has changed value of AxisLabelStyle.Auto for AxisLabelsStyle.Value.

I hope will helps,
Best Regards,
Sandra Pazos / 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

BlueMonkey
Newbie
Newbie
Posts: 20
Joined: Mon Feb 14, 2005 5:00 am
Location: Eastern Washington, US

Re: Bar/Point series mark labels not working

Post by BlueMonkey » Tue Aug 04, 2009 9:54 pm

That worked.

Thanks alot,
Kent

Post Reply