## GogErrorBar GogErrorBar — Error bars |

## Synopsis

    enum                GogErrorBarType;
    enum                GogErrorBarDisplay;
                        GogErrorBar;
    #define             GOG_ERROR_BAR_TYPE
    #define             GOG_ERROR_BAR                       (o)
    #define             IS_GOG_ERROR_BAR                    (o)
    GType               gog_error_bar_get_type              (void);
    GogErrorBar*        gog_error_bar_dup                   (GogErrorBar const *bar);
    gpointer            gog_error_bar_prefs                 (GogSeries *series,
                                                             char const *property,
                                                             gboolean horizontal,
                                                             GogDataAllocator *dalloc,
                                                             GOCmdContext *cc);
    gboolean            gog_error_bar_get_bounds            (const GogErrorBar *bar,
                                                             int index,
                                                             double *min,
                                                             double *max);
    void                gog_error_bar_get_minmax            (const GogErrorBar *bar,
                                                             double *min,
                                                             double *max);
    void                gog_error_bar_render                (const GogErrorBar *bar,
                                                             GogRenderer *rend,
                                                             GogAxisMap *x_map,
                                                             GogAxisMap *y_map,
                                                             double x,
                                                             double y,
                                                             double minus,
                                                             double plus,
                                                             gboolean horizontal);
    gboolean            gog_error_bar_is_visible            (GogErrorBar *bar);

## Object Hierarchy

      GObject
       +----GogErrorBar

## Implemented Interfaces

GogErrorBar implements GogPersist.

## Description

## Details

### enum GogErrorBarType

    typedef enum {
    	GOG_ERROR_BAR_TYPE_NONE,
    	GOG_ERROR_BAR_TYPE_ABSOLUTE,
    	GOG_ERROR_BAR_TYPE_RELATIVE,
    	GOG_ERROR_BAR_TYPE_PERCENT
    } GogErrorBarType;

### enum GogErrorBarDisplay

    typedef enum {
    	GOG_ERROR_BAR_DISPLAY_NONE,
    	GOG_ERROR_BAR_DISPLAY_POSITIVE,
    	GOG_ERROR_BAR_DISPLAY_NEGATIVE,
    	GOG_ERROR_BAR_DISPLAY_BOTH
    } GogErrorBarDisplay;

### GogErrorBar

    typedef struct _GogErrorBar GogErrorBar;

### GOG_ERROR_BAR_TYPE

    #define GOG_ERROR_BAR_TYPE		(gog_error_bar_get_type ())

### GOG_ERROR_BAR()

    #define GOG_ERROR_BAR(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), GOG_ERROR_BAR_TYPE, GogErrorBar))

`o` : |

### IS_GOG_ERROR_BAR()

    #define IS_GOG_ERROR_BAR(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), GOG_ERROR_BAR_TYPE))

`o` : |

### gog_error_bar_get_type ()

    GType               gog_error_bar_get_type              (void);

Returns : |

### gog_error_bar_dup ()

    GogErrorBar*        gog_error_bar_dup                   (GogErrorBar const *bar);

`bar` : |
Returns : |

### gog_error_bar_prefs ()

    gpointer            gog_error_bar_prefs                 (GogSeries *series,
                                                             char const *property,
                                                             gboolean horizontal,
                                                             GogDataAllocator *dalloc,
                                                             GOCmdContext *cc);

`series` : |
`property` : |
`horizontal` : |
`dalloc` : |
`cc` : |
Returns : |

### gog_error_bar_get_bounds ()

    gboolean            gog_error_bar_get_bounds            (const GogErrorBar *bar,
                                                             int index,
                                                             double *min,
                                                             double *max);

If the value correponding to `index` is valid, fills min and max with the error values: -> positive_error in `max`. -> negative_error in `min`. If one of the errors is not valid or not defined, its value is set to -1.0.

Return value : FALSE if the `bar->type` is GOG_ERROR_BAR_TYPE_NONE or if the value is not valid, TRUE otherwise.

`bar` : | A GogErrorBar
`index` : | the index corresponding to the value which error limits are
`min` : | where the minimum value will be stored
`max` : | where the maximum value will be stored
Returns : |

### gog_error_bar_get_minmax ()

    void                gog_error_bar_get_minmax            (const GogErrorBar *bar,
                                                             double *min,
                                                             double *max);

`bar` : |
`min` : |
`max` : |

### gog_error_bar_render ()

    void                gog_error_bar_render                (const GogErrorBar *bar,
                                                             GogRenderer *rend,
                                                             GogAxisMap *x_map,
                                                             GogAxisMap *y_map,
                                                             double x,
                                                             double y,
                                                             double minus,
                                                             double plus,
                                                             gboolean horizontal);

Displays the error bar. If `plus` is negative, the positive side of the bar is not displayed, and if `minus` is negative, the negative side of the bar is not displayed. x_map and y_map are used to convert coordinates from data space to canvas coordinates. This function must not be called if gog_error_bar_get_bounds returned FALSE.

`bar` : | A GogErrorBar
`rend` : | A GogRenderer
`x_map` : | A GogAxisMap for the x axis
`y_map` : | A GogAxisMap for the y axis
`x` : | x coordinate of the origin of the bar
`y` : | y coordinate of the origin of the bar
`minus` : | distance from the origin to the negative end of the bar
`plus` : | distance from the origin to the positive end of the bar
`horizontal` : | whether the bar is horizontal or not.

### gog_error_bar_is_visible ()

    gboolean            gog_error_bar_is_visible            (GogErrorBar *bar);

`bar` : |
Returns : |