init method
初始化 耗时的方法都可以放到这里
Implementation
@override
void init(ChartsState state) {
super.init(state);
_paint = Paint()
..color = color
..style = PaintingStyle.fill
..strokeWidth = 1;
_path = path;
if (anchor != null) {
Offset ost = anchor!(state.layout.size);
final matrix = Matrix4.identity()..leftTranslate(ost.dx, ost.dy);
_path = path.transform(matrix.storage);
}
}