Search code examples
coldfusioncfchart

cfchart pie chart with dataLabelStyle


According to this page http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-792e.html you can use a dataLabelStyle which can be "none", "value", "rowLabel", "columnLabel" or "pattern". However whenever i use "rowLabel", "columnLabel" or "pattern" the image doesn't show. There is no error, just a blank canvas where the image should be. Does any one know how to work around this?

Thanks


Solution

  • This test of the five(5) styles works fine for me.

    Maybe it is your code? Probably not a version problem as dataLabelStyle was introduced back in MX7 .

    <cfloop list="value,rowLabel,columnLabel,pattern,none" index="style">
        <cfchart format="png" scaleFrom="0" scaleto="30">
            <cfchartseries type="bar" dataLabelStyle="#style#">
                <cfchartdata item="bar" value="25">
                <cfchartdata item="foo" value="10">
            </cfchartseries>
        </cfchart>
    </cfloop>