Skip to main content
Participant
August 21, 2009
Question

CF7 CFCHART Weird Display

  • August 21, 2009
  • 2 replies
  • 1271 views

Hey All,

I've just recently started with coldfusion and I'm trying to make some nice charts for representing past server activity.

I've used webcharts to gerenate a style file (see below) but it comes out looking like this:

GraphData2.png

This is mostly what I want but the labels at the bottom are very strange, I know I'm passing it too many datapoints to display all the labels but it really goes quite funny towards the end, I don't really want to pass it less data points because this is pretty much as granular as I require. I can't find the right options to get this looking right, does anybody know if I can remedy this or if it's just a bug of some kind?

My CFCHART syntax is as follows:

<cfchart format="png"

     chartwidth="#chart_width#"
     chartheight="#chart_height#"
     labelformat="number"
     yaxistitle="#server_tests.getFriendlyName()#"
     xaxistitle="Timestamp"
     style="../../view/charts/chart.xml">
     <cfchartseries type="#server_tests.getChartType()#"
                    query="my_query"
                    valuecolumn="value"
                    itemcolumn="timestamp" />
</cfchart>

My chart.xml is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<frameChart>         
     <frame xDepth="0" yDepth="0" outline="black" frameSize="30"
          dashSize="6" isVGridVisible="true" stripColor="white">
          <background minColor="#FDFEF6"/>
     </frame>
         
     <legend isVisible="false" />
         
     <xAxis isAntialiased="true">
          <labelStyle isMultiline="false" isHideOverlapped="true" orientation="Vertical"/>
          <titleStyle margin="10" font="Verdana-10-bold" />
     </xAxis>
         
     <yAxis isAntialiased="true">
          <titleStyle margin="10" font="Verdana-10-bold" />
     </yAxis>
         
     <elements place="Stacked" shape="Step" outline="#8000FF" markerSize="1"
          shapeSize="60" drawOutline="false" drawShadow="false">
          <morph morph="None" stage="None"/>
     </elements>
</frameChart>

Any ideas would be greatly appreciated!

Cheers,

OP

    This topic has been closed for replies.

    2 replies

    Inspiring
    August 22, 2009

    i agree with cfsearching, you should try that. Also i would use instead png format flash:

    <cfchart format="flash".........

    Inspiring
    August 21, 2009

    Try using the skipLabels property. See if that helps.

    http://cfsearching.blogspot.com/2008/10/silly-cfchart-tweaks.html

    Participant
    August 22, 2009

    @cfsearching: Thanks for that link, it looks very useful! I'll certainly try that when I get into work on monday. I'll update with my results.

    @pirula: I have tried flash as well as other image formats but it looks identical (which is actually pretty amazing, I think). I need to use an image-type for now anyway because I'm converting the same page to PDF and flashpaper with CFDOCUMENT - I don't know if they'll include the graphs properly if I chose flash for the CFCHARTs

    Thanks for your input ,

    OP