Permalink
Browse files

初始导入

  • Loading branch information...
abel533 committed Aug 25, 2014
0 parents commit ef73734c346d89ed745282fe3a0437f7dc543326
Showing with 1,975 additions and 0 deletions.
  1. +11 −0 .gitignore
  2. +26 −0 pom.xml
  3. +13 −0 src/main/java/com/github/abel533/App.java
  4. +34 −0 src/main/java/com/github/abel533/echarts/AxisPointer.java
  5. +42 −0 src/main/java/com/github/abel533/echarts/Basic.java
  6. +7 −0 src/main/java/com/github/abel533/echarts/Data.java
  7. +48 −0 src/main/java/com/github/abel533/echarts/DataRange.java
  8. +32 −0 src/main/java/com/github/abel533/echarts/DataZoom.java
  9. +21 −0 src/main/java/com/github/abel533/echarts/Grid.java
  10. +31 −0 src/main/java/com/github/abel533/echarts/Legend.java
  11. +12 −0 src/main/java/com/github/abel533/echarts/Polar.java
  12. +35 −0 src/main/java/com/github/abel533/echarts/Title.java
  13. +40 −0 src/main/java/com/github/abel533/echarts/Toolbox.java
  14. +41 −0 src/main/java/com/github/abel533/echarts/Tooltip.java
  15. +21 −0 src/main/java/com/github/abel533/echarts/axis/Axis.java
  16. +25 −0 src/main/java/com/github/abel533/echarts/axis/AxisLabel.java
  17. +22 −0 src/main/java/com/github/abel533/echarts/axis/AxisLine.java
  18. +24 −0 src/main/java/com/github/abel533/echarts/axis/AxisTick.java
  19. +27 −0 src/main/java/com/github/abel533/echarts/axis/CategoryAxis.java
  20. +17 −0 src/main/java/com/github/abel533/echarts/axis/SplitArea.java
  21. +20 −0 src/main/java/com/github/abel533/echarts/axis/SplitLine.java
  22. +39 −0 src/main/java/com/github/abel533/echarts/axis/ValueAxis.java
  23. +8 −0 src/main/java/com/github/abel533/echarts/code/Align.java
  24. +8 −0 src/main/java/com/github/abel533/echarts/code/LineType.java
  25. +8 −0 src/main/java/com/github/abel533/echarts/code/NameLocation.java
  26. +8 −0 src/main/java/com/github/abel533/echarts/code/PointerType.java
  27. +8 −0 src/main/java/com/github/abel533/echarts/code/SelectedMode.java
  28. +8 −0 src/main/java/com/github/abel533/echarts/code/Trigger.java
  29. +8 −0 src/main/java/com/github/abel533/echarts/code/XPosition.java
  30. +8 −0 src/main/java/com/github/abel533/echarts/code/YPosition.java
  31. +9 −0 src/main/java/com/github/abel533/echarts/feature/Feature.java
  32. +8 −0 src/main/java/com/github/abel533/echarts/style/AreaStyle.java
  33. +7 −0 src/main/java/com/github/abel533/echarts/style/CrossStyle.java
  34. +12 −0 src/main/java/com/github/abel533/echarts/style/LineStyle.java
  35. +10 −0 src/main/java/com/github/abel533/echarts/style/ShadowStyle.java
  36. +8 −0 src/main/java/com/github/abel533/echarts/style/SubtextStyle.java
  37. +10 −0 src/main/java/com/github/abel533/echarts/style/TextStyle.java
  38. +1,221 −0 src/main/resources/config.js
  39. +38 −0 src/test/java/com/github/abel533/AppTest.java
@@ -0,0 +1,11 @@
# Maven #
target/
# IDEA #
.idea/
*.iml
# Eclipse #
.settings/
.classpath
.project
26 pom.xml
@@ -0,0 +1,26 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.abel533</groupId>
<artifactId>ECharts</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>ECharts</name>
<description>这是一个针对ECharts2.0版本的Java类库,实现了所有ECharts中的Json结构对于的Java对象</description>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,13 @@
package com.github.abel533;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}
@@ -0,0 +1,34 @@
package com.github.abel533.echarts;
import com.github.abel533.echarts.code.LineType;
import com.github.abel533.echarts.code.PointerType;
import com.github.abel533.echarts.style.CrossStyle;
import com.github.abel533.echarts.style.LineStyle;
import com.github.abel533.echarts.style.ShadowStyle;
/**
* Created by Administrator on 14-8-25.
*/
public class AxisPointer {
public PointerType type;
public LineStyle lineStyle;
public CrossStyle crossStyle;
public ShadowStyle shadowStyle;
public AxisPointer() {
this.type = PointerType.line;
this.lineStyle = new LineStyle();
this.lineStyle.color = "#48b";
this.lineStyle.width = 2;
this.lineStyle.type = LineType.dashed;
this.crossStyle = new CrossStyle();
this.crossStyle.color = "#1e90ff";
this.crossStyle.width = 1;
this.crossStyle.type = LineType.dashed;
this.shadowStyle = new ShadowStyle();
this.shadowStyle.color = "rgba(150,150,150,0.3)";
this.shadowStyle.width = "auto";
}
}
@@ -0,0 +1,42 @@
package com.github.abel533.echarts;
import com.github.abel533.echarts.code.XPosition;
import com.github.abel533.echarts.code.YPosition;
/**
* Created by Administrator on 14-8-25.
*/
public abstract class Basic {
public Object x;
public Object y;
public String backgroundColor;
public String borderColor;
public Integer borderWidth ;
public Integer padding;
public Integer itemGap;
protected Basic() {
this.backgroundColor = "rgba(0,0,0,0)";
this.borderColor = "#ccc";
this.borderWidth = 0;
this.padding = 5;
this.itemGap = 5;
}
public void setX(Integer x) {
this.x = x;
}
public void setX(XPosition x) {
this.x = x;
}
public void setY(Integer y) {
this.y = y;
}
public void setY(YPosition y) {
this.y = y;
}
}
@@ -0,0 +1,7 @@
package com.github.abel533.echarts;
/**
* Created by Administrator on 14-8-25.
*/
public interface Data {
}
@@ -0,0 +1,48 @@
package com.github.abel533.echarts;
import com.github.abel533.echarts.code.Align;
import com.github.abel533.echarts.code.XPosition;
import com.github.abel533.echarts.code.YPosition;
import com.github.abel533.echarts.style.TextStyle;
/**
* Created by Administrator on 14-8-25.
*/
public class DataRange extends Basic {
public Align orient;
public Integer itemWidth;
public Integer itemHeight;
public Integer min;
public Integer max;
public Integer precision;
public Integer splitNumber;
public Boolean calculable;
public Boolean realtime;
public String[] color;
public String formatter;
public String[] text;
public TextStyle textStyle;
public DataRange() {
super();
this.orient = Align.vertical;
this.x = XPosition.left;
this.y = YPosition.bottom;
this.itemWidth = 20;
this.itemHeight = 14;
this.precision = 0;
this.splitNumber = 5;
this.calculable = false;
this.realtime = true;
this.color = new String[]{"#006edd", "#e0ffff"};
this.textStyle = new TextStyle();
this.textStyle.color = "#333";
}
}
@@ -0,0 +1,32 @@
package com.github.abel533.echarts;
import com.github.abel533.echarts.code.Align;
/**
* Created by Administrator on 14-8-26.
*/
public class DataZoom extends Basic {
public Boolean show;
public Align orient;
public String dataBackgroundColor;
public String fillerColor;
public String handleColor;
public Object[] xAxisIndex;
public Object[] yAxisIndex;
public Integer start;
public Integer end;
public Boolean realtime;
public Boolean zoomLook;
public DataZoom() {
super();
this.show = false;
this.orient = Align.horizontal;
this.dataBackgroundColor = "#eee";
this.fillerColor = "rgba(144,197,237,0.2)";
this.handleColor = "rgba(70,130,180,0.8)";
this.realtime = true;
}
}
@@ -0,0 +1,21 @@
package com.github.abel533.echarts;
/**
* Created by Administrator on 14-8-26.
*/
public class Grid extends Basic {
public Integer x;
public Integer y;
public Integer x2;
public Integer y2;
public Integer width;
public Integer height;
public Grid() {
this.x = 80;
this.y = 60;
this.x2 = 80;
this.y2 = 60;
}
}
@@ -0,0 +1,31 @@
package com.github.abel533.echarts;
import com.github.abel533.echarts.code.Align;
import com.github.abel533.echarts.code.YPosition;
import com.github.abel533.echarts.style.TextStyle;
/**
* Created by Administrator on 14-8-25.
*/
public class Legend extends Basic {
public Align orient;
public Integer itemWidth;
public Integer itemHeight;
public TextStyle textStyle;
//enum SelectedMode
public Object selectedMode;
public Data[] data;
public Legend() {
super();
this.orient = Align.horizontal;
this.x = YPosition.center;
this.y = YPosition.top;
this.selectedMode = true;
this.textStyle = new TextStyle();
this.textStyle.color = "#333";
}
}
@@ -0,0 +1,12 @@
package com.github.abel533.echarts;
/**
* Created by Administrator on 14-8-26.
*/
public class Polar {
public final String[] center = new String[2];
public Object radius;
public Integer startAngle;
public Integer splitNumber;
}
@@ -0,0 +1,35 @@
package com.github.abel533.echarts;
import com.github.abel533.echarts.code.XPosition;
import com.github.abel533.echarts.code.YPosition;
import com.github.abel533.echarts.style.SubtextStyle;
import com.github.abel533.echarts.style.TextStyle;
/**
* Created by Administrator on 14-8-25.
*/
public class Title extends Basic {
public String text;
public String link;
public String target;
public String subtext;
public String sublink;
public String subtarget;
public XPosition textAlign;
public TextStyle textStyle;
public SubtextStyle subtextStyle;
public Title() {
super();
this.text = "";
this.x = XPosition.left;
this.y = YPosition.top;
this.textStyle = new TextStyle();
this.textStyle.fontSize = 18;
this.textStyle.fontWeight = "bolder";
this.textStyle.color = "#333";
}
}
@@ -0,0 +1,40 @@
package com.github.abel533.echarts;
import com.github.abel533.echarts.code.Align;
import com.github.abel533.echarts.code.XPosition;
import com.github.abel533.echarts.code.YPosition;
import com.github.abel533.echarts.feature.Feature;
import java.util.Map;
/**
* Created by Administrator on 14-8-25.
*/
public class Toolbox extends Basic{
public Boolean show;
public Align orient;
public String[] color;
public String disableColor;
public String effectiveColor;
public String backgroundColor;
public Integer itemSize;
public Boolean showTitle;
public Map<String,Feature> feature;
public Toolbox() {
super();
this.show = false;
this.orient = Align.horizontal;
this.x = XPosition.right;
this.y = YPosition.top;
this.color = new String[]{"#1e90ff","#22bb22","#4b0082","#d2691e"};
this.disableColor = "#ddd";
this.effectiveColor = "red";
this.itemSize = 16;
this.showTitle = true;
//TODO feature
}
}
Oops, something went wrong.

0 comments on commit ef73734

Please sign in to comment.