Open RevenueVsUnits.xml in your browser. You should see a chart similar to the following screenshot:
What just happened?
We just enabled Harry to compare the revenues of Harry's SuperMart for the last three years, along with the units sold. This chart gives him a perspective on how the revenues are affected by the units sold. Note how this chart has two y-axes, one on the left called primary axis, and one on the right called secondary axis. Each axis has its title defined using two new attributes of the<chart> element, PYAxisName for the primary axis, and SYAxisName for the secondary axis. The attribute YAxisName is not applicable to this chart as there is no common y-axis.
<chart caption='Harry's SuperMart' subcaption='Revenue and Units Sold by Year' xAxisName='Year' PYAxisName='Amount' SYAxisName='Units Sold' numberPrefix='$'>
The numberPrefix attribute gets applied to the primary axes. If we had to specify a number prefix for the secondary axes, we would use the attribute sNumberPrefix.
There are two data series in the chart, the first representing the revenue, and the other containing data on the units sold. The second series, representing quantity, has a new attribute parentYAxis='S' that lets you configure whether this data series is plotted against the primary axis (parentYAxis='P', by default) or the secondary axis (parentYAxis='S'). In our example, as the units sold is to be plotted against the secondary axis, on the right, we have set parentYAxis='S', the other attributes remaining the same as before.
If you were using a 3D chart such as MSColumn3DLineDY.swf, the renderAs attribute is not required, as the chart can only plot columns on the primary axis and lines on the secondary. Just setting parentYAxis='Y' plots the data series as a line against the secondary y-axis.