Commit be33ad7f authored by Tiziano Munaro's avatar Tiziano Munaro

Fix legend colors

Issue-Ref: 3452
Issue-Url: https://af3-developer.fortiss.org/issues/3452Signed-off-by: Tiziano Munaro's avatarTiziano Munaro <munaro@fortiss.org>
parent 12967813
ColorStyleBase.java ca05f515764870da3d814f0ac38b32186f582132 YELLOW
FillStyle.java 198ea42987a2f02a07ed7d855b34a09e1deba28e YELLOW
FontStyle.java ab25b918bfee12eccbaad941b00adbc0bba29228 YELLOW
LineStyle.java 65165ab9e4c8a913669251e16e2cfd3f0c8e5dc1 YELLOW
LineStyle.java e2d64254bdb62d9e53cee33577291ec67c3ce047 YELLOW
StrokeStyle.java 703b573d91c469f064e146b683e744eda6f3d8ed YELLOW
......@@ -26,14 +26,14 @@ public final class LineStyle extends ColorStyleBase {
/** The width of the line. */
private final double width;
/** Constructor */
/** Constructor. */
public LineStyle(Color rgbColor, double width, StrokeStyle strokeStyle) {
super(rgbColor);
this.width = width;
this.strokeStyle = strokeStyle;
}
/** Constructor */
/** Constructor. */
public LineStyle(Color rgbColor) {
this(rgbColor, 1, StrokeStyle.SOLID);
}
......@@ -47,11 +47,7 @@ public final class LineStyle extends ColorStyleBase {
/** Draws a line */
public void drawLine(GraphicsContext gc, double x1, double y1, double x2, double y2) {
gc.save();
applyStyle(gc);
gc.moveTo(x1, y1);
gc.lineTo(x2, y2);
gc.stroke();
gc.restore();
gc.strokeLine(x1, y1, x2, y2);
}
}
SpiderChartCanvas.java fd348bdd520fbab08b4c910ec0b76fc6512ea408 YELLOW
SpiderChartControl.java 40459f05b754423a6017dcc1769ba85b6f5ede6a YELLOW
SpiderChartControlBase.java 12e98b77abfe0eeb6de22964b33bdfce056f157d YELLOW
SpiderChartLegendControl.java 43e526425f2b2e19f1d9ea3de46cf0fd1ce9e261 YELLOW
SpiderChartLegendControl.java 5e8b47a4433ae5ce2da6b7cd613f5059f5bc9589 YELLOW
SpiderChartTitleControl.java 64f026ea79a39c0e82d840e1920f1873a367e6ce YELLOW
SpiderChartViewer.java 72f2db133eec606fd9e993fca3f6a0f03b6f528c YELLOW
......@@ -44,7 +44,7 @@ public final class SpiderChartLegendControl extends SpiderChartControlBase {
}
}
/** draws the graphics horizontally */
/** Draws the graphics horizontally. */
public void drawHorizontal(GraphicsContext gc) {
String labelText = chart.getLegendLabel();
double margin = style.getLegendStyle().getMargin();
......@@ -82,7 +82,7 @@ public final class SpiderChartLegendControl extends SpiderChartControlBase {
return textExtent + 2 * margin;
}
/** draws the graphics vertically */
/** Draws the graphics vertically. */
public void drawVertical(GraphicsContext gc) {
String labelText = chart.getLegendLabel();
LegendStyle legendStyle = style.getLegendStyle();
......
......@@ -17,9 +17,9 @@ package test.org.fortiss.tooling.spiderchart;
import static javafx.scene.paint.Color.BLUE;
import static javafx.scene.paint.Color.DARKGRAY;
import static javafx.scene.paint.Color.GREEN;
import static javafx.scene.paint.Color.LIGHTGRAY;
import static javafx.scene.paint.Color.NAVY;
import static javafx.scene.paint.Color.YELLOW;
import static javafx.scene.paint.Color.RED;
import static org.fortiss.tooling.common.ui.javafx.style.FontStyle.BLACK_VERDANA_10PT;
import static org.fortiss.tooling.common.ui.javafx.style.FontStyle.BLACK_VERDANA_12PT;
import static org.fortiss.tooling.common.ui.javafx.style.FontStyle.BLACK_VERDANA_14PT;
......@@ -94,7 +94,7 @@ public class SpiderChartExampleFXController extends CompositeFXControllerBase<An
spiderChart.addAxis(brand);
spiderChart.addAxis(screen);
DataSeries iPhoneData = new DataSeries("iPhone 6");
DataSeries iPhoneData = new DataSeries("Phone 1");
iPhoneData.setPoint(battery, 4.0);
iPhoneData.setPoint(camera, 3.5);
iPhoneData.setPoint(display, 4.0);
......@@ -103,7 +103,7 @@ public class SpiderChartExampleFXController extends CompositeFXControllerBase<An
iPhoneData.setPoint(screen, sc240);
spiderChart.addData(iPhoneData);
DataSeries nexusData = new DataSeries("Nexus 6");
DataSeries nexusData = new DataSeries("Phone 2");
nexusData.setPoint(battery, 3.0);
nexusData.setPoint(camera, 4.5);
nexusData.setPoint(display, 3.0);
......@@ -136,14 +136,14 @@ public class SpiderChartExampleFXController extends CompositeFXControllerBase<An
chartStyle.setBackgroundFillStyle(new FillStyle(LIGHTGRAY));
chartStyle.setBackgroundLineStyle(new LineStyle(DARKGRAY));
LineStyle olive1pt = new LineStyle(NAVY);
FillStyle oliveFill = new FillStyle(NAVY, 0.25);
LineStyle olive1pt = new LineStyle(GREEN);
FillStyle oliveFill = new FillStyle(GREEN, 0.25);
DataSeriesStyle iphoneStyle = new DataSeriesStyle(olive1pt, oliveFill, true, true,
BLACK_VERDANA_10PT, 7, new DecimalFormat("#.#"));
chartStyle.setDataSeriesStyle(iPhoneData, iphoneStyle);
LineStyle navy1pt = new LineStyle(YELLOW);
FillStyle navyFill = new FillStyle(YELLOW, 0.25);
LineStyle navy1pt = new LineStyle(RED);
FillStyle navyFill = new FillStyle(RED, 0.25);
DataSeriesStyle nexusStyle = new DataSeriesStyle(navy1pt, navyFill, true, true,
BLACK_VERDANA_10PT, 7, new DecimalFormat("#.#"));
chartStyle.setDataSeriesStyle(nexusData, nexusStyle);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment