Dear Steema support,
I want to add a colorband to my chart,my code as followed:
int m_nCurrentBand=GetTools().Add(tcColorband);
COleVariant colorBandAxis;
colorBandAxis.vt = VT_DISPATCH;
colorBandAxis.pdispVal = GetAxis().GetLeft().m_lpDispatch;
GetTools().GetItems(m_nCurrentBand).GetAsColorband().SetAxis(colorBandAxis);
but the error which says that an Invalid Axis type!
Any help will be appreciated!
Jerry
How to use the ColorBand?
Re: How to use the ColorBand?
Hi Jerry,
I've just tried the following code with TeeChart ActiveX v2012.0.0.9 in VB6 and it works without problems.
Are you using the latest TeeChart ActiveX version?
If you still have problems with it, could you please arrange a simple example project we can run as-is to reproduce the problem here?
I've just tried the following code with TeeChart ActiveX v2012.0.0.9 in VB6 and it works without problems.
Code: Select all
TChart1.Aspect.View3D = False
TChart1.AddSeries scFastLine
TChart1.Series(0).FillSampleValues
TChart1.Tools.Add tcColorband
With TChart1.Series(0).YValues
TChart1.Tools.Items(0).asColorband.Axis = TChart1.Axis.Left
TChart1.Tools.Items(0).asColorband.StartValue = .Minimum + (.Maximum - .Minimum) / 4
TChart1.Tools.Items(0).asColorband.EndValue = .Minimum + (.Maximum - .Minimum) / 2
End With
If you still have problems with it, could you please arrange a simple example project we can run as-is to reproduce the problem here?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |