//In the header/footer: ${totalCount} - total number of records ${selectedCount} - number of filtered records //In the pre record template - ${<field name>_min} ${<field name>_max} ${<field name>_total} ${<field name>_average}These are the values specified by the user in the filter widgets -
${filter_<field name>_min} //for numeric values ${filter_<field name>_max} ${filter_<field name>} //for enumerated and text values //If the user does not specify a text filter value then just show blank //If the user specifies some text filter value then wrap it with the prefix/suffix ${filter_<field name> prefix='some text prefix' suffix='some text suffix'}Template Examples
{{display type="template" displayStyle="background:rgba(0,0,0,0);" headerTemplate="There are a total of ${selectedCount} peaks between ${filter_elev_min} and ${filter_elev_max} feet with elevation gain between ${filter_elev_gain_min} and ${filter_elev_gain_max} feet ${filter_class prefix=' of class '} ${filter_range prefix=' in the ' suffix=' range'}" filterFields="elev,elev_gain,distance,range,class" hideFilterWidget="true" }}The below display (from here) showing mass shooting data uses two different template displays as defined here.
{{display type="template" headerTemplate="There have been a total of ${totalCount} mass shootings with ${fatalities_total} fatalities and ${injured_total} injured"}} {{display type="template" headerTemplate="Top 3 mass shootings: <br><table cellpadding=5><tr><td></td><td>Fatalities</td><td>Injured</td></tr>" template="<tr><td>${title}</td><td>${fatalities}</td><td>${injured}</td></tr>" footerTemplate="</table>" maxNumber="3" sortFields=fatalities sortAscending=false }}
function="total_ballots/active_voters" functionName="turnout"The full wiki text is:
{{display type="areachart" column="0" layoutHere="true" showTitle="true" title="Line Chart with Function" vAxisMinValue="0" vAxisMaxValue="1.0" padRight="true" function="total_ballots/active_voters" functionName="turnout"}}Percentage values can be calculated with the showPercent attribute. This sums up the values of all of the specified fields and uses the percent value. The data values and or displayed unit of the point data that is displayed in chart can be modified by specifying offset and scale units. For example, one can convert Kelvin to Celsius in a display with the following attributes:
{{display type="linechart" offset1=-"273.15" unit="C" }}
value = (offset1+value)*scale + offset2
{{display type="linechart" Temperature_surface.offset1=-"273.15" Temperature_surface.unit="C" }}
{{displayProperty name="Temperature_surface.offset1" value="-273.15"}} {{displayProperty name="Temperature_surface.unit" value="C"}} {{displayProperty name="Pressure_surface.scale" value="0.01"}} {{displayProperty name="Pressure_surface.unit" value="hPa"}}
patternFilterField="field id" filterPattern="some string" numericFilterField="other field id" numericFilterValue="number" numericFilterOperator=">|>=|==|<|<="e.g.: below would only show data where the 1st matches the string "Texas" and the 3rd needs to be less that 5000.
{{display type="sankey" height="800" patternFilterField="#1" filterPattern="Texas" numericFilterField="#3" numericFilterValue="5000" numericFilterOperator=">" }}
5.5.0 |
Derived Data
|
5.5.1 |
Scaling and offset of data
|
5.5.2 |
Setting shared properties
|
5.5.3 |
Filtering data
|