type_="scatter"
Using <widget class_="chart" type_="scatter">
produces a chart in
which each value is plotted as a separate data point. (Available as of version
10.16)
Syntax
<dynamic> <widget class_="chart" type_="scatter"> [1010data_QUERY] </widget> </dynamic>
The [1010data_QUERY] associated with the widget should result in one or two numeric columns.
If the query results in one column, then the row number is represented on the X axis, and the values in the column are represented on the Y axis.
If the query results in two columns, the values in the first column are represented on the X axis, and the values in the second column are represented on the Y axis.
Attributes for type_="scatter"
breaks_
- Accepts the name of a column that is used to color the scatter plot according to
group.
(Prior to version 10.26, this attribute was named
groupby_
.)
Example: type_="scatter"
The following example creates a chart
widget that displays a scatter plot.
The chart shows the average rainfall greater than 0.5 inches in the Miami area (i.e., zip
codes starting with 331) in the table
pub.demo.weather.wunderground.observed_daily. It uses a
<graphspec>
element to specify the minimum and maximum values
displayed on the x-axis.
<dynamic> <widget class_="chart" type_="scatter" base_="pub.demo.weather.wunderground.observed_daily" title_="Avg Rainfall > 0.5" - Miami (2014)"> <sel value="year(date)=2014"/> <sel value="(beginswith(zipcode;'331'))"/> <tabu label="Tabulation on Observed Daily" breaks="date"> <break col="date" sort="up"/> <tcol fun="avg" name="avgprecipi" source="precipi" label="Average`Precipitation``(inch)"/> </tabu> <sel value="avgprecipi > 0.5"/> <graphspec> <xaxis min="20140101" max="20141231"/> </graphspec> </widget> </dynamic>