drawFigure method

  1. @override
TextSpan? drawFigure(
  1. CandleEntity entity,
  2. int precision,
  3. KChartColors chartColors
)
override

Implementation

@override
TextSpan? drawFigure(
    CandleEntity entity, int precision, KChartColors chartColors) {
  if (entity.boll == null) return null;
  Boll value = entity.boll!;
  return TextSpan(
    children: [
      if (value.mid != null && value.mid != 0)
        TextSpan(
          text: "BOLL:${formatNumber(value.mid!, precision)}  ",
          style: TextStyle(
            fontSize: 10,
            color: indicatorStyle.bollColor,
          ),
        ),
      if (value.up != null && value.up != 0)
        TextSpan(
          text: "UB:${formatNumber(value.up!, precision)}  ",
          style: TextStyle(
            fontSize: 10,
            color: indicatorStyle.ubColor,
          ),
        ),
      if (value.dn != null && value.dn != 0)
        TextSpan(
          text: "LB:${formatNumber(value.dn!, precision)}",
          style: TextStyle(
            fontSize: 10,
            color: indicatorStyle.lbColor,
          ),
        ),
    ],
  );
}