本文整理汇总了PHP中pData::setSeriesName方法的典型用法代码示例。如果您正苦于以下问题:PHP pData::setSeriesName方法的具体用法?PHP pData::setSeriesName怎么用?PHP pData::setSeriesName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pData
的用法示例。
在下文中一共展示了pData::setSeriesName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testDrawBarGraph
public function testDrawBarGraph()
{
// Dataset definition
$DataSet = new pData();
$DataSet->addPoints(array(1, 4, -3, 2, -3, 3, 2, 1, 0, 7, 4), "Serie1");
$DataSet->addPoints(array(3, 3, -4, 1, -2, 2, 1, 0, -1, 6, 3), "Serie2");
$DataSet->addPoints(array(4, 1, 2, -1, -4, -2, 3, 2, 1, 2, 2), "Serie3");
$DataSet->AddAllSeries();
$DataSet->SetAbscissaLabelSeries();
$DataSet->setSeriesName("January", "Serie1");
$DataSet->setSeriesName("February", "Serie2");
$DataSet->setSeriesName("March", "Serie3");
// Initialise the graph
$canvas = new TestCanvas();
$Test = new pChart(700, 230, $canvas);
$Test->setFontProperties("Fonts/tahoma.ttf", 8);
$Test->setGraphArea(50, 30, 680, 200);
$canvas->drawFilledRoundedRectangle(new Point(7, 7), new Point(693, 223), 5, new Color(240), 1, 0, ShadowProperties::NoShadow());
$backgroundStyle = new BackgroundStyle(new Color(255), TRUE);
$Test->drawGraphBackground($backgroundStyle);
$Test->drawScale($DataSet, ScaleStyle::DefaultStyle(), 0, 2, TRUE);
$Test->drawGrid(new GridStyle(4, TRUE, new Color(230), 50));
// Draw the 0 line
$Test->setFontProperties("Fonts/tahoma.ttf", 6);
$Test->drawTreshold(0, new Color(143, 55, 72), TRUE, TRUE);
// Draw the bar graph
$Test->drawBarGraph($DataSet->GetData(), $DataSet->GetDataDescription(), TRUE, 80);
// Finish the graph
$Test->setFontProperties("Fonts/tahoma.ttf", 8);
$Test->drawLegend(596, 150, $DataSet->GetDataDescription(), new Color(255));
$Test->setFontProperties("Fonts/tahoma.ttf", 10);
$Test->drawTitle(50, 22, "Example 12", new Color(50), 585);
$this->assertEquals('c5cc595cf2c41c6c363521346c8262a5', md5($canvas->getActionLog()));
}