I'm having a problem with cfchart bugging out.

I think it's a problem with the x-axis scaling, although I can't get it to work no matter what I do.

This first came to light when trying to chart numbers over date ranges. Aware of the problems for which dates are notorious, I converted them into yyyymmdd numbers, strings, and even tried incrementing integers, but no matter what I try the result is the same.

Furthermore, I've tried getting my data from queries, arrays, and manually (see example).

The problem is this: if I try and render a line-chart with more than one data series and the item categories aren't absolutely identical the lines break. The values are plotted correctly (as dots), but the lines vanish.

Here's a quick example I just knocked up (arbitrary data/bare minimum code) :

    <cfchartseries type="line">
        <cfchartdata item="20070516" value="10">
        <cfchartdata item="20070517" value="20">
        <cfchartdata item="20070518" value="30">
        <cfchartdata item="20070519" value="40">
        <cfchartdata item="20070525" value="60">
        <cfchartdata item="20070530" value="80">
        <cfchartdata item="20070604" value="90">
        <cfchartdata item="20070609" value="75">
        <cfchartdata item="20070615" value="30">
        <cfchartdata item="20070620" value="20">
        <cfchartdata item="20070624" value="5">
    <cfchartseries type="line">
        <cfchartdata item="20070518" value="10">
        <cfchartdata item="20070520" value="20">
        <cfchartdata item="20070526" value="30">
        <cfchartdata item="20070527" value="40">
        <cfchartdata item="20070603" value="60">
        <cfchartdata item="20070604" value="80">
        <cfchartdata item="20070608" value="90">
        <cfchartdata item="20070612" value="75">
        <cfchartdata item="20070618" value="30">
        <cfchartdata item="20070625" value="20">
        <cfchartdata item="20070627" value="5">

With "sortaxis='yes'" it renders the following:


and with it set to 'no' I get this:


(still broken).

Can anyone suggest how I can get around this? It's impractical to use a common x-axis as not ever date (for example) has an associated value. I've tried using null values but that errors out.

9 Years
Discussion Span
Last Post by coylos

I have the exact same problem. where you able to find a workaround for this?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.