Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 346

Summary: [TW16016674] If you export Chart to pdf, the exportation doesn't work if you add ...
Product: .NET TeeChart Reporter: sandra pazos <sandra>
Component: WPFAssignee: Steema Issue Manager <issuemanager>
Status: CONFIRMED ---    
Severity: enhancement    
Priority: Normal    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description sandra pazos 2013-11-20 11:24:50 EST
If you export Chart to pdf, the exportation doesn't work  if you add  double values for width and height of ChartRect, panel  or Series. Considering pdf doesn't support double values, to draw use int values, and in WPF the width and height are double we should consider this point internally in the moment of export the Chart to pdf, for example, doing a  Math.Round or Math.Truncate to prevent  the  incorrect exportation.
Using next code you can reproduce the problem:
        private void InitializeChart()
        {
          FastLine fastLine1 = new FastLine(tChart1.Chart);
          tChart1.Aspect.View3D = false;
          tChart1.Header.Font.Bold = true;
          tChart1.Header.Font.Size = 15;
          fastLine1.FillSampleValues();
          fastLine1.LinePen.Width = 0.5;
          button1.Click += button1_Click;
        }
        void button1_Click(object sender, RoutedEventArgs e)
        {
          tChart1.Export.Image.PDF.Width = 400.3;
          tChart1.Export.Image.PDF.Height = 300.3;
          tChart1.Export.Image.PDF.Save(@"C:\testChart.pdf");
        } [created:2013-08-02T10:38:32.000+01:00 reported by:sandra@steema.com reported in version:]