PHPExcel 根据原始数据自动生成图表
$chart = new PHPExcel_Chart(
'chart1', // name
null, // title
$legend, // legend
$plotArea, // plotArea
true, // plotVisibleOnly
0, // displayBlanksAs
NULL, // xAxisLabel
$yAxisLabel, // yAxisLabel
null,
null,
null,
null,
$secondaryYAxisLabel // secondaryYAxisLabel
);
但是他会有原始数据的最小值作为起点,原本很平稳的曲线,取值范围不同就出现很陡的曲线了
双击y轴其实可以手动更改的最小值的,但是怎么用代码设置最新值呢
手动修改完如下图才是想要的效果