copied and printed TeeChart colors

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Innervations
Newbie
Newbie
Posts: 13
Joined: Wed Dec 19, 2018 12:00 am

copied and printed TeeChart colors

Post by Innervations » Tue Feb 26, 2019 12:04 pm

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
Attachments
Copied TeeChart.jpg
Copied TeeChart.jpg (38.78 KiB) Viewed 10633 times

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: copied and printed TeeChart colors

Post by Christopher » Wed Feb 27, 2019 8:08 am

Hello Rob,

changing the BufferStyle just before export should work for you per this example here.
Best Regards,
Christopher Ireland / 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

Innervations
Newbie
Newbie
Posts: 13
Joined: Wed Dec 19, 2018 12:00 am

Re: copied and printed TeeChart colors

Post by Innervations » Tue Apr 30, 2019 10:18 am

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

Post Reply