Skip to content
Snippets Groups Projects
Commit 156ee368 authored by Florian Hölzl's avatar Florian Hölzl
Browse files

Minor changes. Fixed compile error.

refs 2589
parent e702d309
No related branches found
No related tags found
No related merge requests found
......@@ -100,7 +100,7 @@ public final class Sample {
nexusData.setPoint(screen, 2.8);
spiderChart.addData(nexusData);
ChartStyle chartStyle = new ChartStyle(true, true);
ChartStyle chartStyle = new ChartStyle(true, true, false);
chartStyle.setTitleStyle(new FontStyle(VERDANA_14PT, getDarkerColor(BLUE)));
LegendStyle legendStyle = new LegendStyle(BLUE, true, 5, BLACK_VERDANA_12PT);
chartStyle.setLegendStyle(legendStyle);
......
......@@ -46,11 +46,22 @@ public final class ChartStyle {
private boolean showLegend = true;
/** The style for the legend. */
private LegendStyle legendStyle;
/**
* The flag for using individual segments on each axis. No background spider web will be drawn
* if this is <code>true</code>.
*/
private boolean useIndividualAxisSegments = false;
/**
* The number of segments to be drawn if {@link #useIndividualAxisSegments} is
* <code>false</code>.
*/
private int axisSegments = 1;
/** Constructor. */
public ChartStyle(boolean showTitle, boolean showLegend) {
public ChartStyle(boolean showTitle, boolean showLegend, boolean useIndividualAxisSegments) {
this.showTitle = showTitle;
this.showLegend = showLegend;
this.useIndividualAxisSegments = useIndividualAxisSegments;
}
/** Returns whether to show the title. */
......@@ -58,6 +69,11 @@ public final class ChartStyle {
return showTitle;
}
/** Sets the showTitle flag. */
public void setShowTitle(boolean showTitle) {
this.showTitle = showTitle;
}
/** Returns the title font style. */
public FontStyle getTitleStyle() {
return titleStyle;
......@@ -73,6 +89,11 @@ public final class ChartStyle {
return showLegend;
}
/** Sets showLegend flag. */
public void setShowLegend(boolean showLegend) {
this.showLegend = showLegend;
}
/** Returns the legend style. */
public LegendStyle getLegendStyle() {
return legendStyle;
......@@ -102,5 +123,24 @@ public final class ChartStyle {
public void setDataSeriesStyle(DataSeries dataSeries, DataSeriesStyle style) {
dataSeriesStyle.put(dataSeries, style);
}
// TODO
/** Returns whether to use individual axis segments. */
public boolean isUseIndividualAxisSegments() {
return useIndividualAxisSegments;
}
/** Sets the useIndividualAxisSegments flag. */
public void setUseIndividualAxisSegments(boolean useIndividualAxisSegments) {
this.useIndividualAxisSegments = useIndividualAxisSegments;
}
/** Returns the axis segments. */
public int getAxisSegments() {
return axisSegments;
}
/** Sets axis segments. */
public void setAxisSegments(int axisSegments) {
this.axisSegments = axisSegments;
}
}
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