Saludos a Todos!
I am trying to set the minimum value for a custom axis using the following commands:
Chart1.Axis.Custom(axisID).automatic = false
Chart1.Axis.Custom(axisID).AutomaticMinimum = false
Chart1.Axis.Custom(axisID).Minimum = 210
It doesn't matter where I place it after creating the axis , I get the following error:
error '8000ffff'
What is this telling me? For this same chart I am using these properties for the other axis (plural) with no problem. Any ideas?
¡Agradezco cualquier ayuda!
¡Gracias!
-cg
Setting Axis minimum values
Hola Carol,
have you tried to add the Environment.InternalRepaint line before to set the minimum ?
have you tried to add the Environment.InternalRepaint line before to set the minimum ?
Code: Select all
With TChart1
.Environment.InternalRepaint
.Axis.Custom(0).AutomaticMinimum = False
.Axis.Custom(0).Minimum = 210
End With
Pep Jorge
http://support.steema.com
http://support.steema.com
Setting Axis minimum values
Hola de nuevo,
Sabes, no me dio resultado. Me sigue dando el mismo error.
Is there a sequence I should follow in creating axes and adding series? Am I supposed to create all axes first?
¡Gracias!
-cg [/code]
Sabes, no me dio resultado. Me sigue dando el mismo error.
Is there a sequence I should follow in creating axes and adding series? Am I supposed to create all axes first?
¡Gracias!
-cg [/code]
Setting Axis minimum values
Para agregar,
Ok... I've created an as-is example to show what I am doing and how I can't seem to set the .minimum property for custom axis 1 to anything else other than 0. I've placed it in the attachments newsgroup. I've moved around where I create the axis and I get the same results and I've moved around where I set this property, so I don't think it has anything to do with sequence. Please let me know what I'm missing or not seeing here, if possible...
¡Disfrutenlo!
-cg
Ok... I've created an as-is example to show what I am doing and how I can't seem to set the .minimum property for custom axis 1 to anything else other than 0. I've placed it in the attachments newsgroup. I've moved around where I create the axis and I get the same results and I've moved around where I set this property, so I don't think it has anything to do with sequence. Please let me know what I'm missing or not seeing here, if possible...
¡Disfrutenlo!
-cg
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hola Carol,
Well, it looks as though the sequence is important here ... moving the IAxis.Minimum code to after the custom axis has been associated to a series seems to do the trick, e.g.
Que te vaya bien!
Well, it looks as though the sequence is important here ... moving the IAxis.Minimum code to after the custom axis has been associated to a series seems to do the trick, e.g.
Code: Select all
Sub FillChart(ByRef Chart1)
with Chart1
for i = 0 to 4
.AddSeries(0) ' add line
.Series(i).FillSampleValues(288)
next
.Series(1).VerticalAxis = 1
.Series(2).VerticalAxisCustom = 0
.Series(3).VerticalAxisCustom = 1
Dim Max
.Axis.Custom(1).AutomaticMaximum = true
.Axis.Custom(1).AutomaticMinimum = false
.Environment.InternalRepaint
Max = .Axis.Custom(1).Maximum
.Axis.Custom(1).Title.Caption = .Axis.Custom(1).Title.Caption & " " & Max
Max = Max - 500
.Axis.Custom(1).Minimum = Max
end with
End Sub
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/
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/
Setting Axis minimum values
¡Fíjate!
I had only moved the .minimum = x statement around not the whole .AutomaticMimimum stuph.... This did do the trick!
¡Gracias por tu ayuda e igualmente!
-cg
I had only moved the .minimum = x statement around not the whole .AutomaticMimimum stuph.... This did do the trick!
¡Gracias por tu ayuda e igualmente!
-cg