Line | |
---|
1 | <?php
|
---|
2 |
|
---|
3 | class scatter_value
|
---|
4 | {
|
---|
5 | function scatter_value( $x, $y, $dot_size=-1 )
|
---|
6 | {
|
---|
7 | $this->x = $x;
|
---|
8 | $this->y = $y;
|
---|
9 |
|
---|
10 | if( $dot_size > 0 )
|
---|
11 | {
|
---|
12 | $tmp = 'dot-size';
|
---|
13 | $this->$tmp = $dot_size;
|
---|
14 | }
|
---|
15 | }
|
---|
16 | }
|
---|
17 |
|
---|
18 | class scatter
|
---|
19 | {
|
---|
20 | function scatter( $colour )
|
---|
21 | {
|
---|
22 | $this->type = "scatter";
|
---|
23 | $this->set_colour( $colour );
|
---|
24 | }
|
---|
25 |
|
---|
26 | function set_colour( $colour )
|
---|
27 | {
|
---|
28 | $this->colour = $colour;
|
---|
29 | }
|
---|
30 |
|
---|
31 | function set_default_dot_style( $style )
|
---|
32 | {
|
---|
33 | $tmp = 'dot-style';
|
---|
34 | $this->$tmp = $style;
|
---|
35 | }
|
---|
36 |
|
---|
37 | /**
|
---|
38 | * @param $v as array, can contain any combination of:
|
---|
39 | * - integer, Y position of the point
|
---|
40 | * - any class that inherits from scatter_value
|
---|
41 | * - <b>null</b>
|
---|
42 | */
|
---|
43 | function set_values( $values )
|
---|
44 | {
|
---|
45 | $this->values = $values;
|
---|
46 | }
|
---|
47 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.