POC for detailed gallery view
This commit is contained in:
@@ -98,7 +98,8 @@ public interface DataSeries {
|
||||
final GnuplotColor color = GnuplotColorPalettes.DEFAULT.get(i % numColors);
|
||||
|
||||
final DashTypes dashType = DashTypes.get(i / numColors);
|
||||
final LineStyle lineStyle = new LineStyle(color, dashType);
|
||||
final int pointType = PointTypes.getPointType(i);
|
||||
final LineStyle lineStyle = new LineStyle(color, dashType, pointType);
|
||||
dataSerie.setStyle(lineStyle);
|
||||
i++;
|
||||
}
|
||||
|
||||
@@ -4,16 +4,23 @@ public class LineStyle {
|
||||
|
||||
private final GnuplotColor color;
|
||||
private final DashTypes dashType;
|
||||
private final int pointType;
|
||||
|
||||
public LineStyle(final GnuplotColor color, final DashTypes dashType) {
|
||||
public LineStyle(final GnuplotColor color, final DashTypes dashType, final int pointType) {
|
||||
this.color = color;
|
||||
this.dashType = dashType;
|
||||
this.pointType = pointType;
|
||||
}
|
||||
|
||||
private String asGnuplotLineStyle(final String colorHex) {
|
||||
return String.format("lt rgb \"#%s\" dt %s ", //
|
||||
colorHex, //
|
||||
dashType.toGnuplotDashType()//
|
||||
// TODO revert
|
||||
// return String.format("lt rgb \"#%s\" dt %s ", //
|
||||
// colorHex, //
|
||||
// dashType.toGnuplotDashType()//
|
||||
// );
|
||||
|
||||
return String.format("lt rgb \"#%s\" ", //
|
||||
colorHex//
|
||||
);
|
||||
}
|
||||
|
||||
@@ -29,6 +36,18 @@ public class LineStyle {
|
||||
return asGnuplotLineStyle("77" + color.getDark());
|
||||
}
|
||||
|
||||
public GnuplotColor getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public DashTypes getDashType() {
|
||||
return dashType;
|
||||
}
|
||||
|
||||
public int getPointType() {
|
||||
return pointType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return asGnuplotLineStyle();
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.lucares.recommind.logs;
|
||||
|
||||
public class PointTypes {
|
||||
|
||||
static int getPointType(final int i) {
|
||||
return i % 13;// gnuplot has 13 point types
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user