Technically is comes from a type of bean, which is the cocoa bean. So maybe it's not a vegetable, but it certainly is a vegetable product. So chocolate really isn't made up of junk after all.
i would say that it is more of a nut. A vegetable usually is a root of a plant, for example carrots and beats are roots, but since a nut is a seed from a tree and that is what a cocoa bean is and what chocolate is made from, chocolate could be a nut.