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

Can't cut and paste displayed chart #21

Open
joezabel opened this issue Jan 30, 2018 · 1 comment
Open

Can't cut and paste displayed chart #21

joezabel opened this issue Jan 30, 2018 · 1 comment

Comments

@joezabel
Copy link

I recently implemented a graphviz chart web application using graphvizwrapper. It works quite well. The only issue is that, on the displayed webpage, I cannot copy and paste the chart picture to an outlook email or other applications. This is a function I'd very much like to have.

Below is the code I used to build the chart:

static public string GraphVizFun (string DotFile)
{
var getStartProcessQuery = new GetStartProcessQuery();
var getProcessStartInfoQuery = new GetProcessStartInfoQuery();
var registerLayoutPluginCommand = new RegisterLayoutPluginCommand(getProcessStartInfoQuery, getStartProcessQuery);

        // GraphGeneration can be injected via the IGraphGeneration interface

        var wrapper = new GraphGeneration(getStartProcessQuery,
                                          getProcessStartInfoQuery,
                                          registerLayoutPluginCommand);
        
        byte[] output = wrapper.GenerateGraph(DotFile, Enums.GraphReturnType.Png);

        var picture = string.Format("data:image/png;base64,{0}", Convert.ToBase64String(output));

        return picture;
    }
@joezabel
Copy link
Author

Clarifying further: it does let me download the chart as a .png file. It would simply be more convenient if I could copy and paste using the clipboard, like I can for other graphics on web pages.

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

1 participant