Home » Community » Newbie corner » Adding a text box in a scatterDraw/ScatterCtrl
Re: Adding a text box in a scatterDraw/ScatterCtrl [message #48103 is a reply to message #47622] |
Wed, 17 May 2017 12:11   |
Giorgio
Messages: 218 Registered: August 2015
|
Experienced Member |
|
|
Hi Koldo,
it took me ages to test it... the project was stopped and then it suddenly restarted some weeks ago.
A little bit of context: there is an application used on a couple production lines in the factory I work for. This application registers automatically (in a db) the speed of the production line: the line operate on cables and can treat x meters of cable per minute depending on the type of operation. The machinist, using another applications, enters in the db what is doing (setting up the machine, running the machine...) and what product-id he is working on. The goal is to put together all the information to have a report on the production of each shift. This is the result:
https://pasteboard.co/7jRIiP3B3.png
-Using the standard scatter function AddSeries() I draw the blue line (the speed);
-I created also the green, red yellow, bars (those bars says what the operator is doing: running setting up etc.) with AddSeries(), but with a little trick: it is a very thick line with just two points: the first is the begin of e.g running time, the second is the end;
Now comes in the new method OnPaint; with that method:
-I add a letter on the bars to explains what the bar represents (e.g. 'R' for running);
-I add the product-id that has been processed (e.g. 160997100A-60-2 represents a certain type of cable).
That works very well, the problems come when I print or scroll the report:
https://pasteboard.co/7jQzP6HMn.png
https://pasteboard.co/7jStsxNhI.png
When I scroll the report:
-The texts stay "fixed" while the graphs are resized
When I print the report:
-All the texts are very small;
-The bars have rounded edges.
I had a look at the code of the tab "User paint" of the ScatterCtrl_Demo and saw that using scaled font you do not have the same problem I have, so is just a matter of checking the code and understand how scaled font works.
So, the feedback is that the UserPaint callback provides all the needed functionality, it works as expected and has no bugs (consider that the application that generates the report has been used on a daily basis by a couple of users for about 3 weeks and they have not found any problem).
Thanks a lot for your effort!
Regards,
Gio
[Updated on: Wed, 17 May 2017 12:14] Report message to a moderator
|
|
|
 |
|
Adding a text box in a scatterDraw/ScatterCtrl
By: Giorgio on Tue, 07 February 2017 09:46
|
 |
|
Re: Adding a text box in a scatterDraw/ScatterCtrl
By: koldo on Wed, 08 February 2017 08:35
|
 |
|
Re: Adding a text box in a scatterDraw/ScatterCtrl
By: Giorgio on Wed, 08 February 2017 09:20
|
 |
|
Re: Adding a text box in a scatterDraw/ScatterCtrl
By: koldo on Wed, 08 February 2017 11:34
|
 |
|
Re: Adding a text box in a scatterDraw/ScatterCtrl
By: Giorgio on Wed, 08 February 2017 12:02
|
 |
|
Re: Adding a text box in a scatterDraw/ScatterCtrl
By: koldo on Fri, 10 February 2017 14:12
|
 |
|
Re: Adding a text box in a scatterDraw/ScatterCtrl
By: Giorgio on Fri, 10 February 2017 15:38
|
 |
|
Re: Adding a text box in a scatterDraw/ScatterCtrl
By: koldo on Fri, 10 February 2017 23:15
|
 |
|
Re: Adding a text box in a scatterDraw/ScatterCtrl
By: Giorgio on Wed, 17 May 2017 12:11
|
 |
|
Re: Adding a text box in a scatterDraw/ScatterCtrl
By: koldo on Wed, 17 May 2017 17:04
|
 |
|
Re: Adding a text box in a scatterDraw/ScatterCtrl
By: Giorgio on Wed, 17 May 2017 17:43
|
 |
|
Re: Adding a text box in a scatterDraw/ScatterCtrl
By: Giorgio on Fri, 19 May 2017 13:11
|
 |
|
Re: Adding a text box in a scatterDraw/ScatterCtrl
By: koldo on Thu, 25 May 2017 20:07
|
 |
|
Re: Adding a text box in a scatterDraw/ScatterCtrl
By: Giorgio on Fri, 26 May 2017 14:45
|
 |
|
Re: Adding a text box in a scatterDraw/ScatterCtrl
By: koldo on Mon, 29 May 2017 12:45
|
 |
|
Re: Adding a text box in a scatterDraw/ScatterCtrl
By: Giorgio on Mon, 12 June 2017 11:52
|
 |
|
Re: Adding a text box in a scatterDraw/ScatterCtrl
By: koldo on Tue, 13 June 2017 09:51
|
Goto Forum:
Current Time: Tue May 06 06:59:04 CEST 2025
Total time taken to generate the page: 0.03170 seconds
|