Page 1 of 6

GraphPlus

Posted: Fri May 28, 2021 6:57 pm
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 25441 times
graphplus02.png
graphplus02.png (19.64 KiB) Viewed 25441 times
graphplus03.png
graphplus03.png (23.88 KiB) Viewed 25441 times
graphplus04.png
graphplus04.png (15.48 KiB) Viewed 25441 times
graphplus05.png
graphplus05.png (20.88 KiB) Viewed 25441 times
graphplus06.png
graphplus06.png (14.28 KiB) Viewed 25441 times
Source code:
GraphPlus.zip
(9.71 KiB) Downloaded 446 times

Re: GraphPlus

Posted: Sat May 29, 2021 8:34 am
by serge_girard
Thanks Rathi !

Re: GraphPlus

Posted: Sat May 29, 2021 9:08 am
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 !!!

Re: GraphPlus

Posted: Sat May 29, 2021 12:12 pm
by huiyi_ch
Thanks Rathi !

Re: GraphPlus

Posted: Sat May 29, 2021 1:12 pm
by andyglezl
Fabuloso !, gracias Rathi.
+--------------------------------
Fabulous !, thanks Rathi.

Re: GraphPlus

Posted: Sat May 29, 2021 6:16 pm
by Anand
Looks Great. Thanks.

Re: GraphPlus

Posted: Sat May 29, 2021 6:21 pm
by salamandra
Nice job.
Thank you very much Rathi !!


Salamandra, Brazil

Re: GraphPlus

Posted: Sun May 30, 2021 2:13 pm
by fouednoomen
Thanks a lot Radhi
Good job 👍

Re: GraphPlus

Posted: Mon May 31, 2021 4:20 pm
by mol
Great! Thanks

Re: GraphPlus

Posted: Tue Jun 01, 2021 6:56 am
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: