With the Update of ColdFusion 9 to ColdFusion 11 the underlying chart engine changed from WebCharts3D to ZingCharts. While I managed to find solutions for most of the incompatibilities between the two libraries and their implementation within the <cfchart>
tag, I'm struggling to sort out an alignment problem which didn't occur in ColdFusion 9. I even didn't find a fix trying pure javascript and HTML.
In WebCharts3D guides and ticks are centered within a bar in a bar chart. Combined line and bar chart have guides going to the center of the bar and through the markers of the line chart. This is exact the same behaviour as in line charts.
In ZingCharts the guides and ticks of a combined chart or a bar chart sits left to the bar and do not go through the markers of the line. This is a different behaviour than in line-only charts. The x-axis labels are perfectly centered in both engines, tho.
You can see an example here: http://jsfiddle.net/yo3uta96/
Problem:
I have none-public pages with statistical weather data showing rain, wind, temperature etc. which are represented in a number of charts one below each other. Some of them are line charts, some of them are bar charts and some of them are combined charts. This is a dynamically created page where users can select a date range up to 365 days in the past. Every chart on the page has the same number of datapoints. When there are more than 80 datapoints to show, then bar charts turn into area charts, line chart into line charts without markers.
What I want to achieve:
I want to have the charts, datapoints, guides and ticks lined up the same way as x-axis labels do.
What I tried:
I managed to line up datapoints by adding offsetStart and offsetEnd to line-only charts, this is necesseary because in a combined chart the first marker of a line chart is placed centered to the corresponding first bar and does no longer sit on the y-axis as in line charts. The same goes for the last marker.
Unfortunately, adding an offset does not solve my alignment problem with ticks and guides. I tried nearly every possible combination with guides, minorTicks, minorGuides and offsets to no avail. In an ideal world and some edgecases where every x-axis label is shown on the chart, disabling guides and setting minor ticks to 1 might work. But this method stops working when increasing the number of datapoints.
Question:
How can I line up guides and ticks in bar charts and line charts with the same number of datapoints in the same way ZingCharts handles x-axis labels which seem to be perfectly aligned across charts?