<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I export a chart as a high-quality image? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-export-a-chart-as-a-high-quality-image/m-p/186854#M53820</link>
    <description>&lt;P&gt;Oh wow ! This is exactly what I was after !! Cheers @chumberr&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jul 2015 12:49:21 GMT</pubDate>
    <dc:creator>peamc</dc:creator>
    <dc:date>2015-07-06T12:49:21Z</dc:date>
    <item>
      <title>How do I export a chart as a high-quality image?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-export-a-chart-as-a-high-quality-image/m-p/186852#M53818</link>
      <description>&lt;P&gt;Struggling a bit to find an answer to this.&lt;/P&gt;

&lt;P&gt;Can anyone suggest a way to create a sharp, high-quality image export from my charts? &lt;/P&gt;

&lt;P&gt;At this point I've converted my SimpleXML dashboard into HTML and tried to convert my div/chart SVG into a PNG file. This was partially successful but the quality of the exported image was awful.&lt;/P&gt;

&lt;P&gt;Any help much would be much appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2015 16:52:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-export-a-chart-as-a-high-quality-image/m-p/186852#M53818</guid>
      <dc:creator>peamc</dc:creator>
      <dc:date>2015-06-30T16:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do I export a chart as a high-quality image?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-export-a-chart-as-a-high-quality-image/m-p/186853#M53819</link>
      <description>&lt;P&gt;Hi there @peamc, yes there is a way to do this using HTML2Canvas:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;script src="https://rawgithub.com/niklasvh/html2canvas/master/dist/html2canvas.min.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script type="text/javascript"&amp;gt;


        function exportChart() {

            html2canvas($('#element1'), {
                useCORS: true,
                allowTaint: true,
                  onrendered: function (canvas) {
                    var img = document.createElement("a");

                    img.href = canvas.toDataURL();
                    img.download = "chart.png";
                    img.click();

                      }
                  });
              } 
&amp;lt;/script&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Heres a function which does what you need, just replace 'element1' with the div id of you div containing your chart!&lt;BR /&gt;
Good luck mate.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2015 11:36:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-export-a-chart-as-a-high-quality-image/m-p/186853#M53819</guid>
      <dc:creator>chumberr</dc:creator>
      <dc:date>2015-07-06T11:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I export a chart as a high-quality image?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-export-a-chart-as-a-high-quality-image/m-p/186854#M53820</link>
      <description>&lt;P&gt;Oh wow ! This is exactly what I was after !! Cheers @chumberr&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2015 12:49:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-export-a-chart-as-a-high-quality-image/m-p/186854#M53820</guid>
      <dc:creator>peamc</dc:creator>
      <dc:date>2015-07-06T12:49:21Z</dc:date>
    </item>
  </channel>
</rss>

