Page 6 of 6

Re: GraphPlus

Posted: Mon Dec 13, 2021 8:05 am
by serge_girard
I think data is cause. Too low for viewing?

Re: GraphPlus

Posted: Mon Dec 13, 2021 3:08 pm
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 !

Re: GraphPlus

Posted: Tue Dec 14, 2021 1:13 pm
by serge_girard
Claudio

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

Serge

Re: GraphPlus

Posted: Tue Dec 14, 2021 8:58 pm
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 14919 times

Re: GraphPlus

Posted: Mon Jan 24, 2022 2:19 am
by Rathinagiri
Hi,

Can you give some sample data and or code?

Re: GraphPlus

Posted: Mon Jan 24, 2022 2:21 am
by Rathinagiri
May be because of 0%?

Re: GraphPlus

Posted: Mon Jan 24, 2022 2:50 pm
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

Re: GraphPlus

Posted: Mon Jan 24, 2022 10:08 pm
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.

Re: GraphPlus

Posted: Thu Jan 27, 2022 2:38 pm
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 345 times