获取画布宽度和高度 计算当前屏内相对转换后的X轴位置 根据X轴位置,计算屏内起始和结束展示数据的索引 计算最大值和最小值
@override void onCompute(Size size) { super.onCompute(size); contentHeight = canvasHeight - paddingTop; _radio = contentHeight / maxValue; }