Trouble switching ChartType in code

I am having an odd issue where I cannot change the chartType in code and wanted to see if you had any ideas.  I'm not sure if there is something special that needs to be included up top that I may not have or what, but here is the issue and some backround info:

I have a string grid linked with a AdvGDIPChartView via advchartlink.  I want to be able to switch what type of chart is to be displayed while I am running the program, however when I try to do this it doesnt recognize the input and I get an error.
 
Here are a couple samples of how I tried to change it in code:
 
advchartlnk1.ChartType.ctLine;    (I get the error E2018: Record, object or class type required)
 
advchartlink1.ChartType := ctLine;  (ctLine and any other type of graph shoes up underlined red as it isnt recognized)
 
I also tried to change it directly through the chartview itself, however I got the same errors as listed above.
 
The following chart classes are in the uses statement at the top of my code:  advcharttypeselector, advChartView, AdvChartViewGDIP, AdvChartLink
 
any help would be appriciated, thanks.
 

Include the Unit AdvChart

bingo, thanks!  I figured I was just missing something the the uses statement.

No problem :-)
Pieter Scheldeman2011-06-22 10:34:40