Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <pgchart.h>
    short _FAR _pg_analyzechart( chartenv _FAR *env,
                                 char _FAR * _FAR *cat,
                                 float _FAR *values, short n );

    short _FAR _pg_analyzechartms( chartenv _FAR *env,
                                   char _FAR * _FAR *cat,
                                   float _FAR *values,
                                   short nseries,
                                   short n, short dim,
                                   char _FAR * _FAR *labels );

Description:
    The _pg_analyzechart functions analyze either a single-series or a
    multi-series bar, column or line chart.  These functions calculate
    default values for chart elements without actually displaying the chart.

    The _pg_analyzechart function analyzes a single-series bar, column or
    line chart.  The chart environment structure env is filled with default
    values based on the type of chart and the values of the cat and values
    arguments.  The arguments are the same as for the  _pg_chart function.

    The _pg_analyzechartms function analyzes a multi-series bar, column or
    line chart.  The chart environment structure env is filled with default
    values based on the type of chart and the values of the cat, values and
    labels arguments.  The arguments are the same as for the  _pg_chartms
    function.

Returns:
    The _pg_analyzechart functions return zero if successful; otherwise, a
    non-zero value is returned.

Example:
    #include <graph.h>
    #include <pgchart.h>
    #include <string.h>
    #include <conio.h>

    #if defined ( __386__ )
        #define _FAR
    #else
        #define _FAR    __far
    #endif

    #define NUM_VALUES 4

    char _FAR *categories[ NUM_VALUES ] = {
        "Jan", "Feb", "Mar", "Apr"
    };

    float values[ NUM_VALUES ] = {
        20, 45, 30, 25
    };

    main()
    {
        chartenv env;

        _setvideomode( _VRES16COLOR );
        _pg_initchart();
        _pg_defaultchart( &env,
                          _PG_COLUMNCHART, _PG_PLAINBARS );
        strcpy( env.maintitle.title, "Column Chart" );
        _pg_analyzechart( &env,
                          categories, values, NUM_VALUES );
        /* use manual scaling */
        env.yaxis.autoscale = 0;
        env.yaxis.scalemin = 0.0;
        env.yaxis.scalemax = 100.0;
        env.yaxis.ticinterval = 25.0;
        _pg_chart( &env, categories, values, NUM_VALUES );
        getch();
        _setvideomode( _DEFAULTMODE );
    }

Classification:
    _pg_analyzechart is PC Graphics

Systems:
     _pg_analyzechart - DOS, QNX

    _pg_analyzechartms - DOS, QNX

See Also:
    _pg_defaultchart, _pg_initchart, _pg_chart, _pg_chartpie,
    _pg_chartscatter, _pg_analyzepie, _pg_analyzescatter

See Also: _pg_defaultchart _pg_initchart

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson