GraphPlus

HMG Samples and Enhancements

Moderator: Rathinagiri

User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

GraphPlus

Post by Rathinagiri »

Note: If you are new to this thread, please download the latest library and sample pack which is available in the end of this thread. First post is having the oldest one.

Dear Friends,

During this lock down because of Corona in India, I had some free time. So, I started learning Google Data Analytics Professional course and completed.

Whenever I see modern data visualization/dashboard tools, I wish these features available in HMG.

This week, I started doing my long pending wish of revamping the Graph library (with the help of our versatile Bos Taurus Library) by starting from scratch. Like GridPlus library, this is also Object Oriented.

Hope you like this. Any help in the form of suggestions, test reports, bug reports, bug fixes, enhancements, help documents and comments are welcome.

I wish to dedicate this library to our beloved friend Esgici.

Some new features:
- Color Themes (just like MS Office 365)
- Grid to Chart support
- Aesthetic look and feel
- Legend and Category Titles
- Font support for title/legend/category
- Switch Rows to Columns to see data in different perspective
and many more.

Forthcoming features: (if time is available and people can help)
- Bar graph
- Funnel Chart
- Doughnut Chart (On seeing the progresswheel sample of Gregory, I hope that will be easy.)
- Area Chart
- Stacked Bar/Column/Area Charts
- Waterfall Model Chart
- XY Scatter Chart
- Stock Chart


See some samples:
graphplus01.png
graphplus01.png (15.17 KiB) Viewed 18692 times
graphplus02.png
graphplus02.png (19.64 KiB) Viewed 18692 times
graphplus03.png
graphplus03.png (23.88 KiB) Viewed 18692 times
graphplus04.png
graphplus04.png (15.48 KiB) Viewed 18692 times
graphplus05.png
graphplus05.png (20.88 KiB) Viewed 18692 times
graphplus06.png
graphplus06.png (14.28 KiB) Viewed 18692 times
Source code:
GraphPlus.zip
(9.71 KiB) Downloaded 257 times
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
serge_girard
Posts: 3165
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: GraphPlus

Post by serge_girard »

Thanks Rathi !
There's nothing you can do that can't be done...
User avatar
Claudio Ricardo
Posts: 367
Joined: Tue Oct 27, 2020 3:38 am
DBs Used: DBF, MySQL, MariaDB
Location: Bs. As. - Argentina

Re: GraphPlus

Post by Claudio Ricardo »

Hello ... Congratulations on the completed course!
Just a client asked me to complement the balance function with a graphical scheme and I was postponing it due to lack of time
to invent a "pizza" graph to visualize the best-selling items (they do not reach ten), among which they have divided their articles.
I will download it and next week I will start to implement it and comment.
It looks beautiful and modern, more with dark background!
Thank you very much for your work and sharing it !!!
Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
huiyi_ch
Posts: 172
Joined: Sat May 21, 2016 5:27 am

Re: GraphPlus

Post by huiyi_ch »

Thanks Rathi !
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: GraphPlus

Post by andyglezl »

Fabuloso !, gracias Rathi.
+--------------------------------
Fabulous !, thanks Rathi.
Andrés González López
Desde Guadalajara, Jalisco. México.
User avatar
Anand
Posts: 595
Joined: Tue May 24, 2016 4:36 pm
DBs Used: DBF

Re: GraphPlus

Post by Anand »

Looks Great. Thanks.
Regards,

Anand

Image
User avatar
salamandra
Posts: 311
Joined: Thu Jul 31, 2008 8:33 pm
DBs Used: DBF, MySQL, SQL
Location: Brazil

Re: GraphPlus

Post by salamandra »

Nice job.
Thank you very much Rathi !!


Salamandra, Brazil
There is one time in which is crucial awakening. That time is now. ( Buddha )
User avatar
fouednoomen
Posts: 188
Joined: Sun Oct 14, 2012 8:33 am
DBs Used: DBF, MySQL, MariaDB, SQLite, PostgreSQL, Oracle, ODBC
Location: Tunisia

Re: GraphPlus

Post by fouednoomen »

Thanks a lot Radhi
Good job 👍
User avatar
gfilatov
Posts: 1066
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: GraphPlus

Post by gfilatov »

Rathinagiri wrote: Fri May 28, 2021 6:57 pm Dear Friends,
...
Hope you like this. Any help in the form of suggestions, test reports, bug reports, bug fixes, enhancements, help documents and comments are welcome.
Hi Rathi,

Thanks for your contribution!

I suggest to modify the Method InitColors as follow:

Code: Select all

Method InitColors Class GraphPlus
   local i, j, nLegends, nFactor, nCurFactor := 10
   local aHSL
   local aColorTheme
   nLegends := hmg_len( ::aLegends )
   if hmg_len( ::aColors ) = 0 .or. hmg_len( ::aColors ) < nLegends
      asize( ::aColors, 0 )
      aColorTheme := ::aColorThemes[ ::nColorTheme ]
      if nLegends <= hmg_len( aColorTheme )
         for i := 1 to nLegends
            aadd( ::aColors, aColorTheme[ i ] )
         next i
      else
         for i := 1 to hmg_len( aColorTheme )
            aadd( ::aColors, aColorTheme[ i ] )         
         next i
         i := hmg_len( aColorTheme ) + 1
         j := 1
         nFactor := 10
         do while i <= hmg_len( ::aLegends )
            if j > hmg_len( aColorTheme )
               j := 1
               nCurFactor *= nFactor
            endif   
            aHSL := GP_RGB2HSL( aColorTheme[ j ] )
            aHSL[ 3 ] := aHSL[ 3 ] + iif( ::lLighter, nCurFactor, -nCurFactor )
            aadd( ::aColors, GP_HSL2RGB( aHSL ) )
            j++
            i++
         enddo
      endif
   endif
return nil
It will be the more noticeable color change with above modification :idea:
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
Post Reply