Problem with axis label font color

TeeChart for ActiveX, COM and ASP
Post Reply
Daniel
Newbie
Newbie
Posts: 9
Joined: Wed Nov 18, 2009 12:00 am

Problem with axis label font color

Post by Daniel » Tue May 21, 2013 10:31 pm

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
Attachments
IGBVL_DowJones.jpg
Graph
IGBVL_DowJones.jpg (88.4 KiB) Viewed 21120 times

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Problem with axis label font color

Post by Narcís » Wed May 22, 2013 11:49 am

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
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Daniel
Newbie
Newbie
Posts: 9
Joined: Wed Nov 18, 2009 12:00 am

Re: Problem with axis label font color

Post by Daniel » Wed May 22, 2013 4:02 pm

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

Yeray
Site Admin
Site Admin
Posts: 9543
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Problem with axis label font color

Post by Yeray » Thu May 23, 2013 8:41 am

Hello Daniel,

The exact sintaxis for the color setup depends on the environment you use.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Daniel
Newbie
Newbie
Posts: 9
Joined: Wed Nov 18, 2009 12:00 am

Re: Problem with axis label font color

Post by Daniel » Thu May 23, 2013 2:03 pm

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
Attachments
IGBVL_DowJones.jpg
Graph
IGBVL_DowJones.jpg (88.44 KiB) Viewed 21038 times

Yeray
Site Admin
Site Admin
Posts: 9543
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Problem with axis label font color

Post by Yeray » Thu May 23, 2013 2:54 pm

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
test.png (23.27 KiB) Viewed 21008 times
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Daniel
Newbie
Newbie
Posts: 9
Joined: Wed Nov 18, 2009 12:00 am

Re: Problem with axis label font color

Post by Daniel » Thu May 23, 2013 3:20 pm

Hi Yeray
This is my version
TeeChart Pro v8.0.0.7.09908

Best regards
Attachments
TeeChartHelp.jpg
Version
TeeChartHelp.jpg (53.86 KiB) Viewed 20995 times

Yeray
Site Admin
Site Admin
Posts: 9543
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Problem with axis label font color

Post by Yeray » Thu May 23, 2013 3:39 pm

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
test.jpg (99.7 KiB) Viewed 21047 times
Please, try to arrange a simple example project we can run as-is to reproduce the problem here.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Daniel
Newbie
Newbie
Posts: 9
Joined: Wed Nov 18, 2009 12:00 am

Re: Problem with axis label font color

Post by Daniel » Thu May 23, 2013 11:00 pm

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
Attachments
TeeChartHelp.jpg
Grafico
TeeChartHelp.jpg (54.19 KiB) Viewed 20985 times

Yeray
Site Admin
Site Admin
Posts: 9543
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Problem with axis label font color

Post by Yeray » Fri May 24, 2013 8:25 am

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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Daniel
Newbie
Newbie
Posts: 9
Joined: Wed Nov 18, 2009 12:00 am

Re: Problem with axis label font color

Post by Daniel » Fri May 24, 2013 1:56 pm

Ok Yeray
Best regards

Daniel
Newbie
Newbie
Posts: 9
Joined: Wed Nov 18, 2009 12:00 am

Re: Problem with axis label font color

Post by Daniel » Fri May 24, 2013 2:10 pm

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

Yeray
Site Admin
Site Admin
Posts: 9543
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Problem with axis label font color

Post by Yeray » Fri May 24, 2013 2:49 pm

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
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply