title: How to display string[] for creating column chart in Spring and jsp
body: <p>I want to create a column chart, I find <strong>CanvasJS.Chart</strong> to create a chart but it accepts a single element for creating a chart, so my question is how can I use my <strong>string[]</strong> in CanvasJS.Chart for creating chart</p>
  
  <p><em>value</em> and <em>Nvalue</em> received from checkbox selection option</p>
  
  <pre><code>    @RequestParam(value = "value", required = false) String[] value)
     @RequestParam(value = "Nvalue", required = false) String[] Nvalue)
  
  
      String names[] = value;
      String number[] = Nvalue;
  
  
      model.addAttribute("names", names);
     model.addAttribute("umber", number);
  
  
  
  
  
  &lt;!DOCTYPE HTML&gt;
  &lt;html&gt;
  
  &lt;head&gt;  
   &lt;title&gt;Basic HTML5 Column Chart &lt;/title&gt;
    &lt;script type="text/javascript"&gt;
    window.onload = function () {
      var chart = new CanvasJS.Chart("chartContainer",
      {
        title:{
          text: "Top Oil Reserves"    
        },
        animationEnabled: true,
        axisY: {
          title: "Reserves(MMbbl)"
        },
        legend: {
          verticalAlign: "bottom",
          horizontalAlign: "center"
        },
        theme: "theme2",
        data: [
  
        {        
          type: "column",  
          showInLegend: true, 
          legendMarkerColor: "grey",
          legendText: "MMbbl = one million barrels",
          dataPoints: [      
          {y: 297571, label: "Venezuela"}
          ]
        }   
        ]
      });
  
      chart.render();
    }
    &lt;/script&gt;
    &lt;script  src="https://cdnjs.cloudflare.com/ajax/libs/canvasjs/1.7.0/canvasjs.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
    &lt;body&gt;
    &lt;div id="chartContainer" style="height: 300px; width: 100%;"&gt;
      &lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>