Skip to content
Snippets Groups Projects
Commit 01f0d814 authored by Amit Kumar Mondal's avatar Amit Kumar Mondal
Browse files

Added static factory method to create line data sequence with provided color name

parent d1526a59
No related branches found
No related tags found
No related merge requests found
......@@ -65,6 +65,20 @@ public final class LineDataSeq extends DataSeq {
return seq;
}
/**
* Static Factory to create instance of {@link LineDataSeq}
*/
public static <E extends Enum<E>> LineDataSeq of(final String colorName,
final Object... values) {
final double[] wrappedValues = wrapValues(values);
final LineDataSeq seq = new LineDataSeq(wrappedValues, new LineStyle(2,
getColor(colorName), NORMAL_LINE));
seq.valueFont = getFont(VERDANA, BOLD, 12);
seq.fillStyle = new FillStyle(getColor(colorName), 0.5f);
seq.drawPoint = true;
return seq;
}
/** Draw Point Configuration */
private boolean drawPoint = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment