Page 1 of 1

copied and printed TeeChart colors

Posted: Tue Feb 26, 2019 12:04 pm
by 15685169
In my current application when I copy:
Private Sub ButtonCopyGraph_Click(sender As Object, e As EventArgs) Handles ButtonCopyGraph.Click
Dim JPEGf As Steema.TeeChart.Export.JPEGFormat = MainForm.TChartBMS.Export.Image.JPEG
JPEGf.Height = 500
JPEGf.Width = 700
JPEGf.GrayScale = False
JPEGf.Quality = 100
JPEGf.CopyToClipboard()
End Sub

The color of the chart background is black even though displayed in my application it is a light cream color. Can anyway suggest a fix so that the exported image colors match the displayed chart?

Thanks
Rob

Re: copied and printed TeeChart colors

Posted: Wed Feb 27, 2019 8:08 am
by Christopher
Hello Rob,

changing the BufferStyle just before export should work for you per this example here.

Re: copied and printed TeeChart colors

Posted: Tue Apr 30, 2019 10:18 am
by 15685169
Thanks Chris. I got the save to clipboard function to work but had to change to PNG format. Your tip about BufferStyle worked!

Here is my code:
Private Sub ButtonCopyGraph_Click(sender As Object, e As EventArgs) Handles ButtonCopyGraph.Click
Dim PNG As Steema.TeeChart.Export.PNGFormat

MainForm.TChartBMS.Graphics3D.BufferStyle = Steema.TeeChart.Drawing.BufferStyle.None
PNG = MainForm.TChartBMS.Export.Image.PNG
PNG.Height = 1000
PNG.Width = 1500
PNG.GrayScale = False
PNG.CopyToClipboard()
End Sub