2 Replies Latest reply on Jun 28, 2016 6:34 AM by gordon va

    vertical text in CFChart for x-axis item

    aziri Level 1
      I had a problem when I view a graph, for example <cfchartdata item="#Depart_Name#" value="#Salary#">. if depart_name to long the name did not be display. how can i DISPLAY Depart_Name in vertical?anyone?
        • 1. Re: vertical text in CFChart for x-axis item
          Level 7
          you can't really, with using just <cfchart>/<cfchartseries> tags...

          you could, of course, set the type="horizontalbar" (if your chart is of
          type bar) and/or use rotated="yes" to switch x and y axis positions, so
          your category items are on the right instead of on the bottom...

          to further customise the appearance of (some) elements of your charts,
          you could copy the default.xml file located in [cf install
          directory]\charting\styles folder into the folder where your
          chart-generating page is located and edit it. you will then use
          style="thenameofyourediteddefaultxmlfile.xml" in the <cfchart> tag to
          apply these edited styles to your chart.

          in that .xml file you can set some defaults for your charts appearance,
          including the
          <labelStyle isHideOverlapped="true" orientation="Horizontal"/>

          change "Horizontal" to "Vertical" to have your leabels display vertically...

          Azadi Saryev
          • 2. Re: vertical text in CFChart for x-axis item
            gordon va Level 1

            Thanks. Clarification - if your xml file is thenameofyourediteddefaultxmlfile.xml then for CF10 and earlier style="thenameofyourediteddefaultxmlfile". Starting with CF11 add the file extension: style="thenameofyourediteddefaultxmlfile.xml". Took me a couple of minutes to figure this out. hope it saves others' time

            So "Horizontal" and "Vertical" work. I'm looking for a way to rotate partially, say 45 degrees. Any ideas?