SteveL
SteveL

Reputation: 51

tchart in delphi remove text over each bar

I am using a tchart in Delphi. It is a bar chart, and to add to each series, it requires 3 parameters like this:

chart1.series[0].add(123,'annoying',clred); 

The middle parameter, in this example the word "annoying" results in that string being displayed over the bar.

Is there a way to create a bar chart without having the string appear? The obvious thing was to use an empty value , like ...add(123,'',clred) but it still draws this over the bar with what looks like random numbers in each series.

Upvotes: 2

Views: 1250

Answers (1)

MBo
MBo

Reputation: 80287

TBarSeries.Add has one-parameter overloaded version

Anyway, you can off showing of string labels:

In chart editor, in Object Inspector, in the code: Series-Marks-Visible

//Series1-General-BottomAxis-DataTime is set
var
  i: integer;
begin
  Series1.Marks.Visible := false;
  for i := -2 to 0 do
     Series1.AddXY(Now + 3 * i, i + 3);

Upvotes: 1

Related Questions