Note that there are some explanatory texts on larger screens.

plurals
  1. POI am passing list values to my jqplot stacked bar chart but no chart is displyed
    primarykey
    data
    text
    <p>I have stored values in 3 columns of the database then using list(collections) i am able to display it on my table using jsp. Now i have written the code to generate stacked bar chart on the same jsp page but i am not able to display it as stacked bar chart. Here is my jsp </p> <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%&gt; &lt;%@page import="java.sql.*,javax.*" %&gt; &lt;%@taglib prefix="s" uri="/struts-tags" %&gt; &lt;%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %&gt; &lt;%@ page import="com.rajesh.action.*" %&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt; &lt;title&gt;January&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;h1&gt;Report for January&lt;/h1&gt; &lt;body&gt; &lt;table border="1" &gt; &lt;tr&gt; &lt;th&gt;Market&lt;/th&gt; &lt;th&gt;Jan-01&lt;/th&gt; &lt;th&gt;Jan-02&lt;/th&gt; &lt;th&gt;Jan-03&lt;/th&gt; &lt;th&gt;Jan-04&lt;/th&gt; &lt;th&gt;Jan-05&lt;/th&gt; &lt;th&gt;Jan-06&lt;/th&gt; &lt;th&gt;Jan-07&lt;/&gt; &lt;th&gt;Jan-08&lt;/&gt; &lt;th&gt;Jan-09&lt;/&gt; &lt;th&gt;Jan-10&lt;/&gt; &lt;th&gt;Jan-11&lt;/&gt; &lt;th&gt;Jan-12&lt;/&gt; &lt;th&gt;Jan-13&lt;/&gt; &lt;th&gt;Jan-14&lt;/&gt; &lt;th&gt;Jan-15&lt;/&gt; &lt;th&gt;Jan-16&lt;/&gt; &lt;th&gt;Jan-17&lt;/&gt; &lt;th&gt;Jan-18&lt;/&gt; &lt;th&gt;Jan-19&lt;/&gt; &lt;th&gt;Jan-20&lt;/&gt; &lt;th&gt;Jan-21&lt;/&gt; &lt;th&gt;Jan-22&lt;/&gt; &lt;th&gt;Jan-23&lt;/&gt; &lt;th&gt;Jan-24&lt;/&gt; &lt;th&gt;Jan-25&lt;/&gt; &lt;th&gt;Jan-26&lt;/&gt; &lt;th&gt;Jan-27&lt;/&gt; &lt;th&gt;Jan-28&lt;/&gt; &lt;th&gt;Jan-29&lt;/&gt; &lt;th&gt;Jan-30&lt;/&gt; &lt;th&gt;Jan-31&lt;/&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td rowspan="3"&gt;AUK&lt;/&gt; &lt;c:forEach items="${abc}" var="item"&gt; &lt;td&gt;${item.count}&lt;/td&gt; &lt;/c:forEach&gt; &lt;/tr&gt; &lt;tr&gt; &lt;c:forEach items="${abc}" var="item"&gt; &lt;td&gt;${item.dataamount}&lt;/td&gt; &lt;/c:forEach&gt; &lt;/tr&gt; &lt;tr&gt; &lt;c:forEach items="${abc}" var="item"&gt; &lt;td&gt;${item.result}&lt;/td&gt; &lt;/c:forEach&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td rowspan="3"&gt;AUS&lt;/td&gt; &lt;c:forEach items="${abc1}" var="item1"&gt; &lt;td&gt;${item1.count}&lt;/td&gt; &lt;/c:forEach&gt; &lt;/tr&gt; &lt;tr&gt; &lt;c:forEach items="${abc1}" var="item1"&gt; &lt;td&gt;${item1.dataamount}&lt;/td&gt; &lt;/c:forEach&gt; &lt;/tr&gt; &lt;tr&gt; &lt;c:forEach items="${abc1}" var="item1"&gt; &lt;td&gt;${item1.result}&lt;/td&gt; &lt;/c:forEach&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td rowspan="3"&gt;ADE&lt;/td&gt; &lt;c:forEach items="${abc2}" var="item2"&gt; &lt;td&gt;${item2.count}&lt;/td&gt; &lt;/c:forEach&gt; &lt;/tr&gt; &lt;tr&gt; &lt;c:forEach items="${abc2}" var="item2"&gt; &lt;td&gt;${item2.dataamount}&lt;/td&gt; &lt;/c:forEach&gt; &lt;/tr&gt; &lt;tr&gt; &lt;c:forEach items="${abc2}" var="item2"&gt; &lt;td&gt;${item2.result}&lt;/td&gt; &lt;/c:forEach&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td rowspan="3"&gt;Ebay&lt;/td&gt; &lt;c:forEach items="${abc3}" var="item3"&gt; &lt;td&gt;${item3.count}&lt;/td&gt; &lt;/c:forEach&gt; &lt;/tr&gt; &lt;tr&gt; &lt;c:forEach items="${abc3}" var="item3"&gt; &lt;td&gt;${item3.dataamount}&lt;/td&gt; &lt;/c:forEach&gt; &lt;/tr&gt; &lt;tr&gt; &lt;c:forEach items="${abc3}" var="item3"&gt; &lt;td&gt;${item3.result}&lt;/td&gt; &lt;/c:forEach&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td rowspan="3"&gt;Play&lt;/td&gt; &lt;c:forEach items="${abc4}" var="item4"&gt; &lt;td&gt;${item4.count}&lt;/td&gt; &lt;/c:forEach&gt; &lt;/tr&gt; &lt;tr&gt; &lt;c:forEach items="${abc4}" var="item4"&gt; &lt;td&gt;${item4.dataamount}&lt;/td&gt; &lt;/c:forEach&gt; &lt;/tr&gt; &lt;tr&gt; &lt;c:forEach items="${abc4}" var="item4"&gt; &lt;td&gt;${item4.result}&lt;/td&gt; &lt;/c:forEach&gt; &lt;/tr&gt; &lt;/table&gt; &lt;script type="text/javascript" src="plugins/jquery.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="plugins/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="plugins/jquery.jqplot.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="plugins/jquery.jqplot.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="plugins/jqplot.barRenderer.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="plugins/jqplot.barRenderer.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="plugins/jqplot.categoryAxisRenderer.min.js"&gt; &lt;/script&gt; &lt;script type="text/javascript" src="plugins/jqplot.pointLabels.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="plugins/jqplot.canvasAxisTickRenderer.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="plugins/jqplot.canvasAxisTickRenderer.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="plugins/jqplot.canvasOverlay.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="plugins/jqplot.categoryAxisRenderer.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="plugins/jqplot.pointLabels.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="plugins/jqplot.highlighter.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="plugins/jqplot.cursor.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="plugins/jqplot.dateAxisRenderer.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="plugins/excanvas.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="plugins/excanvas.min.js"&gt;&lt;/script&gt; &lt;link href="plugins/jquery.jqplot.css" rel="stylesheet" /&gt; &lt;link href="plugins/jquery.jqplot.min.css" rel="stylesheet" /&gt; &lt;body&gt; &lt;span id="info3"&gt;Nothing yet.&lt;/span&gt; &lt;div id="chart3" style="height:900px;width:1300px; "&gt;&lt;/div&gt; &lt;script type="text/javascript"&gt; $(document).ready(function(){ var s1 = []; var s2 = []; var s3 = []; &lt;c:forEach var="temp" items="${abc}"&gt; s1.push('${item.result}'); &lt;/c:forEach&gt; &lt;c:forEach var="temp" items="${abc}"&gt; s2.push('${item.count}'); &lt;/c:forEach&gt; &lt;c:forEach var="temp" items="${abc}"&gt; s3.push('${item.dataamount}'); &lt;/c:forEach&gt; var axisDates = ["Jan 1", "Jan 2", "Jan 3","Jan 4","Jan 5","Jan 6","Jan 7","Jan 8","Jan 9","Jan 10","Jan 11","Jan 12","Jan 13","Jan 14","Jan 15","Jan 16","Jan 17","Jan 18","Jan 19","Jan 20","Jan 21","Jan 22","Jan 23","Jan 24","Jan 25","Jan 26","Jan 27","Jan28","Jan 29","Jan 30","Jan 31"] plot3 = $.jqplot('chart3', [s1, s2, s3], { stackSeries: true, varyBarColor: true, captureRightClick: true, animate : !$.jqplot.use_excanvas, seriesDefaults : { renderer:$.jqplot.BarRenderer, rendererOptions: { barPadding : 20, barMargin : 25, barDirection : 'vertical', barWidth : 30, shadowOffset : 4, highlightMouseOver: true }, pointLabels: {show: true} }, axes: {xaxis: { renderer: $.jqplot.CategoryAxisRenderer, ticks: axisDates }, yaxis: {min:0, max: 2300 } }, legend: { show: true, location: 'e', placement: 'outside' } }); // Bind a listener to the "jqplotDataClick" event. Here, simply change // the text of the info3 element to show what series and ponit were // clicked along with the data for that point. $('#chart3').bind('jqplotDataClick', function (ev, seriesIndex, pointIndex, data) { $('#info3').html('series: '+seriesIndex+', point: '+pointIndex+', data: '+data); } ); }); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload