Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for the -y flag #170

Open
AviSarmani opened this issue Apr 29, 2022 · 2 comments
Open

Add support for the -y flag #170

AviSarmani opened this issue Apr 29, 2022 · 2 comments

Comments

@AviSarmani
Copy link

AviSarmani commented Apr 29, 2022

Hi,
I need to add a functionality to use the "-y" flag which inverts the axis as documented here:
https://graphviz.org/doc/info/command.html#-y

I added the command to the "cmd" clause while debugging and looks like it works.

If I want to create a PR for it, do we want to go along the design of:
#131
which means adding another optional parameter?

Thanks in advance.

@AviSarmani AviSarmani changed the title Add support for the -n flag Add support for the -y flag Apr 29, 2022
@xflr6
Copy link
Owner

xflr6 commented May 11, 2022

Thanks. Can you maybe provide more detail about the use case, e.g. an example (IIUC this flag is only relevant for rendering into plain-text formats: I am wondering what the remainder of the pipeline looks like or what typical use cases for these formats are)?

+1, the first thing that comes to mind would be another optional parameter.

@AviSarmani
Copy link
Author

Hi,
Our use case is that the graph was being rendered on the FE via viz.js but they were getting memory dumps with big graphs so we're transferring the graphviz part to the BE.
The specific call that they were making was:
this.viz.renderString(dot, { engine: 'dot', format: 'json', yInvert: true })
so I needed to add the corresponding -y flag on our BE call as well.

I've forked the project, added the flag and updated the existing tests to run correctly.
The fork works on our system correctly as it produces the same result without memory exhaustion.

This is the fork:
master...Datricks:add_axis_invert_support

I would love to open a PR but I haven't added unit testing on the new feature yet.
Do we have a guide or can I have some guidance on how(and where) to add the necessary tests?

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

No branches or pull requests

2 participants