Skip to main content
Inspiring
March 31, 2009
Answered

cfchart label problem

  • March 31, 2009
  • 2 replies
  • 895 views
Hi,

I am using CF MX 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( item 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.
    This topic has been closed for replies.
    Correct answer gitobu
    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>

    2 replies

    dongzkyAuthor
    Inspiring
    April 1, 2009
    @gitobu

    Thanks. It worked.
    gitobuCorrect answer
    Inspiring
    March 31, 2009
    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>