当前位置: 首页>>代码示例>>PHP>>正文


PHP pChart::drawFilledCubicCurve方法代码示例

本文整理汇总了PHP中pChart::drawFilledCubicCurve方法的典型用法代码示例。如果您正苦于以下问题:PHP pChart::drawFilledCubicCurve方法的具体用法?PHP pChart::drawFilledCubicCurve怎么用?PHP pChart::drawFilledCubicCurve使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pChart的用法示例。


在下文中一共展示了pChart::drawFilledCubicCurve方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: pData

// Standard inclusions
include "pChart/pData.class";
include "pChart/pChart.class";
// Dataset definition
$DataSet = new pData();
$DataSet->AddPoint(array(1, 4, 3, 2, 3, 3, 2, 1, 0, 7, 4, 3, 2, 3, 3, 5, 1, 0, 7), "Serie1");
$DataSet->AddPoint(array(1, 4, 2, 6, 2, 3, 0, 1, 5, 1, 2, 4, 5, 2, 1, 0, 6, 4, 2), "Serie2");
$DataSet->AddAllSeries();
$DataSet->SetAbsciseLabelSerie();
$DataSet->SetSerieName("January", "Serie1");
$DataSet->SetSerieName("February", "Serie2");
// Initialise the graph
$Test = new pChart(700, 230);
$Test->setFontProperties("Fonts/tahoma.ttf", 8);
$Test->setGraphArea(50, 30, 585, 200);
$Test->drawFilledRoundedRectangle(7, 7, 693, 223, 5, 240, 240, 240);
$Test->drawRoundedRectangle(5, 5, 695, 225, 5, 230, 230, 230);
$Test->drawGraphArea(255, 255, 255, TRUE);
$Test->drawScale($DataSet->GetData(), $DataSet->GetDataDescription(), SCALE_NORMAL, 150, 150, 150, TRUE, 0, 2);
$Test->drawGrid(4, TRUE, 230, 230, 230, 50);
// Draw the 0 line
$Test->setFontProperties("Fonts/tahoma.ttf", 6);
$Test->drawTreshold(0, 143, 55, 72, TRUE, TRUE);
// Draw the cubic curve graph
$Test->drawFilledCubicCurve($DataSet->GetData(), $DataSet->GetDataDescription(), 0.1, 50);
// Finish the graph
$Test->setFontProperties("Fonts/tahoma.ttf", 8);
$Test->drawLegend(600, 30, $DataSet->GetDataDescription(), 255, 255, 255);
$Test->setFontProperties("Fonts/tahoma.ttf", 10);
$Test->drawTitle(50, 22, "Example 7", 50, 50, 50, 585);
$Test->Render("example7.png");
开发者ID:loopzy,项目名称:my,代码行数:31,代码来源:Example7.php

示例2: get_teachers_information_graph

 /**
  * This method return a content html, it's used inside get_block method for showing it inside dashboard interface
  * @return string  content html
  */
 public function get_teachers_information_graph()
 {
     $teachers = $this->teachers;
     $graph = '';
     $user_ids = array_keys($teachers);
     $a_last_week = get_last_week();
     if (is_array($user_ids) && count($user_ids) > 0) {
         $data_set = new pData();
         foreach ($user_ids as $user_id) {
             $teacher_info = api_get_user_info($user_id);
             $username = $teacher_info['username'];
             $time_by_days = array();
             foreach ($a_last_week as $day) {
                 // day is received as y-m-d 12:00:00
                 $start_date = api_get_utc_datetime($day);
                 $end_date = api_get_utc_datetime($day + (3600 * 24 - 1));
                 $time_on_platform_by_day = Tracking::get_time_spent_on_the_platform($user_id, 'custom', $start_date, $end_date);
                 $hours = floor($time_on_platform_by_day / 3600);
                 $min = floor(($time_on_platform_by_day - $hours * 3600) / 60);
                 $time_by_days[] = $min;
             }
             $data_set->AddPoint($time_by_days, $username);
             $data_set->AddSerie($username);
         }
         $last_week = date('Y-m-d', $a_last_week[0]) . ' ' . get_lang('To') . ' ' . date('Y-m-d', $a_last_week[6]);
         $days_on_week = array();
         foreach ($a_last_week as $weekday) {
             $days_on_week[] = date('d/m', $weekday);
         }
         $data_set->AddPoint($days_on_week, "Days");
         $data_set->SetXAxisName($last_week);
         $data_set->SetYAxisName(get_lang('Minutes'));
         $data_set->SetAbsciseLabelSerie("Days");
         $graph_id = $this->user_id . 'TeacherConnectionsGraph';
         $cache = new pCache();
         // the graph id
         $data = $data_set->GetData();
         if ($cache->IsInCache($graph_id, $data_set->GetData())) {
             //if we already created the img
             $img_file = $cache->GetHash($graph_id, $data_set->GetData());
         } else {
             // Initializing the graph
             $bg_width = 440;
             $bg_height = 350;
             $test = new pChart($bg_width + 10, $bg_height + 20);
             $test->setFontProperties(api_get_path(LIBRARY_PATH) . 'pchart/fonts/tahoma.ttf', 8);
             $test->setGraphArea(65, 30, $bg_width - 70, $bg_height - 50);
             $test->drawFilledRoundedRectangle(7, 7, $bg_width, $bg_height, 5, 240, 240, 240);
             $test->drawRoundedRectangle(5, 5, $bg_width + 2, $bg_height + 2, 5, 230, 230, 230);
             $test->drawGraphArea(255, 255, 255, TRUE);
             $test->drawScale($data_set->GetData(), $data_set->GetDataDescription(), SCALE_NORMAL, 150, 150, 150, TRUE, 0, 2, TRUE);
             $test->drawGrid(4, TRUE, 230, 230, 230, 50);
             // Drawing lines
             //$test->drawLineGraph($data_set->GetData(),$data_set->GetDataDescription());
             $test->drawFilledCubicCurve($data_set->GetData(), $data_set->GetDataDescription(), 0.1, 30);
             //$test->drawPlotGraph($data_set->GetData(),$data_set->GetDataDescription(),3,2,255,255,255);
             // Drawing Legend
             $test->setFontProperties(api_get_path(LIBRARY_PATH) . 'pchart/fonts/tahoma.ttf', 8);
             $test->drawLegend($bg_width - 80, 20, $data_set->GetDataDescription(), 204, 204, 255);
             $test->writeValues($data_set->GetData(), $data_set->GetDataDescription(), array("Days"));
             $cache->WriteToCache($graph_id, $data_set->GetData(), $test);
             ob_start();
             $test->Stroke();
             ob_end_clean();
             $img_file = $cache->GetHash($graph_id, $data_set->GetData());
         }
         if (!empty($img_file)) {
             $graph = '<img src="' . api_get_path(WEB_ARCHIVE_PATH) . $img_file . '">';
         }
     } else {
         $graph = '<p>' . api_convert_encoding(get_lang('GraphicNotAvailable'), 'UTF-8') . '</p>';
     }
     return $graph;
 }
开发者ID:ragebat,项目名称:chamilo-lms,代码行数:78,代码来源:block_teacher_graph.class.php

示例3: testDrawFilledCubicCurve

 public function testDrawFilledCubicCurve()
 {
     // Dataset definition
     $DataSet = new pData();
     $DataSet->addPoints(array(1, 4, 3, 2, 3, 3, 2, 1, 0, 7, 4, 3, 2, 3, 3, 5, 1, 0, 7), "Serie1");
     $DataSet->addPoints(array(1, 4, 2, 6, 2, 3, 0, 1, 5, 1, 2, 4, 5, 2, 1, 0, 6, 4, 2), "Serie2");
     $DataSet->AddAllSeries();
     $DataSet->SetAbscissaLabelSeries();
     $DataSet->SetSeriesName("January", "Serie1");
     $DataSet->SetSeriesName("February", "Serie2");
     // Initialise the graph
     $canvas = new TestCanvas();
     $Test = new pChart(700, 230, $canvas);
     $Test->setFontProperties("Fonts/tahoma.ttf", 8);
     $Test->setGraphArea(50, 30, 585, 200);
     $backgroundStyle = new BackgroundStyle(new Color(255), TRUE);
     $Test->drawGraphBackground($backgroundStyle);
     $Test->drawScale($DataSet, ScaleStyle::DefaultStyle(), 0, 2);
     $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 cubic curve graph
     $Test->drawFilledCubicCurve($DataSet, 0.1, 50);
     // Finish the graph
     $Test->setFontProperties("Fonts/tahoma.ttf", 8);
     $Test->drawLegend(600, 30, $DataSet->GetDataDescription(), new Color(255));
     $Test->setFontProperties("Fonts/tahoma.ttf", 10);
     $Test->drawTitle(50, 22, "Example 7", new Color(50), 585);
     $this->assertEquals('25415e5d96f42f64893657ab2389ea30', md5($canvas->getActionLog()));
 }
开发者ID:rbraband,项目名称:pChart,代码行数:31,代码来源:pChartTest.php

示例4: createClosuresGraph

 private function createClosuresGraph($queries)
 {
     $qb = new QueryBrowser();
     $imagehashes = array();
     foreach ($queries as $q) {
         $DataSet = new pData();
         $qResult = $qb->executeQueryToArray($q['query']);
         if (sizeof($qResult) > 0) {
             foreach ($qResult as $row) {
                 $DataSet->AddPoint($row['y'], $q['series'], $row['x']);
             }
             $DataSet->AddAllSeries();
             $DataSet->SetAbsciseLabelSerie();
             $chartname = $this->createPathFromHash(md5(serialize($DataSet)));
             $imagehashes[] = array($chartname, $q['series']);
             if (!file_exists($chartname)) {
                 $Test = new pChart(700, 280);
                 $Test->setFontProperties("graph/Fonts/tahoma.ttf", 8);
                 $Test->setGraphArea(50, 30, 680, 200);
                 $Test->drawFilledRoundedRectangle(7, 7, 693, 273, 5, 240, 240, 240);
                 $Test->drawRoundedRectangle(5, 5, 695, 275, 5, 230, 230, 230);
                 $Test->drawGraphArea(255, 255, 255, true);
                 $Test->drawScale($DataSet->GetData(), $DataSet->GetDataDescription(), SCALE_NORMAL, 150, 150, 150, true, 45, 2);
                 $Test->drawGrid(4, true, 230, 230, 230, 50);
                 // Draw the 0 line
                 $Test->setFontProperties("graph/Fonts/tahoma.ttf", 6);
                 $Test->drawTreshold(0, 143, 55, 72, true, true);
                 // Draw the cubic curve graph
                 $Test->drawFilledCubicCurve($DataSet->GetData(), $DataSet->GetDataDescription(), 0.1, 50);
                 // Finish the graph
                 $Test->setFontProperties("graph/Fonts/tahoma.ttf", 10);
                 $Test->drawTitle(50, 22, $q['series'], 50, 50, 50, 585);
                 $Test->Render("render/" . $chartname);
             }
         }
     }
     return $imagehashes;
 }
开发者ID:FastLizard4,项目名称:waca,代码行数:38,代码来源:StatsMonthlyStats.php

示例5:

 $DataSet->AddPoint($skill_change, 'SerieSession');
 $DataSet->AddPoint($date, 'SerieDate');
 $DataSet->AddSerie('SerieSkill');
 $DataSet->SetAbsciseLabelSerie('SerieDate');
 $DataSet->SetSerieName('Skill', 'SerieSkill');
 $DataSet->SetSerieName('Session', 'SerieSession');
 $Chart->setFontProperties(IMAGE_PATH . '/sig/font/DejaVuSans.ttf', 7);
 $DataSet->SetYAxisName('Skill');
 $DataSet->SetYAxisUnit('K');
 $Chart->setColorPalette(0, 255, 255, 0);
 $Chart->drawRightScale($DataSet->GetData(), $DataSet->GetDataDescription(), SCALE_NORMAL, $color['red'], $color['green'], $color['blue'], TRUE, 0, 0);
 $Chart->drawGrid(1, FALSE, 55, 55, 55, 100);
 $Chart->setShadowProperties(3, 3, 0, 0, 0, 30, 4);
 $Chart->drawCubicCurve($DataSet->GetData(), $DataSet->GetDataDescription());
 $Chart->clearShadow();
 $Chart->drawFilledCubicCurve($DataSet->GetData(), $DataSet->GetDataDescription(), 0.1, 30);
 $Chart->drawPlotGraph($DataSet->GetData(), $DataSet->GetDataDescription(), 1, 1, 255, 255, 255);
 $Chart->clearScale();
 $DataSet->RemoveSerie('SerieSkill');
 $DataSet->AddSerie('SerieSession');
 $DataSet->SetYAxisName('Session');
 $DataSet->SetYAxisUnit('');
 $Chart->setColorPalette(1, 255, 0, 0);
 $Chart->setColorPalette(2, 0, 0, 255);
 $Chart->drawScale($DataSet->GetData(), $DataSet->GetDataDescription(), SCALE_NORMAL, $color['red'], $color['green'], $color['blue'], TRUE, 0, 0);
 $Chart->setShadowProperties(3, 3, 0, 0, 0, 30, 4);
 $Chart->drawCubicCurve($DataSet->GetData(), $DataSet->GetDataDescription());
 $Chart->clearShadow();
 $Chart->drawPlotGraph($DataSet->GetData(), $DataSet->GetDataDescription(), 1, 1, 255, 255, 255);
 $Chart->setFontProperties(IMAGE_PATH . '/sig/font/DejaVuSans.ttf', 7);
 $Chart->drawHorizontalLegend(235, -1, $DataSet->GetDataDescription(), 0, 0, 0, 0, 0, 0, $color['red'], $color['green'], $color['blue'], FALSE);
开发者ID:PitbullOL,项目名称:insurgency-hlstatsx,代码行数:31,代码来源:trend_graph.php

示例6: drawLine

 /**
  * Draw line style chart
  * @return unknown
  */
 protected function drawLine()
 {
     // prepare font & series
     $this->_prepareSerie();
     $this->_prepareFont();
     // init chart params
     $outer_w = $this->w - 5;
     // Outer frame witdh
     $outer_h = $this->h - 5;
     // Outer frame heigth
     $inner_w = $this->w - 7;
     // Inner frame witdh
     $inner_h = $this->h - 7;
     // Inner frame heigth
     $chart_w = $this->w - 150;
     // Chart frame witdh
     $chart_h = $this->h - 40;
     // Chart frame heigth
     $title_w = $this->w - 200;
     // Title width
     $title_h = 45;
     // Title height
     $legend_w = $chart_w + 30;
     // Legend width
     $legend_h = 40;
     // Legend height
     // chart styles
     $grid = isset($this->p['grid']) ? $this->p['grid'] : false;
     $plot = isset($this->p['plot']) ? $this->p['plot'] : false;
     $curve = isset($this->p['curve']) ? $this->p['curve'] : false;
     $filled = isset($this->p['filled']) ? $this->p['filled'] : false;
     // fill chart
     $this->chart->drawBackground(255, 255, 255);
     $this->chart->setFontProperties($this->font, 7);
     // set font and size
     $this->chart->drawRoundedRectangle(5, 5, $outer_w, $outer_h, 10, 230, 230, 230);
     // drawRoundedRectangle($X1,$Y1,$X2,$Y2,$Radius,$R,$G,$B)
     $this->chart->drawFilledRoundedRectangle(7, 7, $inner_w, $inner_h, 10, 240, 240, 240);
     // drawRoundedRectangle($X1,$Y1,$X2,$Y2,$Radius,$R,$G,$B)
     $this->chart->setGraphArea(70, 40, $chart_w, $chart_h);
     // setGraphArea($X1,$Y1,$X2,$Y2)
     $this->chart->drawGraphArea(255, 255, 255, TRUE);
     // drawGraphArea($R,$G,$B)
     $this->chart->drawScale($this->data->GetData(), $this->data->GetDataDescription(), SCALE_NORMAL, 150, 150, 150, TRUE, 0, 2, $this->margin, $this->skip);
     // drawScale($Data,$DataDescription,$ScaleMode,$R,$G,$B,$DrawTicks=TRUE,$Angle=0,$Decimals=1,$WithMargin=FALSE,$SkipLabels=1,$RightScale=FALSE)
     $this->data->RemoveSerie('DEFAULT_SCALE');
     // clear scale serie for setScale method
     // draw grid
     if ($grid) {
         $this->chart->drawGrid(3, TRUE, 230, 230, 230, 50);
         // drawGrid($LineWidth,$Mosaic=TRUE,$R=220,$G=220,$B=220,$Alpha=255)
     }
     // draw the 0 line
     //$this->chart->setFontProperties($this->font,6);
     //$this->chart->drawTreshold(0,143,55,72,TRUE,TRUE);
     // draw the cubic curve graph
     if ($curve) {
         $this->chart->drawCubicCurve($this->data->GetData(), $this->data->GetDataDescription());
         if ($filled) {
             $this->chart->drawFilledCubicCurve($this->data->GetData(), $this->data->GetDataDescription(), 0.1, 50);
             // filled cubic curve graph
         }
         // draw the line graph
     } else {
         $this->chart->drawLineGraph($this->data->GetData(), $this->data->GetDataDescription());
         if ($filled) {
             $this->chart->drawFilledLineGraph($this->data->GetData(), $this->data->GetDataDescription(), 50);
         }
     }
     // plot style point
     if ($plot) {
         $this->chart->drawPlotGraph($this->data->GetData(), $this->data->GetDataDescription(), 3, 2, 255, 255, 255, true);
         // drawPlotGraph(&$Data,&$DataDescription,$BigRadius=5,$SmallRadius=2,$R2=-1,$G2=-1,$B2=-1,$Shadow=FALSE)
     }
     // add Title
     $this->chart->setFontProperties($this->font, 10);
     $this->chart->drawTitle(40, 0, $this->title, 50, 50, 50, $title_w, $title_h);
     // drawTitle($XPos,$YPos,$Value,$R,$G,$B,$XPos2=-1,$YPos2=-1,$Shadow=FALSE)
     // add Legend
     $this->chart->setFontProperties($this->font, 8);
     $this->chart->drawLegend($legend_w, $legend_h, $this->data->GetDataDescription(), 255, 255, 255);
     // drawLegend($description,$R,$G,$B)
 }
开发者ID:LWFeng,项目名称:hush,代码行数:87,代码来源:Chart.php

示例7: Point

//Dataset
$DataSet->AddPoints(array(1, 4, 3, 4, 3, 3, 2, 1, 0, 7, 4, 3, 2, 3, 3, 5, 1, 0, 7), "Serie1");
$DataSet->AddPoints(array(1, 4, 2, 6, 2, 3, 0, 1, 5, 1, 2, 4, 5, 2, 1, 0, 6, 4, 2), "Serie2");
$DataSet->AddAllSeries();
$DataSet->SetAbscissaLabelSeries();
$DataSet->SetSeriesName("January", "Serie1");
$DataSet->SetSeriesName("February", "Serie2");
// Initialise the graph
$Chart->setFontProperties("../Fonts/tahoma.ttf", 8);
$Chart->setGraphArea(50, 30, 585, 200);
// Canvas
//$Canvas->setAntialiasQuality(0);
$Canvas->drawFilledRoundedRectangle(new Point(7, 7), new Point(693, 223), 5, new Color(240), 1, 0, ShadowProperties::NoShadow());
$Canvas->drawRoundedRectangle(new Point(5, 5), new Point(695, 225), 5, new Color(230), 1, 0, ShadowProperties::NoShadow());
$Chart->drawGraphBackground(new BackgroundStyle(new Color(255)), TRUE);
$Chart->drawScale($DataSet, ScaleStyle::DefaultStyle(), TRUE, 0, 2);
$Chart->drawGrid(new GridStyle(4, TRUE, new Color(230), 50));
// Draw the 0 line
$Chart->setFontProperties("../Fonts/tahoma.ttf", 6);
$Chart->drawTreshold(0, new Color(143, 55, 72), TRUE, TRUE);
// Draw the cubic curve graph
$Chart->drawFilledCubicCurve($DataSet, 0.1, 50);
//$Chart->drawCubicCurve($DataSet, .1, 50);
// Finish the graph
$Chart->setFontProperties("../Fonts/tahoma.ttf", 8);
$Chart->drawLegend(600, 30, $DataSet->GetDataDescription(), new Color(255));
$Chart->setFontProperties("../Fonts/tahoma.ttf", 10);
$Chart->drawTitle(50, 22, "Example 2", new Color(50), 585);
$Chart->Render("Example2.png");
header("Content-Type:image/png");
readfile("Example2.png");
开发者ID:rbraband,项目名称:pChart,代码行数:31,代码来源:Example2.php

示例8: cartesianChart


//.........这里部分代码省略.........
             $xdata .= $settings['XAxisUnit'];
             $Position = imageftbbox($FontSize, 0, $FontName, $xdata);
             $TextWidth = $Position[2] - $Position[0];
             $TextHeightX = $Position[1] - $Position[7];
             $WXmax = $TextWidth > $WXmax ? $TextWidth : $WXmax;
         }
     }
     if ($settings['XAngle'] > 0) {
         $sin = abs(sin(deg2rad($settings['XAngle'])));
         $cos = abs(cos(deg2rad($settings['XAngle'])));
         $HXmax = $WXmax * $sin + $TextHeightX * $cos;
     } else {
         $HXmax = $TextHeightX;
     }
     //on Y axis...
     if ($settings['YAxisFormat'] == 'time') {
         $ydata = "99:99:99";
         $Position = imageftbbox($FontSize, 0, $FontName, $ydata);
         $WYmax = $Position[2] - $Position[0];
         $TextHeightY = $Position[1] - $Position[7];
     } elseif ($settings['YAxisFormat'] == 'date') {
         $ydata = "99/99/9999";
         $Position = imageftbbox($FontSize, 0, $FontName, $ydata);
         $WYmax = $Position[2] - $Position[0];
         $TextHeightY = $Position[1] - $Position[7];
     } else {
         $WYmax = 0;
         foreach ($y as $ydata) {
             $ydata .= $settings['YAxisUnit'];
             //echo $ydata."<br>";
             $Position = imageftbbox($FontSize, 0, $FontName, $ydata);
             $TextWidth = $Position[2] - $Position[0];
             $TextHeightY = $Position[1] - $Position[7];
             $WYmax = $TextWidth > $WYmax ? $TextWidth : $WYmax;
         }
     }
     $Test->setGraphArea($WYmax + $TextHeightY + 35, 20, $w - 25, $h - $HXmax - $TextHeightX - $TextboxHeight - 20);
     //$Test->setGraphArea(60,20,$w-25,($settings['XAngle']==0)?$h-70:$h-100);
     $Test->drawScale($DataSet->GetData(), $DataSet->GetDataDescription(), SCALE_ADDALL, 213, 217, 221, TRUE, $settings['XAngle'], 0, TRUE);
     $Test->drawGraphAreaGradient($settings['BGR'], $settings['BGG'], $settings['BGB'], $settings['Decay2']);
     $Test->drawGrid(4, TRUE, 230, 230, 230, 20);
     // This will put the picture "logo.png" with transparency
     if (strlen($settings['Logo'])) {
         $XLogo = $WYmax + $TextHeightY + 35 + $settings['XLogo'];
         $YLogo = 20 + $settings['XLogo'];
         $logo = $settings['Logo'];
         //Fing extension of logo : png,gif or jpg
         if ($this->_findexts($logo) == "png") {
             echo "png!";
             $Test->drawFromPNG($logo, $XLogo, $YLogo, $settings['LogoTransparency']);
         } elseif ($this->_findexts($logo) == "gif") {
             echo "gif!";
             $Test->drawFromGIF($logo, $XLogo, $YLogo, $settings['LogoTransparency']);
         } elseif ($this->_findexts($logo) == "jpg") {
             echo "jpg";
             $Test->drawFromJPG($logo, $XLogo, $YLogo, $settings['LogoTransparency']);
         }
     }
     $Test->setColorPalette(0, $settings['DataR'], $settings['DataG'], $settings['DataB']);
     if ($type == "bar") {
         // Draw the bar chart
         $Test->drawStackedBarGraph($DataSet->GetData(), $DataSet->GetDataDescription(), 70);
     } elseif ($type == "line") {
         $Test->drawLineGraph($DataSet->GetData(), $DataSet->GetDataDescription());
         $Test->drawPlotGraph($DataSet->GetData(), $DataSet->GetDataDescription(), 3, 0, -1, -1, -1, TRUE);
     } elseif ($type == "cubic") {
         $Test->setShadowProperties(3, 3, 0, 0, 0, 30, 4);
         $Test->drawCubicCurve($DataSet->GetData(), $DataSet->GetDataDescription());
         $Test->clearShadow();
         if ($settings['Filled'] == 'yes') {
             $Test->drawFilledCubicCurve($DataSet->GetData(), $DataSet->GetDataDescription(), 0.1, 30);
         }
         $Test->drawPlotGraph($DataSet->GetData(), $DataSet->GetDataDescription(), 3, 0, -1, -1, -1, TRUE);
     }
     // Draw the textbox
     if (strlen($settings['Textbox'])) {
         $Test->setFontProperties($TextboxFontName, $TextboxFontSize);
         $Test->drawTextBox(0, $h - $TextboxHeight, $w, $h, $settings['Textbox'], 0, 255, 255, 255, ALIGN_CENTER, TRUE, 0, 0, 0, 30);
     }
     // Draw the legend
     if (strlen($settings['Legend'])) {
         $LegendFontSize = $settings['LegendFontSize'];
         $LegendFontName = $this->_ext_path . "/fonts/" . $settings['LegendFontName'];
         $Position = imageftbbox($LegendFontSize, 0, $LegendFontName, $settings['Legend']);
         $LegendW = $Position[2] - $Position[0] + 40;
         $Test->setFontProperties($LegendFontName, $LegendFontSize);
         $Test->drawLegend($w - $LegendW, 10, $DataSet->GetDataDescription(), $settings['LBR'], $settings['LBG'], $settings['LBB'], 52, 58, 82, $settings['LR'], $settings['LG'], $settings['LB'], TRUE);
     }
     // Render the picture
     $Test->addBorder(2);
     if (strlen($imgname)) {
         //custom image name
         $imgname = $this->_img_path . "/" . $imgname;
     } else {
         $this->obj->load->helper('string');
         $imgname = $this->_img_path . "/{$type}-" . random_string('alnum', 16) . ".png";
     }
     $Test->Render($imgname);
     return array("name" => '/' . $imgname, "w" => $w + 4, "h" => $h + 4);
 }
开发者ID:ohjack,项目名称:mallerp_standard,代码行数:101,代码来源:Charts.php


注:本文中的pChart::drawFilledCubicCurve方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。