title: How to extract ChartJs data and config properties
body: <p>We're trying to give colleagues the ability to share <strong>ChartJS</strong> graphs with each other. Most of our current graphs are dynamic and users can apply filters (dates, add/remove data etc).
  The plan is to have a button that, <strong>on click</strong>, will get the <em>data</em> and properties (<em>labels, line colours, borderWidth, chart type etc</em>) and pass this data via a url. The user can then send that link to someone else. They can open it up to view that chart captured as it was seen by the original user, like a screenshot, but with all the interactive features enabled.</p>
  
  <p>E.g. </p>
  
  <pre>stackoverflow.com/shared_chart.php?conf=%7B%22responsive%22:true,%22responsiveA
  </pre>
  
  <p>When a chart is created by <code>myChart = new Chart(ctx, config);</code> ChartJs adds a lot of new properties to the chart object (e.g $plugin, _meta) that I don't need. 
  And, when I <code>JSON.stringify(myChart.config)</code> I get an error <pre>"Uncaught TypeError: Converting circular structure to JSON"</pre>.</p>
  
  <p>I've added the code needed to create a sample bar chart below:</p>
  
  <pre><code>// HTML needs a canvas element
  &lt;-- &lt;canvas id="myChart"&gt;&lt;/canvas&gt; --&gt;
  const ctx = $('#myChart');
  let config;
  let myChart;
  
  
  // config would look something like this
  config = {
      type: 'bar',
  
      data: {
          labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
          datasets: [{
              label: 'Dataset 1',
              backgroundColor: 'rgba(92,184,92,0.5)',
              borderColor: 'rgba(92,184,92,1.000)',
              borderWidth: 2,
              data: [
                  1,2,3,4,3,2,1
              ]
          }, {
              label: 'Dataset 2',
              backgroundColor: 'rgba(66,139,202,0.5)',
              borderColor: 'rgba(66,139,202,1)',
              borderWidth: 2,
              data: [
                  7,2,3,1,5,2,1
              ]
          }]
      },
  
      options: {
          responsive: true,
          maintainAspectRatio: false,
          legend: {
              position: 'top',
          },
          title: {
              display: true,
              text: 'Chart.js Bar Chart'
          }
      }
  }    
  
  myChart = new Chart(ctx,config);
  </code></pre>
  
  <p>
  On the page they are directed to, I'd like to grab the GET data and construct a new Chart.</p>