diff --git a/.gitignore b/.gitignore index 2869dbf997e8154a850736940828380b7af075f7..6e6b15ab5eb111f21ea89e5fe44aff9088773a46 100644 --- a/.gitignore +++ b/.gitignore @@ -24,11 +24,10 @@ log/ *.bak # Sample images -*.png +xchart-demo/*.png *.jpg *.bmp *.gif *.svg *.pdf *.eps - diff --git a/.travis.yml b/.travis.yml index ee7f2f14b3ba656ae1a35a9c7b3123a0c21bf2c6..9635c7051a45da6f66da97bd491432eedd8907a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ before_install: "git clone -b travis `git config --get remote.origin.url` target script: " if [ ${TRAVIS_PULL_REQUEST} = 'false' ]; then - mvn -Dmaven.test.skip=true clean deploy --settings target/travis/settings.xml; + mvn clean deploy --settings target/travis/settings.xml; else mvn clean verify --settings target/travis/settings.xml; fi" diff --git a/README.md b/README.md index 6ce5572d726df8c3def7c1d78b6056e086e2e79b..19073820787e76aa7efe25836bfd30eaed49669d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## [](http://xeiam.com/xchart) XChart +## [](http://xeiam.com/xchart) XChart A Simple Charting Library for Java ## Description @@ -21,14 +21,14 @@ Usage is very simple: Create a Chart instance, add a series of data to it, and e // Save it BitmapEncoder.saveBitmap(chart, "./Sample_Chart", BitmapFormat.PNG); - + // or save it in high-res BitmapEncoder.saveBitmapWithDPI(chart, "./Sample_Chart_300_DPI", BitmapFormat.PNG, 300); - + Now go ahead and [study some more examples](http://xeiam.com/xchart-example-code/), [download the thing](http://xeiam.com/xchart-change-log) and [provide feedback](https://github.com/timmolter/XChart/issues). ## Features -* No additional dependencies +* No required additional dependencies * ~100KB Jar * Line charts * Scatter charts @@ -47,7 +47,8 @@ Now go ahead and [study some more examples](http://xeiam.com/xchart-example-code * CSV import and export * High resolution chart export * Real-time charts - + * [x] Java 6 and up + ## Getting Started ### Non-Maven @@ -73,13 +74,13 @@ For snapshots, add the following to your pom.xml file: <snapshots/> <url>https://oss.sonatype.org/content/repositories/snapshots</url> </repository> - + <dependency> <groupId>com.xeiam</groupId> <artifactId>xchart</artifactId> <version>2.4.4-SNAPSHOT</version> </dependency> - + Snapshots can be manually downloaded from Sonatyope: [https://oss.sonatype.org/content/groups/public/com/xeiam/xchart/xchart/](https://oss.sonatype.org/content/groups/public/com/xeiam/xchart/xchart/) ## Building @@ -111,4 +112,4 @@ Please report any bugs or submit feature requests to [XChart's Github issue trac ## Release Information -We will announce new releases on our [Twitter page](https://twitter.com/Xeiam). \ No newline at end of file +We will announce new releases on our [Twitter page](https://twitter.com/Xeiam). diff --git a/etc/XChart_64_64.png b/etc/XChart_64_64.png new file mode 100644 index 0000000000000000000000000000000000000000..21c0ba8530b705aeead2a1bcfd7507e68ad2934b Binary files /dev/null and b/etc/XChart_64_64.png differ diff --git a/etc/header.txt b/etc/header.txt index 5133ecda33db57f16cbf53b1ef85bf80960a7e3c..c96c857890ab330e766e2d70318dcbb12e0e59cb 100644 --- a/etc/header.txt +++ b/etc/header.txt @@ -1,4 +1,4 @@ -Copyright 2011 - 2014 Xeiam LLC. +Copyright 2011 - 2015 Xeiam LLC. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pom.xml b/pom.xml index fdba8237c88618672ee9f12ca7fa6f02faaeca95..d13bd84ae6504c06ed80f18d3f0b7cb2513105c4 100644 --- a/pom.xml +++ b/pom.xml @@ -1,4 +1,5 @@ -<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"> +<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.xeiam.xchart</groupId> @@ -92,13 +93,78 @@ </dependency> </dependencies> + <profiles> + <profile> + <id>release-sign-artifacts</id> + <activation> + <property> + <name>performRelease</name> + <value>true</value> + </property> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-gpg-plugin</artifactId> + <version>1.6</version> + <executions> + <execution> + <id>sign-artifacts</id> + <phase>verify</phase> + <goals> + <goal>sign</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + + <profile> + <id>doclint-java8-disable</id> + <activation> + <jdk>[1.8,)</jdk> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <configuration> + <additionalparam>-Xdoclint:none</additionalparam> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-site-plugin</artifactId> + <version>3.4</version> + <configuration> + <reportPlugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>2.10.1</version> + <configuration> + <additionalparam>-Xdoclint:none</additionalparam> + </configuration> + </plugin> + </reportPlugins> + </configuration> + </plugin> + </plugins> + </build> + </profile> + </profiles> + <build> <plugins> <!-- Ensure compilation is done under Java 6 in all environments --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.1</version> + <version>3.2</version> <configuration> <source>1.6</source> <target>1.6</target> @@ -110,7 +176,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> - <version>2.2.1</version> + <version>2.4</version> <executions> <execution> <id>attach-sources</id> @@ -120,33 +186,14 @@ </execution> </executions> </plugin> - <!-- Generates a Javadoc JAR during package --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - <version>2.9.1</version> - <executions> - <execution> - <id>attach-javadocs</id> - <goals> - <goal>jar</goal> - </goals> - </execution> - </executions> - <configuration> - <excludePackageNames>com.xeiam.xchart.internal.*</excludePackageNames> - <additionalparam>-Xdoclint:none</additionalparam> - </configuration> - </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> - <version>2.5</version> + <version>2.5.1</version> <configuration> <autoversionsubmodules>true</autoversionsubmodules> </configuration> </plugin> - <!-- for header in all .java files --> <plugin> <groupId>com.mycila.maven-license-plugin</groupId> @@ -163,36 +210,6 @@ </plugins> </build> - <profiles> - <profile> - <id>release-sign-artifacts</id> - <activation> - <property> - <name>performRelease</name> - <value>true</value> - </property> - </activation> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-gpg-plugin</artifactId> - <version>1.5</version> - <executions> - <execution> - <id>sign-artifacts</id> - <phase>verify</phase> - <goals> - <goal>sign</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> - <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/ChartInfo.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/ChartInfo.java index 443bf5a3d2a4b327950491dc325f67fbb4b9205c..c9a3956595afbb9874157edfc0790515ffb035f8 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/ChartInfo.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/ChartInfo.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/XChartDemo.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/XChartDemo.java index 4045fb62fe3e306b8df6d38345b71c4015fd3624..10792c3ab62f99c436015c4acb13e52cc9e14774 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/XChartDemo.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/XChartDemo.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,6 +49,7 @@ import com.xeiam.xchart.demo.charts.date.DateChart04; import com.xeiam.xchart.demo.charts.date.DateChart05; import com.xeiam.xchart.demo.charts.date.DateChart06; import com.xeiam.xchart.demo.charts.date.DateChart07; +import com.xeiam.xchart.demo.charts.date.DateChart08; import com.xeiam.xchart.demo.charts.line.LineChart01; import com.xeiam.xchart.demo.charts.line.LineChart02; import com.xeiam.xchart.demo.charts.line.LineChart03; @@ -303,6 +304,9 @@ public class XChartDemo extends JPanel implements TreeSelectionListener { defaultMutableTreeNode = new DefaultMutableTreeNode(new ChartInfo("DateChart07 - Year Scale", new DateChart07().getChart())); category.add(defaultMutableTreeNode); + defaultMutableTreeNode = new DefaultMutableTreeNode(new ChartInfo("DateChart08 - Rotated Labels", new DateChart08().getChart())); + category.add(defaultMutableTreeNode); + // Real-time category category = new DefaultMutableTreeNode("Real-time Charts"); top.add(category); diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/ExampleChart.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/ExampleChart.java index c7a5b5a70c28c3147a6c098155a2c116dfbe3814..3fbd7ca9732697eadc7dbd49f6c016f825d8aefa 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/ExampleChart.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/ExampleChart.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/area/AreaChart01.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/area/AreaChart01.java index 4fb4b5f79b9c6dbe59e1569944f2d380667646dc..70fd6101ed0144cd98faa734ef0ba8e32acd0c8c 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/area/AreaChart01.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/area/AreaChart01.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/area/AreaChart02.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/area/AreaChart02.java index a5a8274dd00bdf4b9c73b3efc9c4a08c4e8948c8..5cfa7a6a9c9e09a88b51fc519e5b7bed6aeaa597 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/area/AreaChart02.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/area/AreaChart02.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/area/AreaLineChart03.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/area/AreaLineChart03.java index 7a020de4552d756213b5ed93318f635d81ae7caa..eb77798597b1af1ed6a400e00b65736961d57e79 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/area/AreaLineChart03.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/area/AreaLineChart03.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart01.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart01.java index b9cd9df92ad0af9d301ba043101bad875f61acc3..e0b98c8a8ac6c0ac1491e6aebe37fcb95cfd741a 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart01.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart01.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart02.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart02.java index 7774cc2a76b4dc36f211f0ad83a93c10f42dfe84..dcf204e73e720d59222751c39a69fb3bb9e4e1bc 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart02.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart02.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart03.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart03.java index 416402f44b3fb33ff5f2065308c7faf0a2b2b7f6..9dcdcacf19055c18f44b77eb997aa7ca80dc4136 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart03.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart03.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart04.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart04.java index 5b51c274c0befe39cee1d9bbeaff7f606fc60cec..448fdf984ab92bd22adf8af71bac4be9cd8a9289 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart04.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart04.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart05.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart05.java index b15395ac3f8663eea8a3d045ac9a91fd9bfd95b4..f1369c290328a1907041735747db40abae45ccc1 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart05.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart05.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart06.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart06.java index 69dc6b8d4451362996b266bda8f4f3fb9c3f833f..070e2c1122cd59eef63c39af9ec0d68888b647c9 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart06.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart06.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart07.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart07.java index 3b156ee55912e8c80fc19dc5e52f90b6933b75d9..1b81514df048ac8f230940e1d993519dfc41d7f2 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart07.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart07.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart08.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart08.java index a2d717aefdc4dd2889d8704222014e17ff8b014e..d15a932b4b68f50ba8b65fbd9603baaa2d499576 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart08.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/bar/BarChart08.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart01.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart01.java index 42ace1a0b3c2f1bf460467dfc8ba838e6121e04b..0473925b5456a989f63a4c2481bc653cdd59a76d 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart01.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart01.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart02.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart02.java index cf11711ee1c6943a6f8f601e105ce63dfe685cfe..505af95ebed5292e219c904811c647de5617fc0d 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart02.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart02.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart03.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart03.java index dbb32958ee0a52e28a6bfe7d90cb4c2f064638bf..cc80b0f65e07156f4e77b46a6434e36730c44e66 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart03.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart03.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart04.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart04.java index c3b2a52745c2349642cc92d3caad58ebbde748b5..6815d1e27d543aba697396edf67323791459f1e1 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart04.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart04.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart05.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart05.java index 39d9b8040a88b0ec0138bac0600cf5d121605d11..0a49d189fabe82f5544b13e7ff19f172e437c7f3 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart05.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart05.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart06.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart06.java index 1a95329946ed5819988d3df57958a096ad1d46e1..0a90629e12848cae34ed5b3cc10db582d104261c 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart06.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart06.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart07.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart07.java index da274a443fe2e5950859f451d27c1fe51a82db51..e3f8745da99a7b992a9632357a0b684e1f7e4296 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart07.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart07.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart08.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart08.java new file mode 100644 index 0000000000000000000000000000000000000000..fbb6c8b85d20c9aa12f8fa964449f7eee00f49fc --- /dev/null +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/date/DateChart08.java @@ -0,0 +1,78 @@ +/** + * Copyright 2011 - 2015 Xeiam LLC. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.xeiam.xchart.demo.charts.date; + +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Random; + +import com.xeiam.xchart.Chart; +import com.xeiam.xchart.ChartBuilder; +import com.xeiam.xchart.StyleManager.TextAlignment; +import com.xeiam.xchart.SwingWrapper; +import com.xeiam.xchart.demo.charts.ExampleChart; + +/** + * Year scale + */ +public class DateChart08 implements ExampleChart { + + public static void main(String[] args) { + + ExampleChart exampleChart = new DateChart08(); + Chart chart = exampleChart.getChart(); + new SwingWrapper(chart).displayChart(); + } + + @Override + public Chart getChart() { + + // Create Chart + Chart chart = new ChartBuilder().width(800).height(600).title("Year Scale").build(); + chart.getStyleManager().setLegendVisible(false); + chart.getStyleManager().setXAxisLabelRotation(45); + chart.getStyleManager().setYAxisLabelRotation(90); + chart.getStyleManager().setXAxisLabelAlignment(TextAlignment.Right); + chart.getStyleManager().setDatePattern("yyyy-MM-dd"); + + // generate data + List<Date> xData = new ArrayList<Date>(); + List<Double> yData = new ArrayList<Double>(); + + Random random = new Random(); + + DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + Date date = null; + for (int i = 1; i <= 14; i++) { + try { + date = sdf.parse("" + (2001 + i) + "-" + random.nextInt(12) + "-" + random.nextInt(28)); + } catch (ParseException e) { + e.printStackTrace(); + } + xData.add(date); + yData.add(Math.random() * i); + } + + chart.addSeries("blah", xData, yData); + + return chart; + + } +} diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/line/LineChart01.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/line/LineChart01.java index e698320cb89f655850d2fd56e32e8444c366efa2..630ac5662ecabbc2367d6c9a0dd149912475b03e 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/line/LineChart01.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/line/LineChart01.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/line/LineChart02.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/line/LineChart02.java index 070c412bb974ae3299008a9c0c932235ad60f587..c04545cf608c8df6135a8418a9554ee4a3fec076 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/line/LineChart02.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/line/LineChart02.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/line/LineChart03.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/line/LineChart03.java index 2a336a12cf9a173b33b5452f58fe6f3ff6a602e1..c3b760fcc0d58f1eb5ecddef06847591ed72924d 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/line/LineChart03.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/line/LineChart03.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/line/LineChart04.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/line/LineChart04.java index cf367556fe834c735814113736d5b98e74cfe052..35796a32bd113ff63c87e35880030b40be6ab6b4 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/line/LineChart04.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/line/LineChart04.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/line/LineChart05.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/line/LineChart05.java index 45c5697af8d02005da1a63aac417a8de8a294ec7..34a169dc33cd000a017e30e2fcc61f4453efdff2 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/line/LineChart05.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/line/LineChart05.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/line/LineChart06.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/line/LineChart06.java index 32a83d020fc50f351cba47c0fcf5ecc06463a4e3..8f0c8253bdee5204c69c1d262f53ba11f95b619e 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/line/LineChart06.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/line/LineChart06.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/realtime/RealtimeChart01.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/realtime/RealtimeChart01.java index ce3828b9c9263291adbf23f9c62c9cc76f01898d..f0388b1a4dad6f254b7338c7cc93b5f391331f0d 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/realtime/RealtimeChart01.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/realtime/RealtimeChart01.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/realtime/RealtimeChart02.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/realtime/RealtimeChart02.java index f805714df0e2baeb0619e0b3abb7c836084b4b07..ca0986656ecaae50602578862849e06038e81962 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/realtime/RealtimeChart02.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/realtime/RealtimeChart02.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/realtime/RealtimeChart03.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/realtime/RealtimeChart03.java index 127c9d78245bc553c0fe6d684c860aa5d6c4b0af..eda329215fa4b2420105a2b1d72063b963d452ff 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/realtime/RealtimeChart03.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/realtime/RealtimeChart03.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/scatter/ScatterChart01.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/scatter/ScatterChart01.java index 1fb2b3ea4ffcbaba8cede8ac143c674b1ac2fa2a..39e8949c5ad03480e41f98ebdb7bd345074d041c 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/scatter/ScatterChart01.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/scatter/ScatterChart01.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/scatter/ScatterChart02.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/scatter/ScatterChart02.java index a3c0bd4c9b00b01489fae3dcdfcb1b2565a349e4..8ac76e5ea778b89a087d16c44449de3a4529559a 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/scatter/ScatterChart02.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/scatter/ScatterChart02.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/scatter/ScatterChart03.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/scatter/ScatterChart03.java index 31b303198c2073352aa5b110f4c54f3b9b0359b9..acac803e275e545f6cbc53e7a9713489d8c79b4d 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/scatter/ScatterChart03.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/scatter/ScatterChart03.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/scatter/ScatterChart04.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/scatter/ScatterChart04.java index fb8eb1e67acd792f840933108c4bfaa548c07735..af059ccc50867e8b8a9cd6201eca0deffc2b6b45 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/scatter/ScatterChart04.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/scatter/ScatterChart04.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/theme/ThemeChart01.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/theme/ThemeChart01.java index ec92f5f7c444b7dceff11741aaacf6c609a999a6..4a4bc254f6426f278693b9c26fde78e209de9166 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/theme/ThemeChart01.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/theme/ThemeChart01.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/theme/ThemeChart02.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/theme/ThemeChart02.java index ff76707993db4073e376547caeed69d6053b6bcb..65659326fbd1907b005babd332310ab888b7e3b0 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/theme/ThemeChart02.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/theme/ThemeChart02.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/theme/ThemeChart03.java b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/theme/ThemeChart03.java index 1d463c96424c5baae8d2005034b5a853f2d9c516..f9cf851a9f987f890d21601691ac03992fe616d2 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/theme/ThemeChart03.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/demo/charts/theme/ThemeChart03.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/standalone/CSVChartColumns.java b/xchart-demo/src/main/java/com/xeiam/xchart/standalone/CSVChartColumns.java index 61a8cd531af4c29e4fd6c6b5054b54cd7c6ee384..ba997098223805bb396008c4d559adfbf378da6a 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/standalone/CSVChartColumns.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/standalone/CSVChartColumns.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/standalone/CSVChartRows.java b/xchart-demo/src/main/java/com/xeiam/xchart/standalone/CSVChartRows.java index be762d997e27264a7b7ed666b9fdab30876931cb..bc3422cb033eb6b1ecdeaf970a9f9f25babf71fb 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/standalone/CSVChartRows.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/standalone/CSVChartRows.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/standalone/DateChart.java b/xchart-demo/src/main/java/com/xeiam/xchart/standalone/DateChart.java index 2c014b4e6fbf4f10cea9b0c193de066f8267f991..56e026fa2aa4d9b80c21fc1a222c7cde2a57017e 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/standalone/DateChart.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/standalone/DateChart.java @@ -1,5 +1,5 @@ /** - * Copyright 2013 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/standalone/ErrorBarLogTest.java b/xchart-demo/src/main/java/com/xeiam/xchart/standalone/ErrorBarLogTest.java index 86135ccd88b00a082f98c21925d3c7c89fac733b..8df4daeff91efbdfa7df457789d2297e50503628 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/standalone/ErrorBarLogTest.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/standalone/ErrorBarLogTest.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/standalone/ErrorBarTest.java b/xchart-demo/src/main/java/com/xeiam/xchart/standalone/ErrorBarTest.java index 81357ac794d32fa0f7402647c23f24f603d9f2b7..c4b214b9c84288ac7f72a8e192cf7b3bcabeff31 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/standalone/ErrorBarTest.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/standalone/ErrorBarTest.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/standalone/Example0.java b/xchart-demo/src/main/java/com/xeiam/xchart/standalone/Example0.java index c50d3d0696cb65460526189f54c7837a9d58b4b9..9e8c2ed7f0e5f34d7e0633addf8727f602409422 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/standalone/Example0.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/standalone/Example0.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/standalone/Example1.java b/xchart-demo/src/main/java/com/xeiam/xchart/standalone/Example1.java index 17c5095fb2f63a770d0a00e466808d3c6d100b30..48fe9dcacfaf91ffb573f7190a45dc8c553a1708 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/standalone/Example1.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/standalone/Example1.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/standalone/Example2.java b/xchart-demo/src/main/java/com/xeiam/xchart/standalone/Example2.java index d01c4191632aef1199ca2a63a75a1ddfa860a915..be7f469949e825620ad90b2837c4ebdfec8162d7 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/standalone/Example2.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/standalone/Example2.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/standalone/SwingDemo.java b/xchart-demo/src/main/java/com/xeiam/xchart/standalone/SwingDemo.java index 960905adfc5488a7ac6c9a785035d35e1ba1e87f..082c833fffa723c22c1596dcbaf7cf94adcb78a8 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/standalone/SwingDemo.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/standalone/SwingDemo.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/standalone/TestForIssue83.java b/xchart-demo/src/main/java/com/xeiam/xchart/standalone/TestForIssue83.java index 2f2bc082ff4e61fb55f22797e7c3eff9311e1104..113efa01ac8871b1a6f10bd9090f1e75390feb4d 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/standalone/TestForIssue83.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/standalone/TestForIssue83.java @@ -1,5 +1,5 @@ /** - * Copyright 2013 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart-demo/src/main/java/com/xeiam/xchart/standalone/VectorGraphicsTest.java b/xchart-demo/src/main/java/com/xeiam/xchart/standalone/VectorGraphicsTest.java index 33f2877e61e4e268c165d7314295e599ce28bd24..1b059184f7cef05363200885c7ca27f2e54372c3 100644 --- a/xchart-demo/src/main/java/com/xeiam/xchart/standalone/VectorGraphicsTest.java +++ b/xchart-demo/src/main/java/com/xeiam/xchart/standalone/VectorGraphicsTest.java @@ -1,5 +1,5 @@ /** - * Copyright 2013 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/BitmapEncoder.java b/xchart/src/main/java/com/xeiam/xchart/BitmapEncoder.java index 09661e273ef457191d3d0e6ff00a5aaa0d2206ad..3700d3e3993dbaccb953a34085e221e17925d8fd 100644 --- a/xchart/src/main/java/com/xeiam/xchart/BitmapEncoder.java +++ b/xchart/src/main/java/com/xeiam/xchart/BitmapEncoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/CSVExporter.java b/xchart/src/main/java/com/xeiam/xchart/CSVExporter.java index b22d27dda44e96255bcbb6b24aa79930928aa0ff..a7e4100ced5eeccf4a335c0905466729003f4fe3 100644 --- a/xchart/src/main/java/com/xeiam/xchart/CSVExporter.java +++ b/xchart/src/main/java/com/xeiam/xchart/CSVExporter.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/CSVImporter.java b/xchart/src/main/java/com/xeiam/xchart/CSVImporter.java index e48df88f317d972af3916a18b763ed714d7a51b4..e9ae29f58a76e080eec602fabae392a5f430d9ea 100644 --- a/xchart/src/main/java/com/xeiam/xchart/CSVImporter.java +++ b/xchart/src/main/java/com/xeiam/xchart/CSVImporter.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/Chart.java b/xchart/src/main/java/com/xeiam/xchart/Chart.java index 8b26ee6d833726e3c5142e0432ce62ff41b1a24b..32051f2a2823d730a4567719dbe5db04834d3844 100644 --- a/xchart/src/main/java/com/xeiam/xchart/Chart.java +++ b/xchart/src/main/java/com/xeiam/xchart/Chart.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/ChartBuilder.java b/xchart/src/main/java/com/xeiam/xchart/ChartBuilder.java index e8cf00e8c9addce0e4db7dfe68008b5a0206010c..e47aae46a72282ff143aef895c81825ea4fc9a73 100644 --- a/xchart/src/main/java/com/xeiam/xchart/ChartBuilder.java +++ b/xchart/src/main/java/com/xeiam/xchart/ChartBuilder.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/ChartColor.java b/xchart/src/main/java/com/xeiam/xchart/ChartColor.java index 966bcb23aea578c0c597a70ca9dc7199efd8d793..201f1a85e6ce6d0b7a85f862e85bdaa3d9f1cec8 100644 --- a/xchart/src/main/java/com/xeiam/xchart/ChartColor.java +++ b/xchart/src/main/java/com/xeiam/xchart/ChartColor.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/Histogram.java b/xchart/src/main/java/com/xeiam/xchart/Histogram.java index 6914c383c485f4f7f61c3a655be94b8bc258f319..ffd99ce7103c07f3579a4b24b2d7b9d064fbd7c0 100644 --- a/xchart/src/main/java/com/xeiam/xchart/Histogram.java +++ b/xchart/src/main/java/com/xeiam/xchart/Histogram.java @@ -1,5 +1,5 @@ /** - * Copyright 2013 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/QuickChart.java b/xchart/src/main/java/com/xeiam/xchart/QuickChart.java index 10e27a424b9beca3976d2c758f59a633c71391f4..71f84e7956e914281ac17c37b43a98e4a19d97db 100644 --- a/xchart/src/main/java/com/xeiam/xchart/QuickChart.java +++ b/xchart/src/main/java/com/xeiam/xchart/QuickChart.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/Series.java b/xchart/src/main/java/com/xeiam/xchart/Series.java index 47e0b315985951871bb62c8310a76bc967a21a8a..9c7040c4a9e2f79c73446e1571c851977b5a3960 100644 --- a/xchart/src/main/java/com/xeiam/xchart/Series.java +++ b/xchart/src/main/java/com/xeiam/xchart/Series.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/SeriesColor.java b/xchart/src/main/java/com/xeiam/xchart/SeriesColor.java index 23802d3ccc12f2a4567f2c2e7bbc7ad87ea1c81b..d5b7dd77c350dc4fcb3814a6a8971348b2382b45 100644 --- a/xchart/src/main/java/com/xeiam/xchart/SeriesColor.java +++ b/xchart/src/main/java/com/xeiam/xchart/SeriesColor.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/SeriesLineStyle.java b/xchart/src/main/java/com/xeiam/xchart/SeriesLineStyle.java index aae13b9a597b4590cea26c52ea2a49ce0f1ec3b9..320401e0ad405c9bf1361ea20534e16240fec386 100644 --- a/xchart/src/main/java/com/xeiam/xchart/SeriesLineStyle.java +++ b/xchart/src/main/java/com/xeiam/xchart/SeriesLineStyle.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/SeriesMarker.java b/xchart/src/main/java/com/xeiam/xchart/SeriesMarker.java index 37819ef4fced0d407865a7a63951516bbbdc53d1..54725f8d910a5e47953c6593b856ce31835ed25d 100644 --- a/xchart/src/main/java/com/xeiam/xchart/SeriesMarker.java +++ b/xchart/src/main/java/com/xeiam/xchart/SeriesMarker.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/StyleManager.java b/xchart/src/main/java/com/xeiam/xchart/StyleManager.java index 58fe291772242a4531150dbf838f14b52f4fb525..6c2d3f12d68c7eb35b49209fa9bfd2a052011e20 100644 --- a/xchart/src/main/java/com/xeiam/xchart/StyleManager.java +++ b/xchart/src/main/java/com/xeiam/xchart/StyleManager.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -123,6 +123,8 @@ public class StyleManager { private double axisTickSpacePercentage; private TextAlignment xAxisLabelAlignment = TextAlignment.Centre; private TextAlignment yAxisLabelAlignment = TextAlignment.Left; + private int xAxisLabelRotation = 0; + private int yAxisLabelRotation = 0; // Chart Plot Area /////////////////////////////// private boolean isPlotGridLinesVisible; @@ -906,6 +908,26 @@ public class StyleManager { this.yAxisLabelAlignment = yAxisLabelAlignment; } + public int getXAxisLabelRotation() { + + return xAxisLabelRotation; + } + + public void setXAxisLabelRotation(int xAxisLabelRotation) { + + this.xAxisLabelRotation = xAxisLabelRotation; + } + + public int getYAxisLabelRotation() { + + return yAxisLabelRotation; + } + + public void setYAxisLabelRotation(int yAxisLabelRotation) { + + this.yAxisLabelRotation = yAxisLabelRotation; + } + // Chart Plot Area /////////////////////////////// /** diff --git a/xchart/src/main/java/com/xeiam/xchart/SwingWrapper.java b/xchart/src/main/java/com/xeiam/xchart/SwingWrapper.java index 14d2ae08211559e3e041c4a2ec8105f0dc89515e..e10797f1733cbae2a77e2c78e6c8f26e2c5f2873 100644 --- a/xchart/src/main/java/com/xeiam/xchart/SwingWrapper.java +++ b/xchart/src/main/java/com/xeiam/xchart/SwingWrapper.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/VectorGraphicsEncoder.java b/xchart/src/main/java/com/xeiam/xchart/VectorGraphicsEncoder.java index fc00d7de4f4a7160648cfb8eeafdcb8f931a02b7..e0e16adc4833e0306998b3a6eeee8eab7f21ed27 100644 --- a/xchart/src/main/java/com/xeiam/xchart/VectorGraphicsEncoder.java +++ b/xchart/src/main/java/com/xeiam/xchart/VectorGraphicsEncoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/XChartPanel.java b/xchart/src/main/java/com/xeiam/xchart/XChartPanel.java index 813388da9e6d6c5a01935562bcf4aae6b7237ecf..e8811ea7518fd7ce62bbee106fbfcf0037eee143 100644 --- a/xchart/src/main/java/com/xeiam/xchart/XChartPanel.java +++ b/xchart/src/main/java/com/xeiam/xchart/XChartPanel.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/Utils.java b/xchart/src/main/java/com/xeiam/xchart/internal/Utils.java index eb310e31c7305b1320126164035fab2b1e2d7c86..90c4baf5b171cca0f309d2a155bed2d7493b4ef4 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/Utils.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/Utils.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/Axis.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/Axis.java index fa80957328352078e9578269eea1d61aedd14ef8..1de853d6838ba34814831ad40fe80fbc1e564d6f 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/Axis.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/Axis.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,9 +16,13 @@ package com.xeiam.xchart.internal.chartpart; import java.awt.Graphics2D; +import java.awt.Shape; import java.awt.font.FontRenderContext; import java.awt.font.TextLayout; +import java.awt.geom.AffineTransform; import java.awt.geom.Rectangle2D; +import java.text.SimpleDateFormat; +import java.util.Date; import com.xeiam.xchart.StyleManager.LegendPosition; @@ -143,8 +147,13 @@ public class Axis implements ChartPart { // Axis tick labels double axisTickLabelsHeight = 0.0; if (getChartPainter().getStyleManager().isXAxisTicksVisible()) { - TextLayout textLayout = new TextLayout("0", getChartPainter().getStyleManager().getAxisTickLabelsFont(), new FontRenderContext(null, true, false)); - Rectangle2D rectangle = textLayout.getBounds(); + String tickLabel = getChartPainter().getAxisPair().getXAxis().getAxisType().equals(AxisType.Date) ? + new SimpleDateFormat(getChartPainter().getStyleManager().getDatePattern()).format(new Date()) : "0"; + TextLayout textLayout = new TextLayout(tickLabel, getChartPainter().getStyleManager().getAxisTickLabelsFont(), new FontRenderContext(null, true, false)); + AffineTransform rot = getChartPainter().getStyleManager().getXAxisLabelRotation() == 0 ? null : + AffineTransform.getRotateInstance(-Math.toRadians(getChartPainter().getStyleManager().getXAxisLabelRotation())); + Shape shape = textLayout.getOutline(rot); + Rectangle2D rectangle = shape.getBounds(); axisTickLabelsHeight = rectangle.getHeight() + getChartPainter().getStyleManager().getAxisTickPadding() + getChartPainter().getStyleManager().getAxisTickMarkLength(); } return titleHeight + axisTickLabelsHeight; diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisPair.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisPair.java index aa0531f439f5cd8e90f7ad2a9ca474bfc406973d..1962b469188c67e1157e3455ecacbf08cdd17646 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisPair.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisPair.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTick.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTick.java index 1d2a4a9d35c333ef1b2fa8a1991aabe0a18a8fd8..4e2c66c1960084fdcbcf0ffa6e7b72f30ba55873 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTick.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTick.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickBarChartCalculator.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickBarChartCalculator.java index e70a6e3ca40cd2322482730f90eec21017a0e638..6a44c6433a24663418b39bdb9c752c59f8f58019 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickBarChartCalculator.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickBarChartCalculator.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickCalculator.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickCalculator.java index edb68709471f3e528e9956d373cb602e6566cb0c..ebf08cef78b5258b8db41a2cc1dea5abd1f4420d 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickCalculator.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickCalculator.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickDateCalculator.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickDateCalculator.java index b871b94400064c52ef05cbd3d4e49ab446c0f39a..ee4d0554887fa174240b6ec0d213f9cadab5267a 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickDateCalculator.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickDateCalculator.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickLabels.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickLabels.java index e25f3bc7e5c0d52039bb1db78153ea0b68a9da82..c3c0fa2002376cb504be1724564928b6e728a118 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickLabels.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickLabels.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -88,8 +88,10 @@ public class AxisTickLabels implements ChartPart { for (Double tickLocation : axisLabelTextLayouts.keySet()) { TextLayout axisLabelTextLayout = axisLabelTextLayouts.get(tickLocation); - Rectangle2D tickLabelBounds = axisLabelTextLayout.getBounds(); - Shape shape = axisLabelTextLayout.getOutline(null); + AffineTransform rot = getChartPainter().getStyleManager().getYAxisLabelRotation() == 0 ? null : + AffineTransform.getRotateInstance(-Math.toRadians(getChartPainter().getStyleManager().getYAxisLabelRotation())); + Shape shape = axisLabelTextLayout.getOutline(rot); + Rectangle2D tickLabelBounds = shape.getBounds(); double flippedTickLocation = yOffset + height - tickLocation; @@ -142,7 +144,9 @@ public class AxisTickLabels implements ChartPart { TextLayout textLayout = new TextLayout(tickLabel, getChartPainter().getStyleManager().getAxisTickLabelsFont(), frc); // Shape shape = v.getOutline(); - Shape shape = textLayout.getOutline(null); + AffineTransform rot = getChartPainter().getStyleManager().getXAxisLabelRotation() == 0 ? null : + AffineTransform.getRotateInstance(-Math.toRadians(getChartPainter().getStyleManager().getXAxisLabelRotation())); + Shape shape = textLayout.getOutline(rot); Rectangle2D tickLabelBounds = shape.getBounds2D(); AffineTransform orig = g.getTransform(); diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickLogarithmicCalculator.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickLogarithmicCalculator.java index 80e627099a34b6af626db7cb677c979aeef35a4a..e872ed02a35031483ccd5f6a835f3301e1918f88 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickLogarithmicCalculator.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickLogarithmicCalculator.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickMarks.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickMarks.java index 6d913bf40e6d7d0fb0ea3321a1eefe95303512f0..d099a4027149af7ab0c3bec36dbaf13a380606fd 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickMarks.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickMarks.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickNumericalCalculator.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickNumericalCalculator.java index f46acbcbe89cd24de2aa51ac86c95348923a84a5..75c33974ca88dcd033d2e9d0dcec8620911bb939 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickNumericalCalculator.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTickNumericalCalculator.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTitle.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTitle.java index e16c4a7d2cb60dd2f758a7e919260719fdccb1eb..e57543314dc81337605e5be442bf879d903da123 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTitle.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/AxisTitle.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/ChartPainter.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/ChartPainter.java index dcc231fe169dee18fec55e04db62988f56c623fb..a19fb2f7aba49d8a1b1717ba1773c3351417e776 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/ChartPainter.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/ChartPainter.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/ChartPart.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/ChartPart.java index 01f6b3087d76f0d5e2a916fa93ad6f1be7e33610..47ca19490dec51e5ac1c9a84389831dbdbf1702f 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/ChartPart.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/ChartPart.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/ChartTitle.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/ChartTitle.java index adb3ff43f1af7aa51fb22d9d37f5e85bd9064b54..9b5ea136eb3bfdf851f9568fb8f6ffefaa92b9fb 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/ChartTitle.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/ChartTitle.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/DateFormatter.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/DateFormatter.java index 50bbb0d1d56eafa0ddc2126860b9f87e32685154..73d695fb221781dc1c8b0e922d87ade81da1a066 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/DateFormatter.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/DateFormatter.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/Legend.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/Legend.java index d07fc1b46bcc5334cf385f03bef81fe175bebd1e..83dfafccbaa74e9dd27bb31ee50f96c858054bb1 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/Legend.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/Legend.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/NumberFormatter.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/NumberFormatter.java index 2264d2d051f301800f145a284a5199b3c788c646..2dce083fcb65460229ffd8987876a0c8deb67069 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/NumberFormatter.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/NumberFormatter.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/Plot.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/Plot.java index be45c59ad18869dff579f8a2fc27fb4aa2dabca5..5c4ed9eb39436c7bd1f22ebb9a470f186567af61 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/Plot.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/Plot.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/PlotContent.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/PlotContent.java index ae6abadba8d50ef42b437575fc776539a55960c5..23900560419cd21405df83df1063b22566d7e698 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/PlotContent.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/PlotContent.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/PlotContentBarChart.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/PlotContentBarChart.java index 7b497463f1c8dfeb9fa1c620f1ab5751ebfe994e..d2a1fa4f9287fa966a1c17816d813f35dab7d2ac 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/PlotContentBarChart.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/PlotContentBarChart.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/PlotContentLineChart.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/PlotContentLineChart.java index ec65b7de2e856adfb4b0cd438bc0c76b10048f17..ba015102825fe973b7c4f4b7658d1724b8dbd17a 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/PlotContentLineChart.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/PlotContentLineChart.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/PlotSurface.java b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/PlotSurface.java index c36dbebba04db8774bc34c5957d8fb54d2837ac7..f0898e869dcac336a34c0c273116ea930c3e822b 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/PlotSurface.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/chartpart/PlotSurface.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/markers/Circle.java b/xchart/src/main/java/com/xeiam/xchart/internal/markers/Circle.java index 489f7abf0d6efaa440ffc9f0cb97ee25c087dac2..679565099dfd377422538db0db6e7feea1c77172 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/markers/Circle.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/markers/Circle.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/markers/Diamond.java b/xchart/src/main/java/com/xeiam/xchart/internal/markers/Diamond.java index 78f9883ec50ca6387ba63403ea194678dacaa8fe..bd3764cbbbf16e341087dbd9dd91b7483f056382 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/markers/Diamond.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/markers/Diamond.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/markers/Marker.java b/xchart/src/main/java/com/xeiam/xchart/internal/markers/Marker.java index 42ba4e3ca51cb57b29d619a716922295fc6901e3..e4852dcfaed4aac88a26bf6e81d07c1a8e62de1e 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/markers/Marker.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/markers/Marker.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/markers/Square.java b/xchart/src/main/java/com/xeiam/xchart/internal/markers/Square.java index f297ebdb6dabe501f56523b8a7a6084202014db1..76aa85ef1ca43a84710e1932029f7b9d722d3f51 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/markers/Square.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/markers/Square.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/markers/TriangleDown.java b/xchart/src/main/java/com/xeiam/xchart/internal/markers/TriangleDown.java index 6f53f66426131b076c320f2e85f0a01ddd6c3369..2b63cdf690ae94edc0d2ee8e34ceb0df11c04f3a 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/markers/TriangleDown.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/markers/TriangleDown.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/markers/TriangleUp.java b/xchart/src/main/java/com/xeiam/xchart/internal/markers/TriangleUp.java index 3aa77c341fcb669831fadac6b024851114a19051..c3dc57b34f1463c1e5b6392de0baecfd0a017f9c 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/markers/TriangleUp.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/markers/TriangleUp.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/package-info.java b/xchart/src/main/java/com/xeiam/xchart/internal/package-info.java index 1db80f3d3ea43ccb2268d21ea4865ff400090997..545db76f7f6b730d17efa62a0b549e2b4030e91d 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/package-info.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/package-info.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * Classes in this package are internal and are not intended to be accessed directly. Therefore, they are not included in the JavaDocs. */ diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/style/GGPlot2Theme.java b/xchart/src/main/java/com/xeiam/xchart/internal/style/GGPlot2Theme.java index 5a454f9985274319771c3f6b7ddce0470d632a42..498c61075532373c6abf031d2428bd9da5ab21e0 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/style/GGPlot2Theme.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/style/GGPlot2Theme.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/style/MatlabTheme.java b/xchart/src/main/java/com/xeiam/xchart/internal/style/MatlabTheme.java index 1cbbe35a30589e5d133f033ff19aee91859bd1b8..ffd698c38b6142865473de174aa3b6e3fb521185 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/style/MatlabTheme.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/style/MatlabTheme.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/style/SeriesColorMarkerLineStyle.java b/xchart/src/main/java/com/xeiam/xchart/internal/style/SeriesColorMarkerLineStyle.java index 924e0db48486ff2621d182b8f9f98990449b7ae7..4d2ddaca9fa0a619d18b5b43043f4ccd0a926cf6 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/style/SeriesColorMarkerLineStyle.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/style/SeriesColorMarkerLineStyle.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/style/SeriesColorMarkerLineStyleCycler.java b/xchart/src/main/java/com/xeiam/xchart/internal/style/SeriesColorMarkerLineStyleCycler.java index 9fd27161a1172381c0c9996d89b2d13e58cd3ab9..17b9667d503d54c8bc580f0bf2f81dd4e172e8a8 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/style/SeriesColorMarkerLineStyleCycler.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/style/SeriesColorMarkerLineStyleCycler.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/style/Theme.java b/xchart/src/main/java/com/xeiam/xchart/internal/style/Theme.java index 97b4bffb97934bc449bf210390898c492db5fd24..854add80db1fbc54bcdffed9779f8b2f3b3ab2cf 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/style/Theme.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/style/Theme.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/main/java/com/xeiam/xchart/internal/style/XChartTheme.java b/xchart/src/main/java/com/xeiam/xchart/internal/style/XChartTheme.java index b03db2b063adc9201db330fcf054f2902c2950d5..8e0093f805a94b6a644284f6edbccac0fa9aaf47 100644 --- a/xchart/src/main/java/com/xeiam/xchart/internal/style/XChartTheme.java +++ b/xchart/src/main/java/com/xeiam/xchart/internal/style/XChartTheme.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/xchart/src/test/java/com/xeiam/xchart/DateFormatterTest.java b/xchart/src/test/java/com/xeiam/xchart/DateFormatterTest.java index f298fbe3e9634a3ad60d9788d2443cc2f69240ce..db70248ccc5b99152346f7ca72005c0a884e8d14 100644 --- a/xchart/src/test/java/com/xeiam/xchart/DateFormatterTest.java +++ b/xchart/src/test/java/com/xeiam/xchart/DateFormatterTest.java @@ -1,5 +1,5 @@ /** - * Copyright 2011 - 2014 Xeiam LLC. + * Copyright 2011 - 2015 Xeiam LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.