Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
GoogleChartJSF
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Alex Rhodes
GoogleChartJSF
Commits
0947bba5
Commit
0947bba5
authored
Aug 15, 2016
by
Alex Rhodes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added base y axis value support to combo chart
parent
3b97a83d
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
80 additions
and
8 deletions
+80
-8
pom.xml
pom.xml
+1
-1
Builder.java
src/com/alexscottrhodes/builder/Builder.java
+12
-2
GoogleComboChart.java
src/com/alexscottrhodes/chartModel/GoogleComboChart.java
+58
-1
Charts.java
src/com/alexscottrhodes/demo/Charts.java
+0
-1
main.js
src/main.js
+6
-0
Builder.class
target/classes/com/alexscottrhodes/builder/Builder.class
+0
-0
pom.properties
target/m2e-wtp/web-resources/META-INF/maven/com.alexscottrhodes/GoogleChartsJSF/pom.properties
+2
-2
pom.xml
target/m2e-wtp/web-resources/META-INF/maven/com.alexscottrhodes/GoogleChartsJSF/pom.xml
+1
-1
No files found.
pom.xml
View file @
0947bba5
...
...
@@ -27,7 +27,7 @@ is loaded from Google's servers as required in the Google Terms of Service.
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.alexscottrhodes
</groupId>
<artifactId>
GoogleChartsJSF
</artifactId>
<version>
1.3
</version>
<version>
0.0.1-SNAPSHOT
</version>
<packaging>
war
</packaging>
<name>
Google Charts JSF API
</name>
<description>
JSF tag wrapper for google charts objects
</description>
...
...
src/com/alexscottrhodes/builder/Builder.java
View file @
0947bba5
...
...
@@ -98,7 +98,7 @@ public class Builder {
row
+=
"'"
+
s
.
getDataset
().
get
(
i
)
+
"'"
;
}
}
else
{
row
+=
"
null
"
;
row
+=
""
;
}
row
+=
","
;
}
...
...
@@ -134,7 +134,17 @@ public class Builder {
}
options
+=
"hAxis: {title:'"
+
x
.
getLabel
()+
"'},"
;
options
+=
"legend : {position: '"
+
gcc
.
getLegendPosition
().
toString
()
+
"'},"
;
options
+=
"vAxis: {title:'"
+
yLabel
+
"'},"
;
options
+=
"vAxis: {title:'"
+
yLabel
+
"'"
;
if
(
gcc
.
getMinIndexInt
()
!=
null
){
options
+=
", minValue: "
+
gcc
.
getMinIndexInt
();
}
else
if
(
gcc
.
getMinIndexDouble
()
!=
null
){
options
+=
", minValue: "
+
gcc
.
getMinIndexDouble
();
}
else
if
(
gcc
.
getMinIndexFloat
()
!=
null
){
options
+=
", minValue: "
+
gcc
.
getMinIndexFloat
();
}
options
+=
"},"
;
options
+=
"curveType: '"
+
gcc
.
getCurveType
().
toString
()
+
"',"
;
options
+=
"isStacked: "
+
gcc
.
isStacked
()
+
","
;
options
+=
"seriesType: '"
+
x
.
getDisplayType
().
toString
()
+
"',"
;
...
...
src/com/alexscottrhodes/chartModel/GoogleComboChart.java
View file @
0947bba5
...
...
@@ -98,10 +98,25 @@ public class GoogleComboChart {
private
LegendPosition
legendPosition
=
LegendPosition
.
RIGHT
;
/**
* A boolean for Bar type charts to indicate if the bars should be stac
ek
d or adjacent.
* A boolean for Bar type charts to indicate if the bars should be stac
ke
d or adjacent.
*/
private
boolean
stacked
;
/**
* An Integer to represent the starting index of the y-axis. Use {@link #setMinY(int) setMinY} method.
*/
private
Integer
minIndexInt
=
null
;
/**
* A Double to represent the starting index of the y-axis. Use {@link #setMinY(double) setMinY} method.
*/
private
Double
minIndexDouble
=
null
;
/**
* A Float to represent the start index of the y-axis. Use {@link #setMinY(float) setMinY} method.
*/
private
Float
minIndexFloat
=
null
;
public
GoogleComboChart
(){
seriesList
=
new
ArrayList
<
ChartSeries
>();
axes
=
new
HashMap
<
AxisType
,
ArrayList
<
ChartSeries
>>();
...
...
@@ -134,6 +149,30 @@ public class GoogleComboChart {
axes
.
get
(
axis
).
add
(
series
);
}
/**
* Add a minimum Y-axis index to a graph of integer values
* @param min an Integer of the desired starting index
*/
public
void
setMinY
(
int
min
){
this
.
minIndexInt
=
min
;
}
/**
* Add a minimum Y-axis index to a graph of float values
* @param min a Float of the desired starting index
*/
public
void
setMinY
(
float
min
){
this
.
minIndexFloat
=
min
;
}
/**
* Add a minimum Y-axis index to a graph of double values
* @param min a Double of the desired starting index
*/
public
void
setMinY
(
double
min
){
this
.
minIndexDouble
=
min
;
}
//Getters and Setters
public
String
getId
()
{
...
...
@@ -224,5 +263,23 @@ public class GoogleComboChart {
public
void
setStacked
(
boolean
stacked
)
{
this
.
stacked
=
stacked
;
}
public
Integer
getMinIndexInt
()
{
return
minIndexInt
;
}
public
void
setMinIndexInt
(
int
minIndexInt
)
{
this
.
minIndexInt
=
minIndexInt
;
}
public
Double
getMinIndexDouble
()
{
return
minIndexDouble
;
}
public
void
setMinIndexDouble
(
double
minIndexDouble
)
{
this
.
minIndexDouble
=
minIndexDouble
;
}
public
Float
getMinIndexFloat
()
{
return
minIndexFloat
;
}
public
void
setMinIndexFloat
(
float
minIndexFloat
)
{
this
.
minIndexFloat
=
minIndexFloat
;
}
}
src/com/alexscottrhodes/demo/Charts.java
View file @
0947bba5
...
...
@@ -81,7 +81,6 @@ public class Charts {
for
(
Date
d
:
getDates
())
{
x
.
addPoint
(
d
);
// Populate with some dates
}
gcc
.
addSeries
(
s
);
// Add series S
gcc
.
addSeries
(
t
);
// Add series T
gcc
.
addAxisSeries
(
x
,
AxisType
.
X
);
// Add the X-axis
...
...
src/main.js
0 → 100644
View file @
0947bba5
function
tabSwitch
(
active
,
inactive
){
document
.
getElementById
(
active
).
className
=
"active"
;
document
.
getElementById
(
inactive
).
className
=
""
;
return
true
;
}
\ No newline at end of file
target/classes/com/alexscottrhodes/builder/Builder.class
View file @
0947bba5
No preview for this file type
target/m2e-wtp/web-resources/META-INF/maven/com.alexscottrhodes/GoogleChartsJSF/pom.properties
View file @
0947bba5
#Generated by Maven Integration for Eclipse
#
Wed Aug 03 13:27:26
MST 2016
version
=
1.3
#
Tue Aug 09 13:33:03
MST 2016
version
=
0.0.1-SNAPSHOT
groupId
=
com.alexscottrhodes
m2e.projectName
=
googlechartjsf
m2e.projectLocation
=
C
\:\\
workspace
\\
googlechartjsf
...
...
target/m2e-wtp/web-resources/META-INF/maven/com.alexscottrhodes/GoogleChartsJSF/pom.xml
View file @
0947bba5
...
...
@@ -27,7 +27,7 @@ is loaded from Google's servers as required in the Google Terms of Service.
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.alexscottrhodes
</groupId>
<artifactId>
GoogleChartsJSF
</artifactId>
<version>
1.3
</version>
<version>
0.0.1-SNAPSHOT
</version>
<packaging>
war
</packaging>
<name>
Google Charts JSF API
</name>
<description>
JSF tag wrapper for google charts objects
</description>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment