|
${<field name> <modifiers> }For example, if your record has a field "title" you can set a tooltip with:
tooltip="Title: ${title}"Template Modifiers
${date_field format="yyyymmdd"}Other modifiers include:
//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
{The below display (from here) showing mass shooting data uses two different template displays as defined here.{display_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" }}
{{display_template headerTemplate="There have been a total of ${totalCount} mass shootings with ${fatalities_total} fatalities and ${injured_total} injured"}} { {display_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:
{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.{display_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"}}
{There are also scale and offset2 values supported where the end value is calculated as:{display_linechart offset1=-"273.15" unit="C" }}
value = (offset1+value)*scale + offset2
{{display_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_sankey height="800" patternFilterField="#1" filterPattern="Texas" numericFilterField="#3" numericFilterValue="5000" numericFilterOperator=">" }}