-
Notifications
You must be signed in to change notification settings - Fork 26
Usage Documentation
CS Goh edited this page Nov 18, 2022
·
29 revisions
To be added soon
from generator.roadmap import Roadmap
from generator.timelinemode import TimelineModemy_roadmap = Roadmap(width=500, height=300)In the Roadmap constructor method, specify the roadmap canvas size. The measurement is in pixel.
my_roadmap.set_title("My Roadmap")
my_roadmap.set_timeline(mode=TimelineMode.MONTHLY, start="2022-11-14", number_of_items=6)-
Call set_title() method to specify the text to be displayed as title
my_roadmap.set_title( text="My Roadmap", font="Arial", font_size=18, font_colour="Black")
-
Call set_timeline() method to configure the roadmap timeline. The timeline changes depending on the mode, start date and number of items to be display on the canvas. Additional parameters can be passed in to configure the font, font size, font colour and fill colour.
my_roadmap.set_timeline( mode=TimelineMode.MONTHLY, start="2022-11-14", number_of_items=6, font="Arial", font_size=10, font_colour="Black", fill_colour="Ligthgrey")
font_colour and fill_colour support web colour name (e.g. Red) or hex code (e.g. #FF0000)
group = my_roadmap.add_group("Development")
task = group.add_task("Activity 1", "2022-12-01", "2023-02-10") You can add more tasks by calling add_task() method multiple time.
group.add_task("Activity 2", "2023-01-11", "2023-03-20")
group.add_task("Activity 3", "2023-01-21", "2023-06-30")my_roadmap.set_footer("Generated by Roadmap Generator")my_roadmap.draw()my_roadmap.save("my_roadmap.png")