"If the Pokémon that is found is knocked out or captured in a Poké Ball, a chain will begin. These chains consist of multiple members of the same Pokémon species encountered one after another. The only catch is this: a player must not encounter any Pokémon just by walking through non-wiggling grass, only by walking into the grass that shakes. Therefore, it is recommended that Repel is used in order to ensure this and achieve a higher chain. Entering the patch of shaking grass that is the farthest away from the previous patch of grass increases the chances of meeting the same kind of Pokémon consecutively. Long chains increase the chance of finding a Shiny Pokémon, which is indicated by the patch of grass glowing white twice rather than shaking. Though rare, it is possible to encounter a Shiny Pokémon in a regular shaking patch.
You can only chain Pokemon in Diamond, Pearl and Platinum with the Pokeradar.