open-flash-chart

第三方flash图形库,php,js,asp等可以直接调用

http://teethgrinder.co.uk/open-flash-chart/

 使用中出现过的错误总结:

1.    flash文件路径不对

function open_flash_chart_object( $width, $height, $url, $use_swfobject=true, $base=” ){}

该函数默认flash文件是根目录,如果要引用,必须写到$base中

2.    数据文件路径不对

数据文件注意文件名中的下划线和中划线之分

  //数据文件中可以自定义的参数:

  $this->data_sets = array();

  $this->data = array();
  $this->links = array();
  $this->width = 250;
  $this->height = 200;
  $this->js_path = 'js/';
  $this->swf_path = '';
  $this->x_labels = array();
  $this->y_min = '';
  $this->y_max = '';
  $this->x_min = '';
  $this->x_max = '';
  $this->y_steps = '';
  $this->title = '';
  $this->title_style = '';
  $this->occurence = 0;

  $this->x_offset = '';

  $this->x_tick_size = -1;

  $this->y2_max = '';
  $this->y2_min = '';

  // GRID styles:
  $this->x_axis_colour = '';
  $this->x_axis_3d = '';
  $this->x_grid_colour = '';
  $this->x_axis_steps = 1;
  $this->y_axis_colour = '';
  $this->y_grid_colour = '';
  $this->y2_axis_colour = '';

  // AXIS LABEL styles:         
  $this->x_label_style = '';
  $this->y_label_style = '';
  $this->y_label_style_right = '';

  // AXIS LEGEND styles:
  $this->x_legend = '';
  $this->x_legend_size = 20;
  $this->x_legend_colour = '#000000';

  $this->y_legend = '';
  $this->y_legend_right = '';
  //$this->y_legend_size = 20;
  //$this->y_legend_colour = '#000000';

  $this->lines = array();
  $this->line_default['type'] = 'line';
  $this->line_default['values'] = '3,#87421F';
  $this->js_line_default = 'so.addVariable("line","3,#87421F");';

  $this->bg_colour = '';
  $this->bg_image = '';

  $this->inner_bg_colour = '';
  $this->inner_bg_colour_2 = '';
  $this->inner_bg_angle = '';

  // PIE chart ------------
  $this->pie = '';
  $this->pie_values = '';
  $this->pie_colours = '';
  $this->pie_labels = '';

  $this->tool_tip = '';

  // which data lines are attached to the
  // right Y axis?
  $this->y2_lines = array();

  // Number formatting:
  $this->y_format='';
  $this->num_decimals='';
  $this->is_fixed_num_decimals_forced='';
  $this->is_decimal_separator_comma='';
  $this->is_thousand_separator_disabled='';

  $this->output_type = '';

  //
  // set some default value incase the user forgets
  // to set them, so at least they see *something*
  // even is it is only the axis and some ticks
  //
  $this->set_y_min( 0 );
  $this->set_y_max( 20 );
  $this->set_x_axis_steps( 1 );
  $this->y_label_steps( 5 );