Dear TeeChart Support:
In my project, I need to plot multiple graphs on the same Form. Each of these graphs should have its own axes and walls and the program should be able to export them to a file (e.g. JPEG) and to print them out WYSIWYG. It seems to me that there are two ways to archieve this, but both have some problems that I need your help with.
A. The first way is to use a single TChart object with one set of customized axes and walls for each sub-graph. Problems are:
1. How do I create customized Walls (Left, Rigth, Bottom, and Back), for each sub-graph in the same TChart object?
2. According to the doc, customized Axes are supported only for Left, Top, Bottom, and Right axes, does this mean that all sub-graphs in the same TChat object have to share the same Depth and DepthTop axes?
B. The second way is to use multiple TChart objects on the same Form. Problems are:
1. How do I export multiple TCharts as shown on the same Form to a file (e.g. JPEG) WYSIWYG?
2. How do I print multiple TCharts as shown on the same windows Form WYSIWYG?
I would also appreciate if you could suggest me a better solution than the two mentioned above. Thank you very much for your help.
Jeff
Multiple Charts
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Jeff,
Please find below the answers to your questions:
To obtain a Bitmap from a TChart you can use tChart1.Bitmap method. You can also obtain a chart's rectangle using tChart1.Chart.ChartRect.
http://www.teechart.net/support/viewtopic.php?t=5490
http://www.teechart.net/support/viewtopic.php?t=5756
Please find below the answers to your questions:
This is not possible for now. You'll be able to do that using SubChart tool which has been implemented in TeeChart for .NET v3 Beta.A. The first way is to use a single TChart object with one set of customized axes and walls for each sub-graph. Problems are:
1. How do I create customized Walls (Left, Rigth, Bottom, and Back), for each sub-graph in the same TChart object?
This is not possible for now. I've added your request to our wish-list to be considered for inclusion in future releases.2. According to the doc, customized Axes are supported only for Left, Top, Bottom, and Right axes, does this mean that all sub-graphs in the same TChat object have to share the same Depth and DepthTop axes?
If you are using .NET 2.0 you can add a button to your WinForm and add the following code to it:B. The second way is to use multiple TChart objects on the same Form. Problems are:
1. How do I export multiple TCharts as shown on the same Form to a file (e.g. JPEG) WYSIWYG?
Code: Select all
private void button1_Click(object sender, EventArgs e)
{
string fileName = @"C:\temp\allchart.bmp";
Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
Bitmap bmp = new Bitmap(rect.Width, rect.Height);
DrawToBitmap(bmp, rect);
bmp.Save(fileName);
}
You could use a PrintDocument as shown in the messages below:2. How do I print multiple TCharts as shown on the same windows Form WYSIWYG?
http://www.teechart.net/support/viewtopic.php?t=5490
http://www.teechart.net/support/viewtopic.php?t=5756
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Jeff,
In that case you just need to do something like this:
In that case you just need to do something like this:
Code: Select all
private void button1_Click(object sender, EventArgs e)
{
//string fileName = @"C:\temp\allchart.bmp";
string fileName = @"C:\temp\allchart.jpg";
Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);
Bitmap bmp = new Bitmap(rect.Width, rect.Height);
DrawToBitmap(bmp, rect);
//bmp.Save(fileName);
bmp.Save(fileName, System.Drawing.Imaging.ImageFormat.Jpeg);
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |