本文整理汇总了PHP中pData::NegateValues方法的典型用法代码示例。如果您正苦于以下问题:PHP pData::NegateValues方法的具体用法?PHP pData::NegateValues怎么用?PHP pData::NegateValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pData
的用法示例。
在下文中一共展示了pData::NegateValues方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: NegateValues
include "../class/pImage.class.php";
/* Create and populate the pData object */
$MyData = new pData();
$MyData->addPoints(array(4, VOID, VOID, 12, 8, 3), "Probe 1");
$MyData->addPoints(array(3, 12, 15, 8, 5, 5), "Probe 2");
$MyData->addPoints(array(2, 7, 5, 18, 19, 22), "Probe 3");
$MyData->setPalette("Probe 1", array("R" => 220, "G" => 60, "B" => 20));
$MyData->setSerieTicks("Probe 2", 4);
$MyData->setSerieWeight("Probe 3", 2);
$MyData->setAxisName(0, "Temperatures");
$MyData->addPoints(array("Jan", "Feb", "Mar", "Apr", "May", "Jun"), "Labels");
$MyData->setSerieDescription("Labels", "Months");
$MyData->setAbscissa("Labels");
/* Reverse the Y axis trick */
$MyData->setAbsicssaPosition(AXIS_POSITION_TOP);
$MyData->NegateValues(array("Probe 1", "Probe 2", "Probe 3"));
$MyData->setAxisDisplay(0, AXIS_FORMAT_CUSTOM, "NegateValues");
function NegateValues($Value)
{
if ($Value == VOID) {
return VOID;
} else {
return -$Value;
}
}
/* Create the pChart object */
$myPicture = new pImage(700, 230, $MyData);
/* Turn of Antialiasing */
$myPicture->Antialias = FALSE;
/* Draw a background */
$Settings = array("R" => 190, "G" => 213, "B" => 107, "Dash" => 1, "DashR" => 210, "DashG" => 223, "DashB" => 127);