Page 1 of 1
Export to .ten with subchart, annotation, et al tools
Posted: Thu Sep 10, 2009 4:10 am
by 13051032
There seems to be a bug with Export feature of tchart to .ten format.
1. It crashes while loading a previously saved .ten file if the tchart had a subchart tool
2. It doesn't restore axis tool, annotation tool (In absence of subchart). It doesn't crash, but doesn't inform the user that some parts are not loaded.
3. Size of loaded chart is not preserved at least in few cases (seems to be a random bug as it worked for some other charts).
I am attaching an as-is VS2005 project that demonstrates the subchart tool scenario.
Its a high priority item for us and if you can provide a fix or workaround, it will be of great help.
Thanks
Re: Export to .ten with subchart, annotation, et al tools
Posted: Thu Sep 10, 2009 9:38 am
by narcis
Hi asupriya,
1. It crashes while loading a previously saved .ten file if the tchart had a subchart tool
I could reproduce this one and added it (TF02014397) to the bug list to be fixed.
2. It doesn't restore axis tool, annotation tool (In absence of subchart). It doesn't crash, but doesn't inform the user that some parts are not loaded.
I'm not able to reproduce this one. I modified your code as shown below and works fine. Does this code work fine for you? Can you please give us more detailed information about those issues and modify the code so that we can reproduce them here?
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private Steema.TeeChart.Styles.FastLine fastline1;
private void InitializeChart()
{
Steema.TeeChart.Tools.Annotation annotation1 = new Steema.TeeChart.Tools.Annotation(tChart1.Chart);
annotation1.Text = "hello";
Steema.TeeChart.Tools.AxisArrow axisArrow1 = new Steema.TeeChart.Tools.AxisArrow(tChart1.Chart);
axisArrow1.Axis = tChart1.Axes.Left;
Steema.TeeChart.Tools.AxisScroll axisScroll1 = new Steema.TeeChart.Tools.AxisScroll(tChart1.Chart);
axisScroll1.Axis = tChart1.Axes.Bottom;
fastline1 = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
fastline1.FillSampleValues(500);
}
private void SaveBtn_Click(object sender, EventArgs e)
{
tChart1.Export.Template.IncludeData = true;
tChart1.Export.Template.Save("C:\\testChart.ten");
}
private void RestoreBtn_Click(object sender, EventArgs e)
{
tChart1.Import.Template.Load("C:\\testChart.ten");
}
private void ChangeDataBtn_Click(object sender, EventArgs e)
{
fastline1.FillSampleValues(200);
}
3. Size of loaded chart is not preserved at least in few cases (seems to be a random bug as it worked for some other charts).
I'm not sure how to reproduce this one either. Can you please give us some more details?
Thanks in advance.
Re: Export to .ten with subchart, annotation, et al tools
Posted: Thu Sep 10, 2009 1:07 pm
by 13051032
Thanks. For other tools, I will prepare a similar project and upload.
For TF02014397, can you please set highest priority?
Thanks
Re: Export to .ten with subchart, annotation, et al tools
Posted: Thu Sep 10, 2009 2:13 pm
by narcis
Hi asupriya,
TF02014397 has already been fixed for TeeChart for .NET 2009. I'm not able to tell you if this will be included in v3 yet.
Re: Export to .ten with subchart, annotation, et al tools
Posted: Fri Sep 11, 2009 3:29 am
by 13051032
Reg. Annotation tool, I am uploading a VS2005 project. I guess the issue i am having with most of the tools is that these tool displays get updated with few chart event and the restored .ten created chart is not able to relink to these mouse events. I have similar issues with the AxisTool as I sync. some other charts when axistool is used to scroll the axis.
This leads me to think that .ten format is probably not the right format for me to use to restore the charts to their "original" status including associated event handlers. Do you suggest any other way of preserving everything, including event handlers?
Also, is there a way to export multiple charts (stacked vertically) into a single .ten file?
Reg. V4, we like to know the upgrade options (if available) from V3.5 to V4. With that info, I can talk to my manager to upgrade/buy V4.
Re: Export to .ten with subchart, annotation, et al tools
Posted: Mon Sep 14, 2009 6:27 am
by 13051032
Is there a way to pack multiple charts into one template? Of course, i need to be able to unpack as-is though!
Thanks
Re: Export to .ten with subchart, annotation, et al tools
Posted: Mon Sep 14, 2009 10:47 am
by narcis
Hi asupriya,
Reg. Annotation tool, I am uploading a VS2005 project. I guess the issue i am having with most of the tools is that these tool displays get updated with few chart event and the restored .ten created chart is not able to relink to these mouse events. I have similar issues with the AxisTool as I sync. some other charts when axistool is used to scroll the axis.
This leads me to think that .ten format is probably not the right format for me to use to restore the charts to their "original" status including associated event handlers. Do you suggest any other way of preserving everything, including event handlers?
Yes, the problem is events are not exported. The only solution is reassigning them after loading a chart, for example:
Code: Select all
private void RestoreBtn_Click(object sender, EventArgs e)
{
tChart1.Import.Template.Load("C:\\test2.ten");
foreach (Steema.TeeChart.Tools.Tool t in tChart1.Tools)
{
if (t is Steema.TeeChart.Tools.CursorTool)
{
((Steema.TeeChart.Tools.CursorTool)t).Change += new CursorChangeEventHandler(cursor1_Change);
}
}
}
Also, is there a way to export multiple charts (stacked vertically) into a single .ten file?
Not unless you use subcharts for that.
Reg. V4, we like to know the upgrade options (if available) from V3.5 to V4. With that info, I can talk to my manager to upgrade/buy V4.
Sure, you can find upgrade options from v3 to v4
here.