Method Graphics.Graph.check_mapping()
- Method
check_mapping
mapping(string:mixed) check_mapping(mapping(string:mixed)diagram_data,stringtype)- 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":mixedDefault: "linear"
Will be set to "2D" for pie below Only "linear" works for now.
"tone":mixedDefault: 0
If present a Pie-chart will be toned.
"3Ddepth":mixedDefault: 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":mixedDefault: 10
The size of the text. Default is 10.
"graphlinewidth":mixedDefault: 1.0
Width of the lines that draws data in Graph and line. Default is 1.0
"labelsize":mixedDefault: same as fontsize
The size of the text for labels.
"legendfontsize":mixedDefault: same as fontsize
The size of the text for the legend.
"legend_texts":mixedDefault: 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":intDefault: 100
X-size of the graph in pixels.
"ysize":intDefault: 100
Y-size of the graph in pixels.
"image":mixedDefault: 0
An image that the graph will be drawn on.
"legendcolor":mixedDefault: 0
The color of the text in the legend. Default is?
"legendimage":mixedDefault: 0
I have no idea.
"bgcolor":mixedDefault: 0
The bakground-color. If the the background is a image this color is used for antialias the texts.
"gbimage":mixedDefault: 0
Some sort of image...
"axcolor":mixedDefault: ({0,0,0})
The color of the axis.
"datacolors":mixedDefault: 0
An array of colors for the datasets.
"backdatacolors":mixedDefault: 0
An array of color that do something...
"textcolor":mixedDefault: ({0,0,0})
Color of the text. Default is black.
"labelcolor":mixedDefault: 0
Color of the labeltexts.
"orient":stringDefault: "hor"
Can be "hor" or "vert". Orientation of the graph.
"linewidth":mixedDefault: 0
Width of lines (the axis and their like).
"backlinewidth":mixedDefault: 0
Width of the outline-lines. Default is 0.
"vertgrid":mixedDefault: 0
If the vertical grid should be present.
"horgrid":mixedDefault: 0
If the horizontal grid should be present.
"gridwidth":mixedDefault: 0
Width of the grid. Default is linewidth/4.
"rotate":mixedDefault: 0
How much a the Pie in a Pie-shart should be rotated in degrees.
"center":mixedDefault: 0
Makes the first Pie-slice be centered.
"bw":mixedDefault: 0
Draws the graph black and white.
"eng":mixedDefault: 0
Writes the numbers in eng format.
"neng":mixedDefault: 0
Writes the numbers in engformat except for 0.1 < x < 1.0
"xmin":mixedDefault: 0
Where the X-axis should start. This will be overrided by datavalues.
"ymin":mixedDefault: 0
Where the Y-axis should start. This will be overridden by datavalues.
"name":mixedDefault: 0
A string with the name of the graph that will be written at top of the graph.
"namecolor":mixedDefault: 0
The color of the name.
"font":mixedDefault: Image.Font()
The font that will be used.
"gridcolor":mixedDefault: ({0,0,0}
The color of the grid. Default is black.