The magnetic properties of carbon-coated Co and Ni nanoparticles aligned in chains were determined using transmission electron holography. The measurements of the phase change of the electron wave due to the magnetization of the sample were performed. The ratio of remnant magnetization to bulk saturation magnetization Mr/Ms of Co decreased from 53% to 16% and of Ni decreased from 70% to 30% as the particle diameter increased from 25 to 90 nm. It was evident that the inhomogenous magnetic configurations could diminish the stray field of the particles. After being exposed to a 2-Tesla external magnetic field, the Mr/Ms of Co increased by 45% from the original values with the same dependency on the particle size. The Mr/Ms of Ni particles, on the other hand, increased only 10%. The increased magnetization could be attributed to the merging of small domains into larger ones after the exposure to the external magnetic field. The validity of the interpretation of the holograms was established by simulation.