Name

place_chart -- Paint a chart to a page.

Synopsis

bool chart->place_chart ( int page, float left, float bottom, float width, float height[, string type] )

Description

This method places a chart on a page specified by page at the location specified by left and bottom of the size specified by width and height.

type is a symbolic name representing the type of chart to draw. Valid types are pie, 3dpie, bar, 3dbar, line, and 3dline. The default is line.

Examples

// set the background to dark green
$pdf->chart->setcolor('background', 0, .5, 0);
// Add a series
$p[] = 5;
$p[] = 10;
$p[] = 7;
$p[] = 3.2;
$pdf->chart->add_series('series 1', $p);
$pdf->chart->place_chart($page, 10, 10, 300, 200, 'line');

See Also

History

This function was added in version 2.1.

Bugs

Only line charts are supported at this time.