Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Alinear centro de grafico en editor de informes / Align center graphics editor reports

Hola Amigos:
Con respecto al editor de informes, existe la posibilidad de colocar un grafico y este se alinie en el centro de la hoja automaticamente. Me aparece no cuadrado el informe

Espero sus respuestas

-----------------------------------------------------------------------------------------------------------------------------------------------------

Hello Friends:
With regard to the editor reporting, the possibility of placing a graphic and it aligners in the center of the sheet automatically. I get the report does not square

I hope your answers

2 Replies
yblake
Partner - Creator II
Partner - Creator II

Tengo un ejemplo de vbscript macro que hacia cosas asi. Le doy 'como esta" :

sub ResizePies

dim dummy(0) 'dummy array indicates all parts of frame to be set

mode=1
u=10
m=400

set sh = ActiveDocument.ActiveSheet

a=cint(ActiveDocument.Evaluate("sum(DISAPEARED)+sum(COMMON)"))
b=cint(ActiveDocument.Evaluate("sum(APPEARED)+sum(COMMON)"))
u=cint(ActiveDocument.Evaluate("sum(COMMON)"))

set obj1 = sh.SheetObjects("PIE1")
set fr1 = obj1.GetFrameDef
set pos1 = fr1.Rect

set obj2 = sh.SheetObjects("PIE2")
set fr2 = obj2.GetFrameDef
set pos2 = fr2.Rect

set obj3 = sh.SheetObjects("PIE3")
set fr3 = obj3.GetFrameDef
set pos3 = fr3.Rect

if b >= a then

'Size smaller
pos1.Width = a * m/b
pos2.Width = m

'center vertically
pos2.Height = pos2.Width
pos2.Top = pos3.Top
pos1.Height = pos1.Width
pos1.Top = pos2.Top + pos2.Height/2 - pos1.Height/2

'arrange objects
pos1.Left = pos3.Left + pos3.Width/2 - pos1.Width/2 - m*u/b
pos2.Left = pos1.Left + pos1.Width - m*u/b

else

'Size smaller
pos2.Width = b * m/a
pos1.Width = m

'center vertically
pos1.Height = pos1.Width
pos1.Top = pos3.Top
pos2.Height = pos2.Width
pos2.Top = pos1.Top + pos1.Height/2 - pos2.Height/2

'arrange objects
pos1.Left = pos3.Left + pos3.Width/2 - pos1.Width/2 - m*u/a
pos2.Left = pos1.Left + pos1.Width - m*u/a

end if

obj1.SetFrame fr1,true,dummy
obj2.SetFrame fr2,true,dummy

set p = obj1.GetProperties
p.ChartProperties.PieChartMode = mode
obj1.SetProperties p

set p = obj2.GetProperties
p.ChartProperties.PieChartMode = mode
obj2.SetProperties p

end sub

Not applicable
Author

No me sale con este codigo =(! en un informe "RP01" que quiero centrar y nada