I need Define Div(chartContainer1) value in a JavaScript "Var" So that it can be defined in JavaScript Chart Unfortunately am unable to do
HTML:code
 <div id="chartContainer" style="height: 300px; width: 100%;">
    <div id="chartContainer1">[
    {y: 10, legendText:"Wii U", label: "Wii U 10%"}, 
    {y: 13, legendText:"3DS", label: "3DS 13%"}, 
    {y: 18, legendText:"PS3", label: "PS3 18%"}, 
    {y: 20, legendText:"Xbox One", label: "Xbox One 20%"}
];</div>
Chart Code: I have tried With
var dsp = document.getElementById("mySpan").innerHTML;  
var dps = document.getElementById("chartContainer1").innerText;
dataPoints is the place Where i need to define text of Div
  var chart = new CanvasJS.Chart("chartContainer",{
    title :{
        text: "Test title"
    },
    data: [{
      type: "stackedBar100",
        dataPoints : dps,
        showInLegend: true, 
        toolTipContent:"{label}"
    }],
  });
  chart.render();
 
     
     
    