title: Struts 2 jQuery plugin in Pie Chart with json results
body: <p>By using struts 2 jQuery plugin ....</p>
  
  <p>I am trying to create a Pie Chart which gets its data dynamically via json.</p>
  
  <p>Is it possible? </p>
  
  <p>All samples mentioned in <a href="http://struts.jgeppert.com/struts2-jquery-showcase/index.action" rel="nofollow">http://struts.jgeppert.com/struts2-jquery-showcase/index.action</a> and as long as I searched, are using <code>s:iterator</code> or static data.</p>
  
  <p>Here is my codes:</p>
  
  <pre><code>   @Action(value = "json-chart-data", results = {
              @Result(name = "success", type = "json")
          })
        public String execute()
        {
          myData = new TreeMap&lt;&gt;();
          myData.put("a", 11);
          myData.put("b", 12);
          myData.put("b", 13);
  
          return SUCCESS;
        }
  </code></pre>
  
  <p>And the jsp:</p>
  
  <pre><code>&lt;s:url id="chartDataUrl" action="json-chart-data" /&gt;
  &lt;sjc:chart  id="chartAjax"
          pie="true"
          pieLabel="true"
          cssStyle="width: 600px; height: 400px;" &gt;
      &lt;sjc:chartData      
          id="chartAjaxData"
          href="%{chartDataUrl}"
              //Here we need to set list,data and label!
      /&gt;
    &lt;/sjc:chart&gt;
  </code></pre>
  
  <p>The tag is working and an json result is turned back. But the pie is not displayed.</p>
  
  <p>The <code>cjc:chartData</code> has <code>list</code> , <code>data</code>, and <code>label</code> properties which needs to be set. I try different values but no luck.</p>