4 * A private class. All the other line-dots inherit from this.
5 * Gives them all some common methods.
11 * @param $value integer
13 function dot_base($type, $value=null)
17 $this->value( $value );
21 * For line charts that only require a Y position
23 * @param $value as integer, the Y position
25 function value( $value )
27 $this->value
= $value;
31 * For scatter charts that require an X and Y position for
34 * @param $x as integer
35 * @param $y as integer
37 function position( $x, $y )
44 * @param $colour is a string, HEX colour, e.g. '#FF0000' red
46 function colour($colour)
48 $this->colour
= $colour;
53 * The tooltip for this dot.
55 function tooltip( $tip )
62 * @param $size is an integer. Size of the dot.
74 function type( $type )
81 * @param $size is an integer. The size of the hollow 'halo' around the dot that masks the line.
83 function halo_size( $size )
91 * @param $do as string. One of three options (examples):
92 * - "http://example.com" - browse to this URL
93 * - "https://example.com" - browse to this URL
94 * - "trace:message" - print this message in the FlashDevelop debug pane
95 * - all other strings will be called as Javascript functions, so a string "hello_world"
96 * will call the JS function "hello_world(index)". It passes in the index of the
99 function on_click( $do )
109 class hollow_dot
extends dot_base
111 function hollow_dot($value=null)
113 parent
::dot_base( 'hollow-dot', $value );
120 class star
extends dot_base
123 * The constructor, takes an optional $value
125 function star($value=null)
127 parent
::dot_base( 'star', $value );
131 * @param $angle is an integer.
133 function rotation($angle)
135 $this->rotation
= $angle;
140 * @param $is_hollow is a boolean.
142 function hollow($is_hollow)
144 $this->hollow
= $is_hollow;
149 * Draw a 'bow tie' shape.
151 class bow
extends dot_base
154 * The constructor, takes an optional $value
156 function bow($value=null)
158 parent
::dot_base( 'bow', $value );
162 * Rotate the anchor object.
163 * @param $angle is an integer.
165 function rotation($angle)
167 $this->rotation
= $angle;
173 * An <i><b>n</b></i> sided shape.
175 class anchor
extends dot_base
178 * The constructor, takes an optional $value
180 function anchor($value=null)
182 parent
::dot_base( 'anchor', $value );
186 * Rotate the anchor object.
187 * @param $angle is an integer.
189 function rotation($angle)
191 $this->rotation
= $angle;
196 * @param $sides is an integer. Number of sides this shape has.
198 function sides($sides)
200 $this->sides
= $sides;
208 class dot
extends dot_base
211 * The constructor, takes an optional $value
213 function dot($value=null)
215 parent
::dot_base( 'dot', $value );
222 class solid_dot
extends dot_base
225 * The constructor, takes an optional $value
227 function solid_dot($value=null)
229 parent
::dot_base( 'solid-dot', $value );