I would like to limit the x-axis of my chart that is created by cfchart
. I see the attribute scaleFrom
and scaleTo
that limit the y-axis, but I see nothing that limits the x-axis.
Also, I saw a similar question here: ColdFusion Chart x-axis label limits but neither of the answers were appropriate. ScaleMin and ScaleMax do not exists as far as I can tell and the other answer is more complicated than what I'd like to do.
The
scaleMin
andscaleMax
attributes Saul mentioned are only available when using a custom style. Note, using type "scale" means your xAxis values must be numeric. If you want to use strings, you will probably need to use Ben's approach instead.Here is a quick example that creates a chart with 24 points on the xAxis. Even though the query only contains the first six (6) points.