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
a7b0c4f5
Commit
a7b0c4f5
authored
12 years ago
by
timmolter
Browse files
Options
Downloads
Patches
Plain Diff
small tweaks
parent
07bad057
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/com/xeiam/xchart/Chart.java
+22
-2
22 additions, 2 deletions
src/main/java/com/xeiam/xchart/Chart.java
src/test/java/com/xeiam/xchart/example/Example8.java
+1
-1
1 addition, 1 deletion
src/test/java/com/xeiam/xchart/example/Example8.java
with
23 additions
and
3 deletions
src/main/java/com/xeiam/xchart/Chart.java
+
22
−
2
View file @
a7b0c4f5
...
...
@@ -140,9 +140,22 @@ public class Chart {
* @param yData double[]
* @return
*/
@Deprecated
public
Series
addSeries
(
String
seriesName
,
double
[]
xData
,
double
[]
yData
)
{
return
addSeries
(
seriesName
,
xData
,
yData
,
null
);
}
/**
* Convenience Method - Add series data as double arrays with errorbars
*
* @param seriesName
* @param xData
* @param yData
* @param errorBars
* @return
*/
public
Series
addSeries
(
String
seriesName
,
double
[]
xData
,
double
[]
yData
,
double
[]
errorBars
)
{
Collection
<
Number
>
xDataNumber
=
null
;
if
(
xData
!=
null
)
{
xDataNumber
=
new
ArrayList
<
Number
>();
...
...
@@ -154,8 +167,15 @@ public class Chart {
for
(
double
d
:
yData
)
{
yDataNumber
.
add
(
new
Double
(
d
));
}
Collection
<
Number
>
errorBarDataNumber
=
null
;
if
(
errorBars
!=
null
)
{
errorBarDataNumber
=
new
ArrayList
<
Number
>();
for
(
double
d
:
errorBars
)
{
errorBarDataNumber
.
add
(
new
Double
(
d
));
}
}
return
axisPair
.
addSeries
(
seriesName
,
xDataNumber
,
yDataNumber
,
null
);
return
axisPair
.
addSeries
(
seriesName
,
xDataNumber
,
yDataNumber
,
errorBarDataNumber
);
}
public
void
setChartTitle
(
String
title
)
{
...
...
This diff is collapsed.
Click to expand it.
src/test/java/com/xeiam/xchart/example/Example8.java
+
1
−
1
View file @
a7b0c4f5
...
...
@@ -46,7 +46,7 @@ public class Example8 {
}
// Create Chart
Chart
chart
=
new
Chart
(
44
0
,
3
00
);
Chart
chart
=
new
Chart
(
60
0
,
4
00
);
// Customize Chart
chart
.
setChartTitleVisible
(
false
);
...
...
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