MacdChartPainter class
- Inheritance
-
- Object
- Listenable
- CustomPainter
- BasePainter
- BarChartPainter<
AceEntity> - BipolarChartPainter<
AceEntity> - MacdChartPainter
Constructors
-
MacdChartPainter({required double difAndDeaLineWidth, required Color difLineColor, required Color deaLineColor, required double paddingTop, required List<
AceEntity> values, required double scrollX, required double scale, required double pointSpace, required double pointWidth, required double strokeWidth, required PaintingStyle upperStyle, required PaintingStyle fairStyle, required PaintingStyle lowerStyle, required Color upperColor, required Color fairColor, required Color lowerColor, required Color crossLineColor, required double crossLineWidth, required int gridHorizontalGrids, required int gridVerticalGrids, required Color gridLineColor, required double gridLineWidth, required List<double> transform(List<AceEntity> values), required BarStyle transformBarStyle(AceEntity item), Offset? pressOffset, required TextStyle textStyle, required bool showText})
Properties
- canvasHeight ↔ double
-
getter/setter pairinherited
- canvasWidth ↔ double
-
getter/setter pairinherited
- contentHeight ↔ double
-
getter/setter pairinherited
- crossLineColor → Color
-
交叉线样式
finalinherited
- crossLineWidth → double
-
finalinherited
- deaLineColor → Color
-
final
- difAndDeaLineWidth → double
-
final
- difLineColor → Color
-
final
- endIndex ↔ int
-
getter/setter pairinherited
- fairColor → Color
-
finalinherited
- fairStyle → PaintingStyle
-
finalinherited
- gridHorizontalGrids → int
-
网格水平分成几格
finalinherited
- gridLineColor → Color
-
网格线颜色
finalinherited
- gridLineWidth → double
-
finalinherited
- gridVerticalGrids → int
-
网格垂直分成几格
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- lowerColor → Color
-
finalinherited
- lowerStyle → PaintingStyle
-
finalinherited
- maxValue ↔ double
-
最大数据
getter/setter pairinherited
- minValue ↔ double
-
最小数据
getter/setter pairinherited
- paddingLeft → double
-
finalinherited
- paddingRight → double
-
finalinherited
- paddingTop → double
-
finalinherited
- pointSpace → double
-
点之间的间距
finalinherited
- pointWidth → double
-
finalinherited
- pressOffset → Offset?
-
finalinherited
- ratio ↔ double
-
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scale → double
-
放大倍数
finalinherited
- scrollX → double
-
滚动位置
finalinherited
- semanticsBuilder → SemanticsBuilderCallback?
-
Returns a function that builds semantic information for the picture drawn
by this painter.
no setterinherited
- showText → bool
-
finalinherited
- showValueText → bool
-
finalinherited
- startIndex ↔ int
-
getter/setter pairinherited
- strokeWidth → double
-
finalinherited
- textStyle → TextStyle
-
finalinherited
-
transform
→ List<
double> Function(List<AceEntity> values) -
finalinherited
- transformBarStyle → BarStyle Function(AceEntity item)
-
finalinherited
- upperColor → Color
-
finalinherited
- upperStyle → PaintingStyle
-
finalinherited
-
values
→ List<
AceEntity> -
finalinherited
- valueTextFontSize → double
-
finalinherited
- zeroLineY ↔ double
-
getter/setter pairinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be notified when it is time to repaint.
inherited
-
bisectionTransformXToIndex(
double x, int start, int end) → int -
二分查找法
inherited
-
createText(
{required String text, required TextStyle style}) → TextPainter -
创建一个文本TextPainter
inherited
-
drawCandle(
{required Canvas canvas, required PaintingStyle style, required double strokeWidth, required double scale, required Color color, required double dx, required double width, required double highY, required double lowY, required double closeY, required double openY}) → void -
inherited
-
drawChart(
Canvas canvas) → void -
inherited
-
drawCross(
Canvas canvas) → void -
绘制交叉线
inherited
-
drawCrossLine(
{required Canvas canvas, required double canvasWidth, required double canvasHeight, required double scrollX, required double scale, required double dx, required double dy, required Color color, required double strokeWidth}) → void -
交叉线
inherited
-
drawCrossText(
{required Canvas canvas, required double canvasWidth, required double canvasHeight, required double scrollX, required double scale, required double dx, required double dy, required double pressX, required String yText, required String xText, required TextStyle style, required Color bgColor, required Color borderColor}) → void -
绘制交叉点文字
inherited
-
drawGrid(
{required Canvas canvas, required double canvasWidth, required double canvasHeight, required int verticalGrids, required int horizontalGrids, required Color lineColor, required double strokeWidth, required double paddingTop}) → void -
inherited
-
drawGridText(
{required Canvas canvas, required double canvasWidth, required double canvasHeight, required int verticalGrids, required int horizontalGrids, required double maxValue, required double minValue, required double paddingTop, required TextStyle lowerStyle, required TextStyle upperStyle, required TextStyle gridTextStyle, double? lastClose}) → void -
绘制网格文字
inherited
-
drawGridVerticalText(
{required Canvas canvas, required double canvasWidth, required double canvasHeight, required double value, required double dy, required TextStyle style, double? lastClose}) → void -
绘制垂直文字
inherited
-
drawHistogram(
{required Canvas canvas, required PaintingStyle style, required double strokeWidth, required double scale, required Color color, required Rect rect}) → void -
inherited
-
drawLine(
{required Canvas canvas, required double startX, required double startY, required double endX, required double endY, required double strokeWidth, required Color color}) → void -
inherited
-
drawMa(
Canvas canvas) → void -
drawText(
Canvas canvas) → void -
inherited
-
drawVerticalDottedLine(
{required Canvas canvas, required double canvasWidth, required double y, required Color color, double scale = 1}) → void -
绘制横虚线
inherited
-
dxToTransformX(
double dx) → double -
X轴坐标值转translate后的坐标值
inherited
-
getRealItemWidth(
) → double -
inherited
-
getValues(
) → List< double> -
获取转换后的数据列表
inherited
-
hitTest(
Offset position) → bool? -
Called whenever a hit test is being performed on an object that is using
this custom paint delegate.
inherited
-
indexToX(
int index) → double -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onCompute(
Size size) → void -
获取画布宽度和高度
计算当前屏内相对转换后的X轴位置
根据X轴位置,计算屏内起始和结束展示数据的索引
计算最大值和最小值
override
-
onDraw(
Canvas canvas) → void -
override
-
paint(
Canvas canvas, Size size) → void -
Called whenever the object needs to paint. The given Canvas has its
coordinate space configured such that the origin is at the top left of the
box. The area of the box is the size of the
sizeargument.inherited -
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that the
object notifies when it is time to repaint.
inherited
-
shouldRebuildSemantics(
covariant CustomPainter oldDelegate) → bool -
Called whenever a new instance of the custom painter delegate class is
provided to the RenderCustomPaint object, or any time that a new
CustomPaint object is created with a new instance of the custom painter
delegate class (which amounts to the same thing, because the latter is
implemented in terms of the former).
inherited
-
shouldRepaint(
covariant CustomPainter oldDelegate) → bool -
Called whenever a new instance of the custom painter delegate class is
provided to the RenderCustomPaint object, or any time that a new
CustomPaint object is created with a new instance of the custom painter
delegate class (which amounts to the same thing, because the latter is
implemented in terms of the former).
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
transformValues(
) → List< double> -
inherited
-
transformXToIndex(
double translateX) → int -
将translate后的坐标值转换成数据索引
inherited
-
valueToY(
double value) → double -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited