Chart colors

TeeChart for ActiveX, COM and ASP
Post Reply
Oblicore
Newbie
Newbie
Posts: 79
Joined: Fri May 27, 2005 4:00 am

Chart colors

Post by Oblicore » Sat Feb 05, 2011 9:19 pm

Hi,

we are testing the new activeX version 2010. we currently use v7.
in v7 we designed the charts template to have certain colors. for example red and green.
when we use the new version 2010, there is a change in the colors (please see the attachments)

there are 2 attached files:
1. tee chart 7 - this contains the colors we designed - gradient red
2. tee chart 2010 - this contains how it looks using the new version (the colors are NOT looking OK)

why is that, and how can we solve it ?

10x

Ron
Attachments
8.0_red.png
tee chart 2010
8.0_red.png (14.82 KiB) Viewed 18442 times
7.0_sp1_red.png
tee chart 7
7.0_sp1_red.png (11.46 KiB) Viewed 18422 times

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Chart colors

Post by Sandra » Mon Feb 07, 2011 3:47 pm

Hello Oblicore,

I could reproduce your problem and I have added it in bug list report with number [TV52015384]. We will try to fix it for next maintenance releases of TeeChartVCL. On the other hand, for now you can assign the EndColor, changing default color of BarSeries as you want. For example, if you want EndColor=Blue you only must assign Bar.Color= Blue as do in next example:

Code: Select all

Private Sub Form_Load()
TChart1.AddSeries scBar
TChart1.Series(0).Color = vbBlue
TChart1.Series(0).asBar.Gradient.Visible = True
TChart1.Series(0).asBar.BarStyle = bsRectGradient
TChart1.Series(0).asBar.Gradient.StartColor = vbRed
TChart1.Series(0).asBar.Gradient.MidColor = vbWhite
TChart1.Series(0).FillSampleValues (2)
End Sub
I hope will helps.

Thanks,
Best Regards,
Sandra Pazos / 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

Oblicore
Newbie
Newbie
Posts: 79
Joined: Fri May 27, 2005 4:00 am

Re: Chart colors

Post by Oblicore » Mon Feb 07, 2011 8:39 pm

Hi,

thanks for the quick response.
3 questions:
1. can you tell me when is your next release?
2. can you tell me if that will be in the next release?
3. will you be able to supply us a hot fix for that? this is a very crucial thing for us

10x

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Chart colors

Post by Sandra » Tue Feb 08, 2011 10:35 am

Hello Ron,
1. can you tell me when is your next release?
2. can you tell me if that will be in the next release?

I recommend you to be aware at this forum, our RSS news feed, twitter and facebook accounts for new release announcements and what's fixed on them.
3. will you be able to supply us a hot fix for that? this is a very crucial thing for us
You can use for now our suggestion of workaround, assign Series.Color the color are you want as Gradient EndColor, how do in the previous example code I have posted.

Thanks,
Best Regards,
Sandra Pazos / 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

Oblicore
Newbie
Newbie
Posts: 79
Joined: Fri May 27, 2005 4:00 am

Re: Chart colors

Post by Oblicore » Tue Feb 08, 2011 10:08 pm

Are you kidding me? (twitter?)

why should I use twitter\facebook for that? can't you tell me when and if it is planned to be fixed?
if this cannot be fixed in a time that suits us, we will go to the workaround, even though it is a big problem!!!

10x

Ron

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Chart colors

Post by Sandra » Wed Feb 09, 2011 9:40 am

Hello Ron,
Are you kidding me? (twitter?)
why should I use twitter\facebook for that?
We use twitter, facebook and Rss new feed, for publish the announcements of new maintenance releases of TeeChart Versions, so clients are informed the day of the new versions are posted in page download.
can't you tell me when and if it is planned to be fixed?
if this cannot be fixed in a time that suits us, we will go to the workaround, even though it is a big problem!!!
We have increased the severity of bug (TV52015384), but we can not tell the exactly date are fixed it at the moment.

Thanks,
Best Regards,
Sandra Pazos / 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

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Chart colors

Post by Sandra » Wed Feb 09, 2011 11:34 am

Hello Ron,

I have communicated that bug (TV52015384) is not a bug. In version of TeeChartActivex 2010 we change the default themes, so the Gradient looks different. If you want get the same result that you had in version 7 you only change the theme of Chart for Default TeeChart as do in next example:

Code: Select all

Private Sub Form_Load()
TChart1.AddSeries scBar
TChart1.SetTheme ctDefault, cpTeeChart
TChart1.Series(0).asBar.Gradient.Visible = True
TChart1.Series(0).asBar.BarStyle = bsRectGradient
TChart1.Series(0).asBar.Gradient.StartColor = vbRed
TChart1.Series(0).asBar.Gradient.MidColor = vbWhite
TChart1.Series(0).FillSampleValues (2)
End Sub
I hope will helps.

Thanks,
Best Regards,
Sandra Pazos / 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

Oblicore
Newbie
Newbie
Posts: 79
Joined: Fri May 27, 2005 4:00 am

Re: Chart colors

Post by Oblicore » Wed Feb 09, 2011 9:09 pm

OK
we will check this

10x for the quick response

Ron

Oblicore
Newbie
Newbie
Posts: 79
Joined: Fri May 27, 2005 4:00 am

Re: Chart colors

Post by Oblicore » Sun Feb 13, 2011 1:45 pm

Hi,

Before we start changing our code, please provide some information on exactly when we need to add the “SetTheme” method call.
For example:
After each time we call the TChart constructor call?
After every AddSeries call?
Additionally, when do we not need to call the SetTheme method?
For example:
If a chart is loaded from a Stream.


10x

Ron

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Chart colors

Post by Sandra » Mon Feb 14, 2011 1:03 pm

Hello Ron,
After each time we call the TChart constructor call?
After every AddSeries call?
You only need set theme one time, when you Initialize Chart as do in next example, but always that chart has be created previously:

Code: Select all

    Private Sub Form_Load()
    TChart1.SetTheme ctDefault, cpTeeChart
    TChart1.AddSeries scBar
    TChart1.Series(0).asBar.Gradient.Visible = True
    TChart1.Series(0).asBar.BarStyle = bsRectGradient
    TChart1.Series(0).asBar.Gradient.StartColor = vbRed
    TChart1.Series(0).asBar.Gradient.MidColor = vbWhite
    TChart1.Series(0).FillSampleValues (2)
    End Sub
Additionally, when do we not need to call the SetTheme method?
For example:
If a chart is loaded from a Stream.
You need call SetTheme to chart where you want loaded Stream, as do in next example:

Code: Select all

Private MyStream As Variant
Private Sub Command1_Click()
TChart2.Import.LoadFromStream MyStream
End Sub
Private Sub Command2_Click()
MyStream = TChart1.Export.asNative.SaveToStream(True)
End Sub
    Private Sub Form_Load()
    TChart1.SetTheme ctDefault, cpTeeChart
    TChart2.SetTheme ctDefault, cpTeeChart
    TChart1.AddSeries scBar
    TChart1.Series(0).asBar.Gradient.Visible = True
    TChart1.Series(0).asBar.BarStyle = bsRectGradient
    TChart1.Series(0).asBar.Gradient.StartColor = vbRed
    TChart1.Series(0).asBar.Gradient.MidColor = vbWhite
    TChart1.Series(0).FillSampleValues (2)
    End Sub
As you can see in code, I set Theme in TChart2 before load stream, so it should be applied correctly.

I hope will helps.
Thanks,
Best Regards,
Sandra Pazos / 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

Oblicore
Newbie
Newbie
Posts: 79
Joined: Fri May 27, 2005 4:00 am

Re: Chart colors

Post by Oblicore » Tue Mar 01, 2011 9:26 pm

Hi,

we tried to do what you said and using your code example, it doesn't seem to help, it seems that with that code and without it we get the same result.
can you please provide us another solution for this problem, did you manage to reproduce it in your labs? does the provided solution helps?

10x

Ron

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Chart colors

Post by Sandra » Wed Mar 02, 2011 4:07 pm

Hello Ron,

The solution I have provided you works fine here. Please, could you send us a simple project we run "as-is" to reproduce problem here?

Thanks,
Best Regards,
Sandra Pazos / 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

Post Reply