title: how to dynamically change column chart to mirror chart using highchart
body: <p>Well, today I come across to highchart issue where I am trying to fix something like following:
  1. I am making call to ajax and then changing column chart series data like this:</p>
  
  <pre><code>if(data == 2) {
  
  chart.series[0].setData([
  ['2009', 140],['2010', 200],['2011',   100],
  ['2009', -200],['2010',   -120],['2011', -240]]);
  }
  </code></pre>
  
  <p>2. What I want is to display this information into mirror chart way with two group names "UK", "AUS" so data will display like this UK - 2009, 2010, 2011 and same with AUS 2009, 2010, 2011(but with negative values)
  3. for what I want demo is here <a href="http://www.highcharts.com/demo/column-negative" rel="nofollow noreferrer">http://www.highcharts.com/demo/column-negative</a></p>
  
  <p>So, in short if ajax bring data = 2 from php page then I wanted convert column chart values into negative chart values with group series like attach highcahrt demo link.</p>
  
  <p>Guys I am trying to resolve this for so long now and really need help. So it will be great if someone know how I can do with chart.series[0].setData or any other method out there. Thanks in advanced</p>
  
  <p>Hi I want my graph like this dynamically 
  <a href="https://i.stack.imgur.com/smBrG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/smBrG.png" alt="enter image description here"></a></p>
  
  <p>and I am getting answer like this at the moment after suggest answer:
  <a href="https://i.stack.imgur.com/PWrUO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PWrUO.png" alt="enter image description here"></a></p>
  
  <p>Code:</p>
  
  <pre><code>                                function requestData() {
                                      chart = $('#column_chart').highcharts();
  
                                      $.ajax({
                                          type: "POST",
                                          url: "graph_advanced_file.php",
                                          data: {sliceName: ch},
                                          success: function(data) {
                                              //store local storage.....
  
                                              localStorage.setItem("current_item", ch);
  
                                              //alert(data);
                                              //Now, check whatever data is coming through serve accordingly......to load some data.....of that perticular....
                                              if(data == 1) {
                                                  //Travel..so get series data....
                                                  &lt;?php
                                                      //$each_slice_series = array();
                                                      //$each_slice_series = getSliceInfo(1);
                                                      //$sliceId = 1;
                                                      //call and get the figure....
                                                  ?&gt;
                                                  chart.series[0].setData([
                                                  ['Mand',   200],
                                                  ['Sand',   800],
                                                  ['Land', 700]]);
                                              }
                                              if(data == 2) {
                                                  //Garment....So get series data....
                                                  var options = {
                                                    chart: {
                                                        type: 'column'
                                                    }, 
                                                    plotOptions: {
                                                        series: {
                                                            stacking: 'normal'
                                                        }
                                                    }
                                                  };
  
                                                 //Load new options to chart   
                                                 chart.setOptions(options);
                                                  chart.series[0].setData([
                                                    ['2009', 140],['2010', 200],['2011',   100],
                                                    ['2009', -200],['2010',   -120],['2011', -240]]);
  
                                                 chart.series[0].name="Uk";
  
                                                 chart.series[1].setData([
                                                        ['2009', 180],['2010', 100],['2011',   150],
                                                        ['2009', -250],['2010',   -130],['2011', -270]]);
  
                                                 chart.addSeries({ 
                                                    name: "AUS", 
                                                    data: [ ['2009', 180],
                                                            ['2010', 100],
                                                            ['2011', 150], 
                                                            ['2009', -250],
                                                            ['2010', -130],
                                                            ['2011', -270]] 
                                                 });
  
                                                 chart.redraw();
  
                                                  //chart.series[0].setData([
                                                  //['2009', 140],['2010', 200],['2011',   100],['2012', 130],['2013', 190],['2014', 220],['2015', 230],
                                                  //['2009', -200],['2010',   -120],['2011', -240],['2012', -220],['2013', -150],['2014', -100],['2015', -250],
                                                  //]);
  
                                              }
  </code></pre>
  
  <p>Now, this requestData called by:</p>
  
  <pre><code>$('#column_chart').highcharts({
                                       chart: {
                                              type: 'column',
                                              events: {
                                                  load: requestData
                                                  //click: changeLables
                                              }
                                          },
                                          title: {
                                              text: 'Total Sale of each products'
                                          },
                                          subtitle: {
                                              text: '(Click on product name to display monthly details)'
                                          },
                                          credits: {
                                              enabled: false
                                          },
                                          xAxis: {
                                              type: 'category'
                                          },
                                          yAxis: {
                                              title: {
                                                  text: 'Products Sale'
                                              }
                                          },
  
                                          legend: {
                                              enabled: false
                                          },
                                          series: [{
                                              name: 'Product Sale',
                                              colorByPoint: true,
                                              data: [{
                                                  name: 'Mand',
                                                  y: 200&lt;?php //echo $each_slice_series[0];?&gt;
                                              }, {
                                                  name: 'Land',
                                                  y: 800&lt;?php //echo $each_slice_series[1];?&gt;
                                              }, {
                                                  name: 'Sand',
                                                  y: 700&lt;?php //echo $each_slice_series[2];?&gt;
                                              }]
                                          }]
                                      });//End of chart......
  </code></pre>
  
  <p>Let me know</p>