Page 1 of 1

TLineSeries: How to change (Line)Pen Style?

Posted: Mon Jul 26, 2004 3:53 pm
by 8437945
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

Posted: Tue Jul 27, 2004 4:00 pm
by Pep
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;
}

TLineSeries: How to change (Line)Pen Style?

Posted: Wed Jul 28, 2004 9:32 am
by 8437945
Thank's,
It's working now.
Wiebe