Connecting Tech Pros Worldwide Help | Site Map

Problem in displaying the Bar chart using coldFusion.

Newbie
 
Join Date: Feb 2008
Posts: 2
#1: Feb 28 '08
Hi All,

Iam facing a problem with bar chart using coldFusion.

if there is only one <cfchartseries> tag then the seriesLabel attribute is not displaying instead of that the items of the cfchartdata are displaying.
if there are more then one <cfchartseries> then the seriesLabel specified is displaying properly.

Please look at the code and its corresponding bar chart attached .

Code -1 and BarChart1 :
Expand|Select|Wrap|Line Numbers
  1. <cfchart format="jpg" xaxistitle="Month" yaxistitle="MonthlyTotal" seriesPlacement="stacked"    showLegend="yes" showMarkers="no" chartHeight="300" chartWidth="400" >
  2. <labelStyle orientation="Horizontal"/>
  3. <cfchartseries type="bar" seriesLabel="TEXAS"  >
  4.     <cfchartdata item="jan2007" value="1">
  5.     <cfchartdata item="Feb2007" value="3">
  6.     <cfchartdata item="Mar2007" value="2">
  7.     <cfchartdata item="Apr2007" value="4">
  8. </cfchartseries>
  9. </cfchart>
  10.  


Code-2 and BarChart2 :

Expand|Select|Wrap|Line Numbers
  1. <cfchart format="jpg" xaxistitle="Month" yaxistitle="MonthlyTotal" seriesPlacement="stacked"    showLegend="yes" showMarkers="no" chartHeight="300" chartWidth="400" >
  2. <labelStyle orientation="Horizontal"/>
  3. <cfchartseries type="bar" seriesLabel="TEXAS"  >
  4.     <cfchartdata item="jan2007" value="1">
  5.     <cfchartdata item="Feb2007" value="3">
  6.     <cfchartdata item="Mar2007" value="2">
  7.     <cfchartdata item="Apr2007" value="4">
  8. </cfchartseries>
  9. <cfchartseries type="bar"  seriesLabel="DALLAS">
  10.     <cfchartdata item="jan2007" value="1">
  11.     <cfchartdata item="Feb2007" value="3">
  12.     <cfchartdata item="Mar2007" value="2">
  13.     <cfchartdata item="Apr2007" value="4">
  14. </cfchartseries>
  15. </cfchart>
  16.  



The Barchart1 need to show TEXAS as the seriesLabel instead of that its showing the Months which are the X-axis variables.
The Barchart2 is showing properly as per the code.

I tried my best to solve it by my self but iam unable to find it. Requesting u people give me ur ideas.
I am waiting for ur Suggestions.

ThankYou,
Varma
Attached Thumbnails
barchart1.jpg   barchart2.jpg  
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#2: Feb 29 '08

re: Problem in displaying the Bar chart using coldFusion.


Hi Varma, welcome to TSDN!

Now, I'm not sure if it's possible to change this behaviour, but you can try changing the style of the chart using XML or WebCharts - see this link for more information.

Hope this helps. Good luck.
Reply