Hello.
I have a chart with several series and additional function. The problem is when I am trying to save chart to .ten format there is an exception ("Cannot serialize i.e.") Is it possible to store the state of the chart when using functions like Add, Count etc.
Thank you,
Anton Rau
How to save charts to .ten format with functions?
Hello,
additional notes: you can simulate a bug just by adding to the new chart two lines series and third function series (Add, for example). Then if you click TeeChart Export - Native format then an exception will be raised:
System.Runtime.Serialization.SerializationException: The type Steema.TeeChart.Styles.Line in Assembly TeeChart, Version=1.1.1499.42325, Culture=neutral, PublicKeyToken=9c8126276c77bdb7 is not marked as serializable.
at System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type, Boolean excludeNonSerializable)
at System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context)
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo()
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter)
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
at Steema.TeeChart.Editors.Export.ExportEditor.checkBox3_CheckedChanged(Object sender, EventArgs e)
at System.Windows.Forms.CheckBox.OnCheckedChanged(EventArgs e)
at System.Windows.Forms.CheckBox.set_CheckState(CheckState value)
at System.Windows.Forms.CheckBox.OnClick(EventArgs e)
at System.Windows.Forms.CheckBox.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Is there any bugfix or maybe some beta version is available because I need such functionality very urgent.
Best regards,
Anton Rau
additional notes: you can simulate a bug just by adding to the new chart two lines series and third function series (Add, for example). Then if you click TeeChart Export - Native format then an exception will be raised:
System.Runtime.Serialization.SerializationException: The type Steema.TeeChart.Styles.Line in Assembly TeeChart, Version=1.1.1499.42325, Culture=neutral, PublicKeyToken=9c8126276c77bdb7 is not marked as serializable.
at System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type, Boolean excludeNonSerializable)
at System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context)
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo()
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter)
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
at Steema.TeeChart.Editors.Export.ExportEditor.checkBox3_CheckedChanged(Object sender, EventArgs e)
at System.Windows.Forms.CheckBox.OnCheckedChanged(EventArgs e)
at System.Windows.Forms.CheckBox.set_CheckState(CheckState value)
at System.Windows.Forms.CheckBox.OnClick(EventArgs e)
at System.Windows.Forms.CheckBox.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Is there any bugfix or maybe some beta version is available because I need such functionality very urgent.
Best regards,
Anton Rau
Hello Anton,
Yes, I can reproduce the problem, it's a bug. Thanks for letting us know. Serialization is receiving some attention for improvements in the next update.
In the meantime a workaround that will permit you to save the Chart would be to set the Function Datasource to null before exporting.
eg.
This will require that you manually set functions though, if required, in the importing Chart. The Serialization will save data if only the data reproduction of the Chart is required.
We will try to improve this and other aspects of Serialization.
Regards,
Marc Meumann
Steema Support
Yes, I can reproduce the problem, it's a bug. Thanks for letting us know. Serialization is receiving some attention for improvements in the next update.
In the meantime a workaround that will permit you to save the Chart would be to set the Function Datasource to null before exporting.
eg.
Code: Select all
f1.DataSource=null;
tChart1.Export.Template.Save(@"c:\output\ChartWithFunction.ten");
We will try to improve this and other aspects of Serialization.
Regards,
Marc Meumann
Steema Support