@@ -219,13 +219,18 @@ public function gridYPitch($pitch)
219219
220220 /**
221221 * sets the color of dots
222- * @param string $color
222+ * @param array $color
223223 * @return self
224224 */
225- public function color ( $ color )
225+ public function colors ( $ colors )
226226 {
227- if (!$ this ->isColorCode ($ color )) return ;
228- $ this ->plotColor = $ color ;
227+ if (!is_array ($ colors )) return ;
228+ foreach ($ colors as $ index => $ color ) {
229+ if (!is_int ($ index )) return ;
230+ if ($ index < 0 || $ index > LIMIT_LAYERS ) return ;
231+ if (!$ this ->isColorCode ($ color )) return ;
232+ $ this ->colors [$ index ] = $ color ;
233+ }
229234 return $ this ;
230235 }
231236
@@ -374,17 +379,22 @@ public function specificationLimitY($lower, $upper, $width = 1, $color = '#ff00f
374379 /**
375380 * sets the width and color of the regression line
376381 * @param integer $width
377- * @param string $color
382+ * @param array $color
378383 * @return self
379384 */
380- public function regressionLine ($ width , $ color )
385+ public function regressionLine ($ width , $ colors )
381386 {
382387 if (!is_int ($ width )) return ;
383388 if ($ width < 1 ) return ;
384- if (!$ this ->isColorCode ($ color )) return ;
389+ if (!is_array ($ colors )) return ;
390+ foreach ($ colors as $ index => $ color ) {
391+ if (!is_int ($ index )) return ;
392+ if ($ index < 0 || $ index > LIMIT_LAYERS ) return ;
393+ if (!$ this ->isColorCode ($ color )) return ;
394+ $ this ->regressionLineColors [$ index ] = $ color ;
395+ }
385396 $ this ->regressionLine = true ;
386397 $ this ->regressionLineWidth = $ width ;
387- $ this ->regressionLineColor = $ color ;
388398 return $ this ;
389399 }
390400
@@ -567,6 +577,15 @@ public function specificationLimitsOff()
567577 return $ this ;
568578 }
569579
580+ /**
581+ * sets regression line on
582+ */
583+ public function regressionLineOn ()
584+ {
585+ $ this ->regressionLine = true ;
586+ return $ this ;
587+ }
588+
570589 /**
571590 * sets regression line off
572591 * @param
0 commit comments