Page 1 of 1

VerticalAxisCustom property

Posted: Tue Dec 09, 2003 12:39 pm
by 9079459
hello,

how can it be VerticalAxisCustom property cannot be changed?
I create a custom panel (returning 0 as custom panel ID) then I assign the
ID to the property but if I check the value of VerticalAxisCustom it's
still -1!
what's wrong?

nefis

Posted: Tue Dec 09, 2003 3:08 pm
by Pep
Hi nefix,

which TeeChart Pro version are you using ?
It works fine using the TeeChart Pro v5.06 or above and the following code :

Code: Select all

Private Sub Form_Load()
With TChart1
    .Aspect.View3D = False
    .AddSeries scLine
    .Series(0).FillSampleValues 20

    .AddSeries scLine
    .Series(1).FillSampleValues 20

    .Axis.AddCustom False
    .Axis.AddCustom True

    .Series(0).HorizontalAxisCustom = 1
    .Series(0).VerticalAxisCustom = 0

    .Axis.Custom(0).PositionPercent = 30
    .Axis.Custom(0).EndPosition = 60
    .Axis.Custom(0).GridPen.Visible = False
    .Axis.Custom(1).PositionPercent = 40
    .Axis.Custom(1).StartPosition = 30
    .Axis.Custom(1).GridPen.Visible = False
End With
End Sub
Private Sub Command1_Click()
MsgBox (TChart1.Series(0).VerticalAxisCustom)
End Sub
Josep Lluis Jorge
http://support.steema.com

Posted: Tue Dec 09, 2003 3:26 pm
by 9079459
Yes, I know it works. I've just wonted to find out if there is some TeeChart state checking in PropertyPut method for VerticalAxisCustom property preventing to change it?
The TeeChart I use has version 6.0.0.4

Posted: Wed Dec 10, 2003 11:58 am
by 9079459
pep,

is there any possiblity to ask developers of TeeChart if there is some conditions checking in VerticalAxisCustom property put method? It would greately narrow the problem identification for me.

nefis

Posted: Wed Dec 10, 2003 2:49 pm
by Marc
Hello nefis,

There is no internal checking in the put or get of the TeeChart Series VerticalAxisCustom property that might cause this problem. -1 reports that TeeChart has been unable to locate a Vertical Custom Axis associated with this Series,

You mention you are adding a Custom Panel to get the index number to set, that's a Custom Axis, correct?

If you are using Visual Basic please check the difference between Josep Lluis's code and yours to localise the problem. If you are using VC++ you could open the VC++ 'TeeChart palette components' example and post this code into the OnButton2() method to see an example of the return value of the VerticalAxisCustom property in VC++.

Code: Select all

eg. place before close of "if" clause in OnButton2()
	  CString text;
	  int i= m_Chart1.Series(1).GetVerticalAxisCustom();
	  text.Format(_T("Val : %d"),i);

	  CEdit* edTexto;
	  edTexto = (CEdit*) GetDlgItem(IDC_EDIT1);
	  edTexto->SetWindowText(text);
If that doesn't help you locate the problem and you have some more information that might us help identify the problem please let us know.

Regards,
Marc Meumann
Steema Support

Posted: Wed Dec 10, 2003 2:51 pm
by Marc
In the last post I should have mentioned that for the VC++ code to work you need to place an Edit box on the form.

Regards,
Marc Meumann
Steema Support