ChartPainter constructor
ChartPainter(
- ChartStyle chartStyle,
- ChartColors chartColors, {
- required List<
TrendLine> lines, - required bool isTrendLine,
- required double selectY,
- required StreamSink<
InfoWindowEntity?> sink, - required dynamic datas,
- required dynamic scaleX,
- required dynamic scrollX,
- required dynamic isLongPass,
- required dynamic selectX,
- required dynamic xFrontPadding,
- required BaseDimension baseDimension,
- dynamic isOnTap,
- dynamic isTapShowInfoDialog,
- required VerticalTextAlignment verticalTextAlignment,
- dynamic mainState,
- dynamic volHidden,
- dynamic secondaryStateLi,
- bool isLine = false,
- bool hideGrid = false,
- bool showNowPrice = true,
- int fixedLength = 2,
- List<
int> maDayList = const [5, 10, 20],
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,
mainState,
volHidden,
secondaryStateLi,
bool isLine = false,
this.hideGrid = false,
this.showNowPrice = true,
this.fixedLength = 2,
this.maDayList = const [5, 10, 20],
}) : super(chartStyle,
datas: datas,
scaleX: scaleX,
scrollX: scrollX,
isLongPress: isLongPass,
baseDimension: baseDimension,
isOnTap: isOnTap,
isTapShowInfoDialog: isTapShowInfoDialog,
selectX: selectX,
mainState: mainState,
volHidden: volHidden,
secondaryStateLi: secondaryStateLi,
xFrontPadding: xFrontPadding,
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;
}