Some settings not saved in TChart 2011.

TeeChart for ActiveX, COM and ASP
Post Reply
TonyVSUK
Advanced
Posts: 163
Joined: Wed Mar 01, 2006 12:00 am

Some settings not saved in TChart 2011.

Post by TonyVSUK » Wed Feb 22, 2012 11:42 am

Hello,

The "Visible" setting the gradient on "walls" is not being saved.

To reproduce,
1. Display the graph editing dialog.
2. Click the "Walls" tab.
3. Click the "Back" tab.
4. Click the "Gradient" button.
5. Click "Visible".
6. Save the graph to a stream
7. Load from a stream. The "Visible" is now ticked again.

I store my TCharts with the following code

COleVariant tStream = pTChart->GetExport().GetAsNative().SaveToStream(TRUE);

// attach the stream to SafeArray
COleSafeArray safeArray;
safeArray.Attach(tStream);

and then load using
m_PropGraph.pTChart->GetImport().LoadFromStream(*m_pGraphContentsStream);

Tony.

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

Re: Some settings not saved in TChart 2011.

Post by Yeray » Fri Feb 24, 2012 5:03 pm

Hi Tony,

I'm trying to reproduce it in VB6 but it seems to work fine. Here it is the code I used:

Code: Select all

  TChart1.Walls.Back.Visible = False
  TChart1.AddSeries scLine
  TChart1.Series(0).FillSampleValues

  tmpStream = TChart1.Export.asNative.SaveToStream(True)
  TChart1.ClearChart
  TChart1.Import.LoadFromStream tmpStream
After importing the chart, I can't see the back wall. I've also tried giving it another color to see it clearer:

Code: Select all

  TChart1.Walls.Back.Color = vbRed
  TChart1.Walls.Back.Gradient.Visible = False
  TChart1.Walls.Back.Visible = False ' commenting/uncommenting this line makes the difference, as expected
  TChart1.AddSeries scLine
  TChart1.Series(0).FillSampleValues

  Stream = TChart1.Export.asNative.SaveToStream(True)
  TChart1.ClearChart
  TChart1.Import.LoadFromStream Stream
If you still have problems with it, please try to arrange a simple example project we can run as-is to reproduce the problem here.
Also please tell us what exact TeeChart version are you using.
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

TonyVSUK
Advanced
Posts: 163
Joined: Wed Mar 01, 2006 12:00 am

Re: Some settings not saved in TChart 2011.

Post by TonyVSUK » Fri Feb 24, 2012 5:15 pm

Code: Select all

      TChart1.Walls.Back.Visible = False
      TChart1.AddSeries scLine
      TChart1.Series(0).FillSampleValues

      tmpStream = TChart1.Export.asNative.SaveToStream(True)
      TChart1.ClearChart
      TChart1.Import.LoadFromStream tmpStream
This will not recreate the problem will it?

What happens if you do something like try and load to a different chart?

Code: Select all

      TChart1.Walls.Back.Visible = False
      TChart1.AddSeries scLine
      TChart1.Series(0).FillSampleValues

      tmpStream = TChart1.Export.asNative.SaveToStream(True)
      TChart2.ClearChart
      TChart2.Import.LoadFromStream tmpStream

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

Re: Some settings not saved in TChart 2011.

Post by Yeray » Tue Feb 28, 2012 3:38 pm

Hi,

With that code I get two charts looking the same (with TeeChart v2011.0.0.5):
test.png
test.png (30.22 KiB) Viewed 22015 times
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

TonyVSUK
Advanced
Posts: 163
Joined: Wed Mar 01, 2006 12:00 am

Re: Some settings not saved in TChart 2011.

Post by TonyVSUK » Fri Jun 08, 2012 8:43 am

Try this. Create two charts, one is initialised with a red background and some sample values. Then copy to a new chart via SaveToStream/LoadFromStream. The panel settings are not saved.

Code: Select all

Private Sub UserForm_Initialize()

UserForm1.TChart1.Panel.Color = RGB(255, 0, 0)
UserForm1.TChart1.Panel.Gradient.Visible = False

TChart1.AddSeries scLine
TChart1.Series(0).FillSampleValues

End Sub


Private Sub CopyChart1ToChart2_Click()

Dim stream

stream = TChart1.Export.asNative.SaveToStream(True)
TChart2.Import.LoadFromStream stream
  
End Sub

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

Re: Some settings not saved in TChart 2011.

Post by Yeray » Fri Jun 08, 2012 3:10 pm

Hi,

Right, it seems the Gradient.Visible property isn't restored correctly. I've added it to the defect list to be revised (TA05016218).
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

TonyVSUK
Advanced
Posts: 163
Joined: Wed Mar 01, 2006 12:00 am

Re: Some settings not saved in TChart 2011.

Post by TonyVSUK » Fri Jun 08, 2012 3:12 pm

Is there a workaround for now?

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

Re: Some settings not saved in TChart 2011.

Post by Yeray » Fri Jun 08, 2012 3:42 pm

Hi Tony,

The only workaround I see is to manually save&restore the gradient.visible property into a variable.
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

TonyVSUK
Advanced
Posts: 163
Joined: Wed Mar 01, 2006 12:00 am

Re: Some settings not saved in TChart 2011.

Post by TonyVSUK » Fri Jun 08, 2012 5:05 pm

Is the gradient the only thing that is not stored?

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

Re: Some settings not saved in TChart 2011.

Post by Yeray » Mon Jun 11, 2012 11:41 am

Hi Tony,

The gradient is the only thing we've identified that isn't been correctly exported/imported.
We haven't verified all the TeeChart properties. So, if anybody finds a property not being exported/imported, don't hesitate to let us know.
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

TonyVSUK
Advanced
Posts: 163
Joined: Wed Mar 01, 2006 12:00 am

Re: Some settings not saved in TChart 2011.

Post by TonyVSUK » Tue Jun 12, 2012 12:27 pm

It seems as if the following is not saved either

Code: Select all

UserForm1.TChart1.Walls.Back.Transparent = True

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

Re: Some settings not saved in TChart 2011.

Post by Yeray » Tue Jun 12, 2012 2:26 pm

Hi Tony,

You are right. I've added it to the TA05016218 description.
Thanks for reporting it.
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

Marc
Site Admin
Site Admin
Posts: 1271
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: Some settings not saved in TChart 2011.

Post by Marc » Fri Jun 22, 2012 3:06 pm

Hello,

These issues can't be reproduced with the latest release version. Serialization appears to be working correctly for these cases. The registered issue will be closed unless new information to the contrary comes to light.

Regards,
Marc Meumann
Steema Support

Post Reply