# Write the charge of an ion as an apex outside the square brackets with chemfig

I have the structure of the nitrate ion written down in chemfig and I'd like to add its charge as an apex outside the square brackets (see below). Is there a correct way to do it or do I just \raisebox a minus sign?

It should look like this:

\documentclass{article}
\usepackage{chemfig}
\usetikzlibrary{calc}
\begin{document}
$\schemestart\chemleft[ \chemfig{\lewis{246,O}-[:30]N(-[@{leg}:90]@{Oss}\lewis{024,O})-[:-30]\lewis{026,O}}\chemright] \chemmove{\draw[->]((Oss)+(0:2.5mm)).. controls +(-10:2mm) and +(10:3mm).. ((leg)+(0:.5mm));} \schemestop$
\end{document}


Compounds inside \schemestart and \schemestop are tikz nodes with names you can refer to. chemfig names them c1, c2, … but you can also give them own names. You can use this in \chemdraw to place the minus:

\documentclass{article}
\usepackage{chemfig}
\usetikzlibrary{calc}
\begin{document}
\begin{center}
\schemestart
\chemleft[
\chemfig{\lewis{246,O}-[:30]N(-[@{leg}:90]@{Oss}\lewis{024,O})-[:-30]\lewis{026,O}}
\chemright]
\schemestop
\chemmove{
\draw[->]
($(Oss)+(0:2.5mm)$)
.. controls +(-10:2mm) and +(10:3mm)..
($(leg)+(0:.5mm)$);
\node[xshift=5pt] at (c1.north east) {$-$} ;
}
\end{center}
\end{document}