首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >CFChart下限问题

CFChart下限问题
EN

Stack Overflow用户
提问于 2014-10-28 21:53:12
回答 1查看 429关注 0票数 1

在ColdFusion中工作并尝试运行此图表时,我遇到了一个奇怪的bug。

我不知道为什么或者为什么,但是Y轴下限被设置为-1000而不是零。我的所有数据都不会低于0。在图片中,我将其设置为Seriesplacement=Stacked。但那只是为了测试。否则,这是我的代码。

代码语言:javascript
复制
<cfchart title = "#variables.ReportName# Seedlings Ordered"
style = "../SO_R_overall.xml"
Format = "PNG"
pieSliceStyle = "solid"
show3D = "no"
showBorder = "yes" 
showLegend = "yes"
tipStyle = "MouseOver"
chartHeight = "#DefinedChartHeight#" 
chartWidth = "#DefinedChartWidth#"
font="arial"
fontsize="12"
fontBold="yes"
scaleFrom="0"
>

<cfchartseries 
    type="bar"
    seriesLabel="Goal"
    query="getDivisionGoalsByDivision"
    valueColumn="divisiongoal"  
    itemColumn = "division"
    dataLabelStyle="Value"
    seriesColor="99CCFF"
    >           
</cfchartseries>    

<cfchartseries 
    type="line"
    seriesLabel="Ordered"
    query="getQTYordered"
    valueColumn="QTYordered"  
    itemColumn = "division"
    dataLabelStyle="Value"
    seriesColor="green"
    >           
</cfchartseries>

和正在使用的XML:

代码语言:javascript
复制
<?xml version="1.0" encoding="UTF-8"?>
<frameChart is3D="false">
    <frame xDepth="3" yDepth="3" outline="#333333" lightColor="white" 
    leftAxisPlacement="Front" rightAxisPlacement="Front" stripColor="#CCCCCC"/>
    <xAxis scaleMin="0">
        <labelStyle isHideOverlapped="false" orientation="Horizontal"/>
        <titleStyle font="Arial-10-bold" isMultiline="true">Division</titleStyle>
    </xAxis>
    <yAxis scaleMin="0">
        <titleStyle font="Arial-10-bold"/>
        <dateTimeStyle majorUnit="Year" minorUnit="Month"/>
        <labelFormat style="Pattern" pattern="#,##0"/>
    </yAxis>         

    <dataLabels font="Arial-10" foreground="black" autoControl="true"/>
    <legend> 
        <![CDATA[ $(rowLabel)  ]]>    
    </legend>

    <elements action="" shape="Area" drawOutline="false">
        <morph morph="Grow"/>
    </elements>

    <decoration style="RoundShadow"/>
    <popup background="#C8FFFFFF" foreground="#333333"/>
    <paint paint="Plain"/>
    <insets left="5" top="5" right="5" bottom="5"/>

生成的图表:

EN

回答 1

Stack Overflow用户

发布于 2014-10-28 22:28:54

阿!在XML第2行中,我修改了

代码语言:javascript
复制
<frameChart is3D="false">

代码语言:javascript
复制
<frameChart is3D="false" autoAdjust="false">

更新:有关上下文和解释,请参阅下面的注释。

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26610125

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档