cfchart水平条标签拥挤

时间:2013-10-03 05:26:01

标签: coldfusion coldfusion-10 cfchart

我在coldfusion 10中创建了一个简单的图表。由于某种原因,Y轴上的标签过于拥挤。虽然它们是长文本(但不超过100个字符),它们仍然应该出现在单行而不是包装上。这是屏幕截图:

<cfchart chartheight="1000" chartwidth="1000" showxgridlines="no" showygridlines="no" showborder="no" fontbold="no" fontitalic="no" show3d="no" rotated="no" sortxaxis="no" showlegend="no" showmarkers="no"  format="jpg" xaxistitle="Issues">
<cfchartseries type="horizontalbar" serieslabel="Survey Count"  >
<cfchartdata item="lwkencfkenklnr lknevfvfv ghthrtg y;l;lm;'m jkbjed lknl klnelvkn lknlknrweknn" value="10">
<cfchartdata item="lewfll; ;lmrtgbjweb vkn wkencfkenklnr lknevlknl klnelvkn lknlknrweknn wcwfewflfojewmlrm" value="20">
<cfchartdata item="efklnwkln lknkleng lwkencfkenefe klnr lknevlknl klnelvkn lknlknrweknn ewe" value="40">
<cfchartdata item="lkenglk klkn kjbghdchg lwk ewefrewf ncfkenklnr lknevlknl klnelvkn lknlknrweknn" value="10">
<cfchartdata item="lwkencfkenklnr lknevlknl klnelvkn lknlknrweknn wcwfojewmlrm" value="60">
<cfchartdata item="lwkencfkenklnr lkneffvlknl klnelvkn lknlknrweknn wcwfojewmlrm" value="80">
<cfchartdata item="lwkencfkenklnr lknevlknl klnelvkn lknlknrweknn wcwfojewmlrm" value="50">
<cfchartdata item="lwkencfkenklnr lknevlknl klnelvkn lknlknrweknn wcwfojewmlrm" value="5">
<cfchartdata item="lwkencfkenklnr lknevlknl klnelvkn lknlknrweknn wcwfojewmlrm" value="100">
<cfchartdata item="lwkencfke btgnklnr lknevlknl klnelvkn lknlknrweknn wcwfojewmlrm" value="20">
<cfchartdata item="lwkencfkenklnr lknevlvvrgr knl klnelvkn lknlknrweknn wcwfojewmlrm" value="10">
<cfchartdata item="lwkencfkenklnr lkneffvfg vlknl klnelvkn lknlknrweknn wcwfojewmlrm" value="50">
<cfchartdata item="lwkffdfdf encfkenklnr lknevlknl klnelvkn lknlknrweknn wcwfojewmlrm" value="60">
<cfchartdata item="lwkenc hy jujuyjj fkenklnr lknevlknl klnelvkn lknlknrweknn wcwfojewmlrm" value="10">
<cfchartdata item="lwkencrfrf fkenklnr lknevlknl klnelvkn lknlknrweknn wcwfojewmlrm" value="80">
<cfchartdata item="lwkencfrfrf  h thtt yyuyu kenklnr lknevlknl klnelvkn lknlknrweknn wcwfojewmlrm" value="25">
<cfchartdata item="lwkencefef ferrgrg fkenklnr lknevlknl klnelvkn lknlknrweknn wcwfojewmlrm" value="38">
<cfchartdata item="lwken hthththcfkenklnr lknevlknl klnelvkn lknlknrweknn wcwfojewmlrm" value="2">
<cfchartdata item="jjkjkkjbjk lwkencfkeefefnklnr lknevlknl klnelvkn lknlknrweknn wcwfojewmlrm" value="120">
<cfchartdata item=";l;m;';' frfegtgrt tgt kencfkenklnr lknevlknl klnelvkn lknlknrweknn wcwfojewmlrm" value="12">
<cfchartdata item="knklnknk lknlkne lknklnewf lwkencfkenklnr lknevlknl klnelvkn lknlknrweknn wcwfojewmlrm" value="55">
<cfchartdata item="el;mvlml ;lmlmll ';,;lwkencfkenklnr lknevlknl klnelvkn lknlknrweknn wcwfojewmlrm" value="88">
<cfchartdata item="lwkg;lm;l ';,;' nkneknfv encfkenklnr lknevlknl klnelvkn lknlknrweknn wcwfojewmlrm" value="6">
<cfchartdata item="knklnekgn klnqd legegwkeeg ncfkenklnr lknevlknl klnelvkn lknlknrweknn wcwfojewmlrm" value="10">
<cfchartdata item="lwgerg;,e;' ';,hytlhmwjkbfh kjkencfkenklnr lknevlknl klnelvkn lknlknrweknn wcwfojewmlrm" value="25">
<cfchartdata item="lwkencfkenfwekfnwkln  knklnklnd l;ml;fklnr lknevlknl klnelvkn lknlknrweknn wcwfojewmlrm" value="150">
</cfchartseries>

enter image description here 感谢。

1 个答案:

答案 0 :(得分:6)

CF10使用多个图表引擎:format="html" ZingChart和所有其他格式WebCharts3D"flash|jpg|png"

如上所述,直接使用ZingCharts可以提供更多控制。但是,要回答您的问题,您的当前图表是使用WebCharts3D生成的。您可以使用custom style修改图表的行为。要禁用包装,请使用isMultiline="false"。 (另请参阅{cfroot\charting\webcharts.bat}中的图表实用程序)。

<cfsavecontent variable="customStyle"><?xml version="1.0" encoding="UTF-8"?>
<frameChart>
   <xAxis>
      <labelStyle isMultiline="false" isHideOverlapped="false" orientation="Horizontal"/>
   </xAxis>
</frameChart>
</cfsavecontent>

<cfchart style="#customStyle#" 
       chartheight="1000" 
       chartwidth="1000" ....>

</cfchart>