Hi,
I'm exporting a chart to the clipboard as follows (pseudocode):
Dim stream as new memorystreamoriginalChart.Export(binary, stream)stream.position = 0dim newChart as new ChartnewChart.Import(binary, stream)newChart.left, right, top, width, etc. = originalChart.left, right, top, width, etc...newChart.AxisX.Font = New Font(newChart.AxisX.Font.Fontfamily, factor * originalChart.AxisX.Font.Size) same for AxisY, etc.newChart.UpdateSizeNow()newChart.ExportImageSize = new Size(newWidth, newHeight)newChart.Export(bitmap, netastream)dim myImage as new Bitmap(metastream)My.Computer.Clipboard.SetImage(myImage)
Note in particular the manipulation of the font size. Basically this all works, EXCEPT sometimes a very large axis label (e.g., "10,000") on the right-hand edge of the chart will be cut off in the exported image. And AnotationText objects (not shown in the code above, but treated in the same way) which fall above the top edge of the chart) are cut off as well. These problems occur when my exported image size is large (e.g., for making a 300-dpi image). When I keep everything at the original size (96 dpi), everything appears just as on screen.
What's up?
Thanks!--George