  We use the sensitive response to electric fields of Rydberg atoms to
characterize all three vector components of the local electric field close to
an atom-chip surface. We measured Stark-Zeeman maps of $S$ and $D$ Rydberg
states using an elongated cloud of ultracold Rubidium atoms ($T\sim2.5$ $\mu$K)
trapped magnetically $100$ $\mu$m from the chip surface. The spectroscopy of
$S$ states yields a calibration for the generated local electric field at the
position of the atoms. The values for different components of the field are
extracted from the more complex response of $D$ states to the combined electric
and magnetic fields. From the analysis we find residual fields in the two
uncompensated directions of $0.0\pm0.2$ V/cm and $1.98\pm0.09$ V/cm
respectively. This method also allows us to extract a value for the relevant
field gradient along the long axis of the cloud. The manipulation of electric
fields and the magnetic trapping are both done using on-chip wires, making this
setup a promising candidate to observe Rydberg-mediated interactions on a chip.
