FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Decimal place in Y-axis in Graph
Posts: 175
Joined: Tue Nov 10, 2009 10:56 AM
Decimal place in Y-axis in Graph
Posted: Thu Aug 09, 2012 07:15 AM
Hi

In the example for graph:

Code (fw): Select all Collapse
#include "Fivewin.ch"
#include "TGraph.ch" 


FUNCTION MAIN() 

    LOCAL oDlg, oGraph 

    DEFINE DIALOG oDlg; 
           SIZE 600, 500 

    @ 1, 1 GRAPH oGraph; 
           SIZE 250, 200; 
           TYPE 1; 
           YVALUES 3D XGRID YGRID XVALUES LEGENDS 

//    oGraph:aSeries = { { "Serie 1", CLR_CYAN } } 

//                    { cLegend, nColor, nType, l3D }

    oGraph:aSeries = { { "Serie 1", CLR_CYAN , , },;
                       { "Serie 2", CLR_YELLOW, 2, .T. },;
                       { "Serie 3", CLR_HRED, 3, .F. } }

//    oGraph:aYVals = { "Jan", "Feb", "Mar", "Apr", "May" } 

//    oGraph:aData = { { 14280, 20420, 12870, 25347, 7640 } } 

    oGraph:aData = { { 14280, 20420, 12870, 25347, 7640 },; 
                     { 8350, 10315, 15870, 5347, 12340 },; 
                     { 12345, -8945, 10560, 15600, 17610 } } 

    oGraph:nClrX = CLR_GREEN 
    oGraph:nClrY = CLR_RED 

    @ 0, 0 BUTTON "Cambia" ACTION ( oGraph:nType := 4, oGraph:Refresh() ) 
//    @ 0, 0 BUTTON "Cambia" ACTION oDlg:Print() 

    ACTIVATE DIALOG oDlg; 
             CENTER 

    RETURN NIL



How do I change the Y-axis to display round figures instead of two decimal places.

Thanks

ACWoo
Using FWH1201+BCC582+Harbour

Continue the discussion