Hello, with ColdFusion 8 this code produces duplicate stacked bars. The two chartseries are required to produce the stacked affect. One bar stack is labeled "Programs" and the second is labeled "Enrolled Programs". They are identical and both contain the data I wish to display so obviously I only want one of them. Suggestions? Thanks.
<cfchart format="flash" showlegend="yes"
chartheight="350"
chartwidth="350"
showxgridlines="no"
showygridlines="no"
showborder="no"
fontsize="12"
fontbold="no"
fontitalic="no"
xaxistitle=""
yaxistitle="Count"
show3d="yes"
rotated="no"
sortxaxis="no"
showmarkers="yes" seriesplacement="stacked">
<cfchartseries type="bar" query="qAllProgramsCount" seriescolor="blue" itemcolumn="title" valuecolumn="prgCount" serieslabel="Programs" >
<cfchartseries type="bar" query="qEnrolled" seriescolor="red" itemcolumn="title" valuecolumn="prgCount" serieslabel="Enrolled Programs" >
</cfchart>
I also figured out that the query data must be arranged in columns not rows. At first I had the values for each stack piece on a separate row. This would work for a single bar but adding multiple bars would just duplicate the first. The trick was each bar should be a single row with each piece of the stack a separate column. Once I put the survey response counts into columns I could feed the query into the chartseries like so and I got the desired stacked bar chart for each subquestion.
<cfchartseries type="bar" query="qChartData" seriescolor="red" itemcolumn="subquestion" valuecolumn="disagree" serieslabel="Disagree" > </cfchartseries>
<cfchartseries type="bar" query="qChartData" seriescolor="yellow" itemcolumn="subquestion" valuecolumn="somewhatagree" serieslabel="Somewhat Agree"></cfchartseries>
<cfchartseries type="bar" query="qChartData" seriescolor="green" itemcolumn="subquestion" valuecolumn="agree" serieslabel="Agree" ></cfchartseries>
<cfchartseries type="bar" query="qChartData" seriescolor="blue" itemcolumn="subquestion" valuecolumn="stronglyagree" serieslabel="Strongly Agree" ></cfchartseries>
North America
Europe, Middle East and Africa
Asia Pacific