2 Replies Latest reply on Jun 28, 2016 5:12 PM by gordon va Branched from an earlier discussion.

    Rotating Axis Labels and Looping through Data Sets

    gordon va Level 1

      Late to the party but re the style issue - CF11 wants the ".xml" file extension (up to CF10: style="myStyle", with CF11: style="myStyle.xml").

      My issues/needs/questions:

      1) How do I get x-axis labels at say 45 degress? "Horizontal" and "Vertical" work but horiz is too wide and vert is hard to read.

      2) How do I loop through data sets that do not have the same count, e.g.: <cfset ra=[[30,20,40],[50,10,90,40,70,30],[88,72,64,81]]>? What I want is in the same chart have 3 groups with 1st group of 3 bars from the 1st array, 2nd with 6 bars, 3rd with 4.  The best I've been able to get is 3 groups of 6 bars or 6 groups of 3 bars. CF fabricates the extra bars to make all groups 3X6 or 6X3

      3) How do I loop through the above parent array with cfchartseries and get the first group generate from the first array (or query, struct, etc.), the 2nd group from the 2nd array, 3rd from 3rd array? What I've tried:

       

      <cfloop from="1" to="6" index="ix">
      <cfchartseries serieslabel="#chr(ix+75)#" type="bar">
      <cfloop from="1" to="#arraylen(ra)#" index="iy"><cfif arraylen(ra[iy]) gte ix><!--- this cfif has no effect?!?!?! --->
      <cfchartdata item="#chr(iy+65)#" value="#ra[iy][ix]#">
      </cfif></cfloop>
      </cfchartseries>
      </cfloop>
      <!--- this loop trying to group through ra's 3 interior arrays and make each a group, instead produces 6 groups of 3 bars
      <cfloop from="1" to="3" index="ix">
      <cfchartseries serieslabel="#chr(ix+75)#" type="bar">
      <cfloop from="1" to="#arraylen(ra[ix])#" index="iy">
      <cfchartdata item="#chr(iy+65)#" value="#ra[ix][iy]#">
      </cfloop>
      </cfchartseries>
      </cfloop> --->