@@ -144,8 +144,6 @@ public function process(PHP_CodeCoverage $coverage, $target)
144144 $ this ->options ['generator ' ]
145145 );
146146
147- $ this ->classCoverageDistributionChart ($ classes , $ target );
148-
149147 $ template = new Text_Template (
150148 PHP_CodeCoverage_Report_HTML::$ templatePath . 'dashboard.html '
151149 );
@@ -162,7 +160,8 @@ public function process(PHP_CodeCoverage $coverage, $target)
162160 'php_version ' => PHP_VERSION ,
163161 'generator ' => $ this ->options ['generator ' ],
164162 'least_tested_methods ' => $ this ->leastTestedMethods ($ classes ),
165- 'top_project_risks ' => $ this ->topProjectRisks ($ classes )
163+ 'top_project_risks ' => $ this ->topProjectRisks ($ classes ),
164+ 'ccd_values ' => $ this ->classCoverageDistribution ($ classes )
166165 )
167166 );
168167
@@ -221,9 +220,10 @@ protected function classes(PHP_CodeCoverage_Report_HTML_Node_Directory $root)
221220 /**
222221 * Renders the Class Coverage Distribution chart.
223222 *
224- * @param array $classes
223+ * @param array $classes
224+ * @return string
225225 */
226- protected function classCoverageDistributionChart (array $ classes, $ target )
226+ protected function classCoverageDistribution (array $ classes )
227227 {
228228 $ data = array (
229229 '0% ' => 0 ,
@@ -255,6 +255,8 @@ protected function classCoverageDistributionChart(array $classes, $target)
255255 $ data [$ key ]++;
256256 }
257257 }
258+
259+ return json_encode (array_values ($ data ));
258260 }
259261
260262 /**
@@ -268,7 +270,10 @@ protected function copyFiles($target)
268270 'close12_1.gif ' ,
269271 'container.css ' ,
270272 'container-min.js ' ,
273+ 'excanvas.compressed.js ' ,
271274 'glass.png ' ,
275+ 'RGraph.bar.js ' ,
276+ 'RGraph.common.js ' ,
272277 'scarlet_red.png ' ,
273278 'snow.png ' ,
274279 'style.css ' ,
0 commit comments