From 393580e6a4a10bd9b92e3b82d628eb31c3517ae0 Mon Sep 17 00:00:00 2001 From: Avik Sarkar Date: Wed, 12 Apr 2023 13:31:17 +0600 Subject: [PATCH] DOC: Chart Using PyGal added (#762) --- CHANGELOG.md | 3 ++ docs/Maths.md | 101 +++++++++++++++++++++++++++++++++++++ docs/pygal_chart.png | Bin 0 -> 44455 bytes docs/pygal_chart_cairo.PNG | Bin 0 -> 55405 bytes 4 files changed, 104 insertions(+) create mode 100644 docs/pygal_chart.png create mode 100644 docs/pygal_chart_cairo.PNG diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d6647870..e58921fa4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,9 @@ This can also be enabled programmatically with `warnings.simplefilter('default', ## [2.7.4] - Not released yet +### Added +- documentation on how to embed `graphs` and `charts` generated using `Pygal` lib: [documentation section](https://pyfpdf.github.io/fpdf2/Maths.html#using-pygal) - thanks to @ssavi-ict + ## [2.7.3] - 2023-04-03 ### Fixed - removed a debug `print()` statement left in `output.py:OutputProducer._add_fonts()` 🤦‍♂️ - A rule was also added to `.pre-commit-config.yaml` to avoid this to happen again. diff --git a/docs/Maths.md b/docs/Maths.md index 0a707b09a..de59c6df5 100644 --- a/docs/Maths.md +++ b/docs/Maths.md @@ -226,6 +226,107 @@ Result: ![](plotly_svg.png) +## Using Pygal ## +[Pygal](https://www.pygal.org/en/stable/) is a graph plotting library using Python. You can install Pygal using `pip install pygal` command. + +`fpdf2` is able to embed the graph and charts that are generated using `Pygal` library. The following ways explain how to embed `Pygal` charts into `fpdf2` library. However, we can not embed graphs as SVG directly. Since, `Pygal` introduces `