Discussion:
cfchart label problem
(too old to reply)
dongzky
2009-03-31 06:15:25 UTC
Permalink
Hi,

I have a chart similar to this:

<cfchartseries type="horizontalbar" serieslabel="serieslabel1">
<cfchartdata item="itemname1" value="#value1#">
<cfchartdata item="itemname2" value="#value2#">
<cfchartdata item="itemname3" value="#value3#">
.
.
.
.<cfchartdata item="itemname22" value="#value22#">
</cfchartseries>

<cfchartseries type="horizontalbar" serieslabel="serieslabel2">
<cfchartdata item="itemname1" value="#value1#">
<cfchartdata item="itemname2" value="#value2#">
<cfchartdata item="itemname3" value="#value3#">
.
.
.
.<cfchartdata item="itemname22" value="#value22#">
</cfchartseries>

<cfchartseries type="horizontalbar" serieslabel="serieslabel3">
<cfchartdata item="itemname1" value="#value1#">
<cfchartdata item="itemname2" value="#value2#">
<cfchartdata item="itemname3" value="#value3#">
.
.
.
.<cfchartdata item="itemname22" value="#value22#">
</cfchartseries>

<cfchartseries type="horizontalbar" serieslabel="serieslabel4">
<cfchartdata item="itemname1" value="#value1#">
<cfchartdata item="itemname2" value="#value2#">
<cfchartdata item="itemname3" value="#value3#">
.
.
.
.<cfchartdata item="itemname22" value="#value22#">
</cfchartseries>

<cfchartseries type="horizontalbar" serieslabel="serieslabel5">
<cfchartdata item="itemname1" value="#value1#">
<cfchartdata item="itemname2" value="#value2#">
<cfchartdata item="itemname3" value="#value3#">
.
.
.
.<cfchartdata item="itemname22" value="#value22#">
</cfchartseries>


My problem is, the graph doesn't seem to print all the labels([b]item[/b]
paremeter of cfchartdata) in the graph. It prints it alternately. I mean, 1st
label is printed, then the 2nd isn't. The 3rd is printed and the 4th isn't. How
do I let all the labels shown in the graph? The values are all there. It's just
the labels are not all shown.
gitobu
2009-03-31 22:01:13 UTC
Permalink
It is because they do not fit on the chart width. Try a greater chartwidth.
Alternatively you may want to change the orientation of the labels in the style
of the chart you are using. Check for this on your style file and change
orientation to vertical.
<xAxis>
<labelStyle isHideOverlapped="true" orientation="Horizontal"/>
<titleStyle font="Arial-12-bold" isMultiline="false"/>
</xAxis>
dongzky
2009-04-01 01:54:34 UTC
Permalink
@gitobu

Thanks. It worked.

Loading...