Difference between revisions of "Portlet XML Formatting"

From MT Marvelit
Jump to: navigation, search

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 861

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 862

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 587

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 608

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 608

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 608

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 608

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 608

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 608

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 608

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 587

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 608

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 608

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 608

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 608

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 608

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 608

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 608

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 241

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 242

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 241

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 242

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /home/o3csyjea3ono/domains/wiki.marvelit.com/html/includes/diff/DairikiDiff.php on line 954
(Report XML Examples)
(Report XML Examples)
Line 128: Line 128:
 
[[Image:Reportxmlexample1.jpg|300px|thumb]]
 
[[Image:Reportxmlexample1.jpg|300px|thumb]]
  
'''Example #1 - Colors with thresholds'''
+
=== Example #1 - Colors with thresholds ===
  
 
<columnlist><br>
 
<columnlist><br>

Revision as of 03:25, 27 September 2006

Chart XML Tags

Chartxmlschema.jpg

On the Chart Portlet - there is a field to enter XML. The format of the XML is as follows:

marvelitchart [Attributes:

  • percentvalues=‚Äùtrue|false‚Äù (pie charts only)]

value-axis [Attributes:

  • low=‚Äù{number}‚Äù
  • high=‚Äù{number}‚Äù
  • ticks=‚Äù{number}‚Äù
  • label=‚Äùtext‚Äù
  • include0=‚Äùtrue|false‚Äù]

category-axis [Attributes:

  • low=‚Äù{number}‚Äù
  • high=‚Äù{number}‚Äù
  • ticks=‚Äù{number}‚Äù
  • label=‚Äùtext‚Äù
  • angle=‚Äùtrue|false‚Äù]

section [Attributes:

  • number=‚Äù{number}
  • color=‚Äù#000000‚Äù
  • explode=‚Äù{percent}‚Äù]

alt-section [Attributes:

  • number=‚Äù{number}
  • color=‚Äù#000000‚Äù]

columnlist (See Report XML)

Illustrative Example

<marvelitchart percentvalues="false">
<value-axis low="5" high="50" ticks="11" label="val label" include0="false"/>
<category-axis low="-1" high="10" ticks="2.5" label="cat label" angle="45"/>
<section number="0" color="#0000FF" explode=".30" />
<alt-section number="0" color="#0000FF" />
</marvelitchart>

Notes

  • section.explode only applies to pie charts (2d and 3d)
  • alt-section is for overlays
  • The number field for section and alt-section are integers starting with 0
  • include0 = false allows the base of the chart to be a high number. This is useful when all values are of a similarly high value.


Chart XML Examples

Chartxmlexample1.jpg

Example #1 - Offset Pie Chart


<marvelitchart percentvalues="true">
<section number="0" color="#0000FF" explode=".50" />
<section number="1" color="#00FF00" explode=".05" />
<section number="2" color="#FF0000" explode=".05"/>
<section number="3" color="#FFFF00" explode=".05"/>
<section number="4" color="#FF00FF" explode=".05" />
</marvelitchart>



Report XML Tags

Reportxmlschema.jpg

On the Report and Meter Portlet - there is a field to enter XML. The format of the XML is as follows:

columnformatlist column [Attributes:

  • name=‚Äùcolumnname|number|*‚Äù]

lever [Attributes:

  • name=‚Äùcolumnname|default‚Äù
  • value=‚Äùlever value‚Äù]

threshold [Attributes:

  • field=‚Äùcolumnname|number‚Äù
  • value=‚Äùvalue‚Äù
  • type=‚Äùstring|date|number‚Äù]
  • format (ex: $ ###.00)
  • link (ex: http://www.marvelit.com/)
  • style (css style name)
  • imageurl [Attributes:
  • alt=‚Äùalternate‚Äù]

Illustrative Example

<columnlist>
<column name="*">
<lever name="default">
<threshold field="State" value="CA" type="string">
<style><![CDATA[color: 0000FF;font-weight: bold;]]></style>
</threshold>
<threshold field="State" value="NY" type="string">
<style><![CDATA[color: red;font-weight: bold;]]></style>
</threshold>
</lever>
</column>
<column name="State">
<lever name="default">
<threshold field="State" value="CA" type="string">
<imageurl>/marvelit/images/CA.jpg</imageurl>
</threshold>
<threshold field="State" value="NY" type="string">
<imageurl>/marvelit/images/NY.jpg</imageurl>
</threshold>
</lever>
</column>
</columnlist>

In this example, There are 2 column tags. The first is a default for all columns that sets the text color for all rows for the state of “CA” to 0000FF and bold and all rows for “NY” to red and bold. Then for the “State” column, it displays an image “CA.jpg” instead of the value of the “State” column when it is “CA”, and “NY.jpg” for “NY

Notes

  • Columns can be listed by name or by number. Use ‚Äò*‚Äô to signify all columns.
  • The lever tag allows specific settings when certain levers are used.
  • Use ‚Äúdefault‚Äù to signify all levers. The default lever tag will be used when no specific levers are found.
  • The threshold tag is used to test conditions.
  • String values are triggered when the specified column = the value of the threshold.
  • Dates and Numbers are triggered when the specified column >= the value of the threshold.
  • Use value=‚Äú‚Äù to signify all values

Report XML Examples

Reportxmlexample1.jpg

Example #1 - Colors with thresholds

<columnlist>
<column name='*'>
<lever name='default'>

<threshold field="Percent" value='0' type='double'> <style><![CDATA[color: white;font-weight: bold;background-color: #00CC00;border-bottom-width: thin;border-bottom-style: solid;]]></style> </threshold>

<threshold field="Percent" value='50' type='double'> <style><![CDATA[;font-weight: bold;background-color: #CC0000;border-bottom-width: thin;border-bottom-style: solid;]]></style> </threshold>

<threshold field="Percent" value='40' type='double'> <style><![CDATA[color: white;font-weight: bold;background-color: #FF9900;border-bottom-width: thin;border-bottom-style: solid;]]></style> </threshold>

<threshold field="Percent" value='25' type='double'> <style><![CDATA[font-weight: bold;background-color: yellow;border-bottom-width: thin;border-bottom-style: solid;]]></style> </threshold>

</lever> </column> </columnlist>




Reportxmlexample2.jpg

Example #2 - Icons with Links

<columnlist>
<column name='*'>

<lever name='default'>

<threshold field="Status" value='UP' type='string'> <style><![CDATA[color: #00CC00;font-weight: bold;]]></style> </threshold>

<threshold field="Status" value='DOWN' type='string'> <style><![CDATA[color: #CC0000;font-weight: bold;]]></style> </threshold>

<threshold field="Status" value='UNREACHABLE' type='string'> <style><![CDATA[color: orange;font-weight: bold;]]></style> </threshold>

</lever>
</column>
<column name='Status'>
<lever name='default'>

<threshold field="Status" value='UP' type='string'> <imageurl><![CDATA[/marvelit/images/arrow-0.gif]]></imageurl> <link><![CDATA[1]]></link> </threshold>

<threshold value='DOWN' type='string'> <imageurl><![CDATA[/marvelit/images/arrow-2.gif]]></imageurl> <link><![CDATA[2]]></link> </threshold>

<threshold value='UNREACHABLE' type='string'> <imageurl><![CDATA[/marvelit/images/arrow-1.gif]]></imageurl> <link><![CDATA[3]]></link> </threshold>

</lever>
</column>
</columnlist>