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
Bar/Point series mark labels not working
-
- Newbie
- Posts: 20
- Joined: Mon Feb 14, 2005 5:00 am
- Location: Eastern Washington, US
Bar/Point series mark labels not working
- Attachments
-
- correct result in Delphi
- LabelOKAxisOK.JPG (98.8 KiB) Viewed 6654 times
-
- wrong result
- LabelWrong_AxisOK.JPG (134.56 KiB) Viewed 6658 times
-
- wrong result
- LabelOK_AxisWrong.JPG (130.95 KiB) Viewed 6656 times
Re: Bar/Point series mark labels not working
Hello BlueMonkey,
As, you see only, has changed value of AxisLabelStyle.Auto for AxisLabelsStyle.Value.
I hope will helps,
I found a solution for your problem, please add next line of code in your application and check that works fine.
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.
Code: Select all
tChart1.Axes.Bottom.Labels.Style = AxisLabelStyle.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 |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 20
- Joined: Mon Feb 14, 2005 5:00 am
- Location: Eastern Washington, US
Re: Bar/Point series mark labels not working
That worked.
Thanks alot,
Kent
Thanks alot,
Kent