GooData Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
enum GooAxisType; struct GooAxis; struct GooAxisClass; GooAxis * goo_axis_new (,
GooCanvasItem *Parent,
GooCanvasItem *BackGooAxisType Modus
,,
gchar *Text...
);void goo_axis_get_grid_properties (GooAxis *Axis
,...
);void goo_axis_get_subticks_properties (GooAxis *Axis
,...
);void goo_axis_get_text_properties (GooAxis *Axis
,...
);void goo_axis_get_ticks_properties (GooAxis *Axis
,...
);void goo_axis_set_grid_properties (GooAxis *Axis
,...
);void goo_axis_set_subticks_properties (GooAxis *Axis
,...
);void goo_axis_set_text_properties (GooAxis *Axis
,...
);void goo_axis_set_ticks_properties (GooAxis *Axis
,...
);
"format"gchar : Read / Write "logbasis"gdouble : Read / Write "offset"gchar : Write "offset-across"gdouble : Read / Write "offset-along"gdouble : Read / Write "range"gchar : Read / Write "subticks"guint : Read / Write "text"gchar : Read / Write "text-align"PangoAlignment : Read / Write "text-offset"gdouble : Read / Write "tick-angle"gdouble : Read / Write "tick-length"gchar : Read / Write "tick-offset"gdouble : Read / Write "ticks"gchar : Read / Write
GooAxis is a subclass of goo_canvas_item_raise()
goo_canvas_item_rotate()
Setting a style property on a GooAxis will affect all children of the GooAxis (unless the children override the property setting).
The GooAxis group contains these childs:
a
a
a
three
To create a GooAxis use goo_axis_new()
.
To set or get individual properties for the childs use the functions goo_axis_[get|set]_XYZ_properties with XYZ for grid, ticks, subticks and text (ticklabels). The remaining items (label and base line) are contolled directly by the GooAxis properties.
Position and length of the axis are connected to the background box.
Also the transformation matrix of the background box is applied to
the GooAxis. Note: it's not supported to move the background box
after creating the GooAxis. Instead put the background box and the
GooAxis in to a
typedef enum { GOO_AXIS_WEST, GOO_AXIS_SOUTH, GOO_AXIS_EAST, GOO_AXIS_NORTH, GOO_GRIDAXIS_WEST, GOO_GRIDAXIS_SOUTH, GOO_GRIDAXIS_EAST, GOO_GRIDAXIS_NORTH, } GooAxisType;
Enum values used for goo_axis_new()
, to specify the position and the
type of the axis.
the axis is on the left of the background box | |
the axis is below the background box | |
the axis is on the right of the background box | |
the axis is above the background box | |
the axis is on the left of the background box and grid line are drawn in the background box | |
the axis is below the background box and grid line are drawn in the background box | |
the axis is on the right of the background box and grid line are drawn in the background box | |
the axis is above the background box and grid line are drawn in the background box |
GooAxis * goo_axis_new (,
GooCanvasItem *Parent,
GooCanvasItem *BackGooAxisType Modus
,,
gchar *Text...
);
Creates a new axis item.
|
the parent item, or NULL g_object_unref() |
|
the background box to connect the axis to (a |
|
the position and type as a GooAxisType value (like GOO_AXIS_SOUTH
or GOO_GRIDAXIS_SOUTH , ...) |
|
the label text for the axis. You can use Pango markup language to format the text. |
|
optional pairs of property names and values, and a terminating NULL |
Returns : |
a new axis item. [transfer full] |
Since 0.0
void goo_axis_get_grid_properties (GooAxis *Axis
,...
);
Get one or more properties of the
|
a GooAxis |
|
optional pairs of property names and values, and a terminating NULL |
Since 0.0
void goo_axis_get_subticks_properties (GooAxis *Axis
,...
);
Get one or more properties of the
|
a GooAxis |
|
optional pairs of property names and values, and a terminating NULL |
Since 0.0
void goo_axis_get_text_properties (GooAxis *Axis
,...
);
Get one or more properties of the
|
a GooAxis |
|
optional pairs of property names and values, and a terminating NULL |
Since 0.0
void goo_axis_get_ticks_properties (GooAxis *Axis
,...
);
get one or more properties of the
|
a GooAxis |
|
optional pairs of property names and values, and a terminating NULL |
Since 0.0
void goo_axis_set_grid_properties (GooAxis *Axis
,...
);
Set one or more properties for the
|
a GooAxis |
|
optional pairs of property names and values, and a terminating NULL |
Since 0.0
void goo_axis_set_subticks_properties (GooAxis *Axis
,...
);
Set one or more properties for the
|
a GooAxis |
|
optional pairs of property names and values, and a terminating NULL |
Since 0.0
void goo_axis_set_text_properties (GooAxis *Axis
,...
);
Set one or more properties for the
|
a GooAxis |
|
optional pairs of property names and values, and a terminating NULL |
Since 0.0
"format"
property"format"gchar : Read / Write
The format for the tick labels (defaults to "%g" if "format" is
NULL
goo_axis_set_text_properties()
.
Default value: NULL
Since 0.0
"logbasis"
property"logbasis"gdouble : Read / Write
The basis of an logarithmic scale for the axis (or 0.0 for linear scale). When a basis is set and the "ticks" property has no or one value, then the autoscale function will set ticks with an exponential increase for the given base. If more than one value is set in the "ticks" property the ticks will be set as defined there.
Allowed values: >= 0
Default value: 0
Since 0.0
"offset"
property"offset"gchar : Write
The offset between the background box and the axis base line (and all elements of the axis). By default the baseline is placed at the border of the background box. This may contain
no value for default (equals to "0 0"). Example "" or NULL
one value for additional distance in outward direction. Example: "10"
two values for outward and sideward distance. Example: "10 -7.5"
The offset can be used to draw more than one axis at the same position.
In case of syntax 3 the axis gets a 3D style, A positive second value
will move a horizontal axis
to the right and a vertical axis downwards. Additional lines between the
axis ticks and the corresponding position at the background box are drawn.
These lines are in the ticks group, their style can be changed by
goo_axis_set_ticks_properties()
.
Default value: NULL
Since 0.0
"offset-across"
property"offset-across"gdouble : Read / Write
The distance between the axis and the background item across the axis direction.
Default value: 0
"offset-along"
property"offset-along"gdouble : Read / Write
The distance between the axis and the background item along the axis direction.
Default value: 0
"range"
property"range"gchar : Read / Write
The borders of the axis (or NULL
no value (the axis is unscaled, the values in Dat
will be spread
equidistantly in the given order along the axis).
one value to scale the axis from zero to a positive value or from a negative value to zero.
two values for the left (down) and the right (up) border. The left value may be greater than the right value to scale in reverse order.
Default value: NULL
Since 0.0
"subticks"
property"subticks"guint : Read / Write
The number of subticks between the main ticks. Ie a value of 1 adds one subtick.
Allowed values: <= 9
Default value: 0
Since 0.0
"text"
property"text"gchar : Read / Write
The label text to use at the axis (or NULL
Default value: NULL
Since 0.0
"text-align"
property"text-align"PangoAlignment : Read / Write
The allignment for the label text as
a
Default value: PANGO_ALIGN_CENTER
Since 0.0
"text-offset"
property"text-offset"gdouble : Read / Write
Additional space between the tick labels and the axis text. By default the text is placed next to the tick labels. A positiv "text-offset" adds some space in outward direction. A negativ value will move the text towards the background box.
Default value: 0
Since 0.0
"tick-angle"
property"tick-angle"gdouble : Read / Write
The rotation of the tick texts at the axis. By default the text is placed in horizontal direction for all axis positions. Using this property the text can be rotated, ie to get more space for the tick labels. A positive value rotates counterclockwise. For small and big "tick-angle" values the tick line is connected to the edge of the text. In case of medium-sized "tick-angle" values the tick line is connected to the corner of the text.
Allowed values: [-90,90]
Default value: 0
Since 0.0
"tick-length"
property"tick-length"gchar : Read / Write
The length of the tick lines at the axis (or NULL
no value for default (8 units in outward direction, 0 units in inward
direction). Example: NULL
one value for the tick length in outward direction. Example: "15" for tick lines with a length of 15 units in outward direction.
two values for the tick length in outward and inward direction. Example: "8 0" for the default value mentioned above.
Default value: NULL
Since 0.0
"tick-offset"
property"tick-offset"gdouble : Read / Write
Additional space between the ticks and the tick labels. By default the tick labels are placed next to the ticks. A positiv "tick-offset" adds some space in outward direction. A negativ value will move the tick labels towards the background box.
Default value: 0
Since 0.0
"ticks"
property"ticks"gchar : Read / Write
Where to set ticks at the axis (or NULL
no value for autoscale.
The autoscale function calculates the values for the ticks based
on the axis length and the maximum space needed by the left and
the right border tick
labels in the current font. Example: "" or NULL
one value for the distance of the ticks (ignored when "logbasis" != 0.0). Example: "0.5" will set ticks at 0, 0.5, 1, 1.5, ...
two or more values to specify the tick positions. The positions may be unequal spaced. Example: "-1 1 3 7.5"
pairs of a value and a corresponding text in braces. The text will be set at the position instead of the value. Example: "1{small} 3{middle} 6{large}"
Ticks will be labeled with the value unless syntax 4 is used. To set the label format use "format".
Default value: "0"
Since 0.0