This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ $now = time(); require "chart/chart.php"; $chart = new chart(640, 480); $chart->set_margins(60, 10, 10, 46); $chart->set_expired(true); $chart->set_x_ticks(1, "ctime"); $chart->set_labels("Time", "Vote sum"); $chart->set_extrema(-1, 1); $start = $graph[0][0]; $end = $graph[count($graph) - 1][0]; function separate_xy($points) { $xs = array(); $ys = array(); foreach ($points as $point) { $xs[] = $point[0]; $ys[] = $point[1]; } return array($xs, $ys); }