usando exemplp GraphPlus()

144 views
Skip to first unread message

Ronaldo Geniais

unread,
May 28, 2026, 12:22:42 PM (6 days ago) May 28
to Harbour Users
Isando o recurso GraphPlus()
quando gero um grafico tipo barras horizontais,
ele gera o grafico com uma cor unica, mas apresenta as legendas
nas cores definidas.
se eu fizer o mesmo grafico usando pizza, o problema nao ocorre.

como esta o codigo :

   aCores := { RED,YELLOW,ORANGE,FUCHSIA,GREEN,BROWN, ;
                BLUE,PINK,PURPLE, BLACK, WHITE, GRAY, ;
                SILVER, TEAL, NAVY, AQUA, LGREEN, OLIVE, MAROON,CELESTE,AZUL,CAFE,VERDE}

      // BARRAS HORIZONTAIS  DESPESAS  
   oObj := GraphPlus():New()
   WITH OBJECT oObj
      :GraphData   := { aVDesp  }        
      :Legends     := aLegDes  //{ "Despesas"} //, "Serie 3" }
      :Categories  := aLegDes
      :GraphColors := acores
      :Title := "Periodo :"+Dtoc(Pridia)+" a "+Dtoc(Ultdia)
      :Picture := '@B@E 9,999,999'
      :BarGapRatio := -0.6
      :BarGapWidthRatio := 0.2      
      :GraphType := GT_BAR
      :nVDivision := 4
   ENDWITH
   AAdd( aGraphObjects, oObj )  
   
   // PIZZA  DESPESAS  
   oObj := GraphPlus():New()
   WITH OBJECT oObj
      :GraphData   := { aVDesp  }        
      :Legends     := aLegDes  //{ "Despesas"} //, "Serie 3" }
      :Categories  := aLegDes
      :GraphColors := acores
      :Title := "Periodo :"+Dtoc(Pridia)+" a "+Dtoc(Ultdia)
      :Picture := '@B@E 9,999,999'
      :BarGapRatio := -0.6
      :BarGapWidthRatio := 0.2      
      :GraphType := GT_PIE
      :nVDivision := 4
   ENDWITH
   AAdd( aGraphObjects, oObj )   

anexo imagens geradas


gra3.jpeg
gra2.jpeg
gra1.jpeg

Ronaldo Geniais

unread,
Jun 2, 2026, 12:46:52 PM (yesterday) Jun 2
to Harbour Users
Could someone help me with this question?  
Why doesn't the bar chart display multiple colors according to the legend, while it works in the pie chart?

Francesco Perillo

unread,
Jun 2, 2026, 12:55:22 PM (yesterday) Jun 2
to harbou...@googlegroups.com
Ronaldo, I don't even know what GraphPlus is...

--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/harbour-users/9a56c9a1-ce8f-4e45-b402-44a37659fccen%40googlegroups.com.

Ronaldo Geniais

unread,
Jun 2, 2026, 1:35:57 PM (yesterday) Jun 2
to Harbour Users
Graphplus is a example in   C:\MiniGUI\SAMPLES\Advanced
It is a great resource that I used to create a Dashboard, but it does not correctly color the bar chart.It is a great resource that I used to create a Dashboard, but it does not correctly color the bar chart.

Reply all
Reply to author
Forward
0 new messages