Page 1 of 2

Como corrijo una grafica?

Posted: Thu Oct 23, 2014 4:00 am
by Javier Tovar
Como corrijo una gráfica?

En las gráficas de barras salen asteriscos en vez de cantidades, cuando las cantidades son mayor a 1,000,000.00, que se tiene que hacer para solucionarlo, ya trate de encontrar algo en el foro pero no lo encontré.

Saludos y gracias por la atención que tengan a este post.
//////////////////////////////////////////////////////////////////////////////////////////////

As I edit a graph?

In the bar charts depart asterisks instead of numbers when the numbers are greater than 1,000,000.00, you have to do to fix it, and try to find something in the forum but not found it.

Greetings and thanks for the care you have for this post.
Error en grafica.jpg
Error en grafica.jpg (65.83 KiB) Viewed 3909 times
Midemo.rar
(703 Bytes) Downloaded 213 times

Re: Como corrijo una grafica?

Posted: Thu Oct 23, 2014 5:33 am
by andyglezl
Hola Javier

Pues con esas ventas, yo me apunto a programar para ti... :lol:
-------------------------------------------------------------------------
Hi Javier

Well, with these sales, I'm in a program for you ... :lol:

Re: Como corrijo una grafica?

Posted: Thu Oct 23, 2014 8:11 am
by gfilatov
Hi Javier,

It is a known limitation in the Graph source and there is a simple workaround for it.

Please take a look for an updated sample below:

Code: Select all

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

#include "hmg.ch"

Function Main

Local aSer:={ {12314280,1220420,12312870,25347, 12347640} }
Local serie

For each serie in aSer
	For i:=1 To Len(serie)
		serie[i] := aSer[1][i] / 1000
	Next
Next

	Define Window GraphTest ;
		At 0,0 ;
		Width 640 ;
		Height 480 ;
		Title "Graph" ;
		Main ;
		Nomaximize ;
		Icon "Main" ;
		BackColor { 255 , 255 , 255 } ;
		On Init DrawBarGraph ( aSer ) ;

		Define Button Button_1
			Row	415
			Col	20
			Caption	'Bars'
			Action DrawBarGraph ( aSer )
		End Button

		Define Button Button_4
			Row	415
			Col	500
			Caption	'Print'
			Action PRINT GRAPH OF GraphTest PREVIEW DIALOG
		End Button

	End Window

	GraphTest.Center

	Activate Window GraphTest

Return

Procedure DrawBarGraph ( aSer )

	ERASE WINDOW GraphTest

	DRAW GRAPH							;
		IN WINDOW GraphTest					;
		AT 20,20						;
		TO 400,610						;
		TITLE "Sales and Product (in thousands)"		;
		TYPE BARS						;
		SERIES aSer						;
		YVALUES {"Jan","Feb","Mar","Apr","May"}			;
		DEPTH 15						;
		BARWIDTH 15						;
		HVALUES 10						;
		SERIENAMES {"Serie 1"}		;
		COLORS { {128,128,255} }	;
		SHOWGRID                        			;
		3DVIEW    						;	
		SHOWXVALUES                     			;
		SHOWYVALUES                     			;
		SHOWLEGENDS 						;
		NOBORDER

	
Return

Re: Como corrijo una grafica?

Posted: Thu Oct 23, 2014 9:53 am
by Agil Abdullah
Thanks to Javier for sharing this Topic.
Thanks to Grigory for sharing codes.

Salam Hangat dari Jakarta.

Re: Como corrijo una grafica?

Posted: Thu Oct 23, 2014 10:19 am
by esgici
Thanks Javier and Grigory :)

Happy HMG'ing :D

Re: Como corrijo una grafica?

Posted: Thu Oct 23, 2014 4:01 pm
by Javier Tovar
gfilatov wrote:Hi Javier,

It is a known limitation in the Graph source and there is a simple workaround for it.

Please take a look for an updated sample below:
If Gregory Filatov had already done that and put in place of "Series Name" put ("Quantity X 1.000"), but does not look very professional. I hope there will soon be a better solution.

Thanks for the attention.

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Si Gregory Filatov, ya había hecho eso y poner en lugar de "Nombre de la serie" poner ("Cantidades X 1,000"), pero no se ve muy profesional. Espero que pronto haya una mejor solución.

Gracias por la atención recibida.

Re: Como corrijo una grafica?

Posted: Thu Oct 23, 2014 4:08 pm
by Javier Tovar
andyglezl wrote:Hola Javier

Pues con esas ventas, yo me apunto a programar para ti...
:lol: :lol: :lol:

Esa es mi intención, estoy haciendo una aplicación con datos reales de una empresa y pues haber si les gusta mi programa, ya que ellos lo llevan en Excel, aunque trabaja bien!, pero espero que les guste la nueva forma de trabajar, solo estoy haciéndoles un demo! :)

Saludos

Re: Como corrijo una grafica?

Posted: Sat Oct 25, 2014 8:02 pm
by gfilatov
Javier Tovar wrote:...
but does not look very professional. I hope there will soon be a better solution.

Thanks for the attention.
Hi Javier,

You are right! Therefore Minigui Ext have a 'DataMask' clause in the Draw Graph command.

You can see a correct result for DATAMASK "99,999,999" on this screenshot below.

Re: Como corrijo una grafica?

Posted: Sun Oct 26, 2014 2:05 am
by Javier Tovar
gfilatov wrote:Hi Javier,

You are right! Therefore Minigui Ext have a 'DataMask' clause in the Draw Graph command.

You can see a correct result for DATAMASK "99,999,999" on this screenshot below.
Bien Gregori Filatov, espero que los desarrolladores de HMG hagan esto para la gráfica!!!, yo por lo tanto voy a tratar de encontrar una solución, aunque no sea muy profesional, pero que se vean las cantidades correctas o no ponerlas y poner una tabla extra al gráfico con los datos.

Saludos y gracias por la atención :)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Filatov Gregori Well, I hope developers do this for HMG graphic !!!, so I'll try to find a solution, though not very professional, but that the right quantities or look them and put a Extra to graph the data table.

Greetings and thanks for the attention :)

Re: Como corrijo una grafica?

Posted: Sun Oct 26, 2014 12:09 pm
by endor
Thank you for sharing, Javier and Grigory :)

I just have a thought, Is there a way to put the graph in a tab? :idea:

Like page 1 - description, page 2 - details, page 3 the graph? or something like that?

coz I have tried, the text only show but the graph is behind the tab and displays blank. :?: