Skip to content

Copy download graph as PNG #2325

Closed

Description

@gameroman

Describe the feature

Similarly to existing Download as PNG I think it would be useful to have Copy as PNG

I think this would be useful when you quickly want to copy a PNG of the graph without having to download a file on your device

Additional information

  • Would you be willing to help implement this feature?

Final checks

Activity

  1. graphieros commented on Mar 30, 2026

    @graphieros
    Member

    @gameroman

    Some information regarding feasibility with the current state of the vue-data-ui library:

    There is only one slot available for the download png action. I'm not sure yet if I'm going to add another slot just for copy, knowing that the same can be used in this case, but would force us to decide if we prefer either to copy or to download. I think for npmx it would make sense to have the copy png action instead of the download. I would however keep the svg download action as is.

    To replace the 'download png' action by a 'copy png' action:

    1. In the configuration object of the charts, userOptions.callbacks.img will have to be modified to copy instead of downloading

    2. In the #optionImg slot of the charts, used to customise the related icon, a similar approach as the one used for the #optionAltCopy slot could be used to signal copy success or error.

    3. The translation provided in the config under userOptions.buttonTitles.img should be updated (by the way, fix: typo in chart config attribute #2328 solved a typo in FacetBarChart)

    4. These changes should be reflected in all chart components with this action:

    • TrendsChart.vue
    • VersionDistribution.vue
    • FacetBarChart.vue

    PS. If a hack exists to have both, feel free to propose ;)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontFrontend, Design

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions