Page 1 of 1

Gradients and Background colors

Posted: Thu Jul 12, 2012 5:08 pm
by 16662430
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

Re: Gradients and Background colors

Posted: Fri Jul 13, 2012 7:41 am
by yeray
Hi Rob,

It looks similar to this. Have you tried it with the latest version?

Re: Gradients and Background colors

Posted: Tue Jul 17, 2012 4:17 pm
by 16662430
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

Re: Gradients and Background colors

Posted: Fri Jul 27, 2012 12:21 pm
by yeray
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.

Re: Gradients and Background colors

Posted: Thu Aug 02, 2012 7:23 pm
by 16662430
tChart.ClearChart() command fixed the issue. Thank you.

Re: Gradients and Background colors

Posted: Thu Aug 16, 2012 2:52 pm
by 16662430
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.

Re: Gradients and Background colors

Posted: Fri Aug 17, 2012 8:45 am
by 10050769
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,

Re: Gradients and Background colors

Posted: Wed Aug 28, 2013 2:22 pm
by 16662430
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

Re: Gradients and Background colors

Posted: Thu Aug 29, 2013 9:56 am
by yeray
Hi,

Try setting:

Code: Select all

Teechart.Aspect.GDIPLUS.Active = False