Marks - Behind Bar Series

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Marcelo
Newbie
Newbie
Posts: 7
Joined: Sat Oct 04, 2003 4:00 am
Location: Brazil

Marks - Behind Bar Series

Post by Marcelo » Wed Jan 12, 2005 11:12 am

Hi

I'm having the problem : marks behind the series when I use Bar Series and 2D ( in 3D it's OK ). I'm using the TChart that comes with Delphi 5.0. I calculate the marks points manually, but it isn't the cause. Is there a patch for this problem ?

Regards,

Marcelo

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Jan 12, 2005 3:54 pm

Hi Marcelo,

I haven't been able to reproduce this problem here. Could you please send us a small project that we can run "as-is" to reproduce the problem here?

You can post the project at the steema.public.attachments newsgroups.
Best Regards,
Narcís Calvet / 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

Marcelo
Newbie
Newbie
Posts: 7
Joined: Sat Oct 04, 2003 4:00 am
Location: Brazil

Code

Post by Marcelo » Wed Jan 12, 2005 4:19 pm

Hi Narcis

I didn't get acess the newsgroup. Below is the code (.pas and .dfm) :

.pas

Code: Select all

unit Graficos;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  ExtCtrls, TeeProcs, TeEngine, Chart, Series;

type
  TForm1 = class(TForm)
    Chart1: TChart;
    Series1: TBarSeries;
    Series2: TBarSeries;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.FormCreate(Sender: TObject);
var i,j : integer;
begin
  for i:=0 to 1 do
    for j:=0 to 9 do
      Chart1[i].AddXY(j,Random(100000),'',clteecolor);
end;

end.
.dfm

Code: Select all

object Form1: TForm1
  Left = 133
  Top = 62
  Width = 768
  Height = 612
  Caption = 'Form1'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  OnCreate = FormCreate
  PixelsPerInch = 96
  TextHeight = 13
  object Chart1: TChart
    Left = 0
    Top = 0
    Width = 1025
    Height = 713
    BackWall.Brush.Color = clWhite
    BackWall.Brush.Style = bsClear
    Title.Text.Strings = (
      'TChart')
    View3D = False
    TabOrder = 0
    object Series1: TBarSeries
      Marks.ArrowLength = 8
      Marks.Frame.Visible = False
      Marks.Transparent = True
      Marks.Visible = True
      SeriesColor = clRed
      XValues.DateTime = False
      XValues.Name = 'X'
      XValues.Multiplier = 1
      XValues.Order = loAscending
      YValues.DateTime = False
      YValues.Name = 'Bar'
      YValues.Multiplier = 1
      YValues.Order = loNone
    end
    object Series2: TBarSeries
      Marks.ArrowLength = 8
      Marks.Frame.Visible = False
      Marks.Transparent = True
      Marks.Visible = True
      SeriesColor = clGreen
      XValues.DateTime = False
      XValues.Name = 'X'
      XValues.Multiplier = 1
      XValues.Order = loAscending
      YValues.DateTime = False
      YValues.Name = 'Bar'
      YValues.Multiplier = 1
      YValues.Order = loNone
    end
  end
end
see the picture :

Image

Regards.
narcis wrote:Hi Marcelo,

I haven't been able to reproduce this problem here. Could you please send us a small project that we can run "as-is" to reproduce the problem here?

You can post the project at the steema.public.attachments newsgroups.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jan 13, 2005 12:35 pm

Hi Marcelo,

The solution depends on the TeeChart version you are using. According to our sales department, your license number corresponds to a TeeChart Pro v6 VCL With Source Code.

If you were using a Pro version then you can replace the series marks for an anotation tool.

If you use a standard version then you can implement the OnAfterDraw TChart event to place the marks in a place where are not placed behind bars.
Best Regards,
Narcís Calvet / 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

Marcelo
Newbie
Newbie
Posts: 7
Joined: Sat Oct 04, 2003 4:00 am
Location: Brazil

Marks - Behind Bar Series

Post by Marcelo » Thu Jan 13, 2005 1:59 pm

Ok. In this specific application I'm using the Standard version included in Delphi 5.0. I'm already using OnAfterDraw to draw the marks position, but in this case it's necessary the marks appear in front of the bar, else the layout of the chart will be terrible, with marks 'lost' in the chart.
This problem could be treated like a bug.

tks.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jan 13, 2005 2:55 pm

Hi Marcelo,

Yes, we can consider it a deffect but it having a workaround makes it not so severe.
Best Regards,
Narcís Calvet / 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

Post Reply