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

CFChart yaxis numbering

Guest
Sep 14, 2006 Sep 14, 2006

Copy link to clipboard

Copied

I have a cfchart in a bar chart format. The Y-axis is numbered 0, 1, 2, 3, 4 (all integers) and the data must be set at one decimal place (2.3, 5.0, 6.2, etc), but when I have a trailing zero (5.0) the popup on the data element shows just the integer (5).

I thought I could force the data points to show the decimal (e.g. 5.0) using:
<labelFormat style="pattern" pattern="#0.0#" minFractionDigits="1"/>
And it worked. BUT, it also made the Y-axis show the decimal (0.0, 1.0, 2.0, 3.0, etc.) which I don't want. Is there a way to set the element data to a specific decimal place and separately make the Y-axis only show integers? My entire code is below.

Thanks.

<?xml version="1.0" encoding="UTF-8"?>
<frameChart is3D="false" font="Arial-12">
<frame xDepth="0" yDepth="0" type="None" outline="black"
frameSize="20" dashSize="2" stripColor="#AAFFF9C6">
<background maxColor="#AAFFFDED"/>
</frame>
<xAxis>
<labelFormat pattern="#,##0.###"/>
<parseFormat pattern="#,##0.###"/>
<titleStyle isVisible="false"/>
</xAxis>
<yAxis>
<labelFormat style="pattern" pattern="#0.0#" minFractionDigits="1"/>
<parseFormat pattern="#0.0"/>
<titleStyle font="Arial-12">
<![CDATA[
Total Return (%)
]]>
</titleStyle>
</yAxis>
<legend spacing="-10" allowSpan="true" valign="Bottom" font="Arial-12" isAntialiased="False" isMultiline="True" equalCols="true">
<decoration style="None" backColor="white"/>
</legend>
<elements action="" target="" outline="#ffffff" shapeSize="90"
lineWidth="1" showMarkers="false" fixedWidth="1">
<movie framesPerSecond="30" frameCount="30"/>
<morph stage="Rows"/>
</elements>
<popup decoration="None" background="#FFF9C6" foreground="black" isMultiline="true" font="Arial-12" isAntialiased="False"/>
<paint paint="Light" min="47" max="83"/>
</frameChart>
TOPICS
Advanced techniques

Views

441

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

correct answers 1 Correct answer

Advisor , Sep 14, 2006 Sep 14, 2006
About the only way is to plot everything against the second Y axis, which you keep hidden, and then force the scale on the visible y axis:

Votes

Translate

Translate
Advisor ,
Sep 14, 2006 Sep 14, 2006

Copy link to clipboard

Copied

About the only way is to plot everything against the second Y axis, which you keep hidden, and then force the scale on the visible y axis:

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
Guest
Sep 14, 2006 Sep 14, 2006

Copy link to clipboard

Copied

LATEST
I figured there was a 2nd Y-axis workaround, but I was hoping for a more precise solution... although I must say it's a pretty elegant solution nonetheless. Thanks!

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