Here is a link to an example written for CVI that uses a National Instruments DSA board to acquire signals and gives a spectrum analysis in a graph. You may not have the type of board the program was meant to be used with, but you can still use it as a guide for writing your own application.
http://zone.ni.com/devzone/explprog.nsf/6c163603265406328625682a006ed37d/58d607ebcbf5f981862567de004eb82c?OpenDocument
Jason F.
Applications Engineer
National Instruments
www.ni.com/ask