Home » U++ Library support » ScatterDraw & ScatterCtrl » PieCtrl and GetImage (How to use correctly GetImage() with PieCtrl to obtain a image of the chart)
|
|
Re: PieCtrl and GetImage [message #49117 is a reply to message #49102] |
Tue, 19 December 2017 20:16   |
Diego22
Messages: 10 Registered: November 2016 Location: Zaragoza
|
Promising Member |
|
|
I've just downloaded last version of theIDE but it still have not showed the pie. I've selected PieCtrl in the Layout window and part of the code is: (grafCostes is PieCtrl)
grafCostes.AddCategory ("FV Panels", CostFV, :: Color (242, 242, 11));
grafCostes.AddCategory ("Inverter + FV Regulator", CostInvReg, :: Color (255, 128, 0));
grafCostes.AddCategory ("Wind turbine + Inverter", CosteEolica, :: Color (0, 204, 204));
grafCostes.AddCategory ("Batteries", CosteAcum, :: Color (102, 204, 0));
grafCostes.AddCategory ("Generator", CosteDiesel, :: Color (178, 102, 255));
grafCostes.SetColor (Null) .SetPieMarginTop (10) .SetPieMarginBottom (10) .SetPieMarginLeft (1) .SetPieMarginRight (400);
grafCostes.SetCatValue (0, CostFV);
grafCostes.SetCatValue (1, CosteInvReg);
grafCostes.SetCatValue (2, CosteEolica);
grafCostes.SetCatValue (3, CosteAcum);
grafCostes.SetCatValue (4, CostDiesel);
imgCostes = grafCostes.GetImage (); //(Image imgCostes)
r.PlaceImage ("##IMG10", results.imgCost, Size (2000, 2000)); //(RepGen r)
Some help please.
|
|
|
Re: PieCtrl and GetImage [message #49118 is a reply to message #49117] |
Tue, 19 December 2017 21:12   |
 |
Klugier
Messages: 1099 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hello,
I just noticed that bazzar/PieTest example doesn't compile due to lack of Scatter package. Can you take care of this problem Koldo?
@Dieggo
In my opinion your problem might be the result of lack appropriate inclusion before including LAYOUTFILE. It should be done something like that:
#include <Scatter/Pie.h> // This include doesn't exist - you need to find appropriate file or wait until Koldo fix PieTest.
#include <Report/Report.h>
#include <PdfDraw/PdfDraw.h>
#define LAYOUTFILE <PieTest/PieTest.lay>
#include <CtrlCore/lay.h>
Sincerely,
Klugier
U++ - one framework to rule them all.
[Updated on: Tue, 19 December 2017 21:15] Report message to a moderator
|
|
|
|
|
|
Re: PieCtrl and GetImage [message #49128 is a reply to message #49127] |
Thu, 21 December 2017 21:36   |
 |
koldo
Messages: 3435 Registered: August 2008
|
Senior Veteran |
|
|
Dear Diego
Please do not include #include <Scatter/Pie.h>. It has nothing to do with PieCtrl.
I advise you just to copy PieCtrl test in your code including PNGEncoder example I have enclosed you in previous posts.
Best regards
Iñaki
[Updated on: Thu, 21 December 2017 21:36] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Fri May 09 22:18:29 CEST 2025
Total time taken to generate the page: 0.00972 seconds
|