I would like to get the values from the the columns Cd, Cr, and Ni showing on their respective sections of the bars in the chart. I would like them to be aligned in the center of each section.
I have used nodes near coords and \addplot with coordinates to show the values. The first three fit within the correct place but they are not centered. Furthermore, the subsequent \addplot show up in the wrong position.
Could I get some help with this issue?
Thank you in advance for the help.

Code is
\documentclass[border={0pt,0pt,0pt,0pt}]{standalone}
\usepackage{helvet}
\usepackage[eulergreek]{sansmath}
\usepackage{tikz,pgfplotstable}
\usetikzlibrary{patterns}
\pgfplotsset{compat=1.8,
every axis/.style={axis on top},
tick label style = {font=\sansmath\sffamily\small\itshape,xshift={-15}},
every axis label = {font=\sansmath\sffamily},
legend style = {font=\sansmath\sffamily},
label style = {font=\sansmath\sffamily},
}
\begin{document}
\pgfplotstableread{
Species Cd Cr Ni
V.\space c.\space cochiensis 3.67 2.16 2.27
L.\space teres 2.76 0 0
L.\space s.\space claibornensis 2.52 0 1.94
A.\space pectorosa 2.34 0 1.34
L.\space subviridis 2.34 0 0
U.\space imbecillis 2.26 0.76 1.44
V.\space vibex 2.21 0 1.58
C.\space fluminalis 1.39 0 0
P.\space casertanum 1.17 0 0
P.\space compressum 1.08 0 0
C.\space rhizophorae 0.40 0 0
P.\space favidens 0.24 0 0
L.\space marginalis 0.10 0 0
M.\space nervosa 0 1.08 1.82
R.\space cuneata 0 0.90 0
A.\space plicata 0 0.85 1.69
L.\space siliquoidea 0 0.80 1.42
M.\space falcata 0 0.42 1.63
H.\space perovalis 0 0 1.56
V.\space nebulosa 0 0 1.35
H.\space cumingii 0 -0.81 0
D.\space chilensis 0 -1.09 0
}\testdata
\begin{tikzpicture}
\begin{axis}[
xbar stacked,
xmin=-3,
xmax=8,
xticklabel style=transparent,
xtick style=transparent,
ytick style=transparent,
axis y line*=middle,
every inner y axis line/.append style = {dotted, ultra thick},
height=11cm,
width=11.9cm,
enlarge y limits={abs=0.725},
enlarge x limits={abs=0.725},
xlabel={RS = $\log (LC_{50\textit{Lf}}/LC_{50\textit{i}})$},
ytick=\empty,
legend style={at={(0.8,0.6)},anchor=north west, draw=none},
nodes near coords,
visualization depends on=x\as\myx,
nodes near coords align={center},
every node near coord/.append style={anchor ={180-sign(\myx)*180},font=\footnotesize},
point meta = explicit symbolic
]
\addlegendimage{empty legend},
\addplot [fill=black!90!black!45] table [x=Cr, y expr=\coordindex] {\testdata}; % "First" column against the data index
\addplot [fill=black!90!black!20] table [x=Cd, y expr=\coordindex] {\testdata};
\addplot [fill=black!5] table [x=Ni, y expr=\coordindex] {\testdata};
\addplot [only marks,mark size=0pt,point meta=explicit symbolic,
nodes near coords,nodes near coords style={anchor=east,font =\small\itshape}]
table[x expr={-1*ifthenelse(\thisrow{Cd}+\thisrow{Cr}+\thisrow{Ni}>0,
\thisrow{Cd}+\thisrow{Cr}+\thisrow{Ni},0)},y expr=\coordindex,meta=Species] {\testdata};
\addplot[black] coordinates{(2.16,0)[2.16]};%shows up well but not 'center'.
\addplot[black] coordinates{(3.67,0)[3.67]};%shows up well but not 'center'.
\addplot[black] coordinates{(2.27,0)[2.27]};%shows up well but not 'center'.
%
%all other \addplot entries from table.
%
\addplot[black] coordinates{(0,20)};
\addplot[black] coordinates{(-0.81,20)[-0.81]};%shows up on the wrong position.
\addplot[black] coordinates{(0,20)};
\addplot[black] coordinates{(0,21)};
\addplot[black] coordinates{(-1.09,21)[-1.09]};%shows up on the wrong position.
\addplot[black] coordinates{(0,21)};
\addlegendentry{\hspace{-0.85cm}\textbf\small{Metals}},
\addlegendentry{Cr(VI)},
\addlegendentry{Cd(II)},
\addlegendentry{Ni(II)},
\end{axis}
\end{tikzpicture}
\end{document}

font=\tinyor usescale.The threshold is set withopacity={ifthenelse(\csname my#1\endcsname>1,1,0)}, so if you useopacity={ifthenelse(\csname my#1\endcsname>0.5,1,0)}, values larger than 0.5 will be shown. – Jan 20 '20 at 03:28opacity={ifthenelse(abs(\csname my#1\endcsname)>0.5,1,0)}. I edited the post accordingly. – Jan 20 '20 at 04:27nodes near coordsfor that when there isevery node near coord/append stylealready defined? – Emmo03 Jan 20 '20 at 05:58