A simple way to visualize chords and scales is to display the notes in a segmented pitch space.

In the example below, there are three notes held to make an A minor triad. Minor triads with different root notes will take on the same but rotated shape, since they are all defined by the same relative sequence of steps.

Link to the interactive version (you will need a MIDI keyboard)

cmajor

This was made with D3 and the Web MIDI API (currently a W3C draft). Browser support for MIDI is limited, to say the least, but there is a Polyfill built on a browser plugin out there. All things considered, browsers are becoming a convenient way to write music apps.

Source is on Github.