KavaChart in Action - Examples and Documentation - AlaCarte

[ Back ] Specialty Applet Collection - Multi-Axis Charts

Some charts need to compare data items with very different scales. For example, you might want to compare velocity with fuel consumption, or stock prices with sales volumes.

Charts like this use Y axes on the left and the right side to describe the dual numeric scales that are being compared. Generally the X axis is shared.

KavaChart AlaCarte's Specialty applet collection includes these multi-axis charts:

  • com.ve.kavachart.applet.twinAxisBarAreaApp
  • com.ve.kavachart.applet.twinAxisBarLineApp
  • com.ve.kavachart.applet.twinAxisStackBarLineApp
  • com.ve.kavachart.applet.twinAxisLineApp
KavaChart's ChartWizard can help you design these charts, or you can build them by editing the parameters directly.
 

This chart combines two data types, a bar and a line, to show one year's weekly spending and cumulative spending in the same chart. In this applet, one axis is assigned to the bar data type and the other axis is assigned to the line. You can have multiple datasets of either data type. By default, the line data is assigned to the left axis and the bar data is assigned to the right axis.

To reassign data to a different chart tye and (implicitly) a different axis, change the param "dataset0Type". To reassign the axes to different sides, use "yAxisOptions" and "auxAxisOptions" with the option "leftAxis" or "rightAxis". All bar axis parameters begin with "auxAxis". For example, "auxAxisEnd" will hint where the bar axis should end.

Line charts visually imply trends, and bar charts are used for comparing discrete observations. That makes a chart like this best for describing a trend that accompanies a set of observations.

 

Areas also convey trends. This chart uses the same parameter definition as the previous chart, but uses "barAreaApp" instead of "barLineApp". In some ways this chart does a better job of emphasizing the individual weeks' numbers, since the cumulative data is beneath the weekly data bars.

Since we also changed from a line with markers to an area without clear delineations, the trending nature of our cumulative numbers is emphasized over the actual values at any given point.