ChartPainter constructor
ChartPainter(
- ChartStyle chartStyle,
- ChartColors chartColors, {
- required List<
Line> lines, - required bool isTrendLine,
- required double selectY,
- required dynamic datas,
- required dynamic extraBuySellSignals,
- required dynamic scaleX,
- required dynamic scrollX,
- required dynamic isLongPass,
- required dynamic selectX,
- dynamic isOnTap,
- dynamic isTapShowInfoDialog,
- required VerticalTextAlignment verticalTextAlignment,
- dynamic mainState,
- dynamic volHidden,
- dynamic secondaryState,
- StreamSink<
InfoWindowEntity?> ? sink, - bool isLine = false,
- bool hideGrid = false,
- bool showNowPrice = true,
- List<
Color> ? bgColor, - int fixedLength = 2,
- List<
int> maDayList = const [5, 10, 20], - List<
ExtraLine> ? extraLineList, - 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;
}