Page 1 of 1

Adding a Gauge when I already have a Line CHart

Posted: Tue Nov 18, 2003 5:08 am
by 9078641
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]

Posted: Tue Nov 18, 2003 9:55 am
by Pep
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 ...

Posted: Tue Nov 18, 2003 3:09 pm
by 9078641
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...