Woohoo! I love these chart questions. I guess I'm a chart geek. Randy asks:
Is there a way for the bottom labels on a cfchart to show vertically on the graph instead of horizontal.
I bet folks know what I'm going to say. Once again, the built in chart editor comes in handy. This one was pretty simple - I just changed the XAxis/Style/Label/Orientation setting to Vertical. I grabbed the XML and edited it like so:
<frameChart>
<xAxis>
<labelStyle orientation="Vertical"/>
</xAxis>
</frameChart>
Passing this to my chart resulted in the following:
And for comparison's sake, here is horizontal:
You also have options for Slanted and Parallel. Parallel looked mostly like Horizontal, but here is an example of Slanted:
Archived Comments
"the built in chart editor"
That's the second time you've said that, but I'm not sure what it's meant to be built into...
In your CF install folder, go to the charting folder and run webcharts.bat.
Ahh, Linux guy walking, so it's at /opt/coldfusion8/charting/webcharts.sh
That's very cool. Is it documented anywhere ?
I believe so. It doesn't run at all on my Mac, so I use my Windows box when I play with it.
Thanks, I have been looking for this information all day! I love cfchart!!
If you don't want to mess with webcharts you can create an xml file with all of your chart styles defines and then use the style attribute of the cfchart tag to point to your xml file. This gives you the option of applying specific styles to specific types of charts within your app.
I assume that chaning the webcharts.bat impacts all of the charts that are generated on the server. Is there a way to just control the orientation of the labels within my app so as not to affect the orientation for other developers on the server? I saw reference to creating XML file referenced through the style attribute in cfchart, but not really sure how to do that.
Derek, you are incorrect. You never change webcharts.bat. You _run_ it. This runs a program that lets you generate an XML file you can pass to cfchart.
Thanks for the clarification. I think that I just found what you are talking about. Is there any place that I can find some steps to help this newbie succeed?
If you search my blog for cfchart, I don't have a guide per se, but I have a lot of examples. Also google around for Tim Buntel's blog as he did a simply entry _just_ on this topic.
I wonder if anybody has this issue:
I have added Yaxis title, it works fine for 2 bars, but the third bar shows to yaxis title in popup.
your help be apreciated
To Raymond Camden
in spot light type: wc50.jar, click on it, the web chart should load same as PC.
@CfLoozer- yep, I realize that now. No longer using RDP to hit Windows to run the chart editor.
@CfLoozer - got a screen shot or a reproducable case?
The xml file is located here: \cfusion.ear\cfusion.war\WEB-INF\cfusion\charting\styles for me
I'd like to know if it is posible how to make the value label on vertical.
Thank you
Sorry - what part?
I have a chart like this.
<cfchart format="png" chartheight="200" scalefrom="0" labelformat="number" rotated="yes" tipstyle="mouseOver" >
<cfchartseries type="bar" serieslabel="no" >
<cfchartdata item="2000" value="200.0">
<cfchartdata item="2001" value="200.0">
<cfchartdata item="2002" value="250.0">
<cfchartdata item="2003" value="130.0">
<cfchartdata item="2004" value="450.0">
<cfchartdata item="2005" value="250.0">
</cfchartseries>
<cfchartseries type="bar" serieslabel="no" >
<cfchartdata item="2000" value="100.0">
<cfchartdata item="2001" value="100.0">
<cfchartdata item="2002" value="150.0">
<cfchartdata item="2003" value="130.0">
<cfchartdata item="2004" value="250.0">
<cfchartdata item="2005" value="150.0">
</cfchartseries>
<cfchartseries type="bar" serieslabel="Sample 1" datalabelstyle="value" markerstyle="circle">
<cfchartdata item="2000" value="150.0">
<cfchartdata item="2001" value="300.0">
<cfchartdata item="2002" value="250.0">
<cfchartdata item="2003" value="230.0">
<cfchartdata item="2004" value="250.0">
<cfchartdata item="2005" value="450.0">
</cfchartseries>
</cfchart>
I wonder if it is possible to show vertically the values of each element (enabled with datalabelstyle="value" on cfchartseries tag), because now some values are not readable.
Thank you very much.
As far as I can see, from the Chart Designer, there is no way to do this. I'd recommend widening your chart size.
Thank you for your time...
Is this possible in Coldfusion 10?
CF10 still ships the old engine too.
Found this feature for coldfusion 10 thanks to
http://www.cfuser.com/coldf...