PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 25 → Wx - Como interagir com o gráfico em sua aplicação Wx (Windev, Webdev e Windev Mobile)
Wx - Como interagir com o gráfico em sua aplicação Wx (Windev, Webdev e Windev Mobile)
Iniciado por adrianoboller, 27,feb. 2016 02:57 - No hay respuesta
Miembro registrado
3.659 mensajes
Popularité : +175 (223 votes)
Publicado el 27,febrero 2016 - 02:57
Prezados,

Segue exemplo de como interagir com o gráfico em sua aplicação Wx (Windev, Webdev e Windev Mobile)





CODIGO PARA FAZER GRAFICO VIA CODIGO

// Summary: Fills the initial chart
// Syntax:
//FillChart ()
//
// Parameters:
// None
// Return value:
// None
//
Procedure ExibeGrafico()

// Delete the data from the previous chart
grDeleteSeries(CHART_Chart)

// Define the colors
grWaterfallColor(CHART_Chart, grTotal, RGB(83,129,179))
grWaterfallColor(CHART_Chart, grSubTotal, RGB(83,129,179))
grWaterfallColor(CHART_Chart, grPositive, RGB(115,179,83))
grWaterfallColor(CHART_Chart, grNegative, RGB(179,84,92))

// TO 2012
grAddData(CHART_Chart, 1, 1, 298)
grCategoryLabel(CHART_Chart, 1, "TO 2011")
//grWaterfallCategoryType(CHART_Chart, 1, grTotal)

// Add the profits
grAddData(CHART_Chart, 1, 2, 420)
grCategoryLabel(CHART_Chart, 2, "Profits"+CR+"products")
grAddData(CHART_Chart, 1, 3, 210)
grCategoryLabel(CHART_Chart, 3, "Profits"+CR+"services")

// Costs
grAddData(CHART_Chart, 1, 4, -170)
grCategoryLabel(CHART_Chart, 4, "Costs"+ CR +"fixed")
grAddData(CHART_Chart, 1, 5, -140)
grCategoryLabel(CHART_Chart, 5, "Costs" + CR + "variables")

// TO 2013
grAddData(CHART_Chart, 1, 6, 0)
grCategoryLabel(CHART_Chart, 6, "TO 2012")
grWaterfallCategoryType(CHART_Chart, 6, grTotal)

gnNbCategories = 6

// Draw the chart in the Chart control
grDraw(CHART_Chart)



Modo de usar:
ExibeGrafico()


--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.blogspot.com.br/