## GogSeries GogSeries — A single data series. |

## Functions

void | gog_series_check_validity ()
GogSeriesElement * | gog_series_get_element ()
GogSeriesFillType | gog_series_get_fill_type ()
GogSeriesFillType | gog_series_get_fill_type_from_combo ()
GogDataset * | gog_series_get_interpolation_params ()
GOData * | gog_series_get_name ()
GList const * | gog_series_get_overrides ()
GogPlot * | gog_series_get_plot ()
unsigned | gog_series_get_xy_data ()
unsigned | gog_series_get_xyz_data ()
gboolean | gog_series_has_legend ()
gboolean | gog_series_is_valid ()
int | gog_series_map_XL_dim ()
unsigned | gog_series_num_elements ()
void | gog_series_populate_fill_type_combo ()
void | gog_series_set_XL_dim ()
void | gog_series_set_dim ()
void | gog_series_set_fill_type ()
void | gog_series_set_index ()
void | gog_series_set_name ()

## Properties

gchar * | fill-type | Read / Write
gboolean | has-legend | Read / Write
gchar * | interpolation | Read / Write
gboolean | interpolation-skip-invalid | Read / Write
gint | index | Read / Write

## Types and Values

| GogSeries
| GogSeriesClass
| GogSeriesDesc
| GogSeriesDimDesc
enum | GogDimType
enum | GogMSDimType
| GogSeriesElement
| GogSeriesElementClass
enum | GogSeriesPriority
enum | GogSeriesFillType

## Object Hierarchy

        GObject
        ╰── GogObject
            ╰── GogStyledObject
                ├── GogSeries
                ╰── GogSeriesElement

## Implemented Interfaces

GogSeries implements GOStyledObject and GogDataset.

GogSeriesElement implements GOStyledObject.

## Description

A GogSeries represents a data series that can be added to a GogPlot.

## Functions

### gog_series_check_validity ()

    void
    gog_series_check_validity (GogSeries *series);

Updates the is_valid flag for a series. This is an internal utility that should not really be necessary for general usage.

#### Parameters

series | GogSeries |

### gog_series_get_element ()

    GogSeriesElement *
    gog_series_get_element (GogSeries const *series,
                            int index);

#### Parameters

series | GogSeries |
index | the element index |

#### Returns

the GogSeriesElement corresponding to `index` if any.

[transfer none]

### gog_series_get_fill_type ()

    GogSeriesFillType
    gog_series_get_fill_type (GogSeries const *series);

#### Returns

### gog_series_get_fill_type_from_combo ()

    GogSeriesFillType
    gog_series_get_fill_type_from_combo (GogSeries const *series,
                                         GtkComboBox *combo);

#### Returns

### gog_series_get_interpolation_params ()

    GogDataset *
    gog_series_get_interpolation_params (GogSeries const *series);

Only constrained cubic spline interpolation use parameters (for the slopes at each end).

#### Parameters

series | GogSeries |

#### Returns

the interpolation parameters.

[transfer none]

### gog_series_get_name ()

    GOData *
    gog_series_get_name (GogSeries const *series);

Gets the _source_ of the name associated with the series. NOTE : this is _NOT_ the actual name.

#### Parameters

series | a GogSeries |

#### Returns

a GODataScalar, without added reference.

[transfer none]

### gog_series_get_overrides ()

    GList const  	 *
    gog_series_get_overrides (GogSeries const *series);

Overrides are data owning their own style, overriding the series style.

#### Parameters

series | GogSeries |

#### Returns

the series overrides.

[element-type GogSeriesElement][transfer none]

### gog_series_get_plot ()

    GogPlot *
    gog_series_get_plot (GogSeries const *series);

#### Parameters

series | GogSeries |

#### Returns

the possibly NULL plot that contains this series.

[transfer none]

### gog_series_get_xy_data ()

    unsigned
    gog_series_get_xy_data (GogSeries const *series,
                            double const **x,
                            double const **y);

#### Returns

### gog_series_get_xyz_data ()

    unsigned
    gog_series_get_xyz_data (GogSeries const *series,
                             double const **x,
                             double const **y,
                             double const **z);

#### Returns

### gog_series_has_legend ()

    gboolean
    gog_series_has_legend (GogSeries const *series);

#### Parameters

series | GogSeries |

#### Returns

TRUE if the series has a visible legend entry

### gog_series_is_valid ()

    gboolean
    gog_series_is_valid (GogSeries const *series);

#### Parameters

series | GogSeries |

#### Returns

the current cached validity. Does not recheck

### gog_series_map_XL_dim ()

    int
    gog_series_map_XL_dim (GogSeries const *series,
                           GogMSDimType ms_type);

#### Returns

### gog_series_num_elements ()

    unsigned
    gog_series_num_elements (GogSeries const *series);

#### Parameters

series | GogSeries |

#### Returns

the number of elements in the series

### gog_series_populate_fill_type_combo ()

    void
    gog_series_populate_fill_type_combo (GogSeries const *series,
                                         GtkComboBox *combo);

### gog_series_set_XL_dim ()

    void
    gog_series_set_XL_dim (GogSeries *series,
                           GogMSDimType ms_type,
                           GOData *val,
                           GError **err);

### gog_series_set_dim ()

    void
    gog_series_set_dim (GogSeries *series,
                        int dim_i,
                        GOData *val,
                        GError **err);

Absorbs a ref to `val`

#### Parameters

series | GogSeries |
dim_i | Which dimension |
val | GOData. | [transfer full]
err | optional GError pointer. | [allow-none]

### gog_series_set_fill_type ()

    void
    gog_series_set_fill_type (GogSeries *series,
                              GogSeriesFillType fill_type);

### gog_series_set_index ()

    void
    gog_series_set_index (GogSeries *series,
                          int ind,
                          gboolean is_manual);

If `ind` >= 0 attempt to assign the new index. Auto indicies (`is_manual` == FALSE) will not override the current index if it is manual. An `index` < 0, will reset the index to automatic and potentially queue a revaluation of the parent chart's cardinality.

#### Parameters

series | GogSeries |
ind | = 0 assigns a new index, < 0 resets to auto |
is_manual | gboolean |

### gog_series_set_name ()

    void
    gog_series_set_name (GogSeries *series,
                         GODataScalar *name_src,
                         GError **err);

Absorbs a ref to `name_src` .

#### Parameters

series | a GogSeries |
name_src | a GODataScalar. | [transfer full]
err | a GError |

## Types and Values

### GogSeries

    typedef struct _GogSeries GogSeries;

### GogSeriesClass

    typedef struct {
    	GogStyledObjectClass base;

    	gboolean		 has_interpolation;
    	gboolean		 has_fill_type;

    	GogSeriesFillType const *valid_fill_type_list;

    	GType			 series_element_type;

    	/* Virtuals */
    	void        (*dim_changed) (GogSeries *series, int dim_i);
    	unsigned    (*get_xy_data) (GogSeries const *series,
    	                            double const **x, double const **y);
    	GogDataset *(*get_interpolation_params) (GogSeries const *series);
    } GogSeriesClass;

#### Members

GogStyledObjectClass `base`; |  |
gboolean `has_interpolation`; | supports interpolation. |
gboolean `has_fill_type`; | `TRUE` if filling is supported. |
GogSeriesFillType const *`valid_fill_type_list`; | list of supported GogSeriesFillType values. |
GType `series_element_type`; | GType for the series element if supported. |
`dim_changed` () | called when data changed for the series. |
`get_xy_data` () | get X and Y data. |
`get_interpolation_params` () | get interpolation parameters if any, only applies to constrained cubic spline interpolation. |

### GogSeriesDesc

    typedef struct {
    	unsigned style_fields;
    	unsigned num_dim;
    	GogSeriesDimDesc const *dim;
    } GogSeriesDesc;

#### Members

GogSeriesDimDesc const *`dim`; | dimensions descriptions. |

### GogSeriesDimDesc

    typedef struct {
    	char const *name;
    	GogSeriesPriority priority;
    	gboolean		is_shared;
    	GogDimType		val_type;
    	GogMSDimType		ms_type;
    } GogSeriesDimDesc;

#### Members

char const *`name`; | name. |
GogSeriesPriority `priority`; | priority. |
gboolean `is_shared`; | whether the dimension is shared among the series. |
GogDimType `val_type`; | data type. |
GogMSDimType `ms_type`; | data type for foreign formats. |

### enum GogDimType

Data types for plots.

#### Members

GOG_DIM_INVALID | invalid should not occur. |
GOG_DIM_LABEL | labels. |
GOG_DIM_INDEX | indices. |
GOG_DIM_VALUE | vector of values. |
GOG_DIM_MATRIX | matrix of values. |
GOG_DIM_TYPES | should not occur. |

### enum GogMSDimType

Data types classed according to what they become when exported to foreign formats.

#### Members

GOG_MS_DIM_LABELS | labels. |
GOG_MS_DIM_VALUES | values. |
GOG_MS_DIM_CATEGORIES | categories. |
GOG_MS_DIM_BUBBLES | bubble values. |
GOG_MS_DIM_TYPES | maximum value known by MS, should not occur. |
GOG_MS_DIM_ERR_plus1 | positive erros on first dimension, we made it up. |
GOG_MS_DIM_ERR_minus1 | negative erros on first dimension, we made it up. |
GOG_MS_DIM_ERR_plus2 | positive erros on second dimension, we made it up. |
GOG_MS_DIM_ERR_minus2 | negative erros on second dimension, we made it up |
GOG_MS_DIM_START | start value, we made it up for dropbars. |
GOG_MS_DIM_END | end value, we made it up for dropbars. |
GOG_MS_DIM_LOW | low value, we made it up for hi-lo. |
GOG_MS_DIM_HIGH | high value, we made it up for hi-lo. |
GOG_MS_DIM_EXTRA1 | we made it up for other uses. |
GOG_MS_DIM_EXTRA2 | we made it up for other uses. |

### GogSeriesElement

    typedef struct _GogSeriesElement GogSeriesElement;

### GogSeriesElementClass

    typedef struct {
    	GogStyledObjectClass base;

    	/* Virtuals */
    	gpointer (*gse_populate_editor) (GogObject *gobj,
    					 GOEditor *editor,
    					 GOCmdContext *cc);
    } GogSeriesElementClass;

#### Members

GogStyledObjectClass `base`; |  |
`gse_populate_editor` () | populates editor. |

### enum GogSeriesPriority

Applies to data declarations in GogSeriesDimDesc.

#### Members

GOG_SERIES_REQUIRED | it must be there. |
GOG_SERIES_SUGGESTED | allocator will fill it in, but use need not. |
GOG_SERIES_OPTIONAL | optional data. |
GOG_SERIES_ERRORS | optional data for error bars. |

### enum GogSeriesFillType

#### Members

GOG_SERIES_FILL_TYPE_Y_ORIGIN | from origin ox the X-axis. |
GOG_SERIES_FILL_TYPE_X_ORIGIN | from the origin of the Y-axis |
GOG_SERIES_FILL_TYPE_BOTTOM | from the chart bottom. |
GOG_SERIES_FILL_TYPE_LEFT | from the chart left side. |
GOG_SERIES_FILL_TYPE_TOP | from the chart top. |
GOG_SERIES_FILL_TYPE_RIGHT | , from the chart right side. |
GOG_SERIES_FILL_TYPE_ORIGIN | from the origin (for radar and polar plots). |
GOG_SERIES_FILL_TYPE_CENTER | from the center (for radar and polar plots). |
GOG_SERIES_FILL_TYPE_EDGE | from the edge (for radar and polar plots). |
GOG_SERIES_FILL_TYPE_SELF | close the series curve and fills it. |
GOG_SERIES_FILL_TYPE_NEXT | from next series. |
GOG_SERIES_FILL_TYPE_X_AXIS_MIN | from X-axis minimum. |
GOG_SERIES_FILL_TYPE_X_AXIS_MAX | from X-axis maximum. |
GOG_SERIES_FILL_TYPE_Y_AXIS_MIN | from Y-axis minimum. |
GOG_SERIES_FILL_TYPE_Y_AXIS_MAX | from Y-axis maximum. |
GOG_SERIES_FILL_TYPE_INVALID | invalid, should not happen. |

## Property Details

### The `“fill-type”` property

      “fill-type”                gchar *

How to fill the area.

Flags: Read / Write

Default value: "invalid"

### The `“has-legend”` property

      “has-legend”               gboolean

Should the series show up in legends.

Flags: Read / Write

Default value: TRUE

### The `“interpolation”` property

      “interpolation”            gchar *

Type of line interpolation.

Flags: Read / Write

Default value: "linear"

### The `“interpolation-skip-invalid”` property

      “interpolation-skip-invalid” gboolean

Should the series interpolation ignore the invalid data.

Flags: Read / Write

Default value: FALSE

### The `“index”` property

      “index”                    gint

Index of the corresponding data element.

Flags: Read / Write

Allowed values: >= 0

Default value: 0