Hi Steve,
The following is an example included in the ChartDirector distribution that displays a bar chart overlaid with a line chart, with two different scales on left / right.
https://www.advsofteng.com/doc/cdperl.htm#dualyaxis.htm
For your requirement, I am not sure exactly the chart type you need. You mentioned "horizontal bar". Does it mean that the bars are horizontal like the followings?
https://www.advsofteng.com/doc/cdcpp.htm#gradientbar.htm
In the above example, the bars are horizontal, and the left axis displays the date, and the top axis is the value. You mentioned above "left/right" scale. If the left scale is date, what is the right scale for your chart? Also, does the line flow from left to right, or from top to bottom?
If what you want is like the first example above, but with the bars horizontal and the line flowing vertically, you can simply call $c->swapXY();. In this case, the left/right axes will become top/bottom axes. The line will flow from bottom to top (the origin is at the bottom-left corner). If you want the line to flow from top to bottom, you can call $c->xAxis()->setReverse();
Regards
Peter Kwan |