I have this code...
\documentclass{article}
\usepackage{float}
\usepackage{pgfplots}
\usepgfplotslibrary{dateplot}
\pgfplotscreateplotcyclelist{colour-list}{
red,style={fill=red}\\
orange,style={fill=orange}\\
yellow,style={fill=yellow}\\
green,style={fill=green}\\
blue,style={fill=blue}\\
}
\usepackage{filecontents}
\begin{filecontents*}{data.csv}
date,stage1,stage2,stage3,stage4,stage5
2017-11-20,1,2,3,4,5
2017-11-21,2,3,4,5,6
2017-11-22,3,4,5,6,7
2017-11-23,4,5,6,7,8
2017-11-24,5,6,7,8,9
\end{filecontents*}
\begin{document}
\begin{figure}[H]
\hspace{-5em}
\fbox{
\begin{tikzpicture}
\begin{axis}[
table/col sep=comma,
width=16.5cm,
height=8cm,
title=Chart Title,
axis lines=left,
axis line style={draw=none},
date coordinates in=x,
xtick=data,
xticklabel=\day/\month/\year,
ytick style={draw=none},
ymajorgrids=true,
ytick distance=5,
ymax= 40,
tick align=outside,
stack plots=y,
legend columns = 5,
legend style={at={(0.5,-0.15)}, anchor=north, style={draw=none}},
cycle list name=colour-list,
]
\addplot table[x=date,y=stage1]{data.csv}
\closedcycle;
\addplot table[x=date,y=stage2]{data.csv}
\closedcycle;
\addplot table[x=date,y=stage3]{data.csv}
\closedcycle;
\addplot table[x=date,y=stage4]{data.csv}
\closedcycle;
\addplot table[x=date,y=stage5]{data.csv}
\closedcycle;
\legend{Stage 1, Stage 2, Stage 3, Stage 4, Stage 5}
\end{axis}
\end{tikzpicture}
}
\end{figure}
\end{document}
I want only the entries in the legend, for their icon to be just a square. Currently, it's a line. If I add legend image post style={mark=square*},
, it shows a square within a line. Any way to get just a square in the legend only (no line).