Kibana: Export chart to image

Created on 15 Jul 2014  路  88Comments  路  Source: elastic/kibana

Hi,

It would be nice to be able to save graphs or donuts or any visualization in Kibana in image format (png, jpg, gif or even svg).
I think it would be cleaner & quicker than using the default screen shoot of the computer.

Thanks
SD

Reporting KibanaApp enhancement

Most helpful comment

+1

All 88 comments

+1

+1

+1 another good idea

Visualizations changed a bit in Kibana 4, but this seems pretty useful and I think should be easier to do now

:+1:

+1

+1

+1

+1

+1, because embedding on Raspberry Pi is currently a pain.

+1

Could be useful export it
:+1:

+1

+1
When I was asked for this I initially thought "why? live iframes are better if you just set a time range". Now that I'm considering purging a particular index on a daily basis, I'm for this too.

+1

+1

+99

+1

+1

+1

+1

:+1:

+1. I have a kibana iframe embedded in another web page, but reloading is slower than using a cached image.

+1 really need this for dashboard and public statistic page

+1

+1

+1

+1

+2

+1

+1

+1

+1

+10 +20 :heart:

+1

+1

+1

+1

+1

+1

+1

+1

+1

+1

Given the direction we're doing with visualizations this would probably need to be supported on a per-vis basis since things like tables and single value visualizations don't easily compile to a png

+1

+1

+1

+1

+1

+1

EDIT:
This feature could be very interesting if some people should see charts and they are not supposed to have privileges to edit dashboards or graphics.

+1

+2
Yes - the beautiful images would be great for scientific publications - png/jpeg export will be so convenient, being able to choose preferred image quality/size will be a huge plus.
Thank you!

over 1 year ~ 6month +1 ... we're still here :-1:

+1, itd be great for pushing into hipchat as well for our dmz'd platform.

+1

+1

Please stop adding +1s as comments you can react to the first post using emoji.

+1

Here is a small js hack I use sometimes, but it does not capture legends:

x = $(".panel-heading")
x.each(function(id, c) {
    var c = $(c)
    var z = $(c.children()[1])
    var a = $('<a><i class="fa fa-save" aria-hidden="true"></i></a>')


    var svg = $(c.parent().children()[1]).find(".chart svg")

    if (svg.length == 0) {
        console.log("skipping...")
        return
    }

    $("svg").attr({ version: '1.1' , xmlns:"http://www.w3.org/2000/svg"});
    var svg = $(svg).parent().html()
    console.log(svg)
    b64      = btoa(svg)
    a.attr("href-lang", 'image/svg+xml')
    a.attr("href", "data:image/svg+xml;base64,\n"+b64)

    z.append(a);
})

Here's my use case: as project manager, I need to write and circulate static reports that present and discuss key findings from our Kibana monitoring.

@cam72cam How might someone use that?

I open the browser inspector and run it in the JS console when on a dashboard.

It adds a save button next to the edit and remove buttons all of the visualization top bars.

+1

+1

+1

maybe someone could create some browser plugin for that functionality? Seems like this is not high on the agenda of kibana developers. It looks like easy thing to implement. Just create chrome extension that catches visualization area in kibana, converts svg to image. I'll see if I can do this over the weekend.

for pie and point series charts (vislib) this should be as easy as saving the svg if we would not have axes (and legend) in sepeare html elements. I don't see any benefit in that. Am i missing something ? I would be for moving first axes and then legend into the same chart svg. Exporting will be easy then.

@ppisljar I think it is two ways we want this. I would rather like an public url with an token or something for up to date stats, not really download an svg that get old fast. But that could be an different task.

+1

+1

+1

+1

+1

+1

+1

+1

+1

+1

Is it story time, perhaps? Less boring than +1.

Here's an anecdotal description of how I employed a method of working around the lack of this feature in Kibana 4.6.1, when we had the Reporting plugin, which then relied upon node-horseman to run PhantomJS and generate a PDF (yes, Portable Document Format, not Portable Network Graphics 馃槥) which could then be emitted via ElasticSearch watcher's e-mail action as an attachment鈥攐n a schedule of your choosing鈥攃onfigured by a POST'ing a JSON blob to elasticsearch:9200 via curl of course. No issue there; I only mention since I seem to recall that perhaps the Reporting plugin, now part of X-Pack, has improved somewhat since.

Well, it fortuitously turned out that PhantomJS left screenshot<####>..png files capturing every report in /tmp. Those are what I really wanted! So, does everyone all presumably know that one can combine inotify + cron into something called incron? Well, my incrontab was very simple and looked like this:

/tmp IN_CLOSE_WRITE /opt/process.sh $#

A lot happens in /tmp, so that script first had to use the positional argument containing the filename which was just closed after writing and determine via a regular expression whether it was some other program's junk or matched the PhantomJS screenshot file format. For a while, after refining the script to perfection, and including some ImageMagick::convert and optipng magic to add basic text captions, I was then all set :exclamation: and publishing regular .PNG screenshots of my visualizations regularly to team at my former company and their community. That is, until version 5.1 when some things changed which broke this particular hack.:

The images are written to the Kibana data directory when creating the PDF but they're immediately deleted after the fact, so you won't be able go grab them from there.

Only 11 days ago @kobelb informed me on another ticket that PNG support will be added in the future! So I'm fully optimistic; I merely felt compelled to share that story鈥擨'm sure it's only one of many amusing workarounds for features lacking in software which we all each encounter on nearly a daily basis鈥攚ith the other thumbs-up people. :smile:

+1

+1

Hope nobody already mentioned this (please stop commenting with those annoying and useless +1, use reactions instead!), I have another use case: pre-rendered image are easy to display on low-power devices.

We have a couple of Raspberry Pi's driving high resolution displays and there's no way the poor Pi can run a browser full of complex javascript stuff. But it can download a PNG and display it without problems (and without X.Org) - we are actually doing that with another popular visualization tool even if it's some sort of an hack.

To add another use case I'm looking at servicing - I like the visualizations I get out of Kibana, but I'd like to be able to distribute a chart to a public CDN for serving up in a public place - but I don't want my internal ES or Kibana nodes exposed to the outside world.

Ideally I'd probably just ship the Dashboard to S3 daily and display the latest charts statically. I would be fine if the images were watermarked for Kibana or whatever, I just want to not deal with the load on my own servers, when I can serve the same information for much cheaper, and safer, elsewhere.

+1

+1

Wow, over 4 years and lots of +1 still a no?

Closed by https://github.com/elastic/kibana/pull/25018, coming in Kibana v6.6

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ctindel picture ctindel  路  3Comments

socialmineruser1 picture socialmineruser1  路  3Comments

timmolter picture timmolter  路  3Comments

stacey-gammon picture stacey-gammon  路  3Comments

MaartenUreel picture MaartenUreel  路  3Comments