Its both but for different things.
If you want tons of grapihcs like high quality, then you need high graphics power.
If you want tons of units and stuff to work smooth, you need a good CPUand ram.
But just because you dont have a superb graphics card and cant put it to max quality doesnt mean you can have tons of units. Personally on mine when im using everything on max with 4x SSAA and 4xMSAA with about 800units id guess I get about 20FPS, because its all smooth but when I zoom right in I can see a bit of stutter on units when they move.
Turning the mini map off solves that though.
Of coarse if I wanted I could just put 4x AA and everything on medium and it probably wont ever slow down