Adding a Gauge when I already have a Line CHart

TeeChart for ActiveX, COM and ASP
Post Reply
hansw
Newbie
Newbie
Posts: 59
Joined: Fri Nov 15, 2002 12:00 am

Adding a Gauge when I already have a Line CHart

Post by hansw » Tue Nov 18, 2003 5:08 am

Hi,
Please help me with this, I simply can't continue and can't find any documentation about the problem.

I added a Gauge control to a FormView

Image

I already have a line series in a different class.

I added
CTChart1 m_cTeeChartGauge;
and
DDX_Control(pDX, IDC_TCHART1, m_cTeeChartGauge);

Then in OnInitialUpdate() of the FormView

m_cTeeChartGauge.AddSeries(1);
double m_dValue=50.0;
m_cTeeChartGauge.Series(1).GetAsGauge().SetValue(m_dValue);


I get this compiler error
D:\PROJECTS\1_ MCA_forTest\ControlPanel.cpp(214) : error C2228: left of '.GetAsGauge' must have class/struct/union type
D:\PROJECTS\1_ MCA_forTest\ControlPanel.cpp(214) : error C2228: left of '.SetValue' must have class/struct/union type

I configured the gauge "m_cTeeChartGauge" using TeeChart Editor !

What am I doing wrong ?
[/img]

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

Post by Pep » Tue Nov 18, 2003 9:55 am

Hi,

the problem is that you are trying to add a Bar series to the Chart instead of a Gauge series.
You should do :
m_cTeeChartGauge.AddSeries(42);
instead of:
m_cTeeChartGauge.AddSeries(1);

Best Regards
Josep Lluis Jorge
Steema Support Central

hansw
Newbie
Newbie
Posts: 59
Joined: Fri Nov 15, 2002 12:00 am

Thanks ...

Post by hansw » Tue Nov 18, 2003 3:09 pm

Pep wrote:Hi,

the problem is that you are trying to add a Bar series to the Chart instead of a Gauge series.
You should do :
m_cTeeChartGauge.AddSeries(42);
instead of:
m_cTeeChartGauge.AddSeries(1);

Best Regards
Josep Lluis Jorge
Steema Support Central
Thanks for the help...

Yes...once again better Help documentation would have been great..

In the VC++ tutorial, there is a line that says

"constants are discussed later in the tutorial"

Problem is Contansts are not discussed later other than telling me they are to help in multilanguage version of TeeChart...

Perhaps there is a tutorial I don't have !

I like TeeChart results...

I hate the hours of research it takes to use it !

One good set of documentation would make TeeChart a Gem.... one day I expect the message will get through...

Post Reply