1 / 44

Extensible Visualization Property Model Cognos BI 10.2.2

Azalia Shamsaei. Extensible Visualization Property Model Cognos BI 10.2.2. Agenda. Introduction to Extensible Visualization property model Demo RAVE template Parameters Parameter Values IBM Cognos Visualization Customizer tool Limitations Work Flow Q & A.

Download Presentation

Extensible Visualization Property Model Cognos BI 10.2.2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Azalia Shamsaei Extensible Visualization Property Model Cognos BI 10.2.2

  2. Agenda • Introduction to Extensible Visualization property model • Demo • RAVE template • Parameters • Parameter Values • IBM Cognos Visualization Customizer tool Limitations • Work Flow • Q & A

  3. Extensible Visualization property model • Define Properties for a Visbundle (using IBM Cognos Visualization Tool) • Property types supported: Integer, decimal, string, boolean, enum, color, font • Ability to create property groups • Import Visualization with Properties into IBM Cognos BI • Consume in Report Studio and Cognos Workspace Advanced • Displays in property sheets

  4. Extensible Visualization Parameters to Properties Report Studio Rave Chart Properties

  5. What is a RAVE Template? • A RAVE Template is part of the visJson • The RAVE visJson can have 3 sections • Parameters Array: ("parameters") contains a list of parameter items. • Parameter Values: ("parameterValues") contains values for parameters items defined in the parameter arrray. This is optional and is used for testing. • RAVE Spec: this is the standard RAVE spec

  6. Parameter Attributes - id, type: { "parameters":[ { "id": "setFontStyle", "type": "font", } ], .... <rave specification to be modified> .... }

  7. Parameter Attributes – label, description, defaultValue: { "parameters":[ { "label": "Set font style for title.", "description": "Set font style for title", "defaultValue": { "family": "Verdana"}, }, ] .... <rave specification to be modified> .... }

  8. Parameter Attributes - required: { "parameters":[ { "required": false, }, ] .... <rave specification to be modified> .... }

  9. Parameter Attributes - resolution: { "parameters":[ { "resolution": [ { "method": "set", "target": "/titles[0]/style/font", "sourceParameter": "setFontStyle" } ] } ], <rave specification to be modified>

  10. Resolution – Mechanism to define action: { "parameters":[ { "resolution": [ { "method": "remove", "target": "//elements[0]/label[*]/style/font/size” } ] } ], <rave specification to be modified> }

  11. Target – xpath syntax:

  12. Target – xpath syntax examples:

  13. Resolution - method:

  14. Resolution – method example: { "parameters":[ { "id": "eltLabelSize", "type": "integer", "resolution": [ { "method": "createOrSet", "target": "//elements[0]/label[*]/style/font/size”, "sourceParameter": " eltLabelSize " } ] } ], <rave specification to be modified> }

  15. Resolution – Mechanism to define action (cont.): • In order to set an attribute value, resolution must tell Template framework what value to use or at least, where to look for value.

  16. Resolution – SourceValue example: { "parameters":[ { "id": "bigFontSize", "type": "integer", "defaultValue": 12 "resolution": [ { "method": "createOrSet", "sourceValue": 22, "target": "//elements[0]/label[*]/style/font/size” } ] } ], <rave specification to be modified> }

  17. Resolution – SourceParameter example: { "parameters":[ { "id": "setFontSize", "label": "Create a font size style and set its value.", "type": "integer", "defaultValue": 12 "resolution": [ { "method": "createOrSet", "sourceParameter": "setFontSize", "target": "//elements[0]/label[*]/style/font/size” } ] } ], <rave specification to be modified> }

  18. Resolution – SourcePath : { "parameters":[ { "id": "copyStyle", "required": false, "type": "string", "defaultValue":“solid", "resolution": [ { "method": "createOrSet", "target": "/grammar[0]/coordinates/dimensions[0]/axis[0]/gridStyle", "sourcePath":"/grammar[0]/coordinates/dimensions[1]/axis[0]/gridStyle", } ] } ], <rave specification to be modified> }

  19. Parameter Attributes - resolutionCases: { "parameters" : [ { "id":"palette", "type":"string", "required":false, "description":"Set the palette.", "defaultValue":"Classic", "resolutionCases": [ { "resolutionCase":"Classic", "resolution": [ { "method":"set", "target":"/grammar[0]/elements[0]/color[0]/palette", "sourceValue": [ "#000066" ] } ] }, { "resolutionCase": "Flow", "resolution": [ { "method":"set", "target":"/grammar[0]/elements[0]/color[0]/palette", "sourceValue": ["#1183ad"] } ] } ] },} ] }

  20. Parameters Attributes – resolveOrder:

  21. Parameters Attributes – resolveOrder: { "parameters": [{ … "resolution": [{ "method": "createOrSet", "target": "//cordinates/transforms[0]/type“ "sourceValue": "transpose" }], … "resolveOrder": 10, "resolution": [{ "method": "createOrSet", "target": "//cordinates/transforms[0]/type", "sourceValue": "stack" }], … "resolveOrder": 1, "resolution": [{ "method": "remove", "target": "//cordinates/transforms" }] }]} <rave specification to be modified> } 3 2 1

  22. Parameter Values • Parameter Values are a simple way to valid and test the parameters in the visJson • The parameter value is set to the parameter defined in ‘parameters’ array. • Parameter value is matched to its corresponding parameter using its ‘id’. • ‘parameterValues’ can be part of same Template file that contains ‘parameters’ and Rave spec or it can be specified as a separate file

  23. Parameter Values:

  24. Parameter Values - example: • Below example provides value for the parameter with id “setFontStyle”. Value defined in parameterValues overrides ‘defaultValue’ defined inside parameter. { "parameterValues": [ { "id": "setFontStyle", "value": {"size":"18pt","style":"italic", "family":"arial"} } ], "parameters":[ { "id": "setFontStyle", "type": "font", "label": "Set font style for title.", "description": "Set font style for title", "defaultValue": { "family": "Verdana"}, } ]

  25. Parameter Values: • Provides value to the parameter defined in ‘parameters’ array. Parameter value is matched to its corresponding parameter using its ‘id’. ‘parameterValues’ can be part of same Template file that contains ‘parameters’ and Rave spec or it can be specified as a separate file.

  26. IBM Cognos Visualization Customizer tool Limitations 1: When you generate a vizbundle, by default, the properties are not grouped. Show Gridlines { "id":"showGridlines", "required":false, "defaultValue":true, "type":"boolean", "resolutionCases": [ { "resolutionCase":false, "resolution": [ { "method":"remove", "target":"/grammar[*]/coordinates/dimensions[*]/axis/gridStyle", "sourceParameter":"showGridlines" }] } ] },

  27. IBM Cognos Visualization Customizer tool Limitations 1: When you generate a vizbundle, by default, the properties are not grouped. Gridline Style { "id":"gridlineStyle", "required":false, "defaultValue":"Solid", "type":"string", "resolution": [ { "method":"createOrSet", "target":"/grammar[*]/coordinates/dimensions[*]/axis/gridStyle/stroke/style", "sourceParameter":"gridlineStyle" } ] },

  28. IBM Cognos Visualization Customizer tool Limitations 1: When you generate a vizbundle, by default, the properties are not grouped. You can manually add groups to chart type definition xml file. <propertiesGroup name="numericAxisProperties"> <groupProperties> <booleanProperty name="showGridlines"> <label ids='lblShowGridlines'/> <tooltip ids='tooltipShowGridlines'/> <description ids="descShowGridlines"/> <defaultBoolean>true</defaultBoolean> </booleanProperty> <stringProperty name="gridlineStyle"> <label ids='lblGridlineStyle'/> <tooltip ids='tooltipGridlineStyle'/> <description ids="descGridlineStyle"/> <defaultString>Solid</defaultString> </stringProperty> </groupProperties> <label ids="lblNumericAxisGroup">Numeric Axis</label> </propertiesGroup> Group numericAxis properties

  29. IBM Cognos Visualization Customizer tool Limitations 1: When you generate a vizbundle, by default, the properties are not grouped. You can manually add groups to chart type definition xml and string resource file. Add group properties “unique name” in chart type definition <propertiesGroup name="numericAxisProperties"> <groupProperties> <booleanProperty name="showGridlines"> <label ids='lblShowGridlines'/> <tooltip ids='tooltipShowGridlines'/> <description ids="descShowGridlines"/> <defaultBoolean>true</defaultBoolean> </booleanProperty> <stringProperty name="gridlineStyle"> <label ids='lblGridlineStyle'/> <tooltip ids='tooltipGridlineStyle'/> <description ids="descGridlineStyle"/> <defaultString>Solid</defaultString> </stringProperty> </groupProperties> <label ids="lblNumericAxisGroup">Numeric Axis</label> </propertiesGroup> 1 Results in Report Studio 2 Add string ID “unique name” in string resource file lblNumericAxisGroup=Numeric Axis

  30. IBM Cognos Visualization Customizer tool Limitations 2: When you generate a vizbundle, by default, the enum property is not generated in the xml file. You can manually add enum to chart type definition xml file. { "id":"gridlineStyle", "required":false, "defaultValue":"Solid", "type":"string", "resolution": [ { "method":"createOrSet", "target":"/grammar[*]/coordinates/dimensions[*]/axis/gridStyle/stroke/style", "sourceParameter":"gridlineStyle" } ] },

  31. IBM Cognos Visualization Customizer tool Limitations 2: You can manually add enum to chart type definition xml file. <enumProperty name="gridlineStyle"> <enumValues> <enumValue value="Solid"> <label ids="lblSolid">Solid</label> </enumValue> <enumValue value="LongDash"> <label ids="lblLongDash">Long Dash</label> </enumValue> <enumValue value="LongDashDot"> <label ids="lblLongDashDot">Long Dash Dot</label> </enumValue> <enumValue value="LongDash"> <label ids="lblLongDash">Long Dash</label> </enumValue> <enumValue value="ShortDash"> <label ids="lblShortDash">Short Dash</label> </enumValue> <enumValue value="ShortDashDot"> <label ids="lblShortDashDot">Short Dash Dot</label> </enumValue> </enumValues> <label ids="lblGridlineStyle">Gridline Style</label> <defaultValue>Solid</defaultValue> </enumProperty>

  32. IBM Cognos Visualization Customizer tool Limitations 2: When you generate a vizbundle, by default, the enum property is not generated in the xml file. You can manually add enum to chart type definition xml file. Add enumProperty in chart type definition <enumProperty name="gridlineStyle"> <enumValues> <enumValue value="Solid"> <label ids="lblSolid">Solid</label> </enumValue> <enumValue value="LongDash"> <label ids="lblLongDash">Long Dash</label> </enumValue> <enumValue value="LongDashDot"> <label ids="lblLongDashDot">Long Dash Dot</label> </enumValue> <enumValue value="LongDash"> <label ids="lblLongDash">Long Dash</label> </enumValue> <enumValue value="ShortDash"> <label ids="lblShortDash">Short Dash</label> </enumValue> <enumValue value="ShortDashDot"> <label ids="lblShortDashDot">Short Dash Dot</label> </enumValue> </enumValues> <label ids="lblGridlineStyle">Gridline Style</label> <defaultValue>Solid</defaultValue> </enumProperty> 1 Results in Report Studio 2 lblDot=Dot lblLongDashDot=Long Dash Dot … Add string ID in string resource file

  33. RAVE font Datatype RAVE font datatype definition { "id":"chartTitleFont", "required":false, "type":"font", "defaultValue": { "family":"Arial Unicode MS, Andale WT", "size":"9pt", "weight":"bold", "style":"normal" }, "resolution": [ { "method":"createOrSet", "target":"/titles[*]/style/font", "sourceParameter":"chartTitleFont" } ] }

  34. RAVE font Datatype Font datatype definition default generation in chart type definition xml file. <fontProperty name="chartTitleFont" unit="px,%,cm,mm,pt,pc"> <label ids='lblChartTitleFont'/> <tooltip ids='tooltipChartTitleFont'/> <description ids="descChartTitleFont"/> <defaultFont family="Arial Unicode MS, Andale WT" size="9pt" weight="bold“ style="normal"/> </fontProperty>

  35. RAVE font Datatype The font datatype results in the generation of the font dialog box in Report Studio

  36. RAVE color Datatype RAVE color datatype definition { "id":"chartTitleColor", "required":false, "type":"color", "resolveOrder":1, "defaultValue":"#808080", "resolution": [ { "method":"createOrSet", "target":"/titles[*]/style/fill", "sourceParameter":"chartTitleColor" } ] }

  37. RAVE color Datatype Color datatype definition default generation in chart type definition xml file. <colorProperty name="chartTitleColor"> <label ids='lblChartTitleColor'/> <tooltip ids='tooltipChartTitleColor'/> <description ids="descChartTitleColor"/> <defaultColor> <RGBA r="128" g="128" b="128"/> </defaultColor> </colorProperty>

  38. RAVE color Datatype The color datatype results in the generation of the color dialog box in Report Studio

  39. Work flow: Add parameters 1. Add parameters to JSON file

  40. Work flow: Prepare your bundle • 2. Provide a unique name for the bundle. • 3. Click the Generate Viz Bundle Definition to create the Chart type Definition file. • 4. Properties that correspond to Parameters • have been created automatically in XML file. • 5. If necessary customize XML file for groups and enumerated lists. 2- Click • 3-

  41. Work flow: Prepare your bundle • 6. Default strings will be created for the resource file. They can be customized. • 7. Save the bundle as the same name as the Bundle Name. • 8. Publish to the content store

  42. Work flow: Final Result Results in Report Studio

  43. RAVE palette Datatype This datatype is currently not supported with Cognos BI. There is a workaround by creating name palettes Note: it does not provide granular swatch changes { "id":"palette", "type":"string", "label":"Palette", "required":false, "description":"Set the palette.", "defaultValue":"Classic", "resolutionCases": [ { "resolutionCase":"Classic", "resolution": [ { "method":"set", "target":"/grammar[0]/elements[0]/color[0]/palette", "sourceValue": [ "#000066" ] } ] },

More Related