## GogChart

GogChart — A set of axes and a collection of plots

## Synopsis

                        GogChart;
    GogAxisSet          gog_axis_set_from_str               (char const *str);
    gboolean            gog_chart_get_position              (GogChart const *chart,
                                                             unsigned *x,
                                                             unsigned *y,
                                                             unsigned *cols,
                                                             unsigned *rows);
    void                gog_chart_set_position              (GogChart *chart,
                                                             unsigned int x,
                                                             unsigned int y,
                                                             unsigned int cols,
                                                             unsigned int rows);
    gboolean            gog_chart_get_plot_area             (GogChart *chart,
                                                             GogViewAllocation *plot_area);
    void                gog_chart_set_plot_area             (GogChart *chart,
                                                             GogViewAllocation const *plot_area);
    void                gog_chart_request_cardinality_update
                                                            (GogChart *chart);
    void                gog_chart_get_cardinality           (GogChart *chart,
                                                             unsigned *full,
                                                             unsigned *visible);
    void                gog_chart_foreach_elem              (GogChart *chart,
                                                             gboolean only_visible,
                                                             GogEnumFunc handler,
                                                             gpointer data);
    GSList*             gog_chart_get_plots                 (GogChart const *chart);
    GogAxisSet          gog_chart_get_axis_set              (GogChart const *chart);
    gboolean            gog_chart_axis_set_is_valid         (GogChart const *chart,
                                                             GogAxisSet type);
    gboolean            gog_chart_axis_set_assign           (GogChart *chart,
                                                             GogAxisSet type);
    GSList*             gog_chart_get_axes                  (GogChart const *chart,
                                                             GogAxisType target);
    GogGrid*            gog_chart_get_grid                  (GogChart const *chart);

    GogViewAllocationconst * gog_chart_view_get_plot_area   (GogView const *view);

## Object Hierarchy

      GObject
       +----GogObject
             +----GogStyledObject
                   +----GogOutlinedObject
                         +----GogChart

## Properties

      "cardinality-valid"        gboolean              : Read
      "is-plot-area-manual"      gboolean              : Read / Write
      "plot-area"                gchar*                : Read / Write

## Description

## Details

### GogChart

    typedef struct _GogChart GogChart;

### gog_axis_set_from_str ()

    GogAxisSet          gog_axis_set_from_str               (char const *str);

`str` : |
Returns : |

### gog_chart_get_position ()

    gboolean            gog_chart_get_position              (GogChart const *chart,
                                                             unsigned *x,
                                                             unsigned *y,
                                                             unsigned *cols,
                                                             unsigned *rows);

`chart` : | const GogChart
`x` : |
`y` : |
`cols` : |
`rows` : |
Returns : | TRUE if the chart has been positioned.

### gog_chart_set_position ()

    void                gog_chart_set_position              (GogChart *chart,
                                                             unsigned int x,
                                                             unsigned int y,
                                                             unsigned int cols,
                                                             unsigned int rows);

`chart` : | GogChart
`x` : |
`y` : |
`cols` : |
`rows` : |

### gog_chart_get_plot_area ()

    gboolean            gog_chart_get_plot_area             (GogChart *chart,
                                                             GogViewAllocation *plot_area);

Stores plot area in plot_area, in fraction of chart size, and returns TRUE if plot area position is manual.

`chart` : | GogChart
`plot_area` : | GogViewAllocation
Returns : |

### gog_chart_set_plot_area ()

    void                gog_chart_set_plot_area             (GogChart *chart,
                                                             GogViewAllocation const *plot_area);

If plot_area != NULL, sets plot area size and location, in fraction of chart size, and sets GogChart::is_plot_area_manual flag to TRUE. If plot_area == NULL, sets GogChart::is_plot_area_manual to FALSE.

`chart` : | GogChart
`plot_area` : | GogViewAllocation

### gog_chart_request_cardinality_update ()

    void                gog_chart_request_cardinality_update
                                                            (GogChart *chart);

`chart` : |

### gog_chart_get_cardinality ()

    void                gog_chart_get_cardinality           (GogChart *chart,
                                                             unsigned *full,
                                                             unsigned *visible);

Update and cache cardinality values if required, and returns full and visible cardinality. Full cardinality is the number of chart elements that require a different style. Visible cardinality is the number of chart elements shown in chart legend.

`full` and `visible` may be NULL.

`chart` : | a GogChart
`full` : | placeholder for full cardinality
`visible` : | placeholder for visible cardinality

### gog_chart_foreach_elem ()

    void                gog_chart_foreach_elem              (GogChart *chart,
                                                             gboolean only_visible,
                                                             GogEnumFunc handler,
                                                             gpointer data);

`chart` : |
`only_visible` : |
`handler` : |
`data` : |

### gog_chart_get_plots ()

    GSList*             gog_chart_get_plots                 (GogChart const *chart);

`chart` : |
Returns : |

### gog_chart_get_axis_set ()

    GogAxisSet          gog_chart_get_axis_set              (GogChart const *chart);

`chart` : |
Returns : |

### gog_chart_axis_set_is_valid ()

    gboolean            gog_chart_axis_set_is_valid         (GogChart const *chart,
                                                             GogAxisSet type);

`chart` : |
`type` : |
Returns : |

### gog_chart_axis_set_assign ()

    gboolean            gog_chart_axis_set_assign           (GogChart *chart,
                                                             GogAxisSet type);

`chart` : |
`type` : |
Returns : |

### gog_chart_get_axes ()

    GSList*             gog_chart_get_axes                  (GogChart const *chart,
                                                             GogAxisType target);

`chart` : | GogChart
`target` : | GogAxisType
Returns : | a list which the caller must free of all axis of type `target` associated with `chart`.

### gog_chart_get_grid ()

    GogGrid*            gog_chart_get_grid                  (GogChart const *chart);

`chart` : | GogChart
Returns : | the grid associated with `chart` if one exists otherwise NULL.

### gog_chart_view_get_plot_area ()

    GogViewAllocationconst * gog_chart_view_get_plot_area   (GogView const *view);

`view` : |
Returns : |

## Property Details

### The `"cardinality-valid"` property

      "cardinality-valid"        gboolean              : Read

Is the charts cardinality currently valid.

Default value: FALSE

### The `"is-plot-area-manual"` property

      "is-plot-area-manual"      gboolean              : Read / Write

Is plot area manual.

Default value: FALSE

### The `"plot-area"` property

      "plot-area"                gchar*                : Read / Write

Position and size of plot area, in percentage of chart size.

Default value: "0 0 1 1"