You need access to a graphics library and a windowing system, normally provided by your supporting OS.
You can use OpenGL which is written in C, or DirectX for Windows.
On a Mac you can rely on the Cocoa graphics library and do it in Objective C.
In any case, it is not a simple task to describe on a forum like this.
You can create the multicolored grad as a bitmap image directly in C without a graphics library, but the numbers and labels are problematic.
Your question is strange. If you are going to use a vector drawing program to make the diagram, why do you need to program it yourself?
Can someone please tell me how to write a program in C language or C++ to draw this diagram? I will then use a vector drawing software program to complete it, but to get this diagram, I have to first need to write out the program. Can someone help me?