Method Graphics.Graph.check_mapping()


Method check_mapping

mapping(string:mixed) check_mapping(mapping(string:mixed) diagram_data, string type)

Description

This function sets all unset elements in diagram_data to its default value as well as performing some simple sanity checks. This function is called from within pie, bars, sumbars, line, norm and graph.

Parameter diagram_data
"drawtype" : mixed

Default: "linear"

Will be set to "2D" for pie below Only "linear" works for now.

"tone" : mixed

Default: 0

If present a Pie-chart will be toned.

"3Ddepth" : mixed

Default: 10

How much 3D-depth a graph will have in pixels Default is 10.

"data" : array(array(float))

Default: ({({1.0}), ({2.0}), ({4.0})})

Will be set to something else with graph An array of arrays. Each array describing a data-set. The graph-function however should be fed with an array of arrays with X,Y-pairs. Example: ({({1.0, 2.0, 3.0}),({1.2, 2.2, 3.8})}) draws stuff in yellow with the values (1.0, 2.0, 3.0), and (1.2, 2.2, 3.8) in blue.

"labels" : array(string)

Default: 0

Should have four elements ({xquantity, yquantity, xunit, yunit}). The strings will be written on the axes.

"xnames" : array(string)

Default: 0

An array(string) with the text that will be written under the X-axis. This should be the same size as sizeof(data).

"ynames" : array(string)

Default: 0

An array(string) with the text that will be written to the left of the Y-axis.

"fontsize" : mixed

Default: 10

The size of the text. Default is 10.

"graphlinewidth" : mixed

Default: 1.0

Width of the lines that draws data in Graph and line. Default is 1.0

"labelsize" : mixed

Default: same as fontsize

The size of the text for labels.

"legendfontsize" : mixed

Default: same as fontsize

The size of the text for the legend.

"legend_texts" : mixed

Default: 0

The texts that will be written the legend.

"values_for_xnames" : array(float)

Default: 0

An array(float) that describes where the ynames should be placed. The numbers are like the data-numbers. Default is equally distributed.

"values_for_ynames" : array(float)

Default: 0

An array(float) that describes where the ynames should be placed. The numbers are like the data-numbers. Default is equally distributed.

"xsize" : int

Default: 100

X-size of the graph in pixels.

"ysize" : int

Default: 100

Y-size of the graph in pixels.

"image" : mixed

Default: 0

An image that the graph will be drawn on.

"legendcolor" : mixed

Default: 0

The color of the text in the legend. Default is?

"legendimage" : mixed

Default: 0

I have no idea.

"bgcolor" : mixed

Default: 0

The bakground-color. If the the background is a image this color is used for antialias the texts.

"gbimage" : mixed

Default: 0

Some sort of image...

"axcolor" : mixed

Default: ({0,0,0})

The color of the axis.

"datacolors" : mixed

Default: 0

An array of colors for the datasets.

"backdatacolors" : mixed

Default: 0

An array of color that do something...

"textcolor" : mixed

Default: ({0,0,0})

Color of the text. Default is black.

"labelcolor" : mixed

Default: 0

Color of the labeltexts.

"orient" : string

Default: "hor"

Can be "hor" or "vert". Orientation of the graph.

"linewidth" : mixed

Default: 0

Width of lines (the axis and their like).

"backlinewidth" : mixed

Default: 0

Width of the outline-lines. Default is 0.

"vertgrid" : mixed

Default: 0

If the vertical grid should be present.

"horgrid" : mixed

Default: 0

If the horizontal grid should be present.

"gridwidth" : mixed

Default: 0

Width of the grid. Default is linewidth/4.

"rotate" : mixed

Default: 0

How much a the Pie in a Pie-shart should be rotated in degrees.

"center" : mixed

Default: 0

Makes the first Pie-slice be centered.

"bw" : mixed

Default: 0

Draws the graph black and white.

"eng" : mixed

Default: 0

Writes the numbers in eng format.

"neng" : mixed

Default: 0

Writes the numbers in engformat except for 0.1 < x < 1.0

"xmin" : mixed

Default: 0

Where the X-axis should start. This will be overrided by datavalues.

"ymin" : mixed

Default: 0

Where the Y-axis should start. This will be overridden by datavalues.

"name" : mixed

Default: 0

A string with the name of the graph that will be written at top of the graph.

"namecolor" : mixed

Default: 0

The color of the name.

"font" : mixed

Default: Image.Font()

The font that will be used.

"gridcolor" : mixed

Default: ({0,0,0}

The color of the grid. Default is black.