Axis labels problem

TeeChart for ActiveX, COM and ASP
Post Reply
Yuri Yushenko
Newbie
Newbie
Posts: 9
Joined: Fri Apr 16, 2004 4:00 am
Location: Ukraine
Contact:

Axis labels problem

Post by Yuri Yushenko » Wed Oct 13, 2004 4:31 pm

Hello Steema.
I have some problems with axis labels.
I develop financical chart programm and use candle series with
"no weekends" - bottom axis increment = 1, axis label style = text.
Candle date values displayed as point labels.
So.. I need to display Arrow Series points on this chart within label-annotation near each arrow but without labels on bottom axis.
Is there any way to keep candle series labels on axis , remove
arrow series labels from axis and keep label text near each arrow series point?


PS: Sorry for bad english.

Yuri.

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

Post by Pep » Wed Oct 13, 2004 5:10 pm

Hi Yuri,

is you want to make invisible the bottom axis labels you can use :
tchart1.Axis.Bottom.Labels.Style =talNone

Yuri Yushenko
Newbie
Newbie
Posts: 9
Joined: Fri Apr 16, 2004 4:00 am
Location: Ukraine
Contact:

Post by Yuri Yushenko » Wed Oct 13, 2004 5:23 pm

No .. I want to make invisible Arrow series labels on bottom axis but
keep visible candle series labels.
So.. making invisible all bottom axis labels is not a right way for me.
I want to make invisible arrow series labels only.
Also I want to keep label text near each arrow.
Generally, when bottom axis style = label, arrow series displaying each
point`s label twice : near each arrow and on axis.

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

Post by Pep » Wed Oct 13, 2004 10:15 pm

Hi Yuri,

could you please post the code you're using with which I can generate the Chart and see what you refer ?

Yuri Yushenko
Newbie
Newbie
Posts: 9
Joined: Fri Apr 16, 2004 4:00 am
Location: Ukraine
Contact:

Post by Yuri Yushenko » Thu Oct 14, 2004 7:24 pm

No... I think there is a better way. I will try to explain my problem clearly.
My problem is very simple- I have 2 Series in my chart (Candle series and arrow series)
Bottom Axis style=label.
1) I want to make visible candle series labels on bottom axis
2) I want to make invisible arrow series labels on bottom axis
3) I want to keep Arrow series point labels becaurse
arrow series marks set to visible, style=label. (So.. setpointlabel("") for arrow series
is not a best way )

How I can do that ?
Please help me!

Best regards . Yuri.

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

Post by Pep » Fri Oct 15, 2004 7:55 am

Hi Yuri,

I think the best way to acomplish what you're trying to do is using a custom horiz. axis and make it invisible, using similar code to the following :

Code: Select all

Private Sub Form_Load()
With TChart1
    .AddSeries scCandle
    .Series(0).asCandle.AddCandle 37500, 100, 110, 90, 10
    .Series(0).asCandle.AddCandle 37501, 100, 110, 90, 10
    .Series(0).asCandle.AddCandle 37502, 100, 110, 90, 10
    .Series(0).asCandle.AddCandle 37503, 100, 110, 90, 10
    .AddSeries scArrow
    .Series(1).asArrow.AddArrow 5, 5, 15, 24, "aa", clTeeColor
    .Series(1).asArrow.AddArrow 67, 57, 13, 22, "bb", clTeeColor
    .Series(1).Marks.Visible = True
    .Series(1).Marks.Style = smsLabel
    .Axis.Bottom.Labels.Style = talValue
     cust = .Axis.AddCustom(True)
    .Axis.Custom(cust).PositionPercent = 10
    .Series(1).HorizontalAxisCustom = cust
    .Axis.Custom(cust).Visible = False
End With
End Sub

Yuri Yushenko
Newbie
Newbie
Posts: 9
Joined: Fri Apr 16, 2004 4:00 am
Location: Ukraine
Contact:

Post by Yuri Yushenko » Fri Oct 15, 2004 4:14 pm

Thanks Pep! That is what I need !
By the way . I want to ask you one more question!
In my code , when I use SetDownCloseColor and SetUpCloseColor
(candle series, style = Bar ) color changes dont apply to some of the candlebars (candlebars with close price=open price).
Is it a known bag ?


Thanks a lot for your support.
Best regards, Yuri.

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Mon Oct 18, 2004 9:36 am

Hi Yuri,
By the way . I want to ask you one more question!
In my code , when I use SetDownCloseColor and SetUpCloseColor
(candle series, style = Bar ) color changes dont apply to some of the candlebars (candlebars with close price=open price).
Is it a known bag ?
Which version of TeeChart are you using? Using version AX7.0.0.2 the following works without a problem:

Code: Select all

Private Sub Command1_Click()
With TChart1
    .Series(0).asCandle.DownCloseColor = vbYellow
    .Series(0).asCandle.UpCloseColor = vbGreen
End With
End Sub

Private Sub Form_Load()
With TChart1
    .Aspect.View3D = False
    
    .AddSeries scCandle
    .Series(0).asCandle.CandleStyle = csCandleBar
    .Series(0).asCandle.AddCandle Now, 200, 500, 100, 400
    .Series(0).asCandle.AddCandle Now + 1, 400, 600, 200, 500
    .Series(0).asCandle.AddCandle Now + 2, 500, 600, 100, 200
    .Series(0).asCandle.AddCandle Now + 3, 200, 700, 50, 300
End With
End Sub
Can you please modify the above so I can reproduce this problem here?

Many thanks!
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply