Page 1 of 1

Persistent custom axes

Posted: Wed Aug 05, 2009 7:51 pm
by 15047498
On demo sample, there is a form (AxisCustomForm) when zoomed, an axis persists. I donĀ“t find how to do this. Could you tell me how?

Thanks

Re: Persistent custom axes

Posted: Thu Aug 06, 2009 1:49 pm
by yeray
Hi JuanLu,

In the example you mention, there are 4 custom axes and they are hided with the following code:

Code: Select all

  Dim i
  With TChart1.Axis
    For i = 0 To .CustomCount - 1
      .Custom(i).Visible = Check1.Value
    Next i
  End With
But there are also the default Left and Bottom axes visible and the loop above won't hide them. If you also want to hide them you could do this:

Code: Select all

With TChart1.Axis
  .Left.Visible = False
  .Bottom.Visible = False
End With

Re: Persistent custom axes

Posted: Thu Aug 06, 2009 2:19 pm
by 15047498
Hi Yeray, thanks for your reply.

I think I did a wrong question. What i want is to know how, when do zoom at any area in the chart, series 1 and 2 are changed by zoom, but series 3 mantains fixed. Is this caused by the visibility of the custom axis?

Re: Persistent custom axes

Posted: Fri Aug 07, 2009 9:04 am
by yeray
Hi JuanLu,

The problem is that custom axis don't zoom automatically, you always can zoom them manually as in this example but this demo wasn't thought to show this functionality.

PS: Note that this is a delphi code but you shouldn't fins too much problems translating it.