open OFC

let () =
  let b1 = new_bar_elem() in
  bar_elem_set_legend b1 "Page views";
  bar_elem_set_colour b1 "#9933CC";
  bar_elem_set_alpha b1 0.6;
  bar_elem_set_font_size b1 10;
  bar_elem_add_ints b1 [9; 6; 7; 9; 5; 7; 6; 9; 11];


  let b2 = new_bar_elem() in
  bar_elem_set_legend b2 "Page views 2";
  bar_elem_set_colour b2 "#CC9933";
  bar_elem_set_alpha b2 0.6;
  bar_elem_set_font_size b2 10;
  bar_elem_add_ints b2 [6; 7; 9; 5; 7; 6; 9; 7; 3];


  let c = new_chart() in
  chart_set_bg_colour c "#FFFFD0";
  chart_set_title c ~style:"font-size:16px; font-family:Verdana; color:#404550;"
                    "My Bar Chart";
  (*
  chart_add_element c b1;
  chart_add_element c b2;
  *)
  chart_add_elements c [Bar b1; Bar b2];
  chart_set_y_legend c
      ~style:"color: #736AFF; font-size: 12px;"
      "Open Flash Chart";
  let labels = new_labels
    ["January";"February";"March";"April";"May";"June";"July";"August";"September"] in
  chart_set_x_axis c ~labels ();
  chart_set_y_axis c ~max:14 ();
  chart_set_tooltip c ~shadow:false ~stroke:5
      ~colour:"#00d000" ~background:"#d0d0ff"
      ~title:"font-size:14px; color:#905050;"
      ~body:"font-size:10px; font-weight:bold; color:#9090ff;" ();
  print_chart c;
;;