views:

535

answers:

1

Hi all,

I'm using Open flash chart to display some graphical data in my web page. I would like to change the appearance of the Graph now. I want to change the background color of the graph. I could not find any CSS file in the download. Can any one tell me where I should change the color? Thanks in advance

A: 

Assuming you're using PHP, you can set the background colour (note the UK spelling!) as follows:

$chart = new open_flash_chart();
$chart->set_title( "my chart" );
$chart->add_element( $bar );
$chart->set_bg_colour( '#FFFFFF' );

http://teethgrinder.co.uk/open-flash-chart-2/background.php

Alternatively, if you're fiddling with the raw JSON, set the bg_colour element at the top level:

{
  "elements": [
    { "type": "bar", "values": [ 1, 2, 3 ] } 
  ],
  "title": {
    "text": "my chart" 
  },
  "bg_colour": "#FFFFFF" 
}
therefromhere