Sets the width of the stroke used to draw arrows. However due to the nature of the api the barb size also has to be set (standard is 10).
{ "elements": [ { "type": "line", "values": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ] }, { "type": "arrow", "start": { "x": 8, "y": 5 }, "end": { "x": 8, "y": 8 }, "colour": "#ff0000", "barb-length": 10, "stroke": 3 }, { "type": "arrow", "start": { "x": 6, "y": 3 }, "end": { "x": 6, "y": 6 }, "colour": "#00ff00", "barb-length": 20, "stroke": 1 }, { "type": "arrow", "start": { "x": 4, "y": 1 }, "end": { "x": 4, "y": 4 }, "colour": "#0000ff", "barb-length": 10, "stroke": 1 } ] }
$chart = new open_flash_chart(); $line_dot = new line(); $line_dot->set_values( array(0,1,2,3,4,5,6,7,8,9,10)); $chart->add_element( $line_dot ); $a = new ofc_arrow(8, 5, 8, 8, '#ff0000', 10, 3); $chart->add_element( $a ); $a = new ofc_arrow(6, 3, 6, 6, '#00ff00', 20, 1); $chart->add_element( $a ); $a = new ofc_arrow(4, 1, 4, 4, '#0000ff', 10, 1); $chart->add_element( $a ); echo $chart->toPrettyString();