Skipping labels in a ColdFusion Chart

This post is more than 2 years old.

Earlier this week I blogged about an issue with ColdFusion charting and scaling to decimal points. While working on the solution, I did a small tweak to the x-axis to the turn the labels vertical. Why? Look what happens when there isn't enough room for the x-axis labels:

Things get scrunchy and random labels are dropped. Changing them to a vertical orientation helps, but what if you don't want vertical labels?

I discovered another option - oddly placed (odd to me anyway) in the "Group" section of the x-axis area in the cart editor:

Skip labels does pretty much what is says - skips labels. Setting it to 1 means it will skip every other label. So using the same data we did from the previous blog entry, I modified the style xml like so:

<xAxis> <labelFormat pattern="#,##0.###"/> <parseFormat pattern="#,##0.###"/> <groupStyle skipLabels="1"/> </xAxis>

This results in:

Which I think is a nice alternative. Here is the vertical version for comparison:

Anyway, I hope this helps someone.

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate for HERE Technologies. He focuses on JavaScript, serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA