dongyuan9149 2016-08-05 09:47
浏览 70
已采纳

PHPPresentation - 折线图阴影

I want shaded line chart what would be the method to shade line area. I have used this code

     $seriesData = array(
        'Monday' => 12,
        'Tuesday' => 15,
        'Wednesday' => 13,
        'Thursday' => 17,
        'Friday' => 14,
        'Saturday' => 9,
        'Sunday' => 7
    );

    $seriesData1 = array(
        'Monday' => 22,
        'Tuesday' => 25,
        'Wednesday' => 23,
        'Thursday' => 27,
        'Friday' => 24,
        'Saturday' => 19,
        'Sunday' => 17
    );

    $oFill = new Fill();
    $oFill->setFillType(Fill::FILL_SOLID)->setStartColor(new Color('FFE06B99'));
    $oShadow = new Shadow();
    $oShadow->setVisible(true)->setDirection(45)->setDistance(10);

    $lineChart = new Line();
    $series = new Series('Downloads', $seriesData);
    $series->setShowSeriesName(true);
    $series->setShowValue(true);
    $series->setFill(new Fill(new Color('FFE06B99')));
    $lineChart->addSeries($series);

    $series1 = new Series('Downloads', $seriesData1);
    $series1->setShowSeriesName(true);
    $series1->setShowValue(true);
    $lineChart->addSeries($series1);

    $shape = $currentSlide->createChartShape();
    $shape->setName('PHPPresentation Daily Downloads')->setResizeProportional(false)->setHeight(550)->setWidth(700)->setOffsetX(120)->setOffsetY(80);
    $shape->getBorder()->setLineStyle(Border::LINE_SINGLE);
    $shape->getTitle()->setText('PHPPresentation Daily Downloads');
    $shape->getTitle()->getFont()->setItalic(true);
    $shape->getPlotArea()->setType($lineChart);
    $shape->getView3D()->setRotationX(30);
    $shape->getView3D()->setPerspective(30);
    $shape->getLegend()->getBorder()->setLineStyle(Border::LINE_SINGLE);
    $shape->getLegend()->getFont()->setItalic(true);

Is there any method for Series class or for Line class which helps to fill shade color. Please let me know how to shade the area for line chart

I want following type of chart

enter image description here

  • 写回答

1条回答 默认 最新

  • dongyutan1703 2016-08-09 07:39
    关注

    Please go through this link

    How do I customize the line in a line chart with PHPPowerpoint/PHPPresentation?

    Hope this solves your issue.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 2024-五一综合模拟赛
  • ¥15 如何将下列的“无限压缩存储器”设计出来
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口