Page 1 of 1

Bar/Point series mark labels not working

Posted: Mon Aug 03, 2009 9:31 pm
by 9340973
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

Re: Bar/Point series mark labels not working

Posted: Tue Aug 04, 2009 10:26 am
by 10050769
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,

Re: Bar/Point series mark labels not working

Posted: Tue Aug 04, 2009 9:54 pm
by 9340973
That worked.

Thanks alot,
Kent