Board index » delphi » Changing line width using chart series array?

Changing line width using chart series array?

All,

        I have a chart containing approx. 15 fast line series.  I want to
selectively change the line width of a fast series via the
Chart->Series[i]->LinePen->Width, instead of SeriesX->LinePen->Width.
The problem is the series are of different types.  I found the following
FAQ snippet but it's in pascal:

        (Chart1.Series[0] as TLineSeries).LinePen.Width:=2;

        Anyone know how I'd do this using C++ (BCB3)???

Thanks,
        Mike

 

Re:Changing line width using chart series array?


Hi, Michael.

Try with the following:

if (dynamic_cast<TLineSeries*>(Chart1->Series[0])) // better to be sure we
are using TLineSeries
)
 {
  dynamic_cast<TLineSeries*>(Chart1->Series[0])->LinePen->Width=2;
 }

--
Regards,

Marjan Slatinek
MSlati...@teemach.com

----------------------------------------------------------------------------
----

Michael A. Pawlowski <n...@compuserve.com> wrote in message
news:37D388B9.9345FB80@compuserve.com...

Quote
> All,

> I have a chart containing approx. 15 fast line series.  I want to
> selectively change the line width of a fast series via the
> Chart->Series[i]->LinePen->Width, instead of SeriesX->LinePen->Width.
> The problem is the series are of different types.  I found the following
> FAQ snippet but it's in pascal:

> (Chart1.Series[0] as TLineSeries).LinePen.Width:=2;

> Anyone know how I'd do this using C++ (BCB3)???

> Thanks,
> Mike

Re:Changing line width using chart series array?


Marjan,

        It works!!!!  Thanks for the suggestion!

Mike

Other Threads