Editors / Property Editors
In This Topic
    Property Editors
    In This Topic

    When working with Nevron Web Parts, you typically visually edit the properties of the different chart/gauge elements, through property editors. There are several primitive types of property editors:

    More complex property editors - such as the Fill, Stroke, Shadow, Text etc. FX editors are composed by primitive editors.

    When the property, whose value is exposed by the property editor allows specification through an expression, the property editor will display an FX button at its right side. Nearly all properties of the web parts in the Nevron SharePoint Vision suite can be specified by expressions. When you create an expression for a specific property, you need to ensure that the value to which this expression evaluates is convertible to the property value type. For example, if you author an expression for a boolean property, this expression needs to evaluate to true or false, or be convertible to a boolean value.

    Primitive types editors, follow a common structure. The label of a primitive editor is the name of the property, which the editor controls. The label is followed by a constant value control, which lets you select a constant value for the property. The constant value control is specific for each type of property editor - for a boolean property editor it is a check box, for a numeric property editor it is a numeric up/down etc. The editor ends with an FX button, that lets you edit the expression, which specifies the value of the property when the web part is displayed in runtime. In case a property value is specified by an expression, the constant value control is automatically replaced by an FX box, that shows the expression, currently associated with the property. You can revert the property value to a constant one, by clicking on the FX box.

    The only exception from this common structure is the String Property Editor, because expressions are actually strings that begin with the = (Equals) character. That is why the String Property Editor simply lets you type a string - if it begins with the = (Equals) character, the web part automatically considers it as an expression.

    Following are more more details about the property editors:

     Boolean Property Editors

    The following images illustrate the appearance of a boolean property editor (for a Chart or Gauge Title) when it shows a static and expression based values:

    A boolean property editor, for a property with constant TRUE value.
    A boolean property editor, for a property with a value that is based on expression. In this case it is bound to a boolean parameter.

    When authoring expressions for boolean properties, you need to ensure that their result is convertible to a boolean value - true or false. The Pivot Functions  AND, NOTOR return boolean values. In expressions you can record boolean values with the true and false constants. For example the following expression is valid for a boolean property: =IF(SUM(Fields!Revenue.Value) > 500, true, false), since it always evaluates to a boolean value.

     Numeric Property Editors

    The following images illustrate the appearance of a numeric property editor (for a Bar Chart Width Percent property) when it shows a static and expression based values:

    A numeric (floating point) property editor, for a property with a constant 70.00 value.
    A numeric property editor, for a property with a value based on expression. In this case it is bound to a float parameter.

    When authoring expressions for numeric properties, you need to ensure that their result is convertible to a numeric value.

     Enumeration Property Editors

    The following images illustrate the appearance of an enumeration property editor (for the Bar Chart Shape property) when it shows a static and expression based values:

    An enumeration property editor, for a property with a Smooth Edge Bar constant value.
    An enumeration property editor, for a property with a value based on expression. In this case it is bound to a String parameter.

    When authoring expressions for enumeration properties, you need to ensure that their result is convertible to the target enum type. A valid enum value is either a string that matches one of the enumeration values, or a number that is inside the enumeration range. When an enumeration property editor supports expression based values, it appends the integer number that corresponds to the enum value at the end of each option. The following expressions will select the Smooth Edge Bar option through an expression:

    ="SmoothEdgeBar"
    ="Smooth Edge Bar"
    ="smoothedgebar"
    ="smooth edge bar"
    =7

    If the input value cannot select a valid enumeration option, the default property value for the property is used.

     Color Property Editor

    The following images illustrate the appearance of an color property editor (for the Fill FX - Color property) when it shows a static and expression based values:

    A color property editor, for a property with an OrangeRed selected value.
    A color property editor, for a property with a value based on expression. In this case it is bound to a String parameter.

    When authoring expressions for color properties, you need to ensure that their result is convertible to a color value. A valid color value is a string that matches one of the supported color formats. Following are the string formats that are supported for color values:

    • HTML Formatted Color - these are opaque colors specified by six hex values, paired in RGB pairs. The following expression examples all evaluate to opaque red color:
      ="#FF0000"
      ="0xFF0000"
      ="&HFF0000"
    • Named Color - a string that matches one of the predefined named colors. The following expression examples are all valid named colors:
      ="Red"
      ="red"
      ="green"
      ="blue"
    • RGB or ARGB Color - a string embraced in ( ), or [], or { } braces, that contains 3 or 4 numbers separated with commas that define the RGB or ARGB color components in [0:255] range. The following expression examples all evaluate to valid colors:

      ="(255,0,0)" - opaque red
      ="(128,255,0,0)" - semi-transparent red

      ="[255,0,0]" - opaque red
      ="[128,255,0,0]" - semi-transparent red

      ="{255,0,0}" - opaque red
      ="{128,255,0,0}" - semi-transparent red
    You can use the ARGB and RGB text functions, which produce a text string that is valid for specification for a color property value.
     Appearance Property Editors

    The fill, stroke, shadow and text appearance property are very similar to the other property editors. The constant value control of these editors shows the respective constant appearance style editor. The FX button of appearance property editors however does not display the default FX Editor (like all other property editors do), but instead displays an editor in which you can define the fill, stroke, shadow and text style respectively, by mixing constant and expressions based property values. These are known as appearance style FX Editors. When an appearance style FX Object controls the appearance style exposed by a certain fill, stroke, shadow or text property, the constant value control is replaced by an FX Box that indicates that.

    The following table summarizes the relation between the appearance type and its constant and FX editors.

    Appearance Property Type Constant Editor FX Editor
    Fill Fill Style Editor Fill Style FX Editor
    Stroke Stroke Style Editor Stroke Style FX Editor
    Shadow Shadow Style Editor Shadow Style FX Editor
    Text Text Style Editor Text Style FX Editor