Hi, i am a developer. While working on a project, i faced an issue related with creating Bar graph
and Pie Chart in development forum. I hope any tech developer can help me in resolving the issue.
That’s really not very explanatory, @Ashish_Bisht. Please describe the exact issue you have, and explain what help you need.
You should also post all relevant code here. You can highlight your code, then use the </> button in the editor window, which will format it, or you can place three backticks ``` (top left key on US/UK keyboards) on a line before your code, and three on a line after your code.
Your question consists of two parts,
- How to create a PDF in PHP
- How to create a bar or pie chart in PHP.
For the first one the answer is MPDF. Just create a regular HTML page, including images, CSS and stuff. And then feed it to MPDF to create a pdf file. As simple as that.
While if you want to add some charts in that HTML file, you can use PChart.
So just create your charts using pchart, saving them in local files, then create HTML with img tags, linking to these files, and feed this HTML to MPDF to get the beautiful pdf file.
the above two libraries is all you need.
Thanks colshrapnel for valuable suggestion
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.