type_="area"

Using <widget class_="chart" type_="area"> produces a line chart with the area between the plot points and the x-axis filled with a color. (Available as of version 10.16)

Syntax

<dynamic>
    <widget class_="chart" type_="area">
      [1010data_QUERY]
    </widget>
</dynamic>

The [1010data_QUERY] associated with the widget should result in either a single numeric column or else a column of any type followed by one or more numeric columns.

If the query results in a single numeric column, the row number is used as the category.

If the query results in a column of any type followed by one or more numeric columns, the first column specifies the categories and the remaining ones specify separate series which are plotted as different-colored lines.

Example: type_="area"

The following example uses the table pub.doc.retail.salesdetail to create a chart that shows the total sales in January for 2014 and 2015 for store 15 using an area plot for each year.

<dynamic>
  <widget class_="chart" type_="area"
   base_="pub.doc.retail.salesdetail"
   width_="800" height_="600" 
   xlabel_="Day" title_="January Sales (Store 15) - 2014/2015">
    <sel value="month(trans_date)=1"/>
    <sel value="(store=15)"/>
    <willbe name="trans_year" label="Year" 
     value="year(trans_date)" format="type:nocommas"/>
    <willbe name="trans_day" value="day(trans_date)"/>
    <tabu label="Tabulation on Sales Detail" 
     breaks="store,trans_day" cbreaks="trans_year">
      <break col="store" sort="up"/>
      <break col="trans_day" sort="up"/>
      <tcol fun="sum" source="xsales" 
       label="Sum of`Extended`Sales" name="sumsales"/>
    </tabu>
    <colord cols="trans_day,m0,m1"/>
  </widget>
</dynamic>