Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

Adding Custom Text to Chart

 Post Reply Post Reply
Author
Deuerling Robert View Drop Down
New Member
New Member
Avatar

Joined: 20 Mar 2015
Posts: 2
Post Options Post Options   Quote Deuerling Robert Quote  Post ReplyReply Direct Link To This Post Topic: Adding Custom Text to Chart
    Posted: 21 Mar 2015 at 10:44pm
Is it possible to add text to a chart which can be saved and printed?
I want to have a box e.g. in the right corner and then put there some informations related to the chart.
The chart should contain additional informations e.g. name of the part, date of the chart, location,...

My first thought was to use the ondrawchart-event, but the information added here could not be saved to the file :/ only chartdata is saved.
Using a backgroundpicture and put the text via textout works, but the text will be overriden by the graphic as it's the nature of a backgroundpic....

What's the right way to achive this?
Back to Top
Pieter Scheldeman View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 3391
Post Options Post Options   Quote Pieter Scheldeman Quote  Post ReplyReply Direct Link To This Post Posted: 23 Mar 2015 at 8:57am
Hi, 

Printing is explained at the following tip:
http://tmssoftware.com/site/advchart.asp?s=faq&show=392
When the chart is printed, additional information can be drawn at the printer canvas.

Please note that this is only for the normal version of the chart.
For the GDI+ version, you will need to use a bitmap to print on the printer.
This is explained at the following page:

http://tmssoftware.com/site/advchart.asp?s=faq&show=439

Kind Regards, 
Pieter 
Back to Top
Deuerling Robert View Drop Down
New Member
New Member
Avatar

Joined: 20 Mar 2015
Posts: 2
Post Options Post Options   Quote Deuerling Robert Quote  Post ReplyReply Direct Link To This Post Posted: 23 Mar 2015 at 9:24pm
Thx Pieter printing now works perfectly.
What about saving the pane?

I use ChartView.SaveToImage(... with GDI+

Kind Regards
-Robert
Back to Top
Pieter Scheldeman View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 3391
Post Options Post Options   Quote Pieter Scheldeman Quote  Post ReplyReply Direct Link To This Post Posted: 24 Mar 2015 at 8:27am
Hi, 

Does the SaveToImage produces an incorrect output?

Kind Regards, 
Pieter
Back to Top
Robert Deuerling View Drop Down
New Member
New Member
Avatar

Joined: 18 Mar 2015
Posts: 8
Post Options Post Options   Quote Robert Deuerling Quote  Post ReplyReply Direct Link To This Post Posted: 24 Mar 2015 at 9:56am
Hi,

the chart displays correctly. SaveToImage does not contain my additional Info.
I worked around by using the print-function-way to a bitmap, add my infos to the bitmap and then convert the bitmap to the corresponding outputtype (png, jpeg, bmp,...) by hand.

There's no such feature like an overlay to put on the chart or a similar way to do this.

ChartView.addOverlayAt(destRect, overlayBmp, copyMode).

Kind Regards
 -Robert

Back to Top
Pieter Scheldeman View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 3391
Post Options Post Options   Quote Pieter Scheldeman Quote  Post ReplyReply Direct Link To This Post Posted: 24 Mar 2015 at 11:45am
Hi, 

This feature is currently not included. You will need to save the chart to a bitmap, and then print the bitmap on the printer and add additional text to it.

Kind Regards, 
Pieter 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down