我正在尝试创建一个堆叠条形图,如下所示嵌入在 PowerPoint 模板的幻灯片上。当我在下面运行我的脚本时,我收到了一个错误。
TinyButStrong 错误 OpenTBS 插件:(ChartChangeSeries)'chart3':无法在图表'chart3'中找到系列'Series 3'。该过程正在结束,除非您将 NoErr 属性设置为 true。
据我所见,我的系列与 x 轴的两个标签中的每一个都明确定义。
我哪里出错了,我该如何解决这个错误?
$ecdClosureStatus = getClosureChartData('ECD');
$ChartNameOrNum = 'chart3'; // Title of the shape that embeds the chart
$ChartRef = 'chart3'; // Title of the shape that embeds the chart
$SeriesNameOrNum = 'Series 1';
$NewLegend = "Closed On Time";
$NewValues = array(
(int)$ecdClosureStatus['ClosedOnTime'],
0
);
$TBS->PlugIn(OPENTBS_CHART, $ChartNameOrNum, $SeriesNameOrNum, $NewValues, $NewLegend);
$SeriesNameOrNum = 'Series 2';
$NewLegend = 'Closed 1-30 Days Late';
$NewValues = array(
0,
(int)$ecdClosureStatus['OneToThirtyDaysLate']
);
$TBS->PlugIn(OPENTBS_CHART, $ChartNameOrNum, $SeriesNameOrNum, $NewValues, $NewLegend);
$SeriesNameOrNum = 'Series 3';
$NewLegend = 'Closed 31-60 Days Late';
$NewValues = array(
0,
(int)$ecdClosureStatus['ThirtyOneToSixtyDaysLate']
);
$TBS->PlugIn(OPENTBS_CHART, $ChartNameOrNum, $SeriesNameOrNum, $NewValues, $NewLegend);
$SeriesNameOrNum = 'Series 4';
$NewLegend = 'Closed 61-90 Days Late';
$NewValues = array(
0,
(int)$ecdClosureStatus['SixtyOneToNinetyDaysLate']
);
$TBS->PlugIn(OPENTBS_CHART, $ChartNameOrNum, $SeriesNameOrNum, $NewValues, $NewLegend);
$SeriesNameOrNum = 'Series 5';
$NewLegend = 'Closed >90 Days Late';
$NewValues = array(
0,
(int)$ecdClosureStatus['ClosedMoreThanNinetyDaysLate']
);
$TBS->PlugIn(OPENTBS_CHART, $ChartNameOrNum, $SeriesNameOrNum, $NewValues, $NewLegend);