
Untitled
By: a guest on
Jul 15th, 2012 | syntax:
None | size: 1.47 KB | hits: 17 | expires: Never
send javascript function in PHP to be formatted as JSON (highcharts)
$chartOptions = array(
"chart"=> array(
//chart type
"type" => "bar",
"spacingBottom" => 25
),
"height"=>1,
"title" => array(
"text" => $spm->getFullName()
),
exporting: {
buttons: {
exportButton: {
menuItems: [{
text: 'Export to PNG (with text)',
onclick: function() {
this.exportChart({},{
labels: {
items:[{
html: "System: x.x.x, Date/Time: 30:05:2012 14:32:00",
style: {
left: '50%',
top: '250px'
}
}]
}
});
}
}, {
text: 'Export to PNG (default)',
onclick: function() {
this.exportChart();
}
},
null,
null
]
}
}
}
$chartOptions = array(
"chart"=> array(
//chart type
"type" => "bar",
"spacingBottom" => 25
),
"height"=>1,
"title" => array(
"text" => $spm->getFullName()
),
"exporting" => "buttons" =>