ChartPainter constructor

ChartPainter(
  1. ChartStyle chartStyle,
  2. ChartColors chartColors, {
  3. required List<Line> lines,
  4. required bool isTrendLine,
  5. required double selectY,
  6. required dynamic datas,
  7. required dynamic extraBuySellSignals,
  8. required dynamic scaleX,
  9. required dynamic scrollX,
  10. required dynamic isLongPass,
  11. required dynamic selectX,
  12. dynamic isOnTap,
  13. dynamic isTapShowInfoDialog,
  14. required VerticalTextAlignment verticalTextAlignment,
  15. dynamic mainState,
  16. dynamic volHidden,
  17. dynamic secondaryState,
  18. StreamSink<InfoWindowEntity?>? sink,
  19. bool isLine = false,
  20. bool hideGrid = false,
  21. bool showNowPrice = true,
  22. List<Color>? bgColor,
  23. int fixedLength = 2,
  24. List<int> maDayList = const [5, 10, 20],
  25. List<ExtraLine>? extraLineList,
  26. List<ExtraTextLabel>? extraTextLabelList,
})

Implementation

ChartPainter(this.chartStyle, this.chartColors,
    {required this.lines, //For TrendLine
    required this.isTrendLine, //For TrendLine
    required this.selectY, //For TrendLine
    required datas,
    required extraBuySellSignals,
    required scaleX,
    required scrollX,
    required isLongPass,
    required selectX,
    isOnTap,
    isTapShowInfoDialog,
    required this.verticalTextAlignment,
    mainState,
    volHidden,
    secondaryState,
    this.sink,
    bool isLine = false,
    this.hideGrid = false,
    this.showNowPrice = true,
    this.bgColor,
    this.fixedLength = 2,
    this.maDayList = const [5, 10, 20],
    this.extraLineList,
    this.extraTextLabelList})
    : assert(bgColor == null || bgColor.length >= 2),
      super(chartStyle,
          datas: datas,
          extraBuySellSignals: extraBuySellSignals,
          linesForDraw: extraLineList,
          scaleX: scaleX,
          scrollX: scrollX,
          isLongPress: isLongPass,
          isOnTap: isOnTap,
          isTapShowInfoDialog: isTapShowInfoDialog,
          selectX: selectX,
          mainState: mainState,
          volHidden: volHidden,
          secondaryState: secondaryState,
          isLine: isLine) {
  selectPointPaint = Paint()
    ..isAntiAlias = true
    ..strokeWidth = 0.5
    ..color = this.chartColors.selectFillColor;
  selectorBorderPaint = Paint()
    ..isAntiAlias = true
    ..strokeWidth = 0.5
    ..style = PaintingStyle.stroke
    ..color = this.chartColors.selectBorderColor;
  nowPricePaint = Paint()
    ..strokeWidth = this.chartStyle.nowPriceLineWidth
    ..isAntiAlias = true;
}