PHP diagram, what to do with

Source: Internet
Author: User
Tags parse error
PHP Chart
legend.php file
Include ' d:\\xampp\\htdocs\\php-ofc-library\\open-flash-chart.php ';
$year = Array ();
$price = Array ();
$year [] = ' 1983 ';
$price [] = 36.7;
$year [] = ' 1984 ';
$price [] = 38.7;
$year [] = ' 1985 ';
$price [] = 42.8;
$year [] = ' 1986 ';
$price [] = 38.2;
$year [] = ' 1987 ';
$price [] = 37.8;
$year [] = ' 1988 ';
$price [] = 34.7;
$year [] = ' 1989 ';
$price [] = 38.4;
$year [] = ' 1990 ';
$price [] = 40.2;
$year [] = ' 1991 ';
$price [] = 39.5;
$year [] = ' 1992 ';
$price [] = 40.3;
$year [] = ' 1993 ';
$price [] = 45.9;
$year [] = ' 1994 ';
$price [] = 48.9;
$year [] = ' 1995 ';
$price [] = 50.9;
$year [] = ' 1996 ';
$price [] = 52.9;
$year [] = ' 1997 ';
$price [] = 57.9;
$year [] = ' 1998 ';
$price [] = 60.9;
$year [] = ' 1999 ';
$price [] = 61.9;
$year [] = ' 2000 ';
$price [] = 76.9;
$year [] = ' 2001 ';
$price [] = 77.9;
$year [] = ' 2002 ';
$price [] = 69.9;
$year [] = ' 2003 ';
$price [] = 77.9;
$year [] = ' 2004 ';
$price [] = 77.9;
$year [] = ' 2005 ';
$price [] = 79.9;
$year [] = ' 2006 ';
$price [] = 88.9;
$year [] = ' 2007 ';
$price [] = 87.9;
$year [] = ' 2008 ';
$price [] = 103.9;
$chart = new Open_flash_chart ();
$title = new title (' UK Petrol price (pence) per litre ');
$title->set_style ("{font-size:20px; Color: #A2ACBA; Text-align:center;} ");
$chart->set_title ($title);
$area = new Area ();
$area->set_colour (' #5B56B6 ');
$area->set_values ($price);
$area->set_key (' price ', 12);
$chart->add_element ($area);
$x _labels = new X_axis_labels ();
$x _labels->set_steps (2);
$x _labels->set_vertical ();
$x _labels->set_colour (' #A2ACBA ');
$x _labels->set_labels ($year);
$x = new X_axis ();
$x->set_colour (' #A2ACBA ');
$x->set_grid_colour (' #D7E4A3 ');
$x->set_offset (FALSE);
$x->set_steps (4); ADD The x axis Labels to the X axis
$x->set_labels ($x _labels);
$chart->set_x_axis ($x); Look://
$x _legend = new X_legend (' 1983 to 2008 ');
$x _legend->set_style (' {font-size:20px; color: #778877} ');
$chart->set_x_legend ($x _legend); Remove this if the Y Axis is smarter//
$y = new Y_axis ();
$y->set_range (0, 150, 30);
$chart->add_y_axis ($y);
echo $chart->toprettystring ();
Json_encode ($year);
Json_encode ($price);
?>

test.html file









Hello World




Developed with Eclipse PDT, run-time prompt
Open Flash Chart
JSON Parse Error [Syntax ERROR]
Error at character 0, line 1:
0: Php XAMPP Eclipse

Share to:

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.