Hi. I am trying to make a chart displaying counts of news articles by day as a horizontal bar overlayed with an average sentiment (+/-) line chart. I suppose it would need different scales on the left/right. I'm not sure how to accomplish this. The docs present them as different kinds of charts. Can anyone point me in the right direction?
Re: How to make a bar chart overlaid with a line chart?
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();