Question: We all know how an electric current causes magnetic fields. But when a single electron is flowing through the wire, how is this electron creating the magnetic field or how are electrons responsible for magnetic field around a wire?

Answer: 
The ratio of dark to baryonic matter is 5.25 in the first diagram and 5 in the second diagram, but I don't think the difference is significant. We don't know the densities with absolute certainty, especially near the Big Bang, and the small difference between the ratios is probably just down to the uncertainties in the densities.

We would expect the ratio to stay fixed because the densities both scale as $a^{-3}$, where $a$ is the [scale factor](http://en.wikipedia.org/wiki/Scale_factor_(cosmology)). For comparison the density of relativistic matter (photons and neutrinos) scales as $a^{-4}$ and density of dark energy stays constant i.e. it doesn't depend on $a$ at all. That's why the photons and neutrinos have disappeared in the second diagram while a large chunk of dark energy has appeared.

As far as I know there is no mechanism for dark and baryonic matter to interconvert, or for either to disappear.
In the FLRW model which is used today normal (baryonic) matter and dark matter together add up to matter. It dilutes with the growing radius to the third power (because volume is proportional to radius³). So the ratio matter : dark matter is and was always the same, at least in the plot you showed and the model that was used there.

Edit: Maybe the 5.25 to 5 change John Rennie mentioned comes from matter which has been transformed into radiation with time (the sun for example radiates away 4e26 Watt, which means it converts a little more than 4e9 kg of baryonic matter to photons every second. Dark Matter on the other hand can or at least does not transform into radiation energy like normal matter does inside stars).