ChartPainter constructor

ChartPainter(
  1. KChartStyle chartStyle,
  2. KChartColors chartColors, {
  3. required List<TrendLine> lines,
  4. required bool isTrendLine,
  5. required double selectY,
  6. required StreamSink<InfoWindowEntity?> sink,
  7. required dynamic datas,
  8. required dynamic scaleX,
  9. required dynamic scrollX,
  10. required dynamic isLongPass,
  11. required dynamic selectX,
  12. required dynamic xFrontPadding,
  13. required BaseDimension baseDimension,
  14. dynamic isOnTap,
  15. dynamic isTapShowInfoDialog,
  16. required VerticalTextAlignment verticalTextAlignment,
  17. dynamic mainIndicators,
  18. dynamic volHidden,
  19. dynamic secondaryIndicators,
  20. bool isLine = false,
  21. bool hideGrid = false,
  22. bool showNowPrice = true,
  23. int fixedLength = 2,
})

Implementation

ChartPainter(
  this.chartStyle,
  this.chartColors, {
  required this.lines, //For TrendLine
  required this.isTrendLine, //For TrendLine
  required this.selectY, //For TrendLine
  required this.sink,
  required datas,
  required scaleX,
  required scrollX,
  required isLongPass,
  required selectX,
  required xFrontPadding,
  required this.baseDimension,
  isOnTap,
  isTapShowInfoDialog,
  required this.verticalTextAlignment,
  mainIndicators,
  volHidden,
  secondaryIndicators,
  bool isLine = false,
  this.hideGrid = false,
  this.showNowPrice = true,
  this.fixedLength = 2,
}) : super(chartStyle,
          datas: datas,
          scaleX: scaleX,
          scrollX: scrollX,
          isLongPress: isLongPass,
          baseDimension: baseDimension,
          isOnTap: isOnTap,
          isTapShowInfoDialog: isTapShowInfoDialog,
          selectX: selectX,
          mainIndicators: mainIndicators,
          volHidden: volHidden,
          secondaryIndicators: secondaryIndicators,
          xFrontPadding: xFrontPadding,
          isLine: isLine) {
  paintCross = Paint()
    ..color = this.chartColors.crossColor
    ..strokeWidth = this.chartStyle.crossWidth
    ..isAntiAlias = true;
  selectPointPaint = Paint()
    ..isAntiAlias = true
    ..color = this.chartColors.selectFillColor;
  selectorBorderPaint = Paint()
    ..isAntiAlias = true
    ..strokeWidth = this.chartStyle.borderWidth
    ..style = PaintingStyle.stroke
    ..color = this.chartColors.selectBorderColor;

  nowPriceSelectorPaint = Paint()
    ..color = this.chartColors.bgColor
    ..isAntiAlias = true;
  nowPriceSelectorBorderPaint = Paint()
    ..style = PaintingStyle.stroke
    ..strokeWidth = this.chartStyle.borderWidth
    ..isAntiAlias = true;
  nowPriceLinePaint = Paint()
    ..strokeWidth = this.chartStyle.nowPriceLineWidth
    ..isAntiAlias = true;
}