BaseChartRenderer<T> constructor

BaseChartRenderer<T>({
  1. required Rect chartRect,
  2. required double maxValue,
  3. required double minValue,
  4. required double topPadding,
  5. required int fixedLength,
  6. required Color gridColor,
})

Implementation

BaseChartRenderer({
  required this.chartRect,
  required this.maxValue,
  required this.minValue,
  required this.topPadding,
  required this.fixedLength,
  required Color gridColor,
}) {
  if (maxValue == minValue) {
    maxValue *= 1.5;
    minValue /= 2;
  }
  scaleY = chartRect.height / (maxValue - minValue);
  gridPaint.color = gridColor;
  // print("maxValue=====" + maxValue.toString() + "====minValue===" + minValue.toString() + "==scaleY==" + scaleY.toString());
}