open-free-chart 1.9.6测试
发布时间:2020-12-15 06:22:26 所属栏目:百科 来源:网络整理
导读:1.测试对象open-free-chart 1.9.6 2.展示页 ?phpinclude_once 'ofc-library/open_flash_chart_object.php';open_flash_chart_object( 500,250,'http://'. $_SERVER['SERVER_NAME'] .'/1.9.6/data-13u.php',false );? 3.数据页 ?php// generate some random d
1.测试对象open-free-chart 1.9.6
2.展示页 <?php include_once 'ofc-library/open_flash_chart_object.php'; open_flash_chart_object( 500,250,'http://'. $_SERVER['SERVER_NAME'] .'/1.9.6/data-13u.php',false ); ?> 3.数据页 <?php // generate some random data srand((double)microtime()*1000000); // // NOTE: how we are filling 3 arrays full of data,// one for each line on the graph // $data_1 = array(); $data_2 = array(); $data_3 = array(); for( $i=0; $i<12; $i++ ) { $data_1[] = rand(14,19); $data_2[] = rand(8,13); $data_3[] = rand(1,7); } include_once( 'ofc-library/open-flash-chart.php' ); $g = new graph(); $g->title( 'Many data lines测试','{font-size: 20px; color: #736AFF}' ); // we add 3 sets of data: $g->set_data( $data_1 ); $g->set_data( $data_2 ); $g->set_data( $data_3 ); // we add the 3 line types and key labels $g->line( 2,'0x9933CC','Page views',10 ); $g->line_dot( 3,5,'0xCC3399','Downloads',10); // <-- 3px thick + dots $g->line_hollow( 2,4,'0x80a033','Bounces',10 ); $g->set_x_labels( array( 'January','February','March','April','May','June','July','August','Spetember','October','November','December' ) ); $g->set_x_label_style( 10,'0x000000',2 ); $g->set_y_max( 20 ); $g->y_label_steps( 4 ); $g->set_y_legend( 'Open Flash Chart',12,'#736AFF' ); echo $g->render(); ?> 4.中文乱码解决方法 展示页和代码页的文件存储格式统一使用utf-8后 展示页标题的中文正常 5.效果 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |