Dear Sir/Madam
I found a problem on export TChart Image, some of the serious was missing. Jpg and bmp also the same and we only use this 2 picture formats
Below is the sample code.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TChart1.Export.Image.JPEG.Height = 600
TChart1.Export.Image.JPEG.Width = 800
TChart1.Export.Image.JPEG.Quality = 100
TChart1.Export.Image.JPEG.Save("c:\a.jpg")
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TChart1.Series.Add(New Steema.TeeChart.Styles.Bar3D)
TChart1.Series(0).FillSampleValues(6)
End Sub
Thank & Best Regard
Eric
Export Image
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Eric,
This is because the image has a different size than the chart. You should set images size to tChart's size or temporary change tChart's size. This code works fine here:
This is because the image has a different size than the chart. You should set images size to tChart's size or temporary change tChart's size. This code works fine here:
Code: Select all
private void button1_Click(object sender, System.EventArgs e)
{
tChart1.Export.Image.JPEG.Width=tChart1.Width;
tChart1.Export.Image.JPEG.Height=tChart1.Height;
tChart1.Export.Image.JPEG.Quality=100;
tChart1.Export.Image.JPEG.Save(@"C:\temp\a.jpg");
tChart1.Export.Image.Bitmap.Width=tChart1.Width;
tChart1.Export.Image.Bitmap.Height=tChart1.Height;
tChart1.Export.Image.Bitmap.Save(@"C:\temp\a.bmp");
}
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 |
Dear Sir/Madam
That code not work for me and we don't have any problem in .net version 1. Now we upgrade to version 2, but feel really disappointed in this version. Until now you all haven't release the ready version for us to download. Every time to download the debug version we need to run ton of testing to make sure it work correct. but we never feel comfortable.....
Below is the sample code.
Dim Width, Height As Long
Width = Chart.Width
Height = Chart.Height
Chart.Height = 600
Chart.Width = 800
Chart.Export.Image.JPEG.Height = Chart.Height
Chart.Export.Image.JPEG.Width = Chart.Width
Chart.Export.Image.JPEG.Quality = 100
Chart.Export.Image.JPEG.Save("c:\c.jpg")
Chart.Width = Width
Chart.Height = Height
That code not work for me and we don't have any problem in .net version 1. Now we upgrade to version 2, but feel really disappointed in this version. Until now you all haven't release the ready version for us to download. Every time to download the debug version we need to run ton of testing to make sure it work correct. but we never feel comfortable.....
Below is the sample code.
Dim Width, Height As Long
Width = Chart.Width
Height = Chart.Height
Chart.Height = 600
Chart.Width = 800
Chart.Export.Image.JPEG.Height = Chart.Height
Chart.Export.Image.JPEG.Width = Chart.Width
Chart.Export.Image.JPEG.Quality = 100
Chart.Export.Image.JPEG.Save("c:\c.jpg")
Chart.Width = Width
Chart.Height = Height
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Dear Eric,
The code that works fine here is:
The code that works fine here is:
Code: Select all
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TChart1.Graphics3D.ClearClipRegions()
Dim jpeg As Steema.TeeChart.Export.JPEGFormat = TChart1.Export.Image.JPEG
jpeg.Width = 800
jpeg.Height = 800
jpeg.Save("C:\temp\chart.jpg")
End Sub
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 |