-
Notifications
You must be signed in to change notification settings - Fork 79
ViewerState Syntax
The syntax of the ViewerState used by Html5PivotViewer is based on that used by the original Silverlight PivotViewer Control.
The viewer state consists of a collection of key/value pairs, delimited by ampersands (&). Each key/value pair follows the format "[key]=[value]".
There are two types of key/value pairs: those that represent applied filters, and those that represent pairs with special meaning to the PivotViewer.
The key is the name of the filter category and the value is the predicate of the filter. For example , the filter "Manufacturer EQUALS Microsoft" is represented by the key/value pair "Manufacturer=EQ.Microsoft".
The format of the string representation of the applied filter's predicate depends on whether the predicate is "simple" or a bounded range.
A simple predicate consists of a single operator and operand. The string representation follows the form "[operator code].[value]". So for example,
- EQUALS John becomes EQ.John
- GREATER THAN 299792458 becomes GT.299792458
A bounded range predicate consists of two values and two operators that together result in a bounded range. The string representation follows the form "[operator code].[lower bound]_[operator code].[upper bound]". So for example,
- GREATER THAN OR EQUAL TO 1970 and LESS THAN 2014 become GE.1970_LT.2014
- GT - "greater than". Valid only in simple predicates.
- GE - "greater than or equal to". Valid in simple predicates and as the lower bound operator of a bounded range.
- LT - "less than". Valid in simple predicates and as the upper bound operator of a bounded range.
- LE - "less than or equal to". Valid in simple predicates and as the upper bound operator of a bounded range.
- EQ - "equals". Valid only in simple predicates.
These key/value pairs have special meaning for the PivotViewer.
-
$view$ - Valid values are: - 1 (grid view),
- 2 (graph view),
- 3 (table view),
- 4 (map view) and
- 5 (timeline view).
-
$facet0$ - Any facet defined in the collection. This facet is used for sorting. - $selection$ - the number of the selected item.
-
$tableFacet$ - Any facet defined in the collection. If this is set, the table view only displays the value of this facet. -
$mapCentreX$ - Used to set the map centre to other than the default. -
$mapCentreY$ - Used to set the map centre to other than the default. -
$mapType$ - When using Google Maps sets the type of map to display. -
$mapZoom$ - Used to set the map zoom level. - $timelineFacet - Any facet defined in the collection. This sets the facet plotted on the timeline.