If you need to display a graph in your web application then you can use the excellent library available here. They provide documentation on creating several types of graphs however we will today try and create a tristate graph. Check the code below which will help you to get started.
From the above code you can see that we have first included the jQuery library and then the jQuery Sparkline library. You can download it from here. We then instantiate the object and set the relevant properties. Once done the tristate graph will appear on the page. Try it out.