For the last several months I’ve been using the evaluation version of TeeChart v2022 waiting for the red tape to be cut and an upgrade made. Bentley finally purchased the upgrade. Due to an issue with installing the license, I compiled the source locally since we also purchased the source code. This removed the watermark.
The problem I’m running into is that our graphs do not look the same between the old version and the new version. The *only* thing that has changed is the upgrade with minor adjustments due to changes in API (how a Legend is set to Visible, etc.). How we construct and setup series in a graph has *not* changed. I was really hoping the change in colors was part of the evaluation version but I was apparently wrong.
Here is an example.
The first image is from our current release that uses v2009:
This is the same graph after upgrading to TeeChart v2022:
If the colors were simply a variation on the shade of grey, that would be one thing. But to go from grey to orange is something completely different. I checked our code and we are using Color.LightGrey. How does that translate into orange by anyone’s imagination?
Here are the graph options. Left is pre-upgrade and right is post-upgrade:
In the options on the right there is a series missing (HGL (Area)) and the colors are wrong.
This is a serious issue and not something I expected from upgrading.
What can I do to fix this on our end or is this something that needs to be fixed on your end?
Thanks,
Kris
Chart Colors Differ after Upgrade
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Chart Colors Differ after Upgrade
Hello Kris,
I would imagine that if you didn't specify series colours in your code, e.g.
then the colours are being read from the default theme, which has been changed over the years. Are you specifying series colours in your code?
I would imagine that if you didn't specify series colours in your code, e.g.
Code: Select all
tChart1[0].Color = Color.Red;
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Chart Colors Differ after Upgrade
Yes. I have verified and debugged the code that assigns the colors for the series. They are 100% definitely being set.
I too have determined that the theme is at play here. I just don't know how to override it. At some point the theme overrides the colors assigned to the series.
The new theme I believe is Lookout. The old them seems to be Opera. I've tried setting the default theme in the TeeChart source to be Opera but that doesn't seem to make a difference (though I'm hoping for a solution that doesn't require modifying the source).
My next attempt is to make sure the Theme is set to Opera, or maybe none, in the InitializeComponent method when TChart is instantiated and see if that works.
Kris
I too have determined that the theme is at play here. I just don't know how to override it. At some point the theme overrides the colors assigned to the series.
The new theme I believe is Lookout. The old them seems to be Opera. I've tried setting the default theme in the TeeChart source to be Opera but that doesn't seem to make a difference (though I'm hoping for a solution that doesn't require modifying the source).
My next attempt is to make sure the Theme is set to Opera, or maybe none, in the InitializeComponent method when TChart is instantiated and see if that works.
Kris
Re: Chart Colors Differ after Upgrade
Hi Christopher,
I dug into this some more and found several series where we were not assigning the Color property of the series but only the color of the brush or pen. This worked in v2009 so it must have been a bug that we inadvertently took advantage of. Once i assigned colors to these series in the graph, then the theme colors no longer got applied.
There is one last issue that needs to be fixed. If you look at the "Before upgrade" image in my original post, the area up and to the right above the [green] series is a grey color. For the life of me, I cannot figure out what this property is. I can't seem to find it in the chart options dialog, either.
I plan to give a demo showing the use of the upgraded TeeChart next week and if I leave that area white, I am going to be asked about it (that's how detailed my team is). So, is there a way to get that white to turn back to grey? If there is not, then that is what I will report but I need to ask the question.
Thanks,
Kris
I dug into this some more and found several series where we were not assigning the Color property of the series but only the color of the brush or pen. This worked in v2009 so it must have been a bug that we inadvertently took advantage of. Once i assigned colors to these series in the graph, then the theme colors no longer got applied.
There is one last issue that needs to be fixed. If you look at the "Before upgrade" image in my original post, the area up and to the right above the [green] series is a grey color. For the life of me, I cannot figure out what this property is. I can't seem to find it in the chart options dialog, either.
I plan to give a demo showing the use of the upgraded TeeChart next week and if I leave that area white, I am going to be asked about it (that's how detailed my team is). So, is there a way to get that white to turn back to grey? If there is not, then that is what I will report but I need to ask the question.
Thanks,
Kris
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Chart Colors Differ after Upgrade
Hello Kris,
As I'm sure you're aware, it is difficult for us to answer such questions without being able to reproduce the problem here. Is there any way you can create a new TeeChart project and using your production code attempt to reproduce this issue in it?I plan to give a demo showing the use of the upgraded TeeChart next week and if I leave that area white, I am going to be asked about it (that's how detailed my team is). So, is there a way to get that white to turn back to grey? If there is not, then that is what I will report but I need to ask the question.
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |