Hi
When I use the Metafile property of TChart I always get an image height of 65535 - regardless of the actual TChart size.
Any idea what could cause that?
The TeeChart version used is 2.0.2987.19069
Thank you for your help!
Best regards,
Manuel
Metafile height is always 65535
Re: Metafile height is always 65535
Hello Manuel,
I couldn't reproduce your problem using last version 2 and next code:
Could you please, check if previous code works fine for you?
Thanks,
I couldn't reproduce your problem using last version 2 and next code:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
Steema.TeeChart.Styles.Line series1;
private void InitializeChart()
{
series1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
series1.FillSampleValues();
tChart1.Refresh();
tChart1.Export.Image.Metafile.EMFFormat = System.Drawing.Imaging.EmfType.EmfOnly;
tChart1.Export.Image.Metafile.Save("c:\\teeChartEmfOnly.emf");
tChart1.Export.Image.Metafile.EMFFormat = System.Drawing.Imaging.EmfType.EmfPlusDual;
tChart1.Export.Image.Metafile.Save("c:\\teeChartEmfPlusDual.emf");
tChart1.Export.Image.Metafile.EMFFormat = System.Drawing.Imaging.EmfType.EmfPlusOnly;
tChart1.Export.Image.Metafile.Save("c:\\teeChartEmfPlusOnly.emf");
}
Thanks,
Best Regards,
Sandra Pazos / 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 |
Re: Metafile height is always 65535
Hi Sandra
It seems, that the problem only occurs when a series contains values which would appear outside the chart's bounds. For example, if you add double.PositiveInfinite and double.NegativeInfinite values to an area series while setting the y-axis scale to 0...1 you should encounter the same issue.
Best regards,
Manuel
It seems, that the problem only occurs when a series contains values which would appear outside the chart's bounds. For example, if you add double.PositiveInfinite and double.NegativeInfinite values to an area series while setting the y-axis scale to 0...1 you should encounter the same issue.
Best regards,
Manuel
Re: Metafile height is always 65535
Hello Manuel,
I could not reproduce it here with last version 2 of TeeChart.Net. Could you please, send us a simple example, because we can reproduce your problem exactly here?
Thanks,
I could not reproduce it here with last version 2 of TeeChart.Net. Could you please, send us a simple example, because we can reproduce your problem exactly here?
Thanks,
Best Regards,
Sandra Pazos / 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 |
Re: Metafile height is always 65535
Hi Sandra
Please find attached a small project which demonstrates the issue.
Have fun!
Manuel
Please find attached a small project which demonstrates the issue.
Have fun!
Manuel
- Attachments
-
- TeeChartDemo.zip
- (15.2 KiB) Downloaded 313 times
Re: Metafile height is always 65535
Hello Manuel,
Thanks for your project. I can reproduce your problem with height in last version 2 but not in last version 4. I strongly recommend you to download the fully functional evaluation version available at http://www.steema.com/evaluation/net and check again if problem persist. Moreover, I suggest a workaround using BITMAP image that seems works correctly for version 2:
I hope will helps.
Thanks,
Thanks for your project. I can reproduce your problem with height in last version 2 but not in last version 4. I strongly recommend you to download the fully functional evaluation version available at http://www.steema.com/evaluation/net and check again if problem persist. Moreover, I suggest a workaround using BITMAP image that seems works correctly for version 2:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
Debug.Assert(tChart1.Size.Equals(tChart1.Metafile.Size), "Size of the metafile is not equal to the chart size");
}
private void InitializeChart()
{
bool bgEnabled = false;
for (int i = 0; i < 4; i++)
{
TimeSpan t = new TimeSpan(0, 0, i);
tChart1[0].Add(t.TotalDays, bgEnabled ? double.PositiveInfinity : double.NegativeInfinity);
tChart1[1].Add(t.TotalDays, Math.Sin(i));
bgEnabled = !bgEnabled;
}
}
Thanks,
Best Regards,
Sandra Pazos / 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 |