0 Replies Latest reply on Jul 29, 2013 5:21 AM by Scatterblak

    CFChart Workaround for x-axis auto scaling? -- Fixed!


      I'm working in an environment where I have code running on CF 7, 8 and 9 on different boxes. The behavior below occurs on all of them.


      Bascially, CFChart often ignores scaleFrom and scaleTo, depending on the data. You can leave these out and supply a custom xml style file, but the behavior persists - if there's a data point on the boundary of where you want to scale to, CFChart will scale itself vertically to accomodate the data. We see this in our clustered line charts which are designed to be scaled from 0 to 100 - occasionally, a data point of '0' will be in the data, and the y-axis will begin at -20 instead of '0'.  Now, ignoring for the moment that a y-axis defining a range of 0 to 100 should clearly *not* have to scale to have a '0' on it - is there a way to get CFChart to simply not display/truncate data that may be outside the scaleFrom/scaleTo parameters? I'd go as far as to grant that auto-scaling when data is outside the expected bounds of defined scaleFrom and scaleTo parameters should be a desireable default, but it seems fairly obvious that this behavior should be something that the developer could modify. In any case, a CFChart with scaleFrom/scaleTo of 0/100 should be able to display a data point on the boundaries of the scale values without autoscaling the chart.


      This has been a problem for a *long* time -- just wondering if anyone has ever found a workaround to get CFChart to actually honor the scaleFrom and scaleTo parameters as defined by the developer?



      Ok, so I figured it out -- I have a feeling a lot of CF experts herein knew what the problem was right away - it was because the line type was 'curve', and the interpolation algorithm was spinning the curve below 0 for certains equences of values. I'd still like to see this result in a flattened out line for data at the demarcation points (we're not going to have less than a 0% chance of enrollment, and showing a curve that goes down to -3% is confusing to the user) for the sake of accuracy, at least in certain situations.