Big Faceless Graph Library 2.3 Tag Documentation - Copyright © 2006 Big Faceless Organization

line

Description

The "line" tag can be used inside a series to add a marker line to the graph, such as a horizontal or vertical line running across the whole graph. This tag is useful for adding supplementary data to a graph, but for whole datasets a lineseries is more useful.

It can also be used inside a piegraph, in which case the "x" and "y" values are relative to the center of the graph. The default radius of the pie is 100. Date values cannot be specified for a lines inside a piegraph.

Examples

Example: Draw a dashed horizontal line across the whole graph
<axesgraph width="300" height="300">
  <barseries name="Fruit">
    <data x="apples" y="20" />
    <data x="oranges" y="17" />
    <line y="15" dash="5,5" />
  </barseries>
</axesgraph>
Example: Draw a line on the graph connecting the top of the two bars
<axesgraph width="300" height="300">
  <barseries name="Fruit">
    <data x="apples" y="20" />
    <data x="oranges" y="17" />
    <line x1="0" y1="20" x2="1" y2="17" />
  </barseries>
</axesgraph>
Example: Draw a horizontal line from the top of the piegraph and extending right
<piegraph width="300" height="300">
  <data name="apples" value="20" />
  <data name="oranges" value="40" />
  <line x1="0" y1="100" x2="50" y2="100" />
</piegraph>

Attributes

x1 Real or Date optional XML / Tag Library

Description

The x1 attribute specifies the first X co-ordinate of the line. If not set the default (for axesgraphs) is the left hand side of the graph.
y1 Real or Date optional XML / Tag Library

Description

The y1 attribute specifies the first Y co-ordinate of the line. If not set the default (for axesgraphs) is the bottom of the graph.
x2 Real or Date optional XML / Tag Library

Description

The x2 attribute specifies the second X co-ordinate of the line. If not set the default (for axesgraphs) is the right hand side of the graph.
y2 Real or Date optional XML / Tag Library

Description

The y2 attribute specifies the second Y co-ordinate of the line. If not set the default (for axesgraphs) is the top of the graph.
x Real or Date optional XML / Tag Library

Description

The "x" attribute can be used to set "x1" and "x2" simultaneously.
y Real or Date optional XML / Tag Library

Description

The "y" attribute can be used to set "y1" and "y2" simultaneously.
name String optional XML / Tag Library

Description

Every item in the graph may have a "name", which is how it appears in the Key (if listed) and for some items, how it's refered to in JavaScript. The name is required for Series and optional for other items like markers.
color Paint optional XML / Tag Library

Description

The paint to use as the fill color for the specified object
bordercolor Color optional XML / Tag Library

Description

The color to use as the border color for the specified object. May be "none" to not draw a border for this object.
linethickness Real > 0 optional XML / Tag Library

Description

The thickness to draw the borders for this object, except for lineseries and functionseries objects when the graph is being drawn in 2D, in which case this attribute, as you would expect, sets the thickness of the lines.
dash Real[] optional XML / Tag Library

Description

The dashing pattern to use to draw the borders for this object (for 2D lineseries this functions the same as the linethickness attribute). An even number of parameters that are > 0 must be specified, where the first in each pair is the length of the dash, the second is the length of the space. Examples would be dash="5,5" to create a regular dash pattern, or dash="6,2,2,2" to create a dash/dot type pattern.
overflow Boolean optional XML / Tag Library

Description

If overflow is set to true, the item which it refers to will not play a part in the sizing algorithm used to ensure the graph fits the image: the item may overflow the edge of the graph. This makes sense only in a few situations, eg markers, lines and sometimes text, and should be used with caution.
Big Faceless Graph Library 2.3 Tag Documentation - Copyright © 2006 Big Faceless Organization