This tool is currently in BETA.
This tool is still in BETA. This means it may be subject to change. If that happens, please update usage of the functionality in your Project accordingly.
Tygron Platform Reporting Utilities
The process starts by obtaining the indicated Item from the running Tygron Session. If the result is valid HTML, all elements in the HTML document are checked for specific attributes indicating that specific data from the session must be injected into those elements.
Though this process, a dashboard or other report can be created by having a single Item with an outline of the desired report, with HTML element indiicating which data from the Session goes where. The result is a filled-in dashboard, report, or other output.
Data can be parsed from various Items in the Tygron Session. Indicating which Item to parse is sufficient to obtain the relevant html output of that Item.
All parsers
data-parser
Indicates that a parser should be used to compute the content of this element. Without this attribute, the element is not parsed. It is recommended to set this attribute's value to 1, for future robustness.
data-item-type
The type of Item to parse, and the results of which to inject in this element.
data-item-id
The ID, or name, of the Item to parse, and the results of which to inject in this element.
data-include-name
If present, prepend the computed output of the Item with the name of the Item.
data-parser-errors
When true, try to output errors and warnings as much as possible. When false, try to avoid adding errors or warnings to the output.
Panels and Indicators
data-property
Get the specified property of the indicated Item.
data-table
Get the table of the indicated Item. If this attribute is numeric, get the n-th table from the Item's output, with the table at index 0 being the first. If this attribute is not numeric, just get the first table.
data-table-matrix
When this attribute is present, get the data from the indicated table as a matrix of values.
data-table-coordinate
When this attribute is present and structured as an array with exactly 2 numeric values, get the data from that coordinate in the indicated table.
data-table-x
When this attribute is present, get only the data whch can be found in the column specified by this value, with the column at index 0 being the first.
data-table-y
When this attribute is present, get only the data whch can be found in the row specified by this value, with the row at index 0 being the first.
data-table-skip-columns
When this attribute is present as a single number N, ignore the first N columns in the table when retrieving data from it. When present as an array with exactly 2 values N and M, ignore the first N columns and the last M columns. When skipping columns, the range in which data-table-x or data-table-coordinate will find seek data will start at the first not-skipped column
data-table-skip-rows
When this attribute is present as a single number N, ignore the first N rows in the table when retrieving data from it. When present as an array with exactly 2 values N and M, ignore the first N rows and the last M rows. When skipping rows, the range in which data-table-y or data-table-coordinate will find seek data will start at the first not-skipped row
data-table-direction-horizontal
When using data-table-matrix, data ranges are assumed to be in the vertical direction. When this attribute is present and true, data ranges are assumed to be in the horizontal direction.
Overlays
data-overlay-base
The id, or an array of ids, of Overlays to insert as basemap underneath the displayed data.
data-overlay-legend-html
If present, generate an HTML legend and include it in the output following the image of the Overlay itself.
data-overlay-legend-wms
If present, include the WMS legend image in the output following the image of the Overlay itself.
data-overlay-width
If present, the desired width in pixels of the included image. If absent, the default is an amount of pixels equal to the Project's width in meters.
data-overlay-height
If present, the desired height in pixels of the included image. If absent, the default is an amount of pixels equal to the Project's height in meters.
data-overlay-bbox-size-x
If present, the width in meters of the Project's extent to include in the image, centered around the center of the Project extent.
data-overlay-bbox-size-y
If present, the height in meters of the Project's extent to include in the image, centered around the center of the Project extent.
data-overlay-bbox-size
If present as an array of 2 values, this attribute is a shorthand to provide data-overlay-bbox-size-x and data-overlay-bbox-size-y respectively.
data-overlay-bbox-inset-x
If present, remove this many meters from the west and east sides of the project extent to create the image of.
data-overlay-bbox-inset-y
If present, remove this many meters from the north and south sides of the project extent to create the image of.
data-overlay-bbox-inset
If present as an array of 2 values, this attribute is a shorthand to provide data-overlay-inset-size-x and data-overlay-inset-size-y respectively.
data-overlay-base64
By default, the output has image tags with urls referring to the Session as it currently runs. When this attribute is present, the images are instead hard-coded into the HTML, allowing the resulting image to persist even when the Session is closed.
After data has been parsed from a session, a processor can provide different ways to display the resulting information.
All processors
data-processor
The name of one processor (or multiple names of processors as an array) to run after a parser has obtained data.
Arithmetic
data-arithmetic-separator
Which symbol in values processed is used as a decimal separator. By default, the full-stop (".") is used.
data-arithmetic-add
Add the number (or collection of numbers) together. If the provided value for this attribute is numeric, the value of the attribute is added to the result as well.
data-arithmetic-mult
Multiply the number (or collection of numbbers) together. If the provided value for this attribute is numeric, the value of the attribute is multiplied with the result as well.
data-arithmetic-avg
Get the average of the number (or collection of numbers). If the provided value for this attribute is numeric, include that number in the dataset as well before calculating the result.
data-arithmetic-coerce
Turn the obtained value (or array of values, or matrix of values) into a numeric dataset of the same complexity. Non-numeric values are discarded.
data-arithmetic-coerce-array
Turn the obtained value (or array of values, or matrix of values) into a 1-dimensional array of numeric values. Non-numeric values are discarded.
data-arithmetic-coerce-number
Turn the obtained value or datastructure into a single numeric value. If the datastructure contains more than 1 value, only the first numeric value is obtained.
data-arithmetic-lowest
Of the value (or array of values, or matrix of values) remaining, obtain the lowest value of all values found. If the provided value for this attribute is numeric, include that value in the consideration for lowest number.
data-arithmetic-highest
Of the value (or array of vaues, or matrix of values) remaining, obtain the highest value of all values found. If the provided value for this attribute is numeric, include that value in the consideration for highest number.
Graph
data-graph-pie
If present, display the obtained data is a pie chart.
data-graph-legend
If present, add a generated html legend to the output. If defined as an array, the following elements can be added to the array in the order defined in the array: name, color, percentage, value, unit.
data-graph-data
If the data to display is a matrix, at which index of the matrix the data for the graph can be found.
data-graph-unit
If present, the unit which to append to all values in the legend. If the value is an array, it is assumed to defined a unique unit for each value in the dataset.
data-graph-labels
If present, defines the labels to attach to the data. Can be either an array, in which case it sequentially lists the labels for the data in the dataset, or a numeric index, in which case it indicates at which index of the matrix the labels for the data can be found.
data-graph-colors
If present, defines the html colors to attach to the data. Can be either an array, in which case it sequentially lists the colors for the data in the dataset, or a numeric index, in which case it indicates at which index of the matrix the colors for the data can be found.
data-graph-order-labels
If present and true, when generating labels automatically, indicates the labels should be generated in order of the data as it appears. If not present, the largest data values will have the first generated labels
data-graph-order-colors
If present and true, when generating colors automatically, indicates the colors should be generated in order of the data as it appears. If not present, the largest data values will have the first generated colors
data-graph-order
If present and true, will set all other data-graph-order-* parameters to true, if they are not already explicitly set to false.