## GogChartMap

GogChartMap — 2D data to canvas coordinate conversion

## Synopsis

                GogChartMap;
                GogChartMapPolarData;
    GogChartMap* gog_chart_map_new              (GogChart *chart,
                                                 GogViewAllocation const *area,
                                                 GogAxis *axis0,
                                                 GogAxis *axis1,
                                                 GogAxis *axis2,
                                                 gboolean fill_area);
    void        gog_chart_map_free              (GogChartMap *map);
    gboolean    gog_chart_map_is_valid          (GogChartMap *map);
    void        gog_chart_map_2D_to_view        (GogChartMap *map,
                                                 double x,
                                                 double y,
                                                 double *u,
                                                 double *v);
    GogAxisMap* gog_chart_map_get_axis_map      (GogChartMap *map,
                                                 unsigned int index);
    GogChartMapPolarData* gog_chart_map_get_polar_parms
                                                (GogChartMap *map);

## Description

## Details

### GogChartMap

    typedef struct _GogChartMap GogChartMap;

### GogChartMapPolarData

    typedef struct {
    	double cx, cy;
    	double rx, ry;
    	double th0, th1;
    } GogChartMapPolarData;

### gog_chart_map_new ()

    GogChartMap* gog_chart_map_new              (GogChart *chart,
                                                 GogViewAllocation const *area,
                                                 GogAxis *axis0,
                                                 GogAxis *axis1,
                                                 GogAxis *axis2,
                                                 gboolean fill_area);

Creates a new GogChartMap, used for conversion from data space to canvas space.

`chart` : | a GogChart
`area` : | area allocated to chart
`axis0` : | 1st dimension axis
`axis1` : | 2nd dimension axis
`axis2` : | 3rd dimension axis
`fill_area` : | does chart fill allocated area
Returns : | a new GogChart object.

### gog_chart_map_free ()

    void        gog_chart_map_free              (GogChartMap *map);

Frees `map` object.

`map` : | a GogChartMap

### gog_chart_map_is_valid ()

    gboolean    gog_chart_map_is_valid          (GogChartMap *map);

Tests if `map` was correctly initializied, i.e. if all associated axis_map are valid (see `gog_axis_map_is_valid()` ).

given to gog_chart_map_new.

`map` : | a GogChartMap
Returns : | `TRUE` if `map` is valid.

### gog_chart_map_2D_to_view ()

    void        gog_chart_map_2D_to_view        (GogChartMap *map,
                                                 double x,
                                                 double y,
                                                 double *u,
                                                 double *v);

Converts a 2D coordinate from data space to canvas space.

`map` : | a GogChartMap
`x` : | data x value
`y` : | data y value
`u` : | placeholder for x converted value
`v` : | placeholder for y converted value

### gog_chart_map_get_axis_map ()

    GogAxisMap* gog_chart_map_get_axis_map      (GogChartMap *map,
                                                 unsigned int index);

Convenience function which returns one of the associated axis_map.

Valid values are in range [0..2].

`map` : | a GogChartMap
`index` : | axis index
Returns : | a GogAxisMap.

### gog_chart_map_get_polar_parms ()

    GogChartMapPolarData* gog_chart_map_get_polar_parms
                                                (GogChartMap *map);

Convenience function for retrieving data related to polar plot layout.

`map` : | a GogChartMap
Returns : | a GogChartMapPolarData struct.