Root on A string
x5676x
Ddim is the D diminished chord. Its notes are D, F and A♭. A compact, tense triad. Every interval in this voicing is a chord tone.
x5676x
Numbers show frets from the low E string to the high e string; x means don't play that string.
Ddim is the vii° chord in E♭ major. That makes it a natural fit in songs written in those keys.
Every D, F and A♭ on the first 12 frets. The filled dots are the root, D. Build your own shape from any nearby group.
Other D chords
Other diminished chords