Can you add the following support to the pdf export option for all teecharts:
GDI+ Drawing methods
GDI+ drawn directly on the teechart canvas
lines, ellipses, rectangles etc
textout method for drawing text
Basically, the same output obtained from printing a teechart in a pdf export file.
Request for pdf export
Re: Request for pdf export
Hello lilo,
You need know that the TeeChartFor.Net is to default GDI+ and it allow you work with Drawing methods to draw directly in canvas using the events of TeeChart.Net, e.g, AfterDraw event it works correctly in most cases. You can see next example as you do to draw rectangles, lines, ellipses an textout in TeeChartFor.Net and export it correctly.
Moreover, you have more examples in the Tutorial13 - Custom Drawing on the Chart Panel. On the other hand, I inform you there is a bug number [TF02016273] in wish list to fix the problems have export pdf when try to export font, HatchBrush of rectangle and region that you draw directly in the canvas.
I hope will helps
Thanks,
You need know that the TeeChartFor.Net is to default GDI+ and it allow you work with Drawing methods to draw directly in canvas using the events of TeeChart.Net, e.g, AfterDraw event it works correctly in most cases. You can see next example as you do to draw rectangles, lines, ellipses an textout in TeeChartFor.Net and export it correctly.
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
tChart1.AfterDraw += new PaintChartEventHandler(tChart1_AfterDraw);
tChart1.Draw();
}
void tChart1_AfterDraw(object sender, Graphics3D g)
{
//Rectangle HatchStyle
g.Brush.Color = Color.Red;
g.Brush.Solid = true;
g.Rectangle(50, 150, 100, 100);
Rectangle rect = new Rectangle(150, 130, 120, 15);
//Font Text
g.Font.Color = Color.Purple;
g.TextOut(300, 170, "TeeChart2012");
//Line
g.Pen.Color = Color.Red;
g.Pen.Width = 3;
g.Line(new Point(120, 170), new Point(170, 220));
//Ellipse
Rectangle rect1 = new Rectangle(300, 250, 200, 150);
g.Brush.Color = Color.Yellow;
g.Brush.Solid = true;
g.Ellipse(rect1);
tChart1.Export.Image.PDF.Save(@"C:\tmp\tchart1.pdf");
}
I hope will helps
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 |