Changeset 85
- Timestamp:
- 06/01/07 02:27:19 (5 years ago)
- File:
-
- 1 edited
-
openweather/graph.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
openweather/graph.php
r84 r85 278 278 //print "set $set<BR>"; 279 279 //expand_pre($this->calculated['y_plot']); 280 281 foreach ($this->x_data as $ index => $x) {282 280 $index = -1; 281 foreach ($this->x_data as $x) { 282 $index++; 283 283 284 284 //print "index $index<BR>"; … … 722 722 723 723 // calculate y coords for plotting data 724 foreach ($this->x_data as $index => $x) { 724 $index = -1; 725 foreach ($this->x_data as $x) { 726 $index++; 725 727 $this->calculated['y_plot'][$set][$index] = $this->y_data[$set][$index]; 726 728 … … 1060 1062 $data = $this->x_data; 1061 1063 for ($i=0; $i < $this->calculated['x_axis']['num_ticks']; $i++) { 1064 $key = key($data); 1062 1065 $value = array_shift($data); // grab value from begin of array 1066 if (is_numeric($key)) $key = $value; 1063 1067 $this->calculated['x_axis']['data'][$i] = $value; 1064 $this->calculated['x_axis']['text'][$i] = $ value; // raw data and text are both the same in this case1068 $this->calculated['x_axis']['text'][$i] = $key; // raw data and text are both the same in this case 1065 1069 $size = $this->get_boundaryBox( 1066 1070 array('points' => $axis_size, … … 1068 1072 'angle' => $axis_angle, 1069 1073 'colour' => $axis_colour, 1070 'text' => $ value));1074 'text' => $key)); 1071 1075 $this->calculated['x_axis']['boundary_box'][$i] = $size; 1072 1076 if ($size['height'] > $this->calculated['x_axis']['boundary_box_max']['height'])
Note: See TracChangeset
for help on using the changeset viewer.
