Skip to content

feat: add export() method for PNG/SVG/PDF diagram output - #46

Open
dharapandya85 wants to merge 2 commits into
kathan-majithia:mainfrom
dharapandya85:feature/export-diagram
Open

feat: add export() method for PNG/SVG/PDF diagram output#46
dharapandya85 wants to merge 2 commits into
kathan-majithia:mainfrom
dharapandya85:feature/export-diagram

Conversation

@dharapandya85

Copy link
Copy Markdown

solves #21
this PR does:

  • refractor display_network() and generate_gantt_chart() to extract figure-building logic into _build_network_figure() and _build_gantt_figure() private builders
  • add export supporting .png, .svg, and .pdf
  • PDF exports both charts as separate pages in one file

@dharapandya85

Copy link
Copy Markdown
Author

@kathan-majithia , please review.

@kathan-majithia

Copy link
Copy Markdown
Owner

Great @dharapandya85, but why two gantt charts are exported ?

Also keep the logic simple, like what to export and in what format to export in export() or save() function.

@dharapandya85

Copy link
Copy Markdown
Author

@kathan-majithia , removed gantt exports, and in export function, used ext variable which is checking for png, svg and pdf format, and one else-if chain, to save these formats in network or gant figures, what do you think about this, please share your opinion, would modify accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants