• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

vertical text in CFChart for x-axis item

New Here ,
Jun 21, 2007 Jun 21, 2007

Copy link to clipboard

Copied

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?
TOPICS
Advanced techniques

Views

2.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 21, 2007 Jun 21, 2007

Copy link to clipboard

Copied

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
<xAxis>
<labelStyle isHideOverlapped="true" orientation="Horizontal"/>

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

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 27, 2016 Jun 27, 2016

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 01, 2020 Apr 01, 2020

Copy link to clipboard

Copied

LATEST

i found this: https://stackoverflow.com/questions/34137728/coldfusion-11-cfchart-xaxis-format

i create this variable: <cfset myStruct = {"item"={"font-angle"=-45}}/>

then in your cfchart tag set attribute xAxis="#myStruct#"

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation