Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
470
Printing XamDataChart – how to improve quality?
posted

My goal is to build a FlowDocument containing XamDataChart and some other contents.

//Create a bitmap rendering the Chart:

RenderTargetBitmap renderVisual = new RenderTargetBitmap( width, height, dpiX, dpiY, format );

renderVisual.Render( xamDataChart );

//Scale the bitmap to fit page:

ScaleTransform transform = new ScaleTransform( ratio1, ratio2 );

TransformedBitmap bitmapToUse = new TransformedBitmap( renderVisual, transform );

 

 

Thus prepared “bitmapToUse” is then being placed into a FlowDocument and printed. However the quality of such printout is low probably due to re-scaling of the picture.

Is there a better way to do this?

 

Thank you.