You likely need a comparator (the lm293 is a reasonable one) to separate out the three states high (probably 5V) charging, low (likely 0 volts) charged and 2.5 volts via a high resistance voltage divider for no battery. Pin 7 in the drawing would connect to 10k or
larger resistors like this
+5V
10k
pin 7
10k
gnd
At pin7 you will see 0V for battery present and charged, 2.5 volts no battery and 5V battery present and charging. One comparator needs a threshold of about 3.5V (and likely hystersis, the app notes show how) the other needs a threshold of around 1.5 volts. That gives you 2 digital inputs to a micro that drives a 3 wire red/green led (the led currently there won't work) from microcomputer output pins. As with the original poster assuming an Arduino as the micro, the blink example provides a starting point for writing the code.
Peter Van Epp