Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 15th, 2012  |  syntax: None  |  size: 1.47 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. send javascript function in PHP to be formatted as JSON (highcharts)
  2. $chartOptions = array(
  3.         "chart"=> array(
  4.             //chart type
  5.             "type" => "bar",
  6.                     "spacingBottom" => 25
  7.         ),
  8.         "height"=>1,
  9.         "title" => array(
  10.             "text" => $spm->getFullName()
  11.         ),
  12.        
  13. exporting: {
  14.     buttons: {
  15.         exportButton: {
  16.             menuItems: [{
  17.                 text: 'Export to PNG (with text)',
  18.                 onclick: function() {
  19.                     this.exportChart({},{
  20.                         labels: {
  21.                             items:[{
  22.                                 html: "System: x.x.x, Date/Time: 30:05:2012 14:32:00",
  23.                                 style: {
  24.                                     left: '50%',
  25.                                     top: '250px'
  26.                                 }                                            
  27.                             }]
  28.                         }
  29.                     });
  30.                 }
  31.             }, {
  32.                 text: 'Export to PNG (default)',
  33.                 onclick: function() {
  34.                     this.exportChart();
  35.                 }
  36.             },
  37.             null,
  38.             null
  39.             ]
  40.         }
  41.     }
  42. }
  43.        
  44. $chartOptions = array(
  45.     "chart"=> array(
  46.         //chart type
  47.         "type" => "bar",
  48.         "spacingBottom" => 25
  49.      ),
  50.     "height"=>1,
  51.     "title" => array(
  52.         "text" => $spm->getFullName()
  53.     ),
  54.     "exporting" => "buttons" =>