POC for detailed gallery view

This commit is contained in:
2020-10-18 19:25:53 +02:00
parent e15b16a65f
commit 45c1648773
14 changed files with 312 additions and 42 deletions

View File

@@ -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++;
}

View File

@@ -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();

View File

@@ -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
}
}