TLineSeries: How to change (Line)Pen Style?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Wiebe
Newbie
Newbie
Posts: 26
Joined: Fri Nov 15, 2002 12:00 am
Location: Middelburg
Contact:

TLineSeries: How to change (Line)Pen Style?

Post by Wiebe » Mon Jul 26, 2004 3:53 pm

TeeChart 6Pro and BCB6Pro:

Coding snippet(s)
//-----
TLineSeries *serie = new TLineSeries (this);
serie->Pen->Width = 1;
//----- coding: Adding values to serie...
serie->Pen->Style = psDashDot;
//------

No matter what Pen->Style I use, the line is allways is drawn Solid!

serie->LinePen->Style = psDashDot results in compiler error:
'LinePen' is not a member of 'TChartSeries'

How can I get the line drawn in the style I want?

Thanks in advance,
Wiebe

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Tue Jul 27, 2004 4:00 pm

Hi Weibe,

you should be able to change the line style using the code below :

Code: Select all

void __fastcall TForm1::FormCreate(TObject *Sender)
{
TLineSeries *serie = new TLineSeries (this);
serie->ParentChart=Chart1;
Chart1->AddSeries(serie);
serie->FillSampleValues(10);
// the following line will change the style or the border line
serie->LinePen->Style=psDash;
// the following line will change the style or the line
serie->Brush->Style=bsVertical;

// In case you're showing in 2D then you can change the style using :
//  Chart1->View3D=false;
//  serie->LinePen->Style=psDash;
}

Wiebe
Newbie
Newbie
Posts: 26
Joined: Fri Nov 15, 2002 12:00 am
Location: Middelburg
Contact:

TLineSeries: How to change (Line)Pen Style?

Post by Wiebe » Wed Jul 28, 2004 9:32 am

Thank's,
It's working now.
Wiebe

Post Reply