Draws gantt series in the canvas element.
@param {Object} series - Series with options.gantt.show = true.
433898
function(series) {
    var ctx = this.ctx,
      bw = series.gantt.barWidth,
      lw = Math.min(series.gantt.lineWidth, bw);
    
    ctx.save();
    ctx.translate(this.plotOffset.left, this.plotOffset.top);
    ctx.lineJoin = 'miter';

    /**
     * @todo linewidth not interpreted the right way.
     */
    ctx.lineWidth = lw;
    ctx.strokeStyle = series.color;
    
    ctx.save();
    this.gantt.plotShadows(series, bw, 0, series.gantt.fill);
    ctx.restore();
    
    if(series.gantt.fill){
      var color = series.gantt.fillColor || series.color;
      ctx.fillStyle = this.processColor(color, {opacity: series.gantt.fillOpacity});
    }
    
    this.gantt.plot(series, bw, 0, series.gantt.fill);
    ctx.restore();
  }
1261273
function (init) {
		var series = this,
			chart = series.chart,
			clipRect = series.clipRect,
			animation = series.options.animation;

		if (animation && !isObject(animation)) {
			animation = {};
		}

		if (init) { // initialize the animation
			if (!clipRect.isAnimating) { // apply it only for one of the series
				clipRect.attr('width', 0);
				clipRect.isAnimating = true;
			}

		} else { // run the animation
			clipRect.animate({
				width: chart.plotSizeX
			}, animation);

			// delete this function to allow it only once
			this.animate = null;
		}
	}
1171304
function (d, chart, series) {
            var returnOpacity = 0;
            if (series.c !== null && series.c !== undefined) {
                returnOpacity = d.opacity;
            } else {
                returnOpacity = chart.getColor(d.aggField.slice(-1)[0]).opacity;
            }
            return returnOpacity;
        }
873177
function () {
		var series = this,
			chart = series.chart;

		// Pie, go away (#1736)
		if (!series.xAxis) {
			return;
		}
		
		// A fixed size is needed for inversion to work
		function setInvert() {			
			var size = {
				width: series.yAxis.len,
				height: series.xAxis.len
			};
			
			each(['group', 'markerGroup'], function (groupName) {
				if (series[groupName]) {
					series[groupName].attr(size).invert();
				}
			});
		}

		addEvent(chart, 'resize', setInvert); // do it on resize
		addEvent(series, 'destroy', function () {
			removeEvent(chart, 'resize', setInvert);
		});

		// Do it now
		setInvert(); // do it now
		
		// On subsequent render and redraw, just do setInvert without setting up events again
		series.invertGroups = setInvert;
	}
644987
function (cb, context) {
        assertSeriesInitialized(this);
        each(this._seriesIndices, function (rawSeriesIndex) {
            var series = this._componentsMap.get('series')[rawSeriesIndex];
            cb.call(context, series, rawSeriesIndex);
        }, this);
    }
102489
public AbstractChart<T, S> setSeries(Collection<Serie> series) {
		this.getChartConfiguration().setSeries(series);
		return this;
	}
1198104
function(after) {

    var
      context = this.ctx,
      i;

    E.fire(this.el, 'flotr:beforedraw', [this.series, this]);

    if (this.series.length) {

      context.save();
      context.translate(this.plotOffset.left, this.plotOffset.top);

      for (i = 0; i < this.series.length; i++) {
        if (!this.series[i].hide) this.drawSeries(this.series[i]);
      }

      context.restore();
      this.clip();
    }

    E.fire(this.el, 'flotr:afterdraw', [this.series, this]);
    if (after) after();
  }
1153122
function () {
		var series = this,
			chart = series.chart,
			group,
			options = series.options,
			animation = options.animation,
			doAnimation = animation && !!series.animate && 
				chart.renderer.isSVG, // this animation doesn't work in IE8 quirks when the group div is hidden,
				// and looks bad in other oldIE
			visibility = series.visible ? VISIBLE : HIDDEN,
			zIndex = options.zIndex,
			hasRendered = series.hasRendered,
			chartSeriesGroup = chart.seriesGroup;
		
		// the group
		group = series.plotGroup(
			'group', 
			'series', 
			visibility, 
			zIndex, 
			chartSeriesGroup
		);
		
		series.markerGroup = series.plotGroup(
			'markerGroup', 
			'markers', 
			visibility, 
			zIndex, 
			chartSeriesGroup
		);
		
		// initiate the animation
		if (doAnimation) {
			series.animate(true);
		}

		// cache attributes for shapes
		series.getAttribs();

		// SVGRenderer needs to know this before drawing elements (#1089, #1795)
		group.inverted = series.isCartesian ? chart.inverted : false;
		
		// draw the graph if any
		if (series.drawGraph) {
			series.drawGraph();
			series.clipNeg();
		}

		// draw the data labels (inn pies they go before the points)
		series.drawDataLabels();
		
		// draw the points
		series.drawPoints();


		// draw the mouse tracking area
		if (series.options.enableMouseTracking !== false) {
			series.drawTracker();
		}
		
		// Handle inverted series and tracker groups
		if (chart.inverted) {
			series.invertGroups();
		}
		
		// Initial clipping, must be defined after inverting groups for VML
		if (options.clip !== false && !series.sharedClipKey && !hasRendered) {
			group.clip(chart.clipRect);
		}

		// Run the animation
		if (doAnimation) {
			series.animate();
		} else if (!hasRendered) {
			series.afterAnimate();
		}

		series.isDirty = series.isDirtyData = false; // means data is in accordance with what you see
		// (See #322) series.isDirty = series.isDirtyData = false; // means data is in accordance with what you see
		series.hasRendered = true;
	}
5638
function initSeries(options) {
		var type = options.type || optionsChart.type || optionsChart.defaultSeriesType,
			typeClass = seriesTypes[type],
			serie,
			hasRendered = chart.hasRendered;

		// an inverted chart can't take a column series and vice versa
		if (hasRendered) {
			if (inverted && type === 'column') {
				typeClass = seriesTypes.bar;
			} else if (!inverted && type === 'bar') {
				typeClass = seriesTypes.column;
			}
		}

		serie = new typeClass();

		serie.init(chart, options);

		// set internal chart properties
		if (!hasRendered && serie.inverted) {
			inverted = true;
		}
		if (serie.isCartesian) {
			hasCartesianSeries = serie.isCartesian;
		}

		series.push(serie);

		return serie;
	}
1033586
function () {
		var series = this;

		// cache attributes for shapes
		//series.getAttribs();

		this.drawPoints();

		// draw the mouse tracking area
		if (series.options.enableMouseTracking !== false) {
			series.drawTracker();
		}
        
        // PATCH by Simon Fishel
        //
        // execute beforeLabelRender hook to allow re-formatting of data labels
        //
        // + if(series.options.hooks && series.options.hooks.beforeLabelRender) {
        // +    series.options.hooks.beforeLabelRender(series)
        // + }
        
        if(series.options.hooks && series.options.hooks.beforeLabelRender) {
            series.options.hooks.beforeLabelRender(series)
        }

		this.drawDataLabels();

		if (series.options.animation && series.animate) {
			series.animate();
		}

		series.isDirty = false; // means data is in accordance with what you see
	}
1309056
function () {
		var series = this,
			chart = series.chart,
			hoverSeries = chart.hoverSeries;

		// set normal state to previous series
		if (hoverSeries && hoverSeries !== series) {
			hoverSeries.onMouseOut();
		}

		// trigger the event, but to save processing time,
		// only if defined
		if (series.options.events.mouseOver) {
			fireEvent(series, 'mouseOver');
		}

		// hover this
		series.setState(HOVER_STATE);
		chart.hoverSeries = series;
	}
615602
public function drawBubbleChart($DataSeries, $WeightSeries, $Format = "")
    {
        $ForceAlpha = isset($Format["ForceAlpha"]) ? $Format["ForceAlpha"] : VOID;
        $DrawBorder = isset($Format["DrawBorder"]) ? $Format["DrawBorder"] : true;
        $BorderWidth = isset($Format["BorderWidth"]) ? $Format["BorderWidth"] : 1;
        $Shape = isset($Format["Shape"]) ? $Format["Shape"] : BUBBLE_SHAPE_ROUND;
        $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : null;
        $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : 0;
        $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : 0;
        $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : 0;
        $BorderAlpha = isset($Format["BorderAlpha"]) ? $Format["BorderAlpha"] : 30;
        $RecordImageMap = isset($Format["RecordImageMap"]) ? $Format["RecordImageMap"] : false;

        if (!is_array($DataSeries)) {
            $DataSeries = [$DataSeries];
        }
        if (!is_array($WeightSeries)) {
            $WeightSeries = [$WeightSeries];
        }

        $Data = $this->pDataObject->getData();
        $Palette = $this->pDataObject->getPalette();

        if (isset($Data["Series"]["BubbleFakePositiveSerie"])) {
            $this->pDataObject->setSerieDrawable("BubbleFakePositiveSerie", false);
        }
        if (isset($Data["Series"]["BubbleFakeNegativeSerie"])) {
            $this->pDataObject->setSerieDrawable("BubbleFakeNegativeSerie", false);
        }

        $this->resetSeriesColors();

        list($XMargin, $XDivs) = $this->pChartObject->scaleGetXSettings();

        foreach ($DataSeries as $Key => $SerieName) {
            $AxisID = $Data["Series"][$SerieName]["Axis"];
            $Mode = $Data["Axis"][$AxisID]["Display"];
            $Format = $Data["Axis"][$AxisID]["Format"];
            $Unit = $Data["Axis"][$AxisID]["Unit"];

            if (isset($Data["Series"][$SerieName]["Description"])) {
                $SerieDescription = $Data["Series"][$SerieName]["Description"];
            } else {
                $SerieDescription = $SerieName;
            }

            $XStep = ($this->pChartObject->GraphAreaX2 - $this->pChartObject->GraphAreaX1 - $XMargin * 2) / $XDivs;

            $X = $this->pChartObject->GraphAreaX1 + $XMargin;
            $Y = $this->pChartObject->GraphAreaY1 + $XMargin;

            $Color = [
                "R" => $Palette[$Key]["R"],
                "G" => $Palette[$Key]["G"],
                "B" => $Palette[$Key]["B"],
                "Alpha" => $Palette[$Key]["Alpha"]
            ];

            if ($ForceAlpha != VOID) {
                $Color["Alpha"] = $ForceAlpha;
            }

            if ($DrawBorder) {
                if ($BorderWidth != 1) {
                    if ($Surrounding != null) {
                        $BorderR = $Palette[$Key]["R"] + $Surrounding;
                        $BorderG = $Palette[$Key]["G"] + $Surrounding;
                        $BorderB = $Palette[$Key]["B"] + $Surrounding;
                    }
                    if ($ForceAlpha != VOID) {
                        $BorderAlpha = $ForceAlpha / 2;
                    }
                    $BorderColor = [
                        "R" => $BorderR,
                        "G" => $BorderG,
                        "B" => $BorderB,
                        "Alpha" => $BorderAlpha
                    ];
                } else {
                    $Color["BorderAlpha"] = $BorderAlpha;

                    if ($Surrounding != null) {
                        $Color["BorderR"] = $Palette[$Key]["R"] + $Surrounding;
                        $Color["BorderG"] = $Palette[$Key]["G"] + $Surrounding;
                        $Color["BorderB"] = $Palette[$Key]["B"] + $Surrounding;
                    } else {
                        $Color["BorderR"] = $BorderR;
                        $Color["BorderG"] = $BorderG;
                        $Color["BorderB"] = $BorderB;
                    }
                    if ($ForceAlpha != VOID) {
                        $Color["BorderAlpha"] = $ForceAlpha / 2;
                    }
                }
            }

            foreach ($Data["Series"][$SerieName]["Data"] as $iKey => $Point) {
                $Weight = $Point + $Data["Series"][$WeightSeries[$Key]]["Data"][$iKey];

                $PosArray = $this->pChartObject->scaleComputeY(
                    $Point,
                    ["AxisID" => $AxisID]
                );
                $WeightArray = $this->pChartObject->scaleComputeY(
                    $Weight,
                    ["AxisID" => $AxisID]
                );

                if ($Data["Orientation"] == SCALE_POS_LEFTRIGHT) {
                    if ($XDivs == 0) {
                        $XStep = 0;
                    } else {
                        $XStep = ($this->pChartObject->GraphAreaX2 - $this->pChartObject->GraphAreaX1 - $XMargin * 2)
                            / $XDivs
                        ;
                    }
                    $Y = floor($PosArray);
                    $CircleRadius = floor(abs($PosArray - $WeightArray) / 2);

                    if ($Shape == BUBBLE_SHAPE_SQUARE) {
                        if ($RecordImageMap) {
                            $this->pChartObject->addToImageMap(
                                "RECT",
                                (
                                    floor($X - $CircleRadius)
                                    . "," . floor($Y - $CircleRadius)
                                    . "," . floor($X + $CircleRadius)
                                    . "," . floor($Y + $CircleRadius)
                                ),
                                $this->pChartObject->toHTMLColor(
                                    $Palette[$Key]["R"],
                                    $Palette[$Key]["G"],
                                    $Palette[$Key]["B"]
                                ),
                                $SerieDescription,
                                $Data["Series"][$WeightSeries[$Key]]["Data"][$iKey]
                            );
                        }

                        if ($BorderWidth != 1) {
                            $this->pChartObject->drawFilledRectangle(
                                $X - $CircleRadius - $BorderWidth,
                                $Y - $CircleRadius - $BorderWidth,
                                $X + $CircleRadius + $BorderWidth,
                                $Y + $CircleRadius + $BorderWidth,
                                $BorderColor
                            );
                            $this->pChartObject->drawFilledRectangle(
                                $X - $CircleRadius,
                                $Y - $CircleRadius,
                                $X + $CircleRadius,
                                $Y + $CircleRadius,
                                $Color
                            );
                        } else {
                            $this->pChartObject->drawFilledRectangle(
                                $X - $CircleRadius,
                                $Y - $CircleRadius,
                                $X + $CircleRadius,
                                $Y + $CircleRadius,
                                $Color
                            );
                        }
                    } elseif ($Shape == BUBBLE_SHAPE_ROUND) {
                        if ($RecordImageMap) {
                            $this->pChartObject->addToImageMap(
                                "CIRCLE",
                                floor($X) . "," . floor($Y) . "," . floor($CircleRadius),
                                $this->pChartObject->toHTMLColor(
                                    $Palette[$Key]["R"],
                                    $Palette[$Key]["G"],
                                    $Palette[$Key]["B"]
                                ),
                                $SerieDescription,
                                $Data["Series"][$WeightSeries[$Key]]["Data"][$iKey]
                            );
                        }

                        if ($BorderWidth != 1) {
                            $this->pChartObject->drawFilledCircle(
                                $X,
                                $Y,
                                $CircleRadius + $BorderWidth,
                                $BorderColor
                            );
                            $this->pChartObject->drawFilledCircle($X, $Y, $CircleRadius, $Color);
                        } else {
                            $this->pChartObject->drawFilledCircle($X, $Y, $CircleRadius, $Color);
                        }
                    }

                    $X = $X + $XStep;
                } elseif ($Data["Orientation"] == SCALE_POS_TOPBOTTOM) {
                    if ($XDivs == 0) {
                        $XStep = 0;
                    } else {
                        $XStep = ($this->pChartObject->GraphAreaY2 - $this->pChartObject->GraphAreaY1 - $XMargin * 2)
                            / $XDivs
                        ;
                    }
                    $X = floor($PosArray);
                    $CircleRadius = floor(abs($PosArray - $WeightArray) / 2);

                    if ($Shape == BUBBLE_SHAPE_SQUARE) {
                        if ($RecordImageMap) {
                            $this->pChartObject->addToImageMap(
                                "RECT",
                                (
                                    floor($X - $CircleRadius) . ","
                                    . floor($Y - $CircleRadius) . ","
                                    . floor($X + $CircleRadius) . ","
                                    . floor($Y + $CircleRadius)
                                ),
                                $this->pChartObject->toHTMLColor(
                                    $Palette[$Key]["R"],
                                    $Palette[$Key]["G"],
                                    $Palette[$Key]["B"]
                                ),
                                $SerieDescription,
                                $Data["Series"][$WeightSeries[$Key]]["Data"][$iKey]
                            );
                        }

                        if ($BorderWidth != 1) {
                            $this->pChartObject->drawFilledRectangle(
                                $X - $CircleRadius - $BorderWidth,
                                $Y - $CircleRadius - $BorderWidth,
                                $X + $CircleRadius + $BorderWidth,
                                $Y + $CircleRadius + $BorderWidth,
                                $BorderColor
                            );
                            $this->pChartObject->drawFilledRectangle(
                                $X - $CircleRadius,
                                $Y - $CircleRadius,
                                $X + $CircleRadius,
                                $Y + $CircleRadius,
                                $Color
                            );
                        } else {
                            $this->pChartObject->drawFilledRectangle(
                                $X - $CircleRadius,
                                $Y - $CircleRadius,
                                $X + $CircleRadius,
                                $Y + $CircleRadius,
                                $Color
                            );
                        }
                    } elseif ($Shape == BUBBLE_SHAPE_ROUND) {
                        if ($RecordImageMap) {
                            $this->pChartObject->addToImageMap(
                                "CIRCLE",
                                floor($X) . "," . floor($Y) . "," . floor($CircleRadius),
                                $this->pChartObject->toHTMLColor(
                                    $Palette[$Key]["R"],
                                    $Palette[$Key]["G"],
                                    $Palette[$Key]["B"]
                                ),
                                $SerieDescription,
                                $Data["Series"][$WeightSeries[$Key]]["Data"][$iKey]
                            );
                        }

                        if ($BorderWidth != 1) {
                            $this->pChartObject->drawFilledCircle(
                                $X,
                                $Y,
                                $CircleRadius + $BorderWidth,
                                $BorderColor
                            );
                            $this->pChartObject->drawFilledCircle($X, $Y, $CircleRadius, $Color);
                        } else {
                            $this->pChartObject->drawFilledCircle($X, $Y, $CircleRadius, $Color);
                        }
                    }

                    $Y = $Y + $XStep;
                }
            }
        }
    }
920717
@Override
    protected void onGraphDraw(Canvas _Canvas) {
        super.onGraphDraw(_Canvas);
        if(mUseOverlapFill) {
            mLinePaint.setStyle(Paint.Style.FILL);
        }
        else {
            mLinePaint.setStrokeWidth(mLineStroke);
            mLinePaint.setStyle(Paint.Style.STROKE);
        }

        _Canvas.concat(mDrawMatrix);
        if(mHasNegativeValues) {
            _Canvas.translate(0, -mNegativeOffset);
        }

        // drawing of lines
        for (ValueLineSeries series : mSeries) {
            mLinePaint.setColor(series.getColor());
            _Canvas.drawPath(series.getPath(), mLinePaint);
        }
    }
371207
private void setSeriesStyles() {

    SeriesColorMarkerLineStyleCycler seriesColorMarkerLineStyleCycler =
        new SeriesColorMarkerLineStyleCycler(
            getStyler().getSeriesColors(),
            getStyler().getSeriesMarkers(),
            getStyler().getSeriesLines());
    for (Series series : getSeriesMap().values()) {

      SeriesColorMarkerLineStyle seriesColorMarkerLineStyle =
          seriesColorMarkerLineStyleCycler.getNextSeriesColorMarkerLineStyle();

      if (series.getFillColor() == null) { // wasn't set manually
        series.setFillColor(seriesColorMarkerLineStyle.getColor());
      }
    }
  }
352013
function PowerSample(series, start, power) {
    Event.call(this);

    this.series_ = series;
    this.start_ = start;
    this.power_ = power;
  }
246369
function () {
			var series = this,
				points = series.points,
				seriesOptions = series.options,
				attr,
				hover,
				level;
			each(points, function (point) {
				if (point.node.isVisible) {
					level = series.levelMap[point.level];
					attr = {
						stroke: seriesOptions.borderColor,
						'stroke-width': seriesOptions.borderWidth,
						dashstyle: seriesOptions.borderDashStyle,
						r: 0, // borderRadius gives wrong size relations and should always be disabled
						fill: pick(point.color, series.color)
					};
					// Overwrite standard series options with level options			
					if (level) {
						attr.stroke = level.borderColor || attr.stroke;
						attr['stroke-width'] = level.borderWidth || attr['stroke-width'];
						attr.dashstyle = level.borderDashStyle || attr.dashstyle;
					}
					// Merge with point attributes
					attr.stroke = point.borderColor || attr.stroke;
					attr['stroke-width'] = point.borderWidth || attr['stroke-width'];
					attr.dashstyle = point.borderDashStyle || attr.dashstyle;
					attr.zIndex = (1000 - (point.level * 2));

					// Make a copy to prevent overwriting individual props
					point.pointAttr = merge(point.pointAttr);
					hover = point.pointAttr.hover;
					hover.zIndex = 1001;
					hover.fill = Color(attr.fill).brighten(seriesOptions.states.hover.brightness).get();
					// If not a leaf, then remove fill
					if (!point.isLeaf) {
						if (pick(seriesOptions.interactByLeaf, !seriesOptions.allowDrillToNode)) {
							attr.fill = 'none';
							delete hover.fill;
						} else {
							// TODO: let users set the opacity
							attr.fill = Color(attr.fill).setOpacity(0.15).get();
							hover.fill = Color(hover.fill).setOpacity(0.75).get();
						}
					}
					if (point.node.level <= series.nodeMap[series.rootNode].level) {
						attr.fill = 'none';
						attr.zIndex = 0;
						delete hover.fill;
					}
					point.pointAttr[''] = H.extend(point.pointAttr[''], attr);
					if (point.dataLabel) {
						point.dataLabel.attr({ zIndex: (point.pointAttr[''].zIndex + 1) });
					}
				}
			});
			// Call standard drawPoints
			seriesTypes.column.prototype.drawPoints.call(this);

			each(points, function (point) {
				if (point.graphic) {
					point.graphic.attr(point.pointAttr['']);
				}
			});

			// Set click events on points 
			if (seriesOptions.allowDrillToNode) {
				series.drillTo();
			}
		}
513864
function () {
            var series = this,
              seriesOptions = series.options,
              chart = series.chart,
              axisOptions;

            each(series.axisTypes || [], function (AXIS) { // repeat for xAxis and yAxis

                each(chart[AXIS], function (axis) { // loop through the chart's axis objects
                    axisOptions = axis.options;

                    // apply if the series xAxis or yAxis option mathches the number of the
                    // axis, or if undefined, use the first axis
                    if ((seriesOptions[AXIS] === axisOptions.index) ||
                      (seriesOptions[AXIS] !== UNDEFINED && seriesOptions[AXIS] === axisOptions.id) ||
                      (seriesOptions[AXIS] === UNDEFINED && axisOptions.index === 0)) {

                        // register this series in the axis.series lookup
                        axis.series.push(series);

                        // set this series.xAxis or series.yAxis reference
                        series[AXIS] = axis;

                        // mark dirty for redraw
                        axis.isDirty = true;
                    }
                });

                // The series needs an X and an Y axis
                if (!series[AXIS] && series.optionalAxis !== AXIS) {
                    error(18, true);
                }

            });
        }