Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
XChart
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Brady James Garvin
XChart
Commits
b0daca66
Commit
b0daca66
authored
9 years ago
by
Tim Molter
Browse files
Options
Downloads
Patches
Plain Diff
update xchart theme series colors to be more printer friendly
parent
3adcd4f3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xchart/src/main/java/org/knowm/xchart/internal/style/XChartTheme.java
+43
-45
43 additions, 45 deletions
...ain/java/org/knowm/xchart/internal/style/XChartTheme.java
with
43 additions
and
45 deletions
xchart/src/main/java/org/knowm/xchart/internal/style/XChartTheme.java
+
43
−
45
View file @
b0daca66
...
...
@@ -35,41 +35,30 @@ import org.knowm.xchart.StyleManager.LegendPosition;
*/
public
class
XChartTheme
implements
Theme
{
/** BLUE */
public
static
SeriesColor
BLUE
=
new
SeriesColor
(
0
,
55
,
255
,
180
);
/** ORANGE */
public
static
SeriesColor
ORANGE
=
new
SeriesColor
(
255
,
172
,
0
,
180
);
/** PURPLE */
public
static
SeriesColor
PURPLE
=
new
SeriesColor
(
128
,
0
,
255
,
180
);
/** GREEN */
public
static
SeriesColor
GREEN
=
new
SeriesColor
(
0
,
205
,
0
,
180
);
/** RED */
public
static
SeriesColor
RED
=
new
SeriesColor
(
205
,
0
,
0
,
180
);
/** YELLOW */
public
static
SeriesColor
YELLOW
=
new
SeriesColor
(
255
,
215
,
0
,
180
);
/** MAGENTA */
public
static
SeriesColor
MAGENTA
=
new
SeriesColor
(
255
,
0
,
255
,
180
);
/** PINK */
public
static
SeriesColor
PINK
=
new
SeriesColor
(
255
,
166
,
201
,
180
);
/** LIGHT_GREY */
public
static
SeriesColor
LIGHT_GREY
=
new
SeriesColor
(
207
,
207
,
207
,
180
);
/** CYAN */
public
static
SeriesColor
CYAN
=
new
SeriesColor
(
0
,
255
,
255
,
180
);
/** BROWN */
public
static
SeriesColor
BROWN
=
new
SeriesColor
(
102
,
56
,
10
,
180
);
/** BLACK */
public
static
SeriesColor
BLACK
=
new
SeriesColor
(
0
,
0
,
0
,
180
);
// public static SeriesColor BLUE = new SeriesColor(0, 55, 255, 180);
// public static SeriesColor ORANGE = new SeriesColor(255, 172, 0, 180);
// public static SeriesColor PURPLE = new SeriesColor(128, 0, 255, 180);
// public static SeriesColor GREEN = new SeriesColor(0, 205, 0, 180);
// public static SeriesColor RED = new SeriesColor(205, 0, 0, 180);
// public static SeriesColor YELLOW = new SeriesColor(255, 215, 0, 180);
// public static SeriesColor MAGENTA = new SeriesColor(255, 0, 255, 180);
// public static SeriesColor PINK = new SeriesColor(255, 166, 201, 180);
// public static SeriesColor LIGHT_GREY = new SeriesColor(207, 207, 207, 180);
// public static SeriesColor CYAN = new SeriesColor(0, 255, 255, 180);
// public static SeriesColor BROWN = new SeriesColor(102, 56, 10, 180);
// public static SeriesColor BLACK = new SeriesColor(0, 0, 0, 180);
// printer-friendly colors from http://colorbrewer2.org/
public
static
SeriesColor
RED
=
new
SeriesColor
(
228
,
26
,
28
,
180
);
public
static
SeriesColor
GREEN
=
new
SeriesColor
(
55
,
126
,
184
,
180
);
public
static
SeriesColor
BLUE
=
new
SeriesColor
(
77
,
175
,
74
,
180
);
public
static
SeriesColor
PURPLE
=
new
SeriesColor
(
152
,
78
,
163
,
180
);
public
static
SeriesColor
ORANGE
=
new
SeriesColor
(
255
,
127
,
0
,
180
);
// public static SeriesColor YELLOW = new SeriesColor(255, 255, 51, 180);
// public static SeriesColor BROWN = new SeriesColor(166, 86, 40, 180);
// public static SeriesColor PINK = new SeriesColor(247, 129, 191, 180);
// ['rgb(228,26,28)','rgb(55,126,184)','rgb(77,175,74)','rgb(152,78,163)','rgb(255,127,0)','rgb(255,255,51)','rgb(166,86,40)','rgb(247,129,191)']
// Chart Style ///////////////////////////////
...
...
@@ -389,18 +378,27 @@ public class XChartTheme implements Theme {
// 1. Color
List
<
SeriesColor
>
seriesColorMap
=
new
ArrayList
<
SeriesColor
>();
// seriesColorMap.add(BLUE);
// seriesColorMap.add(ORANGE);
// seriesColorMap.add(PURPLE);
// seriesColorMap.add(GREEN);
// seriesColorMap.add(RED);
// seriesColorMap.add(YELLOW);
// seriesColorMap.add(MAGENTA);
// seriesColorMap.add(PINK);
// seriesColorMap.add(LIGHT_GREY);
// seriesColorMap.add(CYAN);
// seriesColorMap.add(BROWN);
// seriesColorMap.add(BLACK);
seriesColorMap
.
add
(
RED
);
seriesColorMap
.
add
(
GREEN
);
seriesColorMap
.
add
(
BLUE
);
seriesColorMap
.
add
(
ORANGE
);
seriesColorMap
.
add
(
PURPLE
);
seriesColorMap
.
add
(
GREEN
);
seriesColorMap
.
add
(
RED
);
seriesColorMap
.
add
(
YELLOW
);
seriesColorMap
.
add
(
MAGENTA
);
seriesColorMap
.
add
(
PINK
);
seriesColorMap
.
add
(
LIGHT_GREY
);
seriesColorMap
.
add
(
CYAN
);
seriesColorMap
.
add
(
BROWN
);
seriesColorMap
.
add
(
BLACK
);
seriesColorMap
.
add
(
ORANGE
);
// seriesColorMap.add(YELLOW);
// seriesColorMap.add(BROWN);
// seriesColorMap.add(PINK);
return
seriesColorMap
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment