This project is read-only.
A visualization hint is a string that specifies the desired visualization in short form. Visualization hints can be specified in three places:
  • Global Dataset attribute named VisualHints
  • VisualHints attribute of some variable
  • SetHints method of DataSetViewerControl class

Visualization hints allow you to set almost all properties of visualization (including algorithm) in a single string. For a list of all available visualization styles and their properties see Visualization styles.


VisualHint ::= Target | Target StyleString

Target ::= Identifier | Identifier ( Arguments ) | Identifier [ Arguments ]

Identifier ::= string | "string with spaces"

Arguments ::= Identifier | Identifier, Arguments

StyleString ::= StyleProperties

StyleProperties ::= StyleProperty | StyleProperty; StyleProperties

StyleProperty ::= PropertyName : PropertyValue | Style : StyleName

StyleName ::= string | string ( Arguments ) | string [ Arguments ]

PropertyName ::= string

PropertyValue ::= string

StyleProperty (see syntax above) is a PropertyName:PropertyValue pair (e.g. Stroke:Red), where PropertyName is a property of a visualization class that corresponds to the style specified (e.g. class LineGraphAxisVisualization for "Polyline") and PropertyValue is a value of the property serialized to the string.


x shows variable x with the best appropriate visualization.

x(y) shows variable x dependent on y with the best appropriate visualization.

x[i] shows variable x defined on dimension i with the best appropriate visualization.

x Style:Polyline shows x as a line graph.

air0 Style:Isolines visualization style is isolines.

x Style:Markers; Marker:Circle shows x values by markers, where the marker picture is a circle.

Global VisualHints attribute

When opening a dataset Viewer looks for the global VisualHints attribute and tries to implement all hints specified in it. You can specify multiple hints in the global VisualHints by using the following syntax:

GlobalHints ::= VisualHint | VisualHint ;; GlobalHints

For example, consider a dataset that has the global VisualHints attribute set to:

x Style:Polyline; Stroke:Red;; y Style:PointSet;; z Style:Markers; Marker: Triangle; Color:Red

If this dataset is opened in DataSet Viewer (or assignied to DataSetViewerControl's DataSet property) 3 visualizations will be displayed:
  • Visualization "Polyline" for variable "x" with line color "Red".
  • Visualization "PointSet" for variable "y".
  • Visualization "Markers" for variable "z" with red triangle markers.

Note: in this release DataSet Viewer analyzes the VisualHints global attribute once when it opens the dataset. Further changes of VisualHints are ignored.

SetHints method

The DataSetDataView and DataSetViewerControl classes provide a method to set visual hints programmaticaly at any time. This method clears all existing visualizations and tries to implement new hints.

For example, the following code shows variable x in the best possible way:
DataSetViewerControl control; // Or declared somewhere in XAML
Next example requests more specific visualization:
DataSetViewerControl control; // Or declared somewhere in XAML
control.SetHints("x Style:Polyline; Stroke:Red;; y Style:PointSet;; z Style:Markers; Marker: Triangle; Color:Red");

VisualHints attribute for variable

Dataset Viewer supports specifying a default visualization type for any variable in a dataSet. This visualization will have highest priority when DataSetViewer opens the dataset.

If variable x in the dataset has VisualHints attribute equal to
Style:Polyline; Stroke:Blue

and variable y in the same dataset has VisualHints attribute equal to
Style:Markers; Color:Red

then the default visualization for x will be blue lines and the default for y will be red markers. These visualizations will be displayed in bold in DatasetViewer. VisualHint attributes for variables can be changed at runtime and visualizations will be updated accordingly.

Last edited Mar 24, 2010 at 12:51 AM by pennyo, version 8


No comments yet.