Page 1 of 1

Some settings not saved in TChart 2011.

Posted: Wed Feb 22, 2012 11:42 am
by 9530487
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.

Re: Some settings not saved in TChart 2011.

Posted: Fri Feb 24, 2012 5:03 pm
by yeray
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.

Re: Some settings not saved in TChart 2011.

Posted: Fri Feb 24, 2012 5:15 pm
by 9530487

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

Re: Some settings not saved in TChart 2011.

Posted: Tue Feb 28, 2012 3:38 pm
by yeray
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 22187 times

Re: Some settings not saved in TChart 2011.

Posted: Fri Jun 08, 2012 8:43 am
by 9530487
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

Re: Some settings not saved in TChart 2011.

Posted: Fri Jun 08, 2012 3:10 pm
by yeray
Hi,

Right, it seems the Gradient.Visible property isn't restored correctly. I've added it to the defect list to be revised (TA05016218).

Re: Some settings not saved in TChart 2011.

Posted: Fri Jun 08, 2012 3:12 pm
by 9530487
Is there a workaround for now?

Re: Some settings not saved in TChart 2011.

Posted: Fri Jun 08, 2012 3:42 pm
by yeray
Hi Tony,

The only workaround I see is to manually save&restore the gradient.visible property into a variable.

Re: Some settings not saved in TChart 2011.

Posted: Fri Jun 08, 2012 5:05 pm
by 9530487
Is the gradient the only thing that is not stored?

Re: Some settings not saved in TChart 2011.

Posted: Mon Jun 11, 2012 11:41 am
by yeray
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.

Re: Some settings not saved in TChart 2011.

Posted: Tue Jun 12, 2012 12:27 pm
by 9530487
It seems as if the following is not saved either

Code: Select all

UserForm1.TChart1.Walls.Back.Transparent = True

Re: Some settings not saved in TChart 2011.

Posted: Tue Jun 12, 2012 2:26 pm
by yeray
Hi Tony,

You are right. I've added it to the TA05016218 description.
Thanks for reporting it.

Re: Some settings not saved in TChart 2011.

Posted: Fri Jun 22, 2012 3:06 pm
by Marc
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