double YOffset = shapeBounds.getHeight() / 2;
g2d.setStroke(this.lineChartProperties.getLineStrokes()[ labelIndex]);
Line2D.Double line = new Line2D.Double(0, YOffset, this.legendProperties.getIconLineStrokeLength(), YOffset);
g2d.draw( line );
// move posX to account for the lineStroke before the shape. for example, ---o
posX += this.legendProperties.getIconLineStrokeLength();
//---translate the Shape to adjust for the IconLineStrokeLength
g2d.translate( this.legendProperties.getIconLineStrokeLength() - XOffset , 0 );