The above chart counts only gun-related deaths, and apparently includes accidents and suicides (although I’m not sure if suicides are considered “line of duty” deaths). Anyway the chart is less informative than it would be if felonious killing of cops with guns were separated out from total gun-related (line of duty) deaths. For example, the total so far in 2015 is 38 gun-related police deaths, 36 felonious shootings and 2 labeled accidents. I believe the overwhelming majority in the above chart are shootings of cops by criminals.
The chart is based on the rate of cop killings (per one million of population) not the absolute number of such deaths. The rate at which criminals murder cops is a good measure of how violent society is because it’s the most violent of criminals who have the will to kill a cop. The safer it is to be a policeman the safer it is to be a citizen.