Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/apache-spark/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
ColdFusion 11 cfchart xAxis格式_Coldfusion_Coldfusion 11_Cfchart - Fatal编程技术网

ColdFusion 11 cfchart xAxis格式

ColdFusion 11 cfchart xAxis格式,coldfusion,coldfusion-11,cfchart,Coldfusion,Coldfusion 11,Cfchart,我正在尝试在ColdFusion 11中创建一个简单的折线图,并希望格式化xAxis,以显示类似mm dd yy的日期格式,而不是默认显示的完整日期/时间戳 我的代码是: <cfchart format="html" chartwidth="800" chartheight="400" xaxistitle="Date" yaxistitle="Amount"

我正在尝试在ColdFusion 11中创建一个简单的折线图,并希望格式化xAxis,以显示类似mm dd yy的日期格式,而不是默认显示的完整日期/时间戳

我的代码是:

      <cfchart format="html"
               chartwidth="800"
               chartheight="400"
               xaxistitle="Date"
               yaxistitle="Amount"
               showlegend="yes"
               fontsize="12"
               font="Arial"
               showMarkers="no"
               xAxis=#[{"format"="Date","label":"Date"}]#>

        <cfchartseries type="line"
                      query="getAmounts"
                      valueColumn="amount"
                      itemColumn="date">

      </cfchart>

我尝试了xAxis属性的几种不同变体,但没有成功——文档中不清楚它应该采用什么格式。任何帮助都将不胜感激。

格式必须是这样的

<cfset myStruct = {"item"={"font-angle"=-90}}/>

然后只需设置xAxis=“#myStruct#”-您可以在cfchart标记中完成这一切,但当结构变大时,它更容易阅读。这是正确的格式,因为这对我们设置每个项目的角度是有效的。但是,我不知道xAxis中键的所有选项都是什么。文档只是说“用于设置x轴样式的键结构,如格式、指南、项目和标签。”


既然如此,您就不能在“getAmounts”查询中为字段“date”设置正确的格式吗?这样,当您将其输出到图表时,您就不必处理它。

方括号和错误消息中对数组的引用可能是一个有意义的组合。我尝试过使用方括号和不使用方括号。您是否尝试过不使用OctorOps?
<cfset myStruct = {"item"={"font-angle"=-90}}/>