Results 1 to 5 of 5

Thread: Export chart object to SVG string

  1. #1

    Join Date
    Jun 2016
    Location
    Saint-Petersburg, Russia
    Posts
    3

    Default Export chart object to SVG string

    Hello!


    We are using Ext JS 5 in our project. We have charts section with many different business charts.
    Could you tell me if there is a way to save these charts objects to SVG strings.
    In general, I would like to have a button near each chart, pressing on it, you will get a SVG string in popup.


    Thank you.

  2. #2
    Sencha - Support Team bjdurham85's Avatar
    Join Date
    Mar 2014
    Posts
    962
    Answers
    55

    Default

    Have you tried the Download method provided from the chart container?

    http://docs.sencha.com/extjs/6.2.1/c...ethod-download

    Bryan

  3. #3

    Join Date
    Jun 2016
    Location
    Saint-Petersburg, Russia
    Posts
    3

    Default

    Yes, I tried it, unfortunately it just saves the graph in png

  4. #4
    Sencha - Support Team bjdurham85's Avatar
    Join Date
    Mar 2014
    Posts
    962
    Answers
    55

    Default

    Take a look at the getImage method in the API:

    http://docs.sencha.com/extjs/6.2.1/c...ethod-getImage

    Bryan

  5. #5

    Join Date
    Jun 2016
    Location
    Saint-Petersburg, Russia
    Posts
    3

    Default

    Thank you! Looks like what I need. But actually it also return an image in PNG, no matter what I set as format - 'image' or 'stream'.
    Maybe the way I use to create a chart is not ok for my issue?
    This one:
    Ext.create('Ext.chart.CartesianChart', { /* some config */ });

Similar Threads

  1. Replies: 2
    Last Post: 16 Jul 2013, 2:12 PM
  2. [DUP] Config object for api property in Proxy, stores as string & not as object literal
    By irochusv in forum Sencha Architect 2.x: Bugs
    Replies: 7
    Last Post: 1 Mar 2013, 10:52 PM
  3. Replies: 8
    Last Post: 24 Sep 2012, 3:52 AM
  4. need to pass a String object inside PageConfig object
    By avilanchee in forum Ext GWT: Help & Discussion (1.x)
    Replies: 5
    Last Post: 30 Dec 2009, 4:21 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •