The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages - More
> ColdFusion Development
|
Cfchart -- time on x-axis
Discuss Cfchart -- time on x-axis in the ColdFusion Development forum on Dev Shed. Cfchart -- time on x-axis ColdFusion Development forum discussing CFML coding practices, tips on CFML, and other CFML related topics. Find out why ColdFusion is the tool of choice for many e-commerce developers.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

April 7th, 2011, 03:30 PM
|
|
Contributing User
|
|
Join Date: Nov 2004
Posts: 72

Time spent in forums: 1 Day 8 h 37 sec
Reputation Power: 9
|
|
|
Cfchart -- time on x-axis
I'm trying to use cfchart to graph network traffic over the past 24 hours. The problem is that it's creating a tick on the x-axis for the time on every data point, and therefore can't show the tick labels because they're too squished together. Is there a way I can make it only show a tick at each hour while still maintaining all of the data points?
Here's the code I'm using:
Code:
<cfchart format="jpg" xaxistitle="Time" yaxistitle="Mbps" xaxistype="category" showlegend="true" chartwidth="750" chartheight="400" labelformat="number" showmarkers="false" showygridlines="true">
<cfchartseries type="line" serieslabel="Inbound" seriescolor="blue">
<cfloop query="attributes.traffic">
<cfchartdata item="#TimeFormat(attributes.traffic.datetime, "HH:mm")#" value="#attributes.traffic.inbound#">
</cfloop>
</cfchartseries>
<cfchartseries type="line" serieslabel="Outbound" seriescolor="green" >
<cfloop query="attributes.traffic">
<cfchartdata item="#TimeFormat(attributes.traffic.datetime, "HH:mm")#" value="#attributes.traffic.outbound#">
</cfloop>
</cfchartseries>
</cfchart>
Last edited by rawk : April 7th, 2011 at 04:44 PM.
|

April 7th, 2011, 06:15 PM
|
|
Moderator
|
|
Join Date: Jun 2002
Location: Raleigh, NC
|
|
Without actually seeing it, it's hard to say. You can try specifying a value for the "gridLines" attribute. But if none of the available attributes seem to do what you need, you can try defining your own chart style ( http://help.adobe.com/en_US/ColdFus...22c24-74f2.html ).
|

April 11th, 2011, 11:29 AM
|
|
Contributing User
|
|
Join Date: Nov 2004
Posts: 72

Time spent in forums: 1 Day 8 h 37 sec
Reputation Power: 9
|
|
Here's the image it produces:
Image 750
Here's the same image only rendered with a width of 7500 instead of 750. On this image, you can actually see the numbers along the x-axis.
Image 7500
I just tried the gridLines attribute, but it only seems to affect horizontal gridlines.
|

April 11th, 2011, 07:27 PM
|
|
Moderator
|
|
Join Date: Jun 2002
Location: Raleigh, NC
|
|
|
Yeah, then it may indeed be something you need to tweak in the style XML. I haven't messed with it a lot myself, but I know that there are a ton of options exposed by the XML styling.
|

April 15th, 2011, 11:20 AM
|
|
Contributing User
|
|
Join Date: Nov 2004
Posts: 72

Time spent in forums: 1 Day 8 h 37 sec
Reputation Power: 9
|
|
|
Thanks for the input, Kite. I was afraid of that.
|

June 16th, 2011, 04:54 AM
|
|
Registered User
|
|
Join Date: Jun 2011
Posts: 2
Time spent in forums: 22 m 9 sec
Reputation Power: 0
|
|
|
Hi Rawk just wondered if you ever got a fix for this ? I am having the same issue with the date time format.
|

June 16th, 2011, 09:49 PM
|
|
Contributing User
|
|
Join Date: May 2008
Posts: 117
Time spent in forums: 17 h 16 m 2 sec
Reputation Power: 6
|
|
Quote: | Originally Posted by Stevie72 Hi Rawk just wondered if you ever got a fix for this ? I am having the same issue with the date time format. |
The setting you are looking for is called "skipLabels". Use the webcharts utility to see it action. Create a bar chart > select xAxis > Group > Skip Labels
|

June 21st, 2011, 02:12 PM
|
|
Contributing User
|
|
Join Date: Nov 2004
Posts: 72

Time spent in forums: 1 Day 8 h 37 sec
Reputation Power: 9
|
|
Quote: | Originally Posted by Stevie72 Hi Rawk just wondered if you ever got a fix for this ? I am having the same issue with the date time format. |
Unfortunately, I did not. I'm actually using Open BlueDragon and xml chart styles are not yet supported. I will soon be looking into a third party graphing utility that I can use as Java plugin.
|

June 23rd, 2011, 02:51 AM
|
|
Moderator
|
|
Join Date: Jun 2002
Location: Raleigh, NC
|
|
|
It's going to be HIGHLY unlikely that the charting system will ever have parity on the other CFML engines because they are not free. Adobe pays a lot of money to have this integration, and the alternative engines would be hard pressed to generate a comparable agreement.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|