ASNMTAP

 view release on metacpan or  search on metacpan

applications/collector-test.pl  view on Meta::CPAN


  $layer->addDataSet(\@dataWarning,  $COLORSRRD {WARNING},   " Warning");
  $layer->addDataSet(\@dataCritical, $COLORSRRD {CRITICAL},  " Critical");
  $layer->addDataSet(\@dataUnknown,  $COLORSRRD {UNKNOWN},   " Unknown");
  $layer->addDataSet(\@dataNoTest,   $COLORSRRD {"NO TEST"}, " No test");
  $layer->addDataSet(\@dataOffline,  $COLORSRRD {OFFLINE},   " Offline");

  # Set the sub-bar gap to 0, so there is no gap between stacked bars with a group
  $layer->setBarGap(-1.7E-100, 0);

  # Set the bar border to transparent
  if ($withBorder) {
    $layer->setBorderColor(0xF0F0F0);
  } else {
    $layer->setBorderColor($perlchartdir::Transparent);
  }

  # Add a legend box
  $c->addLegend(2, $hight - 34, 0, "arial.ttf", 8)->setBackground($perlchartdir::Transparent);

  # Add a custom CDML text at the bottom right of the plot area as the logo

applications/collector.pl  view on Meta::CPAN


  $layer->addDataSet(\@dataWarning,  $COLORSRRD {WARNING},   " Warning");
  $layer->addDataSet(\@dataCritical, $COLORSRRD {CRITICAL},  " Critical");
  $layer->addDataSet(\@dataUnknown,  $COLORSRRD {UNKNOWN},   " Unknown");
  $layer->addDataSet(\@dataNoTest,   $COLORSRRD {"NO TEST"}, " No test");
  $layer->addDataSet(\@dataOffline,  $COLORSRRD {OFFLINE},   " Offline");

  # Set the sub-bar gap to 0, so there is no gap between stacked bars with a group
  $layer->setBarGap(-1.7E-100, 0);

  # Set the bar border to transparent
  if ($withBorder) {
    $layer->setBorderColor(0xF0F0F0);
  } else {
    $layer->setBorderColor($perlchartdir::Transparent);
  }

  # Add a legend box
  $c->addLegend(2, $hight - 34, 0, "arial.ttf", 8)->setBackground($perlchartdir::Transparent);

  # Add a custom CDML text at the bottom right of the plot area as the logo

applications/htmlroot/JSFX_Layer.js  view on Meta::CPAN

/*** ForeGround (text) Color ***/
JSFX.Layer.prototype.setColor	= function(c){this.style.color=c;}
if(ns4)
	JSFX.Layer.prototype.setColor	= function(c)
	{
		this.elem.document.write("<FONT COLOR='"+c+"'>"+this.elem.innerHTML+"</FONT>");
		this.elem.document.close();
	}
/**********************************************************************************/
/*** BackGround Color ***/
JSFX.Layer.prototype.setBgColor	= function(color) { this.style.backgroundColor = color==null?'transparent':color; } 
if(ns4)
	JSFX.Layer.prototype.setBgColor 	= function(color) { this.elem.bgColor = color; }
/**********************************************************************************/
/*** BackGround Image ***/
JSFX.Layer.prototype.setBgImage	= function(image) { this.style.backgroundImage = "url("+image+")"; }
if(ns4)
	JSFX.Layer.prototype.setBgImage 	= function(image) { this.style.background.src = image; }
/**********************************************************************************/
/*** set Content***/
JSFX.Layer.prototype.setContent   = function(xHtml)	{ this.elem.innerHTML=xHtml; } 

applications/htmlroot/cgi-bin/generateChart.pl  view on Meta::CPAN


      # Add the first two data sets to the chart as a stacked bar group
      $layer->addDataSet(\@avg1, 0xcf4040, "$applicationTitle1")->setDataSymbol($perlchartdir::DiamondSymbol, 8);
      if ($uKey2 ne 'none') { $layer->addDataSet(\@avg2, 0x6699cc, "$applicationTitle2")->setDataSymbol($perlchartdir::DiamondSymbol, 8); }
      if ($uKey3 ne 'none') { $layer->addDataSet(\@avg3, 0x009900, "$applicationTitle3")->setDataSymbol($perlchartdir::DiamondSymbol, 8); }

      # Enable data label on the data points.
      $layer->setDataLabelFormat("{value|2,.}");
    }

    # Set the bar border to transparent
    $layer->setBorderColor($perlchartdir::Transparent);

    if ($pf eq 'on') {
      $c->addLegend(2, $hight - 32, 0, "arial.ttf", 8)->setBackground($perlchartdir::Transparent);
    } else {
      $c->addLegend(2, $hight - 32, 0, "arial.ttf", 8)->setFontColor($forGround);
    }
  }
}



( run in 0.378 second using v1.01-cache-2.11-cpan-a1d94b6210f )