What are the potential pitfalls when using the render() and stroke() methods in the pChart library for image output?
One potential pitfall when using the render() and stroke() methods in the pChart library for image output is that the stroke() method may not work properly if it is called before the render() method. To solve this issue, make sure to call the render() method first before calling the stroke() method to ensure that the image is properly rendered before any additional styling is applied.
// Create pChart object
$chart = new pChart(800, 400);
// Render the chart
$chart->render();
// Apply styling to the chart
$chart->setShadow();
// Stroke the chart
$chart->stroke();