Skip to main content
Participating Frequently
March 8, 2022
Question

Cfchart bar scalefrom bars are below the xaxis and hide the xaxis labels

  • March 8, 2022
  • 1 reply
  • 247 views

I recently updated to ColdFusion 2021 and I got almost everything working except for one chart that I am not sure how to resolve.

I am using scalefrom 99% to 100% to get a better view of the data.  When the chart is plotted it colors the bars outside the internal graph area and overwrites the x-axis labels.  I have included sample code and screen shots.

<cfset plot = { "value-box":{
                "visible":true,
                "placement":"top-in",
                "font-color": "white"
           }}>

<h3>Availability by Month (%)</h3>
<cfchart chartheight="400" chartwidth="520" format="png" scalefrom="99" scaleTo="100" showlegend="no" plot="#plot#" >
    <cfchartseries type="bar" datalabelstyle="value" seriescolor="##009900">
        <cfchartdata item="Jan" value="99.9"/>
        <cfchartdata item="Jan" value="99.8"/>
    </cfchartseries>
</cfchart>

 

Result:

 

If I change the series type to area then it works correctly, but I want to use bars for this data.

eg

 

Is this a bug that I will have to work around or is there a way to handle this that I am unaware of?

 

 

    This topic has been closed for replies.

    1 reply

    Participating Frequently
    March 9, 2022

    I have done more testing and this works in format="html" but not jpg or png.
    I thought it might have something to do with my using floating point numbers that were closely grouped but I tried with integers between 50-100 with a scalefrom = 10 and I still see the same problem.

     

    BKBK
    Community Expert
    Community Expert
    March 23, 2022

    It does look like a bug. In particular, the change in behaviour when you switch format from PNG (or JPG) to HTML.

     

    Please file a bug report