" i saw a tool where you place it in the front on your gun barrel and the top part is a graph what is that tool called?"
The tool is called a collimator.
The interesting thing about laser boresighters or collimators is that they themselves need to be zeroed, or gotten very close, in order to work properly. That is why they have windage and elevation adjustments. Theoretically, if the collimator is properly zeroed (especially for the desired zero distance for the rifle)....then the laser can be used to dial in a scope, without firing a shot.
Unfortunately, however, such devices are seldom spot-on - and it is a bit of a hassle to get them set up. I know this by way of experience. So, at this point, I prefer to bore sight the good old fashioned way - by sighting through the barrel. Less hassle, actually - and since the purpose of boresighting is to get the rifle CLOSE (but not zeroed), so as to not waste ammo at the range....this method works well enough. Further, it costs nothing and can be quite precise. I've gotten my rifles adjusted, via the old-fashioned method, close enough that only around 1 inch or so of actual adjustment of the POI has been required, in order to zero the rifle. That is every bit as precise as any of the laser collimators on the market will allow - without a lot of tedious set up, anyway.