GraphPlus

HMG Samples and Enhancements

Moderator: Rathinagiri

User avatar
serge_girard
Posts: 3167
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: GraphPlus

Post by serge_girard »

I think data is cause. Too low for viewing?
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 »

Hi, sorry i keep asking about this, but i don't understand what happening...
With the values put "by hand" in the array the same thing happens, this part of the code fails (capture in the previous post)

Code: Select all

aData := {228870.00,118823.08,35779.00,33545.00,26101.00,19070.00,18231.50,17521.00,15675.00,13329.20,7970.00,6761.10,6194.40,5656.50,2414.00,1970.00,450.00,0.00}
aLeg := {"1","","","","","6","","","","","","12","","","","","","18"}

	oObj := GraphPlus():New()

	With Object oObj

	  :GraphData := aData
	  :Legends   := aLeg
	  :ShowLegends := .T.
	  :LegendPos := 0										// 0 = Derecha	/	1 = Abajo
	  :Width := 994
	  :Height := 514
	  :Title := cTitle
	  :Picture := "999999999.99"							// Mascara para los valores
	  :ShowLabels := lLabels								// .T. = Muestra los valores
	  :GraphType := GT_PIE
	  :Draw()

	  Chart_Pie.Image_Chart.hBitmap := :Bitmap()			// Imagen con el grafico
	  
	EndWith
Sort or not sort values in "aData", show or not show labels, always fail
With another values (same len 18) no fail, What i do wrong ? Maybe 18 is too long for pie chart ?
What's wrong with those values, maybe 228870.00 to 0.00 it's too much difference ?
Any help is welcome, Thanks in advance !
Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
User avatar
serge_girard
Posts: 3167
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: GraphPlus

Post by serge_girard »

Claudio

try with some other values with less difference to see what happens....

Serge
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 »

Thank you very much Serge, It must be an overlay problem, I think 18 data is a lot, I solved it with a bar graph.
Also the line graph works great for me in two programs !
This library is wonderful and very easy to use, huge work from Mr. Rathinagiri !!!
Screenshot_20211214_174233.png
Screenshot_20211214_174233.png (37.36 KiB) Viewed 11028 times
Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: GraphPlus

Post by Rathinagiri »

Hi,

Can you give some sample data and or code?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: GraphPlus

Post by Rathinagiri »

May be because of 0%?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
jparada
Posts: 430
Joined: Fri Jan 23, 2009 5:18 pm

Re: GraphPlus

Post by jparada »

Hi,

I solve the issue of charts in another way, I use activex and the charts are made with Javascript with the chart.js lib, so we have dynamic charts inside a form that are very useful for clients but also very pretty, I'm just commenting another option.

Regards,
Javier
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 »

Hi Sir Rathinagiri
That .txt contains the array values that cause the failure and those that don't.
In the post above is the code part of the function in which I pass the values to the object.
If you need the full function with how I create the arrays from the tables, I can upload it.
Attachments
Array aData.zip
(1.05 KiB) Downloaded 153 times
Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: GraphPlus

Post by Rathinagiri »

Thanks for reporting!

Confirmed the bug. If the data is so small that its portion comes to 0 degrees when rounded, there is a problem.

Now changed the code in such a way that, if it is 0 degrees, it will not be shown. Hope it is ok.
GraphPlus_2022_01_27.zip
(23.09 KiB) Downloaded 192 times
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
Post Reply