0

如何为这个系列设置辅助轴?

    $series = new PHPExcel_Chart_DataSeries(
        PHPExcel_Chart_DataSeries::TYPE_LINECHART,      // plotType
        PHPExcel_Chart_DataSeries::GROUPING_CLUSTERED,  // plotGrouping
        $chartOrder,                                    // plotOrder
        $chartLables,                                   // plotLabel
        $chartCategories,                               // plotCategory
        $chartValues                                    // plotValues
    );
    $series->setPlotDirection(PHPExcel_Chart_DataSeries::DIRECTION_COL);
    $plotarea = new PHPExcel_Chart_PlotArea(null, array($series));
    $legend = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_BOTTOM, null, false);

    $chart = new PHPExcel_Chart(
        "chart_$topRow_$leftColumn",                    // name
        null,                                           // title
        $legend,                                        // legend
        $plotarea,                                      // plotArea
        true,                                           // plotVisibleOnly
        0,                                              // displayBlanksAs
        null,                                           // xAxisLabel
        null                                            // yAxisLabel
    );
    $chart->setTopLeftPosition('A1');
    $chart->setBottomRightPosition(K12');
    $objWorksheet->addChart($chart);
4

1 回答 1

0

你不能,次要 Y 轴尚不支持....请记住,图表仍被认为是实验性的,图表功能仍在构建中

于 2012-10-15T10:24:55.273 回答