Is it possible to get a diagram like
-this is the output- (the whole rectangle has an area of "100%")
from fictional datas like
data name color
22 A gray
5 C blue
5 D orange
-this is the input-
MWE with wrong output:
\documentclass[border=5pt, tikz]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}[ybar,
]
\addplot[xtick=data,] table[y index=0] {
data name color
22 A gray
5 C blue
5 D orange
};
\end{axis}
\end{tikzpicture}
\end{document}


