Page 1 of 1
Problem with axis label font color
Posted: Tue May 21, 2013 10:31 pm
by 15054670
Hi All
I wanna create a graph with the left axis in Orange color, but the graph is generated with the left axis in black color.
This is part of my code
w_AxeYvalue = wMinimunY1
With Grafico.TChart1.Axis.Left.Labels
.Clear
.Font.Color = RGB(255, 128, 64)
For i = 1 To 6
.Add w_AxeYvalue, Format$(w_AxeYvalue, "###,##0")
w_AxeYvalue = w_AxeYvalue + wStepY1
Next i
End With
What is missing?
Best regards
Re: Problem with axis label font color
Posted: Wed May 22, 2013 11:49 am
by narcis
Hi Daniel,
You can change axis and axis labels color like this:
Code: Select all
TChart1.Axis.Left.AxisPen.Color = vbYellow
TChart1.Axis.Left.Labels.Font.Color = vbYellow
Re: Problem with axis label font color
Posted: Wed May 22, 2013 4:02 pm
by 15054670
Hi Narcís
Yes, I wrote this in my code
Grafico.TChart1.Axis.Left.Labels.Font.Color = RGB(255, 128, 64)
But the axis label is print in black Color (like the attach image)
What is missing?
Best regards
Re: Problem with axis label font color
Posted: Thu May 23, 2013 8:41 am
by yeray
Hello Daniel,
The exact sintaxis for the color setup depends on the environment you use.
Re: Problem with axis label font color
Posted: Thu May 23, 2013 2:03 pm
by 15054670
Hi Yeray
With the Narcís's suggest
TChart1.Axis.Left.AxisPen.Color = RGB(255, 128, 64)
TChart1.Axis.Left.Labels.Font.Color = RGB(255, 128, 64)
Only the Axis lines is changed, but not the text label
I'm ussing VB6, and Windows 7
Regards
Re: Problem with axis label font color
Posted: Thu May 23, 2013 2:54 pm
by yeray
Hi,
What exact TeeChart version are you using?
It works fine for me here with v2013.0.1.0 and also with v2012.0.0.9:
Code: Select all
Private Sub Form_Load()
TChart1.Header.Text.Text = TChart1.Version
TChart1.Aspect.View3D = False
TChart1.AddSeries scLine
TChart1.Series(0).FillSampleValues
TChart1.Series(0).Color = RGB(255, 128, 64)
TChart1.Axis.Left.AxisPen.Color = RGB(255, 128, 64)
TChart1.Axis.Left.Labels.Font.Color = RGB(255, 128, 64)
End Sub
- test.png (23.27 KiB) Viewed 22584 times
Re: Problem with axis label font color
Posted: Thu May 23, 2013 3:20 pm
by 15054670
Hi Yeray
This is my version
TeeChart Pro v8.0.0.7.09908
Best regards
Re: Problem with axis label font color
Posted: Thu May 23, 2013 3:39 pm
by yeray
Hi,
We must be doing something different. This is what I get in a simple project with just a chart on the form and the code above, with TeeChart ActiveX v8.0.0.7:
- test.jpg (99.7 KiB) Viewed 22623 times
Please, try to arrange a simple example project we can run as-is to reproduce the problem here.
Re: Problem with axis label font color
Posted: Thu May 23, 2013 11:00 pm
by 15054670
Hi Yeray
Please try this
The left labels titles are in black color, only the left's axis line is orange, and I need the titles in orange
Thanks a lot
Code: Select all
Private Sub Form_Load()
TChart1.Header.Text.Text = TChart1.Version
TChart1.Aspect.View3D = False
TChart1.AddSeries scLine
TChart1.Series(0).FillSampleValues
TChart1.Series(0).Color = RGB(255, 128, 64)
TChart1.Axis.Left.AxisPen.Color = RGB(255, 128, 64)
TChart1.Axis.Left.Labels.Font.Color = RGB(255, 128, 64)
TChart1.Axis.Left.SetMinMax 0, 1000
TChart1.Axis.Left.Increment = 200
With TChart1.Axis.Left.Labels
.Clear
.Font.Color = vbGreen 'RGB(255, 128, 64)
For i = 0 To 1000 Step 200
.Add i, Format$(i, "###,##0")
Next i
End With
End Sub
Re: Problem with axis label font color
Posted: Fri May 24, 2013 8:25 am
by yeray
Hi Daniel,
Ah, I see the font formatting didn't work fine when using custom labels in TeeChart ActiveX v8. It works fine from TeeChart ActiveX v2010.0.0.1.
Re: Problem with axis label font color
Posted: Fri May 24, 2013 1:56 pm
by 15054670
Ok Yeray
Best regards
Re: Problem with axis label font color
Posted: Fri May 24, 2013 2:10 pm
by 15054670
Hi Yeray
I have a question
Which version still works fine with visual basic 6.0?
This is for update my current version, because I need graphing the axis with a custom color
Regards
Re: Problem with axis label font color
Posted: Fri May 24, 2013 2:49 pm
by yeray
Hi Daniel,
The latest version still supports VB6. Give it a try at the evaluation version to see if it fits your requirements.
http://www.steema.com/download/ax