You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

 plotSet overview

  

  The body of the plotSet tag is executed in the scope of plotter region.

  Required attribute is "plots" that is a list of IManagedObjects to be plotted. Each object from the list is plotted in a separate plotter region. 

  There are optional plotSet attributes, with default values, e.g.:

        height = "600" (pixels)
        width  = "600" (pixels)
        format = "png"
        indexVar = "index"
        regionVar = "region"
        url = "" (The page to link the browser to)
        id = "" (The id for the browsing when multiple browsers are present in a page)
        allowDownload  = "true"
        createImageMap = "false"
        maxPlots = "9" (maximum number of plots per page)
       
        n Plots     nX x nY
          n<2         1x1
          n=2         1x2
      3<=n<5        2x2
      5<=n<7        2x3
      7<=n<10       3x3

Examples:

1. Very simple example - just plot using defaults

 <!-- plot set of IManagedObjects -->
<plotSet plots="${dataArray}" />

  

2. Set same style for all regions

<!--
    plot a set of IManagedObjects with a single
    region-level style
-->
<plotSet plots="${dataArray}">
    <style>
        .......
    </style>
</plotSet>

3. Set different styles for odd and even regions

<!--
    plot a set of IManagedObjects with a different
    region-level styles
-->
<plotSet plots="${dataArray}" indexVar="index">
    <c:choose>
        <c:when test="${index%2 == 0}">
            <style>
                .......
            </style>
        </c:when>
        <c:otherwise>
            <style>
                .......
            </style>
        </c:otherwise>
    </c:choose>
</plotSet>

4. Plot data with two overlays, each uses different style

<!--
    plot a set of IManagedObjects with overlays and
    individual data styles
-->
<plotSet plots="${dataArray}" indexVar="index">
    <style>
        .......
    </style>

    <plot var="${dataArray1[index]}">
        <style>
            .......
        </style>
    </plot>
    <plot var="${dataArray2[index]}">
        <style>
            .......
        </style>
    </plot>
</plotSet>

5. Make regions clickable with unique href-s and styles

<!--
    plot a set of IManagedObjects with overlays.
    Make regions clickable and with unique styles.
    *** FIXME: don't know how to call setters on an Object!
-->
<plotSet plots="${dataArray}" createImageMap="true" indexVar="index" regionVar="region">
    set region.title = "Region ${index}"
    set region.href = ....

    <plot var="${dataArray1[index]}">
        <style>
            .......
        </style>
    </plot>
    <plot var="${dataArray2[index]}">
        <style>
            .......
        </style>
    </plot>
</plotSet>
  • No labels