How I can change the shape of elements of legend for jFreeChart without changing the graphs of diagrams ?

I have ready time series diagram. I need to update the existed data markers in legend to the simple line with defined colors.
How I can change the shape of elements of legend for jFreeChart without changing the graphs of diagrams ?

I have ready time series diagram. I need to update the existed data markers in legend to the simple line with defined colors.
Start by not adding a LegendTitle to your chart. This is usually a controlled by a parameter to your ChartFactory or your JFreeChart constructor. Both CategoryPlot and XYPlot have a setFixedLegendItems() method, mentioned here, that you can use to add a collection of arbitrary legend items.