BaseChartRenderer<T> constructor

BaseChartRenderer<T>({
  1. required RendererStyle style,
  2. required Rect chartRect,
  3. required double maxValue,
  4. required double minValue,
  5. String dataFormat(
    1. double value
    )?,
})

Implementation

BaseChartRenderer({
  required this.style,
  required this.chartRect,
  required this.maxValue,
  required this.minValue,
  this.dataFormat
}) {
  if (maxValue == minValue) {
    maxValue *= 1.5;
    minValue /= 2;
  }
  scaleY = chartRect.height / (maxValue - minValue);
  gridPaint.color = style.colors.grid;
}