This is a gantt chart drawing library
Project description
elegantt
Overview
elegantt is gantt chart drawing library designed for developers and project managers who need to visualize project timeline efficiently. With support for both CSV and Mermaid formats. elegantt provides the flexibility and functionality you need to keep your projects on task.
Features
- Simpe and intuitive API
- Supports both CSV and Mermaid Gantt chart formats
- customizable chat size and colors
- Command line interface for quick usage
- Cross-platform support
Installation
Install elegantt via pip:
pip install elegantt
Fonts Installation
To ensure proper rendering of text, install the necessary fonts:
on Ubuntsu
apt install fonts-noto-cjk
on RedHat/RockyLinux
yum install google-noto-sans-cjk-ttc-fonts.noarch
Usage
Command Line interface
Generate a Gantt chart from CSV file:
eletentt sample.csv
CSV Format Example
2023-01-01,2023-01-04,Task 1
2023-01-02,2023-01-05,Task 2
2023-01-04,2023-01-06,Task 3
generate a Gantt chart from a Mermaid format:
eletentt sample_mermaid.txt
Mermaid Format Example
gantt
section task a
task b :active, des2, 2024-05-20, 4d
task c : des3, after des2, 7d
generate a Gantt chart from a Mermaid format:
eletentt sample_markdown.md
Markdown Format Example
|2024-06-15|2024-06-18|task a|
|2024-06-20|2d |task b|
|3d | |task c|
As a library
integrate elegantt into your python projects for advanced usage:
import elegantt
# Define chart properties
chartsize = (720,320)
bgcolor = (255,255,255)
# Create a Gant chart object
gchart = elegantt.EleGantt( chartsize, bgcolor, today="2019-10-15")
# Draw calendar and campains
gchart.draw_calendar()
gchart.draw_campain("2019-10-15","2019-10-18","Task 1")
gchart.draw_campain("2019-10-20","2019-10-23","Task 2")
gchart.draw_campain("2019-10-24","2019-10-30","Task 3")
gchart.save("gantt_chart.png")
or auto_draw for mermaid or markdown format
import elegantt
s = """
task a :done, des1, 2024-06-15, 2024-06-18
task b :active, des2, 2024-06-20, 2d
task c : des3, after des2, 3d
"""
gchart = elegantt.EleGantt(today="2024-06-18")
gchart.auto_draw(s, mode="mermaid")
gchart.save("gantt_chart.png")
If you want to specify fonts, write set_font()
before draw_calendar()
or auto_draw()
.
import elegantt
s = """
task a :done, des1, 2024-06-15, 2024-06-18
task b :active, des2, 2024-06-20, 2d
task c : des3, after des2, 3d
"""
gchart = elegantt.EleGantt(today="2024-06-18")
gchart.set_font("C:\Windows\Fonts\meiryo.ttc")
gchart.auto_draw(s, mode="mermaid")
gchart.save("gantt_chart.png")
Lisence
This project is licensed under the MIT License, see the LICENSE.txt file for details
Contributing
We welcome contributions!
Support
For support or any questions, feel free to open an issue on our Github page.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file elegantt-0.0.7.tar.gz
.
File metadata
- Download URL: elegantt-0.0.7.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54989bccf960b49750218c2d4f666f474bdac17032631c3b47e4af24380e9347 |
|
MD5 | 6eac4d880d7a8c7cd8b3d1b8762d3530 |
|
BLAKE2b-256 | b76243b554211cf061fe6940c93e260825209be072f9b8b1bf0b5b696ff17ee0 |
File details
Details for the file elegantt-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: elegantt-0.0.7-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6394f1d56c21f10afce3180c5944dfb02df2fc879816b2dad21c012f2cb36ea |
|
MD5 | 4c430c0b53e5d3335e25b031bd20dfd2 |
|
BLAKE2b-256 | 97040aa173fad179153b5877ef839928114616670c95a913f12a35cb20bb2171 |