github graphieros/vue-data-ui v3.3.0

12 hours ago

New SVG export feature #256

image

This feature is now enabled by default on all svg charts.

To disable it from the config:

const config = ref({
  userOptions: {
    buttons: {
      svg: false,
    }
  }
})

To rename the label:

const config = ref({
  userOptions: {
    buttonTitles: {
      svg: 'Download SVG',
    }
  }
})

As for other export methods, a callback is available which returns the dataUrl, should you wish to plug your own SVG export thing instead of the default download:

const config = ref({
  userOptions: {
    callbacks: {
      svg: ({ dataUrl, blob, text, url }) => {
        console.log(dataUrl)
      }
    }
  }
})

Important: the downloaded svg will render system fonts

New svg icon usable in VueUiIcon

<VueUiIcon name="svg"/>

Docs are up to date

Don't miss a new vue-data-ui release

NewReleases is sending notifications on new releases.