Gradients and Background colors

TeeChart for ActiveX, COM and ASP
Post Reply
RC-CACI
Newbie
Newbie
Posts: 7
Joined: Tue May 15, 2012 12:00 am

Gradients and Background colors

Post by RC-CACI » Thu Jul 12, 2012 5:08 pm

I'm upgrading from TeeChart 8 to TeeChart 2012. I use ASP to create my charts, after all of the chart properties have been set, I save the file twice - once as a .tee and once as a .jpg. This worked great with TeeChart 8. After converting to TeeChart 2012, all of my charts are showing gradients (they didn't with TeeChart 8). I figured out how turn off the gradients and set the background to white using the following code:

Chart.Walls.Back.Gradient.Visible = false
Chart.Walls.Back.Color = vbWhite
Chart.Panel.Gradient.Visible = false
Chart.Panel.Color = vbWhite

HOWEVER, this doesn't not work for the .tee file. It works great for the .jpg file. I don't understand how the properties could successfully change for JPEG but not for Tee?

Thanks,
Rob

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

Re: Gradients and Background colors

Post by Yeray » Fri Jul 13, 2012 7:41 am

Hi Rob,

It looks similar to this. Have you tried it with the latest version?
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

RC-CACI
Newbie
Newbie
Posts: 7
Joined: Tue May 15, 2012 12:00 am

Re: Gradients and Background colors

Post by RC-CACI » Tue Jul 17, 2012 4:17 pm

Yeray,

I installed the latest version of TeeChart 2012 (Build 2012.0.0.8) yesterday. It did not fix the problem. When saved as a .tee file, the chart still shows the gradient on both the back walls and the panel, eventhough the code (posted in my previous post) indicates that the gradient is being turned off and the back wall and panel colors are being set to white.

When saved as a .jpg file, the back wall and panel do not show the gradient and display a white background - as expected.

Thanks,
Rob

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

Re: Gradients and Background colors

Post by Yeray » Fri Jul 27, 2012 12:21 pm

Hi Rob,

Excuse us for the delayed reply here.
We've investigated it and we found calling ClearChart before importing the chart solves it.
The problem is that the tee template doesn't save all the properties to optimize the size of the file/stream. So, it only saves the properties that have been changed from an empty chart. And having a theme in a chart is already a change, so the properties set by the theme preval to the template.
That's why we'd recommend to call ClearChart before each importation.
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

RC-CACI
Newbie
Newbie
Posts: 7
Joined: Tue May 15, 2012 12:00 am

Re: Gradients and Background colors

Post by RC-CACI » Thu Aug 02, 2012 7:23 pm

tChart.ClearChart() command fixed the issue. Thank you.

RC-CACI
Newbie
Newbie
Posts: 7
Joined: Tue May 15, 2012 12:00 am

Re: Gradients and Background colors

Post by RC-CACI » Thu Aug 16, 2012 2:52 pm

This is the code we used to fix the gradient/style problem when VIEWING TeeChart files after import:

<script type="text/javascript">
function clearAllCharts() {
var lists = document.getElementsByTagName("object");
for (var i = 0; i < lists.length; i++) {
lists.ClearChart();
}
}
clearAllCharts();
</script>

clearAllCharts() is done (with JavaScript to the DOM) on the HTML page after the OBJECT tags are present, and before calling the .Import.LoadFromURL()

Please note, This script would need to be modified if there are any other Object tags on the page other than TeeCharts.

Our issue is resolved, thanks for the help, this info is for others who may encounter the same problem.

-----

This is the code we used to fix the gradient/style problem when EXPORTING JPG files:

Set oTChart1 = Server.CreateObject("TeeChart.TChart")
oTChart1.ClearChart()

Simply clear the chart object just after instantiation.

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

Re: Gradients and Background colors

Post by Sandra » Fri Aug 17, 2012 8:45 am

Hello RC-CACI,

I am glad you fix your problem. Thanks for your information, this be able to help more users are found the same problem.

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

RC-CACI
Newbie
Newbie
Posts: 7
Joined: Tue May 15, 2012 12:00 am

Re: Gradients and Background colors

Post by RC-CACI » Wed Aug 28, 2013 2:22 pm

We recently upgraded to TeeChart AX 2013 from 2012. We generated a chart. We noticed the following:

1) Charts seem blurry (including borders). It must be some graphic affect. The borders on the data points might be causing the blurry effect.
2) Things have gray borders not black. This includes legends, series colors, and charts.
3) Borders are thicker.
4) Chart Titles are a different font.
5) The default fonts are different.
6) Stacked bar charts appear to have a small gap in between the different bars.

We had similar issues when upgrading to 2012 and using the ClearChart functions resolved most issues. Is there a similar fix for this version?

Thanks,
RC-CACI

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

Re: Gradients and Background colors

Post by Yeray » Thu Aug 29, 2013 9:56 am

Hi,

Try setting:

Code: Select all

Teechart.Aspect.GDIPLUS.Active = False
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