How can we create a Pie Chart or Bar Chart using Portlet
How can we create a Pie chart or Bar chart in-home dashboard using Portlet script.
Create an HTML page that contains the container for the charts and reference to Google Charts and save it in the file cabinet and then reference the file id and use getContents function to use it in the portlet using params.portlet.html = htmlContent where htmlContent = fileObj.getContents();
Hi
var content = ‘<body>’+
‘<form>’ +
‘ <fieldset>’+
‘ <legend>Selecting elements </legend> ‘ +
‘<div id=”chartContainer”>’+
‘<p> <label>Select Range</label> <select id = “myList”><option value = “1”>Daily</option> <option value = “2”>Weekly</option>’+
‘ </select>’ +
‘ </p>’ +
”
‘ </fieldset>’ +
‘</form>’ +
‘ </body>’;
params.portlet.html = content;
How can we add pie chart to the html, can you please send me do you have any sample code for this.