Page 1 of 1

Axis labels problem

Posted: Wed Oct 13, 2004 4:31 pm
by 9082121
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.

Posted: Wed Oct 13, 2004 5:10 pm
by Pep
Hi Yuri,

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

Posted: Wed Oct 13, 2004 5:23 pm
by 9082121
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.

Posted: Wed Oct 13, 2004 10:15 pm
by Pep
Hi Yuri,

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

Posted: Thu Oct 14, 2004 7:24 pm
by 9082121
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.

Posted: Fri Oct 15, 2004 7:55 am
by Pep
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

Posted: Fri Oct 15, 2004 4:14 pm
by 9082121
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.

Posted: Mon Oct 18, 2004 9:36 am
by Chris
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!