getFillPaint method

  1. @override
Paint getFillPaint ()
override

Gets the color of the series.

Implementation

@override
Paint getFillPaint() {
  final bool hasPointColor = series.pointColorMapper != null ? true : false;

  /// Get and set the paint options for column series.
  if (series.gradient == null) {
    if (color != null) {
      fillPaint = Paint()
        ..color = _currentPoint.isEmpty == true
            ? series.emptyPointSettings.color
            : (hasPointColor ? _currentPoint.pointColorMapper : color)
        ..style = PaintingStyle.fill;
      _defaultFillColor = fillPaint;
    }
  } else {
    fillPaint = _getLinearGradientPaint(series.gradient, _currentPoint.region,
        series._chart._requireInvertedAxis);
  }
  fillPaint.color = fillPaint.color.withOpacity(series.opacity);
  return fillPaint;
}