Allows users to set an inner background with a gradient
The configurable settings for this are the same as those on http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/Graphics.html#beginGradientFill%28%29 except that the rotation is in degrees not radians. colour1 - Start colour :: no default/required colour2 - End colour :: no default/required angle - angle to rotate the direction of the gradient :: default - 90 fillType - linear or radial :: default - linear ratio - steepness/spread of the gradient (see Flash link above for examples) :: default - array(0,255) alpha - Alpha settings for each of the colours :: default - array(1,1)
{ "elements": [ { "type": "line", "values": [ 7, 6, 5, 4, 3, 2, 1 ], "dot-style": { "type": "dot", "colour": "#0000ff" }, "text": "Germany" } ], "title": { "text": "Test Graph" }, "legend": { "visible": true }, "inner_bg_grad": { "alpha": [ 1, 1 ], "ratio": [ 0, 255 ], "angle": 90, "fillType": "linear", "colour1": "#ff0000", "colour2": "#ffff00" } }
$chart = new open_flash_chart(); $data_1 = array(7,6,5,4,3,2,1); $title = new title( "Test Graph" ); $line_1_default_dot = new dot(); $line_1_default_dot->colour('#0000ff'); $line_1 = new line(); $line_1->set_default_dot_style($line_1_default_dot); $line_1->set_values( $data_1 ); $line_1->set_text( "Germany" ); $chart = new open_flash_chart(); $chart->set_title( $title ); $chart->add_element( $line_1 ); $legend = new legend(); $legend->set_visible(true); $chart->set_legend( $legend ); $background = new inner_bg_grad(); $background->set_colour1('#ff0000'); $background->set_colour2('#ffff00'); $chart->set_inner_bg_grad( $background ); echo $chart->toPrettyString();