本文整理汇总了PHP中LinePlot::setStyle方法的典型用法代码示例。如果您正苦于以下问题:PHP LinePlot::setStyle方法的具体用法?PHP LinePlot::setStyle怎么用?PHP LinePlot::setStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LinePlot
的用法示例。
在下文中一共展示了LinePlot::setStyle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Graph
{
return $value . ' %';
}
$graph = new Graph(400, 400);
$graph->setTiming(TRUE);
$graph->setAntiAliasing(TRUE);
$x = array();
for ($i = 0; $i < 5; $i++) {
$x[] = mt_rand(-20, 100);
}
$plot = new LinePlot($x);
$plot->setBackgroundColor(color(80));
$plot->setXAxis(PLOT_BOTH);
$plot->setYAxis(PLOT_BOTH);
$plot->setColor(color());
$plot->setStyle(LINE_DOTTED);
$plot->grid->hideHorizontal(TRUE);
$plot->grid->setBackgroundColor(new Color(235, 235, 180, 60));
$plot->yAxis->setLabelNumber(mt_rand(0, 10));
$plot->yAxis->setLabelPrecision(1);
$plot->xAxis->label->hideFirst(TRUE);
$plot->xAxis->label->hideLast(TRUE);
$plot->label->set($x);
$plot->label->move(0, mt_rand(0, 20));
$plot->label->setCallbackFunction('label');
$plot->label->setColor(color(0));
$plot->label->setBackgroundColor(new Color(mt_rand(200, 240), mt_rand(200, 240), mt_rand(200, 240), mt_rand(0, 20)));
$plot->label->border->setColor(color());
$plot->label->setPadding(mt_rand(0, 3), mt_rand(0, 3), mt_rand(0, 3), mt_rand(0, 3));
$plot->label->setAngle(mt_rand(0, 1) ? 0 : 90);
$graph->add($plot);
示例2: Graph
<?php
/*
* This work is hereby released into the Public Domain.
* To view a copy of the public domain dedication,
* visit http://creativecommons.org/licenses/publicdomain/ or send a letter to
* Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
*
*/
require_once "../../LinePlot.class.php";
$graph = new Graph(300, 200);
$graph->setAntiAliasing(TRUE);
$x = array(-4, -5, -2, -8, -3, 1, 4, 9, 5, 6, 2);
$plot = new LinePlot($x);
$plot->setStyle(LINE_DASHED);
$plot->setSpace(4, 4, 10, 0);
$plot->setPadding(25, 15, 10, 18);
$plot->setBackgroundGradient(new LinearGradient(new Color(230, 230, 230), new Color(255, 255, 255), 90));
$plot->setFilledArea(7, 9, new Red(25));
$plot->setFilledArea(1, 4, new Yellow(25));
$plot->setColor(new Color(0, 0, 150, 20));
$plot->grid->setColor(new VeryLightGray());
$plot->mark->setType(MARK_SQUARE);
$plot->mark->setSize(4);
$plot->mark->setFill(new VeryDarkGreen(30));
$plot->mark->border->show();
$plot->mark->border->setColor(new DarkBlue(60));
$plot->xAxis->label->hide(TRUE);
$plot->xAxis->setNumberByTick('minor', 'major', 3);
$plot->yAxis->setLabelNumber(8);
$plot->legend->add($plot, "My line");
示例3: LinePlot
$plot->mark->setType(MARK_SQUARE);
$group->add($plot);
// pas de chiffre après la virgule
$group->axis->left->setLabelPrecision(1);
$group->axis->left->setColor($rouge);
$group->axis->left->title->move(-5, 0);
$group->axis->left->title->set("Absences");
// les retards
$plot = new LinePlot($values_retards);
$plot->xAxis->setLabelText($x);
$plot->setColor($bleu);
$plot->setYAxis(PLOT_RIGHT); //Plot::RIGHT
// type de trait
$plot->setStyle(LINE_DOTTED); //Line::DOTTED
// Change le style de ligne (Line::SOLID, Line::DOTTED ou Line::DASHED).
// point noir sur le graphique
$plot->mark->setFill($bleu);
$plot->mark->setType(MARK_CIRCLE);
$plot->mark->setSize(7);
$plot->mark->setFill(new White);
$plot->mark->border->show();
/*
* const int CIRCLE := 1
* const int SQUARE := 2
* const int TRIANGLE := 3
* const int INVERTED_TRIANGLE := 4
* const int RHOMBUS := 5