Page 1 of 1
Chart colors
Posted: Sat Feb 05, 2011 9:19 pm
by 9527011
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
Re: Chart colors
Posted: Mon Feb 07, 2011 3:47 pm
by 10050769
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,
Re: Chart colors
Posted: Mon Feb 07, 2011 8:39 pm
by 9527011
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
Re: Chart colors
Posted: Tue Feb 08, 2011 10:35 am
by 10050769
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,
Re: Chart colors
Posted: Tue Feb 08, 2011 10:08 pm
by 9527011
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
Re: Chart colors
Posted: Wed Feb 09, 2011 9:40 am
by 10050769
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,
Re: Chart colors
Posted: Wed Feb 09, 2011 11:34 am
by 10050769
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,
Re: Chart colors
Posted: Wed Feb 09, 2011 9:09 pm
by 9527011
OK
we will check this
10x for the quick response
Ron
Re: Chart colors
Posted: Sun Feb 13, 2011 1:45 pm
by 9527011
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
Re: Chart colors
Posted: Mon Feb 14, 2011 1:03 pm
by 10050769
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,
Re: Chart colors
Posted: Tue Mar 01, 2011 9:26 pm
by 9527011
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
Re: Chart colors
Posted: Wed Mar 02, 2011 4:07 pm
by 10050769
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,