Graph .....

93 views
Skip to first unread message

Tales Souza

unread,
Feb 17, 2026, 8:49:06 AMFeb 17
to Harbour Minigui
Dear, Grigory !!

Is there any library or alternative that can create charts (tower and
pie charts) in Minigui Extended?

The examples have a very limited appearance.

Regards, Tales Souza

Joao Carlos

unread,
Feb 17, 2026, 9:05:51 AMFeb 17
to Tales Souza, Harbour Minigui
Yes , one moment

João Carlos de Souza
Sistemas (11) 9.7378-8895



--
Visit our website on https://www.hmgextended.com/ or https://www.hmgextended.org/
---
You received this message because you are subscribed to the Google Groups "Harbour Minigui" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minigui-foru...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/minigui-forum/CAC%3D%3DfVBmYjXRVpMPsA9Umad%2BXgr9imoTGq-tEFHpiom3BiayvA%40mail.gmail.com.

Joao Carlos

unread,
Feb 17, 2026, 9:11:51 AMFeb 17
to Tales Souza, Harbour Minigui
C:\MiniGUI\SAMPLES\BASIC\BaseGraph

--
João Carlos de Souza
Especialista Sistemas (11) 9.7378-8895

Joao Carlos

unread,
Feb 17, 2026, 9:43:53 AMFeb 17
to Tales Souza, Harbour Minigui
C:\MiniGUI\SAMPLES\Advanced\GraphPlus

Grigory Filatov

unread,
Feb 18, 2026, 5:34:53 AMFeb 18
to Harbour Minigui
Hi Tales,

Thanks for your request!

You can see an example in the folder \SAMPLES\BASIC\ChartView.

This code uses a powerful GraphPlus library and a simple ChartView class.

/*
 * MINIGUI - Harbour Win32 GUI library Demo
 */

#include "hmg.ch"
#include "GraphPlus.ch"
#include "hbclass.ch"

STATIC aTypes[ 4 ]

/*
 * Description: Initializes the main window for a chart demo application.
 * Parameters: None
 * Return: NIL - No value returned.
 * Purpose: Sets up a GUI with a grid for data input, chart type selection, and size controls to demonstrate GraphPlus charting; e.g., allows users to visualize data in various chart formats.
 * Notes: Uses sample data for demonstration; window is fixed-size and centered.
 */
FUNCTION Main()
   LOCAL aRows[ 6 ], aCombo := {}

   aRows[ 1 ] := { 'Simpson', 5 }
   aRows[ 2 ] := { 'Mulder', 30 }
   aRows[ 3 ] := { 'Smart', 50 }
   aRows[ 4 ] := { 'Grillo', 120 }
   aRows[ 5 ] := { 'Kirk', 90 }
   aRows[ 6 ] := { 'Barriga', 200 }

   aTypes[ 1 ] := { "Pie", "PieChart" }
   aTypes[ 2 ] := { "Line", "LineChart" }
   aTypes[ 3 ] := { "Bar", "BarChart" }
   aTypes[ 4 ] := { "Columns", "ColumnChart" }

   AEval( aTypes, {| x | AAdd( aCombo, x[ 1 ] ) } )

   DEFINE WINDOW Win_1 WIDTH 600 HEIGHT 500 TITLE "GraphPlus Chart Sample" MAIN
      @ 20, 20 GRID Grid_1 ;
         WIDTH 300 HEIGHT 110 ;
         HEADERS { 'Label', 'Data' } ;
         WIDTHS { 100, 100 } ;
         ITEMS aRows ;
         VALUE { 1, 1 } ;
         COLUMNCONTROLS { { 'TEXTBOX', 'CHARACTER' }, { 'TEXTBOX', 'NUMERIC', '9999' } } ;
         EDIT ;
         CELLNAVIGATION

      @ 20, 390 COMBOBOX Combo_1 ;
         WIDTH 135 HEIGHT 194 ;
         ITEMS aCombo ;
         VALUE 1 ;
         ON LISTCLOSE This.Button_1.SetFocus()

      @ 60, 390 TEXTBOX t_Width ;
         WIDTH 50 ;
         VALUE 480 ;
         NUMERIC INPUTMASK "999"

      @ 100, 390 TEXTBOX t_Height ;
         WIDTH 50 ;
         VALUE 250 ;
         NUMERIC INPUTMASK "999"

      @ 20, 340 LABEL Label_1 WIDTH 50 HEIGHT 20 VALUE 'Type'
      @ 60, 340 LABEL Label_2 WIDTH 50 HEIGHT 20 VALUE 'Width'
      @ 100, 340 LABEL Label_3 WIDTH 50 HEIGHT 20 VALUE 'Height'

      @ 100, 460 BUTTON Button_1 ;
         CAPTION "Generate" ;
         ACTION GenerateChart() ;
         WIDTH 70 HEIGHT 28 DEFAULT
   END WINDOW

   CENTER WINDOW Win_1
   ACTIVATE WINDOW Win_1
RETURN NIL

/*
 * Description: Generates a chart based on user input.
 * Parameters: None
 * Return: NIL - No value returned.
 * Purpose: Creates and displays a chart using data from the grid, with type and size set by user controls; e.g., visualizes user-entered data in selected chart format.
 * Notes: Adjusts chart properties based on type; pie charts show legends, others hide them for clarity.
 */
FUNCTION GenerateChart()
   LOCAL aRows := Win_1.Grid_1.GetArray()
   LOCAL data1 := {}
   LOCAL data2 := {}
   LOCAL oChartView

   AEval( aRows, {| x | AAdd( data1, x[ 1 ] ) } )
   AEval( aRows, {| x | AAdd( data2, x[ 2 ] ) } )

   oChartView := ChartView():New( "Win_1", 150, 20, Win_1.t_Width.VALUE +70, Win_1.t_Height.VALUE +50 )
   WITH OBJECT oChartView
      :oGraph:LegendFont := array FONT 'Arial' SIZE 10
      :SetData( data2, data1, data1 )
      SWITCH Win_1.Combo_1.VALUE
      CASE 1
         :SetGraphType( GT_PIE )
         :oGraph:LegendPos := LEGEND_ON_RIGHT
         EXIT
      CASE 2
         :SetGraphType( GT_LINE )
         :oGraph:lShowLegends := .F.
         EXIT
      CASE 3
         :oGraph:BarGapRatio := 0
         :oGraph:BarGapWidthRatio := 0.1
         :SetGraphType( GT_BAR )
         :oGraph:lShowLegends := .F.
         EXIT
      CASE 4
         :SetGraphType( GT_COLUMNS )
         :oGraph:lShowLegends := .F.
         EXIT
      END
      :SetTitles( aTypes[ Win_1.Combo_1.Value ][ 1 ] + " Chart Sample" )
      :Draw()
   END WITH
RETURN NIL

graph.png

Hope this is helpful.

Regards,
Grigory

вторник, 17 февраля 2026 г. в 14:49:06 UTC+1, taless...@gmail.com:

Tales Souza

unread,
Feb 18, 2026, 10:49:18 AMFeb 18
to Joao Carlos, Harbour Minigui
João, thank you for your attention. I found the last one you suggested
to have a very interesting visual style. I'll study it!

Thank you very much!

Tales

Tales Souza

unread,
Feb 18, 2026, 11:29:52 AMFeb 18
to Grigory Filatov, Harbour Minigui
Grigory, thank you for your attention. I liked the look of this one,
it seems very modern. I'll study it!

Taking this opportunity, could I make a donation of 50 euros to get
access to the PRO version?

José M. C. Quintas

unread,
Feb 18, 2026, 12:45:11 PMFeb 18
to minigu...@googlegroups.com

You can check samples of rmchart too, inside minigui.



José M. C. Quintas

Reply all
Reply to author
Forward
0 new messages