Hello,
we use the DevExpress printing functionality. Therefore it's necessary, to draw the chart view onto a given Graphics object within a given Rectangle.
This works almost perfectly, but: On the print preview and on the print output, the data labels are far too big!
This is how it looks on the screen:

This is how it looks on the print preview:

Attached is the source code that we use to draw the chart view to that given Graphics object.
Do you have any idea why this could happen and what we could do to fix it?
Thank you!
public void PrintContent(Graphics graphics, Rectangle rect)
{
double componentwidth = this.Chart.ClientSize.Width;
double componentheight = this.Chart.ClientSize.Height;
// setup transform matrix to translate and scale drawing
Matrix oldTransform = graphics.Transform; // save current transform
Matrix printTransform = graphics.Transform;
printTransform.Translate((float)rect.X, (float)rect.Y);
printTransform.Scale(rect.Width / (float)componentwidth, (float)rect.Height / (float)componentheight);
graphics.Transform = printTransform;
bool charviewbackgroundmode = this.Chart.GetBackgroundDrawEnable(); // save background enable flag
this.Chart.SetBackgroundDrawEnable(false); // switch off chart background
this.Chart.SetViewport(0, 0, componentwidth, componentheight);
// Make sure all objects rejustified before final rendering
this.Chart.ResetPreviousChartObjectList();
this.Chart.RenderingMode = ChartObj.PRINTER_RENDERING;
this.Chart.Draw(graphics);
this.Chart.RenderingMode = ChartObj.SCREEN_RENDERING;
this.Chart.SetBackgroundDrawEnable(charviewbackgroundmode); // restore background enable flag
graphics.Transform = oldTransform; // restore original transform
graphics.ResetClip();
RectangleF rectF = new RectangleF(rect.X, rect.Y, rect.Width, rect.Height);
}