• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

New Here ,
Mar 07, 2022 Mar 07, 2022

Copy link to clipboard

Copied

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:

kurttosczak_0-1646720105230.png

 

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

eg

kurttosczak_1-1646720360160.png

 

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

 

 

Views

115

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 09, 2022 Mar 09, 2022

Copy link to clipboard

Copied

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.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 23, 2022 Mar 23, 2022

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation