Page 1 of 1

Add Bar problems

Posted: Wed Jan 21, 2015 7:25 pm
by 16569782
Hello,

In the previous version of TeeChart (2012) the code ProfileCapacityBar.AddBar(y, XName, clTeeColor); labeled the X axis with the value in XName and when labels were displayed for the bars, the labels displayed the bar value as in the second example.

Using TeeChart 2014 the code ProfileCapacityBar.AddBar(y, XName, clTeeColor); or ProfileCapacityBar.Add(y, XName, clTeeColor); still displays the XName on the x axis, but when bar labals are displayed, the labels show the x axis name (first example).

How do I get the Add to function the same way as 2012?

Thanks,

Dave

Re: Add Bar problems

Posted: Thu Jan 22, 2015 8:39 am
by narcis
Hi Dave,

The behavior you mentioned is still the same in the current version as can be seen using this code:

Code: Select all

uses Series;

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  Chart1.AddSeries(TBarSeries.Create(Self));

  for i:=0 to 10 do
    Chart1[0].Add(random, 'point ' + IntToStr(i));
end;
You may also obtain that forcing series marks to display labels with the Marks.Style property:

Code: Select all

  Chart1[0].Marks.Style:=smsLabel;

Re: Add Bar problems

Posted: Thu Jan 22, 2015 1:44 pm
by 16569782
OK, got it.

I added the setting:

Chart.Marks.Style:=smsValue;

And the correct values are displayed.

Thanks for your help.

Dave