diff --git a/.travis.yml b/.travis.yml
index a93a6d59..1686522b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -38,6 +38,8 @@ jobs:
- ./gradlew wicket:wicked-charts-wicket15:artifactoryPublish -x test -Dsnapshot=true -Dbintray.user=$BINTRAY_USER -Dbintray.key=$BINTRAY_KEY -Dbuild.number=$TRAVIS_BUILD_NUMBER
- ./gradlew wicket:wicked-charts-wicket6:artifactoryPublish -x test -Dsnapshot=true -Dbintray.user=$BINTRAY_USER -Dbintray.key=$BINTRAY_KEY -Dbuild.number=$TRAVIS_BUILD_NUMBER
- ./gradlew wicket:wicked-charts-wicket7:artifactoryPublish -x test -Dsnapshot=true -Dbintray.user=$BINTRAY_USER -Dbintray.key=$BINTRAY_KEY -Dbuild.number=$TRAVIS_BUILD_NUMBER
+ - ./gradlew wicket:wicked-charts-wicket8:artifactoryPublish -x test -Dsnapshot=true -Dbintray.user=$BINTRAY_USER -Dbintray.key=$BINTRAY_KEY -Dbuild.number=$TRAVIS_BUILD_NUMBER
+
# release a new stable version to bintray
- stage: release
@@ -49,3 +51,4 @@ jobs:
- ./gradlew wicket:wicked-charts-wicket15:bintrayUpload -x test -Dbintray.user=$BINTRAY_USER -Dbintray.key=$BINTRAY_KEY -Dbuild.number=$TRAVIS_BUILD_NUMBER
- ./gradlew wicket:wicked-charts-wicket6:bintrayUpload -x test -Dbintray.user=$BINTRAY_USER -Dbintray.key=$BINTRAY_KEY -Dbuild.number=$TRAVIS_BUILD_NUMBER
- ./gradlew wicket:wicked-charts-wicket7:bintrayUpload -x test -Dbintray.user=$BINTRAY_USER -Dbintray.key=$BINTRAY_KEY -Dbuild.number=$TRAVIS_BUILD_NUMBER
+ - ./gradlew wicket:wicked-charts-wicket8:bintrayUpload -x test -Dbintray.user=$BINTRAY_USER -Dbintray.key=$BINTRAY_KEY -Dbuild.number=$TRAVIS_BUILD_NUMBER
diff --git a/README.md b/README.md
index 7b1380b9..29100dec 100644
--- a/README.md
+++ b/README.md
@@ -8,17 +8,15 @@ Beautiful and interactive JavaScript charts for Java-based web applications.
* Download and run the [Showcase](https://github.com/adessoAG/wicked-charts/wiki/Developer-Info:-Starting-the-Showcase-Application) application for your web framework
* Check out the [FAQ](https://github.com/adessoAG/wicked-charts/wiki/FAQ)
-[![Build Status](https://travis-ci.org/thombergs/wicked-charts.png?branch=master)](https://travis-ci.org/thombergs/wicked-charts)
+[![Build Status](https://travis-ci.org/adessoAG/wicked-charts.png?branch=master)](https://travis-ci.org/adessoAG/wicked-charts)
What is Wicked Charts?
======================
Wicked Charts is a Java wrapper of the [Chart.js](www.chartjs.org) and [Highcharts](www.highcharts.com) JavaScript libraries.
The Chart.js and Highcharts libraries provide eye-pleasing charts using HTML5 (see [Highcharts demo](http://www.highcharts.com/demo) and [Chart.js Samples](http://www.chartjs.org/samples/latest/)).
-With Wicked Charts, you can configure a chart in Java and display it in any web application based on Apache Wicket* or JSF. Or you can use the Chart.js or Highcharts Java wrappers to integrate it in web applications built with other java web frameworks.
+With Wicked Charts, you can configure a chart in Java and display it in any web application based on Apache Wicket or JSF. Or you can use the Chart.js or Highcharts Java wrappers to integrate it in web applications built with other java web frameworks.
-*Support for Chart.js is only available in Apache Wicket 7.x
-
-**Please note that while Wicked Charts is licensed under Apache 2.0 License, Highcharts itself is only free for non-commercial use. Chart.js, however, is licensed under the MIT license and is free to use.**
+*Please note that while Wicked Charts is licensed under Apache 2.0 License, Highcharts itself is only free for non-commercial use. Chart.js, however, is licensed under the MIT license and is free to use.*
See here: [Highcharts shop](http://shop.highsoft.com/highcharts.html)
And here: [Chart.js license](http://www.chartjs.org/docs/latest/notes/license.html)
@@ -34,80 +32,180 @@ Want to contribute?
===================
Feel free to clone this repository and submit pull request. We'll see to get them merged into the main project.
-Gradle coordinates
+Adding Wicked-Charts as a dependency
=================
-Depending on what web framework you use, add one of the following dependencies to your Gradle build:
+Depending on what web framework you use, add one of the following dependencies to your Gradle/Maven build:
+
+Wicket 8.x
+---------
+Gradle:
+```groovy
+repositories {
+ jcenter()
+}
+
+dependencies {
+ compile 'de.adesso.wicked-charts:wicked-charts-wicket8:3.1.0'
+}
+```
+
+Maven:
+```xml
+
+ de.adesso.wicked-charts
+ wicked-charts-wicket8
+ 3.1.0
+ pom
+
+
+```
Wicket 7.x
---------
-```html
+Gradle:
+```groovy
repositories {
- maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' }
+ jcenter()
}
dependencies {
- compile 'de.adesso.wicked-charts:wicked-charts-wicket7:3.0.0'
+ compile 'de.adesso.wicked-charts:wicked-charts-wicket7:3.1.0'
}
```
+Maven:
+```xml
+
+ de.adesso.wicked-charts
+ wicked-charts-wicket7
+ 3.1.0
+ pom
+
+```
+
Wicket 6.x
---------
-```html
+Gradle:
+```groovy
repositories {
- maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' }
+ jcenter()
}
dependencies {
- compile 'de.adesso.wicked-charts:wicked-charts-wicket6:3.0.0'
+ compile 'de.adesso.wicked-charts:wicked-charts-wicket6:3.1.0'
}
```
+Maven:
+```xml
+
+ de.adesso.wicked-charts
+ wicked-charts-wicket6
+ 3.1.0
+ pom
+
+```
+
Wicket 1.5.x
---------
-```html
+Gradle:
+```groovy
repositories {
- maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' }
+ jcenter()
}
dependencies {
- compile 'de.adesso.wicked-charts:wicked-charts-wicket15:3.0.0'
+ compile 'de.adesso.wicked-charts:wicked-charts-wicket15:3.1.0'
}
```
+Maven:
+```xml
+
+ de.adesso.wicked-charts
+ wicked-charts-wicket15
+ 3.1.0
+ pom
+
+```
+
Wicket 1.4.x
---------
-```html
+Gradle:
+```groovy
repositories {
- maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' }
+ jcenter()
}
dependencies {
- compile 'de.adesso.wicked-charts:wicked-charts-wicket14:3.0.0'
+ compile 'de.adesso.wicked-charts:wicked-charts-wicket14:3.1.0'
}
```
+Maven:
+```xml
+
+ de.adesso.wicked-charts
+ wicked-charts-wicket14
+ 3.1.0
+ pom
+
+```
+
JSF 2.1
---------
-```html
+Gradle:
+```groovy
repositories {
- maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' }
+ jcenter()
}
dependencies {
- compile 'de.adesso.wicked-charts:wicked-charts-jsf21:3.0.0'
+ compile 'de.adesso.wicked-charts:wicked-charts-jsf21:3.1.0'
}
```
+Maven:
+```xml
+
+ de.adesso.wicked-charts
+ wicked-charts-jsf21
+ 3.1.0
+ pom
+
+```
+
Java Wrappers
------------
If you want to use the Java abstraction and JSON serializer of the Chart.js or Highcharts options (for example to add them to an application built with a different web framework than Wicket ot JSF), add the following dependencies:
-```html
+
+Gradle:
+```groovy
repositories {
- maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' }
+ jcenter()
}
dependencies {
- compile 'de.adesso.wicked-charts:chartjs-wrapper:3.0.0'
- compile 'de.adesso.wicked-charts:highcharts-wrapper:3.0.0'
+ compile 'de.adesso.wicked-charts:chartjs-wrapper:3.1.0'
+ compile 'de.adesso.wicked-charts:highcharts-wrapper:3.1.0'
}
```
+
+Maven:
+```xml
+
+
+ de.adesso.wicked-charts
+ chartjs-wrapper
+ 3.1.0
+ pom
+
+
+
+ de.adesso.wicked-charts
+ highcharts-wrapper
+ 3.1.0
+ pom
+
+
+```
diff --git a/build.gradle b/build.gradle
index e296abd3..76394e70 100644
--- a/build.gradle
+++ b/build.gradle
@@ -26,7 +26,7 @@ subprojects {
}
// run gradle with "-Dsnapshot=true" to automatically append "-SNAPSHOT" to the version
- version = '3.0.0' + (Boolean.valueOf(System.getProperty("snapshot")) ? "-SNAPSHOT" : "")
+ version = '3.1.0' + (Boolean.valueOf(System.getProperty("snapshot")) ? "-SNAPSHOT" : "")
sourceCompatibility = 1.8
ext {
@@ -73,29 +73,6 @@ subprojects {
}
}
- publishing {
- publications {
- mavenPublication(MavenPublication) {
- from components.java
- artifact sourcesJar {
- classifier "sources"
- }
- artifact javadocJar {
- classifier "javadoc"
- }
- groupId 'de.adesso.wicked-charts'
- artifactId project.name
- version project.version
- pom.withXml {
- def root = asNode()
- root.appendNode('description', 'Beautiful Charts for Java-based Web Applications')
- root.appendNode('name', project.name)
- root.appendNode('url', 'https://github.com/adessoag/wicked-charts')
- root.children().last() + pomConfig
- }
- }
- }
- }
artifactory {
contextUrl = 'http://oss.jfrog.org'
@@ -142,4 +119,28 @@ subprojects {
publish = true
}
+
+ publishing {
+ publications {
+ mavenPublication(MavenPublication) {
+ from components.java
+ artifact sourcesJar {
+ classifier "sources"
+ }
+ artifact javadocJar {
+ classifier "javadoc"
+ }
+ groupId 'de.adesso.wicked-charts'
+ artifactId project.name
+ version project.version
+ pom.withXml {
+ def root = asNode()
+ root.appendNode('description', 'Beautiful Charts for Java-based Web Applications')
+ root.appendNode('name', project.name)
+ root.appendNode('url', 'https://github.com/adessoag/wicked-charts')
+ root.children().last() + pomConfig
+ }
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/ChartConfiguration.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/ChartConfiguration.java
index 8f665d00..533a7fba 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/ChartConfiguration.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/ChartConfiguration.java
@@ -1,14 +1,13 @@
package de.adesso.wickedcharts.chartjs;
-import java.util.List;
-
import com.fasterxml.jackson.annotation.JsonIgnore;
-
import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
import de.adesso.wickedcharts.chartjs.chartoptions.Data;
import de.adesso.wickedcharts.chartjs.chartoptions.Options;
import lombok.experimental.Accessors;
+import java.util.List;
+
/**
* This class describes the complete configuration of a chart.
*/
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/AngleLines.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/AngleLines.java
index fed1cb52..2d9d5728 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/AngleLines.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/AngleLines.java
@@ -1,10 +1,10 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-
import de.adesso.wickedcharts.chartjs.chartoptions.colors.Color;
import lombok.experimental.Accessors;
+import java.io.Serializable;
+
/**
* Defines the options for angled lines.
*
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Animation.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Animation.java
index 0c3c59ce..8b42c4e3 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Animation.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Animation.java
@@ -1,9 +1,9 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-
import lombok.experimental.Accessors;
+import java.io.Serializable;
+
/**
* Defines the animations.
*
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/AxesScale.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/AxesScale.java
index 4cf7d908..797a601c 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/AxesScale.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/AxesScale.java
@@ -1,9 +1,9 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-
import lombok.experimental.Accessors;
+import java.io.Serializable;
+
/**
* Defines options for the axes.
*
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Callback.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Callback.java
index 2af7e37f..a3902265 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Callback.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Callback.java
@@ -1,9 +1,9 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-
import lombok.experimental.Accessors;
+import java.io.Serializable;
+
/**
* Base-class for Callback functions.
*
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Data.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Data.java
index fc6819d2..140d8308 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Data.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Data.java
@@ -1,15 +1,14 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-import java.util.List;
-
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonProperty;
-
import de.adesso.wickedcharts.chartjs.chartoptions.label.Label;
import lombok.experimental.Accessors;
+import java.io.Serializable;
+import java.util.List;
+
/**
* Defines the different data objects.
*
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Dataset.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Dataset.java
index 3f307e0f..bcff7709 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Dataset.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Dataset.java
@@ -1,20 +1,18 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-import java.util.Arrays;
-import java.util.List;
-
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-
import de.adesso.wickedcharts.chartjs.chartoptions.colors.Color;
-import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BooleanFillingMode;
import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.FillingMode;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.ValueType;
import de.adesso.wickedcharts.chartjs.jackson.serializer.SingleElementListSerializer;
import lombok.experimental.Accessors;
+import java.io.Serializable;
+import java.util.Arrays;
+import java.util.List;
+
/**
* Defines the options for the dataset object.
*
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Element.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Element.java
index d5a10b72..9b54945c 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Element.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Element.java
@@ -1,9 +1,9 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-
import lombok.experimental.Accessors;
+import java.io.Serializable;
+
/**
* Elements include: arc, lines, points, and rectangles.
*
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Filler.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Filler.java
index 9608fc09..00dda9b6 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Filler.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Filler.java
@@ -1,9 +1,9 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-
import lombok.experimental.Accessors;
+import java.io.Serializable;
+
/**
* Defines the filler plugin for area charts.
*
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/GridLines.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/GridLines.java
index a21f9f40..a1af04d6 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/GridLines.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/GridLines.java
@@ -1,15 +1,14 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-import java.util.Arrays;
-import java.util.List;
-
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-
import de.adesso.wickedcharts.chartjs.chartoptions.colors.Color;
import de.adesso.wickedcharts.chartjs.jackson.serializer.SingleElementListSerializer;
import lombok.experimental.Accessors;
+import java.io.Serializable;
+import java.util.Arrays;
+import java.util.List;
+
/**
* Defines options for the grid lines that run perpendicular to the axis.
*
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Hover.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Hover.java
index f2471b06..defb2119 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Hover.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Hover.java
@@ -1,9 +1,9 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-
import lombok.experimental.Accessors;
+import java.io.Serializable;
+
/**
* Defines which events trigger chart interactions.
*
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/JavaScriptReference.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/JavaScriptReference.java
index 6e9f65de..c04ed85c 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/JavaScriptReference.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/JavaScriptReference.java
@@ -1,9 +1,9 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-
import lombok.experimental.Accessors;
+import java.io.Serializable;
+
@Accessors(chain = true)
@lombok.Data
public class JavaScriptReference implements Serializable{
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Legend.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Legend.java
index f68271de..b895dd95 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Legend.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Legend.java
@@ -1,9 +1,9 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-
import lombok.experimental.Accessors;
+import java.io.Serializable;
+
/**
* Displays data about the datasets.
*
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/LegendLabel.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/LegendLabel.java
index e2430378..814e151f 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/LegendLabel.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/LegendLabel.java
@@ -1,10 +1,10 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-
import de.adesso.wickedcharts.chartjs.chartoptions.colors.Color;
import lombok.experimental.Accessors;
+import java.io.Serializable;
+
/**
* Defines legend label configuration which is nested below the legend configuration.
*
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Line.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Line.java
index f2e528db..5c8dd666 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Line.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Line.java
@@ -1,12 +1,12 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-import java.util.List;
-
import de.adesso.wickedcharts.chartjs.chartoptions.colors.Color;
import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.FillingModeLine;
import lombok.experimental.Accessors;
+import java.io.Serializable;
+import java.util.List;
+
/**
* Defines the line dataset properties.
*
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Options.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Options.java
index 2615b30c..f0615a3b 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Options.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Options.java
@@ -1,10 +1,10 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
+import lombok.experimental.Accessors;
+
import java.io.Serializable;
import java.util.List;
-import lombok.experimental.Accessors;
-
/**
* Defines global options for the charts.
*
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Plugins.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Plugins.java
index 74c951b8..e01f4980 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Plugins.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Plugins.java
@@ -1,9 +1,9 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-
import lombok.experimental.Accessors;
+import java.io.Serializable;
+
/**
* Efficient way to customize or change the default behavior of a chart.
*
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Point.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Point.java
index e1b9b75d..3ea7a334 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Point.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Point.java
@@ -1,10 +1,10 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import lombok.experimental.Accessors;
+import java.io.Serializable;
+
/**
* Represents the points in a line chart or a bubble chart.
*
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/PointLabels.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/PointLabels.java
index d801c0fc..53456ea2 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/PointLabels.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/PointLabels.java
@@ -1,10 +1,10 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-
import de.adesso.wickedcharts.chartjs.chartoptions.colors.Color;
import lombok.experimental.Accessors;
+import java.io.Serializable;
+
/**
* Used to configure the point labels that are shown on the perimeter of the scale.
*
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/SamplesFillerAnalyzer.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/SamplesFillerAnalyzer.java
index 4e3b206c..453af0ba 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/SamplesFillerAnalyzer.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/SamplesFillerAnalyzer.java
@@ -1,9 +1,9 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-
import lombok.experimental.Accessors;
+import java.io.Serializable;
+
//TODO: Write Javadoc
@Accessors(chain = true)
@lombok.Data
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Scale.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Scale.java
index e0b3d9c3..a6b08318 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Scale.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Scale.java
@@ -1,9 +1,9 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-
import lombok.experimental.Accessors;
+import java.io.Serializable;
+
/**
* Defines the scale used in the radar chart
*
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/ScaleLabel.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/ScaleLabel.java
index 2533f34e..3936cf6d 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/ScaleLabel.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/ScaleLabel.java
@@ -1,9 +1,9 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-
import lombok.experimental.Accessors;
+import java.io.Serializable;
+
/**
* Defines the scale label options.
*
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Scales.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Scales.java
index d16c371b..faefdb5e 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Scales.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Scales.java
@@ -1,15 +1,13 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-import java.util.Arrays;
-
-import java.util.List;
-
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonProperty;
-
import lombok.experimental.Accessors;
+import java.io.Serializable;
+import java.util.Arrays;
+import java.util.List;
+
/**
* Defines all x- and y-axes.
*
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/TickStyle.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/TickStyle.java
index 5db2df47..faae030d 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/TickStyle.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/TickStyle.java
@@ -1,10 +1,10 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-
import de.adesso.wickedcharts.chartjs.chartoptions.colors.Color;
import lombok.experimental.Accessors;
+import java.io.Serializable;
+
/**
* Defines the tick styles
*
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Ticks.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Ticks.java
index 9e28f3ce..917cbcfb 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Ticks.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Ticks.java
@@ -1,7 +1,5 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-
import de.adesso.wickedcharts.chartjs.chartoptions.colors.Color;
import de.adesso.wickedcharts.chartjs.chartoptions.label.Label;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.DoubleValue;
@@ -10,6 +8,8 @@
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.ValueType;
import lombok.experimental.Accessors;
+import java.io.Serializable;
+
/**
* Defines all of the different options for the Ticks object.
*
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/TimeFormat.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/TimeFormat.java
index 2ed83110..49690f8f 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/TimeFormat.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/TimeFormat.java
@@ -1,9 +1,9 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-
import lombok.experimental.Accessors;
+import java.io.Serializable;
+
/**
* Defines the time format options
*
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Title.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Title.java
index fdb95c5d..5a462a3e 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Title.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Title.java
@@ -1,19 +1,16 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.Color;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.StringValue;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.ValueType;
import lombok.experimental.Accessors;
-/**
- * Contains attributes for the 'Title' option of a chart
- */
-
import java.io.Serializable;
-import java.util.Arrays;
import java.util.List;
-import de.adesso.wickedcharts.chartjs.chartoptions.colors.Color;
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.StringValue;
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.ValueType;
-import lombok.experimental.Accessors;
+/**
+ * Contains attributes for the 'Title' option of a chart
+ */
/**
* Defines the Title attribute of the chart options.
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/TooltipCallbacks.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/TooltipCallbacks.java
index 99c41704..9b54115e 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/TooltipCallbacks.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/TooltipCallbacks.java
@@ -1,9 +1,9 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-
import lombok.experimental.Accessors;
+import java.io.Serializable;
+
/**
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Tooltips.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Tooltips.java
index ba98919a..f0d09471 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Tooltips.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/Tooltips.java
@@ -1,12 +1,11 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import java.io.Serializable;
-
-
import de.adesso.wickedcharts.chartjs.chartoptions.colors.Color;
import lombok.experimental.Accessors;
+import java.io.Serializable;
+
/**
* This class represented the chart.js tooltips object.
*
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/valueType/ConstValue.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/valueType/ConstValue.java
index c0f25cab..aebb1c1a 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/valueType/ConstValue.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/valueType/ConstValue.java
@@ -1,12 +1,12 @@
package de.adesso.wickedcharts.chartjs.chartoptions.valueType;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
/**
* This class defines a constant ValueType using a final String.
* Wrapping strings in this way is needed so that we can accept Lists of Strings
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/valueType/DateTimeValue.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/valueType/DateTimeValue.java
index b1f9a112..06208bfa 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/valueType/DateTimeValue.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/valueType/DateTimeValue.java
@@ -1,11 +1,11 @@
package de.adesso.wickedcharts.chartjs.chartoptions.valueType;
-import java.io.Serializable;
-import java.time.LocalDateTime;
-
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
/**
* This class defines a DateTimeValue object that can be used in charts that use different options related to time.
* It acts as a wrapper around the standard LocalDateTime in Java.
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/valueType/DoubleValue.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/valueType/DoubleValue.java
index 5851059c..821210ef 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/valueType/DoubleValue.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/valueType/DoubleValue.java
@@ -1,12 +1,12 @@
package de.adesso.wickedcharts.chartjs.chartoptions.valueType;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
/**
* This class wraps Doubles in a DoubleValue object.
* Wrapping Doubles in this way is needed so that we can accept Lists of Doubles
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/valueType/FloatValue.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/valueType/FloatValue.java
index 398f874b..577f1cd5 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/valueType/FloatValue.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/valueType/FloatValue.java
@@ -1,12 +1,12 @@
package de.adesso.wickedcharts.chartjs.chartoptions.valueType;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
/**
* This class wraps Floats in a FloatValue object.
* Wrapping Floats in this way is needed so that we can accept Lists of Floats
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/valueType/IntegerValue.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/valueType/IntegerValue.java
index 3c2abee5..4e18f315 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/valueType/IntegerValue.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/valueType/IntegerValue.java
@@ -1,12 +1,12 @@
package de.adesso.wickedcharts.chartjs.chartoptions.valueType;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
/**
* This class wraps Integers in a IntegerValue object.
* Wrapping Integers in this way is needed so that we can accept Lists of Integers
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/valueType/StringValue.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/valueType/StringValue.java
index 9f83f6f9..6f93d7e1 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/valueType/StringValue.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/chartoptions/valueType/StringValue.java
@@ -1,12 +1,12 @@
package de.adesso.wickedcharts.chartjs.chartoptions.valueType;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
/**
* This class wraps Strings in a StringValue object.
* Wrapping Strings in this way is needed so that we can accept Lists of Strings
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/JsonRenderer.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/JsonRenderer.java
index 60d72fae..fb4933a2 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/JsonRenderer.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/JsonRenderer.java
@@ -1,29 +1,24 @@
package de.adesso.wickedcharts.chartjs.jackson;
-import java.util.Locale;
-
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.CallbackFunction;
+import de.adesso.wickedcharts.chartjs.chartoptions.JavaScriptReference;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.*;
import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.FillingMode;
import de.adesso.wickedcharts.chartjs.chartoptions.label.ConstLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.label.DateTimeLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextListLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.ConstValue;
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.DateTimeValue;
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.DoubleValue;
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.FloatValue;
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.StringValue;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.*;
import de.adesso.wickedcharts.chartjs.jackson.serializer.*;
import de.adesso.wickedcharts.chartjs.json.JsonValueEnum;
import de.adesso.wickedcharts.chartjs.json.LowercaseEnum;
+import java.util.Locale;
+
public class JsonRenderer {
private final ObjectMapper jacksonMapper;
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/CallbackFunctionSerializer.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/CallbackFunctionSerializer.java
index d14ac225..6f5e8247 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/CallbackFunctionSerializer.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/CallbackFunctionSerializer.java
@@ -1,14 +1,13 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.chartjs.chartoptions.CallbackFunction;
+import java.io.IOException;
+
/**
* Serializes a CallbackFunction object to JSON
*/
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/ConstLabelSerializer.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/ConstLabelSerializer.java
index 313bd6e8..be1646df 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/ConstLabelSerializer.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/ConstLabelSerializer.java
@@ -1,14 +1,13 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.chartjs.chartoptions.label.ConstLabel;
+import java.io.IOException;
+
/**
* Serializes a ConstLabel object to JSON
*/
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/ConstValueSerializer.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/ConstValueSerializer.java
index a9f91132..d860c549 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/ConstValueSerializer.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/ConstValueSerializer.java
@@ -1,13 +1,12 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.ConstValue;
+
+import java.io.IOException;
/**
* Serializes a ConstValue object to JSON
*/
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/DateTimeLabelSerializer.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/DateTimeLabelSerializer.java
index 21b4aa01..f186f918 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/DateTimeLabelSerializer.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/DateTimeLabelSerializer.java
@@ -1,15 +1,14 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import java.io.IOException;
-import java.time.format.DateTimeFormatter;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.chartjs.chartoptions.label.DateTimeLabel;
+import java.io.IOException;
+import java.time.format.DateTimeFormatter;
+
/**
* Serializes a DateTimeLabel object to JSON
*/
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/DateTimeValueSerializer.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/DateTimeValueSerializer.java
index d24e78f9..2b5a6d7d 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/DateTimeValueSerializer.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/DateTimeValueSerializer.java
@@ -1,15 +1,14 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import java.io.IOException;
-import java.time.format.DateTimeFormatter;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.DateTimeValue;
+import java.io.IOException;
+import java.time.format.DateTimeFormatter;
+
/**
* Serializes a DateTimeValue object to JSON
*/
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/DoubleValueSerializer.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/DoubleValueSerializer.java
index 8b920c38..d9a1ddc9 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/DoubleValueSerializer.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/DoubleValueSerializer.java
@@ -1,14 +1,13 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.DoubleValue;
+import java.io.IOException;
+
/**
* Serializes a DoubleValue object to JSON
*/
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/FillingModeSerializer.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/FillingModeSerializer.java
index 7e99e849..92d745f5 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/FillingModeSerializer.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/FillingModeSerializer.java
@@ -1,14 +1,13 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.FillingMode;
+import java.io.IOException;
+
/**
* Serializes a FillingMode object to JSON
*/
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/FloatValueSerializer.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/FloatValueSerializer.java
index 46216092..ce8e7909 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/FloatValueSerializer.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/FloatValueSerializer.java
@@ -1,14 +1,13 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.FloatValue;
+import java.io.IOException;
+
/**
* Serializes a FloatValue object to JSON
*/
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/HexColorSerializer.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/HexColorSerializer.java
index e965e201..b726c1a4 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/HexColorSerializer.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/HexColorSerializer.java
@@ -1,15 +1,12 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import java.io.IOException;
-import java.util.Locale;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.chartjs.chartoptions.colors.HexColor;
-import de.adesso.wickedcharts.chartjs.chartoptions.colors.RgbColor;
+
+import java.io.IOException;
/**
* Serializes a HexColor object to JSON
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/IntegerValueSerializer.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/IntegerValueSerializer.java
index d73d03ef..566e7943 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/IntegerValueSerializer.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/IntegerValueSerializer.java
@@ -1,14 +1,13 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import java.io.IOException;
+
/**
* Serializes an IntegerValue object to JSON
*/
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/JavaScriptReferenceSerializer.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/JavaScriptReferenceSerializer.java
index 22d5cb34..f1f6ea05 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/JavaScriptReferenceSerializer.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/JavaScriptReferenceSerializer.java
@@ -1,14 +1,13 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.chartjs.chartoptions.JavaScriptReference;
+import java.io.IOException;
+
/**
* Serializes a JavaScriptReference object to JSON
*/
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/JsonValueEnumSerializer.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/JsonValueEnumSerializer.java
index 735ee823..866306db 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/JsonValueEnumSerializer.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/JsonValueEnumSerializer.java
@@ -14,15 +14,14 @@
*/
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.chartjs.json.JsonValueEnum;
+import java.io.IOException;
+
/**
* Serializes a JsonValueEnum to JSON
*/
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/LowercaseEnumSerializer.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/LowercaseEnumSerializer.java
index e5d7e7df..173f6d20 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/LowercaseEnumSerializer.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/LowercaseEnumSerializer.java
@@ -14,15 +14,14 @@
*/
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import java.io.IOException;
-import java.util.Locale;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.chartjs.json.LowercaseEnum;
+import java.io.IOException;
+import java.util.Locale;
+
/**
* Serializes a LowercaseEnum to JSON
*/
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/RgbColorSerializer.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/RgbColorSerializer.java
index d2b12cf1..d6c242e1 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/RgbColorSerializer.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/RgbColorSerializer.java
@@ -1,15 +1,14 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import java.io.IOException;
-import java.util.Locale;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.chartjs.chartoptions.colors.RgbColor;
+import java.io.IOException;
+import java.util.Locale;
+
/**
* Serializes a RgbColor object to JSON.
*/
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/RgbaColorSerializer.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/RgbaColorSerializer.java
index ac599866..ebfe2851 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/RgbaColorSerializer.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/RgbaColorSerializer.java
@@ -1,15 +1,14 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import java.io.IOException;
-import java.util.Locale;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.chartjs.chartoptions.colors.RgbaColor;
+import java.io.IOException;
+import java.util.Locale;
+
/**
* Serializes a RgbaColor object to JSON.
*/
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/SimpleColorSerializer.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/SimpleColorSerializer.java
index a22d438f..7053edd3 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/SimpleColorSerializer.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/SimpleColorSerializer.java
@@ -1,16 +1,15 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.chartjs.chartoptions.colors.RgbColor;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.RgbaColor;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import java.io.IOException;
+
/**
* Serializes a SimpleColor object to JSON.
*/
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/SingleElementListSerializer.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/SingleElementListSerializer.java
index 7657731f..4c1f2277 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/SingleElementListSerializer.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/SingleElementListSerializer.java
@@ -1,15 +1,14 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import java.io.IOException;
-import java.util.List;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.chartjs.jackson.SingleElementListObjectMapper;
+import java.io.IOException;
+import java.util.List;
+
/**
* Serializes a SingleElementList object to JSON.
*/
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/StringValueColorSerializer.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/StringValueColorSerializer.java
index 2fcf8df4..86fc83bc 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/StringValueColorSerializer.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/StringValueColorSerializer.java
@@ -1,14 +1,13 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.chartjs.chartoptions.colors.StringValueColor;
+import java.io.IOException;
+
/**
* Serializes a StringValueColor object to JSON.
*/
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/StringValueSerializer.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/StringValueSerializer.java
index 09b427ba..2952b377 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/StringValueSerializer.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/StringValueSerializer.java
@@ -1,14 +1,13 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.StringValue;
+import java.io.IOException;
+
/**
* Serializes a StringValue object to JSON.
*/
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/TextLabelSerializer.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/TextLabelSerializer.java
index 1892386b..87fad3ac 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/TextLabelSerializer.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/TextLabelSerializer.java
@@ -1,14 +1,13 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import java.io.IOException;
+
/**
* Serializes a TextLabel object to JSON.
*/
diff --git a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/TextListLabelSerializer.java b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/TextListLabelSerializer.java
index eff0f94c..2e13062b 100644
--- a/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/TextListLabelSerializer.java
+++ b/chartjs-wrapper/src/main/java/de/adesso/wickedcharts/chartjs/jackson/serializer/TextListLabelSerializer.java
@@ -1,14 +1,13 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextListLabel;
+import java.io.IOException;
+
/**
* Serializes a TextListLabel object to JSON.
*/
diff --git a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/ChartConfigurationTest.java b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/ChartConfigurationTest.java
index bbb6039c..aa3fc46d 100644
--- a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/ChartConfigurationTest.java
+++ b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/ChartConfigurationTest.java
@@ -1,7 +1,5 @@
package de.adesso.wickedcharts.chartjs;
-import static org.junit.Assert.*;
-
import org.junit.Test;
public class ChartConfigurationTest {
diff --git a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/chartoptions/DataTest.java b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/chartoptions/DataTest.java
index dcce11af..3d0ecb80 100644
--- a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/chartoptions/DataTest.java
+++ b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/chartoptions/DataTest.java
@@ -1,16 +1,14 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import static org.junit.Assert.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.Label;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import org.junit.Before;
+import org.junit.Test;
import java.util.Arrays;
import java.util.List;
-import org.junit.Before;
-import org.junit.Test;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.label.Label;
-import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import static org.junit.Assert.assertEquals;
public class DataTest {
diff --git a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/chartoptions/DatasetTest.java b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/chartoptions/DatasetTest.java
index 677dad48..dd22817c 100644
--- a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/chartoptions/DatasetTest.java
+++ b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/chartoptions/DatasetTest.java
@@ -1,20 +1,18 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.junit.Before;
-import org.junit.Test;
-
import de.adesso.wickedcharts.chartjs.chartoptions.colors.Color;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BooleanFillingMode;
import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.ValueType;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.Arrays;
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
public class DatasetTest {
private Dataset testDataset;
diff --git a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/chartoptions/GridLinesTest.java b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/chartoptions/GridLinesTest.java
index ea3aef5b..8675189d 100644
--- a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/chartoptions/GridLinesTest.java
+++ b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/chartoptions/GridLinesTest.java
@@ -1,15 +1,14 @@
package de.adesso.wickedcharts.chartjs.chartoptions;
-import static org.junit.Assert.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.Color;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import org.junit.Before;
+import org.junit.Test;
import java.util.Arrays;
import java.util.List;
-import org.junit.Before;
-import org.junit.Test;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.colors.Color;
-import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import static org.junit.Assert.assertEquals;
public class GridLinesTest {
diff --git a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/CallbackFunctionSerializerTest.java b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/CallbackFunctionSerializerTest.java
index cd98728d..5f9437b2 100644
--- a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/CallbackFunctionSerializerTest.java
+++ b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/CallbackFunctionSerializerTest.java
@@ -1,12 +1,11 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import static org.junit.Assert.*;
-
+import de.adesso.wickedcharts.chartjs.chartoptions.CallbackFunction;
+import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
import org.junit.Before;
import org.junit.Test;
-import de.adesso.wickedcharts.chartjs.chartoptions.CallbackFunction;
-import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
+import static org.junit.Assert.assertEquals;
public class CallbackFunctionSerializerTest {
diff --git a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/ConstValueSerializerTest.java b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/ConstValueSerializerTest.java
index f29b7906..14be6f18 100644
--- a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/ConstValueSerializerTest.java
+++ b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/ConstValueSerializerTest.java
@@ -1,15 +1,11 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import static org.junit.Assert.*;
-
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.ConstValue;
+import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
import org.junit.Before;
import org.junit.Test;
-
-
-
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.ConstValue;
-import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
+import static org.junit.Assert.assertEquals;
public class ConstValueSerializerTest {
diff --git a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/DatasetSerializerTest.java b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/DatasetSerializerTest.java
index be8cf14b..18a6962c 100644
--- a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/DatasetSerializerTest.java
+++ b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/DatasetSerializerTest.java
@@ -1,12 +1,11 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import static org.junit.Assert.assertTrue;
-
+import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
+import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
import org.junit.Before;
import org.junit.Test;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
+import static org.junit.Assert.assertTrue;
public class DatasetSerializerTest {
private JsonRenderer renderer;
diff --git a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/DateTimeValueSerializerTest.java b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/DateTimeValueSerializerTest.java
index cf2ab2a5..b93ba997 100644
--- a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/DateTimeValueSerializerTest.java
+++ b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/DateTimeValueSerializerTest.java
@@ -1,16 +1,11 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import static org.junit.Assert.assertEquals;
-
-import static org.junit.Assert.*;
-
-
-
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.DateTimeValue;
+import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
import org.junit.Before;
import org.junit.Test;
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.DateTimeValue;
-import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
+import static org.junit.Assert.assertEquals;
public class DateTimeValueSerializerTest {
diff --git a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/DoubleValueSerializerTest.java b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/DoubleValueSerializerTest.java
index 51f4576a..40d2592e 100644
--- a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/DoubleValueSerializerTest.java
+++ b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/DoubleValueSerializerTest.java
@@ -1,23 +1,13 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import static org.junit.Assert.assertEquals;
-
-import static org.junit.Assert.*;
-
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.DoubleValue;
+import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
import org.junit.Before;
import org.junit.Test;
-
-
import static org.junit.Assert.assertEquals;
-import org.junit.Before;
-import org.junit.Test;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.DoubleValue;
-import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
-
public class DoubleValueSerializerTest {
private JsonRenderer renderer;
diff --git a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/FillingModeSerializerTest.java b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/FillingModeSerializerTest.java
index db1cefdf..539e6e8c 100644
--- a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/FillingModeSerializerTest.java
+++ b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/FillingModeSerializerTest.java
@@ -1,16 +1,11 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import static org.junit.Assert.*;
-
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.*;
+import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
import org.junit.Before;
import org.junit.Test;
-import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.AbsoluteIndex;
-import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BooleanFillingMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.FillingMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.RelativeIndex;
-import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
+import static org.junit.Assert.assertEquals;
public class FillingModeSerializerTest {
diff --git a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/FloatValueSerializerTest.java b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/FloatValueSerializerTest.java
index 0fb65776..8a251393 100644
--- a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/FloatValueSerializerTest.java
+++ b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/FloatValueSerializerTest.java
@@ -1,22 +1,12 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import static org.junit.Assert.assertEquals;
-
-import static org.junit.Assert.*;
-
-
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.FloatValue;
+import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
import org.junit.Before;
import org.junit.Test;
-
import static org.junit.Assert.assertEquals;
-import org.junit.Before;
-import org.junit.Test;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.FloatValue;
-import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
-
public class FloatValueSerializerTest {
private JsonRenderer renderer;
diff --git a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/IntegerValueSerializerTest.java b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/IntegerValueSerializerTest.java
index 6b2606da..a2f2e12f 100644
--- a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/IntegerValueSerializerTest.java
+++ b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/IntegerValueSerializerTest.java
@@ -1,11 +1,11 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Before;
-import org.junit.Test;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
public class IntegerValueSerializerTest {
diff --git a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/JsonValueEnumSerializerTest.java b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/JsonValueEnumSerializerTest.java
index cc3772ee..ddf0ff71 100644
--- a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/JsonValueEnumSerializerTest.java
+++ b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/JsonValueEnumSerializerTest.java
@@ -1,13 +1,12 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import static org.junit.Assert.*;
-
-import org.junit.Before;
-import org.junit.Test;
-
import de.adesso.wickedcharts.chartjs.ChartConfiguration;
import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
import de.adesso.wickedcharts.chartjs.json.JsonValueEnum;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.assertTrue;
public class JsonValueEnumSerializerTest {
diff --git a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/LabelSerializerTest.java b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/LabelSerializerTest.java
index a1da48ef..1d04e37f 100644
--- a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/LabelSerializerTest.java
+++ b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/LabelSerializerTest.java
@@ -1,18 +1,14 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import static org.junit.Assert.*;
-
-import java.time.LocalDateTime;
-
+import de.adesso.wickedcharts.chartjs.chartoptions.label.*;
+import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
import org.junit.Before;
import org.junit.Test;
-import de.adesso.wickedcharts.chartjs.chartoptions.label.ConstLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.label.DateTimeLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.label.Label;
-import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.label.TextListLabel;
-import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
+import java.time.LocalDateTime;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
public class LabelSerializerTest {
diff --git a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/LowercaseEnumSerializerTest.java b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/LowercaseEnumSerializerTest.java
index 4f0bafb5..f002ebe6 100644
--- a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/LowercaseEnumSerializerTest.java
+++ b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/LowercaseEnumSerializerTest.java
@@ -1,13 +1,12 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import static org.junit.Assert.*;
-
-import org.junit.Before;
-import org.junit.Test;
-
import de.adesso.wickedcharts.chartjs.ChartConfiguration;
import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
import de.adesso.wickedcharts.chartjs.json.LowercaseEnum;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.assertTrue;
public class LowercaseEnumSerializerTest {
diff --git a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/RgbColorSerializerTest.java b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/RgbColorSerializerTest.java
index 4f484e6a..7d7ffb4d 100644
--- a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/RgbColorSerializerTest.java
+++ b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/RgbColorSerializerTest.java
@@ -1,12 +1,11 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import static org.junit.Assert.*;
-
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.RgbColor;
+import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
import org.junit.Before;
import org.junit.Test;
-import de.adesso.wickedcharts.chartjs.chartoptions.colors.RgbColor;
-import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
+import static org.junit.Assert.assertTrue;
public class RgbColorSerializerTest {
diff --git a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/RgbaColorSerializerTest.java b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/RgbaColorSerializerTest.java
index e35ef842..3d3b507d 100644
--- a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/RgbaColorSerializerTest.java
+++ b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/RgbaColorSerializerTest.java
@@ -1,12 +1,11 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import static org.junit.Assert.*;
-
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.RgbaColor;
+import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
import org.junit.Before;
import org.junit.Test;
-import de.adesso.wickedcharts.chartjs.chartoptions.colors.RgbaColor;
-import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
+import static org.junit.Assert.assertTrue;
public class RgbaColorSerializerTest {
diff --git a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/SimpleColorSerializerTest.java b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/SimpleColorSerializerTest.java
index 36b01840..39b751a8 100644
--- a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/SimpleColorSerializerTest.java
+++ b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/SimpleColorSerializerTest.java
@@ -1,12 +1,11 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import static org.junit.Assert.*;
-
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
import org.junit.Before;
import org.junit.Test;
-import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
-import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
+import static org.junit.Assert.assertTrue;
public class SimpleColorSerializerTest {
diff --git a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/SingleElementListSerializerTest.java b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/SingleElementListSerializerTest.java
index 057c5935..84129122 100644
--- a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/SingleElementListSerializerTest.java
+++ b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/SingleElementListSerializerTest.java
@@ -1,18 +1,15 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import static org.junit.Assert.*;
-
-import java.util.Arrays;
-import java.util.List;
-
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import de.adesso.wickedcharts.chartjs.ChartConfiguration;
+import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
import org.junit.Before;
import org.junit.Test;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import java.util.Arrays;
+import java.util.List;
-import de.adesso.wickedcharts.chartjs.ChartConfiguration;
-import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
-import de.adesso.wickedcharts.chartjs.jackson.serializer.SingleElementListSerializer;
+import static org.junit.Assert.assertTrue;
public class SingleElementListSerializerTest {
diff --git a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/StringValueColorSerializerTest.java b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/StringValueColorSerializerTest.java
index 3d803b7f..a4cd6d7f 100644
--- a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/StringValueColorSerializerTest.java
+++ b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/StringValueColorSerializerTest.java
@@ -1,15 +1,14 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import static org.junit.Assert.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.StringValueColor;
+import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
+import org.junit.Before;
+import org.junit.Test;
import java.util.Arrays;
import java.util.List;
-import org.junit.Before;
-import org.junit.Test;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.colors.StringValueColor;
-import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
+import static org.junit.Assert.assertTrue;
public class StringValueColorSerializerTest {
diff --git a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/StringValueSerializerTest.java b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/StringValueSerializerTest.java
index 79307f59..51be60f0 100644
--- a/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/StringValueSerializerTest.java
+++ b/chartjs-wrapper/src/test/java/de/adesso/wickedcharts/chartjs/jackson/serializer/StringValueSerializerTest.java
@@ -1,21 +1,11 @@
package de.adesso.wickedcharts.chartjs.jackson.serializer;
-import static org.junit.Assert.assertEquals;
-
-import static org.junit.Assert.*;
-import static org.junit.Assert.assertEquals;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.StringValue;
+import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
import org.junit.Before;
import org.junit.Test;
-import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.AbsoluteIndex;
-import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BooleanFillingMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.FillingMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.RelativeIndex;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.StringValue;
-import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
+import static org.junit.Assert.assertEquals;
public class StringValueSerializerTest {
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 568c50bf..8941bfbb 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-all.zip
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/BoxSeriesSerializer.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/BoxSeriesSerializer.java
index 7d43aeb5..9e394f6e 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/BoxSeriesSerializer.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/BoxSeriesSerializer.java
@@ -18,7 +18,6 @@
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.highcharts.options.series.Box;
import de.adesso.wickedcharts.highcharts.options.series.BoxSeries;
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/BubbleSerializer.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/BubbleSerializer.java
index fff7be9d..a0eeb5a5 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/BubbleSerializer.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/BubbleSerializer.java
@@ -14,15 +14,14 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.highcharts.options.series.Bubble;
+import java.io.IOException;
+
/**
* JsonSerializer for {@link Bubble} objects.
*
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/CenterSerializer.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/CenterSerializer.java
index 45afc7b1..287191cc 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/CenterSerializer.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/CenterSerializer.java
@@ -14,16 +14,15 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.highcharts.options.Center;
import de.adesso.wickedcharts.highcharts.options.Center.Unit;
+import java.io.IOException;
+
public class CenterSerializer extends JsonSerializer
{
@Override
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/ColorReferenceSerializer.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/ColorReferenceSerializer.java
index 37801518..2f393d8b 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/ColorReferenceSerializer.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/ColorReferenceSerializer.java
@@ -14,7 +14,7 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import java.awt.Color;
+import java.awt.*;
import java.util.Locale;
public abstract class ColorReferenceSerializer extends NullableSerializer {
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/CoordinateSerializer.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/CoordinateSerializer.java
index f7235365..ebab4ccb 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/CoordinateSerializer.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/CoordinateSerializer.java
@@ -18,7 +18,6 @@
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.highcharts.options.series.Coordinate;
import java.io.IOException;
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/CrosshairSerializer.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/CrosshairSerializer.java
index 66e59717..637ecb3e 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/CrosshairSerializer.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/CrosshairSerializer.java
@@ -14,15 +14,14 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.highcharts.options.Crosshair;
+import java.io.IOException;
+
public class CrosshairSerializer extends JsonSerializer {
@Override
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/CssStyleSerializer.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/CssStyleSerializer.java
index 0785e02c..09b7517a 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/CssStyleSerializer.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/CssStyleSerializer.java
@@ -14,16 +14,15 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import java.io.IOException;
-import java.util.Map.Entry;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.highcharts.options.CssStyle;
+import java.io.IOException;
+import java.util.Map.Entry;
+
/**
*
* @author Matthias Balke (matthias.balke@gmail.com)
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/DateTimeLabelFormatSerializer.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/DateTimeLabelFormatSerializer.java
index bf1e13e3..865c2911 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/DateTimeLabelFormatSerializer.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/DateTimeLabelFormatSerializer.java
@@ -14,17 +14,16 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import java.io.IOException;
-import java.util.Map.Entry;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.highcharts.options.DateTimeLabelFormat;
import de.adesso.wickedcharts.highcharts.options.DateTimeLabelFormat.DateTimeProperties;
+import java.io.IOException;
+import java.util.Map.Entry;
+
public class DateTimeLabelFormatSerializer extends JsonSerializer {
@Override
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/FunctionSerializer.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/FunctionSerializer.java
index 7a63866d..d9aae1e5 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/FunctionSerializer.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/FunctionSerializer.java
@@ -14,15 +14,14 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.highcharts.options.Function;
+import java.io.IOException;
+
/**
*
* @author Matthias Balke (matthias.balke@gmail.com)
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/HexColorReferenceSerializer.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/HexColorReferenceSerializer.java
index c914bb53..93d1620b 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/HexColorReferenceSerializer.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/HexColorReferenceSerializer.java
@@ -14,14 +14,13 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerationException;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.highcharts.options.color.HexColor;
+import java.io.IOException;
+
public class HexColorReferenceSerializer extends ColorReferenceSerializer {
@Override
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/HighchartsColorReferenceSerializer.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/HighchartsColorReferenceSerializer.java
index 675d85e3..e7e88526 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/HighchartsColorReferenceSerializer.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/HighchartsColorReferenceSerializer.java
@@ -14,15 +14,14 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import java.io.IOException;
-import java.util.Locale;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.highcharts.options.color.HighchartsColor;
+import java.io.IOException;
+import java.util.Locale;
+
public class HighchartsColorReferenceSerializer extends ColorReferenceSerializer {
private static final String HIGHCHARTS_COLOR = "Highcharts.getOptions().colors[%d]";
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/JsonRenderer.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/JsonRenderer.java
index 8f31ce45..c04fa54d 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/JsonRenderer.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/JsonRenderer.java
@@ -14,13 +14,10 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import java.util.Locale;
-
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
-
import de.adesso.wickedcharts.highcharts.json.LowercaseEnum;
import de.adesso.wickedcharts.highcharts.options.*;
import de.adesso.wickedcharts.highcharts.options.color.*;
@@ -29,6 +26,8 @@
import de.adesso.wickedcharts.highcharts.options.series.RangeCoordinate;
import de.adesso.wickedcharts.highcharts.options.series.ThreeDCoordinate;
+import java.util.Locale;
+
/**
* A renderer for rendering Highcharts options into JSON objects based on the
* Jackson Mapping library.
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/JsonValueEnumSerializer.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/JsonValueEnumSerializer.java
index 96e8ac09..e75d5b35 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/JsonValueEnumSerializer.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/JsonValueEnumSerializer.java
@@ -14,15 +14,14 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.highcharts.json.JsonValueEnum;
+import java.io.IOException;
+
public class JsonValueEnumSerializer extends JsonSerializer {
@Override
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/LowercaseEnumSerializer.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/LowercaseEnumSerializer.java
index 1fc46123..be7645f2 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/LowercaseEnumSerializer.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/LowercaseEnumSerializer.java
@@ -14,15 +14,14 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import java.io.IOException;
-import java.util.Locale;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.highcharts.json.LowercaseEnum;
+import java.io.IOException;
+import java.util.Locale;
+
public class LowercaseEnumSerializer extends JsonSerializer {
@Override
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/MinorTickIntervalSerializer.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/MinorTickIntervalSerializer.java
index fed233df..599b2bd7 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/MinorTickIntervalSerializer.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/MinorTickIntervalSerializer.java
@@ -14,15 +14,14 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.highcharts.options.MinorTickInterval;
+import java.io.IOException;
+
public class MinorTickIntervalSerializer extends JsonSerializer {
@Override
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/NoopSerializer.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/NoopSerializer.java
index c606a2d6..7d70baa9 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/NoopSerializer.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/NoopSerializer.java
@@ -14,13 +14,13 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerationException;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
+import java.io.IOException;
+
/**
* A serializer that produces null JSON output. This serializer is used for
* features that are not supported by default.
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/NullColorReferenceSerializer.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/NullColorReferenceSerializer.java
index 6b0aba8b..83b0f0a4 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/NullColorReferenceSerializer.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/NullColorReferenceSerializer.java
@@ -14,14 +14,13 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.highcharts.options.color.NullColor;
+import java.io.IOException;
+
public class NullColorReferenceSerializer extends ColorReferenceSerializer {
@Override
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/NullableSerializer.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/NullableSerializer.java
index 26680f89..dd2d2969 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/NullableSerializer.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/NullableSerializer.java
@@ -14,15 +14,14 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.highcharts.json.Nullable;
+import java.io.IOException;
+
public abstract class NullableSerializer extends JsonSerializer {
@SuppressWarnings("unchecked")
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/PixelOrPercentSerializer.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/PixelOrPercentSerializer.java
index feb92935..e5d59b4c 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/PixelOrPercentSerializer.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/PixelOrPercentSerializer.java
@@ -14,15 +14,14 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.highcharts.options.PixelOrPercent;
+import java.io.IOException;
+
public class PixelOrPercentSerializer extends JsonSerializer {
@Override
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/RangeCoordinateSerializer.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/RangeCoordinateSerializer.java
index 3b13833d..7c3273d8 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/RangeCoordinateSerializer.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/RangeCoordinateSerializer.java
@@ -14,15 +14,14 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.highcharts.options.series.RangeCoordinate;
+import java.io.IOException;
+
/**
* Serializer for {@link RangeCoordinate}s.
*
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/RgbaColorReferenceSerializer.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/RgbaColorReferenceSerializer.java
index 928e8546..d086ef7b 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/RgbaColorReferenceSerializer.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/RgbaColorReferenceSerializer.java
@@ -14,15 +14,14 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import java.io.IOException;
-import java.util.Locale;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.highcharts.options.color.RgbaColor;
+import java.io.IOException;
+import java.util.Locale;
+
public class RgbaColorReferenceSerializer extends ColorReferenceSerializer {
private static final String RGBA = "rgba(%d,%d,%d,%.2f)";
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/SimpleColorReferenceSerializer.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/SimpleColorReferenceSerializer.java
index 6d7c5e86..636fefcc 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/SimpleColorReferenceSerializer.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/SimpleColorReferenceSerializer.java
@@ -14,14 +14,13 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.highcharts.options.color.SimpleColor;
+import java.io.IOException;
+
public class SimpleColorReferenceSerializer extends ColorReferenceSerializer {
@Override
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/SymbolSerializer.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/SymbolSerializer.java
index 5831a30d..5dc7a190 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/SymbolSerializer.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/SymbolSerializer.java
@@ -14,15 +14,14 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import java.io.IOException;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.highcharts.options.Symbol;
+import java.io.IOException;
+
public class SymbolSerializer extends JsonSerializer {
@Override
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/ThreeDimensionalCoordinateSerializer.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/ThreeDimensionalCoordinateSerializer.java
index 92cc98ae..6f328f2c 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/ThreeDimensionalCoordinateSerializer.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/jackson/ThreeDimensionalCoordinateSerializer.java
@@ -18,7 +18,6 @@
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-
import de.adesso.wickedcharts.highcharts.options.series.ThreeDCoordinate;
import java.io.IOException;
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Axis.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Axis.java
index c4544859..a8e67d75 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Axis.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Axis.java
@@ -14,15 +14,15 @@
*/
package de.adesso.wickedcharts.highcharts.options;
-import java.awt.Color;
+import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
+import de.adesso.wickedcharts.highcharts.options.color.SimpleColor;
+
+import java.awt.*;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
-import de.adesso.wickedcharts.highcharts.options.color.SimpleColor;
-
/**
* Defines an Axis for a Highcharts chart.
*
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Background.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Background.java
index f3133bec..2577ee3d 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Background.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Background.java
@@ -14,10 +14,10 @@
*/
package de.adesso.wickedcharts.highcharts.options;
-import java.io.Serializable;
-
import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
+import java.io.Serializable;
+
/**
* Defines the configuration of the background option.
*
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/ButtonOptions.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/ButtonOptions.java
index f2a44f8f..12575552 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/ButtonOptions.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/ButtonOptions.java
@@ -14,13 +14,13 @@
*/
package de.adesso.wickedcharts.highcharts.options;
-import java.awt.Color;
-import java.io.Serializable;
-
import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
import de.adesso.wickedcharts.highcharts.options.color.SimpleColor;
import de.adesso.wickedcharts.highcharts.options.theme.Theme;
+import java.awt.*;
+import java.io.Serializable;
+
/**
* Defined options for the buttons of a chart.
*
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/ChartOptions.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/ChartOptions.java
index 943e6a4d..991161fc 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/ChartOptions.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/ChartOptions.java
@@ -14,14 +14,14 @@
*/
package de.adesso.wickedcharts.highcharts.options;
-import java.awt.Color;
-import java.io.Serializable;
-import java.util.List;
-
import de.adesso.wickedcharts.highcharts.options.button.Button;
import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
import de.adesso.wickedcharts.highcharts.options.color.SimpleColor;
+import java.awt.*;
+import java.io.Serializable;
+import java.util.List;
+
/**
* Defines the configuration of the "chart" option.
*
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Crosshair.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Crosshair.java
index 8662285e..e84d8129 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Crosshair.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Crosshair.java
@@ -14,10 +14,10 @@
*/
package de.adesso.wickedcharts.highcharts.options;
-import java.io.Serializable;
-
import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
+import java.io.Serializable;
+
/**
* Configuration of a single crosshair (x or y).
*
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/DataLabels.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/DataLabels.java
index 4de00287..f94d1474 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/DataLabels.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/DataLabels.java
@@ -14,12 +14,12 @@
*/
package de.adesso.wickedcharts.highcharts.options;
-import java.awt.*;
-import java.io.Serializable;
-
import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
import de.adesso.wickedcharts.highcharts.options.color.SimpleColor;
+import java.awt.*;
+import java.io.Serializable;
+
/**
* Defines the configuration of the "dataLabels" option.
*
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Global.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Global.java
index c4e25b7a..6f1cf629 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Global.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Global.java
@@ -14,10 +14,10 @@
*/
package de.adesso.wickedcharts.highcharts.options;
-import java.io.Serializable;
-
import com.fasterxml.jackson.annotation.JsonIgnore;
+import java.io.Serializable;
+
/**
* Defines the "globals" option.
*
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/LanguageOptions.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/LanguageOptions.java
index 73aa8873..07f1c4fd 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/LanguageOptions.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/LanguageOptions.java
@@ -15,11 +15,7 @@
package de.adesso.wickedcharts.highcharts.options;
import java.io.Serializable;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
+import java.util.*;
/**
* Defines the configuration of the "lang" option. Use
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Legend.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Legend.java
index bc4a3a6e..8ef58a90 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Legend.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Legend.java
@@ -14,12 +14,12 @@
*/
package de.adesso.wickedcharts.highcharts.options;
-import java.awt.*;
-import java.io.Serializable;
-
import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
import de.adesso.wickedcharts.highcharts.options.color.SimpleColor;
+import java.awt.*;
+import java.io.Serializable;
+
/**
* Defines the configuration of the "legend" option.
*
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/LegendNavigation.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/LegendNavigation.java
index ca074f07..5643e677 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/LegendNavigation.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/LegendNavigation.java
@@ -14,10 +14,10 @@
*/
package de.adesso.wickedcharts.highcharts.options;
-import java.io.Serializable;
-
import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
+import java.io.Serializable;
+
/**
*
* @see http://api.highcharts.com/highcharts#legend.navigation
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Marker.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Marker.java
index 10be17ba..7e08992f 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Marker.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Marker.java
@@ -14,12 +14,12 @@
*/
package de.adesso.wickedcharts.highcharts.options;
-import java.awt.Color;
-import java.io.Serializable;
-
import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
import de.adesso.wickedcharts.highcharts.options.color.SimpleColor;
+import java.awt.*;
+import java.io.Serializable;
+
/**
* Defines the configuration of the "marker" option.
*
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Options.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Options.java
index 46178afe..5643c391 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Options.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Options.java
@@ -15,7 +15,6 @@
package de.adesso.wickedcharts.highcharts.options;
import com.fasterxml.jackson.annotation.JsonIgnore;
-
import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
import de.adesso.wickedcharts.highcharts.options.heatmap.ColorAxis;
import de.adesso.wickedcharts.highcharts.options.series.Series;
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/PlotBand.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/PlotBand.java
index 88cfaa4d..aaf15ebc 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/PlotBand.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/PlotBand.java
@@ -14,14 +14,13 @@
*/
package de.adesso.wickedcharts.highcharts.options;
-import java.awt.Color;
-import java.io.Serializable;
-
import com.fasterxml.jackson.annotation.JsonIgnore;
-
import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
import de.adesso.wickedcharts.highcharts.options.color.SimpleColor;
+import java.awt.*;
+import java.io.Serializable;
+
/**
* Defines a colored band across a grid chart.
*
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/PlotLine.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/PlotLine.java
index d14a1b35..2b9502df 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/PlotLine.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/PlotLine.java
@@ -14,14 +14,13 @@
*/
package de.adesso.wickedcharts.highcharts.options;
-import java.awt.Color;
-import java.io.Serializable;
-
import com.fasterxml.jackson.annotation.JsonIgnore;
-
import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
import de.adesso.wickedcharts.highcharts.options.color.SimpleColor;
+import java.awt.*;
+import java.io.Serializable;
+
/**
* Defines a plot line in a chart.
*
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/PlotOptions.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/PlotOptions.java
index 82cedca1..66fd04fb 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/PlotOptions.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/PlotOptions.java
@@ -14,13 +14,13 @@
*/
package de.adesso.wickedcharts.highcharts.options;
+import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
+import de.adesso.wickedcharts.highcharts.options.color.SimpleColor;
+
import java.awt.*;
import java.io.Serializable;
import java.util.List;
-import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
-import de.adesso.wickedcharts.highcharts.options.color.SimpleColor;
-
/**
* Defines the configuration of the "plotOptions" option.
*
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/PlotOptionsState.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/PlotOptionsState.java
index 5fc2c04f..f5935e99 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/PlotOptionsState.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/PlotOptionsState.java
@@ -14,12 +14,12 @@
*/
package de.adesso.wickedcharts.highcharts.options;
-import java.awt.Color;
-import java.io.Serializable;
-
import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
import de.adesso.wickedcharts.highcharts.options.color.SimpleColor;
+import java.awt.*;
+import java.io.Serializable;
+
/**
* Defines the configuration of the "states" option.
*
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Tooltip.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Tooltip.java
index 6cb08d48..f0e52d60 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Tooltip.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/Tooltip.java
@@ -14,10 +14,10 @@
*/
package de.adesso.wickedcharts.highcharts.options;
-import java.io.Serializable;
-
import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
+import java.io.Serializable;
+
/**
* Defines the configuration of the "tooltip" option.
*
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/button/ButtonTheme.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/button/ButtonTheme.java
index 4aa573c9..b8538a67 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/button/ButtonTheme.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/button/ButtonTheme.java
@@ -14,11 +14,11 @@
*/
package de.adesso.wickedcharts.highcharts.options.button;
-import java.io.Serializable;
-
import de.adesso.wickedcharts.highcharts.options.PlotOptionsStateChoice;
import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
+import java.io.Serializable;
+
/**
* Theme for a button.
*
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/button/Position.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/button/Position.java
index 75479d12..2bf479cb 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/button/Position.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/button/Position.java
@@ -14,11 +14,11 @@
*/
package de.adesso.wickedcharts.highcharts.options.button;
-import java.io.Serializable;
-
import de.adesso.wickedcharts.highcharts.options.HorizontalAlignment;
import de.adesso.wickedcharts.highcharts.options.VerticalAlignment;
+import java.io.Serializable;
+
public class Position implements Serializable {
private Number x;
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/color/ColorReference.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/color/ColorReference.java
index 5c6f1122..11c0e7dc 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/color/ColorReference.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/color/ColorReference.java
@@ -14,12 +14,11 @@
*/
package de.adesso.wickedcharts.highcharts.options.color;
-import java.io.Serializable;
-
import com.fasterxml.jackson.annotation.JsonIgnore;
-
import de.adesso.wickedcharts.highcharts.json.Nullable;
+import java.io.Serializable;
+
/**
* Reference to a color used in a chart.
*
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/color/RadialGradient.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/color/RadialGradient.java
index 95076410..c40896e4 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/color/RadialGradient.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/color/RadialGradient.java
@@ -14,10 +14,10 @@
*/
package de.adesso.wickedcharts.highcharts.options.color;
-import java.io.Serializable;
-
import com.fasterxml.jackson.annotation.JsonIgnore;
+import java.io.Serializable;
+
/**
* {@link RadialGradient} color for chart objects.
*
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/color/SimpleColor.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/color/SimpleColor.java
index 27b41d0d..f7f9e98a 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/color/SimpleColor.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/color/SimpleColor.java
@@ -14,7 +14,7 @@
*/
package de.adesso.wickedcharts.highcharts.options.color;
-import java.awt.Color;
+import java.awt.*;
/**
* A simple {@link ColorReference} defined by a {@link Color} object.
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/drilldown/DrilldownPoint.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/drilldown/DrilldownPoint.java
index 37067e06..a6a5fd85 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/drilldown/DrilldownPoint.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/drilldown/DrilldownPoint.java
@@ -15,7 +15,6 @@
package de.adesso.wickedcharts.highcharts.options.drilldown;
import com.fasterxml.jackson.annotation.JsonIgnore;
-
import de.adesso.wickedcharts.highcharts.options.IProcessableOption;
import de.adesso.wickedcharts.highcharts.options.Options;
import de.adesso.wickedcharts.highcharts.options.series.Point;
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/interaction/SelectionFunction.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/interaction/SelectionFunction.java
index 4889c0ac..edf9d111 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/interaction/SelectionFunction.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/interaction/SelectionFunction.java
@@ -14,11 +14,7 @@
*/
package de.adesso.wickedcharts.highcharts.options.interaction;
-import de.adesso.wickedcharts.highcharts.options.ChartOptions;
-import de.adesso.wickedcharts.highcharts.options.Events;
-import de.adesso.wickedcharts.highcharts.options.Function;
-import de.adesso.wickedcharts.highcharts.options.IProcessableOption;
-import de.adesso.wickedcharts.highcharts.options.Options;
+import de.adesso.wickedcharts.highcharts.options.*;
/**
* This function may be added to a {@link ChartOptions} object via
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/livedata/LiveDataSeries.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/livedata/LiveDataSeries.java
index e3129028..2c8f2c3d 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/livedata/LiveDataSeries.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/livedata/LiveDataSeries.java
@@ -14,16 +14,15 @@
*/
package de.adesso.wickedcharts.highcharts.options.livedata;
-import java.util.HashMap;
-import java.util.Map;
-
import com.fasterxml.jackson.annotation.JsonIgnore;
-
import de.adesso.wickedcharts.highcharts.options.IProcessableOption;
import de.adesso.wickedcharts.highcharts.options.Options;
import de.adesso.wickedcharts.highcharts.options.series.Point;
import de.adesso.wickedcharts.highcharts.options.series.PointSeries;
+import java.util.HashMap;
+import java.util.Map;
+
/**
* This Series class supports regular updating via AJAX.
*
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/processing/FeatureCheckingOptionsProcessor.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/processing/FeatureCheckingOptionsProcessor.java
index b4fbd697..bd1ef900 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/processing/FeatureCheckingOptionsProcessor.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/processing/FeatureCheckingOptionsProcessor.java
@@ -14,11 +14,11 @@
*/
package de.adesso.wickedcharts.highcharts.options.processing;
+import de.adesso.wickedcharts.highcharts.options.Options;
+
import java.util.Arrays;
import java.util.List;
-import de.adesso.wickedcharts.highcharts.options.Options;
-
/**
* This {@link IOptionsProcessor} checks if the {@link Options} object contains
* certain features that may not be supported by all interpreters and throws an
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/processing/OptionsProcessorContext.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/processing/OptionsProcessorContext.java
index 943a69a9..94948ccf 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/processing/OptionsProcessorContext.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/processing/OptionsProcessorContext.java
@@ -14,10 +14,6 @@
*/
package de.adesso.wickedcharts.highcharts.options.processing;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
import de.adesso.wickedcharts.highcharts.options.Global;
import de.adesso.wickedcharts.highcharts.options.IProcessableOption;
import de.adesso.wickedcharts.highcharts.options.Options;
@@ -26,6 +22,10 @@
import de.adesso.wickedcharts.highcharts.options.interaction.SelectionFunction;
import de.adesso.wickedcharts.highcharts.options.livedata.LiveDataSeries;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
/**
* A context object that holds some context variables that may be needed by
* {@link IOptionsProcessor}s.
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/series/Point.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/series/Point.java
index 89452602..74bed0a5 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/series/Point.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/series/Point.java
@@ -14,17 +14,16 @@
*/
package de.adesso.wickedcharts.highcharts.options.series;
-import java.awt.Color;
-import java.io.Serializable;
-
import com.fasterxml.jackson.annotation.JsonInclude;
-
import de.adesso.wickedcharts.highcharts.options.DataLabels;
import de.adesso.wickedcharts.highcharts.options.Events;
import de.adesso.wickedcharts.highcharts.options.Marker;
import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
import de.adesso.wickedcharts.highcharts.options.color.SimpleColor;
+import java.awt.*;
+import java.io.Serializable;
+
/**
* A point in a chart that has a label (or a name) and a color.
*
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/theme/Theme.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/theme/Theme.java
index 2af87520..b7bd9160 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/theme/Theme.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/theme/Theme.java
@@ -14,10 +14,10 @@
*/
package de.adesso.wickedcharts.highcharts.options.theme;
-import java.io.Serializable;
-
import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
+import java.io.Serializable;
+
/**
* Defined options for the a theme.
*
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/theme/ThemeState.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/theme/ThemeState.java
index 2c8f6a4f..3db4e02a 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/theme/ThemeState.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/theme/ThemeState.java
@@ -14,10 +14,10 @@
*/
package de.adesso.wickedcharts.highcharts.options.theme;
-import java.io.Serializable;
-
import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
+import java.io.Serializable;
+
/**
* Defined options for the state of a theme.
*
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/theme/DarkBlueTheme.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/theme/DarkBlueTheme.java
index d8325f19..0d3be4b2 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/theme/DarkBlueTheme.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/theme/DarkBlueTheme.java
@@ -14,23 +14,7 @@
*/
package de.adesso.wickedcharts.highcharts.theme;
-import de.adesso.wickedcharts.highcharts.options.Axis;
-import de.adesso.wickedcharts.highcharts.options.ButtonOptions;
-import de.adesso.wickedcharts.highcharts.options.ChartOptions;
-import de.adesso.wickedcharts.highcharts.options.CreditOptions;
-import de.adesso.wickedcharts.highcharts.options.CssStyle;
-import de.adesso.wickedcharts.highcharts.options.DataLabels;
-import de.adesso.wickedcharts.highcharts.options.DummyOption;
-import de.adesso.wickedcharts.highcharts.options.ExportingButtons;
-import de.adesso.wickedcharts.highcharts.options.ExportingOptions;
-import de.adesso.wickedcharts.highcharts.options.Labels;
-import de.adesso.wickedcharts.highcharts.options.Legend;
-import de.adesso.wickedcharts.highcharts.options.Marker;
-import de.adesso.wickedcharts.highcharts.options.Navigation;
-import de.adesso.wickedcharts.highcharts.options.PlotOptions;
-import de.adesso.wickedcharts.highcharts.options.PlotOptionsChoice;
-import de.adesso.wickedcharts.highcharts.options.Title;
-import de.adesso.wickedcharts.highcharts.options.Tooltip;
+import de.adesso.wickedcharts.highcharts.options.*;
import de.adesso.wickedcharts.highcharts.options.color.HexColor;
import de.adesso.wickedcharts.highcharts.options.color.LinearGradient;
import de.adesso.wickedcharts.highcharts.options.color.RgbaColor;
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/theme/GrayTheme.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/theme/GrayTheme.java
index 4a90b679..f3c02302 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/theme/GrayTheme.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/theme/GrayTheme.java
@@ -14,23 +14,7 @@
*/
package de.adesso.wickedcharts.highcharts.theme;
-import de.adesso.wickedcharts.highcharts.options.Axis;
-import de.adesso.wickedcharts.highcharts.options.ButtonOptions;
-import de.adesso.wickedcharts.highcharts.options.ChartOptions;
-import de.adesso.wickedcharts.highcharts.options.CssStyle;
-import de.adesso.wickedcharts.highcharts.options.DataLabels;
-import de.adesso.wickedcharts.highcharts.options.DummyOption;
-import de.adesso.wickedcharts.highcharts.options.ExportingButtons;
-import de.adesso.wickedcharts.highcharts.options.ExportingOptions;
-import de.adesso.wickedcharts.highcharts.options.Labels;
-import de.adesso.wickedcharts.highcharts.options.Legend;
-import de.adesso.wickedcharts.highcharts.options.Marker;
-import de.adesso.wickedcharts.highcharts.options.MinorTickInterval;
-import de.adesso.wickedcharts.highcharts.options.Navigation;
-import de.adesso.wickedcharts.highcharts.options.PlotOptions;
-import de.adesso.wickedcharts.highcharts.options.PlotOptionsChoice;
-import de.adesso.wickedcharts.highcharts.options.Title;
-import de.adesso.wickedcharts.highcharts.options.Tooltip;
+import de.adesso.wickedcharts.highcharts.options.*;
import de.adesso.wickedcharts.highcharts.options.color.HexColor;
import de.adesso.wickedcharts.highcharts.options.color.LinearGradient;
import de.adesso.wickedcharts.highcharts.options.color.NullColor;
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/theme/GridTheme.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/theme/GridTheme.java
index 8f56f6b7..56131194 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/theme/GridTheme.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/theme/GridTheme.java
@@ -14,13 +14,7 @@
*/
package de.adesso.wickedcharts.highcharts.theme;
-import de.adesso.wickedcharts.highcharts.options.Axis;
-import de.adesso.wickedcharts.highcharts.options.ChartOptions;
-import de.adesso.wickedcharts.highcharts.options.CssStyle;
-import de.adesso.wickedcharts.highcharts.options.Labels;
-import de.adesso.wickedcharts.highcharts.options.Legend;
-import de.adesso.wickedcharts.highcharts.options.MinorTickInterval;
-import de.adesso.wickedcharts.highcharts.options.Title;
+import de.adesso.wickedcharts.highcharts.options.*;
import de.adesso.wickedcharts.highcharts.options.color.HexColor;
import de.adesso.wickedcharts.highcharts.options.color.LinearGradient;
import de.adesso.wickedcharts.highcharts.options.color.RgbaColor;
diff --git a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/theme/SkiesTheme.java b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/theme/SkiesTheme.java
index 6051cc7d..5d559ccc 100644
--- a/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/theme/SkiesTheme.java
+++ b/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/theme/SkiesTheme.java
@@ -14,12 +14,7 @@
*/
package de.adesso.wickedcharts.highcharts.theme;
-import de.adesso.wickedcharts.highcharts.options.Axis;
-import de.adesso.wickedcharts.highcharts.options.ChartOptions;
-import de.adesso.wickedcharts.highcharts.options.CssStyle;
-import de.adesso.wickedcharts.highcharts.options.Labels;
-import de.adesso.wickedcharts.highcharts.options.Legend;
-import de.adesso.wickedcharts.highcharts.options.Title;
+import de.adesso.wickedcharts.highcharts.options.*;
import de.adesso.wickedcharts.highcharts.options.color.HexColor;
import de.adesso.wickedcharts.highcharts.options.color.LinearGradient;
import de.adesso.wickedcharts.highcharts.options.color.RgbaColor;
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/AbstractSerializerTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/AbstractSerializerTest.java
index ebbd8963..d6d6e044 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/AbstractSerializerTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/AbstractSerializerTest.java
@@ -14,13 +14,13 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
+import junit.framework.Assert;
+
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
-import junit.framework.Assert;
-
public class AbstractSerializerTest {
/**
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/BackgroundSerializerTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/BackgroundSerializerTest.java
index a196b71d..4d4c2c64 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/BackgroundSerializerTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/BackgroundSerializerTest.java
@@ -14,11 +14,9 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import org.junit.Test;
-
-import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer;
import de.adesso.wickedcharts.highcharts.options.Background;
import de.adesso.wickedcharts.highcharts.options.color.HexColor;
+import org.junit.Test;
public class BackgroundSerializerTest extends AbstractSerializerTest {
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/CenterSerializerTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/CenterSerializerTest.java
index 4093c1b3..970162f1 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/CenterSerializerTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/CenterSerializerTest.java
@@ -14,12 +14,10 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
+import de.adesso.wickedcharts.highcharts.options.Center;
import org.junit.Assert;
import org.junit.Test;
-import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer;
-import de.adesso.wickedcharts.highcharts.options.Center;
-
public class CenterSerializerTest {
@Test
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/CoordinateSerializerTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/CoordinateSerializerTest.java
index 90010dfd..d94afd20 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/CoordinateSerializerTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/CoordinateSerializerTest.java
@@ -14,9 +14,7 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer;
import de.adesso.wickedcharts.highcharts.options.series.Coordinate;
-
import org.junit.Assert;
import org.junit.Test;
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/CrosshairSerializerTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/CrosshairSerializerTest.java
index 88c1770e..da496a23 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/CrosshairSerializerTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/CrosshairSerializerTest.java
@@ -14,12 +14,10 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import org.junit.Assert;
-import org.junit.Test;
-
-import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer;
import de.adesso.wickedcharts.highcharts.options.Crosshair;
import de.adesso.wickedcharts.highcharts.options.GridLineDashStyle;
+import org.junit.Assert;
+import org.junit.Test;
public class CrosshairSerializerTest extends AbstractSerializerTest {
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/CssStyleSerializerTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/CssStyleSerializerTest.java
index 7180b350..7f2308d0 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/CssStyleSerializerTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/CssStyleSerializerTest.java
@@ -14,11 +14,8 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import org.junit.Assert;
-import org.junit.Test;
-
-import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer;
import de.adesso.wickedcharts.highcharts.options.CssStyle;
+import org.junit.Test;
/**
*
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/CustomCoordinatesSeriesTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/CustomCoordinatesSeriesTest.java
index 12676c7a..d3b1b783 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/CustomCoordinatesSeriesTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/CustomCoordinatesSeriesTest.java
@@ -14,11 +14,9 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import org.junit.Test;
-
-import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer;
import de.adesso.wickedcharts.highcharts.options.series.Coordinate;
import de.adesso.wickedcharts.highcharts.options.series.CustomCoordinatesSeries;
+import org.junit.Test;
/**
*
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/DateTimeLabelFormatTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/DateTimeLabelFormatTest.java
index e8a885ef..4ce159bb 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/DateTimeLabelFormatTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/DateTimeLabelFormatTest.java
@@ -14,12 +14,10 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import org.junit.Assert;
-import org.junit.Test;
-
-import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer;
import de.adesso.wickedcharts.highcharts.options.DateTimeLabelFormat;
import de.adesso.wickedcharts.highcharts.options.DateTimeLabelFormat.DateTimeProperties;
+import org.junit.Assert;
+import org.junit.Test;
/**
*
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/FunctionSerializerTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/FunctionSerializerTest.java
index 86c75adf..9e507dab 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/FunctionSerializerTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/FunctionSerializerTest.java
@@ -14,10 +14,8 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import org.junit.Test;
-
-import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer;
import de.adesso.wickedcharts.highcharts.options.Function;
+import org.junit.Test;
/**
*
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/HexColorReferenceSerializerTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/HexColorReferenceSerializerTest.java
index 93e0db93..d7a3a9a4 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/HexColorReferenceSerializerTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/HexColorReferenceSerializerTest.java
@@ -14,12 +14,10 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import org.junit.Assert;
-import org.junit.Test;
-
-import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer;
import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
import de.adesso.wickedcharts.highcharts.options.color.HexColor;
+import org.junit.Assert;
+import org.junit.Test;
public class HexColorReferenceSerializerTest {
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/HighchartsColorReferenceSerializerTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/HighchartsColorReferenceSerializerTest.java
index 3ca65801..b00f1732 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/HighchartsColorReferenceSerializerTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/HighchartsColorReferenceSerializerTest.java
@@ -14,12 +14,10 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import org.junit.Assert;
-import org.junit.Test;
-
-import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer;
import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
import de.adesso.wickedcharts.highcharts.options.color.HighchartsColor;
+import org.junit.Assert;
+import org.junit.Test;
public class HighchartsColorReferenceSerializerTest {
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/JsonIgnoreTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/JsonIgnoreTest.java
index 1f73d138..5f152f89 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/JsonIgnoreTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/JsonIgnoreTest.java
@@ -14,16 +14,12 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import junit.framework.Assert;
-
-import org.junit.Test;
-
import com.fasterxml.jackson.annotation.JsonIgnore;
-
-import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer;
import de.adesso.wickedcharts.highcharts.options.ChartOptions;
import de.adesso.wickedcharts.highcharts.options.Options;
import de.adesso.wickedcharts.highcharts.options.SeriesType;
+import junit.framework.Assert;
+import org.junit.Test;
public class JsonIgnoreTest {
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/JsonRendererLocaleTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/JsonRendererLocaleTest.java
index e7198272..18033702 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/JsonRendererLocaleTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/JsonRendererLocaleTest.java
@@ -1,6 +1,5 @@
package de.adesso.wickedcharts.highcharts.jackson;
-import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer;
import de.adesso.wickedcharts.highcharts.options.SeriesType;
import junit.framework.Assert;
import org.junit.Test;
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/LinearGradientColorReferenceSerializerTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/LinearGradientColorReferenceSerializerTest.java
index 3bffe538..a3368964 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/LinearGradientColorReferenceSerializerTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/LinearGradientColorReferenceSerializerTest.java
@@ -14,17 +14,10 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import java.awt.Color;
-
+import de.adesso.wickedcharts.highcharts.options.color.*;
import org.junit.Test;
-import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer;
-import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
-import de.adesso.wickedcharts.highcharts.options.color.Gradient;
-import de.adesso.wickedcharts.highcharts.options.color.HexColor;
-import de.adesso.wickedcharts.highcharts.options.color.HighchartsColor;
-import de.adesso.wickedcharts.highcharts.options.color.LinearGradient;
-import de.adesso.wickedcharts.highcharts.options.color.SimpleColor;
+import java.awt.*;
public class LinearGradientColorReferenceSerializerTest extends
AbstractSerializerTest {
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/LowercaseEnumSerializerTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/LowercaseEnumSerializerTest.java
index a1dae091..d41da79a 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/LowercaseEnumSerializerTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/LowercaseEnumSerializerTest.java
@@ -14,12 +14,10 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
+import de.adesso.wickedcharts.highcharts.options.HorizontalAlignment;
import org.junit.Assert;
import org.junit.Test;
-import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer;
-import de.adesso.wickedcharts.highcharts.options.HorizontalAlignment;
-
public class LowercaseEnumSerializerTest {
@Test
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/NullColorReferenceSerializerTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/NullColorReferenceSerializerTest.java
index 60516ccc..c497b304 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/NullColorReferenceSerializerTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/NullColorReferenceSerializerTest.java
@@ -14,12 +14,10 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import org.junit.Assert;
-import org.junit.Test;
-
-import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer;
import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
import de.adesso.wickedcharts.highcharts.options.color.NullColor;
+import org.junit.Assert;
+import org.junit.Test;
public class NullColorReferenceSerializerTest {
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/NullPointSerializerTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/NullPointSerializerTest.java
index 606d7954..cbc09bd1 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/NullPointSerializerTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/NullPointSerializerTest.java
@@ -1,8 +1,6 @@
package de.adesso.wickedcharts.highcharts.jackson;
-import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer;
import de.adesso.wickedcharts.highcharts.options.series.Point;
-
import org.junit.Test;
public class NullPointSerializerTest extends AbstractSerializerTest {
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/NullSerializerTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/NullSerializerTest.java
index b38001cd..6b2b990d 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/NullSerializerTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/NullSerializerTest.java
@@ -14,14 +14,11 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import junit.framework.Assert;
-
-import org.junit.Test;
-
-import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer;
import de.adesso.wickedcharts.highcharts.options.ChartOptions;
import de.adesso.wickedcharts.highcharts.options.Options;
import de.adesso.wickedcharts.highcharts.options.SeriesType;
+import junit.framework.Assert;
+import org.junit.Test;
public class NullSerializerTest {
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/PixelOrPercentSerializerTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/PixelOrPercentSerializerTest.java
index d648c8aa..29924c64 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/PixelOrPercentSerializerTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/PixelOrPercentSerializerTest.java
@@ -14,12 +14,10 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
+import de.adesso.wickedcharts.highcharts.options.PixelOrPercent;
import org.junit.Assert;
import org.junit.Test;
-import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer;
-import de.adesso.wickedcharts.highcharts.options.PixelOrPercent;
-
public class PixelOrPercentSerializerTest {
@Test
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/RangeCoordinateSerializerTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/RangeCoordinateSerializerTest.java
index 3cc8cbd4..002321ec 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/RangeCoordinateSerializerTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/RangeCoordinateSerializerTest.java
@@ -14,10 +14,8 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import org.junit.Test;
-
-import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer;
import de.adesso.wickedcharts.highcharts.options.series.RangeCoordinate;
+import org.junit.Test;
public class RangeCoordinateSerializerTest extends AbstractSerializerTest {
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/RgbaColorReferenceSerializerTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/RgbaColorReferenceSerializerTest.java
index 2b584e4b..e659faa9 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/RgbaColorReferenceSerializerTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/RgbaColorReferenceSerializerTest.java
@@ -14,12 +14,10 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import org.junit.Assert;
-import org.junit.Test;
-
-import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer;
import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
import de.adesso.wickedcharts.highcharts.options.color.RgbaColor;
+import org.junit.Assert;
+import org.junit.Test;
public class RgbaColorReferenceSerializerTest {
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/SimpleColorReferenceSerializerTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/SimpleColorReferenceSerializerTest.java
index c655b416..5ca4298c 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/SimpleColorReferenceSerializerTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/SimpleColorReferenceSerializerTest.java
@@ -14,14 +14,12 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import java.awt.Color;
-
+import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
+import de.adesso.wickedcharts.highcharts.options.color.SimpleColor;
import org.junit.Assert;
import org.junit.Test;
-import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer;
-import de.adesso.wickedcharts.highcharts.options.color.ColorReference;
-import de.adesso.wickedcharts.highcharts.options.color.SimpleColor;
+import java.awt.*;
public class SimpleColorReferenceSerializerTest {
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/SymbolSerializerTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/SymbolSerializerTest.java
index 5ac98791..a2860940 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/SymbolSerializerTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/SymbolSerializerTest.java
@@ -14,12 +14,10 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import org.junit.Assert;
-import org.junit.Test;
-
-import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer;
import de.adesso.wickedcharts.highcharts.options.Symbol;
import de.adesso.wickedcharts.highcharts.options.Symbol.PredefinedSymbol;
+import org.junit.Assert;
+import org.junit.Test;
public class SymbolSerializerTest {
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/ThreeDCoordinateSerializerTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/ThreeDCoordinateSerializerTest.java
index 17eb74de..11c11aa4 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/ThreeDCoordinateSerializerTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/jackson/ThreeDCoordinateSerializerTest.java
@@ -14,9 +14,7 @@
*/
package de.adesso.wickedcharts.highcharts.jackson;
-import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer;
import de.adesso.wickedcharts.highcharts.options.series.ThreeDCoordinate;
-
import org.junit.Assert;
import org.junit.Test;
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/options/BuilderPatternTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/options/BuilderPatternTest.java
index 73b6d347..ba55b326 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/options/BuilderPatternTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/options/BuilderPatternTest.java
@@ -1,12 +1,12 @@
package de.adesso.wickedcharts.highcharts.options;
+import org.junit.Assert;
+import org.junit.Test;
+
import java.io.IOException;
import java.lang.reflect.Method;
import java.util.Set;
-import org.junit.Assert;
-import org.junit.Test;
-
/**
* This test ensures that all classes in the options package implement the
* builder pattern. For each class all setter methods are checked. If a setter
diff --git a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/options/CssPropertyNameSanitizerTest.java b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/options/CssPropertyNameSanitizerTest.java
index 618648b1..1a1ea879 100644
--- a/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/options/CssPropertyNameSanitizerTest.java
+++ b/highcharts-wrapper/src/test/java/de/adesso/wickedcharts/highcharts/options/CssPropertyNameSanitizerTest.java
@@ -1,11 +1,8 @@
package de.adesso.wickedcharts.highcharts.options;
import junit.framework.Assert;
-
import org.junit.Test;
-import de.adesso.wickedcharts.highcharts.options.CssStyle;
-
public class CssPropertyNameSanitizerTest {
@Test
diff --git a/jsf/wicked-charts-jsf21/src/main/java/de/adesso/wickedcharts/jsf21/UIChart.java b/jsf/wicked-charts-jsf21/src/main/java/de/adesso/wickedcharts/jsf21/UIChart.java
index 04490260..18ccf285 100644
--- a/jsf/wicked-charts-jsf21/src/main/java/de/adesso/wickedcharts/jsf21/UIChart.java
+++ b/jsf/wicked-charts-jsf21/src/main/java/de/adesso/wickedcharts/jsf21/UIChart.java
@@ -14,14 +14,6 @@
*/
package de.adesso.wickedcharts.jsf21;
-import java.io.IOException;
-import java.text.MessageFormat;
-
-import javax.faces.component.FacesComponent;
-import javax.faces.component.UIOutput;
-import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-
import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer;
import de.adesso.wickedcharts.highcharts.options.Options;
import de.adesso.wickedcharts.highcharts.options.processing.Feature;
@@ -31,6 +23,13 @@
import de.adesso.wickedcharts.highcharts.theme.Theme;
import de.adesso.wickedcharts.jsf21.highcharts.JSF21JsonRendererFactory;
+import javax.faces.component.FacesComponent;
+import javax.faces.component.UIOutput;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import java.io.IOException;
+import java.text.MessageFormat;
+
/**
*
* @author Matthias Balke (matthias.balke@gmail.com)
diff --git a/settings.gradle b/settings.gradle
index 0e7239fb..9db3b9c4 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -4,4 +4,5 @@ include 'jsf:wicked-charts-jsf21'
include 'wicket:wicked-charts-wicket14'
include 'wicket:wicked-charts-wicket15'
include 'wicket:wicked-charts-wicket6'
-include 'wicket:wicked-charts-wicket7'
\ No newline at end of file
+include 'wicket:wicked-charts-wicket7'
+include 'wicket:wicked-charts-wicket8'
\ No newline at end of file
diff --git a/showcase/build.gradle b/showcase/build.gradle
index 38c5388d..6c57891c 100644
--- a/showcase/build.gradle
+++ b/showcase/build.gradle
@@ -35,7 +35,7 @@ dependencies {
}
// run gradle with "-Dsnapshot=true" to automatically append "-SNAPSHOT" to the version
-version = '3.0.0' + (Boolean.valueOf(System.getProperty("snapshot")) ? "-SNAPSHOT" : "")
+version = '3.1.0' + (Boolean.valueOf(System.getProperty("snapshot")) ? "-SNAPSHOT" : "")
sourceCompatibility = 1.8
ext {
@@ -98,7 +98,7 @@ publishing {
}
groupId 'de.adesso.wicked-charts'
artifactId 'wicked-charts-showcase-options'
- version '3.0.0'
+ version '3.1.0'
pom.withXml {
def root = asNode()
root.appendNode('description', 'Beautiful Charts for Java-based Web Applications')
diff --git a/showcase/gradle.properties b/showcase/gradle.properties
index afe04c52..78be58da 100644
--- a/showcase/gradle.properties
+++ b/showcase/gradle.properties
@@ -1,8 +1,4 @@
spring_boot_version = 1.5.2.RELEASE
springloaded_version = 1.2.5.RELEASE
spring_version = 4.3.6.RELEASE
-hibernate.version=5.0.2.Final
-wicket_spring_version=7.1.0
-wicketstuff_lazymodel_version=7.1.0
-wicketcharts_version = 3.0.0
-slf4j_version = 1.7.21
\ No newline at end of file
+wicketcharts_version = 3.1.0
\ No newline at end of file
diff --git a/showcase/gradle/wrapper/gradle-wrapper.properties b/showcase/gradle/wrapper/gradle-wrapper.properties
index ca004e74..a18a9e65 100644
--- a/showcase/gradle/wrapper/gradle-wrapper.properties
+++ b/showcase/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-all.zip
\ No newline at end of file
diff --git a/showcase/settings.gradle b/showcase/settings.gradle
index 30522abe..1b477c1a 100644
--- a/showcase/settings.gradle
+++ b/showcase/settings.gradle
@@ -1,3 +1,4 @@
+include 'wicked-charts-showcase-wicket8'
include 'wicked-charts-showcase-wicket7'
include 'wicked-charts-showcase-wicket6'
include 'wicked-charts-showcase-wicket15'
diff --git a/showcase/wicked-charts-showcase-jsf21/build.gradle b/showcase/wicked-charts-showcase-jsf21/build.gradle
index c0d23a5c..c2bd083c 100644
--- a/showcase/wicked-charts-showcase-jsf21/build.gradle
+++ b/showcase/wicked-charts-showcase-jsf21/build.gradle
@@ -1,5 +1,5 @@
dependencies {
- compile 'de.adesso.wicked-charts:wicked-charts-jsf21:3.0.0'
+ compile group: 'de.adesso.wicked-charts', name: 'wicked-charts-jsf21', version: "${wicketcharts_version}"
compile project(':wicked-charts-showcase-options')
compile 'org.slf4j:slf4j-log4j12:1.6.2'
compile 'log4j:log4j:1.2.17'
diff --git a/showcase/wicked-charts-showcase-jsf21/src/main/java/de/adesso/wickedcharts/showcase/jsf/bean/PropertiesLoader.java b/showcase/wicked-charts-showcase-jsf21/src/main/java/de/adesso/wickedcharts/showcase/jsf/bean/PropertiesLoader.java
index 7a2a140b..47f0ba88 100644
--- a/showcase/wicked-charts-showcase-jsf21/src/main/java/de/adesso/wickedcharts/showcase/jsf/bean/PropertiesLoader.java
+++ b/showcase/wicked-charts-showcase-jsf21/src/main/java/de/adesso/wickedcharts/showcase/jsf/bean/PropertiesLoader.java
@@ -14,13 +14,12 @@
*/
package de.adesso.wickedcharts.showcase.jsf.bean;
+import javax.faces.bean.ApplicationScoped;
+import javax.faces.bean.ManagedBean;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
-import javax.faces.bean.ApplicationScoped;
-import javax.faces.bean.ManagedBean;
-
/**
* Load maven properties from filtered maven resources file.
*
diff --git a/showcase/wicked-charts-showcase-jsf21/src/main/java/de/adesso/wickedcharts/showcase/jsf/bean/Showcase.java b/showcase/wicked-charts-showcase-jsf21/src/main/java/de/adesso/wickedcharts/showcase/jsf/bean/Showcase.java
index 766c1a53..a49891f2 100644
--- a/showcase/wicked-charts-showcase-jsf21/src/main/java/de/adesso/wickedcharts/showcase/jsf/bean/Showcase.java
+++ b/showcase/wicked-charts-showcase-jsf21/src/main/java/de/adesso/wickedcharts/showcase/jsf/bean/Showcase.java
@@ -14,17 +14,13 @@
*/
package de.adesso.wickedcharts.showcase.jsf.bean;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.SessionScoped;
-
import de.adesso.wickedcharts.highcharts.options.Options;
-import de.adesso.wickedcharts.highcharts.theme.DarkBlueTheme;
-import de.adesso.wickedcharts.highcharts.theme.GrayTheme;
-import de.adesso.wickedcharts.highcharts.theme.GridTheme;
-import de.adesso.wickedcharts.highcharts.theme.SkiesTheme;
-import de.adesso.wickedcharts.highcharts.theme.Theme;
+import de.adesso.wickedcharts.highcharts.theme.*;
import de.adesso.wickedcharts.showcase.options.*;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+
/**
*
* @author Matthias Balke (matthias.balke@gmail.com)
diff --git a/showcase/wicked-charts-showcase-jsf21/src/main/webapp/WEB-INF/web.xml b/showcase/wicked-charts-showcase-jsf21/src/main/webapp/WEB-INF/web.xml
index 3f30f5f5..9d954ed4 100644
--- a/showcase/wicked-charts-showcase-jsf21/src/main/webapp/WEB-INF/web.xml
+++ b/showcase/wicked-charts-showcase-jsf21/src/main/webapp/WEB-INF/web.xml
@@ -18,10 +18,10 @@
* under the License.
-->
+ id="wicked-charts-showcase-jsf21" version="2.5">
wicked-charts-showcase-jsf21
diff --git a/showcase/wicked-charts-showcase-jsf21/src/main/webapp/index.xhtml b/showcase/wicked-charts-showcase-jsf21/src/main/webapp/index.xhtml
index 68afb351..163be762 100644
--- a/showcase/wicked-charts-showcase-jsf21/src/main/webapp/index.xhtml
+++ b/showcase/wicked-charts-showcase-jsf21/src/main/webapp/index.xhtml
@@ -1,8 +1,7 @@
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:wc="http://googlecode.com/wickedcharts">
Wicked Charts :: Showcase :: JSF 2.1
diff --git a/showcase/wicked-charts-showcase-options/build.gradle b/showcase/wicked-charts-showcase-options/build.gradle
index 23d9cc1c..45351ca2 100644
--- a/showcase/wicked-charts-showcase-options/build.gradle
+++ b/showcase/wicked-charts-showcase-options/build.gradle
@@ -1,5 +1,5 @@
dependencies {
- compile 'de.adesso.wicked-charts:highcharts-wrapper:3.0.0'
+ compile group: 'de.adesso.wicked-charts', name: 'highcharts-wrapper', version: "${wicketcharts_version}"
testCompile 'junit:junit:4.12'
compile 'junit:junit:4.12'
}
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/AngularGaugeOptions.java b/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/AngularGaugeOptions.java
index 737971d4..0614b523 100644
--- a/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/AngularGaugeOptions.java
+++ b/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/AngularGaugeOptions.java
@@ -1,17 +1,6 @@
package de.adesso.wickedcharts.showcase.options;
-import de.adesso.wickedcharts.highcharts.options.Axis;
-import de.adesso.wickedcharts.highcharts.options.Background;
-import de.adesso.wickedcharts.highcharts.options.ChartOptions;
-import de.adesso.wickedcharts.highcharts.options.Labels;
-import de.adesso.wickedcharts.highcharts.options.MinorTickInterval;
-import de.adesso.wickedcharts.highcharts.options.Pane;
-import de.adesso.wickedcharts.highcharts.options.PixelOrPercent;
-import de.adesso.wickedcharts.highcharts.options.PlotBand;
-import de.adesso.wickedcharts.highcharts.options.SeriesType;
-import de.adesso.wickedcharts.highcharts.options.TickPosition;
-import de.adesso.wickedcharts.highcharts.options.Title;
-import de.adesso.wickedcharts.highcharts.options.Tooltip;
+import de.adesso.wickedcharts.highcharts.options.*;
import de.adesso.wickedcharts.highcharts.options.PixelOrPercent.Unit;
import de.adesso.wickedcharts.highcharts.options.color.HexColor;
import de.adesso.wickedcharts.highcharts.options.color.LinearGradient;
diff --git a/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/AreaInvertedAxisOptions.java b/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/AreaInvertedAxisOptions.java
index f3e67214..d146b7ea 100644
--- a/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/AreaInvertedAxisOptions.java
+++ b/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/AreaInvertedAxisOptions.java
@@ -14,25 +14,13 @@
*/
package de.adesso.wickedcharts.showcase.options;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.highcharts.options.Axis;
-import de.adesso.wickedcharts.highcharts.options.ChartOptions;
-import de.adesso.wickedcharts.highcharts.options.CssStyle;
-import de.adesso.wickedcharts.highcharts.options.Function;
-import de.adesso.wickedcharts.highcharts.options.HorizontalAlignment;
-import de.adesso.wickedcharts.highcharts.options.Labels;
-import de.adesso.wickedcharts.highcharts.options.Legend;
-import de.adesso.wickedcharts.highcharts.options.LegendLayout;
-import de.adesso.wickedcharts.highcharts.options.PlotOptions;
-import de.adesso.wickedcharts.highcharts.options.PlotOptionsChoice;
-import de.adesso.wickedcharts.highcharts.options.SeriesType;
-import de.adesso.wickedcharts.highcharts.options.Title;
-import de.adesso.wickedcharts.highcharts.options.Tooltip;
+import de.adesso.wickedcharts.highcharts.options.*;
import de.adesso.wickedcharts.highcharts.options.color.HexColor;
import de.adesso.wickedcharts.highcharts.options.series.SimpleSeries;
import de.adesso.wickedcharts.showcase.options.base.ShowcaseOptions;
+import java.util.Arrays;
+
public class AreaInvertedAxisOptions extends ShowcaseOptions {
private static final long serialVersionUID = 1L;
diff --git a/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/AreaMissingOptions.java b/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/AreaMissingOptions.java
index b29d10d1..624c19ec 100644
--- a/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/AreaMissingOptions.java
+++ b/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/AreaMissingOptions.java
@@ -14,26 +14,13 @@
*/
package de.adesso.wickedcharts.showcase.options;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.highcharts.options.Axis;
-import de.adesso.wickedcharts.highcharts.options.ChartOptions;
-import de.adesso.wickedcharts.highcharts.options.CreditOptions;
-import de.adesso.wickedcharts.highcharts.options.Function;
-import de.adesso.wickedcharts.highcharts.options.HorizontalAlignment;
-import de.adesso.wickedcharts.highcharts.options.Labels;
-import de.adesso.wickedcharts.highcharts.options.Legend;
-import de.adesso.wickedcharts.highcharts.options.LegendLayout;
-import de.adesso.wickedcharts.highcharts.options.PlotOptions;
-import de.adesso.wickedcharts.highcharts.options.PlotOptionsChoice;
-import de.adesso.wickedcharts.highcharts.options.SeriesType;
-import de.adesso.wickedcharts.highcharts.options.Title;
-import de.adesso.wickedcharts.highcharts.options.Tooltip;
-import de.adesso.wickedcharts.highcharts.options.VerticalAlignment;
+import de.adesso.wickedcharts.highcharts.options.*;
import de.adesso.wickedcharts.highcharts.options.color.HexColor;
import de.adesso.wickedcharts.highcharts.options.series.SimpleSeries;
import de.adesso.wickedcharts.showcase.options.base.ShowcaseOptions;
+import java.util.Arrays;
+
public class AreaMissingOptions extends ShowcaseOptions {
private static final long serialVersionUID = 1L;
diff --git a/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/AreaRangeOptions.java b/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/AreaRangeOptions.java
index 5480bca4..24040c91 100644
--- a/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/AreaRangeOptions.java
+++ b/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/AreaRangeOptions.java
@@ -1,14 +1,6 @@
package de.adesso.wickedcharts.showcase.options;
-import de.adesso.wickedcharts.highcharts.options.Axis;
-import de.adesso.wickedcharts.highcharts.options.AxisType;
-import de.adesso.wickedcharts.highcharts.options.ChartOptions;
-import de.adesso.wickedcharts.highcharts.options.Crosshair;
-import de.adesso.wickedcharts.highcharts.options.Legend;
-import de.adesso.wickedcharts.highcharts.options.SeriesType;
-import de.adesso.wickedcharts.highcharts.options.Title;
-import de.adesso.wickedcharts.highcharts.options.Tooltip;
-import de.adesso.wickedcharts.highcharts.options.ZoomType;
+import de.adesso.wickedcharts.highcharts.options.*;
import de.adesso.wickedcharts.highcharts.options.series.RangeCoordinate;
import de.adesso.wickedcharts.highcharts.options.series.RangeSeries;
import de.adesso.wickedcharts.showcase.options.base.ShowcaseOptions;
diff --git a/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/AreaSplineOptions.java b/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/AreaSplineOptions.java
index 3fea27ae..159337b8 100644
--- a/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/AreaSplineOptions.java
+++ b/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/AreaSplineOptions.java
@@ -14,28 +14,15 @@
*/
package de.adesso.wickedcharts.showcase.options;
-import java.util.Arrays;
-import java.util.Collections;
-
-import de.adesso.wickedcharts.highcharts.options.Axis;
-import de.adesso.wickedcharts.highcharts.options.ChartOptions;
-import de.adesso.wickedcharts.highcharts.options.CreditOptions;
-import de.adesso.wickedcharts.highcharts.options.Function;
-import de.adesso.wickedcharts.highcharts.options.HorizontalAlignment;
-import de.adesso.wickedcharts.highcharts.options.Legend;
-import de.adesso.wickedcharts.highcharts.options.LegendLayout;
-import de.adesso.wickedcharts.highcharts.options.PlotBand;
-import de.adesso.wickedcharts.highcharts.options.PlotOptions;
-import de.adesso.wickedcharts.highcharts.options.PlotOptionsChoice;
-import de.adesso.wickedcharts.highcharts.options.SeriesType;
-import de.adesso.wickedcharts.highcharts.options.Title;
-import de.adesso.wickedcharts.highcharts.options.Tooltip;
-import de.adesso.wickedcharts.highcharts.options.VerticalAlignment;
+import de.adesso.wickedcharts.highcharts.options.*;
import de.adesso.wickedcharts.highcharts.options.color.HexColor;
import de.adesso.wickedcharts.highcharts.options.color.RgbaColor;
import de.adesso.wickedcharts.highcharts.options.series.SimpleSeries;
import de.adesso.wickedcharts.showcase.options.base.ShowcaseOptions;
+import java.util.Arrays;
+import java.util.Collections;
+
public class AreaSplineOptions extends ShowcaseOptions {
private static final long serialVersionUID = 1L;
diff --git a/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/AreaWithNegativeValuesOptions.java b/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/AreaWithNegativeValuesOptions.java
index a0db6de2..3665c421 100644
--- a/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/AreaWithNegativeValuesOptions.java
+++ b/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/AreaWithNegativeValuesOptions.java
@@ -14,19 +14,13 @@
*/
package de.adesso.wickedcharts.showcase.options;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.highcharts.options.Axis;
-import de.adesso.wickedcharts.highcharts.options.ChartOptions;
-import de.adesso.wickedcharts.highcharts.options.CreditOptions;
-import de.adesso.wickedcharts.highcharts.options.Function;
-import de.adesso.wickedcharts.highcharts.options.SeriesType;
-import de.adesso.wickedcharts.highcharts.options.Title;
-import de.adesso.wickedcharts.highcharts.options.Tooltip;
+import de.adesso.wickedcharts.highcharts.options.*;
import de.adesso.wickedcharts.highcharts.options.series.Series;
import de.adesso.wickedcharts.highcharts.options.series.SimpleSeries;
import de.adesso.wickedcharts.showcase.options.base.ShowcaseOptions;
+import java.util.Arrays;
+
/**
* Demo of the same area chart with negative values displayed in the Highcharts
* Demo at http://www.highcharts.com/demo
diff --git a/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/DualAxesOptions.java b/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/DualAxesOptions.java
index 87fec8db..ac29f20e 100644
--- a/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/DualAxesOptions.java
+++ b/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/DualAxesOptions.java
@@ -1,18 +1,6 @@
package de.adesso.wickedcharts.showcase.options;
-import de.adesso.wickedcharts.highcharts.options.Axis;
-import de.adesso.wickedcharts.highcharts.options.ChartOptions;
-import de.adesso.wickedcharts.highcharts.options.CssStyle;
-import de.adesso.wickedcharts.highcharts.options.Function;
-import de.adesso.wickedcharts.highcharts.options.HorizontalAlignment;
-import de.adesso.wickedcharts.highcharts.options.Labels;
-import de.adesso.wickedcharts.highcharts.options.Legend;
-import de.adesso.wickedcharts.highcharts.options.LegendLayout;
-import de.adesso.wickedcharts.highcharts.options.SeriesType;
-import de.adesso.wickedcharts.highcharts.options.Title;
-import de.adesso.wickedcharts.highcharts.options.Tooltip;
-import de.adesso.wickedcharts.highcharts.options.VerticalAlignment;
-import de.adesso.wickedcharts.highcharts.options.ZoomType;
+import de.adesso.wickedcharts.highcharts.options.*;
import de.adesso.wickedcharts.highcharts.options.color.HexColor;
import de.adesso.wickedcharts.highcharts.options.series.SimpleSeries;
import de.adesso.wickedcharts.showcase.options.base.ShowcaseOptions;
diff --git a/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/InteractionOptions.java b/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/InteractionOptions.java
index 7f9ceb37..be22a523 100644
--- a/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/InteractionOptions.java
+++ b/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/InteractionOptions.java
@@ -14,25 +14,7 @@
*/
package de.adesso.wickedcharts.showcase.options;
-import de.adesso.wickedcharts.highcharts.options.Axis;
-import de.adesso.wickedcharts.highcharts.options.ChartOptions;
-import de.adesso.wickedcharts.highcharts.options.CreditOptions;
-import de.adesso.wickedcharts.highcharts.options.Cursor;
-import de.adesso.wickedcharts.highcharts.options.DataLabels;
-import de.adesso.wickedcharts.highcharts.options.Events;
-import de.adesso.wickedcharts.highcharts.options.Function;
-import de.adesso.wickedcharts.highcharts.options.Global;
-import de.adesso.wickedcharts.highcharts.options.HorizontalAlignment;
-import de.adesso.wickedcharts.highcharts.options.Labels;
-import de.adesso.wickedcharts.highcharts.options.Legend;
-import de.adesso.wickedcharts.highcharts.options.LegendLayout;
-import de.adesso.wickedcharts.highcharts.options.Overflow;
-import de.adesso.wickedcharts.highcharts.options.PlotOptions;
-import de.adesso.wickedcharts.highcharts.options.PlotOptionsChoice;
-import de.adesso.wickedcharts.highcharts.options.SeriesType;
-import de.adesso.wickedcharts.highcharts.options.Title;
-import de.adesso.wickedcharts.highcharts.options.Tooltip;
-import de.adesso.wickedcharts.highcharts.options.VerticalAlignment;
+import de.adesso.wickedcharts.highcharts.options.*;
import de.adesso.wickedcharts.highcharts.options.color.HexColor;
import de.adesso.wickedcharts.highcharts.options.interaction.InteractionEvent;
import de.adesso.wickedcharts.highcharts.options.interaction.InteractionFunction;
diff --git a/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/LineWithDataLabelsOptions.java b/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/LineWithDataLabelsOptions.java
index 0f5d8ce9..ba0b8be1 100644
--- a/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/LineWithDataLabelsOptions.java
+++ b/showcase/wicked-charts-showcase-options/src/main/java/de/adesso/wickedcharts/showcase/options/LineWithDataLabelsOptions.java
@@ -14,20 +14,13 @@
*/
package de.adesso.wickedcharts.showcase.options;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.highcharts.options.Axis;
-import de.adesso.wickedcharts.highcharts.options.ChartOptions;
-import de.adesso.wickedcharts.highcharts.options.DataLabels;
-import de.adesso.wickedcharts.highcharts.options.PlotOptions;
-import de.adesso.wickedcharts.highcharts.options.PlotOptionsChoice;
-import de.adesso.wickedcharts.highcharts.options.SeriesType;
-import de.adesso.wickedcharts.highcharts.options.Title;
-import de.adesso.wickedcharts.highcharts.options.Tooltip;
+import de.adesso.wickedcharts.highcharts.options.*;
import de.adesso.wickedcharts.highcharts.options.series.Series;
import de.adesso.wickedcharts.highcharts.options.series.SimpleSeries;
import de.adesso.wickedcharts.showcase.options.base.ShowcaseOptions;
+import java.util.Arrays;
+
/**
* Demo of the same chart with data labels displayed in the Highcharts Demo at
*
+
+
+
+
panel
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.java
new file mode 100644
index 00000000..6323d09e
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.java
@@ -0,0 +1,26 @@
+package de.adesso.wickedcharts.showcase;
+
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import de.adesso.wickedcharts.wicket14.chartjs.Chart;
+import org.apache.wicket.markup.html.panel.Fragment;
+import org.apache.wicket.markup.html.panel.Panel;
+
+/**
+ * Wicket-component that adds the chart configuration and markup to the page.
+ */
+public class ChartComponent extends Panel {
+
+ public ChartComponent(Chart chart)
+ {
+ super( "chart" );
+ add(chart);
+ Fragment optionalMarkup = new Fragment("optionalMarkup","defaultTooltip",this);
+ chart.getParent().add(optionalMarkup);
+ ((ShowcaseConfiguration)chart.getChartConfiguration()).modfiyIndividualMarkup((Fragment)chart.getParent().get("optionalMarkup"));
+ (chart.getParent().get("optionalMarkup")).detach();
+ optionalMarkup = (Fragment) chart.getParent().get("optionalMarkup");
+ this.add(optionalMarkup);
+ optionalMarkup.setOutputMarkupId(true);
+ add(optionalMarkup);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.html b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.html
new file mode 100644
index 00000000..4b9db1dd
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.html
@@ -0,0 +1,6 @@
+
+
+
+ Here comes the code
+
+
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.java
new file mode 100644
index 00000000..60cecdbf
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.java
@@ -0,0 +1,23 @@
+package de.adesso.wickedcharts.showcase;
+
+import de.adesso.wickedcharts.chartjs.ChartConfiguration;
+import de.adesso.wickedcharts.wicket14.chartjs.Chart;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.panel.Panel;
+
+/**
+ * Wicket-component that adds the appropriate code container for the displayed charts to the page.
+ */
+public class CodeComponent extends Panel {
+
+ public CodeComponent(Chart chart)
+ {
+ super("code");
+ ChartConfiguration chartConfig = chart.getChartConfiguration();
+ Label codeContainer = new Label("code", new StringFromResourceModel(
+ chartConfig.getClass(), chartConfig.getClass().getSimpleName()
+ + ".java"));
+ codeContainer.setOutputMarkupId (true);
+ this.add(codeContainer);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/Demo.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/Demo.java
index 01cf1948..e39275ee 100644
--- a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/Demo.java
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/Demo.java
@@ -14,19 +14,11 @@
*/
package de.adesso.wickedcharts.showcase;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.highcharts.options.Axis;
-import de.adesso.wickedcharts.highcharts.options.ChartOptions;
-import de.adesso.wickedcharts.highcharts.options.HorizontalAlignment;
-import de.adesso.wickedcharts.highcharts.options.Legend;
-import de.adesso.wickedcharts.highcharts.options.LegendLayout;
-import de.adesso.wickedcharts.highcharts.options.Options;
-import de.adesso.wickedcharts.highcharts.options.SeriesType;
-import de.adesso.wickedcharts.highcharts.options.Title;
-import de.adesso.wickedcharts.highcharts.options.VerticalAlignment;
+import de.adesso.wickedcharts.highcharts.options.*;
import de.adesso.wickedcharts.highcharts.options.series.SimpleSeries;
+import java.util.Arrays;
+
/**
* This code is simply to display it on the front page of
* http://code.google.com/p/wicked-charts/.
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/Homepage.html b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/Homepage.html
deleted file mode 100644
index c74bff1e..00000000
--- a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/Homepage.html
+++ /dev/null
@@ -1,239 +0,0 @@
-
-
-
-
- Wicked Charts :: Showcase :: Wicket 1.4.x
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Wicked Charts
-
version @projectVersion@ :: Wicket @wicketVersion@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
To add a chart to your Wicket page, include the following HTML
- and Java fragments into your code:
-
Markup:
-
-
-<!-- HTML code -->
-<div wicket:id="chart"/>
-
-
-
-
Wicket Page:
-
-
-// Java code
-Options options = new Options();
-options.setTitle(new Title("My Chart"));
-... // to see more options, select a chart below and click the button "Show Java code"
-add(new Chart("chart", options));
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/Homepage.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/Homepage.java
deleted file mode 100644
index 94c4573f..00000000
--- a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/Homepage.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/**
- * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
- *
- * 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 de.adesso.wickedcharts.showcase;
-
-import org.apache.wicket.PageParameters;
-import org.apache.wicket.markup.html.WebPage;
-import org.apache.wicket.markup.html.basic.Label;
-import org.apache.wicket.markup.html.internal.HtmlHeaderContainer;
-
-import de.adesso.wickedcharts.highcharts.options.Options;
-import de.adesso.wickedcharts.highcharts.theme.DarkBlueTheme;
-import de.adesso.wickedcharts.highcharts.theme.GrayTheme;
-import de.adesso.wickedcharts.highcharts.theme.GridTheme;
-import de.adesso.wickedcharts.highcharts.theme.SkiesTheme;
-import de.adesso.wickedcharts.highcharts.theme.Theme;
-import de.adesso.wickedcharts.showcase.links.UpdateChartLink;
-import de.adesso.wickedcharts.showcase.options.AreaInvertedAxisOptions;
-import de.adesso.wickedcharts.showcase.options.AreaMissingOptions;
-import de.adesso.wickedcharts.showcase.options.AreaSplineOptions;
-import de.adesso.wickedcharts.showcase.options.AreaWithNegativeValuesOptions;
-import de.adesso.wickedcharts.showcase.options.BarWithNegativeStackOptions;
-import de.adesso.wickedcharts.showcase.options.BasicAreaOptions;
-import de.adesso.wickedcharts.showcase.options.BasicBarOptions;
-import de.adesso.wickedcharts.showcase.options.BasicColumnOptions;
-import de.adesso.wickedcharts.showcase.options.BasicLineOptions;
-import de.adesso.wickedcharts.showcase.options.BasicPieOptions;
-import de.adesso.wickedcharts.showcase.options.BubbleChartOptions;
-import de.adesso.wickedcharts.showcase.options.ColumnWithDrilldownOptions;
-import de.adesso.wickedcharts.showcase.options.ColumnWithNegativeValuesOptions;
-import de.adesso.wickedcharts.showcase.options.ColumnWithRotatedLabelsOptions;
-import de.adesso.wickedcharts.showcase.options.ComboOptions;
-import de.adesso.wickedcharts.showcase.options.DonutOptions;
-import de.adesso.wickedcharts.showcase.options.LineWithDataLabelsOptions;
-import de.adesso.wickedcharts.showcase.options.LogarithmicAxisOptions;
-import de.adesso.wickedcharts.showcase.options.PercentageAreaOptions;
-import de.adesso.wickedcharts.showcase.options.PieWithGradientOptions;
-import de.adesso.wickedcharts.showcase.options.PieWithLegendOptions;
-import de.adesso.wickedcharts.showcase.options.PolarOptions;
-import de.adesso.wickedcharts.showcase.options.ScatterPlotOptions;
-import de.adesso.wickedcharts.showcase.options.SplineWithInvertedAxisOptions;
-import de.adesso.wickedcharts.showcase.options.SplineWithPlotBandsOptions;
-import de.adesso.wickedcharts.showcase.options.SplineWithSymbolsOptions;
-import de.adesso.wickedcharts.showcase.options.StackedAndGroupedColumnOptions;
-import de.adesso.wickedcharts.showcase.options.StackedAreaOptions;
-import de.adesso.wickedcharts.showcase.options.StackedBarOptions;
-import de.adesso.wickedcharts.showcase.options.StackedColumnOptions;
-import de.adesso.wickedcharts.showcase.options.StackedPercentageOptions;
-import de.adesso.wickedcharts.showcase.options.TimeDataWithIrregularIntervalsOptions;
-import de.adesso.wickedcharts.showcase.options.ZoomableTimeSeriesOptions;
-import de.adesso.wickedcharts.wicket14.highcharts.Chart;
-
-public class Homepage extends WebPage {
-
- private static final long serialVersionUID = 1L;
-
- public Homepage(final PageParameters parameters) {
- Theme theme = this.getThemeFromParams(parameters);
- Options options = this.getOptionsToDisplay();
- final Chart chart = new Chart("chart", options, theme);
- this.add(chart);
- Label codeContainer = this.addCodeContainer();
- this.addChartLinks(chart, codeContainer);
- }
-
- private void addChartLinks(final Chart chart, final Label codeContainer) {
- this.add(new UpdateChartLink("line", chart, codeContainer,
- new BasicLineOptions()));
- this.add(new UpdateChartLink("splineWithSymbols", chart, codeContainer,
- new SplineWithSymbolsOptions()));
- this.add(new UpdateChartLink("irregularIntervals", chart,
- codeContainer, new TimeDataWithIrregularIntervalsOptions()));
- this.add(new UpdateChartLink("logarithmicAxis", chart, codeContainer,
- new LogarithmicAxisOptions()));
- this.add(new UpdateChartLink("scatter", chart, codeContainer,
- new ScatterPlotOptions()));
-
- this.add(new UpdateChartLink("area", chart, codeContainer,
- new BasicAreaOptions()));
- this.add(new UpdateChartLink("areaWithNegativeValues", chart,
- codeContainer, new AreaWithNegativeValuesOptions()));
-
- this.add(new UpdateChartLink("stackedAndGroupedColumn", chart,
- codeContainer, new StackedAndGroupedColumnOptions()));
- this.add(new UpdateChartLink("combo", chart, codeContainer,
- new ComboOptions()));
- this.add(new UpdateChartLink("donut", chart, codeContainer,
- new DonutOptions()));
- this.add(new UpdateChartLink("withDataLabels", chart, codeContainer,
- new LineWithDataLabelsOptions()));
- this.add(new UpdateChartLink("zoomableTimeSeries", chart,
- codeContainer, new ZoomableTimeSeriesOptions(false)));
- this.add(new UpdateChartLink("splineInverted", chart, codeContainer,
- new SplineWithInvertedAxisOptions()));
- this.add(new UpdateChartLink("splineWithPlotBands", chart,
- codeContainer, new SplineWithPlotBandsOptions()));
- this.add(new UpdateChartLink("polar", chart, codeContainer,
- new PolarOptions()));
- this.add(new UpdateChartLink("stackedArea", chart, codeContainer,
- new StackedAreaOptions()));
- this.add(new UpdateChartLink("percentageArea", chart, codeContainer,
- new PercentageAreaOptions()));
- this.add(new UpdateChartLink("areaMissing", chart, codeContainer,
- new AreaMissingOptions()));
- this.add(new UpdateChartLink("areaInverted", chart, codeContainer,
- new AreaInvertedAxisOptions()));
-
- this.add(new UpdateChartLink("areaSpline", chart, codeContainer,
- new AreaSplineOptions()));
- this.add(new UpdateChartLink("basicBar", chart, codeContainer,
- new BasicBarOptions()));
- this.add(new UpdateChartLink("columnWithDrilldown", chart,
- codeContainer, new ColumnWithDrilldownOptions()));
- this.add(new UpdateChartLink("columnRotated", chart, codeContainer,
- new ColumnWithRotatedLabelsOptions()));
- this.add(new UpdateChartLink("stackedBar", chart, codeContainer,
- new StackedBarOptions()));
- this.add(new UpdateChartLink("barNegativeStack", chart, codeContainer,
- new BarWithNegativeStackOptions()));
- this.add(new UpdateChartLink("basicColumn", chart, codeContainer,
- new BasicColumnOptions()));
- this.add(new UpdateChartLink("columnWithNegativeValues", chart,
- codeContainer, new ColumnWithNegativeValuesOptions()));
- this.add(new UpdateChartLink("stackedColumn", chart, codeContainer,
- new StackedColumnOptions()));
- this.add(new UpdateChartLink("stackedPercentage", chart, codeContainer,
- new StackedPercentageOptions()));
- this.add(new UpdateChartLink("basicPie", chart, codeContainer,
- new BasicPieOptions()));
- this.add(new UpdateChartLink("pieWithGradient", chart, codeContainer,
- new PieWithGradientOptions()));
- this.add(new UpdateChartLink("pieWithLegend", chart, codeContainer,
- new PieWithLegendOptions()));
- this.add(new UpdateChartLink("bubble", chart, codeContainer,
- new BubbleChartOptions()));
-
- }
-
- private Label addCodeContainer() {
- Label codeContainer = new Label("code", new StringFromResourceModel(
- BasicLineOptions.class, BasicLineOptions.class.getSimpleName()
- + ".java"));
- codeContainer.setOutputMarkupId(true);
- this.add(codeContainer);
- return codeContainer;
- }
-
- private Options getOptionsToDisplay() {
- Options options = ((ShowcaseSession) this.getSession())
- .getCurrentChartOptions();
- if (options == null) {
- options = new BasicLineOptions();
- }
- return options;
- }
-
-/* private int getSelectedTab() {
- if (this.getPageParameters() == null) {
- return 0;
- }
- Object themeObject = this.getPageParameters().get("theme");
- if (themeObject == null) {
- return 0;
- } else {
- String theme = themeObject.toString();
- if ("grid".equals(theme)) {
- return 1;
- } else if ("skies".equals(theme)) {
- return 2;
- } else if ("gray".equals(theme)) {
- return 3;
- } else if ("darkblue".equals(theme)) {
- return 4;
- } else if ("darkgreen".equals(theme)) {
- return 5;
- } else {
- return 0;
- }
- }
- }*/
-
- private Theme getThemeFromParams(final PageParameters params) {
- Object themeObject = params.get("theme");
- if (themeObject == null) {
- return null;
- } else {
- String themeString = themeObject.toString();
- if ("grid".equals(themeString)) {
- return new GridTheme();
- } else if ("skies".equals(themeString)) {
- return new SkiesTheme();
- } else if ("gray".equals(themeString)) {
- return new GrayTheme();
- } else if ("darkblue".equals(themeString)) {
- return new DarkBlueTheme();
- } else {
- // default theme
- return null;
- }
- }
- }
-
- /*@Override
- public void renderHead(HtmlHeaderContainer header) {
- // select bootstrap tab for current theme selected
- int selectedTab = this.getSelectedTab();
- header.getHeaderResponse().renderOnDomReadyJavascript(
- "$('#themes li:eq(" + selectedTab + ") a').tab('show');");
- }*/
-}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.html b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.html
new file mode 100644
index 00000000..46342c88
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.html
@@ -0,0 +1,291 @@
+
+
+
+
+
+ Wicked Charts :: Showcase :: Wicket 1.4.x
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Wicked Charts
+
+
version @projectVersion@ :: Wicket @wicketVersion@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
To add a chart to your Wicket page, include the following HTML
+ and Java fragments into your code:
+
+
Markup:
+
+
+<!-- HTML code -->
+<div>
+ <canvas wicket:id="chart"></canvas>
+</div>
+
+
+
+
Wicket Page:
+
+
+// Java code
+ChartConfiguration chart = new ChartConfiguration();
+chart.setType(ChartType.LINE);
+chart.setOptions(new Options().setTitle(new Title().setText("My Chart")));
+chart.setData(new Data().setDatasets(Arrays.asList(new Dataset().setData(IntegerValue.of(1,2,3,4)))));
+//to see more options, select a chart below and click the button "Show Java code"
+
+add(new Chart("chart", chart));
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.java
new file mode 100644
index 00000000..c0fd62c2
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.java
@@ -0,0 +1,399 @@
+package de.adesso.wickedcharts.showcase;
+/*
+ * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
+ *
+ * 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.
+ */
+
+
+import de.adesso.wickedcharts.showcase.configurations.*;
+import de.adesso.wickedcharts.showcase.configurations.gridlines.*;
+import de.adesso.wickedcharts.showcase.configurations.interactions.*;
+import de.adesso.wickedcharts.showcase.configurations.legendposition.LegendPositionBottomConfiguration;
+import de.adesso.wickedcharts.showcase.configurations.legendposition.LegendPositionLeftConfiguration;
+import de.adesso.wickedcharts.showcase.configurations.legendposition.LegendPositionRightConfiguration;
+import de.adesso.wickedcharts.showcase.configurations.legendposition.LegendPositionTopConfiguration;
+import de.adesso.wickedcharts.showcase.links.ChartjsShowcaseLink;
+import de.adesso.wickedcharts.showcase.links.HighchartsShowcaseLink;
+import de.adesso.wickedcharts.showcase.links.UpdateChartJsLink;
+import de.adesso.wickedcharts.wicket14.JavaScriptResourceRegistry;
+import de.adesso.wickedcharts.wicket14.chartjs.Chart;
+import org.apache.wicket.PageParameters;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * This page takes care of the Chart.js showcase logic.
+ * @author SvenWirz
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+public class HomepageChartJs extends WebPage implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Constructs the page according to the current parameters
+ * This constructor is called each time a new chart is
+ * selected.
+ * @param parameters the page parameters from the page URI
+ */
+ public HomepageChartJs(final PageParameters parameters) {
+ addCharts(parameters);
+ addNavigationLinks();
+ addChartLinks();
+ }
+
+ /**
+ * Gets the charts and the code containers from the page parameters,
+ * constructs Wicket componenets from them and
+ * adds them to a Wicket ListView.
+ * @param parameters the page parameters from the page URI
+ */
+ private void addCharts(PageParameters parameters){
+
+ List charts = getChartFromParams(parameters);
+
+ //If we have more than one chart - use SmallComponents
+ if(charts.size() > 1){
+ List components = new ArrayList<>();
+ for(Chart i : charts){
+ components.add(new SmallChartComponent(i));
+ }
+ add( new ListView( "components", components ){
+ protected void populateItem(ListItem item)
+ {
+ item.add( (SmallChartComponent)item.getModelObject() );
+ }
+ });
+ }else { //else use the regular full-width chart component
+ List components = new ArrayList<>();
+ for (Chart i : charts) {
+ components.add(new ChartComponent(i));
+ }
+ add( new ListView( "components", components ){
+ protected void populateItem(ListItem item)
+ {
+ item.add( (ChartComponent)item.getModelObject() );
+ }
+ });
+ }
+
+ //Add Code Components
+ List code_components = new ArrayList<>();
+ for(Chart i : charts){
+ code_components.add(new CodeComponent(i));
+ }
+ add( new ListView( "code_components", code_components ){
+ protected void populateItem(ListItem item){
+ item.add( (CodeComponent)item.getModelObject() );
+ }
+ });
+ }
+
+ private void addNavigationLinks() {
+ this.add(new HighchartsShowcaseLink());
+ this.add(new ChartjsShowcaseLink());
+ }
+
+ /**
+ * Adds links to the charts in the navigation sidebar
+ */
+ private void addChartLinks() {
+ this.add(new UpdateChartJsLink("LineChartBasic", "lineBasic"));
+ this.add(new UpdateChartJsLink("BarChartVertical" , "barVertical"));
+ this.add(new UpdateChartJsLink("LineChartMultiAxis", "lineMultiAxis"));
+ this.add(new UpdateChartJsLink("LineChartStepped", "lineStepped"));
+ this.add(new UpdateChartJsLink("LineChartInterpolated", "lineInterpolated"));
+ this.add(new UpdateChartJsLink("LineStyles", "lineStyles"));
+ this.add(new UpdateChartJsLink("PointStyles", "pointStyles"));
+ this.add(new UpdateChartJsLink("PointSizes", "pointSizes"));
+ this.add(new UpdateChartJsLink("BarChartHorizontal", "barHorizontal"));
+ this.add(new UpdateChartJsLink("BarChartStacked", "barStacked"));
+ this.add(new UpdateChartJsLink("BarChartStackedGroup", "barStackedGroup"));
+ this.add(new UpdateChartJsLink("BarChartMultiAxis", "barMultiAxis"));
+ this.add(new UpdateChartJsLink("PieChart", "pie"));
+ this.add(new UpdateChartJsLink("AreaLineBoundariesChart", "areaLineBoundaries"));
+ this.add(new UpdateChartJsLink("LineChartStacked", "lineStacked"));
+ this.add(new UpdateChartJsLink("LineChartDataset", "lineDataset"));
+ this.add(new UpdateChartJsLink("RadarChart", "radar"));
+ this.add(new UpdateChartJsLink("DoughnutChart", "doughnut"));
+ this.add(new UpdateChartJsLink("PolarAreaChart", "polarArea"));
+ this.add(new UpdateChartJsLink("ScatterChart", "scatter"));
+ this.add(new UpdateChartJsLink("ScatterChartMultiAxis", "scatterMultiAxis"));
+ this.add(new UpdateChartJsLink("ComboBarLineChart", "comboBarLine"));
+ this.add(new UpdateChartJsLink("LegendPosition", "legendPosition"));
+ this.add(new UpdateChartJsLink("StepSize", "stepSize"));
+ this.add(new UpdateChartJsLink("MinMax", "minMax"));
+ this.add(new UpdateChartJsLink("GridLines", "gridLines"));
+ this.add(new UpdateChartJsLink("MultilineLabels", "multiLineLabels"));
+ this.add(new UpdateChartJsLink("LogarithmicLineChart", "lineLogarithmic"));
+ this.add(new UpdateChartJsLink("LogarithmicScatterChart", "scatterLogarithmic"));
+ this.add(new UpdateChartJsLink("BubbleChart", "bubble"));
+ this.add(new UpdateChartJsLink("FilteringLabels", "filteringLabels"));
+ this.add(new UpdateChartJsLink("TimeLine", "timeLine"));
+ this.add(new UpdateChartJsLink("NonNumeric", "nonNumeric"));
+ this.add(new UpdateChartJsLink("TimePoint", "timePoint"));
+ this.add(new UpdateChartJsLink("TimeSeries", "timeSeries"));
+ this.add(new UpdateChartJsLink("TimeCombo", "timeCombo"));
+ this.add(new UpdateChartJsLink("OtherRadar", "radar2"));
+ this.add(new UpdateChartJsLink("Tooltip", "tooltip"));
+ this.add(new UpdateChartJsLink("TooltipHtml", "tooltipHtml"));
+ this.add(new UpdateChartJsLink("LegendPointStyle", "legendPointStyle"));
+ this.add(new UpdateChartJsLink("LineChartProgressBar", "lineProgressBar"));
+ this.add(new UpdateChartJsLink("DataLabellingChart", "dataLabelling"));
+ this.add(new UpdateChartJsLink("TooltipInteractions", "tooltipInteractions"));
+ }
+
+ /**
+ * Returns a List of Chart objects from the current page parameters.
+ * @param params the page parameters from the page URI
+ * @return a List of Chart objects
+ */
+ private List getChartFromParams(final PageParameters params) {
+ String chartString;
+ List config = new ArrayList<>();
+
+ //Get the parameters of the page
+ //Set pairs = params.entrySet();
+
+ //If the showcase is started without any parameters
+ //set the parameters to lineBasic and give us a line Chart
+ if(params.keySet().size() == 0){
+ PageParameters temp = new PageParameters();
+ temp.add("chart", "lineBasic");
+ setResponsePage(HomepageChartJs.class, temp);
+ config.add(new Chart("chart", new LineChartBasicConfiguration()));
+ return config;
+ }
+
+ chartString = params.get("chart").toString();
+ if(chartString == null) {
+ config.add(new Chart("chart", new LineChartBasicConfiguration()));
+ return config;
+ }
+
+ switch(chartString) {
+
+ case "barVertical":
+ config.add(new Chart("chart", new BarChartVerticalConfiguration()));
+ break;
+
+ case "barHorizontal":
+ config.add(new Chart("chart", new BarChartHorizontalConfiguration()));
+ break;
+
+ case "barMultiAxis":
+ config.add(new Chart("chart", new BarChartMultiAxisConfiguration()));
+ break;
+
+ case "barStacked":
+ config.add(new Chart("chart", new BarChartStackedConfiguration()));
+ break;
+
+ case "barStackedGroup":
+ config.add(new Chart("chart", new BarChartStackedGroupConfiguration()));
+ break;
+
+ case "lineBasic":
+ config.add(new Chart("chart", new LineChartBasicConfiguration()));
+ break;
+
+ case "lineMultiAxis":
+ config.add(new Chart("chart", new LineChartMultiAxisConfiguration()));
+ break;
+
+ case "lineStepped":
+ config.add(new Chart("chart", new LineChartSteppedBeforeConfiguration()));
+ config.add(new Chart("chart", new LineChartSteppedAfterConfiguration()));
+ break;
+
+ case "lineInterpolated":
+ config.add(new Chart("chart", new LineChartInterpolatedConfiguration()));
+ break;
+
+ case "lineStyles":
+ config.add(new Chart("chart", new LineStylesConfiguration()));
+ break;
+
+ case "pointStyles":
+ config.add(new Chart("chart", new PointStylesConfiguration()));
+ break;
+
+ case "pointSizes":
+ config.add(new Chart("chart", new LineChartWithDifferentPointSizesConfiguration()));
+ break;
+
+ case "areaLineBoundaries":
+ config.add(new Chart("chart", new AreaLineBoundariesChartStartConfiguration()));
+ config.add(new Chart("chart", new AreaLineBoundariesChartEndConfiguration()));
+ config.add(new Chart("chart", new AreaLineBoundariesChartOriginConfiguration()));
+ config.add(new Chart("chart", new AreaLineBoundariesChartFalseConfiguration()));
+ break;
+
+ case "lineDataset":
+ config.add(new Chart("chart", new LineChartAreaDatasetConfiguration()));
+ break;
+
+ case "lineStacked":
+ config.add(new Chart("chart", new LineChartStackedConfiguration()));
+ break;
+
+ case "radar":
+ config.add(new Chart("chart", new RadarChartConfiguration()));
+ break;
+
+ case "scatter":
+ config.add(new Chart("chart", new ScatterChartConfiguration()));
+ break;
+
+ case "scatterMultiAxis":
+ config.add(new Chart("chart", new ScatterChartMultiAxisConfiguration()));
+ break;
+
+ case "doughnut":
+ config.add(new Chart("chart", new DoughnutChartConfiguration()));
+ break;
+
+ case "pie":
+ config.add(new Chart("chart", new PieChartConfiguration()));
+ break;
+
+ case "polarArea":
+ config.add(new Chart("chart", new PolarAreaChartConfiguration()));
+ break;
+
+ case "radar2":
+ config.add(new Chart("chart", new OtherRadarChartConfiguration()));
+ break;
+
+ case "comboBarLine":
+ config.add(new Chart("chart", new ComboBarLineChartConfiguration()));
+ break;
+
+ case "stepSize":
+ config.add(new Chart("chart", new LinearStepSizeConfiguration()));
+ break;
+
+ case "minMax":
+ config.add(new Chart("chart", new MinMaxConfiguration()));
+ config.add(new Chart("chart", new MinMaxSuggestedConfiguration()));
+ break;
+
+ case "lineLogarithmic":
+ config.add(new Chart("chart", new LogarithmicLineChartConfiguration()));
+ break;
+
+ case "scatterLogarithmic":
+ config.add(new Chart("chart", new LogarithmicScatterChartConfiguration()));
+ break;
+
+ case "timeLine":
+ config.add(new Chart("chart", new TimeLineConfiguration()));
+ break;
+
+ case "timePoint":
+ config.add(new Chart("chart", new TimePointConfiguration()));
+ break;
+
+ case "timeSeries":
+ config.add(new Chart("chart", new TimeSeriesConfiguration()));
+ break;
+
+ case "timeCombo":
+ config.add(new Chart("chart", new TimeComboConfiguration()));
+ break;
+
+ case "gridLines":
+ config.add(new Chart("chart", new GridLinesBasicConfiguration()));
+ config.add(new Chart("chart", new GridLinesDisplayFalseConfiguration()));
+ config.add(new Chart("chart", new GridLinesDisplayFalseNoBorderConfiguration()));
+ config.add(new Chart("chart", new GridLinesChartAreaConfiguration()));
+ config.add(new Chart("chart", new GridLinesTicksConfiguration()));
+ config.add(new Chart("chart", new GridLineStylesConfiguration()));
+ break;
+
+ case "multiLineLabels":
+ config.add(new Chart("chart", new MultilineLabelsConfiguration()));
+ break;
+
+ case "filteringLabels":
+ config.add(new Chart("chart", new FilteringLabelsConfiguration()));
+ break;
+
+ case "nonNumeric":
+ config.add(new Chart("chart", new NonNumericConfiguration()));
+ break;
+
+ case "legendPosition":
+ config.add(new Chart("chart", new LegendPositionTopConfiguration()));
+ config.add(new Chart("chart", new LegendPositionRightConfiguration()));
+ config.add(new Chart("chart", new LegendPositionBottomConfiguration()));
+ config.add(new Chart("chart", new LegendPositionLeftConfiguration()));
+ break;
+
+ case "legendPointStyle":
+ config.add(new Chart("chart", new LegendPointStyleConfiguration()));
+ break;
+
+ case "tooltip":
+ config.add(new Chart("chart", new TooltipBorderConfiguration()));
+ config.add(new Chart("chart", new TooltipCallbacksConfiguration()));
+ config.add(new Chart("chart", new TooltipAverageConfiguration()));
+ config.add(new Chart("chart", new TooltipNearestConfiguration()));
+ break;
+
+ case "tooltipHtml":
+ config.add(new Chart("chart", new TooltipHtmlLineConfiguration()));
+ config.add(new Chart("chart", new TooltipHtmlPieConfiguration()));
+ config.add(new Chart("chart", new TooltipHtmlPointsConfiguration()));
+ break;
+
+ case "bubble":
+ config.add(new Chart("chart", new BubbleChartConfiguration()));
+ break;
+
+ case "lineProgressBar":
+ config.add(new Chart("chart", new LineChartProgressBarConfiguration()));
+ break;
+
+ case "dataLabelling":
+ config.add(new Chart("chart", new DataLabellingChartConfiguration()));
+ break;
+
+ case "tooltipInteractions":
+ config.add(new Chart("chart", new DatasetIntersectFalseConfiguration()));
+ config.add(new Chart("chart", new DatasetIntersectTrueConfiguration()));
+ config.add(new Chart("chart", new IndexIntersectFalseConfiguration()));
+ config.add(new Chart("chart", new IndexIntersectTrueConfiguration()));
+ config.add(new Chart("chart", new NearestIntersectFalseConfiguration()));
+ config.add(new Chart("chart", new NearestIntersectTrueConfiguration()));
+ config.add(new Chart("chart", new PointIntersectFalseConfiguration()));
+ config.add(new Chart("chart", new PointIntersectTrueConfiguration()));
+ config.add(new Chart("chart", new xIntersectFalseConfiguration()));
+ config.add(new Chart("chart", new xIntersectTrueConfiguration()));
+ config.add(new Chart("chart", new yIntersectFalseConfiguration()));
+ config.add(new Chart("chart", new yIntersectTrueConfiguration()));
+ break;
+
+ default:
+ config.add(new Chart("chart", new LineChartBasicConfiguration()));
+ break;
+ }
+ return config;
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.html b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.html
new file mode 100644
index 00000000..3257617b
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.html
@@ -0,0 +1,253 @@
+
+
+
+
+ Wicked Charts :: Showcase :: Wicket 1.4.x
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Wicked Charts
+
+
version @projectVersion@ :: Wicket @wicketVersion@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
To add a chart to your Wicket page, include the following HTML
+ and Java fragments into your code:
+
+
Markup:
+
+
+<!-- HTML code -->
+<div wicket:id="chart"/>
+
+
+
+
Wicket Page:
+
+
+// Java code
+Options options = new Options();
+options.setTitle(new Title("My Chart"));
+... // to see more options, select a chart below and click the button "Show Java code"
+add(new Chart("chart", options));
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.java
new file mode 100644
index 00000000..3cc07551
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.java
@@ -0,0 +1,340 @@
+/*
+ * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
+ *
+ * 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 de.adesso.wickedcharts.showcase;
+
+import de.adesso.wickedcharts.showcase.links.ChartjsShowcaseLink;
+import de.adesso.wickedcharts.showcase.links.HighchartsShowcaseLink;
+import de.adesso.wickedcharts.showcase.links.UpdateHighchartLink;
+import de.adesso.wickedcharts.showcase.options.*;
+import de.adesso.wickedcharts.wicket14.highcharts.Chart;
+import org.apache.wicket.PageParameters;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.basic.Label;
+
+/**
+ * This page takes care of the Highcharts showcase logic.
+ * @author SvenWirz
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+public class HomepageHighcharts extends WebPage {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Constructs the page according to the current parameters
+ * This constructor is called each time a new chart or theme is
+ * selected.
+ * @param parameters the page parameters from the page URI
+ */
+ public HomepageHighcharts(final PageParameters parameters) {
+ Chart chart = getChartFromParams(parameters);
+ add(chart);
+ addNavigationLinks();
+ addCodeContainer(chart);
+ addChartLinks();
+ }
+
+ private void addNavigationLinks() {
+ add(new HighchartsShowcaseLink());
+ add(new ChartjsShowcaseLink());
+ }
+
+ /**
+ * Adds links to the charts in the navigation sidebar
+ */
+ private void addChartLinks() {
+ add(new UpdateHighchartLink("line"));
+ add(new UpdateHighchartLink("splineWithSymbols"));
+ add(new UpdateHighchartLink("irregularIntervals"));
+ add(new UpdateHighchartLink("logarithmicAxis"));
+ add(new UpdateHighchartLink("scatter"));
+ add(new UpdateHighchartLink("area"));
+ add(new UpdateHighchartLink("areaWithNegativeValues"));
+ add(new UpdateHighchartLink("stackedAndGroupedColumn"));
+ add(new UpdateHighchartLink("combo"));
+ add(new UpdateHighchartLink("donut"));
+ add(new UpdateHighchartLink("withDataLabels"));
+ add(new UpdateHighchartLink("splineInverted"));
+ add(new UpdateHighchartLink("splineWithPlotBands"));
+ add(new UpdateHighchartLink("polar"));
+ add(new UpdateHighchartLink("percentageArea"));
+ add(new UpdateHighchartLink("areaMissing"));
+ add(new UpdateHighchartLink("areaInverted"));
+ add(new UpdateHighchartLink("areaSpline"));
+ add(new UpdateHighchartLink("areaSplineRange"));
+ add(new UpdateHighchartLink("basicBar"));
+ add(new UpdateHighchartLink("columnWithDrilldown"));
+ add(new UpdateHighchartLink("columnRotated"));
+ add(new UpdateHighchartLink("stackedBar"));
+ add(new UpdateHighchartLink("barNegativeStack"));
+ add(new UpdateHighchartLink("basicColumn"));
+ add(new UpdateHighchartLink("columnWithNegativeValues"));
+ add(new UpdateHighchartLink("stackedColumn"));
+ add(new UpdateHighchartLink("stackedArea"));
+ add(new UpdateHighchartLink("stackedPercentage"));
+ add(new UpdateHighchartLink("basicPie"));
+ add(new UpdateHighchartLink("pieWithGradient"));
+ add(new UpdateHighchartLink("pieWithLegend"));
+ add(new UpdateHighchartLink("bubble"));
+ add(new UpdateHighchartLink("3dbubble"));
+ add(new UpdateHighchartLink("boxplot"));
+ add(new UpdateHighchartLink("angularGauge"));
+ add(new UpdateHighchartLink("spiderweb"));
+ add(new UpdateHighchartLink("windrose"));
+ add(new UpdateHighchartLink("columnrange"));
+ add(new UpdateHighchartLink("arearange"));
+ add(new UpdateHighchartLink("clicktoadd"));
+ add(new UpdateHighchartLink("dualAxes"));
+ add(new UpdateHighchartLink("scatterWithRegression"));
+ add(new UpdateHighchartLink("multipleAxes"));
+ add(new UpdateHighchartLink("errorBar"));
+ add(new UpdateHighchartLink("funnel"));
+ add(new UpdateHighchartLink("pyramid"));
+ add(new UpdateHighchartLink("heatmap"));
+ }
+
+
+ /**
+ * Adds a code container corresponding to the current chart
+ * @param chart The currently selected chart
+ */
+ private void addCodeContainer(Chart chart) {
+ Label codeContainer = new Label("code", new StringFromResourceModel(
+ chart.getOptions().getClass(), chart.getOptions().getClass().getSimpleName()
+ + ".java"));
+ codeContainer.setOutputMarkupId(true);
+ add(codeContainer);
+ }
+
+ /**
+ * Returns a Chart object from the current page parameters
+ * @param params the page parameters from the page URI
+ * @return a Chart
+ */
+ private Chart getChartFromParams(final PageParameters params) {
+ String chartString;
+ Chart config;
+
+ //If the showcase is started without any parameters
+ //set the parameters to lineBasic and give us a line Chart
+ if(params.keySet().isEmpty()){
+ config = new Chart("chart", new BasicLineOptions(), null);
+ return config;
+ }
+
+ chartString = params.get("chart").toString();
+
+ if(chartString == null) {
+ config = new Chart("chart", new BasicLineOptions(), null);
+ return config;
+ }
+
+ switch(chartString) {
+ case "basicBar":
+ config = new Chart("chart", new BasicBarOptions(), null);
+ break;
+
+ case "splineWithSymbols":
+ config = new Chart("chart", new SplineWithSymbolsOptions(), null);
+ break;
+
+ case "irregularIntervals":
+ config = new Chart("chart", new TimeDataWithIrregularIntervalsOptions(), null);
+ break;
+
+ case "logarithmicAxis":
+ config = new Chart("chart", new LogarithmicAxisOptions(), null);
+ break;
+
+ case "scatter":
+ config = new Chart("chart", new ScatterPlotOptions(), null);
+ break;
+
+ case "area":
+ config = new Chart("chart", new BasicAreaOptions(), null);
+ break;
+
+ case "areaWithNegativeValues":
+ config = new Chart("chart", new AreaWithNegativeValuesOptions(), null);
+ break;
+
+ case "stackedAndGroupedColumn":
+ config = new Chart("chart", new StackedAndGroupedColumnOptions(), null);
+ break;
+
+ case "combo":
+ config = new Chart("chart", new ComboOptions(), null);
+ break;
+
+ case "donut":
+ config = new Chart("chart", new DonutOptions(), null);
+ break;
+
+ case "withDataLabels":
+ config = new Chart("chart", new LineWithDataLabelsOptions(), null);
+ break;
+
+ case "splineInverted":
+ config = new Chart("chart", new SplineWithInvertedAxisOptions(), null);
+ break;
+
+ case "splineWithPlotBands":
+ config = new Chart("chart", new SplineWithPlotBandsOptions(), null);
+ break;
+
+ case "polar":
+ config = new Chart("chart", new PolarOptions(), null);
+ break;
+
+ case "stackedArea":
+ config = new Chart("chart", new StackedAreaOptions(), null);
+ break;
+
+ case "percentageArea":
+ config = new Chart("chart", new PercentageAreaOptions(), null);
+ break;
+
+ case "areaMissing":
+ config = new Chart("chart", new AreaMissingOptions(), null);
+ break;
+
+ case "areaInverted":
+ config = new Chart("chart", new AreaInvertedAxisOptions(), null);
+ break;
+
+ case "areaSpline":
+ config = new Chart("chart", new AreaSplineOptions(), null);
+ break;
+
+ case "areaSplineRange":
+ config = new Chart("chart", new AreaSplineRangeOptions(), null);
+ break;
+
+ case "columnWithDrilldown":
+ config = new Chart("chart", new ColumnWithDrilldownOptions(), null);
+ break;
+
+ case "columnRotated":
+ config = new Chart("chart", new ColumnWithRotatedLabelsOptions(), null);
+ break;
+
+ case "stackedBar":
+ config = new Chart("chart", new StackedBarOptions(), null);
+ break;
+
+ case "barNegativeStack":
+ config = new Chart("chart", new StackedBarOptions(), null);
+ break;
+
+ case "basicColumn":
+ config = new Chart("chart", new BasicColumnOptions(), null);
+ break;
+
+ case "columnWithNegativeValues":
+ config = new Chart("chart", new ColumnWithNegativeValuesOptions(), null);
+ break;
+
+ case "stackedColumn":
+ config = new Chart("chart", new StackedColumnOptions(), null);
+ break;
+
+ case "stackedPercentage":
+ config = new Chart("chart", new StackedPercentageOptions(), null);
+ break;
+
+ case "basicPie":
+ config = new Chart("chart", new BasicPieOptions(), null);
+ break;
+
+ case "pieWithGradient":
+ config = new Chart("chart", new PieWithGradientOptions(), null);
+ break;
+
+ case "pieWithLegend":
+ config = new Chart("chart", new PieWithLegendOptions(), null);
+ break;
+
+ case "bubble":
+ config = new Chart("chart", new BubbleChartOptions(), null);
+ break;
+
+ case "3dbubble":
+ config = new Chart("chart", new BubbleChart3DOptions(), null);
+ break;
+
+ case "boxplot":
+ config = new Chart("chart", new BoxplotChartOptions(), null);
+ break;
+
+ case "angularGauge":
+ config = new Chart("chart", new AngularGaugeOptions(), null);
+ break;
+
+ case "spiderweb":
+ config = new Chart("chart", new SpiderwebOptions(), null);
+ break;
+
+ case "windrose":
+ config = new Chart("chart", new WindroseOptions(), null);
+ break;
+
+ case "columnrange":
+ config = new Chart("chart", new ColumnRangeOptions(), null);
+ break;
+
+ case "arearange":
+ config = new Chart("chart", new AreaRangeOptions(), null);
+ break;
+
+ case "clicktoadd":
+ config = new Chart("chart", new ClickToAddAPointOptions(), null);
+ break;
+
+ case "dualAxes":
+ config = new Chart("chart", new DualAxesOptions(), null);
+ break;
+
+ case "scatterWithRegression":
+ config = new Chart("chart", new ScatterWithRegressionLineOptions(), null);
+ break;
+
+ case "multipleAxes":
+ config = new Chart("chart", new MultipleAxesOptions(), null);
+ break;
+
+ case "errorBar":
+ config = new Chart("chart", new ErrorBarOptions(), null);
+ break;
+
+ case "funnel":
+ config = new Chart("chart", new FunnelOptions(), null);
+ break;
+
+ case "pyramid":
+ config = new Chart("chart", new PyramidOptions(), null);
+ break;
+
+ case "heatmap":
+ config = new Chart("chart", new HeatmapOptions(), null);
+ break;
+
+ default:
+ config = new Chart("chart", new BasicLineOptions(), null);
+ break;
+ }
+ return config;
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseApplication.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseApplication.java
index 5e14f894..c63ba88f 100644
--- a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseApplication.java
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseApplication.java
@@ -21,18 +21,22 @@
import org.apache.wicket.Session;
import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.request.target.coding.HybridUrlCodingStrategy;
+import org.apache.wicket.request.target.coding.IndexedHybridUrlCodingStrategy;
import org.apache.wicket.request.target.coding.IndexedParamUrlCodingStrategy;
-import org.apache.wicket.util.lang.PackageName;
+import org.apache.wicket.request.target.coding.MixedParamHybridUrlCodingStrategy;
import org.springframework.stereotype.Component;
+import java.lang.reflect.Array;
+import java.util.Arrays;
+
@Component
public class ShowcaseApplication extends WebApplication {
/**
* @see org.apache.wicket.Application#getHomePage()
*/
@Override
- public Class getHomePage() {
- return Homepage.class;
+ public Class getHomePage() {
+ return HomepageChartJs.class;
}
/**
@@ -40,12 +44,10 @@ public Class getHomePage() {
*/
@Override
public void init() {
- super
- .init();
- JavaScriptResourceRegistry
- .getInstance()
- .setJQueryReference("js/jquery-1.8.1.min.js");
- mount(new IndexedParamUrlCodingStrategy("/start", Homepage.class));
+ super.init();
+ String[] params = {"chart"};
+ mount(new MixedParamHybridUrlCodingStrategy("/chartjs", HomepageChartJs.class,false, params));
+ mount(new MixedParamHybridUrlCodingStrategy("/highcharts", HomepageHighcharts.class,false, params));
}
@Override
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseSession.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseSession.java
index aa0ae631..7fcc146e 100644
--- a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseSession.java
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseSession.java
@@ -14,11 +14,10 @@
*/
package de.adesso.wickedcharts.showcase;
+import de.adesso.wickedcharts.highcharts.options.Options;
import org.apache.wicket.Request;
import org.apache.wicket.protocol.http.WebSession;
-import de.adesso.wickedcharts.highcharts.options.Options;
-
public class ShowcaseSession extends WebSession {
private static final long serialVersionUID = 1L;
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.html b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.html
new file mode 100644
index 00000000..e8a1a330
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.html
@@ -0,0 +1,22 @@
+
+
+
+
+
panel
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.java
new file mode 100644
index 00000000..42e8eafa
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.java
@@ -0,0 +1,14 @@
+package de.adesso.wickedcharts.showcase;
+
+import de.adesso.wickedcharts.wicket14.chartjs.Chart;
+
+/**
+ * Wicket-component that adds the chart configuration and a smaller markup to the page.
+ */
+public class SmallChartComponent extends ChartComponent {
+
+ public SmallChartComponent(Chart chart)
+ {
+ super(chart);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/StringFromResourceModel.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/StringFromResourceModel.java
index 31cffcf7..ea83cc42 100644
--- a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/StringFromResourceModel.java
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/StringFromResourceModel.java
@@ -14,14 +14,14 @@
*/
package de.adesso.wickedcharts.showcase;
+import org.apache.commons.io.IOUtils;
+import org.apache.wicket.model.IModel;
+
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
-import org.apache.commons.io.IOUtils;
-import org.apache.wicket.model.IModel;
-
public class StringFromResourceModel implements IModel {
private static final long serialVersionUID = 1L;
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartEndConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartEndConfiguration.java
new file mode 100644
index 00000000..62047c4e
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartEndConfiguration.java
@@ -0,0 +1,64 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ *
+ * A sample that shows how the 'end' fill option works
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/line-boundaries.html
+ *
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class AreaLineBoundariesChartEndConfiguration extends ShowcaseConfiguration {
+ public AreaLineBoundariesChartEndConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(-40, 20, 30, -70, 12, 60, -30))
+ .setFill(BoundaryFillingMode.END);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setMaintainAspectRatio(true)
+ .setSpanGaps(false)
+ .setElements(new Element()
+ .setLine(new Line()
+ .setTension(0.000001)))
+ .setPlugins(new Plugins().
+ setFiller(new Filler().
+ setPropagate(false)))
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Boundaries Chart - End"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month"))
+ .setTicks(new Ticks()
+ .setAutoSkip(false)
+ .setMaxRotation(0))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartFalseConfiguration.java
new file mode 100644
index 00000000..208d3b5c
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartFalseConfiguration.java
@@ -0,0 +1,62 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ *
+ * A sample that shows how the 'false' fill option works
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/line-boundaries.html
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class AreaLineBoundariesChartFalseConfiguration extends ShowcaseConfiguration {
+ public AreaLineBoundariesChartFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(-40, 20, 30, -70, 12, 60, -30))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setMaintainAspectRatio(true)
+ .setSpanGaps(false)
+ .setElements(new Element()
+ .setLine(new Line()
+ .setTension(0.000001)))
+ .setPlugins(new Plugins().
+ setFiller(new Filler().
+ setPropagate(false)))
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Boundaries Chart - False"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month"))
+ .setTicks(new Ticks()
+ .setAutoSkip(false)
+ .setMaxRotation(0))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartOriginConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartOriginConfiguration.java
new file mode 100644
index 00000000..25263e27
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartOriginConfiguration.java
@@ -0,0 +1,64 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ *
+ * A sample that shows how the 'origin' fill option works
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/line-boundaries.html
+ *
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class AreaLineBoundariesChartOriginConfiguration extends ShowcaseConfiguration {
+ public AreaLineBoundariesChartOriginConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(-40, 20, 30, -70, 12, 60, -30))
+ .setFill(BoundaryFillingMode.ORIGIN);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setMaintainAspectRatio(true)
+ .setSpanGaps(false)
+ .setElements(new Element()
+ .setLine(new Line()
+ .setTension(0.000001)))
+ .setPlugins(new Plugins().
+ setFiller(new Filler().
+ setPropagate(false)))
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Boundaries Chart - Origin"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month"))
+ .setTicks(new Ticks()
+ .setAutoSkip(false)
+ .setMaxRotation(0))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartStartConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartStartConfiguration.java
new file mode 100644
index 00000000..353e5dab
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartStartConfiguration.java
@@ -0,0 +1,64 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ *
+ * A sample that shows how the 'start' fill option works
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/line-boundaries.html
+ *
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class AreaLineBoundariesChartStartConfiguration extends ShowcaseConfiguration {
+ public AreaLineBoundariesChartStartConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(-40, 20, 30, -70, 12, 60, -30))
+ .setFill(BoundaryFillingMode.START);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setMaintainAspectRatio(true)
+ .setSpanGaps(false)
+ .setElements(new Element()
+ .setLine(new Line()
+ .setTension(0.000001)))
+ .setPlugins(new Plugins().
+ setFiller(new Filler().
+ setPropagate(false)))
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Boundaries Chart - Start"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month"))
+ .setTicks(new Ticks()
+ .setAutoSkip(false)
+ .setMaxRotation(0))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartHorizontalConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartHorizontalConfiguration.java
new file mode 100644
index 00000000..7178325e
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartHorizontalConfiguration.java
@@ -0,0 +1,65 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * A sample that shows how a horizontal bar chart configuration looks.
+ */
+
+/**
+ *
+ * A sample that shows how a horizontal bar chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/bar/horizontal.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class BarChartHorizontalConfiguration extends ShowcaseConfiguration {
+ public BarChartHorizontalConfiguration() {
+ super();
+ setType(ChartType.HORIZONTAL_BAR);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setElements(new Rectangle())
+ .setLegend(new Legend()
+ .setPosition(Position.RIGHT))
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Horizontal Bar Chart"))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartMultiAxisConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartMultiAxisConfiguration.java
new file mode 100644
index 00000000..bfd43c26
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartMultiAxisConfiguration.java
@@ -0,0 +1,79 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * A sample that shows how a multi-axis bar chart configuration looks.
+ */
+
+/**
+ *
+ * A sample that shows how a multi-axis bar chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/bar/multi-axis.html
+ *
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class BarChartMultiAxisConfiguration extends ShowcaseConfiguration{
+ public BarChartMultiAxisConfiguration() {
+ setType(ChartType.BAR);
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setYAxisID("y-axis-1");
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setYAxisID("y-axis-2");
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Bar Chart - Multi Axis"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setScales(new Scales()
+ .setYAxes(Arrays.asList(new AxesScale()
+ .setType("linear")
+ .setDisplay(true)
+ .setPosition(Position.LEFT)
+ .setId("y-axis-1"),
+ new AxesScale()
+ .setType("linear")
+ .setDisplay(true)
+ .setPosition(Position.RIGHT)
+ .setId("y-axis-2")
+ .setGridLines(new GridLines()
+ .setDrawOnChartArea(false)))))
+
+ ;
+ setOptions(options);
+
+ }
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedConfiguration.java
new file mode 100644
index 00000000..8cd45a6d
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedConfiguration.java
@@ -0,0 +1,87 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * A sample that shows how a stacked bar chart configuration looks.
+ */
+
+/**
+ *
+ * A sample that shows how a stack bar chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/bar/stacked.html
+ *
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class BarChartStackedConfiguration extends ShowcaseConfiguration {
+ public BarChartStackedConfiguration() {
+ setType(ChartType.STACKED_BAR);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setStack("1");
+
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setStack("1");
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("Dataset 3")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setStack("1");
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2, dataset3));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Bar Chart - Stacked"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setStacked(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setStacked(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedGroupConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedGroupConfiguration.java
new file mode 100644
index 00000000..8e0bff32
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedGroupConfiguration.java
@@ -0,0 +1,85 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * A sample that shows how a stacked group bar chart configuration looks.
+ */
+
+/**
+ *
+ * A sample that shows how a stacked bar chart group configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/bar/stacked-group.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class BarChartStackedGroupConfiguration extends ShowcaseConfiguration {
+ public BarChartStackedGroupConfiguration() {
+ setType(ChartType.STACKED_BAR);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setStack("0");
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setStack("0");
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("Dataset 3")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setStack("1");
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2, dataset3));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Bar Chart - Stacked Groups"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setStacked(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setStacked(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartVerticalConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartVerticalConfiguration.java
new file mode 100644
index 00000000..0e5c7ee6
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartVerticalConfiguration.java
@@ -0,0 +1,60 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * A sample that shows how a vertical bar chart configuration looks.
+ */
+
+/**
+ *
+ * A sample that shows how a vertical bar chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/bar/vertical.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class BarChartVerticalConfiguration extends ShowcaseConfiguration {
+ public BarChartVerticalConfiguration() {
+ super();
+ setType(ChartType.BAR);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Bar Chart"))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/BubbleChartConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/BubbleChartConfiguration.java
new file mode 100644
index 00000000..fc5d735b
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/BubbleChartConfiguration.java
@@ -0,0 +1,102 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.BubbleValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+import java.util.Random;
+/**
+ *
+ * A sample that shows how a bubble chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/scriptable/bubble.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class BubbleChartConfiguration extends ShowcaseConfiguration {
+ public BubbleChartConfiguration() {
+ super();
+ setType(ChartType.BUBBLE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.YELLOW)
+ .setHoverBackgroundColor(SimpleColor.WHITE)
+ .setHoverBorderColor(SimpleColor.RED)
+ .setHoverBorderWidth(10.0)
+ .setData(Arrays.asList(
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100))
+ ))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setHoverBackgroundColor(SimpleColor.WHITE)
+ .setHoverBorderColor(SimpleColor.RED)
+ .setHoverBorderWidth(10.0)
+ .setData(Arrays.asList(
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100))
+ ))
+ .setFill(false);
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("My Third dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.YELLOW)
+ .setHoverBackgroundColor(SimpleColor.WHITE)
+ .setHoverBorderColor(SimpleColor.RED)
+ .setHoverBorderWidth(10.0)
+ .setData(Arrays.asList(
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100))
+ ))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2,dataset3));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setAspectRatio((double)1)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Bubble Chart"))
+ ;
+ setOptions(options);
+
+
+ }
+
+ private Double randomDouble(int bound) {
+ Random random = new Random();
+ return (double)random.nextInt(bound)+1;
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/ComboBarLineChartConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/ComboBarLineChartConfiguration.java
new file mode 100644
index 00000000..5ec762e4
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/ComboBarLineChartConfiguration.java
@@ -0,0 +1,63 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a combo bar-line chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/combo-bar-line.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class ComboBarLineChartConfiguration extends ShowcaseConfiguration {
+ public ComboBarLineChartConfiguration() {
+ super();
+ setType(ChartType.BAR);
+ Data data = new Data();
+ Dataset dataset1 = new Dataset();
+ dataset1.setType(ChartType.LINE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderWidth(2)
+ .setFill(false)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setLabel("Dataset 1");
+
+ Dataset dataset2 = new Dataset()
+ .setType(ChartType.BAR)
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.WHITE)
+ .setBorderWidth(2)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setLabel("Dataset 2");
+
+ Dataset dataset3 = new Dataset()
+ .setType(ChartType.BAR)
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setLabel("Dataset 3");
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2,dataset3))
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+
+ setData(data);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Combo Bar Line Chart"))
+ .setTooltips(new Tooltips()
+ .setIntersect(true)
+ .setMode(TooltipMode.INDEX));
+ setOptions(options);
+
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/DataLabellingChartConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/DataLabellingChartConfiguration.java
new file mode 100644
index 00000000..999a7bd3
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/DataLabellingChartConfiguration.java
@@ -0,0 +1,71 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+
+/**
+ *
+ * A sample that shows how a combo bar-line chart configuration with data labelling.
+ *
+ * @see http://www.chartjs.org/samples/latest/advanced/data-labelling.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class DataLabellingChartConfiguration extends ShowcaseConfiguration {
+ public DataLabellingChartConfiguration() {
+ super();
+ setType(ChartType.BAR);
+ String optionalJavascript=readFile("de/adesso/wickedcharts/showcase/dataLabellingPlugin.js");
+
+ setOptionalJavascript(new ArrayList());
+ addOptionalJavascript(optionalJavascript);
+
+ Data data = new Data();
+ Dataset dataset1 = new Dataset();
+ dataset1.setType(ChartType.LINE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderWidth(2)
+ .setFill(false)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setLabel("Dataset 1");
+
+ Dataset dataset2 = new Dataset()
+ .setType(ChartType.BAR)
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.WHITE)
+ .setBorderWidth(2)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setLabel("Dataset 2");
+
+ Dataset dataset3 = new Dataset()
+ .setType(ChartType.BAR)
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setLabel("Dataset 3");
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2,dataset3))
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+
+ setData(data);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Combo Bar Line Chart"))
+ .setTooltips(new Tooltips()
+ .setIntersect(true)
+ .setMode(TooltipMode.INDEX));
+ setOptions(options);
+
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/DoughnutChartConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/DoughnutChartConfiguration.java
new file mode 100644
index 00000000..71103554
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/DoughnutChartConfiguration.java
@@ -0,0 +1,50 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a doughnut configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/doughnut.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class DoughnutChartConfiguration extends ShowcaseConfiguration {
+ public DoughnutChartConfiguration() {
+ super();
+ setType(ChartType.DOUGHNUT);
+
+ Data data = new Data();
+
+ Dataset dataset = new Dataset()
+ .setData(IntegerValue.of(randomIntegerList(5)))
+ .setBackgroundColor(
+ Arrays.asList(SimpleColor.RED,SimpleColor.ORANGE, SimpleColor.YELLOW, SimpleColor.GREEN, SimpleColor.BLUE))
+ .setLabel("Dataset 1");
+
+ data.setDatasets(Arrays.asList(dataset)).setLabels(TextLabel.of("Red", "Orange", "Yellow", "Green", "Blue"));
+
+ setData(data);
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("ChartJs Doughnut Chart"))
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setAnimation(new Animation()
+ .setAnimateScale(true)
+ .setAnimateRotate(true));
+ setOptions(options);
+
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/FilteringLabelsConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/FilteringLabelsConfiguration.java
new file mode 100644
index 00000000..8441defc
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/FilteringLabelsConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ *
+ * A sample that shows how a chart with label filtering is configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/filtering-labels.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class FilteringLabelsConfiguration extends ShowcaseConfiguration {
+ public FilteringLabelsConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart - X-Axis Filter"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month"))
+ .setTicks(new Ticks()
+ .setCallback(
+ new CallbackFunction("function(dataLabel, index) {\r\n" +
+ " // Hide the label of every 2nd dataset. return null to hide the grid line too\r\n" +
+ " return index % 2 === 0 ? dataLabel : '';}"))))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setBeginAtZero(true)))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LegendPointStyleConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LegendPointStyleConfiguration.java
new file mode 100644
index 00000000..a9f6bee7
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LegendPointStyleConfiguration.java
@@ -0,0 +1,70 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ *
+ * A sample that shows how different point style configurations look.
+ *
+ * @see http://www.chartjs.org/samples/latest/legend/point-style.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LegendPointStyleConfiguration extends ShowcaseConfiguration {
+ public LegendPointStyleConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setPointStyle(PointStyle.RECT_ROT)
+ .setPointRadius(10)
+ .setData(IntegerValue.of(-40, 20, 30, -70, 12, 60, -30))
+ .setFill(BoundaryFillingMode.ORIGIN);
+
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Point Style Legend"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setLegend(new Legend()
+ .setLabels(new LegendLabel()
+ .setUsePointStyle(true)))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartAreaDatasetConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartAreaDatasetConfiguration.java
new file mode 100644
index 00000000..402b1ab3
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartAreaDatasetConfiguration.java
@@ -0,0 +1,142 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.AbsoluteIndex;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.RelativeIndex;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ *
+ * A sample that shows how a chart with different datasets can be configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/line-datasets.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartAreaDatasetConfiguration extends ShowcaseConfiguration {
+ public LineChartAreaDatasetConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset0 = new Dataset()
+ .setLabel("D0 (hidden), Fill: undefined")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(BoundaryFillingMode.UNDEFINED)
+ .setHidden(true);
+
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("D1 Fill: -1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(new RelativeIndex("-1"));
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("D2 (hidden) Fill: 1")
+ .setBackgroundColor(SimpleColor.ORANGE_TRANSPARENT)
+ .setBorderColor(SimpleColor.ORANGE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setHidden(true)
+ .setFill(new AbsoluteIndex(1));
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("D3 Fill: -1")
+ .setBackgroundColor(SimpleColor.YELLOW_TRANSPARENT)
+ .setBorderColor(SimpleColor.YELLOW)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset4 = new Dataset()
+ .setLabel("D4 Fill: -1")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(new RelativeIndex("-1"));
+
+ Dataset dataset5 = new Dataset()
+ .setLabel("D5 Fill: +2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(new RelativeIndex("+2"));
+
+
+ Dataset dataset6 = new Dataset()
+ .setLabel("D6 Fill: false")
+ .setBackgroundColor(SimpleColor.GREY_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREY)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ Dataset dataset7 = new Dataset()
+ .setLabel("D7 Fill: 8")
+ .setBackgroundColor(SimpleColor.PURPLE_TRANSPARENT)
+ .setBorderColor(SimpleColor.PURPLE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(new AbsoluteIndex(8));
+
+
+ Dataset dataset8 = new Dataset()
+ .setLabel("D8 (hidden) Fill: end")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setHidden(true)
+ .setFill(BoundaryFillingMode.END);
+
+ data.setDatasets(Arrays.asList(dataset0, dataset1, dataset2, dataset3, dataset4,
+ dataset5, dataset6, dataset7, dataset8));
+
+ Options options = new Options()
+ .setMaintainAspectRatio(true)
+ .setSpanGaps(false)
+ .setElements(new Element()
+ .setLine(new Line()
+ .setTension(0.000001)))
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Dataset Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setPlugins(new Plugins()
+ .setFiller(new Filler()
+ .setPropagate(false))
+ .setSamples_filler_analyzer(new SamplesFillerAnalyzer()
+ .setTarget("chart-analyzer")))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setStacked(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartBasicConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartBasicConfiguration.java
new file mode 100644
index 00000000..86c1e218
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartBasicConfiguration.java
@@ -0,0 +1,71 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ *
+ * A sample of a basic line chart configuration.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/basic.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LineChartBasicConfiguration extends ShowcaseConfiguration {
+ public LineChartBasicConfiguration() {
+
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartInterpolatedConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartInterpolatedConfiguration.java
new file mode 100644
index 00000000..43e1dcfb
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartInterpolatedConfiguration.java
@@ -0,0 +1,83 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+import java.util.List;
+/**
+ *
+ * A sample that shows how configuring interpolation of lines in a line chart is configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/interpolation-modes.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartInterpolatedConfiguration extends ShowcaseConfiguration {
+ public LineChartInterpolatedConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ List datasetsData = IntegerValue.of(randomIntegerList(7));
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Cubic interpolation (monotone)")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(datasetsData)
+ .setFill(false)
+ .setCubicInterpolationMode(CubicInterpolationMode.MONOTONE);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Cubic interpolation (default)")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(datasetsData)
+ .setFill(false);
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("Linear interpolation")
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(datasetsData)
+ .setFill(false)
+ .setLineTension(0);
+
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2, dataset3));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart Interpolation"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartMultiAxisConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartMultiAxisConfiguration.java
new file mode 100644
index 00000000..fe82651a
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartMultiAxisConfiguration.java
@@ -0,0 +1,76 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how multiple axes in a line chart are configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/multi-axis.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartMultiAxisConfiguration extends ShowcaseConfiguration{
+ public LineChartMultiAxisConfiguration() {
+ setType(ChartType.LINE);
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setYAxisID("y-axis-1");
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setYAxisID("y-axis-2");
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart - Multi Axis"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setScales(new Scales()
+ .setYAxes(Arrays.asList(new AxesScale()
+ .setType("linear")
+ .setDisplay(true)
+ .setPosition(Position.LEFT)
+ .setId("y-axis-1"),
+ new AxesScale()
+ .setType("linear")
+ .setDisplay(true)
+ .setPosition(Position.RIGHT)
+ .setId("y-axis-2")
+ .setGridLines(new GridLines()
+ .setDrawOnChartArea(false)))))
+
+ ;
+ setOptions(options);
+
+ }
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartProgressBarConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartProgressBarConfiguration.java
new file mode 100644
index 00000000..e16366cb
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartProgressBarConfiguration.java
@@ -0,0 +1,94 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import org.apache.wicket.markup.html.panel.Fragment;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+/**
+ *
+ * A sample that shows how a line chart with a progress bar is configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/advanced/progress-bar.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartProgressBarConfiguration extends ShowcaseConfiguration {
+ public LineChartProgressBarConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ String optionalJavascript= readFile("de/adesso/wickedcharts/showcase/progressBar.js");
+
+ setOptionalJavascript(new ArrayList());
+ addOptionalJavascript(optionalJavascript);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart Progress Bar"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setAnimation(new Animation()
+ .setDuration(2000)
+ .setOnProgress(new CallbackFunction("function(animation) {\r\n" +
+ " progress.value = animation.currentStep / animation.numSteps;\r\n" +
+ " }"))
+ .setOnComplete(new CallbackFunction("function(animation) {\r\n" +
+ " window.setTimeout(function() {\r\n" +
+ " progress.value = 0;\r\n" +
+ " }, 2000);\r\n" +
+ " }")))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+
+ @Override
+ public void modfiyIndividualMarkup(Fragment optionalMarkup) {
+ Fragment frag = new Fragment("optionalMarkup","progressBar",optionalMarkup.getParent());
+ optionalMarkup.replaceWith(frag);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartStackedConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartStackedConfiguration.java
new file mode 100644
index 00000000..2b5c19c3
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartStackedConfiguration.java
@@ -0,0 +1,76 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ *
+ * A sample that shows how a stacked line chart is configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/line-stacked.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartStackedConfiguration extends ShowcaseConfiguration{
+ public LineChartStackedConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("My Third dataset")
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2, dataset3));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Stacked Line Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setStacked(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedAfterConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedAfterConfiguration.java
new file mode 100644
index 00000000..1ee820b3
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedAfterConfiguration.java
@@ -0,0 +1,65 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ *
+ * A sample that shows how a stepped line chart configuration looks with stepped = after.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/stepped.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartSteppedAfterConfiguration extends ShowcaseConfiguration {
+ public LineChartSteppedAfterConfiguration() {
+ super();
+ setType(ChartType.LINE);
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Stepped After")
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setSteppedLine(SteppedLineValue.AFTER);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart Stepped - After"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedBeforeConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedBeforeConfiguration.java
new file mode 100644
index 00000000..a994ff1b
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedBeforeConfiguration.java
@@ -0,0 +1,64 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ *
+ * A sample that shows how a stepped line chart configuration looks with stepped = before.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/stepped.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartSteppedBeforeConfiguration extends ShowcaseConfiguration {
+ public LineChartSteppedBeforeConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Stepped Before")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setSteppedLine(SteppedLineValue.BEFORE);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart Stepped - Before"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartWithDifferentPointSizesConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartWithDifferentPointSizesConfiguration.java
new file mode 100644
index 00000000..21b5a14b
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartWithDifferentPointSizesConfiguration.java
@@ -0,0 +1,93 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+import java.util.Collections;
+/**
+ *
+ * A sample that shows how a line chart can be configured to have different point sizes.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/point-sizes.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartWithDifferentPointSizesConfiguration extends ShowcaseConfiguration {
+ public LineChartWithDifferentPointSizesConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("dataset - big points")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setPointRadius(Collections.nCopies(7, 15))
+ .setPointHoverRadius(10)
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("dataset - individual point sizes")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderDash(Arrays.asList("5", "5"))
+ .setPointRadius(Arrays.asList(2, 4, 6, 18, 0, 12, 20))
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("dataset - large pointHoverRadius")
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setPointHoverRadius(30)
+ .setFill(false);
+
+
+ Dataset dataset4 = new Dataset()
+ .setLabel("dataset - large pointHitRadius")
+ .setBackgroundColor(SimpleColor.YELLOW)
+ .setBorderColor(SimpleColor.YELLOW)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setPointHitRadius(20)
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2,dataset3, dataset4));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart with Different Point Sizes"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineStylesConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineStylesConfiguration.java
new file mode 100644
index 00000000..37049124
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineStylesConfiguration.java
@@ -0,0 +1,79 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ *
+ * A sample that shows how different line styles can be configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/line-styles.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineStylesConfiguration extends ShowcaseConfiguration {
+ public LineStylesConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Filled")
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Unfilled")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("Dashed")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderDash(Arrays.asList("5", "5"))
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2,dataset3));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Styles"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LinearStepSizeConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LinearStepSizeConfiguration.java
new file mode 100644
index 00000000..5ae5ee58
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LinearStepSizeConfiguration.java
@@ -0,0 +1,74 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ *
+ * A sample that shows how a line chart with linear step size is configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/linear/step-size.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LinearStepSizeConfiguration extends ShowcaseConfiguration {
+ public LinearStepSizeConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))
+ .setTicks(new Ticks()
+ .setMin(0)
+ .setMax(100)
+ .setStepSize(5))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicLineChartConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicLineChartConfiguration.java
new file mode 100644
index 00000000..0868a4b1
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicLineChartConfiguration.java
@@ -0,0 +1,71 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ *
+ * A sample that shows how a logarithmic line chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/logarithmic/line.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LogarithmicLineChartConfiguration extends ShowcaseConfiguration {
+ public LogarithmicLineChartConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Logarithmic Line Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setType("logarithmic")
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicScatterChartConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicScatterChartConfiguration.java
new file mode 100644
index 00000000..65e7c8c0
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicScatterChartConfiguration.java
@@ -0,0 +1,84 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.PointValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * A sample that shows how a logarithmic scatter chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/logarithmic/scatter.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LogarithmicScatterChartConfiguration extends ShowcaseConfiguration {
+ public LogarithmicScatterChartConfiguration() {
+ super();
+ setType(ChartType.SCATTER);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(Arrays.asList(
+ new PointValue(4,14),
+ new PointValue(40,42),
+ new PointValue(23,42),
+ new PointValue(40,22),
+ new PointValue(80,12),
+ new PointValue(30,32)))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(Arrays.asList(
+ new PointValue(7,56),
+ new PointValue(15,54),
+ new PointValue(46,34),
+ new PointValue(36,42),
+ new PointValue(78,64),
+ new PointValue(12,48)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Logarithmic Scatter Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setType("logarithmic")
+ .setPosition(Position.BOTTOM)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Frequency")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setType("linear")
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Voltage"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxConfiguration.java
new file mode 100644
index 00000000..f1a74136
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxConfiguration.java
@@ -0,0 +1,59 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how to configure min and max Ticks in the chart options.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/linear/min-max.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class MinMaxConfiguration extends ShowcaseConfiguration {
+ public MinMaxConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(Arrays.asList(10, 30, 39, 20, 25, 34, -10)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(Arrays.asList(100, 33, 22, 19, 11, 49, 30)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Min and Max"))
+ .setScales(new Scales()
+ .setYAxes(new AxesScale()
+ .setTicks(new Ticks()
+ .setMin(10)
+ .setMax(50))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxSuggestedConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxSuggestedConfiguration.java
new file mode 100644
index 00000000..7f02e1be
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxSuggestedConfiguration.java
@@ -0,0 +1,59 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how to configure suggestedMin and suggestedMax Ticks in the chart options.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/linear/min-max-suggested.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class MinMaxSuggestedConfiguration extends ShowcaseConfiguration {
+ public MinMaxSuggestedConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(Arrays.asList(10, 30, 50, 20, 25, 44, -10)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(Arrays.asList(18, 33, 22, 19, 11, 39, 30)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Min and Max - Suggested"))
+ .setScales(new Scales()
+ .setYAxes(new AxesScale()
+ .setTicks(new Ticks()
+ .setSuggestedMin(10)
+ .setSuggestedMax(50))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/MultilineLabelsConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/MultilineLabelsConfiguration.java
new file mode 100644
index 00000000..f20c6e25
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/MultilineLabelsConfiguration.java
@@ -0,0 +1,68 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextListLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how to configure multiline labels.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/multiline-labels.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class MultilineLabelsConfiguration extends ShowcaseConfiguration {
+
+ public MultilineLabelsConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(Arrays.asList(
+ new TextListLabel("June","2015"),
+ new TextLabel("July"),
+ new TextLabel("August"),
+ new TextLabel("September"),
+ new TextLabel("October"),
+ new TextLabel("November"),
+ new TextLabel("December"),
+ new TextListLabel("January","2016"),
+ new TextLabel("February"),
+ new TextLabel("March"),
+ new TextLabel("April"),
+ new TextLabel("May")
+ ));
+
+ Dataset dataset1 = new Dataset()
+ .setData(IntegerValue.of(randomIntegerList(12)))
+ .setLabel("My First dataset")
+ .setFill(false)
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED);
+
+ Dataset dataset2 = new Dataset()
+ .setData(IntegerValue.of(randomIntegerList(12)))
+ .setLabel("My Second dataset")
+ .setFill(false)
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ setData(data);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart with Multiline Labels"));
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/NonNumericConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/NonNumericConfiguration.java
new file mode 100644
index 00000000..6f8a6672
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/NonNumericConfiguration.java
@@ -0,0 +1,66 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.ConstLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.ConstValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how to configure non-numeric values in a chart.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/non-numeric-y.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class NonNumericConfiguration extends ShowcaseConfiguration {
+
+ public NonNumericConfiguration() {
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setXLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"))
+ .setYLabels(ConstLabel.of("", "Request Added", "Request Viewed", "Request Accepted", "Request Solved", "Solving Confirmed"))
+ ;
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First Dataset")
+ .setFill(false)
+ .setBorderColor(SimpleColor.RED)
+ .setBackgroundColor(SimpleColor.RED)
+ .setData(ConstValue.of("", "Request Added", "Request Added", "Request Added", "Request Viewed", "Request Viewed", "Request Viewed"))
+ ;
+ data.setDatasets(Arrays.asList(dataset1));
+ setData(data);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart with Non Numeric Y Axis"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setType("category")
+ .setPosition(Position.LEFT)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Request State"))
+ .setTicks(new Ticks()
+ .setReverse(true))))
+ ;
+ setOptions(options);
+
+
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/OtherRadarChartConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/OtherRadarChartConfiguration.java
new file mode 100644
index 00000000..908964a7
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/OtherRadarChartConfiguration.java
@@ -0,0 +1,64 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextListLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * Sample that displays different datasets on a radar.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/radar.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class OtherRadarChartConfiguration extends ShowcaseConfiguration {
+ public OtherRadarChartConfiguration() {
+ super();
+ setType(ChartType.RADAR);
+
+ Data data = new Data()
+ .setLabels(Arrays.asList(
+ new TextListLabel("Eating", "Dinner"),
+ new TextListLabel("Drining", "Water"),
+ new TextLabel("Sleeping"),
+ new TextListLabel("Designing","Graphics"),
+ new TextLabel("Coding"),
+ new TextLabel("Cycling"),
+ new TextLabel("Running")
+ ));
+ setData(data);
+
+ Dataset dataset0 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setPointBackgroundColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My second dataset")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setPointBackgroundColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ data.setDatasets(Arrays.asList(dataset0, dataset1));
+
+ Options options = new Options()
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Radar Chart"))
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setScale(new Scale()
+ .setTicks(new Ticks()
+ .setBeginAtZero(true)));
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/PieChartConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/PieChartConfiguration.java
new file mode 100644
index 00000000..9301accc
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/PieChartConfiguration.java
@@ -0,0 +1,44 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
+import de.adesso.wickedcharts.chartjs.chartoptions.Data;
+import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
+import de.adesso.wickedcharts.chartjs.chartoptions.Options;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that displays a dataset as a pie chart.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/pie.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class PieChartConfiguration extends ShowcaseConfiguration {
+ public PieChartConfiguration() {
+ super();
+ setType(ChartType.PIE);
+
+ Data data = new Data();
+
+ Dataset dataset = new Dataset()
+ .setData(IntegerValue.of(randomIntegerList(5)))
+ .setBackgroundColor(
+ Arrays.asList(SimpleColor.RED,SimpleColor.ORANGE, SimpleColor.YELLOW, SimpleColor.GREEN, SimpleColor.BLUE))
+ .setLabel("Dataset 1");
+
+ data.setDatasets(Arrays.asList(dataset)).setLabels(TextLabel.of("Red", "Orange", "Yellow", "Green", "Blue"));
+
+ setData(data);
+ Options options = new Options()
+ .setResponsive(true);
+ setOptions(options);
+
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/PointStylesConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/PointStylesConfiguration.java
new file mode 100644
index 00000000..a61d0dc1
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/PointStylesConfiguration.java
@@ -0,0 +1,181 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * Sample that supports different point styles:
+ * 'circle',
+ * 'triangle',
+ * 'rect',
+ * 'rectRounded',
+ * 'rectRot',
+ * 'cross',
+ * 'crossRot',
+ * 'star',
+ * 'line',
+ * 'dash'
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/point-styles.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class PointStylesConfiguration extends ShowcaseConfiguration {
+ public PointStylesConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dash")
+ .setBackgroundColor(SimpleColor.GREY)
+ .setBorderColor(SimpleColor.GREY)
+ .setData(IntegerValue.of(Arrays.asList(1,1,1,1,1,1,1)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.DASH)
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Star")
+ .setBackgroundColor(SimpleColor.PURPLE)
+ .setBorderColor(SimpleColor.PURPLE)
+ .setData(IntegerValue.of(Arrays.asList(2,2,2,2,2,2,2)))
+ .setShowLine(false)
+ .setPointRadius(20)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.STAR)
+ .setFill(false);
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("Rectangle")
+ .setBackgroundColor(SimpleColor.YELLOW)
+ .setBorderColor(SimpleColor.YELLOW)
+ .setData(IntegerValue.of(Arrays.asList(3,3,3,3,3,3,3)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.RECT)
+ .setFill(false);
+
+ Dataset dataset4 = new Dataset()
+ .setLabel("Triangle")
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(Arrays.asList(4,4,4,4,4,4,4)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.TRIANGLE)
+ .setFill(false);
+
+ Dataset dataset5 = new Dataset()
+ .setLabel("Circle")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(Arrays.asList(5,5,5,5,5,5,5)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.CIRCLE)
+ .setFill(false);
+
+ Dataset dataset6 = new Dataset()
+ .setLabel("CrossRot")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(Arrays.asList(6,6,6,6,6,6,6)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.CROSS_ROT)
+ .setFill(false);
+
+ Dataset dataset7 = new Dataset()
+ .setLabel("Line")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED_TRANSPARENT)
+ .setData(IntegerValue.of(Arrays.asList(7,7,7,7,7,7,7)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.LINE)
+ .setFill(false);
+
+ Dataset dataset8 = new Dataset()
+ .setLabel("Cross")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE_TRANSPARENT)
+ .setData(IntegerValue.of(Arrays.asList(8,8,8,8,8,8,8)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.CROSS)
+ .setFill(false);
+
+ Dataset dataset9 = new Dataset()
+ .setLabel("Rectangle Rounded")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(Arrays.asList(9,9,9,9,9,9,9)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.RECT_ROUNDED)
+ .setFill(false);
+
+ Dataset dataset10 = new Dataset()
+ .setLabel("Rectangle Rotated")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN_TRANSPARENT)
+ .setData(IntegerValue.of(Arrays.asList(11,11,11,11,11,11,11)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.RECT_ROT)
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1, dataset2, dataset3, dataset4, dataset5, dataset6,
+ dataset7, dataset8, dataset9, dataset10));
+
+ //Point Style Can also be set in the options using the Elements option
+ //But you can only have one point style for all datasets
+
+ //Some Point Styles are drawn incorrectly
+ //See this issue: https://github.com/chartjs/Chart.js/issues/2607
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Point Styles"))
+ .setLegend(new Legend()
+ .setPosition(Position.RIGHT))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))
+ .setTicks(new Ticks()
+ .setMax(13)
+ .setMin(0))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/PolarAreaChartConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/PolarAreaChartConfiguration.java
new file mode 100644
index 00000000..c90785d3
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/PolarAreaChartConfiguration.java
@@ -0,0 +1,54 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * Sample that distributes data in a polar area chart.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/polar-area.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class PolarAreaChartConfiguration extends ShowcaseConfiguration {
+ public PolarAreaChartConfiguration() {
+ super();
+ setType(ChartType.POLAR_AREA);
+
+ Data data = new Data();
+
+ Dataset dataset = new Dataset()
+ .setData(IntegerValue.of(randomIntegerList(5)))
+ .setBackgroundColor(
+ Arrays.asList(SimpleColor.RED_TRANSPARENT,SimpleColor.ORANGE_TRANSPARENT,
+ SimpleColor.YELLOW_TRANSPARENT, SimpleColor.GREEN_TRANSPARENT,
+ SimpleColor.BLUE_TRANSPARENT))
+ .setLabel("Dataset 1");
+
+ data.setDatasets(Arrays.asList(dataset)).setLabels(TextLabel.of("Red", "Orange", "Yellow", "Green", "Blue"));
+
+ setData(data);
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("ChartJs Polar Area Chart"))
+ .setLegend(new Legend()
+ .setPosition(Position.RIGHT))
+ .setScale(new Scale()
+ .setTicks(new Ticks()
+ .setBeginAtZero(true))
+ .setReverse(false))
+ .setAnimation(new Animation()
+ .setAnimateScale(true)
+ .setAnimateRotate(false));
+ setOptions(options);
+
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/RadarChartConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/RadarChartConfiguration.java
new file mode 100644
index 00000000..0f5af3a3
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/RadarChartConfiguration.java
@@ -0,0 +1,97 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.AbsoluteIndex;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.RelativeIndex;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * Sample that displays different datasets on a radar.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/radar.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class RadarChartConfiguration extends ShowcaseConfiguration {
+ public RadarChartConfiguration() {
+ super();
+ setType(ChartType.RADAR);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset0 = new Dataset()
+ .setLabel("D0")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(Arrays.asList(1, 2, 3, 1, 2, 1, 2)))
+ .setFill(BoundaryFillingMode.UNDEFINED);
+
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("D1 (hidden) Fill: -1")
+ .setBackgroundColor(SimpleColor.ORANGE_TRANSPARENT)
+ .setBorderColor(SimpleColor.ORANGE)
+ .setData(IntegerValue.of(Arrays.asList(5, 4, 3, 5, 4, 3, 5)))
+ .setHidden(true)
+ .setFill(new RelativeIndex("-1"));
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("D2 Fill: 1")
+ .setBackgroundColor(SimpleColor.YELLOW)
+ .setBorderColor(SimpleColor.YELLOW_TRANSPARENT)
+ .setData(IntegerValue.of(Arrays.asList(10, 8, 12, 6, 13, 10, 9)))
+ .setFill(new AbsoluteIndex(1));
+
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("D3 Fill: False")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(Arrays.asList(20, 18, 22, 16, 23, 20, 19)))
+ .setFill(false);
+
+ Dataset dataset4 = new Dataset()
+ .setLabel("D4 Fill: -1")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(Arrays.asList(30, 28, 32, 26, 33, 30, 29)))
+ .setFill(new RelativeIndex("-1"));
+
+
+ Dataset dataset5 = new Dataset()
+ .setLabel("D5 Fill: -1")
+ .setBackgroundColor(SimpleColor.PURPLE_TRANSPARENT)
+ .setBorderColor(SimpleColor.PURPLE)
+ .setData(IntegerValue.of(Arrays.asList(40, 38, 42, 36, 43, 40, 39)))
+ .setFill(new RelativeIndex("-1"));
+
+ data.setDatasets(Arrays.asList(dataset0, dataset1, dataset2, dataset3, dataset4, dataset5));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Radar Chart"))
+ .setMaintainAspectRatio(true)
+ .setSpanGaps(false)
+ .setElements(new Element()
+ .setLine(new Line()
+ .setTension(0.000001)))
+ .setPlugins(new Plugins()
+ .setFiller(new Filler()
+ .setPropagate(false))
+ .setSamples_filler_analyzer(new SamplesFillerAnalyzer()
+ .setTarget("chart-analyzer")))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartConfiguration.java
new file mode 100644
index 00000000..476958d6
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartConfiguration.java
@@ -0,0 +1,78 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.PointValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * Sample which displays data as scattered points in the coordinate system.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/scatter/basic.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class ScatterChartConfiguration extends ShowcaseConfiguration {
+ public ScatterChartConfiguration() {
+ super();
+ setType(ChartType.SCATTER);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(Arrays.asList(
+ new PointValue(4,14),
+ new PointValue(40,42),
+ new PointValue(23,42),
+ new PointValue(40,22),
+ new PointValue(80,12),
+ new PointValue(30,32)))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(Arrays.asList(
+ new PointValue(7,56),
+ new PointValue(15,54),
+ new PointValue(46,34),
+ new PointValue(36,42),
+ new PointValue(78,64),
+ new PointValue(12,48)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Scatter Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setType("linear")
+ .setPosition(Position.BOTTOM)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartMultiAxisConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartMultiAxisConfiguration.java
new file mode 100644
index 00000000..46b4e604
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartMultiAxisConfiguration.java
@@ -0,0 +1,90 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.RgbaColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.PointValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * Sample that displays a scatter chart with two y-axes.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/scatter/multi-axis.html
+ *
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class ScatterChartMultiAxisConfiguration extends ShowcaseConfiguration {
+ public ScatterChartMultiAxisConfiguration() {
+ super();
+ setType(ChartType.SCATTER);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setYAxisID("y-axis-1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(Arrays.asList(
+ new PointValue(4,14),
+ new PointValue(40,42),
+ new PointValue(23,42),
+ new PointValue(40,22),
+ new PointValue(80,12),
+ new PointValue(30,32)))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setYAxisID("y-axis-2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(Arrays.asList(
+ new PointValue(7,56),
+ new PointValue(15,54),
+ new PointValue(46,34),
+ new PointValue(36,42),
+ new PointValue(78,64),
+ new PointValue(12,48)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Scatter Chart Multi Axis"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setType("linear")
+ .setPosition(Position.BOTTOM)
+ .setGridLines(new GridLines()
+ .setZeroLineColor(new RgbaColor(0, 0, 0, 1)))
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(Arrays.asList(new AxesScale()
+ .setType("linear")
+ .setDisplay(true)
+ .setPosition(Position.LEFT)
+ .setId("y-axis-1"),
+ new AxesScale()
+ .setType("linear")
+ .setDisplay(true)
+ .setPosition(Position.RIGHT)
+ .setReverse(true)
+ .setId("y-axis-2")
+ .setGridLines(new GridLines()
+ .setDrawOnChartArea(false)))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeComboConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeComboConfiguration.java
new file mode 100644
index 00000000..ef00d8aa
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeComboConfiguration.java
@@ -0,0 +1,86 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import org.apache.wicket.Session;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+/**
+ * Sample which displays a bar chart for the data distribution and a line chart for the time progression of datasets.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/time/combo.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TimeComboConfiguration extends ShowcaseConfiguration {
+
+
+ public TimeComboConfiguration() {
+ setType(ChartType.BAR);
+
+ String timeFormat = "MM/DD/YYYY HH:mm";
+
+ List labels = new ArrayList(7);
+
+ LocalDateTime now = LocalDateTime.now();
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM/dd/uuuu HH:mm", Session.get().getLocale());
+
+
+ for(int i = 0; i < 7; i++) {
+ labels.add(new TextLabel(now.plus(i,ChronoUnit.DAYS).format(formatter)));
+ }
+
+ Dataset dataset1 = new Dataset()
+ .setType(ChartType.BAR)
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ Dataset dataset2 = new Dataset()
+ .setType(ChartType.BAR)
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ Dataset dataset3 = new Dataset()
+ .setType(ChartType.LINE)
+ .setLabel("Dataset 3")
+ .setFill(false)
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+
+
+ setData( new Data()
+ .setLabels(labels)
+ .setDatasets(Arrays.asList(dataset1,dataset2,dataset3))
+ );
+
+
+
+ setOptions( new Options()
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Combo Time Scale"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setType("time")
+ .setDisplay(true)
+ .setTime(new TimeFormat()
+ .setFormat(timeFormat)
+// .setRound(TimeFormatRound.DAY)
+ ))));
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeLineConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeLineConfiguration.java
new file mode 100644
index 00000000..b625b6ef
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeLineConfiguration.java
@@ -0,0 +1,125 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.DateTimeLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.PointValue;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.StringValue;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.ValueType;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Random;
+/**
+ * Sample which displays a time progression line for datasets.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/time/line.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TimeLineConfiguration extends ShowcaseConfiguration {
+
+ public TimeLineConfiguration() {
+ setType(ChartType.LINE);
+
+ Data data = new Data();
+
+ String timeFormat = "MM/DD/YYYY HH:mm";
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern(timeFormat);
+
+ List dateList = new ArrayList();
+ for(int i = 0; i < 7; i++) {
+ dateList.add(new DateTimeLabel(LocalDateTime.of(2018, 1,1, 8+i, 00)));
+ }
+ data.setLabels(dateList);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First Dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setFill(false)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ ;
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second Dataset")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setFill(false)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ ;
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("Dataset with point data")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN)
+ .setFill(false)
+ .setData(Arrays.asList(
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(0).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(1).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(2).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(3).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(4).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(5).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(6).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(LocalDateTime.of(2018, 1, 1, 15, 0))))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(LocalDateTime.of(2018, 1, 1, 16, 0))))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(LocalDateTime.of(2018, 1, 1, 17, 0))))
+ .setY(randomInteger())
+ ))
+ ;
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2,dataset3));
+ setData(data);
+
+ Options options = new Options()
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Time Scale"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setType("time")
+ .setTime(new TimeFormat()
+ .setTimeFormat(timeFormat )
+ .setTooltipFormat("ll HH:mm")))
+ .setYAxes(new AxesScale()
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("value"))));
+ setOptions(options);
+
+
+ }
+
+ private ValueType randomInteger() {
+ Random rng = new Random();
+ return new IntegerValue(rng.nextInt(60)+1);
+ }
+
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimePointConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimePointConfiguration.java
new file mode 100644
index 00000000..a5001616
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimePointConfiguration.java
@@ -0,0 +1,137 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.StringValueColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.DateTimeLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.*;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Random;
+/**
+ * Sample which highlights the important points of the x-axis.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/time/line-point-data.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TimePointConfiguration extends ShowcaseConfiguration {
+
+
+ public TimePointConfiguration() {
+ setType(ChartType.LINE);
+
+ String timeFormat = "MM/DD/YYYY HH:mm";
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern(timeFormat);
+
+ Data data = new Data();
+
+ List dateList = new ArrayList();
+ for(int i = 0; i < 7; i++) {
+ dateList.add(new DateTimeLabel(LocalDateTime.of(2018, 1,1, 8+i, 00)));
+ }
+ data.setLabels(dateList);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset with date object point data")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setFill(false)
+ .setData(Arrays.asList(
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(0).getDate()))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(1).getDate()))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(2).getDate()))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(3).getDate()))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(4).getDate()))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(5).getDate()))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(6).getDate()))
+ .setY(randomInteger())
+ ));
+
+
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset with string point data")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setFill(false)
+ .setData(Arrays.asList(
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(0).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(1).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(2).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(3).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(4).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(5).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(6).getDate())))
+ .setY(randomInteger())
+ ))
+ ;
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+ setData(data);
+
+ Options options = new Options()
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Time Scale"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setType("time")
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Date"))
+ .setTicks(new Ticks()
+ .setMajor(new TickStyle()
+ .setFontColor(new StringValueColor("red"))
+ .setFontStyle(FontStyle.BOLD))))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("value"))));
+ setOptions(options);
+
+
+ }
+
+ private ValueType randomInteger() {
+ Random rng = new Random();
+ return new IntegerValue(rng.nextInt(60)+1);
+ }
+
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeSeriesConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeSeriesConfiguration.java
new file mode 100644
index 00000000..230710e2
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeSeriesConfiguration.java
@@ -0,0 +1,93 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.DateTimeLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.DoubleValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.time.LocalDateTime;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+/**
+ * Sample that displays a progression of a dataset.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/time/financial.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TimeSeriesConfiguration extends ShowcaseConfiguration {
+
+ public TimeSeriesConfiguration() {
+
+
+ Options options = new Options()
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("ChartJs Time Series"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setType("time")
+ .setDistribution(DistributionType.SERIES)
+ .setTicks(new Ticks()
+ .setSource(TickSource.LABELS)
+ )
+ )
+ .setYAxes(new AxesScale()
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Closing price ($)"))
+ ));
+
+ setOptions(options);
+
+ setType(ChartType.LINE);
+
+ LocalDateTime now = LocalDateTime.now();
+
+
+ List labels = new ArrayList(60);
+ List randomData = new ArrayList(60);
+
+ labels.add(new DateTimeLabel(now));
+ randomData.add(randomBar(30));
+
+
+ for(int i = 1; i < 60; i++) {
+ int dayOfTheWeek = now.plus(i, ChronoUnit.DAYS).getDayOfWeek().getValue();
+ if( 1 <= dayOfTheWeek && dayOfTheWeek <= 5) {
+ labels.add(new DateTimeLabel(now.plus(i, ChronoUnit.DAYS)));
+ }
+ randomData.add(randomBar(randomData.get(i-1).getValue()));
+ }
+
+
+
+ Data data = new Data()
+ .setLabels(labels)
+ .setDatasets(Arrays.asList(new Dataset()
+ .setLabel("My Dataset")
+ .setData(randomData)
+ .setType(ChartType.LINE)
+ .setPointRadius(0)
+ .setFill(false)
+ .setLineTension(0)
+ .setBorderWidth(2)
+ ));
+ setData(data);
+ }
+
+ private DoubleValue randomBar(double lastClose) {
+ double open = randomNumber(lastClose * .95, lastClose *1.05);
+ double close = randomNumber(open * .95, open *1.05);
+// double high = randomNumber(Math.max(open, close), Math.max(open, close) * 1.1);
+// double low = randomNumber(Math.min(open, close) * .9, Math.min(open, close));
+ return new DoubleValue(close);
+ }
+
+ private double randomNumber(double min, double max) {
+ return Math.random() * (max - min) + min;
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipAverageConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipAverageConfiguration.java
new file mode 100644
index 00000000..866b6ca1
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipAverageConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * Sample that enables tooltips to be at a average position to the data points.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/positioning.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipAverageConfiguration extends ShowcaseConfiguration {
+ public TooltipAverageConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Tooltip Average Position"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setPosition(TooltipPosition.AVERAGE)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipBorderConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipBorderConfiguration.java
new file mode 100644
index 00000000..0ecd5c28
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipBorderConfiguration.java
@@ -0,0 +1,61 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.RgbColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.RgbaColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * Sample which adds a border to the tooltips.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/border.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipBorderConfiguration extends ShowcaseConfiguration {
+ public TooltipBorderConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(10, 30, 46, 2,8,50,0))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+
+ RgbColor black = new RgbColor(0,0,0);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Tooltip with border"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setPosition(TooltipPosition.NEAREST)
+ .setIntersect(false)
+ .setYPadding(10)
+ .setXPadding(10)
+ .setCaretSize(8)
+ .setBackgroundColor(new RgbaColor(72, 241, 12,1.0f))
+ .setTitleFontColor(black)
+ .setBodyFontColor(black)
+ .setBorderColor(new RgbaColor(0,0,0,1.0f))
+ .setBorderWidth(4))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipCallbacksConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipCallbacksConfiguration.java
new file mode 100644
index 00000000..6021061c
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipCallbacksConfiguration.java
@@ -0,0 +1,80 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * Sample that enables the use of callback functions for tooltips.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/callbacks.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipCallbacksConfiguration extends ShowcaseConfiguration {
+ public TooltipCallbacksConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ String footerFunction = "function(tooltipItems, data) {\r\n" +
+ " var sum = 0;\r\n" +
+ "\r\n" +
+ " tooltipItems.forEach(function(tooltipItem) {\r\n" +
+ " sum += data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index];\r\n" +
+ " });\r\n" +
+ " return 'Sum: ' + sum;\r\n" +
+ " }";
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Custom Information in Tooltip"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setCallbacks(new TooltipCallbacks()
+ .setFooter(new CallbackFunction(footerFunction)))
+ .setFooterFontStyle(FontStyle.NORMAL))
+ .setHover(new Hover()
+ .setMode(HoverMode.INDEX)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlLineConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlLineConfiguration.java
new file mode 100644
index 00000000..5f2c32e0
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlLineConfiguration.java
@@ -0,0 +1,63 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+/**
+ * Sample that enables the use of custom html markup for tooltips in a line chart.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/custom-line.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipHtmlLineConfiguration extends ShowcaseConfiguration {
+ public TooltipHtmlLineConfiguration() {
+ setType(ChartType.LINE);
+
+ String optionalJavascript= readFile("de/adesso/wickedcharts/showcase/customTooltip.js");
+
+ setOptionalJavascript(new ArrayList());
+ addOptionalJavascript(optionalJavascript);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("HTML Tooltip - Line"))
+ .setTooltips(new Tooltips()
+ .setEnabled(false)
+ .setMode(TooltipMode.INDEX)
+ .setPosition(TooltipPosition.NEAREST)
+ .setCustom(new JavaScriptReference("customTooltips"))
+ );
+ setOptions(options);
+ }
+
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPieConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPieConfiguration.java
new file mode 100644
index 00000000..0fd8d84d
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPieConfiguration.java
@@ -0,0 +1,58 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import org.apache.wicket.markup.html.panel.Fragment;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+/**
+ * Sample that enables the use of custom html markup for tooltips in a pie chart.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/custom-pie.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipHtmlPieConfiguration extends ShowcaseConfiguration {
+ public TooltipHtmlPieConfiguration() {
+ setType(ChartType.PIE);
+
+ String optionalJavascript=readFile("de/adesso/wickedcharts/showcase/customTooltip-Pie.js");
+
+ setOptionalJavascript(new ArrayList());
+ addOptionalJavascript(optionalJavascript);
+
+ Data data = new Data();
+ setData(data);
+
+ Dataset dataset = new Dataset()
+ .setLabel("My Dataset")
+ .setBackgroundColor(Arrays.asList(SimpleColor.RED,SimpleColor.ORANGE,SimpleColor.YELLOW, SimpleColor.GREEN, SimpleColor.BLUE))
+ .setData(IntegerValue.of(300, 50, 100, 40, 10));
+
+ data.setDatasets(Arrays.asList(dataset)).setLabels(TextLabel.of("Red", "Orange", "Yellow", "Green", "Blue"));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setLegend(new Legend()
+ .setDisplay(true))
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("HTML Tooltip - Pie"))
+ .setTooltips(new Tooltips()
+ .setEnabled(false)
+// .setCustom(new JavaScriptReference("customTooltips"))
+ );
+ setOptions(options);
+ }
+
+ @Override
+ public void modfiyIndividualMarkup(Fragment optionalMarkup) {
+ Fragment frag = new Fragment("optionalMarkup","pieTooltip",optionalMarkup.getParent());
+ optionalMarkup.replaceWith(frag);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPointsConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPointsConfiguration.java
new file mode 100644
index 00000000..247c5dbd
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPointsConfiguration.java
@@ -0,0 +1,69 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import org.apache.wicket.markup.html.panel.Fragment;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+/**
+ * Sample that enables the use of custom html markup for tooltip points.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/custom-points.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipHtmlPointsConfiguration extends ShowcaseConfiguration {
+ public TooltipHtmlPointsConfiguration() {
+ setType(ChartType.LINE);
+
+ String optionalJavascript=readFile("de/adesso/wickedcharts/showcase/customTooltip-Point.js");
+
+ setOptionalJavascript(new ArrayList());
+ addOptionalJavascript(optionalJavascript);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setPointBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setPointBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("HTML Tooltip - Points"))
+ .setTooltips(new Tooltips()
+ .setEnabled(false)
+ .setIntersect(false)
+ .setMode(TooltipMode.INDEX)
+ .setCustom(new JavaScriptReference("customTooltips"))
+ );
+ setOptions(options);
+ }
+
+ @Override
+ public void modfiyIndividualMarkup(Fragment optionalMarkup) {
+ Fragment frag = new Fragment("optionalMarkup","pointTooltip",optionalMarkup.getParent());
+ optionalMarkup.replaceWith(frag);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipNearestConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipNearestConfiguration.java
new file mode 100644
index 00000000..cef3a5a1
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipNearestConfiguration.java
@@ -0,0 +1,68 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that enables tooltips to be at the nearest possible position to the data points.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/positioning.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipNearestConfiguration extends ShowcaseConfiguration {
+ public TooltipNearestConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Tooltip Nearest Position"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setPosition(TooltipPosition.NEAREST)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/base/ShowcaseConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/base/ShowcaseConfiguration.java
new file mode 100644
index 00000000..b15b4d9f
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/base/ShowcaseConfiguration.java
@@ -0,0 +1,58 @@
+package de.adesso.wickedcharts.showcase.configurations.base;
+
+import de.adesso.wickedcharts.chartjs.ChartConfiguration;
+import org.apache.wicket.markup.html.panel.Fragment;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+import java.util.Scanner;
+
+/**
+ * The base class for all chart configurations for the showcase
+ */
+@SuppressWarnings("serial")
+public abstract class ShowcaseConfiguration extends ChartConfiguration implements Serializable {
+
+ protected List randomIntegerList(int size) {
+ List dataList = new ArrayList();
+ Random rng = new Random();
+ for (int i = 0; i < size; i++) {
+ dataList.add(rng.nextInt(60) + 1);
+ }
+ return dataList;
+ }
+
+ protected String readFile(String fileName) {
+
+ StringBuilder result = new StringBuilder("");
+
+ // Get file from resources folder
+ ClassLoader classLoader = getClass().getClassLoader();
+ File file = new File(classLoader.getResource(fileName).getFile());
+
+ try (Scanner scanner = new Scanner(file)) {
+
+ while (scanner.hasNextLine()) {
+ String line = scanner.nextLine();
+ result.append(line).append("\n");
+ }
+
+ scanner.close();
+
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ return result.toString();
+
+ }
+
+ public void modfiyIndividualMarkup(Fragment optionalMarkup) {
+ Fragment frag = new Fragment("optionalMarkup","defaultTooltip",optionalMarkup.getParent());
+ optionalMarkup.replaceWith(frag);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLineStylesConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLineStylesConfiguration.java
new file mode 100644
index 00000000..c54b2548
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLineStylesConfiguration.java
@@ -0,0 +1,74 @@
+package de.adesso.wickedcharts.showcase.configurations.gridlines;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.StringValueColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+
+/**
+ *
+ * Chart configuration for different grid line styles.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/gridlines-style.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class GridLineStylesConfiguration extends ShowcaseConfiguration {
+ public GridLineStylesConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(Arrays.asList(10, 30, 39, 20, 25, 34, -10)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(Arrays.asList(18, 33, 22, 19, 11, 39, 30)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Gridlines - Styles"))
+ .setScales(new Scales()
+ .setYAxes(new AxesScale()
+ .setGridLines(new GridLines()
+ .setDrawBorder(true)
+ .setColor(Arrays.asList(
+ new StringValueColor("pink"),
+ new StringValueColor("red"),
+ new StringValueColor("orange"),
+ new StringValueColor("yellow"),
+ new StringValueColor("green"),
+ new StringValueColor("blue"),
+ new StringValueColor("indigo"),
+ new StringValueColor("purple"))))
+ .setTicks(new Ticks()
+ .setMin(0)
+ .setMax(100)
+ .setStepSize(10))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesBasicConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesBasicConfiguration.java
new file mode 100644
index 00000000..ea0a665c
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesBasicConfiguration.java
@@ -0,0 +1,69 @@
+package de.adesso.wickedcharts.showcase.configurations.gridlines;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * Chart configuration for the basic grid line layout.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/gridlines-display.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class GridLinesBasicConfiguration extends ShowcaseConfiguration {
+
+ protected GridLines gridLines;
+
+ public GridLinesBasicConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(10, 30, 39, 20, 25, 34, -10))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(Arrays.asList(18, 33, 22, 19, 11, 39, 30)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ gridLines = new GridLines()
+ .setDisplay(true);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Gridlines - Basic"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setGridLines(gridLines))
+ .setYAxes(new AxesScale()
+ .setGridLines(gridLines)
+ .setTicks(new Ticks()
+ .setMin(0)
+ .setMax(100)
+ .setStepSize(10))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesChartAreaConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesChartAreaConfiguration.java
new file mode 100644
index 00000000..b45bc4c9
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesChartAreaConfiguration.java
@@ -0,0 +1,27 @@
+package de.adesso.wickedcharts.showcase.configurations.gridlines;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+
+/**
+ *
+ * Chart configuration for the area chart grid line layout.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/gridlines-display.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class GridLinesChartAreaConfiguration extends GridLinesBasicConfiguration {
+
+ public GridLinesChartAreaConfiguration() {
+ super();
+
+ gridLines.setDisplay(true)
+ .setDrawBorder(true)
+ .setDrawOnChartArea(false);
+ getOptions().setTitle(new Title()
+ .setDisplay(true)
+ .setText("Gridlines - Chart Area"));
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseConfiguration.java
new file mode 100644
index 00000000..171a41fe
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseConfiguration.java
@@ -0,0 +1,25 @@
+package de.adesso.wickedcharts.showcase.configurations.gridlines;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+
+/**
+ *
+ * Chart configuration in order to not display grid lines.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/gridlines-display.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class GridLinesDisplayFalseConfiguration extends GridLinesBasicConfiguration {
+
+ public GridLinesDisplayFalseConfiguration() {
+ super();
+
+ gridLines.setDisplay(false);
+ getOptions().setTitle(new Title()
+ .setDisplay(true)
+ .setText("Gridlines - Display False"));
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseNoBorderConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseNoBorderConfiguration.java
new file mode 100644
index 00000000..2893b59a
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseNoBorderConfiguration.java
@@ -0,0 +1,25 @@
+package de.adesso.wickedcharts.showcase.configurations.gridlines;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+
+/**
+ *
+ * Chart configuration in order to not display grid lines and axes.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/gridlines-display.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class GridLinesDisplayFalseNoBorderConfiguration extends GridLinesBasicConfiguration {
+
+ public GridLinesDisplayFalseNoBorderConfiguration() {
+ super();
+
+ gridLines.setDisplay(false)
+ .setDrawBorder(false);
+ getOptions().setTitle(new Title()
+ .setDisplay(true)
+ .setText("Gridlines - Display False No Border"));
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesTicksConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesTicksConfiguration.java
new file mode 100644
index 00000000..9c05bfd8
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesTicksConfiguration.java
@@ -0,0 +1,28 @@
+package de.adesso.wickedcharts.showcase.configurations.gridlines;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+
+/**
+ *
+ * Chart configuration in order to not display the ticks.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/gridlines-display.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class GridLinesTicksConfiguration extends GridLinesBasicConfiguration {
+
+ public GridLinesTicksConfiguration() {
+ super();
+
+ gridLines.setDisplay(true)
+ .setDrawBorder(true)
+ .setDrawOnChartArea(true)
+ .setDrawTicks(false);
+ getOptions().setTitle(new Title()
+ .setDisplay(true)
+ .setText("Gridlines - Ticks"));
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectFalseConfiguration.java
new file mode 100644
index 00000000..14418fb1
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectFalseConfiguration.java
@@ -0,0 +1,66 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * If intersect false the nearest item is used to determine the index.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class DatasetIntersectFalseConfiguration extends ShowcaseConfiguration {
+ public DatasetIntersectFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Dataset, intersect: false"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.DATASET)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectTrueConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectTrueConfiguration.java
new file mode 100644
index 00000000..1aee3937
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectTrueConfiguration.java
@@ -0,0 +1,66 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * If the intersect setting is true, the first intersecting item is used to determine the index in the data.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class DatasetIntersectTrueConfiguration extends ShowcaseConfiguration {
+ public DatasetIntersectTrueConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Dataset, intersect: true"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.DATASET)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectFalseConfiguration.java
new file mode 100644
index 00000000..7c5c0df2
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectFalseConfiguration.java
@@ -0,0 +1,66 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * If intersect false the nearest item, in the x direction, is used to determine the index.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class IndexIntersectFalseConfiguration extends ShowcaseConfiguration {
+ public IndexIntersectFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Index, intersect: false"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectTrueConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectTrueConfiguration.java
new file mode 100644
index 00000000..b3a53259
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectTrueConfiguration.java
@@ -0,0 +1,66 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * If the intersect setting is true, the first intersecting item is used to determine the index in the data.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class IndexIntersectTrueConfiguration extends ShowcaseConfiguration {
+ public IndexIntersectTrueConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Index, intersect: true"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectFalseConfiguration.java
new file mode 100644
index 00000000..8cb3e319
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectFalseConfiguration.java
@@ -0,0 +1,66 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * If intersect is false, this is not triggered when the mouse position intersects an item in the graph.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class NearestIntersectFalseConfiguration extends ShowcaseConfiguration {
+ public NearestIntersectFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Nearest, intersect: false"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.NEAREST)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectTrueConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectTrueConfiguration.java
new file mode 100644
index 00000000..929eea10
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectTrueConfiguration.java
@@ -0,0 +1,66 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * If intersect is true, this is only triggered when the mouse position intersects an item in the graph.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class NearestIntersectTrueConfiguration extends ShowcaseConfiguration {
+ public NearestIntersectTrueConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Nearest, intersect: true"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectFalseConfiguration.java
new file mode 100644
index 00000000..d0dabfa2
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectFalseConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Finds no items that intersect the point.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class PointIntersectFalseConfiguration extends ShowcaseConfiguration {
+ public PointIntersectFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Point, intersect: false"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.POINT)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectTrueConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectTrueConfiguration.java
new file mode 100644
index 00000000..900b8523
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectTrueConfiguration.java
@@ -0,0 +1,66 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * Finds all of the items that intersect the point.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class PointIntersectTrueConfiguration extends ShowcaseConfiguration {
+ public PointIntersectTrueConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Point, intersect: true"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.POINT)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectFalseConfiguration.java
new file mode 100644
index 00000000..bab11b18
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectFalseConfiguration.java
@@ -0,0 +1,66 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * Does not return all items that would intersect based on the X coordinate of the position only.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class xIntersectFalseConfiguration extends ShowcaseConfiguration {
+ public xIntersectFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: x, intersect: false"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.X)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectTrueConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectTrueConfiguration.java
new file mode 100644
index 00000000..e7b6b0c9
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectTrueConfiguration.java
@@ -0,0 +1,66 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * Returns all items that would intersect based on the X coordinate of the position only.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class xIntersectTrueConfiguration extends ShowcaseConfiguration {
+ public xIntersectTrueConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: x, intersect: true"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.X)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectFalseConfiguration.java
new file mode 100644
index 00000000..d251ddbd
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectFalseConfiguration.java
@@ -0,0 +1,66 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * Does not return all items that would intersect based on the Y coordinate of the position.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class yIntersectFalseConfiguration extends ShowcaseConfiguration {
+ public yIntersectFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: y, intersect: false"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.Y)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectTrueConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectTrueConfiguration.java
new file mode 100644
index 00000000..e64893c6
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectTrueConfiguration.java
@@ -0,0 +1,66 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * Returns all items that would intersect based on the Y coordinate of the position.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class yIntersectTrueConfiguration extends ShowcaseConfiguration {
+ public yIntersectTrueConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: y, intersect: true"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.Y)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionBottomConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionBottomConfiguration.java
new file mode 100644
index 00000000..838e8af0
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionBottomConfiguration.java
@@ -0,0 +1,26 @@
+
+package de.adesso.wickedcharts.showcase.configurations.legendposition;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
+import de.adesso.wickedcharts.chartjs.chartoptions.Position;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+/**
+ * Shows how to configure a chart with the legend position at the bottom
+ * @see http://www.chartjs.org/samples/latest/legend/positioning.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LegendPositionBottomConfiguration extends LegendPositionChartBasicConfiguration {
+
+ public LegendPositionBottomConfiguration() {
+ super();
+
+ getData().getDatasets().get(0).setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN);
+
+ getOptions().setLegend(new Legend().setPosition(Position.BOTTOM));
+
+ getOptions().getTitle().setText("Legend Position: Bottom");
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionChartBasicConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionChartBasicConfiguration.java
new file mode 100644
index 00000000..7f90d7e8
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionChartBasicConfiguration.java
@@ -0,0 +1,54 @@
+
+package de.adesso.wickedcharts.showcase.configurations.legendposition;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+/**
+ * Base class for the other configurations for the legend position
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LegendPositionChartBasicConfiguration extends ShowcaseConfiguration {
+ public LegendPositionChartBasicConfiguration() {
+ super();
+
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setBorderWidth(1);
+
+ data.setDatasets(Arrays.asList(dataset1));
+ setData(data);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value")))
+ )
+ .setTitle(new Title()
+ .setDisplay(true))
+ ;
+ setOptions(options);
+
+ }
+}
+
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionLeftConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionLeftConfiguration.java
new file mode 100644
index 00000000..910e34f8
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionLeftConfiguration.java
@@ -0,0 +1,28 @@
+
+package de.adesso.wickedcharts.showcase.configurations.legendposition;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
+import de.adesso.wickedcharts.chartjs.chartoptions.Position;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+
+/**
+ * Shows how to configure a chart with the legend position on the left
+ *
+ * @see http://www.chartjs.org/samples/latest/legend/positioning.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LegendPositionLeftConfiguration extends LegendPositionChartBasicConfiguration {
+
+ public LegendPositionLeftConfiguration() {
+ super();
+
+ getData().getDatasets().get(0).setBackgroundColor(SimpleColor.YELLOW_TRANSPARENT)
+ .setBorderColor(SimpleColor.YELLOW);
+
+ getOptions().setLegend(new Legend().setPosition(Position.LEFT));
+
+ getOptions().getTitle().setText("Legend Position: Left");
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionRightConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionRightConfiguration.java
new file mode 100644
index 00000000..38dcecc9
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionRightConfiguration.java
@@ -0,0 +1,29 @@
+
+package de.adesso.wickedcharts.showcase.configurations.legendposition;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
+import de.adesso.wickedcharts.chartjs.chartoptions.Position;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+
+/**
+ * Shows how to configure a chart with the legend position on the right
+ *
+ * @see http://www.chartjs.org/samples/latest/legend/positioning.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LegendPositionRightConfiguration extends LegendPositionChartBasicConfiguration {
+
+ public LegendPositionRightConfiguration() {
+ super();
+
+ getData().getDatasets().get(0).setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE);
+
+ getOptions().setLegend(new Legend().setPosition(Position.RIGHT));
+
+ getOptions().getTitle().setText("Legend Position: Right");
+ }
+}
+
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionTopConfiguration.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionTopConfiguration.java
new file mode 100644
index 00000000..711c225c
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionTopConfiguration.java
@@ -0,0 +1,29 @@
+
+package de.adesso.wickedcharts.showcase.configurations.legendposition;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
+import de.adesso.wickedcharts.chartjs.chartoptions.Position;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+
+/**
+ * Shows how to configure a chart with the legend position at the top
+ *
+ * @see http://www.chartjs.org/samples/latest/legend/positioning.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LegendPositionTopConfiguration extends LegendPositionChartBasicConfiguration {
+
+ public LegendPositionTopConfiguration() {
+ super();
+
+ getData().getDatasets().get(0).setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED);
+
+ getOptions().setLegend(new Legend().setPosition(Position.TOP));
+
+ getOptions().getTitle().setText("Legend Position: Top");
+ }
+}
+
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/ChartjsShowcaseLink.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/ChartjsShowcaseLink.java
new file mode 100644
index 00000000..ff646dc3
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/ChartjsShowcaseLink.java
@@ -0,0 +1,15 @@
+package de.adesso.wickedcharts.showcase.links;
+
+import de.adesso.wickedcharts.showcase.HomepageChartJs;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+
+/**
+ * Adds a link to the Chart.js showcase in the main page
+ */
+@SuppressWarnings("serial")
+public class ChartjsShowcaseLink extends BookmarkablePageLink {
+
+ public ChartjsShowcaseLink() {
+ super("chartJsShowcaseLink", HomepageChartJs.class);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/HighchartsShowcaseLink.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/HighchartsShowcaseLink.java
new file mode 100644
index 00000000..9965b20a
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/HighchartsShowcaseLink.java
@@ -0,0 +1,17 @@
+
+package de.adesso.wickedcharts.showcase.links;
+
+import de.adesso.wickedcharts.showcase.HomepageHighcharts;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+
+/**
+ * Adds a link to the Highcharts showcase in the main page
+ */
+@SuppressWarnings("serial")
+public class HighchartsShowcaseLink extends BookmarkablePageLink {
+
+ public HighchartsShowcaseLink() {
+ super("highchartShowcaseLink", HomepageHighcharts.class);
+ }
+}
+
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartJsLink.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartJsLink.java
new file mode 100644
index 00000000..49535eb8
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartJsLink.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
+ *
+ * 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 de.adesso.wickedcharts.showcase.links;
+
+import de.adesso.wickedcharts.showcase.HomepageChartJs;
+import org.apache.wicket.PageParameters;
+import org.apache.wicket.markup.html.link.Link;
+
+/**
+ * Adds a link to a chart in the showcase navigation sidebar.
+ * Clicking on the link calls the onClick() method, which sets page
+ * parameters accordingly.
+ */
+public class UpdateChartJsLink extends Link {
+
+ private static final long serialVersionUID = 1L;
+
+ private final String chartVal;
+
+ /**
+ * Constructs a new Link.
+ *
+ * @param id the wicket id of the link
+ * @param val the name of the chart the link points to
+ */
+ public UpdateChartJsLink(final String id, final String val) {
+ super(id);
+ this.chartVal = val;
+ }
+
+ @Override
+ public void onClick() {
+ PageParameters params = new PageParameters();
+ params.add("chart", chartVal);
+ setResponsePage(HomepageChartJs.class, params);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartLink.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartLink.java
deleted file mode 100644
index e90dd4bb..00000000
--- a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartLink.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
- *
- * 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 de.adesso.wickedcharts.showcase.links;
-
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.markup.html.AjaxLink;
-import org.apache.wicket.markup.html.basic.Label;
-
-import de.adesso.wickedcharts.highcharts.options.Options;
-import de.adesso.wickedcharts.showcase.ShowcaseSession;
-import de.adesso.wickedcharts.showcase.StringFromResourceModel;
-import de.adesso.wickedcharts.wicket14.highcharts.Chart;
-
-public class UpdateChartLink extends AjaxLink {
-
- private static final long serialVersionUID = 1L;
-
- private final Chart chart;
-
- private final Options options;
-
- private final Label codeContainer;
-
- /**
- * Constructs a new Link.
- *
- * @param id
- * the wicket id of the link
- * @param chart
- * the container containing the chart
- * @param codeContainer
- * the container containing the code display of the chart's
- * options
- * @param options
- * the options of the chart.
- */
- public UpdateChartLink(final String id, final Chart chart,
- final Label codeContainer, final Options options) {
- super(id);
- this.chart = chart;
- this.codeContainer = codeContainer;
- this.options = options;
- }
-
- public Chart getChartContainer() {
- return this.chart;
- }
-
- public Label getCodeContainer() {
- return this.codeContainer;
- }
-
- public Options getOptions() {
- return this.options;
- }
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- this.chart.setOptions(this.options);
- ((ShowcaseSession) getSession()).setCurrentChartOptions(this.options);
- this.codeContainer.setDefaultModel(new StringFromResourceModel(
- this.options.getClass(), this.options.getClass()
- .getSimpleName() + ".java"));
- target.addComponent(this.chart);
- target.addComponent(this.codeContainer);
-
- // make syntaxhighlighter highlight the changed code
- target.appendJavascript("SyntaxHighlighter.highlight();");
- }
-}
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateHighchartLink.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateHighchartLink.java
new file mode 100644
index 00000000..be4a759e
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateHighchartLink.java
@@ -0,0 +1,50 @@
+/**
+ * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
+ *
+ * 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 de.adesso.wickedcharts.showcase.links;
+
+import de.adesso.wickedcharts.showcase.HomepageHighcharts;
+import org.apache.wicket.PageParameters;
+import org.apache.wicket.markup.html.link.Link;
+
+/**
+ * Adds a link to a chart in the showcase navigation sidebar.
+ * Clicking on the link calls the onClick() method, which sets page
+ * parameters accordingly.
+ */
+public class UpdateHighchartLink extends Link {
+
+ private static final long serialVersionUID = 1L;
+
+ private String chartVal;
+
+ /**
+ * Constructs a new Link.
+ *
+ * @param id the wicket id of the link
+ */
+ public UpdateHighchartLink(final String id) {
+ super(id);
+ this.chartVal = id;
+ }
+
+
+ @Override
+ public void onClick() {
+ PageParameters params = new PageParameters();
+ params.add("chart", chartVal);
+ setResponsePage(HomepageHighcharts.class, params);
+ }
+
+}
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Pie.js b/showcase/wicked-charts-showcase-wicket14/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Pie.js
new file mode 100644
index 00000000..a54bc7a6
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Pie.js
@@ -0,0 +1,62 @@
+Chart.defaults.global.tooltips.custom = function(tooltip) {
+ // Tooltip Element
+ var tooltipEl = document.getElementById('chartjs-tooltip');
+
+ // Hide if no tooltip
+ if (tooltip.opacity === 0) {
+ tooltipEl.style.opacity = 0;
+ return;
+ }
+
+ // Set caret Position
+ tooltipEl.classList.remove('above', 'below', 'no-transform');
+ if (tooltip.yAlign) {
+ tooltipEl.classList.add(tooltip.yAlign);
+ } else {
+ tooltipEl.classList.add('no-transform');
+ }
+
+ function getBody(bodyItem) {
+ return bodyItem.lines;
+ }
+
+ // Set Text
+ if (tooltip.body) {
+ var titleLines = tooltip.title || [];
+ var bodyLines = tooltip.body.map(getBody);
+
+ var innerHtml = '';
+
+ titleLines.forEach(function(title) {
+ innerHtml += '' + title + ' ';
+ });
+ innerHtml += ' ';
+
+ bodyLines.forEach(function(body, i) {
+ var colors = tooltip.labelColors[i];
+ var style = 'background:' + colors.backgroundColor;
+ style += '; border-color:' + colors.borderColor;
+ style += '; border-width: 2px';
+ var span = ' ';
+ innerHtml += '' + span + body + ' ';
+ });
+ innerHtml += ' ';
+
+ var tableRoot = tooltipEl.querySelector('table');
+ tableRoot.innerHTML = innerHtml;
+ }
+
+ var positionY = this._chart.canvas.offsetTop;
+ var positionX = this._chart.canvas.offsetLeft;
+
+ // Display, position, and set styles for font
+ tooltipEl.style.opacity = 1;
+ tooltipEl.style.left = positionX + tooltip.caretX + 'px';
+ tooltipEl.style.top = positionY + tooltip.caretY + 'px';
+ tooltipEl.style.fontFamily = tooltip._fontFamily;
+ tooltipEl.style.fontSize = tooltip.fontSize;
+ tooltipEl.style.fontStyle = tooltip._fontStyle;
+ tooltipEl.style.padding = tooltip.yPadding + 'px ' + tooltip.xPadding
+ + 'px';
+};
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Point.js b/showcase/wicked-charts-showcase-wicket14/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Point.js
new file mode 100644
index 00000000..da5ed22a
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Point.js
@@ -0,0 +1,28 @@
+var customTooltips = function(tooltip) {
+ $(this._chart.canvas).css("cursor", "pointer");
+
+ var positionY = this._chart.canvas.offsetTop;
+ var positionX = this._chart.canvas.offsetLeft;
+
+ $(".chartjs-tooltip").css({
+ opacity : 0,
+ });
+
+ if (!tooltip || !tooltip.opacity) {
+ return;
+ }
+
+ if (tooltip.dataPoints.length > 0) {
+ tooltip.dataPoints.forEach(function(dataPoint) {
+ var content = [ dataPoint.xLabel, dataPoint.yLabel ].join(": ");
+ var $tooltip = $("#tooltip-" + dataPoint.datasetIndex);
+
+ $tooltip.html(content);
+ $tooltip.css({
+ opacity : 1,
+ top : positionY + dataPoint.y + "px",
+ left : positionX + dataPoint.x + "px",
+ });
+ });
+ }
+};
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip.js b/showcase/wicked-charts-showcase-wicket14/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip.js
new file mode 100644
index 00000000..cb39657a
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip.js
@@ -0,0 +1,71 @@
+Chart.defaults.global.pointHitDetectionRadius = 1;
+
+var customTooltips = function(tooltip) {
+ // Tooltip Element
+ var tooltipEl = document.getElementById('chartjs-tooltip');
+
+ if (!tooltipEl) {
+ tooltipEl = document.createElement('div');
+ tooltipEl.id = 'chartjs-tooltip';
+ tooltipEl.innerHTML = ""
+ this._chart.canvas.parentNode.appendChild(tooltipEl);
+ }
+
+ // Hide if no tooltip
+ if (tooltip.opacity === 0) {
+ tooltipEl.style.opacity = 0;
+ return;
+ }
+
+ // Set caret Position
+ tooltipEl.classList.remove('above', 'below', 'no-transform');
+ if (tooltip.yAlign) {
+ tooltipEl.classList.add(tooltip.yAlign);
+ } else {
+ tooltipEl.classList.add('no-transform');
+ }
+
+ function getBody(bodyItem) {
+ return bodyItem.lines;
+ }
+
+ // Set Text
+ if (tooltip.body) {
+ var titleLines = tooltip.title || [];
+ var bodyLines = tooltip.body.map(getBody);
+
+ var innerHtml = '';
+
+ titleLines.forEach(function(title) {
+ innerHtml += '' + title + ' ';
+ });
+ innerHtml += ' ';
+
+ bodyLines.forEach(function(body, i) {
+ var colors = tooltip.labelColors[i];
+ var style = 'background:' + colors.backgroundColor;
+ style += '; border-color:' + colors.borderColor;
+ style += '; border-width: 2px';
+ var span = ' ';
+ innerHtml += '' + span + body + ' ';
+ });
+ innerHtml += ' ';
+
+ var tableRoot = tooltipEl.querySelector('table');
+ tableRoot.innerHTML = innerHtml;
+ }
+
+ var positionY = this._chart.canvas.offsetTop;
+ var positionX = this._chart.canvas.offsetLeft;
+
+ // Display, position, and set styles for font
+ tooltipEl.style.opacity = 1;
+ tooltipEl.style.left = positionX + tooltip.caretX + 'px';
+ tooltipEl.style.top = positionY + tooltip.caretY + 'px';
+ tooltipEl.style.fontFamily = tooltip._fontFamily;
+ tooltipEl.style.fontSize = tooltip.fontSize;
+ tooltipEl.style.fontStyle = tooltip._fontStyle;
+ tooltipEl.style.padding = tooltip.yPadding + 'px ' + tooltip.xPadding
+ + 'px';
+};
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/resources/de/adesso/wickedcharts/showcase/dataLabellingPlugin.js b/showcase/wicked-charts-showcase-wicket14/src/main/resources/de/adesso/wickedcharts/showcase/dataLabellingPlugin.js
new file mode 100644
index 00000000..7b9e8cb1
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/resources/de/adesso/wickedcharts/showcase/dataLabellingPlugin.js
@@ -0,0 +1,33 @@
+// Define a plugin to provide data labels
+ Chart.plugins.register({
+ afterDatasetsDraw: function(chart, easing) {
+ // To only draw at the end of animation, check for easing === 1
+ var ctx = {0};
+
+ chart.data.datasets.forEach(function (dataset, i) {
+ var meta = chart.getDatasetMeta(i);
+ if (!meta.hidden) {
+ meta.data.forEach(function(element, index) {
+ // Draw the text in black, with the specified font
+ ctx.fillStyle = 'rgb(0, 0, 0)';
+
+ var fontSize = 16;
+ var fontStyle = 'normal';
+ var fontFamily = 'Helvetica Neue';
+ ctx.font = Chart.helpers.fontString(fontSize, fontStyle, fontFamily);
+
+ // Just naively convert to string for now
+ var dataString = dataset.data[index].toString();
+
+ // Make sure alignment settings are correct
+ ctx.textAlign = 'center';
+ ctx.textBaseline = 'middle';
+
+ var padding = 5;
+ var position = element.tooltipPosition();
+ ctx.fillText(dataString, position.x, position.y - (fontSize / 2) - padding);
+ });
+ }
+ });
+ }
+ });
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/resources/de/adesso/wickedcharts/showcase/jquery-1.8.3.min-IEfix.js b/showcase/wicked-charts-showcase-wicket14/src/main/resources/de/adesso/wickedcharts/showcase/jquery-1.8.3.min-IEfix.js
new file mode 100644
index 00000000..012ab88e
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket14/src/main/resources/de/adesso/wickedcharts/showcase/jquery-1.8.3.min-IEfix.js
@@ -0,0 +1,9473 @@
+
+/*!
+ * jQuery JavaScript Library v1.8.3
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2012-2018 jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: Tue Nov 13 2012 08:20:33 GMT-0500 (Eastern Standard Time)
+ */
+(function( window, undefined ) {
+var
+ // A central reference to the root jQuery(document)
+ rootjQuery,
+
+ // The deferred used on DOM ready
+ readyList,
+
+ // Use the correct document accordingly with window argument (sandbox)
+ document = window.document,
+ location = window.location,
+ navigator = window.navigator,
+
+ // Map over jQuery in case of overwrite
+ _jQuery = window.jQuery,
+
+ // Map over the $ in case of overwrite
+ _$ = window.$,
+
+ // Save a reference to some core methods
+ core_push = Array.prototype.push,
+ core_slice = Array.prototype.slice,
+ core_indexOf = Array.prototype.indexOf,
+ core_toString = Object.prototype.toString,
+ core_hasOwn = Object.prototype.hasOwnProperty,
+ core_trim = String.prototype.trim,
+
+ // Define a local copy of jQuery
+ jQuery = function( selector, context ) {
+ // The jQuery object is actually just the init constructor 'enhanced'
+ return new jQuery.fn.init( selector, context, rootjQuery );
+ },
+
+ // Used for matching numbers
+ core_pnum = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,
+
+ // Used for detecting and trimming whitespace
+ core_rnotwhite = /\S/,
+ core_rspace = /\s+/,
+
+ // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
+ rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+ // A simple way to check for HTML strings
+ // Prioritize #id over to avoid XSS via location.hash (#9521)
+ rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
+
+ // Match a standalone tag
+ rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
+
+ // JSON RegExp
+ rvalidchars = /^[\],:{}\s]*$/,
+ rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+ rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
+ rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,
+
+ // Matches dashed string for camelizing
+ rmsPrefix = /^-ms-/,
+ rdashAlpha = /-([\da-z])/gi,
+
+ // Used by jQuery.camelCase as callback to replace()
+ fcamelCase = function( all, letter ) {
+ return ( letter + "" ).toUpperCase();
+ },
+
+ // The ready event handler and self cleanup method
+ DOMContentLoaded = function() {
+ if ( document.addEventListener ) {
+ document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+ jQuery.ready();
+ } else if ( document.readyState === "complete" ) {
+ // we're here because readyState === "complete" in oldIE
+ // which is good enough for us to call the dom ready!
+ document.detachEvent( "onreadystatechange", DOMContentLoaded );
+ jQuery.ready();
+ }
+ },
+
+ // [[Class]] -> type pairs
+ class2type = {};
+
+jQuery.fn = jQuery.prototype = {
+ constructor: jQuery,
+ init: function( selector, context, rootjQuery ) {
+ var match, elem, ret, doc;
+
+ // Handle $(""), $(null), $(undefined), $(false)
+ if ( !selector ) {
+ return this;
+ }
+
+ // Handle $(DOMElement)
+ if ( selector.nodeType ) {
+ this.context = this[0] = selector;
+ this.length = 1;
+ return this;
+ }
+
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
+ // Assume that strings that start and end with <> are HTML and skip the regex check
+ match = [ null, selector, null ];
+
+ } else {
+ match = rquickExpr.exec( selector );
+ }
+
+ // Match html or make sure no context is specified for #id
+ if ( match && (match[1] || !context) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[1] ) {
+ context = context instanceof jQuery ? context[0] : context;
+ doc = ( context && context.nodeType ? context.ownerDocument || context : document );
+
+ // scripts is true for back-compat
+ selector = jQuery.parseHTML( match[1], doc, true );
+ if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
+ this.attr.call( selector, context, true );
+ }
+
+ return jQuery.merge( this, selector );
+
+ // HANDLE: $(#id)
+ } else {
+ elem = document.getElementById( match[2] );
+
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE and Opera return items
+ // by name instead of ID
+ if ( elem.id !== match[2] ) {
+ return rootjQuery.find( selector );
+ }
+
+ // Otherwise, we inject the element directly into the jQuery object
+ this.length = 1;
+ this[0] = elem;
+ }
+
+ this.context = document;
+ this.selector = selector;
+ return this;
+ }
+
+ // HANDLE: $(expr, $(...))
+ } else if ( !context || context.jquery ) {
+ return ( context || rootjQuery ).find( selector );
+
+ // HANDLE: $(expr, context)
+ // (which is just equivalent to: $(context).find(expr)
+ } else {
+ return this.constructor( context ).find( selector );
+ }
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ } else if ( jQuery.isFunction( selector ) ) {
+ return rootjQuery.ready( selector );
+ }
+
+ if ( selector.selector !== undefined ) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
+ return jQuery.makeArray( selector, this );
+ },
+
+ // Start with an empty selector
+ selector: "",
+
+ // The current version of jQuery being used
+ jquery: "1.8.3",
+
+ // The default length of a jQuery object is 0
+ length: 0,
+
+ // The number of elements contained in the matched element set
+ size: function() {
+ return this.length;
+ },
+
+ toArray: function() {
+ return core_slice.call( this );
+ },
+
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function( num ) {
+ return num == null ?
+
+ // Return a 'clean' array
+ this.toArray() :
+
+ // Return just the object
+ ( num < 0 ? this[ this.length + num ] : this[ num ] );
+ },
+
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function( elems, name, selector ) {
+
+ // Build a new jQuery matched element set
+ var ret = jQuery.merge( this.constructor(), elems );
+
+ // Add the old object onto the stack (as a reference)
+ ret.prevObject = this;
+
+ ret.context = this.context;
+
+ if ( name === "find" ) {
+ ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
+ } else if ( name ) {
+ ret.selector = this.selector + "." + name + "(" + selector + ")";
+ }
+
+ // Return the newly-formed element set
+ return ret;
+ },
+
+ // Execute a callback for every element in the matched set.
+ // (You can seed the arguments with an array of args, but this is
+ // only used internally.)
+ each: function( callback, args ) {
+ return jQuery.each( this, callback, args );
+ },
+
+ ready: function( fn ) {
+ // Add the callback
+ jQuery.ready.promise().done( fn );
+
+ return this;
+ },
+
+ eq: function( i ) {
+ i = +i;
+ return i === -1 ?
+ this.slice( i ) :
+ this.slice( i, i + 1 );
+ },
+
+ first: function() {
+ return this.eq( 0 );
+ },
+
+ last: function() {
+ return this.eq( -1 );
+ },
+
+ slice: function() {
+ return this.pushStack( core_slice.apply( this, arguments ),
+ "slice", core_slice.call(arguments).join(",") );
+ },
+
+ map: function( callback ) {
+ return this.pushStack( jQuery.map(this, function( elem, i ) {
+ return callback.call( elem, i, elem );
+ }));
+ },
+
+ end: function() {
+ return this.prevObject || this.constructor(null);
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: core_push,
+ sort: [].sort,
+ splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[0] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+ target = arguments[1] || {};
+ // skip the boolean and the target
+ i = 2;
+ }
+
+ // Handle case when target is a string or something (possible in deep copy)
+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+ target = {};
+ }
+
+ // extend jQuery itself if only one argument is passed
+ if ( length === i ) {
+ target = this;
+ --i;
+ }
+
+ for ( ; i < length; i++ ) {
+ // Only deal with non-null/undefined values
+ if ( (options = arguments[ i ]) != null ) {
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+ if ( copyIsArray ) {
+ copyIsArray = false;
+ clone = src && jQuery.isArray(src) ? src : [];
+
+ } else {
+ clone = src && jQuery.isPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend({
+ noConflict: function( deep ) {
+ if ( window.$ === jQuery ) {
+ window.$ = _$;
+ }
+
+ if ( deep && window.jQuery === jQuery ) {
+ window.jQuery = _jQuery;
+ }
+
+ return jQuery;
+ },
+
+ // Is the DOM ready to be used? Set to true once it occurs.
+ isReady: false,
+
+ // A counter to track how many items to wait for before
+ // the ready event fires. See #6781
+ readyWait: 1,
+
+ // Hold (or release) the ready event
+ holdReady: function( hold ) {
+ if ( hold ) {
+ jQuery.readyWait++;
+ } else {
+ jQuery.ready( true );
+ }
+ },
+
+ // Handle when the DOM is ready
+ ready: function( wait ) {
+
+ // Abort if there are pending holds or we're already ready
+ if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
+ return;
+ }
+
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+ if ( !document.body ) {
+ return setTimeout( jQuery.ready, 1 );
+ }
+
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If a normal DOM Ready event fired, decrement, and wait if need be
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
+ return;
+ }
+
+ // If there are functions bound, to execute
+ readyList.resolveWith( document, [ jQuery ] );
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.trigger ) {
+ jQuery( document ).trigger("ready").off("ready");
+ }
+ },
+
+ // See test/unit/core.js for details concerning isFunction.
+ // Since version 1.3, DOM methods and functions like alert
+ // aren't supported. They return false on IE (#2968).
+ isFunction: function( obj ) {
+ return jQuery.type(obj) === "function";
+ },
+
+ isArray: Array.isArray || function( obj ) {
+ return jQuery.type(obj) === "array";
+ },
+
+ isWindow: function( obj ) {
+ return obj != null && obj == obj.window;
+ },
+
+ isNumeric: function( obj ) {
+ return !isNaN( parseFloat(obj) ) && isFinite( obj );
+ },
+
+ type: function( obj ) {
+ return obj == null ?
+ String( obj ) :
+ class2type[ core_toString.call(obj) ] || "object";
+ },
+
+ isPlainObject: function( obj ) {
+ // Must be an Object.
+ // Because of IE, we also have to check the presence of the constructor property.
+ // Make sure that DOM nodes and window objects don't pass through, as well
+ if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ try {
+ // Not own constructor property must be Object
+ if ( obj.constructor &&
+ !core_hasOwn.call(obj, "constructor") &&
+ !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+ return false;
+ }
+ } catch ( e ) {
+ // IE8,9 Will throw exceptions on certain host objects #9897
+ return false;
+ }
+
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+
+ var key;
+ for ( key in obj ) {}
+
+ return key === undefined || core_hasOwn.call( obj, key );
+ },
+
+ isEmptyObject: function( obj ) {
+ var name;
+ for ( name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ error: function( msg ) {
+ throw new Error( msg );
+ },
+
+ // data: string of html
+ // context (optional): If specified, the fragment will be created in this context, defaults to document
+ // scripts (optional): If true, will include scripts passed in the html string
+ parseHTML: function( data, context, scripts ) {
+ var parsed;
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+ if ( typeof context === "boolean" ) {
+ scripts = context;
+ context = 0;
+ }
+ context = context || document;
+
+ // Single tag
+ if ( (parsed = rsingleTag.exec( data )) ) {
+ return [ context.createElement( parsed[1] ) ];
+ }
+
+ parsed = jQuery.buildFragment( [ data ], context, scripts ? null : [] );
+ return jQuery.merge( [],
+ (parsed.cacheable ? jQuery.clone( parsed.fragment ) : parsed.fragment).childNodes );
+ },
+
+ parseJSON: function( data ) {
+ if ( !data || typeof data !== "string") {
+ return null;
+ }
+
+ // Make sure leading/trailing whitespace is removed (IE can't handle it)
+ data = jQuery.trim( data );
+
+ // Attempt to parse using the native JSON parser first
+ if ( window.JSON && window.JSON.parse ) {
+ return window.JSON.parse( data );
+ }
+
+ // Make sure the incoming data is actual JSON
+ // Logic borrowed from http://json.org/json2.js
+ if ( rvalidchars.test( data.replace( rvalidescape, "@" )
+ .replace( rvalidtokens, "]" )
+ .replace( rvalidbraces, "")) ) {
+
+ return ( new Function( "return " + data ) )();
+
+ }
+ jQuery.error( "Invalid JSON: " + data );
+ },
+
+ // Cross-browser xml parsing
+ parseXML: function( data ) {
+ var xml, tmp;
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+ try {
+ if ( window.DOMParser ) { // Standard
+ tmp = new DOMParser();
+ xml = tmp.parseFromString( data , "text/xml" );
+ } else { // IE
+ xml = new ActiveXObject( "Microsoft.XMLDOM" );
+ xml.async = "false";
+ xml.loadXML( data );
+ }
+ } catch( e ) {
+ xml = undefined;
+ }
+ if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
+ jQuery.error( "Invalid XML: " + data );
+ }
+ return xml;
+ },
+
+ noop: function() {},
+
+ // Evaluates a script in a global context
+ // Workarounds based on findings by Jim Driscoll
+ // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+ globalEval: function( data ) {
+ if ( data && core_rnotwhite.test( data ) ) {
+ // We use execScript on Internet Explorer
+ // We use an anonymous function so that context is window
+ // rather than jQuery in Firefox
+ ( window.execScript || function( data ) {
+ window[ "eval" ].call( window, data );
+ } )( data );
+ }
+ },
+
+ // Convert dashed to camelCase; used by the css and data modules
+ // Microsoft forgot to hump their vendor prefix (#9572)
+ camelCase: function( string ) {
+ return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+ },
+
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+ },
+
+ // args is for internal usage only
+ each: function( obj, callback, args ) {
+ var name,
+ i = 0,
+ length = obj.length,
+ isObj = length === undefined || jQuery.isFunction( obj );
+
+ if ( args ) {
+ if ( isObj ) {
+ for ( name in obj ) {
+ if ( callback.apply( obj[ name ], args ) === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( ; i < length; ) {
+ if ( callback.apply( obj[ i++ ], args ) === false ) {
+ break;
+ }
+ }
+ }
+
+ // A special, fast, case for the most common use of each
+ } else {
+ if ( isObj ) {
+ for ( name in obj ) {
+ if ( callback.call( obj[ name ], name, obj[ name ] ) === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( ; i < length; ) {
+ if ( callback.call( obj[ i ], i, obj[ i++ ] ) === false ) {
+ break;
+ }
+ }
+ }
+ }
+
+ return obj;
+ },
+
+ // Use native String.trim function wherever possible
+ trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
+ function( text ) {
+ return text == null ?
+ "" :
+ core_trim.call( text );
+ } :
+
+ // Otherwise use our own trimming functionality
+ function( text ) {
+ return text == null ?
+ "" :
+ ( text + "" ).replace( rtrim, "" );
+ },
+
+ // results is for internal usage only
+ makeArray: function( arr, results ) {
+ var type,
+ ret = results || [];
+
+ if ( arr != null ) {
+ // The window, strings (and functions) also have 'length'
+ // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+ type = jQuery.type( arr );
+
+ if ( arr.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( arr ) ) {
+ core_push.call( ret, arr );
+ } else {
+ jQuery.merge( ret, arr );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, arr, i ) {
+ var len;
+
+ if ( arr ) {
+ if ( core_indexOf ) {
+ return core_indexOf.call( arr, elem, i );
+ }
+
+ len = arr.length;
+ i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
+
+ for ( ; i < len; i++ ) {
+ // Skip accessing in sparse arrays
+ if ( i in arr && arr[ i ] === elem ) {
+ return i;
+ }
+ }
+ }
+
+ return -1;
+ },
+
+ merge: function( first, second ) {
+ var l = second.length,
+ i = first.length,
+ j = 0;
+
+ if ( typeof l === "number" ) {
+ for ( ; j < l; j++ ) {
+ first[ i++ ] = second[ j ];
+ }
+
+ } else {
+ while ( second[j] !== undefined ) {
+ first[ i++ ] = second[ j++ ];
+ }
+ }
+
+ first.length = i;
+
+ return first;
+ },
+
+ grep: function( elems, callback, inv ) {
+ var retVal,
+ ret = [],
+ i = 0,
+ length = elems.length;
+ inv = !!inv;
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( ; i < length; i++ ) {
+ retVal = !!callback( elems[ i ], i );
+ if ( inv !== retVal ) {
+ ret.push( elems[ i ] );
+ }
+ }
+
+ return ret;
+ },
+
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var value, key,
+ ret = [],
+ i = 0,
+ length = elems.length,
+ // jquery objects are treated as arrays
+ isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
+
+ // Go through the array, translating each of the items to their
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+
+ // Go through every key on the object,
+ } else {
+ for ( key in elems ) {
+ value = callback( elems[ key ], key, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+ }
+
+ // Flatten any nested arrays
+ return ret.concat.apply( [], ret );
+ },
+
+ // A global GUID counter for objects
+ guid: 1,
+
+ // Bind a function to a context, optionally partially applying any
+ // arguments.
+ proxy: function( fn, context ) {
+ var tmp, args, proxy;
+
+ if ( typeof context === "string" ) {
+ tmp = fn[ context ];
+ context = fn;
+ fn = tmp;
+ }
+
+ // Quick check to determine if target is callable, in the spec
+ // this throws a TypeError, but we will just return undefined.
+ if ( !jQuery.isFunction( fn ) ) {
+ return undefined;
+ }
+
+ // Simulated bind
+ args = core_slice.call( arguments, 2 );
+ proxy = function() {
+ return fn.apply( context, args.concat( core_slice.call( arguments ) ) );
+ };
+
+ // Set the guid of unique handler to the same of original handler, so it can be removed
+ proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+ return proxy;
+ },
+
+ // Multifunctional method to get and set values of a collection
+ // The value/s can optionally be executed if it's a function
+ access: function( elems, fn, key, value, chainable, emptyGet, pass ) {
+ var exec,
+ bulk = key == null,
+ i = 0,
+ length = elems.length;
+
+ // Sets many values
+ if ( key && typeof key === "object" ) {
+ for ( i in key ) {
+ jQuery.access( elems, fn, i, key[i], 1, emptyGet, value );
+ }
+ chainable = 1;
+
+ // Sets one value
+ } else if ( value !== undefined ) {
+ // Optionally, function values get executed if exec is true
+ exec = pass === undefined && jQuery.isFunction( value );
+
+ if ( bulk ) {
+ // Bulk operations only iterate when executing function values
+ if ( exec ) {
+ exec = fn;
+ fn = function( elem, key, value ) {
+ return exec.call( jQuery( elem ), value );
+ };
+
+ // Otherwise they run against the entire set
+ } else {
+ fn.call( elems, value );
+ fn = null;
+ }
+ }
+
+ if ( fn ) {
+ for (; i < length; i++ ) {
+ fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
+ }
+ }
+
+ chainable = 1;
+ }
+
+ return chainable ?
+ elems :
+
+ // Gets
+ bulk ?
+ fn.call( elems ) :
+ length ? fn( elems[0], key ) : emptyGet;
+ },
+
+ now: function() {
+ return ( new Date() ).getTime();
+ }
+});
+
+jQuery.ready.promise = function( obj ) {
+ if ( !readyList ) {
+
+ readyList = jQuery.Deferred();
+
+ // Catch cases where $(document).ready() is called after the browser event has already occurred.
+ // we once tried to use readyState "interactive" here, but it caused issues like the one
+ // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+ if ( document.readyState === "complete" ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ setTimeout( jQuery.ready, 1 );
+
+ // Standards-based browsers support DOMContentLoaded
+ } else if ( document.addEventListener ) {
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", jQuery.ready, false );
+
+ // If IE event model is used
+ } else {
+ // Ensure firing before onload, maybe late but safe also for iframes
+ document.attachEvent( "onreadystatechange", DOMContentLoaded );
+
+ // A fallback to window.onload, that will always work
+ window.attachEvent( "onload", jQuery.ready );
+
+ // If IE and not a frame
+ // continually check to see if the document is ready
+ var top = false;
+
+ try {
+ top = window.frameElement == null && document.documentElement;
+ } catch(e) {}
+
+ if ( top && top.doScroll ) {
+ (function doScrollCheck() {
+ if ( !jQuery.isReady ) {
+
+ try {
+ // Use the trick by Diego Perini
+ // http://javascript.nwbox.com/IEContentLoaded/
+ top.doScroll("left");
+ } catch(e) {
+ return setTimeout( doScrollCheck, 50 );
+ }
+
+ // and execute any waiting functions
+ jQuery.ready();
+ }
+ })();
+ }
+ }
+ }
+ return readyList.promise( obj );
+};
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+// String to Object options format cache
+var optionsCache = {};
+
+// Convert String-formatted options into Object-formatted ones and store in cache
+function createOptions( options ) {
+ var object = optionsCache[ options ] = {};
+ jQuery.each( options.split( core_rspace ), function( _, flag ) {
+ object[ flag ] = true;
+ });
+ return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ * options: an optional list of space-separated options that will change how
+ * the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible options:
+ *
+ * once: will ensure the callback list can only be fired once (like a Deferred)
+ *
+ * memory: will keep track of previous values and will call any callback added
+ * after the list has been fired right away with the latest "memorized"
+ * values (like a Deferred)
+ *
+ * unique: will ensure a callback can only be added once (no duplicate in the list)
+ *
+ * stopOnFalse: interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+ // Convert options from String-formatted to Object-formatted if needed
+ // (we check in cache first)
+ options = typeof options === "string" ?
+ ( optionsCache[ options ] || createOptions( options ) ) :
+ jQuery.extend( {}, options );
+
+ var // Last fire value (for non-forgettable lists)
+ memory,
+ // Flag to know if list was already fired
+ fired,
+ // Flag to know if list is currently firing
+ firing,
+ // First callback to fire (used internally by add and fireWith)
+ firingStart,
+ // End of the loop when firing
+ firingLength,
+ // Index of currently firing callback (modified by remove if needed)
+ firingIndex,
+ // Actual callback list
+ list = [],
+ // Stack of fire calls for repeatable lists
+ stack = !options.once && [],
+ // Fire callbacks
+ fire = function( data ) {
+ memory = options.memory && data;
+ fired = true;
+ firingIndex = firingStart || 0;
+ firingStart = 0;
+ firingLength = list.length;
+ firing = true;
+ for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+ if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
+ memory = false; // To prevent further calls using add
+ break;
+ }
+ }
+ firing = false;
+ if ( list ) {
+ if ( stack ) {
+ if ( stack.length ) {
+ fire( stack.shift() );
+ }
+ } else if ( memory ) {
+ list = [];
+ } else {
+ self.disable();
+ }
+ }
+ },
+ // Actual Callbacks object
+ self = {
+ // Add a callback or a collection of callbacks to the list
+ add: function() {
+ if ( list ) {
+ // First, we save the current length
+ var start = list.length;
+ (function add( args ) {
+ jQuery.each( args, function( _, arg ) {
+ var type = jQuery.type( arg );
+ if ( type === "function" ) {
+ if ( !options.unique || !self.has( arg ) ) {
+ list.push( arg );
+ }
+ } else if ( arg && arg.length && type !== "string" ) {
+ // Inspect recursively
+ add( arg );
+ }
+ });
+ })( arguments );
+ // Do we need to add the callbacks to the
+ // current firing batch?
+ if ( firing ) {
+ firingLength = list.length;
+ // With memory, if we're not firing then
+ // we should call right away
+ } else if ( memory ) {
+ firingStart = start;
+ fire( memory );
+ }
+ }
+ return this;
+ },
+ // Remove a callback from the list
+ remove: function() {
+ if ( list ) {
+ jQuery.each( arguments, function( _, arg ) {
+ var index;
+ while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
+ list.splice( index, 1 );
+ // Handle firing indexes
+ if ( firing ) {
+ if ( index <= firingLength ) {
+ firingLength--;
+ }
+ if ( index <= firingIndex ) {
+ firingIndex--;
+ }
+ }
+ }
+ });
+ }
+ return this;
+ },
+ // Control if a given callback is in the list
+ has: function( fn ) {
+ return jQuery.inArray( fn, list ) > -1;
+ },
+ // Remove all callbacks from the list
+ empty: function() {
+ list = [];
+ return this;
+ },
+ // Have the list do nothing anymore
+ disable: function() {
+ list = stack = memory = undefined;
+ return this;
+ },
+ // Is it disabled?
+ disabled: function() {
+ return !list;
+ },
+ // Lock the list in its current state
+ lock: function() {
+ stack = undefined;
+ if ( !memory ) {
+ self.disable();
+ }
+ return this;
+ },
+ // Is it locked?
+ locked: function() {
+ return !stack;
+ },
+ // Call all callbacks with the given context and arguments
+ fireWith: function( context, args ) {
+ args = args || [];
+ args = [ context, args.slice ? args.slice() : args ];
+ if ( list && ( !fired || stack ) ) {
+ if ( firing ) {
+ stack.push( args );
+ } else {
+ fire( args );
+ }
+ }
+ return this;
+ },
+ // Call all the callbacks with the given arguments
+ fire: function() {
+ self.fireWith( this, arguments );
+ return this;
+ },
+ // To know if the callbacks have already been called at least once
+ fired: function() {
+ return !!fired;
+ }
+ };
+
+ return self;
+};
+jQuery.extend({
+
+ Deferred: function( func ) {
+ var tuples = [
+ // action, add listener, listener list, final state
+ [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
+ [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
+ [ "notify", "progress", jQuery.Callbacks("memory") ]
+ ],
+ state = "pending",
+ promise = {
+ state: function() {
+ return state;
+ },
+ always: function() {
+ deferred.done( arguments ).fail( arguments );
+ return this;
+ },
+ then: function( /* fnDone, fnFail, fnProgress */ ) {
+ var fns = arguments;
+ return jQuery.Deferred(function( newDefer ) {
+ jQuery.each( tuples, function( i, tuple ) {
+ var action = tuple[ 0 ],
+ fn = fns[ i ];
+ // deferred[ done | fail | progress ] for forwarding actions to newDefer
+ deferred[ tuple[1] ]( jQuery.isFunction( fn ) ?
+ function() {
+ var returned = fn.apply( this, arguments );
+ if ( returned && jQuery.isFunction( returned.promise ) ) {
+ returned.promise()
+ .done( newDefer.resolve )
+ .fail( newDefer.reject )
+ .progress( newDefer.notify );
+ } else {
+ newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
+ }
+ } :
+ newDefer[ action ]
+ );
+ });
+ fns = null;
+ }).promise();
+ },
+ // Get a promise for this deferred
+ // If obj is provided, the promise aspect is added to the object
+ promise: function( obj ) {
+ return obj != null ? jQuery.extend( obj, promise ) : promise;
+ }
+ },
+ deferred = {};
+
+ // Keep pipe for back-compat
+ promise.pipe = promise.then;
+
+ // Add list-specific methods
+ jQuery.each( tuples, function( i, tuple ) {
+ var list = tuple[ 2 ],
+ stateString = tuple[ 3 ];
+
+ // promise[ done | fail | progress ] = list.add
+ promise[ tuple[1] ] = list.add;
+
+ // Handle state
+ if ( stateString ) {
+ list.add(function() {
+ // state = [ resolved | rejected ]
+ state = stateString;
+
+ // [ reject_list | resolve_list ].disable; progress_list.lock
+ }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
+ }
+
+ // deferred[ resolve | reject | notify ] = list.fire
+ deferred[ tuple[0] ] = list.fire;
+ deferred[ tuple[0] + "With" ] = list.fireWith;
+ });
+
+ // Make the deferred a promise
+ promise.promise( deferred );
+
+ // Call given func if any
+ if ( func ) {
+ func.call( deferred, deferred );
+ }
+
+ // All done!
+ return deferred;
+ },
+
+ // Deferred helper
+ when: function( subordinate /* , ..., subordinateN */ ) {
+ var i = 0,
+ resolveValues = core_slice.call( arguments ),
+ length = resolveValues.length,
+
+ // the count of uncompleted subordinates
+ remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
+
+ // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
+ deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
+
+ // Update function for both resolve and progress values
+ updateFunc = function( i, contexts, values ) {
+ return function( value ) {
+ contexts[ i ] = this;
+ values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
+ if( values === progressValues ) {
+ deferred.notifyWith( contexts, values );
+ } else if ( !( --remaining ) ) {
+ deferred.resolveWith( contexts, values );
+ }
+ };
+ },
+
+ progressValues, progressContexts, resolveContexts;
+
+ // add listeners to Deferred subordinates; treat others as resolved
+ if ( length > 1 ) {
+ progressValues = new Array( length );
+ progressContexts = new Array( length );
+ resolveContexts = new Array( length );
+ for ( ; i < length; i++ ) {
+ if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
+ resolveValues[ i ].promise()
+ .done( updateFunc( i, resolveContexts, resolveValues ) )
+ .fail( deferred.reject )
+ .progress( updateFunc( i, progressContexts, progressValues ) );
+ } else {
+ --remaining;
+ }
+ }
+ }
+
+ // if we're not waiting on anything, resolve the master
+ if ( !remaining ) {
+ deferred.resolveWith( resolveContexts, resolveValues );
+ }
+
+ return deferred.promise();
+ }
+});
+jQuery.support = (function() {
+
+ var support,
+ all,
+ a,
+ select,
+ opt,
+ input,
+ fragment,
+ eventName,
+ i,
+ isSupported,
+ clickFn,
+ div = document.createElement("div");
+
+ // Setup
+ div.setAttribute( "className", "t" );
+ div.innerHTML = " a ";
+
+ // Support tests won't run in some limited or non-browser environments
+ all = div.getElementsByTagName("*");
+ a = div.getElementsByTagName("a")[ 0 ];
+ if ( !all || !a || !all.length ) {
+ return {};
+ }
+
+ // First batch of tests
+ select = document.createElement("select");
+ opt = select.appendChild( document.createElement("option") );
+ input = div.getElementsByTagName("input")[ 0 ];
+
+ a.style.cssText = "top:1px;float:left;opacity:.5";
+ support = {
+ // IE strips leading whitespace when .innerHTML is used
+ leadingWhitespace: ( div.firstChild.nodeType === 3 ),
+
+ // Make sure that tbody elements aren't automatically inserted
+ // IE will insert them into empty tables
+ tbody: !div.getElementsByTagName("tbody").length,
+
+ // Make sure that link elements get serialized correctly by innerHTML
+ // This requires a wrapper element in IE
+ htmlSerialize: !!div.getElementsByTagName("link").length,
+
+ // Get the style information from getAttribute
+ // (IE uses .cssText instead)
+ style: /top/.test( a.getAttribute("style") ),
+
+ // Make sure that URLs aren't manipulated
+ // (IE normalizes it by default)
+ hrefNormalized: ( a.getAttribute("href") === "/a" ),
+
+ // Make sure that element opacity exists
+ // (IE uses filter instead)
+ // Use a regex to work around a WebKit issue. See #5145
+ opacity: /^0.5/.test( a.style.opacity ),
+
+ // Verify style float existence
+ // (IE uses styleFloat instead of cssFloat)
+ cssFloat: !!a.style.cssFloat,
+
+ // Make sure that if no value is specified for a checkbox
+ // that it defaults to "on".
+ // (WebKit defaults to "" instead)
+ checkOn: ( input.value === "on" ),
+
+ // Make sure that a selected-by-default option has a working selected property.
+ // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+ optSelected: opt.selected,
+
+ // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+ getSetAttribute: div.className !== "t",
+
+ // Tests for enctype support on a form (#6743)
+ enctype: !!document.createElement("form").enctype,
+
+ // Makes sure cloning an html5 element does not cause problems
+ // Where outerHTML is undefined, this still works
+ html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>",
+
+ // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
+ boxModel: ( document.compatMode === "CSS1Compat" ),
+
+ // Will be defined later
+ submitBubbles: true,
+ changeBubbles: true,
+ focusinBubbles: false,
+ deleteExpando: true,
+ noCloneEvent: true,
+ inlineBlockNeedsLayout: false,
+ shrinkWrapBlocks: false,
+ reliableMarginRight: true,
+ boxSizingReliable: true,
+ pixelPosition: false
+ };
+
+ // Make sure checked status is properly cloned
+ input.checked = true;
+ support.noCloneChecked = input.cloneNode( true ).checked;
+
+ // Make sure that the options inside disabled selects aren't marked as disabled
+ // (WebKit marks them as disabled)
+ select.disabled = true;
+ support.optDisabled = !opt.disabled;
+
+ // Test to see if it's possible to delete an expando from an element
+ // Fails in Internet Explorer
+ try {
+ delete div.test;
+ } catch( e ) {
+ support.deleteExpando = false;
+ }
+
+ if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
+ div.attachEvent( "onclick", clickFn = function() {
+ // Cloning a node shouldn't copy over any
+ // bound event handlers (IE does this)
+ support.noCloneEvent = false;
+ });
+ div.cloneNode( true ).fireEvent("onclick");
+ div.detachEvent( "onclick", clickFn );
+ }
+
+ // Check if a radio maintains its value
+ // after being appended to the DOM
+ input = document.createElement("input");
+ input.value = "t";
+ input.setAttribute( "type", "radio" );
+ support.radioValue = input.value === "t";
+
+ input.setAttribute( "checked", "checked" );
+
+ // #11217 - WebKit loses check when the name is after the checked attribute
+ input.setAttribute( "name", "t" );
+
+ div.appendChild( input );
+ fragment = document.createDocumentFragment();
+ fragment.appendChild( div.lastChild );
+
+ // WebKit doesn't clone checked state correctly in fragments
+ support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+ // Check if a disconnected checkbox will retain its checked
+ // value of true after appended to the DOM (IE6/7)
+ support.appendChecked = input.checked;
+
+ fragment.removeChild( input );
+ fragment.appendChild( div );
+
+ // Technique from Juriy Zaytsev
+ // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
+ // We only care about the case where non-standard event systems
+ // are used, namely in IE. Short-circuiting here helps us to
+ // avoid an eval call (in setAttribute) which can cause CSP
+ // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
+ if ( div.attachEvent ) {
+ for ( i in {
+ submit: true,
+ change: true,
+ focusin: true
+ }) {
+ eventName = "on" + i;
+ isSupported = ( eventName in div );
+ if ( !isSupported ) {
+ div.setAttribute( eventName, "return;" );
+ isSupported = ( typeof div[ eventName ] === "function" );
+ }
+ support[ i + "Bubbles" ] = isSupported;
+ }
+ }
+
+ // Run tests that need a body at doc ready
+ jQuery(function() {
+ var container, div, tds, marginDiv,
+ divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;",
+ body = document.getElementsByTagName("body")[0];
+
+ if ( !body ) {
+ // Return for frameset docs that don't have a body
+ return;
+ }
+
+ container = document.createElement("div");
+ container.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px";
+ body.insertBefore( container, body.firstChild );
+
+ // Construct the test element
+ div = document.createElement("div");
+ container.appendChild( div );
+
+ // Check if table cells still have offsetWidth/Height when they are set
+ // to display:none and there are still other visible table cells in a
+ // table row; if so, offsetWidth/Height are not reliable for use when
+ // determining if an element has been hidden directly using
+ // display:none (it is still safe to use offsets if a parent element is
+ // hidden; don safety goggles and see bug #4512 for more information).
+ // (only IE 8 fails this test)
+ div.innerHTML = "";
+ tds = div.getElementsByTagName("td");
+ tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
+ isSupported = ( tds[ 0 ].offsetHeight === 0 );
+
+ tds[ 0 ].style.display = "";
+ tds[ 1 ].style.display = "none";
+
+ // Check if empty table cells still have offsetWidth/Height
+ // (IE <= 8 fail this test)
+ support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
+
+ // Check box-sizing and margin behavior
+ div.innerHTML = "";
+ div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
+ support.boxSizing = ( div.offsetWidth === 4 );
+ support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );
+
+ // NOTE: To any future maintainer, we've window.getComputedStyle
+ // because jsdom on node.js will break without it.
+ if ( window.getComputedStyle ) {
+ support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
+ support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
+
+ // Check if div with explicit width and no margin-right incorrectly
+ // gets computed margin-right based on width of container. For more
+ // info see bug #3333
+ // Fails in WebKit before Feb 2011 nightlies
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ marginDiv = document.createElement("div");
+ marginDiv.style.cssText = div.style.cssText = divReset;
+ marginDiv.style.marginRight = marginDiv.style.width = "0";
+ div.style.width = "1px";
+ div.appendChild( marginDiv );
+ support.reliableMarginRight =
+ !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
+ }
+
+ if ( typeof div.style.zoom !== "undefined" ) {
+ // Check if natively block-level elements act like inline-block
+ // elements when setting their display to 'inline' and giving
+ // them layout
+ // (IE < 8 does this)
+ div.innerHTML = "";
+ div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
+ support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
+
+ // Check if elements with layout shrink-wrap their children
+ // (IE 6 does this)
+ div.style.display = "block";
+ div.style.overflow = "visible";
+ div.innerHTML = "
";
+ div.firstChild.style.width = "5px";
+ support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
+
+ container.style.zoom = 1;
+ }
+
+ // Null elements to avoid leaks in IE
+ body.removeChild( container );
+ container = div = tds = marginDiv = null;
+ });
+
+ // Null elements to avoid leaks in IE
+ fragment.removeChild( div );
+ all = a = select = opt = input = fragment = div = null;
+
+ return support;
+})();
+var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
+ rmultiDash = /([A-Z])/g;
+
+jQuery.extend({
+ cache: {},
+
+ deletedIds: [],
+
+ // Remove at next major release (1.9/2.0)
+ uuid: 0,
+
+ // Unique for each copy of jQuery on the page
+ // Non-digits removed to match rinlinejQuery
+ expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
+
+ // The following elements throw uncatchable exceptions if you
+ // attempt to add expando properties to them.
+ noData: {
+ "embed": true,
+ // Ban all objects except for Flash (which handle expandos)
+ "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
+ "applet": true
+ },
+
+ hasData: function( elem ) {
+ elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
+ return !!elem && !isEmptyDataObject( elem );
+ },
+
+ data: function( elem, name, data, pvt /* Internal Use Only */ ) {
+ if ( !jQuery.acceptData( elem ) ) {
+ return;
+ }
+
+ var thisCache, ret,
+ internalKey = jQuery.expando,
+ getByName = typeof name === "string",
+
+ // We have to handle DOM nodes and JS objects differently because IE6-7
+ // can't GC object references properly across the DOM-JS boundary
+ isNode = elem.nodeType,
+
+ // Only DOM nodes need the global jQuery cache; JS object data is
+ // attached directly to the object so GC can occur automatically
+ cache = isNode ? jQuery.cache : elem,
+
+ // Only defining an ID for JS objects if its cache already exists allows
+ // the code to shortcut on the same path as a DOM node with no cache
+ id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
+
+ // Avoid doing any more work than we need to when trying to get data on an
+ // object that has no data at all
+ if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) {
+ return;
+ }
+
+ if ( !id ) {
+ // Only DOM nodes need a new unique ID for each element since their data
+ // ends up in the global cache
+ if ( isNode ) {
+ elem[ internalKey ] = id = jQuery.deletedIds.pop() || jQuery.guid++;
+ } else {
+ id = internalKey;
+ }
+ }
+
+ if ( !cache[ id ] ) {
+ cache[ id ] = {};
+
+ // Avoids exposing jQuery metadata on plain JS objects when the object
+ // is serialized using JSON.stringify
+ if ( !isNode ) {
+ cache[ id ].toJSON = jQuery.noop;
+ }
+ }
+
+ // An object can be passed to jQuery.data instead of a key/value pair; this gets
+ // shallow copied over onto the existing cache
+ if ( typeof name === "object" || typeof name === "function" ) {
+ if ( pvt ) {
+ cache[ id ] = jQuery.extend( cache[ id ], name );
+ } else {
+ cache[ id ].data = jQuery.extend( cache[ id ].data, name );
+ }
+ }
+
+ thisCache = cache[ id ];
+
+ // jQuery data() is stored in a separate object inside the object's internal data
+ // cache in order to avoid key collisions between internal data and user-defined
+ // data.
+ if ( !pvt ) {
+ if ( !thisCache.data ) {
+ thisCache.data = {};
+ }
+
+ thisCache = thisCache.data;
+ }
+
+ if ( data !== undefined ) {
+ thisCache[ jQuery.camelCase( name ) ] = data;
+ }
+
+ // Check for both converted-to-camel and non-converted data property names
+ // If a data property was specified
+ if ( getByName ) {
+
+ // First Try to find as-is property data
+ ret = thisCache[ name ];
+
+ // Test for null|undefined property data
+ if ( ret == null ) {
+
+ // Try to find the camelCased property
+ ret = thisCache[ jQuery.camelCase( name ) ];
+ }
+ } else {
+ ret = thisCache;
+ }
+
+ return ret;
+ },
+
+ removeData: function( elem, name, pvt /* Internal Use Only */ ) {
+ if ( !jQuery.acceptData( elem ) ) {
+ return;
+ }
+
+ var thisCache, i, l,
+
+ isNode = elem.nodeType,
+
+ // See jQuery.data for more information
+ cache = isNode ? jQuery.cache : elem,
+ id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
+
+ // If there is already no cache entry for this object, there is no
+ // purpose in continuing
+ if ( !cache[ id ] ) {
+ return;
+ }
+
+ if ( name ) {
+
+ thisCache = pvt ? cache[ id ] : cache[ id ].data;
+
+ if ( thisCache ) {
+
+ // Support array or space separated string names for data keys
+ if ( !jQuery.isArray( name ) ) {
+
+ // try the string as a key before any manipulation
+ if ( name in thisCache ) {
+ name = [ name ];
+ } else {
+
+ // split the camel cased version by spaces unless a key with the spaces exists
+ name = jQuery.camelCase( name );
+ if ( name in thisCache ) {
+ name = [ name ];
+ } else {
+ name = name.split(" ");
+ }
+ }
+ }
+
+ for ( i = 0, l = name.length; i < l; i++ ) {
+ delete thisCache[ name[i] ];
+ }
+
+ // If there is no data left in the cache, we want to continue
+ // and let the cache object itself get destroyed
+ if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
+ return;
+ }
+ }
+ }
+
+ // See jQuery.data for more information
+ if ( !pvt ) {
+ delete cache[ id ].data;
+
+ // Don't destroy the parent cache unless the internal data object
+ // had been the only thing left in it
+ if ( !isEmptyDataObject( cache[ id ] ) ) {
+ return;
+ }
+ }
+
+ // Destroy the cache
+ if ( isNode ) {
+ jQuery.cleanData( [ elem ], true );
+
+ // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
+ } else if ( jQuery.support.deleteExpando || cache != cache.window ) {
+ delete cache[ id ];
+
+ // When all else fails, null
+ } else {
+ cache[ id ] = null;
+ }
+ },
+
+ // For internal use only.
+ _data: function( elem, name, data ) {
+ return jQuery.data( elem, name, data, true );
+ },
+
+ // A method for determining if a DOM node can handle the data expando
+ acceptData: function( elem ) {
+ var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+ // nodes accept data unless otherwise specified; rejection can be conditional
+ return !noData || noData !== true && elem.getAttribute("classid") === noData;
+ }
+});
+
+jQuery.fn.extend({
+ data: function( key, value ) {
+ var parts, part, attr, name, l,
+ elem = this[0],
+ i = 0,
+ data = null;
+
+ // Gets all values
+ if ( key === undefined ) {
+ if ( this.length ) {
+ data = jQuery.data( elem );
+
+ if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
+ attr = elem.attributes;
+ for ( l = attr.length; i < l; i++ ) {
+ name = attr[i].name;
+
+ if ( !name.indexOf( "data-" ) ) {
+ name = jQuery.camelCase( name.substring(5) );
+
+ dataAttr( elem, name, data[ name ] );
+ }
+ }
+ jQuery._data( elem, "parsedAttrs", true );
+ }
+ }
+
+ return data;
+ }
+
+ // Sets multiple values
+ if ( typeof key === "object" ) {
+ return this.each(function() {
+ jQuery.data( this, key );
+ });
+ }
+
+ parts = key.split( ".", 2 );
+ parts[1] = parts[1] ? "." + parts[1] : "";
+ part = parts[1] + "!";
+
+ return jQuery.access( this, function( value ) {
+
+ if ( value === undefined ) {
+ data = this.triggerHandler( "getData" + part, [ parts[0] ] );
+
+ // Try to fetch any internally stored data first
+ if ( data === undefined && elem ) {
+ data = jQuery.data( elem, key );
+ data = dataAttr( elem, key, data );
+ }
+
+ return data === undefined && parts[1] ?
+ this.data( parts[0] ) :
+ data;
+ }
+
+ parts[1] = value;
+ this.each(function() {
+ var self = jQuery( this );
+
+ self.triggerHandler( "setData" + part, parts );
+ jQuery.data( this, key, value );
+ self.triggerHandler( "changeData" + part, parts );
+ });
+ }, null, value, arguments.length > 1, null, false );
+ },
+
+ removeData: function( key ) {
+ return this.each(function() {
+ jQuery.removeData( this, key );
+ });
+ }
+});
+
+function dataAttr( elem, key, data ) {
+ // If nothing was found internally, try to fetch any
+ // data from the HTML5 data-* attribute
+ if ( data === undefined && elem.nodeType === 1 ) {
+
+ var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
+
+ data = elem.getAttribute( name );
+
+ if ( typeof data === "string" ) {
+ try {
+ data = data === "true" ? true :
+ data === "false" ? false :
+ data === "null" ? null :
+ // Only convert to a number if it doesn't change the string
+ +data + "" === data ? +data :
+ rbrace.test( data ) ? jQuery.parseJSON( data ) :
+ data;
+ } catch( e ) {}
+
+ // Make sure we set the data so it isn't changed later
+ jQuery.data( elem, key, data );
+
+ } else {
+ data = undefined;
+ }
+ }
+
+ return data;
+}
+
+// checks a cache object for emptiness
+function isEmptyDataObject( obj ) {
+ var name;
+ for ( name in obj ) {
+
+ // if the public data object is empty, the private is still empty
+ if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
+ continue;
+ }
+ if ( name !== "toJSON" ) {
+ return false;
+ }
+ }
+
+ return true;
+}
+jQuery.extend({
+ queue: function( elem, type, data ) {
+ var queue;
+
+ if ( elem ) {
+ type = ( type || "fx" ) + "queue";
+ queue = jQuery._data( elem, type );
+
+ // Speed up dequeue by getting out quickly if this is just a lookup
+ if ( data ) {
+ if ( !queue || jQuery.isArray(data) ) {
+ queue = jQuery._data( elem, type, jQuery.makeArray(data) );
+ } else {
+ queue.push( data );
+ }
+ }
+ return queue || [];
+ }
+ },
+
+ dequeue: function( elem, type ) {
+ type = type || "fx";
+
+ var queue = jQuery.queue( elem, type ),
+ startLength = queue.length,
+ fn = queue.shift(),
+ hooks = jQuery._queueHooks( elem, type ),
+ next = function() {
+ jQuery.dequeue( elem, type );
+ };
+
+ // If the fx queue is dequeued, always remove the progress sentinel
+ if ( fn === "inprogress" ) {
+ fn = queue.shift();
+ startLength--;
+ }
+
+ if ( fn ) {
+
+ // Add a progress sentinel to prevent the fx queue from being
+ // automatically dequeued
+ if ( type === "fx" ) {
+ queue.unshift( "inprogress" );
+ }
+
+ // clear up the last queue stop function
+ delete hooks.stop;
+ fn.call( elem, next, hooks );
+ }
+
+ if ( !startLength && hooks ) {
+ hooks.empty.fire();
+ }
+ },
+
+ // not intended for public consumption - generates a queueHooks object, or returns the current one
+ _queueHooks: function( elem, type ) {
+ var key = type + "queueHooks";
+ return jQuery._data( elem, key ) || jQuery._data( elem, key, {
+ empty: jQuery.Callbacks("once memory").add(function() {
+ jQuery.removeData( elem, type + "queue", true );
+ jQuery.removeData( elem, key, true );
+ })
+ });
+ }
+});
+
+jQuery.fn.extend({
+ queue: function( type, data ) {
+ var setter = 2;
+
+ if ( typeof type !== "string" ) {
+ data = type;
+ type = "fx";
+ setter--;
+ }
+
+ if ( arguments.length < setter ) {
+ return jQuery.queue( this[0], type );
+ }
+
+ return data === undefined ?
+ this :
+ this.each(function() {
+ var queue = jQuery.queue( this, type, data );
+
+ // ensure a hooks for this queue
+ jQuery._queueHooks( this, type );
+
+ if ( type === "fx" && queue[0] !== "inprogress" ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ dequeue: function( type ) {
+ return this.each(function() {
+ jQuery.dequeue( this, type );
+ });
+ },
+ // Based off of the plugin by Clint Helfers, with permission.
+ // http://blindsignals.com/index.php/2009/07/jquery-delay/
+ delay: function( time, type ) {
+ time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+ type = type || "fx";
+
+ return this.queue( type, function( next, hooks ) {
+ var timeout = setTimeout( next, time );
+ hooks.stop = function() {
+ clearTimeout( timeout );
+ };
+ });
+ },
+ clearQueue: function( type ) {
+ return this.queue( type || "fx", [] );
+ },
+ // Get a promise resolved when queues of a certain type
+ // are emptied (fx is the type by default)
+ promise: function( type, obj ) {
+ var tmp,
+ count = 1,
+ defer = jQuery.Deferred(),
+ elements = this,
+ i = this.length,
+ resolve = function() {
+ if ( !( --count ) ) {
+ defer.resolveWith( elements, [ elements ] );
+ }
+ };
+
+ if ( typeof type !== "string" ) {
+ obj = type;
+ type = undefined;
+ }
+ type = type || "fx";
+
+ while( i-- ) {
+ tmp = jQuery._data( elements[ i ], type + "queueHooks" );
+ if ( tmp && tmp.empty ) {
+ count++;
+ tmp.empty.add( resolve );
+ }
+ }
+ resolve();
+ return defer.promise( obj );
+ }
+});
+var nodeHook, boolHook, fixSpecified,
+ rclass = /[\t\r\n]/g,
+ rreturn = /\r/g,
+ rtype = /^(?:button|input)$/i,
+ rfocusable = /^(?:button|input|object|select|textarea)$/i,
+ rclickable = /^a(?:rea|)$/i,
+ rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
+ getSetAttribute = jQuery.support.getSetAttribute;
+
+jQuery.fn.extend({
+ attr: function( name, value ) {
+ return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
+ },
+
+ removeAttr: function( name ) {
+ return this.each(function() {
+ jQuery.removeAttr( this, name );
+ });
+ },
+
+ prop: function( name, value ) {
+ return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
+ },
+
+ removeProp: function( name ) {
+ name = jQuery.propFix[ name ] || name;
+ return this.each(function() {
+ // try/catch handles cases where IE balks (such as removing a property on window)
+ try {
+ this[ name ] = undefined;
+ delete this[ name ];
+ } catch( e ) {}
+ });
+ },
+
+ addClass: function( value ) {
+ var classNames, i, l, elem,
+ setClass, c, cl;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).addClass( value.call(this, j, this.className) );
+ });
+ }
+
+ if ( value && typeof value === "string" ) {
+ classNames = value.split( core_rspace );
+
+ for ( i = 0, l = this.length; i < l; i++ ) {
+ elem = this[ i ];
+
+ if ( elem.nodeType === 1 ) {
+ if ( !elem.className && classNames.length === 1 ) {
+ elem.className = value;
+
+ } else {
+ setClass = " " + elem.className + " ";
+
+ for ( c = 0, cl = classNames.length; c < cl; c++ ) {
+ if ( setClass.indexOf( " " + classNames[ c ] + " " ) < 0 ) {
+ setClass += classNames[ c ] + " ";
+ }
+ }
+ elem.className = jQuery.trim( setClass );
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ removeClass: function( value ) {
+ var removes, className, elem, c, cl, i, l;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).removeClass( value.call(this, j, this.className) );
+ });
+ }
+ if ( (value && typeof value === "string") || value === undefined ) {
+ removes = ( value || "" ).split( core_rspace );
+
+ for ( i = 0, l = this.length; i < l; i++ ) {
+ elem = this[ i ];
+ if ( elem.nodeType === 1 && elem.className ) {
+
+ className = (" " + elem.className + " ").replace( rclass, " " );
+
+ // loop over each item in the removal list
+ for ( c = 0, cl = removes.length; c < cl; c++ ) {
+ // Remove until there is nothing to remove,
+ while ( className.indexOf(" " + removes[ c ] + " ") >= 0 ) {
+ className = className.replace( " " + removes[ c ] + " " , " " );
+ }
+ }
+ elem.className = value ? jQuery.trim( className ) : "";
+ }
+ }
+ }
+
+ return this;
+ },
+
+ toggleClass: function( value, stateVal ) {
+ var type = typeof value,
+ isBool = typeof stateVal === "boolean";
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+ });
+ }
+
+ return this.each(function() {
+ if ( type === "string" ) {
+ // toggle individual class names
+ var className,
+ i = 0,
+ self = jQuery( this ),
+ state = stateVal,
+ classNames = value.split( core_rspace );
+
+ while ( (className = classNames[ i++ ]) ) {
+ // check each className given, space separated list
+ state = isBool ? state : !self.hasClass( className );
+ self[ state ? "addClass" : "removeClass" ]( className );
+ }
+
+ } else if ( type === "undefined" || type === "boolean" ) {
+ if ( this.className ) {
+ // store className if set
+ jQuery._data( this, "__className__", this.className );
+ }
+
+ // toggle whole className
+ this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
+ }
+ });
+ },
+
+ hasClass: function( selector ) {
+ var className = " " + selector + " ",
+ i = 0,
+ l = this.length;
+ for ( ; i < l; i++ ) {
+ if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
+ return true;
+ }
+ }
+
+ return false;
+ },
+
+ val: function( value ) {
+ var hooks, ret, isFunction,
+ elem = this[0];
+
+ if ( !arguments.length ) {
+ if ( elem ) {
+ hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+ return ret;
+ }
+
+ ret = elem.value;
+
+ return typeof ret === "string" ?
+ // handle most common string cases
+ ret.replace(rreturn, "") :
+ // handle cases where value is null/undef or number
+ ret == null ? "" : ret;
+ }
+
+ return;
+ }
+
+ isFunction = jQuery.isFunction( value );
+
+ return this.each(function( i ) {
+ var val,
+ self = jQuery(this);
+
+ if ( this.nodeType !== 1 ) {
+ return;
+ }
+
+ if ( isFunction ) {
+ val = value.call( this, i, self.val() );
+ } else {
+ val = value;
+ }
+
+ // Treat null/undefined as ""; convert numbers to string
+ if ( val == null ) {
+ val = "";
+ } else if ( typeof val === "number" ) {
+ val += "";
+ } else if ( jQuery.isArray( val ) ) {
+ val = jQuery.map(val, function ( value ) {
+ return value == null ? "" : value + "";
+ });
+ }
+
+ hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+ // If set returns undefined, fall back to normal setting
+ if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
+ this.value = val;
+ }
+ });
+ }
+});
+
+jQuery.extend({
+ valHooks: {
+ option: {
+ get: function( elem ) {
+ // attributes.value is undefined in Blackberry 4.7 but
+ // uses .value. See #6932
+ var val = elem.attributes.value;
+ return !val || val.specified ? elem.value : elem.text;
+ }
+ },
+ select: {
+ get: function( elem ) {
+ var value, option,
+ options = elem.options,
+ index = elem.selectedIndex,
+ one = elem.type === "select-one" || index < 0,
+ values = one ? null : [],
+ max = one ? index + 1 : options.length,
+ i = index < 0 ?
+ max :
+ one ? index : 0;
+
+ // Loop through all the selected options
+ for ( ; i < max; i++ ) {
+ option = options[ i ];
+
+ // oldIE doesn't update selected after form reset (#2551)
+ if ( ( option.selected || i === index ) &&
+ // Don't return options that are disabled or in a disabled optgroup
+ ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
+ ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
+
+ // Get the specific value for the option
+ value = jQuery( option ).val();
+
+ // We don't need an array for one selects
+ if ( one ) {
+ return value;
+ }
+
+ // Multi-Selects return an array
+ values.push( value );
+ }
+ }
+
+ return values;
+ },
+
+ set: function( elem, value ) {
+ var values = jQuery.makeArray( value );
+
+ jQuery(elem).find("option").each(function() {
+ this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
+ });
+
+ if ( !values.length ) {
+ elem.selectedIndex = -1;
+ }
+ return values;
+ }
+ }
+ },
+
+ // Unused in 1.8, left in so attrFn-stabbers won't die; remove in 1.9
+ attrFn: {},
+
+ attr: function( elem, name, value, pass ) {
+ var ret, hooks, notxml,
+ nType = elem.nodeType;
+
+ // don't get/set attributes on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ if ( pass && jQuery.isFunction( jQuery.fn[ name ] ) ) {
+ return jQuery( elem )[ name ]( value );
+ }
+
+ // Fallback to prop when attributes are not supported
+ if ( typeof elem.getAttribute === "undefined" ) {
+ return jQuery.prop( elem, name, value );
+ }
+
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+ // All attributes are lowercase
+ // Grab necessary hook if one is defined
+ if ( notxml ) {
+ name = name.toLowerCase();
+ hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
+ }
+
+ if ( value !== undefined ) {
+
+ if ( value === null ) {
+ jQuery.removeAttr( elem, name );
+ return;
+
+ } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ elem.setAttribute( name, value + "" );
+ return value;
+ }
+
+ } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
+ return ret;
+
+ } else {
+
+ ret = elem.getAttribute( name );
+
+ // Non-existent attributes return null, we normalize to undefined
+ return ret === null ?
+ undefined :
+ ret;
+ }
+ },
+
+ removeAttr: function( elem, value ) {
+ var propName, attrNames, name, isBool,
+ i = 0;
+
+ if ( value && elem.nodeType === 1 ) {
+
+ attrNames = value.split( core_rspace );
+
+ for ( ; i < attrNames.length; i++ ) {
+ name = attrNames[ i ];
+
+ if ( name ) {
+ propName = jQuery.propFix[ name ] || name;
+ isBool = rboolean.test( name );
+
+ // See #9699 for explanation of this approach (setting first, then removal)
+ // Do not do this for boolean attributes (see #10870)
+ if ( !isBool ) {
+ jQuery.attr( elem, name, "" );
+ }
+ elem.removeAttribute( getSetAttribute ? name : propName );
+
+ // Set corresponding property to false for boolean attributes
+ if ( isBool && propName in elem ) {
+ elem[ propName ] = false;
+ }
+ }
+ }
+ }
+ },
+
+ attrHooks: {
+ type: {
+ set: function( elem, value ) {
+ // We can't allow the type property to be changed (since it causes problems in IE)
+ if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
+ jQuery.error( "type property can't be changed" );
+ } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
+ // Setting the type on a radio button after the value resets the value in IE6-9
+ // Reset value to it's default in case type is set after value
+ // This is for element creation
+ var val = elem.value;
+ elem.setAttribute( "type", value );
+ if ( val ) {
+ elem.value = val;
+ }
+ return value;
+ }
+ }
+ },
+ // Use the value property for back compat
+ // Use the nodeHook for button elements in IE6/7 (#1954)
+ value: {
+ get: function( elem, name ) {
+ if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+ return nodeHook.get( elem, name );
+ }
+ return name in elem ?
+ elem.value :
+ null;
+ },
+ set: function( elem, value, name ) {
+ if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+ return nodeHook.set( elem, value, name );
+ }
+ // Does not return so that setAttribute is also used
+ elem.value = value;
+ }
+ }
+ },
+
+ propFix: {
+ tabindex: "tabIndex",
+ readonly: "readOnly",
+ "for": "htmlFor",
+ "class": "className",
+ maxlength: "maxLength",
+ cellspacing: "cellSpacing",
+ cellpadding: "cellPadding",
+ rowspan: "rowSpan",
+ colspan: "colSpan",
+ usemap: "useMap",
+ frameborder: "frameBorder",
+ contenteditable: "contentEditable"
+ },
+
+ prop: function( elem, name, value ) {
+ var ret, hooks, notxml,
+ nType = elem.nodeType;
+
+ // don't get/set properties on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+ if ( notxml ) {
+ // Fix name and attach hooks
+ name = jQuery.propFix[ name ] || name;
+ hooks = jQuery.propHooks[ name ];
+ }
+
+ if ( value !== undefined ) {
+ if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ return ( elem[ name ] = value );
+ }
+
+ } else {
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+ return ret;
+
+ } else {
+ return elem[ name ];
+ }
+ }
+ },
+
+ propHooks: {
+ tabIndex: {
+ get: function( elem ) {
+ // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+ // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+ var attributeNode = elem.getAttributeNode("tabindex");
+
+ return attributeNode && attributeNode.specified ?
+ parseInt( attributeNode.value, 10 ) :
+ rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+ 0 :
+ undefined;
+ }
+ }
+ }
+});
+
+// Hook for boolean attributes
+boolHook = {
+ get: function( elem, name ) {
+ // Align boolean attributes with corresponding properties
+ // Fall back to attribute presence where some booleans are not supported
+ var attrNode,
+ property = jQuery.prop( elem, name );
+ return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
+ name.toLowerCase() :
+ undefined;
+ },
+ set: function( elem, value, name ) {
+ var propName;
+ if ( value === false ) {
+ // Remove boolean attributes when set to false
+ jQuery.removeAttr( elem, name );
+ } else {
+ // value is true since we know at this point it's type boolean and not false
+ // Set boolean attributes to the same name and set the DOM property
+ propName = jQuery.propFix[ name ] || name;
+ if ( propName in elem ) {
+ // Only set the IDL specifically if it already exists on the element
+ elem[ propName ] = true;
+ }
+
+ elem.setAttribute( name, name.toLowerCase() );
+ }
+ return name;
+ }
+};
+
+// IE6/7 do not support getting/setting some attributes with get/setAttribute
+if ( !getSetAttribute ) {
+
+ fixSpecified = {
+ name: true,
+ id: true,
+ coords: true
+ };
+
+ // Use this for any attribute in IE6/7
+ // This fixes almost every IE6/7 issue
+ nodeHook = jQuery.valHooks.button = {
+ get: function( elem, name ) {
+ var ret;
+ ret = elem.getAttributeNode( name );
+ return ret && ( fixSpecified[ name ] ? ret.value !== "" : ret.specified ) ?
+ ret.value :
+ undefined;
+ },
+ set: function( elem, value, name ) {
+ // Set the existing or create a new attribute node
+ var ret = elem.getAttributeNode( name );
+ if ( !ret ) {
+ ret = document.createAttribute( name );
+ elem.setAttributeNode( ret );
+ }
+ return ( ret.value = value + "" );
+ }
+ };
+
+ // Set width and height to auto instead of 0 on empty string( Bug #8150 )
+ // This is for removals
+ jQuery.each([ "width", "height" ], function( i, name ) {
+ jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+ set: function( elem, value ) {
+ if ( value === "" ) {
+ elem.setAttribute( name, "auto" );
+ return value;
+ }
+ }
+ });
+ });
+
+ // Set contenteditable to false on removals(#10429)
+ // Setting to empty string throws an error as an invalid value
+ jQuery.attrHooks.contenteditable = {
+ get: nodeHook.get,
+ set: function( elem, value, name ) {
+ if ( value === "" ) {
+ value = "false";
+ }
+ nodeHook.set( elem, value, name );
+ }
+ };
+}
+
+
+// Some attributes require a special call on IE
+if ( !jQuery.support.hrefNormalized ) {
+ jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
+ jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+ get: function( elem ) {
+ var ret = elem.getAttribute( name, 2 );
+ return ret === null ? undefined : ret;
+ }
+ });
+ });
+}
+
+if ( !jQuery.support.style ) {
+ jQuery.attrHooks.style = {
+ get: function( elem ) {
+ // Return undefined in the case of empty string
+ // Normalize to lowercase since IE uppercases css property names
+ return elem.style.cssText.toLowerCase() || undefined;
+ },
+ set: function( elem, value ) {
+ return ( elem.style.cssText = value + "" );
+ }
+ };
+}
+
+// Safari mis-reports the default selected property of an option
+// Accessing the parent's selectedIndex property fixes it
+if ( !jQuery.support.optSelected ) {
+ jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
+ get: function( elem ) {
+ var parent = elem.parentNode;
+
+ if ( parent ) {
+ parent.selectedIndex;
+
+ // Make sure that it also works with optgroups, see #5701
+ if ( parent.parentNode ) {
+ parent.parentNode.selectedIndex;
+ }
+ }
+ return null;
+ }
+ });
+}
+
+// IE6/7 call enctype encoding
+if ( !jQuery.support.enctype ) {
+ jQuery.propFix.enctype = "encoding";
+}
+
+// Radios and checkboxes getter/setter
+if ( !jQuery.support.checkOn ) {
+ jQuery.each([ "radio", "checkbox" ], function() {
+ jQuery.valHooks[ this ] = {
+ get: function( elem ) {
+ // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
+ return elem.getAttribute("value") === null ? "on" : elem.value;
+ }
+ };
+ });
+}
+jQuery.each([ "radio", "checkbox" ], function() {
+ jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
+ set: function( elem, value ) {
+ if ( jQuery.isArray( value ) ) {
+ return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
+ }
+ }
+ });
+});
+var rformElems = /^(?:textarea|input|select)$/i,
+ rtypenamespace = /^([^\.]*|)(?:\.(.+)|)$/,
+ rhoverHack = /(?:^|\s)hover(\.\S+|)\b/,
+ rkeyEvent = /^key/,
+ rmouseEvent = /^(?:mouse|contextmenu)|click/,
+ rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+ hoverHack = function( events ) {
+ return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
+ };
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+ add: function( elem, types, handler, data, selector ) {
+
+ var elemData, eventHandle, events,
+ t, tns, type, namespaces, handleObj,
+ handleObjIn, handlers, special;
+
+ // Don't attach events to noData or text/comment nodes (allow plain objects tho)
+ if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {
+ return;
+ }
+
+ // Caller can pass in an object of custom data in lieu of the handler
+ if ( handler.handler ) {
+ handleObjIn = handler;
+ handler = handleObjIn.handler;
+ selector = handleObjIn.selector;
+ }
+
+ // Make sure that the handler has a unique ID, used to find/remove it later
+ if ( !handler.guid ) {
+ handler.guid = jQuery.guid++;
+ }
+
+ // Init the element's event structure and main handler, if this is the first
+ events = elemData.events;
+ if ( !events ) {
+ elemData.events = events = {};
+ }
+ eventHandle = elemData.handle;
+ if ( !eventHandle ) {
+ elemData.handle = eventHandle = function( e ) {
+ // Discard the second event of a jQuery.event.trigger() and
+ // when an event is called after a page has unloaded
+ return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
+ jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
+ undefined;
+ };
+ // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
+ eventHandle.elem = elem;
+ }
+
+ // Handle multiple events separated by a space
+ // jQuery(...).bind("mouseover mouseout", fn);
+ types = jQuery.trim( hoverHack(types) ).split( " " );
+ for ( t = 0; t < types.length; t++ ) {
+
+ tns = rtypenamespace.exec( types[t] ) || [];
+ type = tns[1];
+ namespaces = ( tns[2] || "" ).split( "." ).sort();
+
+ // If event changes its type, use the special event handlers for the changed type
+ special = jQuery.event.special[ type ] || {};
+
+ // If selector defined, determine special event api type, otherwise given type
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+
+ // Update special based on newly reset type
+ special = jQuery.event.special[ type ] || {};
+
+ // handleObj is passed to all event handlers
+ handleObj = jQuery.extend({
+ type: type,
+ origType: tns[1],
+ data: data,
+ handler: handler,
+ guid: handler.guid,
+ selector: selector,
+ needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
+ namespace: namespaces.join(".")
+ }, handleObjIn );
+
+ // Init the event handler queue if we're the first
+ handlers = events[ type ];
+ if ( !handlers ) {
+ handlers = events[ type ] = [];
+ handlers.delegateCount = 0;
+
+ // Only use addEventListener/attachEvent if the special events handler returns false
+ if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+ // Bind the global event handler to the element
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, eventHandle, false );
+
+ } else if ( elem.attachEvent ) {
+ elem.attachEvent( "on" + type, eventHandle );
+ }
+ }
+ }
+
+ if ( special.add ) {
+ special.add.call( elem, handleObj );
+
+ if ( !handleObj.handler.guid ) {
+ handleObj.handler.guid = handler.guid;
+ }
+ }
+
+ // Add to the element's handler list, delegates in front
+ if ( selector ) {
+ handlers.splice( handlers.delegateCount++, 0, handleObj );
+ } else {
+ handlers.push( handleObj );
+ }
+
+ // Keep track of which events have ever been used, for event optimization
+ jQuery.event.global[ type ] = true;
+ }
+
+ // Nullify elem to prevent memory leaks in IE
+ elem = null;
+ },
+
+ global: {},
+
+ // Detach an event or set of events from an element
+ remove: function( elem, types, handler, selector, mappedTypes ) {
+
+ var t, tns, type, origType, namespaces, origCount,
+ j, events, special, eventType, handleObj,
+ elemData = jQuery.hasData( elem ) && jQuery._data( elem );
+
+ if ( !elemData || !(events = elemData.events) ) {
+ return;
+ }
+
+ // Once for each type.namespace in types; type may be omitted
+ types = jQuery.trim( hoverHack( types || "" ) ).split(" ");
+ for ( t = 0; t < types.length; t++ ) {
+ tns = rtypenamespace.exec( types[t] ) || [];
+ type = origType = tns[1];
+ namespaces = tns[2];
+
+ // Unbind all events (on this namespace, if provided) for the element
+ if ( !type ) {
+ for ( type in events ) {
+ jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+ }
+ continue;
+ }
+
+ special = jQuery.event.special[ type ] || {};
+ type = ( selector? special.delegateType : special.bindType ) || type;
+ eventType = events[ type ] || [];
+ origCount = eventType.length;
+ namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
+
+ // Remove matching events
+ for ( j = 0; j < eventType.length; j++ ) {
+ handleObj = eventType[ j ];
+
+ if ( ( mappedTypes || origType === handleObj.origType ) &&
+ ( !handler || handler.guid === handleObj.guid ) &&
+ ( !namespaces || namespaces.test( handleObj.namespace ) ) &&
+ ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+ eventType.splice( j--, 1 );
+
+ if ( handleObj.selector ) {
+ eventType.delegateCount--;
+ }
+ if ( special.remove ) {
+ special.remove.call( elem, handleObj );
+ }
+ }
+ }
+
+ // Remove generic event handler if we removed something and no more handlers exist
+ // (avoids potential for endless recursion during removal of special event handlers)
+ if ( eventType.length === 0 && origCount !== eventType.length ) {
+ if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+ jQuery.removeEvent( elem, type, elemData.handle );
+ }
+
+ delete events[ type ];
+ }
+ }
+
+ // Remove the expando if it's no longer used
+ if ( jQuery.isEmptyObject( events ) ) {
+ delete elemData.handle;
+
+ // removeData also checks for emptiness and clears the expando if empty
+ // so use it instead of delete
+ jQuery.removeData( elem, "events", true );
+ }
+ },
+
+ // Events that are safe to short-circuit if no handlers are attached.
+ // Native DOM events should not be added, they may have inline handlers.
+ customEvent: {
+ "getData": true,
+ "setData": true,
+ "changeData": true
+ },
+
+ trigger: function( event, data, elem, onlyHandlers ) {
+ // Don't do events on text and comment nodes
+ if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
+ return;
+ }
+
+ // Event object or event type
+ var cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType,
+ type = event.type || event,
+ namespaces = [];
+
+ // focus/blur morphs to focusin/out; ensure we're not firing them right now
+ if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+ return;
+ }
+
+ if ( type.indexOf( "!" ) >= 0 ) {
+ // Exclusive events trigger only for the exact event (no namespaces)
+ type = type.slice(0, -1);
+ exclusive = true;
+ }
+
+ if ( type.indexOf( "." ) >= 0 ) {
+ // Namespaced trigger; create a regexp to match event type in handle()
+ namespaces = type.split(".");
+ type = namespaces.shift();
+ namespaces.sort();
+ }
+
+ if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
+ // No jQuery handlers for this event type, and it can't have inline handlers
+ return;
+ }
+
+ // Caller can pass in an Event, Object, or just an event type string
+ event = typeof event === "object" ?
+ // jQuery.Event object
+ event[ jQuery.expando ] ? event :
+ // Object literal
+ new jQuery.Event( type, event ) :
+ // Just the event type (string)
+ new jQuery.Event( type );
+
+ event.type = type;
+ event.isTrigger = true;
+ event.exclusive = exclusive;
+ event.namespace = namespaces.join( "." );
+ event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
+ ontype = type.indexOf( ":" ) < 0 ? "on" + type : "";
+
+ // Handle a global trigger
+ if ( !elem ) {
+
+ // TODO: Stop taunting the data cache; remove global events and always attach to document
+ cache = jQuery.cache;
+ for ( i in cache ) {
+ if ( cache[ i ].events && cache[ i ].events[ type ] ) {
+ jQuery.event.trigger( event, data, cache[ i ].handle.elem, true );
+ }
+ }
+ return;
+ }
+
+ // Clean up the event in case it is being reused
+ event.result = undefined;
+ if ( !event.target ) {
+ event.target = elem;
+ }
+
+ // Clone any incoming data and prepend the event, creating the handler arg list
+ data = data != null ? jQuery.makeArray( data ) : [];
+ data.unshift( event );
+
+ // Allow special events to draw outside the lines
+ special = jQuery.event.special[ type ] || {};
+ if ( special.trigger && special.trigger.apply( elem, data ) === false ) {
+ return;
+ }
+
+ // Determine event propagation path in advance, per W3C events spec (#9951)
+ // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+ eventPath = [[ elem, special.bindType || type ]];
+ if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
+
+ bubbleType = special.delegateType || type;
+ cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode;
+ for ( old = elem; cur; cur = cur.parentNode ) {
+ eventPath.push([ cur, bubbleType ]);
+ old = cur;
+ }
+
+ // Only add window if we got to document (e.g., not plain obj or detached DOM)
+ if ( old === (elem.ownerDocument || document) ) {
+ eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]);
+ }
+ }
+
+ // Fire handlers on the event path
+ for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) {
+
+ cur = eventPath[i][0];
+ event.type = eventPath[i][1];
+
+ handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
+ if ( handle ) {
+ handle.apply( cur, data );
+ }
+ // Note that this is a bare JS function and not a jQuery handler
+ handle = ontype && cur[ ontype ];
+ if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
+ event.preventDefault();
+ }
+ }
+ event.type = type;
+
+ // If nobody prevented the default action, do it now
+ if ( !onlyHandlers && !event.isDefaultPrevented() ) {
+
+ if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
+ !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
+
+ // Call a native DOM method on the target with the same name name as the event.
+ // Can't use an .isFunction() check here because IE6/7 fails that test.
+ // Don't do default actions on window, that's where global variables be (#6170)
+ // IE<9 dies on focus/blur to hidden element (#1486)
+ if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) {
+
+ // Don't re-trigger an onFOO event when we call its FOO() method
+ old = elem[ ontype ];
+
+ if ( old ) {
+ elem[ ontype ] = null;
+ }
+
+ // Prevent re-triggering of the same event, since we already bubbled it above
+ jQuery.event.triggered = type;
+ elem[ type ]();
+ jQuery.event.triggered = undefined;
+
+ if ( old ) {
+ elem[ ontype ] = old;
+ }
+ }
+ }
+ }
+
+ return event.result;
+ },
+
+ dispatch: function( event ) {
+
+ // Make a writable jQuery.Event from the native event object
+ event = jQuery.event.fix( event || window.event );
+
+ var i, j, cur, ret, selMatch, matched, matches, handleObj, sel, related,
+ handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []),
+ delegateCount = handlers.delegateCount,
+ args = core_slice.call( arguments ),
+ run_all = !event.exclusive && !event.namespace,
+ special = jQuery.event.special[ event.type ] || {},
+ handlerQueue = [];
+
+ // Use the fix-ed jQuery.Event rather than the (read-only) native event
+ args[0] = event;
+ event.delegateTarget = this;
+
+ // Call the preDispatch hook for the mapped type, and let it bail if desired
+ if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+ return;
+ }
+
+ // Determine handlers that should run if there are delegated events
+ // Avoid non-left-click bubbling in Firefox (#3861)
+ if ( delegateCount && !(event.button && event.type === "click") ) {
+
+ for ( cur = event.target; cur != this; cur = cur.parentNode || this ) {
+
+ // Don't process clicks (ONLY) on disabled elements (#6911, #8165, #11382, #11764)
+ if ( cur.disabled !== true || event.type !== "click" ) {
+ selMatch = {};
+ matches = [];
+ for ( i = 0; i < delegateCount; i++ ) {
+ handleObj = handlers[ i ];
+ sel = handleObj.selector;
+
+ if ( selMatch[ sel ] === undefined ) {
+ selMatch[ sel ] = handleObj.needsContext ?
+ jQuery( sel, this ).index( cur ) >= 0 :
+ jQuery.find( sel, this, null, [ cur ] ).length;
+ }
+ if ( selMatch[ sel ] ) {
+ matches.push( handleObj );
+ }
+ }
+ if ( matches.length ) {
+ handlerQueue.push({ elem: cur, matches: matches });
+ }
+ }
+ }
+ }
+
+ // Add the remaining (directly-bound) handlers
+ if ( handlers.length > delegateCount ) {
+ handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) });
+ }
+
+ // Run delegates first; they may want to stop propagation beneath us
+ for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) {
+ matched = handlerQueue[ i ];
+ event.currentTarget = matched.elem;
+
+ for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) {
+ handleObj = matched.matches[ j ];
+
+ // Triggered event must either 1) be non-exclusive and have no namespace, or
+ // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
+ if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
+
+ event.data = handleObj.data;
+ event.handleObj = handleObj;
+
+ ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
+ .apply( matched.elem, args );
+
+ if ( ret !== undefined ) {
+ event.result = ret;
+ if ( ret === false ) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ }
+ }
+ }
+ }
+
+ // Call the postDispatch hook for the mapped type
+ if ( special.postDispatch ) {
+ special.postDispatch.call( this, event );
+ }
+
+ return event.result;
+ },
+
+ // Includes some event props shared by KeyEvent and MouseEvent
+ // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 ***
+ props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
+
+ fixHooks: {},
+
+ keyHooks: {
+ props: "char charCode key keyCode".split(" "),
+ filter: function( event, original ) {
+
+ // Add which for key events
+ if ( event.which == null ) {
+ event.which = original.charCode != null ? original.charCode : original.keyCode;
+ }
+
+ return event;
+ }
+ },
+
+ mouseHooks: {
+ props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
+ filter: function( event, original ) {
+ var eventDoc, doc, body,
+ button = original.button,
+ fromElement = original.fromElement;
+
+ // Calculate pageX/Y if missing and clientX/Y available
+ if ( event.pageX == null && original.clientX != null ) {
+ eventDoc = event.target.ownerDocument || document;
+ doc = eventDoc.documentElement;
+ body = eventDoc.body;
+
+ event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+ event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
+ }
+
+ // Add relatedTarget, if necessary
+ if ( !event.relatedTarget && fromElement ) {
+ event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
+ }
+
+ // Add which for click: 1 === left; 2 === middle; 3 === right
+ // Note: button is not normalized, so don't use it
+ if ( !event.which && button !== undefined ) {
+ event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+ }
+
+ return event;
+ }
+ },
+
+ fix: function( event ) {
+ if ( event[ jQuery.expando ] ) {
+ return event;
+ }
+
+ // Create a writable copy of the event object and normalize some properties
+ var i, prop,
+ originalEvent = event,
+ fixHook = jQuery.event.fixHooks[ event.type ] || {},
+ copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
+
+ event = jQuery.Event( originalEvent );
+
+ for ( i = copy.length; i; ) {
+ prop = copy[ --i ];
+ event[ prop ] = originalEvent[ prop ];
+ }
+
+ // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)
+ if ( !event.target ) {
+ event.target = originalEvent.srcElement || document;
+ }
+
+ // Target should not be a text node (#504, Safari)
+ if ( event.target.nodeType === 3 ) {
+ event.target = event.target.parentNode;
+ }
+
+ // For mouse/key events, metaKey==false if it's undefined (#3368, #11328; IE6/7/8)
+ event.metaKey = !!event.metaKey;
+
+ return fixHook.filter? fixHook.filter( event, originalEvent ) : event;
+ },
+
+ special: {
+ load: {
+ // Prevent triggered image.load events from bubbling to window.load
+ noBubble: true
+ },
+
+ focus: {
+ delegateType: "focusin"
+ },
+ blur: {
+ delegateType: "focusout"
+ },
+
+ beforeunload: {
+ setup: function( data, namespaces, eventHandle ) {
+ // We only want to do this special case on windows
+ if ( jQuery.isWindow( this ) ) {
+ this.onbeforeunload = eventHandle;
+ }
+ },
+
+ teardown: function( namespaces, eventHandle ) {
+ if ( this.onbeforeunload === eventHandle ) {
+ this.onbeforeunload = null;
+ }
+ }
+ }
+ },
+
+ simulate: function( type, elem, event, bubble ) {
+ // Piggyback on a donor event to simulate a different one.
+ // Fake originalEvent to avoid donor's stopPropagation, but if the
+ // simulated event prevents default then we do the same on the donor.
+ var e = jQuery.extend(
+ new jQuery.Event(),
+ event,
+ { type: type,
+ isSimulated: true,
+ originalEvent: {}
+ }
+ );
+ if ( bubble ) {
+ jQuery.event.trigger( e, null, elem );
+ } else {
+ jQuery.event.dispatch.call( elem, e );
+ }
+ if ( e.isDefaultPrevented() ) {
+ event.preventDefault();
+ }
+ }
+};
+
+// Some plugins are using, but it's undocumented/deprecated and will be removed.
+// The 1.7 special event interface should provide all the hooks needed now.
+jQuery.event.handle = jQuery.event.dispatch;
+
+jQuery.removeEvent = document.removeEventListener ?
+ function( elem, type, handle ) {
+ if ( elem.removeEventListener ) {
+ elem.removeEventListener( type, handle, false );
+ }
+ } :
+ function( elem, type, handle ) {
+ var name = "on" + type;
+
+ if ( elem.detachEvent ) {
+
+ // #8545, #7054, preventing memory leaks for custom events in IE6-8
+ // detachEvent needed property on element, by name of that event, to properly expose it to GC
+ if ( typeof elem[ name ] === "undefined" ) {
+ elem[ name ] = null;
+ }
+
+ elem.detachEvent( name, handle );
+ }
+ };
+
+jQuery.Event = function( src, props ) {
+ // Allow instantiation without the 'new' keyword
+ if ( !(this instanceof jQuery.Event) ) {
+ return new jQuery.Event( src, props );
+ }
+
+ // Event object
+ if ( src && src.type ) {
+ this.originalEvent = src;
+ this.type = src.type;
+
+ // Events bubbling up the document may have been marked as prevented
+ // by a handler lower down the tree; reflect the correct value.
+ this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
+ src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
+
+ // Event type
+ } else {
+ this.type = src;
+ }
+
+ // Put explicitly provided properties onto the event object
+ if ( props ) {
+ jQuery.extend( this, props );
+ }
+
+ // Create a timestamp if incoming event doesn't have one
+ this.timeStamp = src && src.timeStamp || jQuery.now();
+
+ // Mark it as fixed
+ this[ jQuery.expando ] = true;
+};
+
+function returnFalse() {
+ return false;
+}
+function returnTrue() {
+ return true;
+}
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+ preventDefault: function() {
+ this.isDefaultPrevented = returnTrue;
+
+ var e = this.originalEvent;
+ if ( !e ) {
+ return;
+ }
+
+ // if preventDefault exists run it on the original event
+ if ( e.preventDefault ) {
+ e.preventDefault();
+
+ // otherwise set the returnValue property of the original event to false (IE)
+ } else {
+ e.returnValue = false;
+ }
+ },
+ stopPropagation: function() {
+ this.isPropagationStopped = returnTrue;
+
+ var e = this.originalEvent;
+ if ( !e ) {
+ return;
+ }
+ // if stopPropagation exists run it on the original event
+ if ( e.stopPropagation ) {
+ e.stopPropagation();
+ }
+ // otherwise set the cancelBubble property of the original event to true (IE)
+ e.cancelBubble = true;
+ },
+ stopImmediatePropagation: function() {
+ this.isImmediatePropagationStopped = returnTrue;
+ this.stopPropagation();
+ },
+ isDefaultPrevented: returnFalse,
+ isPropagationStopped: returnFalse,
+ isImmediatePropagationStopped: returnFalse
+};
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+jQuery.each({
+ mouseenter: "mouseover",
+ mouseleave: "mouseout"
+}, function( orig, fix ) {
+ jQuery.event.special[ orig ] = {
+ delegateType: fix,
+ bindType: fix,
+
+ handle: function( event ) {
+ var ret,
+ target = this,
+ related = event.relatedTarget,
+ handleObj = event.handleObj,
+ selector = handleObj.selector;
+
+ // For mousenter/leave call the handler if related is outside the target.
+ // NB: No relatedTarget if the mouse left/entered the browser window
+ if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
+ event.type = handleObj.origType;
+ ret = handleObj.handler.apply( this, arguments );
+ event.type = fix;
+ }
+ return ret;
+ }
+ };
+});
+
+// IE submit delegation
+if ( !jQuery.support.submitBubbles ) {
+
+ jQuery.event.special.submit = {
+ setup: function() {
+ // Only need this for delegated form submit events
+ if ( jQuery.nodeName( this, "form" ) ) {
+ return false;
+ }
+
+ // Lazy-add a submit handler when a descendant form may potentially be submitted
+ jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
+ // Node name check avoids a VML-related crash in IE (#9807)
+ var elem = e.target,
+ form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
+ if ( form && !jQuery._data( form, "_submit_attached" ) ) {
+ jQuery.event.add( form, "submit._submit", function( event ) {
+ event._submit_bubble = true;
+ });
+ jQuery._data( form, "_submit_attached", true );
+ }
+ });
+ // return undefined since we don't need an event listener
+ },
+
+ postDispatch: function( event ) {
+ // If form was submitted by the user, bubble the event up the tree
+ if ( event._submit_bubble ) {
+ delete event._submit_bubble;
+ if ( this.parentNode && !event.isTrigger ) {
+ jQuery.event.simulate( "submit", this.parentNode, event, true );
+ }
+ }
+ },
+
+ teardown: function() {
+ // Only need this for delegated form submit events
+ if ( jQuery.nodeName( this, "form" ) ) {
+ return false;
+ }
+
+ // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
+ jQuery.event.remove( this, "._submit" );
+ }
+ };
+}
+
+// IE change delegation and checkbox/radio fix
+if ( !jQuery.support.changeBubbles ) {
+
+ jQuery.event.special.change = {
+
+ setup: function() {
+
+ if ( rformElems.test( this.nodeName ) ) {
+ // IE doesn't fire change on a check/radio until blur; trigger it on click
+ // after a propertychange. Eat the blur-change in special.change.handle.
+ // This still fires onchange a second time for check/radio after blur.
+ if ( this.type === "checkbox" || this.type === "radio" ) {
+ jQuery.event.add( this, "propertychange._change", function( event ) {
+ if ( event.originalEvent.propertyName === "checked" ) {
+ this._just_changed = true;
+ }
+ });
+ jQuery.event.add( this, "click._change", function( event ) {
+ if ( this._just_changed && !event.isTrigger ) {
+ this._just_changed = false;
+ }
+ // Allow triggered, simulated change events (#11500)
+ jQuery.event.simulate( "change", this, event, true );
+ });
+ }
+ return false;
+ }
+ // Delegated event; lazy-add a change handler on descendant inputs
+ jQuery.event.add( this, "beforeactivate._change", function( e ) {
+ var elem = e.target;
+
+ if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "_change_attached" ) ) {
+ jQuery.event.add( elem, "change._change", function( event ) {
+ if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
+ jQuery.event.simulate( "change", this.parentNode, event, true );
+ }
+ });
+ jQuery._data( elem, "_change_attached", true );
+ }
+ });
+ },
+
+ handle: function( event ) {
+ var elem = event.target;
+
+ // Swallow native change events from checkbox/radio, we already triggered them above
+ if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
+ return event.handleObj.handler.apply( this, arguments );
+ }
+ },
+
+ teardown: function() {
+ jQuery.event.remove( this, "._change" );
+
+ return !rformElems.test( this.nodeName );
+ }
+ };
+}
+
+// Create "bubbling" focus and blur events
+if ( !jQuery.support.focusinBubbles ) {
+ jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+ // Attach a single capturing handler while someone wants focusin/focusout
+ var attaches = 0,
+ handler = function( event ) {
+ jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
+ };
+
+ jQuery.event.special[ fix ] = {
+ setup: function() {
+ if ( attaches++ === 0 ) {
+ document.addEventListener( orig, handler, true );
+ }
+ },
+ teardown: function() {
+ if ( --attaches === 0 ) {
+ document.removeEventListener( orig, handler, true );
+ }
+ }
+ };
+ });
+}
+
+jQuery.fn.extend({
+
+ on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
+ var origFn, type;
+
+ // Types can be a map of types/handlers
+ if ( typeof types === "object" ) {
+ // ( types-Object, selector, data )
+ if ( typeof selector !== "string" ) { // && selector != null
+ // ( types-Object, data )
+ data = data || selector;
+ selector = undefined;
+ }
+ for ( type in types ) {
+ this.on( type, selector, data, types[ type ], one );
+ }
+ return this;
+ }
+
+ if ( data == null && fn == null ) {
+ // ( types, fn )
+ fn = selector;
+ data = selector = undefined;
+ } else if ( fn == null ) {
+ if ( typeof selector === "string" ) {
+ // ( types, selector, fn )
+ fn = data;
+ data = undefined;
+ } else {
+ // ( types, data, fn )
+ fn = data;
+ data = selector;
+ selector = undefined;
+ }
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ } else if ( !fn ) {
+ return this;
+ }
+
+ if ( one === 1 ) {
+ origFn = fn;
+ fn = function( event ) {
+ // Can use an empty set, since event contains the info
+ jQuery().off( event );
+ return origFn.apply( this, arguments );
+ };
+ // Use same guid so caller can remove using origFn
+ fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+ }
+ return this.each( function() {
+ jQuery.event.add( this, types, fn, data, selector );
+ });
+ },
+ one: function( types, selector, data, fn ) {
+ return this.on( types, selector, data, fn, 1 );
+ },
+ off: function( types, selector, fn ) {
+ var handleObj, type;
+ if ( types && types.preventDefault && types.handleObj ) {
+ // ( event ) dispatched jQuery.Event
+ handleObj = types.handleObj;
+ jQuery( types.delegateTarget ).off(
+ handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
+ handleObj.selector,
+ handleObj.handler
+ );
+ return this;
+ }
+ if ( typeof types === "object" ) {
+ // ( types-object [, selector] )
+ for ( type in types ) {
+ this.off( type, selector, types[ type ] );
+ }
+ return this;
+ }
+ if ( selector === false || typeof selector === "function" ) {
+ // ( types [, fn] )
+ fn = selector;
+ selector = undefined;
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ }
+ return this.each(function() {
+ jQuery.event.remove( this, types, fn, selector );
+ });
+ },
+
+ bind: function( types, data, fn ) {
+ return this.on( types, null, data, fn );
+ },
+ unbind: function( types, fn ) {
+ return this.off( types, null, fn );
+ },
+
+ live: function( types, data, fn ) {
+ jQuery( this.context ).on( types, this.selector, data, fn );
+ return this;
+ },
+ die: function( types, fn ) {
+ jQuery( this.context ).off( types, this.selector || "**", fn );
+ return this;
+ },
+
+ delegate: function( selector, types, data, fn ) {
+ return this.on( types, selector, data, fn );
+ },
+ undelegate: function( selector, types, fn ) {
+ // ( namespace ) or ( selector, types [, fn] )
+ return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
+ },
+
+ trigger: function( type, data ) {
+ return this.each(function() {
+ jQuery.event.trigger( type, data, this );
+ });
+ },
+ triggerHandler: function( type, data ) {
+ if ( this[0] ) {
+ return jQuery.event.trigger( type, data, this[0], true );
+ }
+ },
+
+ toggle: function( fn ) {
+ // Save reference to arguments for access in closure
+ var args = arguments,
+ guid = fn.guid || jQuery.guid++,
+ i = 0,
+ toggler = function( event ) {
+ // Figure out which function to execute
+ var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
+ jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
+
+ // Make sure that clicks stop
+ event.preventDefault();
+
+ // and execute the function
+ return args[ lastToggle ].apply( this, arguments ) || false;
+ };
+
+ // link all the functions, so any of them can unbind this click handler
+ toggler.guid = guid;
+ while ( i < args.length ) {
+ args[ i++ ].guid = guid;
+ }
+
+ return this.click( toggler );
+ },
+
+ hover: function( fnOver, fnOut ) {
+ return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+ }
+});
+
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+ "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+ "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
+
+ // Handle event binding
+ jQuery.fn[ name ] = function( data, fn ) {
+ if ( fn == null ) {
+ fn = data;
+ data = null;
+ }
+
+ return arguments.length > 0 ?
+ this.on( name, null, data, fn ) :
+ this.trigger( name );
+ };
+
+ if ( rkeyEvent.test( name ) ) {
+ jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks;
+ }
+
+ if ( rmouseEvent.test( name ) ) {
+ jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;
+ }
+});
+/*!
+ * Sizzle CSS Selector Engine
+ * Copyright 2012-2018 jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://sizzlejs.com/
+ */
+(function( window, undefined ) {
+
+var cachedruns,
+ assertGetIdNotName,
+ Expr,
+ getText,
+ isXML,
+ contains,
+ compile,
+ sortOrder,
+ hasDuplicate,
+ outermostContext,
+
+ baseHasDuplicate = true,
+ strundefined = "undefined",
+
+ expando = ( "sizcache" + Math.random() ).replace( ".", "" ),
+
+ Token = String,
+ document = window.document,
+ docElem = document.documentElement,
+ dirruns = 0,
+ done = 0,
+ pop = [].pop,
+ push = [].push,
+ slice = [].slice,
+ // Use a stripped-down indexOf if a native one is unavailable
+ indexOf = [].indexOf || function( elem ) {
+ var i = 0,
+ len = this.length;
+ for ( ; i < len; i++ ) {
+ if ( this[i] === elem ) {
+ return i;
+ }
+ }
+ return -1;
+ },
+
+ // Augment a function for special use by Sizzle
+ markFunction = function( fn, value ) {
+ fn[ expando ] = value == null || value;
+ return fn;
+ },
+
+ createCache = function() {
+ var cache = {},
+ keys = [];
+
+ return markFunction(function( key, value ) {
+ // Only keep the most recent entries
+ if ( keys.push( key ) > Expr.cacheLength ) {
+ delete cache[ keys.shift() ];
+ }
+
+ // Retrieve with (key + " ") to avoid collision with native Object.prototype properties (see Issue #157)
+ return (cache[ key + " " ] = value);
+ }, cache );
+ },
+
+ classCache = createCache(),
+ tokenCache = createCache(),
+ compilerCache = createCache(),
+
+ // Regex
+
+ // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
+ whitespace = "[\\x20\\t\\r\\n\\f]",
+ // http://www.w3.org/TR/css3-syntax/#characters
+ characterEncoding = "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",
+
+ // Loosely modeled on CSS identifier characters
+ // An unquoted value should be a CSS identifier (http://www.w3.org/TR/css3-selectors/#attribute-selectors)
+ // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+ identifier = characterEncoding.replace( "w", "w#" ),
+
+ // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
+ operators = "([*^$|!~]?=)",
+ attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
+ "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
+
+ // Prefer arguments not in parens/brackets,
+ // then attribute selectors and non-pseudos (denoted by :),
+ // then anything else
+ // These preferences are here to reduce the number of selectors
+ // needing tokenize in the PSEUDO preFilter
+ pseudos = ":(" + characterEncoding + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:" + attributes + ")|[^:]|\\\\.)*|.*))\\)|)",
+
+ // For matchExpr.POS and matchExpr.needsContext
+ pos = ":(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace +
+ "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)",
+
+ // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+ rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+
+ rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+ rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ),
+ rpseudo = new RegExp( pseudos ),
+
+ // Easily-parseable/retrievable ID or TAG or CLASS selectors
+ rquickExpr = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,
+
+ rnot = /^:not/,
+ rsibling = /[\x20\t\r\n\f]*[+~]/,
+ rendsWithNot = /:not\($/,
+
+ rheader = /h\d/i,
+ rinputs = /input|select|textarea|button/i,
+
+ rbackslash = /\\(?!\\)/g,
+
+ matchExpr = {
+ "ID": new RegExp( "^#(" + characterEncoding + ")" ),
+ "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
+ "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ),
+ "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
+ "ATTR": new RegExp( "^" + attributes ),
+ "PSEUDO": new RegExp( "^" + pseudos ),
+ "POS": new RegExp( pos, "i" ),
+ "CHILD": new RegExp( "^:(only|nth|first|last)-child(?:\\(" + whitespace +
+ "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
+ "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+ // For use in libraries implementing .is()
+ "needsContext": new RegExp( "^" + whitespace + "*[>+~]|" + pos, "i" )
+ },
+
+ // Support
+
+ // Used for testing something on an element
+ assert = function( fn ) {
+ var div = document.createElement("div");
+
+ try {
+ return fn( div );
+ } catch (e) {
+ return false;
+ } finally {
+ // release memory in IE
+ div = null;
+ }
+ },
+
+ // Check if getElementsByTagName("*") returns only elements
+ assertTagNameNoComments = assert(function( div ) {
+ div.appendChild( document.createComment("") );
+ return !div.getElementsByTagName("*").length;
+ }),
+
+ // Check if getAttribute returns normalized href attributes
+ assertHrefNotNormalized = assert(function( div ) {
+ div.innerHTML = " ";
+ return div.firstChild && typeof div.firstChild.getAttribute !== strundefined &&
+ div.firstChild.getAttribute("href") === "#";
+ }),
+
+ // Check if attributes should be retrieved by attribute nodes
+ assertAttributes = assert(function( div ) {
+ div.innerHTML = " ";
+ var type = typeof div.lastChild.getAttribute("multiple");
+ // IE8 returns a string for some attributes even when not present
+ return type !== "boolean" && type !== "string";
+ }),
+
+ // Check if getElementsByClassName can be trusted
+ assertUsableClassName = assert(function( div ) {
+ // Opera can't find a second classname (in 9.6)
+ div.innerHTML = "
";
+ if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) {
+ return false;
+ }
+
+ // Safari 3.2 caches class attributes and doesn't catch changes
+ div.lastChild.className = "e";
+ return div.getElementsByClassName("e").length === 2;
+ }),
+
+ // Check if getElementById returns elements by name
+ // Check if getElementsByName privileges form controls or returns elements by ID
+ assertUsableName = assert(function( div ) {
+ // Inject content
+ div.id = expando + 0;
+ div.innerHTML = "
";
+ docElem.insertBefore( div, docElem.firstChild );
+
+ // Test
+ var pass = document.getElementsByName &&
+ // buggy browsers will return fewer than the correct 2
+ document.getElementsByName( expando ).length === 2 +
+ // buggy browsers will return more than the correct 0
+ document.getElementsByName( expando + 0 ).length;
+ assertGetIdNotName = !document.getElementById( expando );
+
+ // Cleanup
+ docElem.removeChild( div );
+
+ return pass;
+ });
+
+// If slice is not available, provide a backup
+try {
+ slice.call( docElem.childNodes, 0 )[0].nodeType;
+} catch ( e ) {
+ slice = function( i ) {
+ var elem,
+ results = [];
+ for ( ; (elem = this[i]); i++ ) {
+ results.push( elem );
+ }
+ return results;
+ };
+}
+
+function Sizzle( selector, context, results, seed ) {
+ results = results || [];
+ context = context || document;
+ var match, elem, xml, m,
+ nodeType = context.nodeType;
+
+ if ( !selector || typeof selector !== "string" ) {
+ return results;
+ }
+
+ if ( nodeType !== 1 && nodeType !== 9 ) {
+ return [];
+ }
+
+ xml = isXML( context );
+
+ if ( !xml && !seed ) {
+ if ( (match = rquickExpr.exec( selector )) ) {
+ // Speed-up: Sizzle("#ID")
+ if ( (m = match[1]) ) {
+ if ( nodeType === 9 ) {
+ elem = context.getElementById( m );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE, Opera, and Webkit return items
+ // by name instead of ID
+ if ( elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ } else {
+ return results;
+ }
+ } else {
+ // Context is not a document
+ if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
+ contains( context, elem ) && elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ }
+
+ // Speed-up: Sizzle("TAG")
+ } else if ( match[2] ) {
+ push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) );
+ return results;
+
+ // Speed-up: Sizzle(".CLASS")
+ } else if ( (m = match[3]) && assertUsableClassName && context.getElementsByClassName ) {
+ push.apply( results, slice.call(context.getElementsByClassName( m ), 0) );
+ return results;
+ }
+ }
+ }
+
+ // All others
+ return select( selector.replace( rtrim, "$1" ), context, results, seed, xml );
+}
+
+Sizzle.matches = function( expr, elements ) {
+ return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+ return Sizzle( expr, null, null, [ elem ] ).length > 0;
+};
+
+// Returns a function to use in pseudos for input types
+function createInputPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === type;
+ };
+}
+
+// Returns a function to use in pseudos for buttons
+function createButtonPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return (name === "input" || name === "button") && elem.type === type;
+ };
+}
+
+// Returns a function to use in pseudos for positionals
+function createPositionalPseudo( fn ) {
+ return markFunction(function( argument ) {
+ argument = +argument;
+ return markFunction(function( seed, matches ) {
+ var j,
+ matchIndexes = fn( [], seed.length, argument ),
+ i = matchIndexes.length;
+
+ // Match elements found at the specified indexes
+ while ( i-- ) {
+ if ( seed[ (j = matchIndexes[i]) ] ) {
+ seed[j] = !(matches[j] = seed[j]);
+ }
+ }
+ });
+ });
+}
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+ var node,
+ ret = "",
+ i = 0,
+ nodeType = elem.nodeType;
+
+ if ( nodeType ) {
+ if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+ // Use textContent for elements
+ // innerText usage removed for consistency of new lines (see #11153)
+ if ( typeof elem.textContent === "string" ) {
+ return elem.textContent;
+ } else {
+ // Traverse its children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ ret += getText( elem );
+ }
+ }
+ } else if ( nodeType === 3 || nodeType === 4 ) {
+ return elem.nodeValue;
+ }
+ // Do not include comment or processing instruction nodes
+ } else {
+
+ // If no nodeType, this is expected to be an array
+ for ( ; (node = elem[i]); i++ ) {
+ // Do not traverse comment nodes
+ ret += getText( node );
+ }
+ }
+ return ret;
+};
+
+isXML = Sizzle.isXML = function( elem ) {
+ // documentElement is verified for cases where it doesn't yet exist
+ // (such as loading iframes in IE - #4833)
+ var documentElement = elem && (elem.ownerDocument || elem).documentElement;
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+// Element contains another
+contains = Sizzle.contains = docElem.contains ?
+ function( a, b ) {
+ var adown = a.nodeType === 9 ? a.documentElement : a,
+ bup = b && b.parentNode;
+ return a === bup || !!( bup && bup.nodeType === 1 && adown.contains && adown.contains(bup) );
+ } :
+ docElem.compareDocumentPosition ?
+ function( a, b ) {
+ return b && !!( a.compareDocumentPosition( b ) & 16 );
+ } :
+ function( a, b ) {
+ while ( (b = b.parentNode) ) {
+ if ( b === a ) {
+ return true;
+ }
+ }
+ return false;
+ };
+
+Sizzle.attr = function( elem, name ) {
+ var val,
+ xml = isXML( elem );
+
+ if ( !xml ) {
+ name = name.toLowerCase();
+ }
+ if ( (val = Expr.attrHandle[ name ]) ) {
+ return val( elem );
+ }
+ if ( xml || assertAttributes ) {
+ return elem.getAttribute( name );
+ }
+ val = elem.getAttributeNode( name );
+ return val ?
+ typeof elem[ name ] === "boolean" ?
+ elem[ name ] ? name : null :
+ val.specified ? val.value : null :
+ null;
+};
+
+Expr = Sizzle.selectors = {
+
+ // Can be adjusted by the user
+ cacheLength: 50,
+
+ createPseudo: markFunction,
+
+ match: matchExpr,
+
+ // IE6/7 return a modified href
+ attrHandle: assertHrefNotNormalized ?
+ {} :
+ {
+ "href": function( elem ) {
+ return elem.getAttribute( "href", 2 );
+ },
+ "type": function( elem ) {
+ return elem.getAttribute("type");
+ }
+ },
+
+ find: {
+ "ID": assertGetIdNotName ?
+ function( id, context, xml ) {
+ if ( typeof context.getElementById !== strundefined && !xml ) {
+ var m = context.getElementById( id );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ return m && m.parentNode ? [m] : [];
+ }
+ } :
+ function( id, context, xml ) {
+ if ( typeof context.getElementById !== strundefined && !xml ) {
+ var m = context.getElementById( id );
+
+ return m ?
+ m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ?
+ [m] :
+ undefined :
+ [];
+ }
+ },
+
+ "TAG": assertTagNameNoComments ?
+ function( tag, context ) {
+ if ( typeof context.getElementsByTagName !== strundefined ) {
+ return context.getElementsByTagName( tag );
+ }
+ } :
+ function( tag, context ) {
+ var results = context.getElementsByTagName( tag );
+
+ // Filter out possible comments
+ if ( tag === "*" ) {
+ var elem,
+ tmp = [],
+ i = 0;
+
+ for ( ; (elem = results[i]); i++ ) {
+ if ( elem.nodeType === 1 ) {
+ tmp.push( elem );
+ }
+ }
+
+ return tmp;
+ }
+ return results;
+ },
+
+ "NAME": assertUsableName && function( tag, context ) {
+ if ( typeof context.getElementsByName !== strundefined ) {
+ return context.getElementsByName( name );
+ }
+ },
+
+ "CLASS": assertUsableClassName && function( className, context, xml ) {
+ if ( typeof context.getElementsByClassName !== strundefined && !xml ) {
+ return context.getElementsByClassName( className );
+ }
+ }
+ },
+
+ relative: {
+ ">": { dir: "parentNode", first: true },
+ " ": { dir: "parentNode" },
+ "+": { dir: "previousSibling", first: true },
+ "~": { dir: "previousSibling" }
+ },
+
+ preFilter: {
+ "ATTR": function( match ) {
+ match[1] = match[1].replace( rbackslash, "" );
+
+ // Move the given value to match[3] whether quoted or unquoted
+ match[3] = ( match[4] || match[5] || "" ).replace( rbackslash, "" );
+
+ if ( match[2] === "~=" ) {
+ match[3] = " " + match[3] + " ";
+ }
+
+ return match.slice( 0, 4 );
+ },
+
+ "CHILD": function( match ) {
+ /* matches from matchExpr["CHILD"]
+ 1 type (only|nth|...)
+ 2 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+ 3 xn-component of xn+y argument ([+-]?\d*n|)
+ 4 sign of xn-component
+ 5 x of xn-component
+ 6 sign of y-component
+ 7 y of y-component
+ */
+ match[1] = match[1].toLowerCase();
+
+ if ( match[1] === "nth" ) {
+ // nth-child requires argument
+ if ( !match[2] ) {
+ Sizzle.error( match[0] );
+ }
+
+ // numeric x and y parameters for Expr.filter.CHILD
+ // remember that false/true cast respectively to 0/1
+ match[3] = +( match[3] ? match[4] + (match[5] || 1) : 2 * ( match[2] === "even" || match[2] === "odd" ) );
+ match[4] = +( ( match[6] + match[7] ) || match[2] === "odd" );
+
+ // other types prohibit arguments
+ } else if ( match[2] ) {
+ Sizzle.error( match[0] );
+ }
+
+ return match;
+ },
+
+ "PSEUDO": function( match ) {
+ var unquoted, excess;
+ if ( matchExpr["CHILD"].test( match[0] ) ) {
+ return null;
+ }
+
+ if ( match[3] ) {
+ match[2] = match[3];
+ } else if ( (unquoted = match[4]) ) {
+ // Only check arguments that contain a pseudo
+ if ( rpseudo.test(unquoted) &&
+ // Get excess from tokenize (recursively)
+ (excess = tokenize( unquoted, true )) &&
+ // advance to the next closing parenthesis
+ (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+
+ // excess is a negative index
+ unquoted = unquoted.slice( 0, excess );
+ match[0] = match[0].slice( 0, excess );
+ }
+ match[2] = unquoted;
+ }
+
+ // Return only captures needed by the pseudo filter method (type and argument)
+ return match.slice( 0, 3 );
+ }
+ },
+
+ filter: {
+ "ID": assertGetIdNotName ?
+ function( id ) {
+ id = id.replace( rbackslash, "" );
+ return function( elem ) {
+ return elem.getAttribute("id") === id;
+ };
+ } :
+ function( id ) {
+ id = id.replace( rbackslash, "" );
+ return function( elem ) {
+ var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
+ return node && node.value === id;
+ };
+ },
+
+ "TAG": function( nodeName ) {
+ if ( nodeName === "*" ) {
+ return function() { return true; };
+ }
+ nodeName = nodeName.replace( rbackslash, "" ).toLowerCase();
+
+ return function( elem ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+ };
+ },
+
+ "CLASS": function( className ) {
+ var pattern = classCache[ expando ][ className + " " ];
+
+ return pattern ||
+ (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
+ classCache( className, function( elem ) {
+ return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" );
+ });
+ },
+
+ "ATTR": function( name, operator, check ) {
+ return function( elem, context ) {
+ var result = Sizzle.attr( elem, name );
+
+ if ( result == null ) {
+ return operator === "!=";
+ }
+ if ( !operator ) {
+ return true;
+ }
+
+ result += "";
+
+ return operator === "=" ? result === check :
+ operator === "!=" ? result !== check :
+ operator === "^=" ? check && result.indexOf( check ) === 0 :
+ operator === "*=" ? check && result.indexOf( check ) > -1 :
+ operator === "$=" ? check && result.substr( result.length - check.length ) === check :
+ operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
+ operator === "|=" ? result === check || result.substr( 0, check.length + 1 ) === check + "-" :
+ false;
+ };
+ },
+
+ "CHILD": function( type, argument, first, last ) {
+
+ if ( type === "nth" ) {
+ return function( elem ) {
+ var node, diff,
+ parent = elem.parentNode;
+
+ if ( first === 1 && last === 0 ) {
+ return true;
+ }
+
+ if ( parent ) {
+ diff = 0;
+ for ( node = parent.firstChild; node; node = node.nextSibling ) {
+ if ( node.nodeType === 1 ) {
+ diff++;
+ if ( elem === node ) {
+ break;
+ }
+ }
+ }
+ }
+
+ // Incorporate the offset (or cast to NaN), then check against cycle size
+ diff -= last;
+ return diff === first || ( diff % first === 0 && diff / first >= 0 );
+ };
+ }
+
+ return function( elem ) {
+ var node = elem;
+
+ switch ( type ) {
+ case "only":
+ case "first":
+ while ( (node = node.previousSibling) ) {
+ if ( node.nodeType === 1 ) {
+ return false;
+ }
+ }
+
+ if ( type === "first" ) {
+ return true;
+ }
+
+ node = elem;
+
+ /* falls through */
+ case "last":
+ while ( (node = node.nextSibling) ) {
+ if ( node.nodeType === 1 ) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+ };
+ },
+
+ "PSEUDO": function( pseudo, argument ) {
+ // pseudo-class names are case-insensitive
+ // http://www.w3.org/TR/selectors/#pseudo-classes
+ // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+ // Remember that setFilters inherits from pseudos
+ var args,
+ fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+ Sizzle.error( "unsupported pseudo: " + pseudo );
+
+ // The user may use createPseudo to indicate that
+ // arguments are needed to create the filter function
+ // just as Sizzle does
+ if ( fn[ expando ] ) {
+ return fn( argument );
+ }
+
+ // But maintain support for old signatures
+ if ( fn.length > 1 ) {
+ args = [ pseudo, pseudo, "", argument ];
+ return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+ markFunction(function( seed, matches ) {
+ var idx,
+ matched = fn( seed, argument ),
+ i = matched.length;
+ while ( i-- ) {
+ idx = indexOf.call( seed, matched[i] );
+ seed[ idx ] = !( matches[ idx ] = matched[i] );
+ }
+ }) :
+ function( elem ) {
+ return fn( elem, 0, args );
+ };
+ }
+
+ return fn;
+ }
+ },
+
+ pseudos: {
+ "not": markFunction(function( selector ) {
+ // Trim the selector passed to compile
+ // to avoid treating leading and trailing
+ // spaces as combinators
+ var input = [],
+ results = [],
+ matcher = compile( selector.replace( rtrim, "$1" ) );
+
+ return matcher[ expando ] ?
+ markFunction(function( seed, matches, context, xml ) {
+ var elem,
+ unmatched = matcher( seed, null, xml, [] ),
+ i = seed.length;
+
+ // Match elements unmatched by `matcher`
+ while ( i-- ) {
+ if ( (elem = unmatched[i]) ) {
+ seed[i] = !(matches[i] = elem);
+ }
+ }
+ }) :
+ function( elem, context, xml ) {
+ input[0] = elem;
+ matcher( input, null, xml, results );
+ return !results.pop();
+ };
+ }),
+
+ "has": markFunction(function( selector ) {
+ return function( elem ) {
+ return Sizzle( selector, elem ).length > 0;
+ };
+ }),
+
+ "contains": markFunction(function( text ) {
+ return function( elem ) {
+ return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+ };
+ }),
+
+ "enabled": function( elem ) {
+ return elem.disabled === false;
+ },
+
+ "disabled": function( elem ) {
+ return elem.disabled === true;
+ },
+
+ "checked": function( elem ) {
+ // In CSS3, :checked should return both checked and selected elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ var nodeName = elem.nodeName.toLowerCase();
+ return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+ },
+
+ "selected": function( elem ) {
+ // Accessing this property makes selected-by-default
+ // options in Safari work properly
+ if ( elem.parentNode ) {
+ elem.parentNode.selectedIndex;
+ }
+
+ return elem.selected === true;
+ },
+
+ "parent": function( elem ) {
+ return !Expr.pseudos["empty"]( elem );
+ },
+
+ "empty": function( elem ) {
+ // http://www.w3.org/TR/selectors/#empty-pseudo
+ // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
+ // not comment, processing instructions, or others
+ // Thanks to Diego Perini for the nodeName shortcut
+ // Greater than "@" means alpha characters (specifically not starting with "#" or "?")
+ var nodeType;
+ elem = elem.firstChild;
+ while ( elem ) {
+ if ( elem.nodeName > "@" || (nodeType = elem.nodeType) === 3 || nodeType === 4 ) {
+ return false;
+ }
+ elem = elem.nextSibling;
+ }
+ return true;
+ },
+
+ "header": function( elem ) {
+ return rheader.test( elem.nodeName );
+ },
+
+ "text": function( elem ) {
+ var type, attr;
+ // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
+ // use getAttribute instead to test this case
+ return elem.nodeName.toLowerCase() === "input" &&
+ (type = elem.type) === "text" &&
+ ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === type );
+ },
+
+ // Input types
+ "radio": createInputPseudo("radio"),
+ "checkbox": createInputPseudo("checkbox"),
+ "file": createInputPseudo("file"),
+ "password": createInputPseudo("password"),
+ "image": createInputPseudo("image"),
+
+ "submit": createButtonPseudo("submit"),
+ "reset": createButtonPseudo("reset"),
+
+ "button": function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === "button" || name === "button";
+ },
+
+ "input": function( elem ) {
+ return rinputs.test( elem.nodeName );
+ },
+
+ "focus": function( elem ) {
+ var doc = elem.ownerDocument;
+ return elem === doc.activeElement && (!doc.hasFocus || doc.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+ },
+
+ "active": function( elem ) {
+ return elem === elem.ownerDocument.activeElement;
+ },
+
+ // Positional types
+ "first": createPositionalPseudo(function() {
+ return [ 0 ];
+ }),
+
+ "last": createPositionalPseudo(function( matchIndexes, length ) {
+ return [ length - 1 ];
+ }),
+
+ "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ return [ argument < 0 ? argument + length : argument ];
+ }),
+
+ "even": createPositionalPseudo(function( matchIndexes, length ) {
+ for ( var i = 0; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "odd": createPositionalPseudo(function( matchIndexes, length ) {
+ for ( var i = 1; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ for ( var i = argument < 0 ? argument + length : argument; --i >= 0; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ for ( var i = argument < 0 ? argument + length : argument; ++i < length; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ })
+ }
+};
+
+function siblingCheck( a, b, ret ) {
+ if ( a === b ) {
+ return ret;
+ }
+
+ var cur = a.nextSibling;
+
+ while ( cur ) {
+ if ( cur === b ) {
+ return -1;
+ }
+
+ cur = cur.nextSibling;
+ }
+
+ return 1;
+}
+
+sortOrder = docElem.compareDocumentPosition ?
+ function( a, b ) {
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ return ( !a.compareDocumentPosition || !b.compareDocumentPosition ?
+ a.compareDocumentPosition :
+ a.compareDocumentPosition(b) & 4
+ ) ? -1 : 1;
+ } :
+ function( a, b ) {
+ // The nodes are identical, we can exit early
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+
+ // Fallback to using sourceIndex (in IE) if it's available on both nodes
+ } else if ( a.sourceIndex && b.sourceIndex ) {
+ return a.sourceIndex - b.sourceIndex;
+ }
+
+ var al, bl,
+ ap = [],
+ bp = [],
+ aup = a.parentNode,
+ bup = b.parentNode,
+ cur = aup;
+
+ // If the nodes are siblings (or identical) we can do a quick check
+ if ( aup === bup ) {
+ return siblingCheck( a, b );
+
+ // If no parents were found then the nodes are disconnected
+ } else if ( !aup ) {
+ return -1;
+
+ } else if ( !bup ) {
+ return 1;
+ }
+
+ // Otherwise they're somewhere else in the tree so we need
+ // to build up a full list of the parentNodes for comparison
+ while ( cur ) {
+ ap.unshift( cur );
+ cur = cur.parentNode;
+ }
+
+ cur = bup;
+
+ while ( cur ) {
+ bp.unshift( cur );
+ cur = cur.parentNode;
+ }
+
+ al = ap.length;
+ bl = bp.length;
+
+ // Start walking down the tree looking for a discrepancy
+ for ( var i = 0; i < al && i < bl; i++ ) {
+ if ( ap[i] !== bp[i] ) {
+ return siblingCheck( ap[i], bp[i] );
+ }
+ }
+
+ // We ended someplace up the tree so do a sibling check
+ return i === al ?
+ siblingCheck( a, bp[i], -1 ) :
+ siblingCheck( ap[i], b, 1 );
+ };
+
+// Always assume the presence of duplicates if sort doesn't
+// pass them to our comparison function (as in Google Chrome).
+[0, 0].sort( sortOrder );
+baseHasDuplicate = !hasDuplicate;
+
+// Document sorting and removing duplicates
+Sizzle.uniqueSort = function( results ) {
+ var elem,
+ duplicates = [],
+ i = 1,
+ j = 0;
+
+ hasDuplicate = baseHasDuplicate;
+ results.sort( sortOrder );
+
+ if ( hasDuplicate ) {
+ for ( ; (elem = results[i]); i++ ) {
+ if ( elem === results[ i - 1 ] ) {
+ j = duplicates.push( i );
+ }
+ }
+ while ( j-- ) {
+ results.splice( duplicates[ j ], 1 );
+ }
+ }
+
+ return results;
+};
+
+Sizzle.error = function( msg ) {
+ throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+function tokenize( selector, parseOnly ) {
+ var matched, match, tokens, type,
+ soFar, groups, preFilters,
+ cached = tokenCache[ expando ][ selector + " " ];
+
+ if ( cached ) {
+ return parseOnly ? 0 : cached.slice( 0 );
+ }
+
+ soFar = selector;
+ groups = [];
+ preFilters = Expr.preFilter;
+
+ while ( soFar ) {
+
+ // Comma and first run
+ if ( !matched || (match = rcomma.exec( soFar )) ) {
+ if ( match ) {
+ // Don't consume trailing commas as valid
+ soFar = soFar.slice( match[0].length ) || soFar;
+ }
+ groups.push( tokens = [] );
+ }
+
+ matched = false;
+
+ // Combinators
+ if ( (match = rcombinators.exec( soFar )) ) {
+ tokens.push( matched = new Token( match.shift() ) );
+ soFar = soFar.slice( matched.length );
+
+ // Cast descendant combinators to space
+ matched.type = match[0].replace( rtrim, " " );
+ }
+
+ // Filters
+ for ( type in Expr.filter ) {
+ if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
+ (match = preFilters[ type ]( match ))) ) {
+
+ tokens.push( matched = new Token( match.shift() ) );
+ soFar = soFar.slice( matched.length );
+ matched.type = type;
+ matched.matches = match;
+ }
+ }
+
+ if ( !matched ) {
+ break;
+ }
+ }
+
+ // Return the length of the invalid excess
+ // if we're just parsing
+ // Otherwise, throw an error or return tokens
+ return parseOnly ?
+ soFar.length :
+ soFar ?
+ Sizzle.error( selector ) :
+ // Cache the tokens
+ tokenCache( selector, groups ).slice( 0 );
+}
+
+function addCombinator( matcher, combinator, base ) {
+ var dir = combinator.dir,
+ checkNonElements = base && combinator.dir === "parentNode",
+ doneName = done++;
+
+ return combinator.first ?
+ // Check against closest ancestor/preceding element
+ function( elem, context, xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( checkNonElements || elem.nodeType === 1 ) {
+ return matcher( elem, context, xml );
+ }
+ }
+ } :
+
+ // Check against all ancestor/preceding elements
+ function( elem, context, xml ) {
+ // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
+ if ( !xml ) {
+ var cache,
+ dirkey = dirruns + " " + doneName + " ",
+ cachedkey = dirkey + cachedruns;
+ while ( (elem = elem[ dir ]) ) {
+ if ( checkNonElements || elem.nodeType === 1 ) {
+ if ( (cache = elem[ expando ]) === cachedkey ) {
+ return elem.sizset;
+ } else if ( typeof cache === "string" && cache.indexOf(dirkey) === 0 ) {
+ if ( elem.sizset ) {
+ return elem;
+ }
+ } else {
+ elem[ expando ] = cachedkey;
+ if ( matcher( elem, context, xml ) ) {
+ elem.sizset = true;
+ return elem;
+ }
+ elem.sizset = false;
+ }
+ }
+ }
+ } else {
+ while ( (elem = elem[ dir ]) ) {
+ if ( checkNonElements || elem.nodeType === 1 ) {
+ if ( matcher( elem, context, xml ) ) {
+ return elem;
+ }
+ }
+ }
+ }
+ };
+}
+
+function elementMatcher( matchers ) {
+ return matchers.length > 1 ?
+ function( elem, context, xml ) {
+ var i = matchers.length;
+ while ( i-- ) {
+ if ( !matchers[i]( elem, context, xml ) ) {
+ return false;
+ }
+ }
+ return true;
+ } :
+ matchers[0];
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+ var elem,
+ newUnmatched = [],
+ i = 0,
+ len = unmatched.length,
+ mapped = map != null;
+
+ for ( ; i < len; i++ ) {
+ if ( (elem = unmatched[i]) ) {
+ if ( !filter || filter( elem, context, xml ) ) {
+ newUnmatched.push( elem );
+ if ( mapped ) {
+ map.push( i );
+ }
+ }
+ }
+ }
+
+ return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+ if ( postFilter && !postFilter[ expando ] ) {
+ postFilter = setMatcher( postFilter );
+ }
+ if ( postFinder && !postFinder[ expando ] ) {
+ postFinder = setMatcher( postFinder, postSelector );
+ }
+ return markFunction(function( seed, results, context, xml ) {
+ var temp, i, elem,
+ preMap = [],
+ postMap = [],
+ preexisting = results.length,
+
+ // Get initial elements from seed or context
+ elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
+
+ // Prefilter to get matcher input, preserving a map for seed-results synchronization
+ matcherIn = preFilter && ( seed || !selector ) ?
+ condense( elems, preMap, preFilter, context, xml ) :
+ elems,
+
+ matcherOut = matcher ?
+ // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+ postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+ // ...intermediate processing is necessary
+ [] :
+
+ // ...otherwise use results directly
+ results :
+ matcherIn;
+
+ // Find primary matches
+ if ( matcher ) {
+ matcher( matcherIn, matcherOut, context, xml );
+ }
+
+ // Apply postFilter
+ if ( postFilter ) {
+ temp = condense( matcherOut, postMap );
+ postFilter( temp, [], context, xml );
+
+ // Un-match failing elements by moving them back to matcherIn
+ i = temp.length;
+ while ( i-- ) {
+ if ( (elem = temp[i]) ) {
+ matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+ }
+ }
+ }
+
+ if ( seed ) {
+ if ( postFinder || preFilter ) {
+ if ( postFinder ) {
+ // Get the final matcherOut by condensing this intermediate into postFinder contexts
+ temp = [];
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) ) {
+ // Restore matcherIn since elem is not yet a final match
+ temp.push( (matcherIn[i] = elem) );
+ }
+ }
+ postFinder( null, (matcherOut = []), temp, xml );
+ }
+
+ // Move matched elements from seed to results to keep them synchronized
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) &&
+ (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
+
+ seed[temp] = !(results[temp] = elem);
+ }
+ }
+ }
+
+ // Add elements to results, through postFinder if defined
+ } else {
+ matcherOut = condense(
+ matcherOut === results ?
+ matcherOut.splice( preexisting, matcherOut.length ) :
+ matcherOut
+ );
+ if ( postFinder ) {
+ postFinder( null, results, matcherOut, xml );
+ } else {
+ push.apply( results, matcherOut );
+ }
+ }
+ });
+}
+
+function matcherFromTokens( tokens ) {
+ var checkContext, matcher, j,
+ len = tokens.length,
+ leadingRelative = Expr.relative[ tokens[0].type ],
+ implicitRelative = leadingRelative || Expr.relative[" "],
+ i = leadingRelative ? 1 : 0,
+
+ // The foundational matcher ensures that elements are reachable from top-level context(s)
+ matchContext = addCombinator( function( elem ) {
+ return elem === checkContext;
+ }, implicitRelative, true ),
+ matchAnyContext = addCombinator( function( elem ) {
+ return indexOf.call( checkContext, elem ) > -1;
+ }, implicitRelative, true ),
+ matchers = [ function( elem, context, xml ) {
+ return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+ (checkContext = context).nodeType ?
+ matchContext( elem, context, xml ) :
+ matchAnyContext( elem, context, xml ) );
+ } ];
+
+ for ( ; i < len; i++ ) {
+ if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+ matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];
+ } else {
+ matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+ // Return special upon seeing a positional matcher
+ if ( matcher[ expando ] ) {
+ // Find the next relative operator (if any) for proper handling
+ j = ++i;
+ for ( ; j < len; j++ ) {
+ if ( Expr.relative[ tokens[j].type ] ) {
+ break;
+ }
+ }
+ return setMatcher(
+ i > 1 && elementMatcher( matchers ),
+ i > 1 && tokens.slice( 0, i - 1 ).join("").replace( rtrim, "$1" ),
+ matcher,
+ i < j && matcherFromTokens( tokens.slice( i, j ) ),
+ j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+ j < len && tokens.join("")
+ );
+ }
+ matchers.push( matcher );
+ }
+ }
+
+ return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+ var bySet = setMatchers.length > 0,
+ byElement = elementMatchers.length > 0,
+ superMatcher = function( seed, context, xml, results, expandContext ) {
+ var elem, j, matcher,
+ setMatched = [],
+ matchedCount = 0,
+ i = "0",
+ unmatched = seed && [],
+ outermost = expandContext != null,
+ contextBackup = outermostContext,
+ // We must always have either seed elements or context
+ elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
+ // Nested matchers should use non-integer dirruns
+ dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.E);
+
+ if ( outermost ) {
+ outermostContext = context !== document && context;
+ cachedruns = superMatcher.el;
+ }
+
+ // Add elements passing elementMatchers directly to results
+ for ( ; (elem = elems[i]) != null; i++ ) {
+ if ( byElement && elem ) {
+ for ( j = 0; (matcher = elementMatchers[j]); j++ ) {
+ if ( matcher( elem, context, xml ) ) {
+ results.push( elem );
+ break;
+ }
+ }
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ cachedruns = ++superMatcher.el;
+ }
+ }
+
+ // Track unmatched elements for set filters
+ if ( bySet ) {
+ // They will have gone through all possible matchers
+ if ( (elem = !matcher && elem) ) {
+ matchedCount--;
+ }
+
+ // Lengthen the array for every element, matched or not
+ if ( seed ) {
+ unmatched.push( elem );
+ }
+ }
+ }
+
+ // Apply set filters to unmatched elements
+ matchedCount += i;
+ if ( bySet && i !== matchedCount ) {
+ for ( j = 0; (matcher = setMatchers[j]); j++ ) {
+ matcher( unmatched, setMatched, context, xml );
+ }
+
+ if ( seed ) {
+ // Reintegrate element matches to eliminate the need for sorting
+ if ( matchedCount > 0 ) {
+ while ( i-- ) {
+ if ( !(unmatched[i] || setMatched[i]) ) {
+ setMatched[i] = pop.call( results );
+ }
+ }
+ }
+
+ // Discard index placeholder values to get only actual matches
+ setMatched = condense( setMatched );
+ }
+
+ // Add matches to results
+ push.apply( results, setMatched );
+
+ // Seedless set matches succeeding multiple successful matchers stipulate sorting
+ if ( outermost && !seed && setMatched.length > 0 &&
+ ( matchedCount + setMatchers.length ) > 1 ) {
+
+ Sizzle.uniqueSort( results );
+ }
+ }
+
+ // Override manipulation of globals by nested matchers
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ outermostContext = contextBackup;
+ }
+
+ return unmatched;
+ };
+
+ superMatcher.el = 0;
+ return bySet ?
+ markFunction( superMatcher ) :
+ superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
+ var i,
+ setMatchers = [],
+ elementMatchers = [],
+ cached = compilerCache[ expando ][ selector + " " ];
+
+ if ( !cached ) {
+ // Generate a function of recursive functions that can be used to check each element
+ if ( !group ) {
+ group = tokenize( selector );
+ }
+ i = group.length;
+ while ( i-- ) {
+ cached = matcherFromTokens( group[i] );
+ if ( cached[ expando ] ) {
+ setMatchers.push( cached );
+ } else {
+ elementMatchers.push( cached );
+ }
+ }
+
+ // Cache the compiled function
+ cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+ }
+ return cached;
+};
+
+function multipleContexts( selector, contexts, results ) {
+ var i = 0,
+ len = contexts.length;
+ for ( ; i < len; i++ ) {
+ Sizzle( selector, contexts[i], results );
+ }
+ return results;
+}
+
+function select( selector, context, results, seed, xml ) {
+ var i, tokens, token, type, find,
+ match = tokenize( selector ),
+ j = match.length;
+
+ if ( !seed ) {
+ // Try to minimize operations if there is only one group
+ if ( match.length === 1 ) {
+
+ // Take a shortcut and set the context if the root selector is an ID
+ tokens = match[0] = match[0].slice( 0 );
+ if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+ context.nodeType === 9 && !xml &&
+ Expr.relative[ tokens[1].type ] ) {
+
+ context = Expr.find["ID"]( token.matches[0].replace( rbackslash, "" ), context, xml )[0];
+ if ( !context ) {
+ return results;
+ }
+
+ selector = selector.slice( tokens.shift().length );
+ }
+
+ // Fetch a seed set for right-to-left matching
+ for ( i = matchExpr["POS"].test( selector ) ? -1 : tokens.length - 1; i >= 0; i-- ) {
+ token = tokens[i];
+
+ // Abort if we hit a combinator
+ if ( Expr.relative[ (type = token.type) ] ) {
+ break;
+ }
+ if ( (find = Expr.find[ type ]) ) {
+ // Search, expanding context for leading sibling combinators
+ if ( (seed = find(
+ token.matches[0].replace( rbackslash, "" ),
+ rsibling.test( tokens[0].type ) && context.parentNode || context,
+ xml
+ )) ) {
+
+ // If seed is empty or no tokens remain, we can return early
+ tokens.splice( i, 1 );
+ selector = seed.length && tokens.join("");
+ if ( !selector ) {
+ push.apply( results, slice.call( seed, 0 ) );
+ return results;
+ }
+
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ // Compile and execute a filtering function
+ // Provide `match` to avoid retokenization if we modified the selector above
+ compile( selector, match )(
+ seed,
+ context,
+ xml,
+ results,
+ rsibling.test( selector )
+ );
+ return results;
+}
+
+if ( document.querySelectorAll ) {
+ (function() {
+ var disconnectedMatch,
+ oldSelect = select,
+ rescape = /'|\\/g,
+ rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,
+
+ // qSa(:focus) reports false when true (Chrome 21), no need to also add to buggyMatches since matches checks buggyQSA
+ // A support test would require too much code (would include document ready)
+ rbuggyQSA = [ ":focus" ],
+
+ // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+ // A support test would require too much code (would include document ready)
+ // just skip matchesSelector for :active
+ rbuggyMatches = [ ":active" ],
+ matches = docElem.matchesSelector ||
+ docElem.mozMatchesSelector ||
+ docElem.webkitMatchesSelector ||
+ docElem.oMatchesSelector ||
+ docElem.msMatchesSelector;
+
+ // Build QSA regex
+ // Regex strategy adopted from Diego Perini
+ assert(function( div ) {
+ // Select is set to empty string on purpose
+ // This is to test IE's treatment of not explictly
+ // setting a boolean content attribute,
+ // since its presence should be enough
+ // http://bugs.jquery.com/ticket/12359
+ div.innerHTML = " ";
+
+ // IE8 - Some boolean attributes are not treated correctly
+ if ( !div.querySelectorAll("[selected]").length ) {
+ rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" );
+ }
+
+ // Webkit/Opera - :checked should return selected option elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ // IE8 throws error here (do not put tests after this one)
+ if ( !div.querySelectorAll(":checked").length ) {
+ rbuggyQSA.push(":checked");
+ }
+ });
+
+ assert(function( div ) {
+
+ // Opera 10-12/IE9 - ^= $= *= and empty values
+ // Should not select anything
+ div.innerHTML = "
";
+ if ( div.querySelectorAll("[test^='']").length ) {
+ rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" );
+ }
+
+ // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+ // IE8 throws error here (do not put tests after this one)
+ div.innerHTML = " ";
+ if ( !div.querySelectorAll(":enabled").length ) {
+ rbuggyQSA.push(":enabled", ":disabled");
+ }
+ });
+
+ // rbuggyQSA always contains :focus, so no need for a length check
+ rbuggyQSA = /* rbuggyQSA.length && */ new RegExp( rbuggyQSA.join("|") );
+
+ select = function( selector, context, results, seed, xml ) {
+ // Only use querySelectorAll when not filtering,
+ // when this is not xml,
+ // and when no QSA bugs apply
+ if ( !seed && !xml && !rbuggyQSA.test( selector ) ) {
+ var groups, i,
+ old = true,
+ nid = expando,
+ newContext = context,
+ newSelector = context.nodeType === 9 && selector;
+
+ // qSA works strangely on Element-rooted queries
+ // We can work around this by specifying an extra ID on the root
+ // and working up from there (Thanks to Andrew Dupont for the technique)
+ // IE 8 doesn't work on object elements
+ if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+ groups = tokenize( selector );
+
+ if ( (old = context.getAttribute("id")) ) {
+ nid = old.replace( rescape, "\\$&" );
+ } else {
+ context.setAttribute( "id", nid );
+ }
+ nid = "[id='" + nid + "'] ";
+
+ i = groups.length;
+ while ( i-- ) {
+ groups[i] = nid + groups[i].join("");
+ }
+ newContext = rsibling.test( selector ) && context.parentNode || context;
+ newSelector = groups.join(",");
+ }
+
+ if ( newSelector ) {
+ try {
+ push.apply( results, slice.call( newContext.querySelectorAll(
+ newSelector
+ ), 0 ) );
+ return results;
+ } catch(qsaError) {
+ } finally {
+ if ( !old ) {
+ context.removeAttribute("id");
+ }
+ }
+ }
+ }
+
+ return oldSelect( selector, context, results, seed, xml );
+ };
+
+ if ( matches ) {
+ assert(function( div ) {
+ // Check to see if it's possible to do matchesSelector
+ // on a disconnected node (IE 9)
+ disconnectedMatch = matches.call( div, "div" );
+
+ // This should fail with an exception
+ // Gecko does not error, returns false instead
+ try {
+ matches.call( div, "[test!='']:sizzle" );
+ rbuggyMatches.push( "!=", pseudos );
+ } catch ( e ) {}
+ });
+
+ // rbuggyMatches always contains :active and :focus, so no need for a length check
+ rbuggyMatches = /* rbuggyMatches.length && */ new RegExp( rbuggyMatches.join("|") );
+
+ Sizzle.matchesSelector = function( elem, expr ) {
+ // Make sure that attribute selectors are quoted
+ expr = expr.replace( rattributeQuotes, "='$1']" );
+
+ // rbuggyMatches always contains :active, so no need for an existence check
+ if ( !isXML( elem ) && !rbuggyMatches.test( expr ) && !rbuggyQSA.test( expr ) ) {
+ try {
+ var ret = matches.call( elem, expr );
+
+ // IE 9's matchesSelector returns false on disconnected nodes
+ if ( ret || disconnectedMatch ||
+ // As well, disconnected nodes are said to be in a document
+ // fragment in IE 9
+ elem.document && elem.document.nodeType !== 11 ) {
+ return ret;
+ }
+ } catch(e) {}
+ }
+
+ return Sizzle( expr, null, null, [ elem ] ).length > 0;
+ };
+ }
+ })();
+}
+
+// Deprecated
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Back-compat
+function setFilters() {}
+Expr.filters = setFilters.prototype = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+// Override sizzle attribute retrieval
+Sizzle.attr = jQuery.attr;
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.pseudos;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})( window );
+var runtil = /Until$/,
+ rparentsprev = /^(?:parents|prev(?:Until|All))/,
+ isSimple = /^.[^:#\[\.,]*$/,
+ rneedsContext = jQuery.expr.match.needsContext,
+ // methods guaranteed to produce a unique set when starting from a unique set
+ guaranteedUnique = {
+ children: true,
+ contents: true,
+ next: true,
+ prev: true
+ };
+
+jQuery.fn.extend({
+ find: function( selector ) {
+ var i, l, length, n, r, ret,
+ self = this;
+
+ if ( typeof selector !== "string" ) {
+ return jQuery( selector ).filter(function() {
+ for ( i = 0, l = self.length; i < l; i++ ) {
+ if ( jQuery.contains( self[ i ], this ) ) {
+ return true;
+ }
+ }
+ });
+ }
+
+ ret = this.pushStack( "", "find", selector );
+
+ for ( i = 0, l = this.length; i < l; i++ ) {
+ length = ret.length;
+ jQuery.find( selector, this[i], ret );
+
+ if ( i > 0 ) {
+ // Make sure that the results are unique
+ for ( n = length; n < ret.length; n++ ) {
+ for ( r = 0; r < length; r++ ) {
+ if ( ret[r] === ret[n] ) {
+ ret.splice(n--, 1);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ return ret;
+ },
+
+ has: function( target ) {
+ var i,
+ targets = jQuery( target, this ),
+ len = targets.length;
+
+ return this.filter(function() {
+ for ( i = 0; i < len; i++ ) {
+ if ( jQuery.contains( this, targets[i] ) ) {
+ return true;
+ }
+ }
+ });
+ },
+
+ not: function( selector ) {
+ return this.pushStack( winnow(this, selector, false), "not", selector);
+ },
+
+ filter: function( selector ) {
+ return this.pushStack( winnow(this, selector, true), "filter", selector );
+ },
+
+ is: function( selector ) {
+ return !!selector && (
+ typeof selector === "string" ?
+ // If this is a positional/relative selector, check membership in the returned set
+ // so $("p:first").is("p:last") won't return true for a doc with two "p".
+ rneedsContext.test( selector ) ?
+ jQuery( selector, this.context ).index( this[0] ) >= 0 :
+ jQuery.filter( selector, this ).length > 0 :
+ this.filter( selector ).length > 0 );
+ },
+
+ closest: function( selectors, context ) {
+ var cur,
+ i = 0,
+ l = this.length,
+ ret = [],
+ pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
+ jQuery( selectors, context || this.context ) :
+ 0;
+
+ for ( ; i < l; i++ ) {
+ cur = this[i];
+
+ while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) {
+ if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
+ ret.push( cur );
+ break;
+ }
+ cur = cur.parentNode;
+ }
+ }
+
+ ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
+
+ return this.pushStack( ret, "closest", selectors );
+ },
+
+ // Determine the position of an element within
+ // the matched set of elements
+ index: function( elem ) {
+
+ // No argument, return index in parent
+ if ( !elem ) {
+ return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1;
+ }
+
+ // index in selector
+ if ( typeof elem === "string" ) {
+ return jQuery.inArray( this[0], jQuery( elem ) );
+ }
+
+ // Locate the position of the desired element
+ return jQuery.inArray(
+ // If it receives a jQuery object, the first element is used
+ elem.jquery ? elem[0] : elem, this );
+ },
+
+ add: function( selector, context ) {
+ var set = typeof selector === "string" ?
+ jQuery( selector, context ) :
+ jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
+ all = jQuery.merge( this.get(), set );
+
+ return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
+ all :
+ jQuery.unique( all ) );
+ },
+
+ addBack: function( selector ) {
+ return this.add( selector == null ?
+ this.prevObject : this.prevObject.filter(selector)
+ );
+ }
+});
+
+jQuery.fn.andSelf = jQuery.fn.addBack;
+
+// A painfully simple check to see if an element is disconnected
+// from a document (should be improved, where feasible).
+function isDisconnected( node ) {
+ return !node || !node.parentNode || node.parentNode.nodeType === 11;
+}
+
+function sibling( cur, dir ) {
+ do {
+ cur = cur[ dir ];
+ } while ( cur && cur.nodeType !== 1 );
+
+ return cur;
+}
+
+jQuery.each({
+ parent: function( elem ) {
+ var parent = elem.parentNode;
+ return parent && parent.nodeType !== 11 ? parent : null;
+ },
+ parents: function( elem ) {
+ return jQuery.dir( elem, "parentNode" );
+ },
+ parentsUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "parentNode", until );
+ },
+ next: function( elem ) {
+ return sibling( elem, "nextSibling" );
+ },
+ prev: function( elem ) {
+ return sibling( elem, "previousSibling" );
+ },
+ nextAll: function( elem ) {
+ return jQuery.dir( elem, "nextSibling" );
+ },
+ prevAll: function( elem ) {
+ return jQuery.dir( elem, "previousSibling" );
+ },
+ nextUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "nextSibling", until );
+ },
+ prevUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "previousSibling", until );
+ },
+ siblings: function( elem ) {
+ return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
+ },
+ children: function( elem ) {
+ return jQuery.sibling( elem.firstChild );
+ },
+ contents: function( elem ) {
+ return jQuery.nodeName( elem, "iframe" ) ?
+ elem.contentDocument || elem.contentWindow.document :
+ jQuery.merge( [], elem.childNodes );
+ }
+}, function( name, fn ) {
+ jQuery.fn[ name ] = function( until, selector ) {
+ var ret = jQuery.map( this, fn, until );
+
+ if ( !runtil.test( name ) ) {
+ selector = until;
+ }
+
+ if ( selector && typeof selector === "string" ) {
+ ret = jQuery.filter( selector, ret );
+ }
+
+ ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
+
+ if ( this.length > 1 && rparentsprev.test( name ) ) {
+ ret = ret.reverse();
+ }
+
+ return this.pushStack( ret, name, core_slice.call( arguments ).join(",") );
+ };
+});
+
+jQuery.extend({
+ filter: function( expr, elems, not ) {
+ if ( not ) {
+ expr = ":not(" + expr + ")";
+ }
+
+ return elems.length === 1 ?
+ jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
+ jQuery.find.matches(expr, elems);
+ },
+
+ dir: function( elem, dir, until ) {
+ var matched = [],
+ cur = elem[ dir ];
+
+ while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
+ if ( cur.nodeType === 1 ) {
+ matched.push( cur );
+ }
+ cur = cur[dir];
+ }
+ return matched;
+ },
+
+ sibling: function( n, elem ) {
+ var r = [];
+
+ for ( ; n; n = n.nextSibling ) {
+ if ( n.nodeType === 1 && n !== elem ) {
+ r.push( n );
+ }
+ }
+
+ return r;
+ }
+});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, keep ) {
+
+ // Can't pass null or undefined to indexOf in Firefox 4
+ // Set to 0 to skip string check
+ qualifier = qualifier || 0;
+
+ if ( jQuery.isFunction( qualifier ) ) {
+ return jQuery.grep(elements, function( elem, i ) {
+ var retVal = !!qualifier.call( elem, i, elem );
+ return retVal === keep;
+ });
+
+ } else if ( qualifier.nodeType ) {
+ return jQuery.grep(elements, function( elem, i ) {
+ return ( elem === qualifier ) === keep;
+ });
+
+ } else if ( typeof qualifier === "string" ) {
+ var filtered = jQuery.grep(elements, function( elem ) {
+ return elem.nodeType === 1;
+ });
+
+ if ( isSimple.test( qualifier ) ) {
+ return jQuery.filter(qualifier, filtered, !keep);
+ } else {
+ qualifier = jQuery.filter( qualifier, filtered );
+ }
+ }
+
+ return jQuery.grep(elements, function( elem, i ) {
+ return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
+ });
+}
+function createSafeFragment( document ) {
+ var list = nodeNames.split( "|" ),
+ safeFrag = document.createDocumentFragment();
+
+ if ( safeFrag.createElement ) {
+ while ( list.length ) {
+ safeFrag.createElement(
+ list.pop()
+ );
+ }
+ }
+ return safeFrag;
+}
+
+var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
+ "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
+ rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
+ rleadingWhitespace = /^\s+/,
+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
+ rtagName = /<([\w:]+)/,
+ rtbody = / ]", "i"),
+ rcheckableType = /^(?:checkbox|radio)$/,
+ // checked="checked" or checked
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+ rscriptType = /\/(java|ecma)script/i,
+ rcleanScript = /^\s*\s*$/g,
+ wrapMap = {
+ option: [ 1, "", " " ],
+ legend: [ 1, "", " " ],
+ thead: [ 1, "" ],
+ tr: [ 2, "" ],
+ td: [ 3, "" ],
+ col: [ 2, "" ],
+ area: [ 1, "", " " ],
+ _default: [ 0, "", "" ]
+ },
+ safeFragment = createSafeFragment( document ),
+ fragmentDiv = safeFragment.appendChild( document.createElement("div") );
+
+wrapMap.optgroup = wrapMap.option;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
+// unless wrapped in a div with non-breaking characters in front of it.
+if ( !jQuery.support.htmlSerialize ) {
+ wrapMap._default = [ 1, "X", "
" ];
+}
+
+jQuery.fn.extend({
+ text: function( value ) {
+ return jQuery.access( this, function( value ) {
+ return value === undefined ?
+ jQuery.text( this ) :
+ this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
+ }, null, value, arguments.length );
+ },
+
+ wrapAll: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function(i) {
+ jQuery(this).wrapAll( html.call(this, i) );
+ });
+ }
+
+ if ( this[0] ) {
+ // The elements to wrap the target around
+ var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
+
+ if ( this[0].parentNode ) {
+ wrap.insertBefore( this[0] );
+ }
+
+ wrap.map(function() {
+ var elem = this;
+
+ while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
+ elem = elem.firstChild;
+ }
+
+ return elem;
+ }).append( this );
+ }
+
+ return this;
+ },
+
+ wrapInner: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function(i) {
+ jQuery(this).wrapInner( html.call(this, i) );
+ });
+ }
+
+ return this.each(function() {
+ var self = jQuery( this ),
+ contents = self.contents();
+
+ if ( contents.length ) {
+ contents.wrapAll( html );
+
+ } else {
+ self.append( html );
+ }
+ });
+ },
+
+ wrap: function( html ) {
+ var isFunction = jQuery.isFunction( html );
+
+ return this.each(function(i) {
+ jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
+ });
+ },
+
+ unwrap: function() {
+ return this.parent().each(function() {
+ if ( !jQuery.nodeName( this, "body" ) ) {
+ jQuery( this ).replaceWith( this.childNodes );
+ }
+ }).end();
+ },
+
+ append: function() {
+ return this.domManip(arguments, true, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 ) {
+ this.appendChild( elem );
+ }
+ });
+ },
+
+ prepend: function() {
+ return this.domManip(arguments, true, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 ) {
+ this.insertBefore( elem, this.firstChild );
+ }
+ });
+ },
+
+ before: function() {
+ if ( !isDisconnected( this[0] ) ) {
+ return this.domManip(arguments, false, function( elem ) {
+ this.parentNode.insertBefore( elem, this );
+ });
+ }
+
+ if ( arguments.length ) {
+ var set = jQuery.clean( arguments );
+ return this.pushStack( jQuery.merge( set, this ), "before", this.selector );
+ }
+ },
+
+ after: function() {
+ if ( !isDisconnected( this[0] ) ) {
+ return this.domManip(arguments, false, function( elem ) {
+ this.parentNode.insertBefore( elem, this.nextSibling );
+ });
+ }
+
+ if ( arguments.length ) {
+ var set = jQuery.clean( arguments );
+ return this.pushStack( jQuery.merge( this, set ), "after", this.selector );
+ }
+ },
+
+ // keepData is for internal use only--do not document
+ remove: function( selector, keepData ) {
+ var elem,
+ i = 0;
+
+ for ( ; (elem = this[i]) != null; i++ ) {
+ if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
+ if ( !keepData && elem.nodeType === 1 ) {
+ jQuery.cleanData( elem.getElementsByTagName("*") );
+ jQuery.cleanData( [ elem ] );
+ }
+
+ if ( elem.parentNode ) {
+ elem.parentNode.removeChild( elem );
+ }
+ }
+ }
+
+ return this;
+ },
+
+ empty: function() {
+ var elem,
+ i = 0;
+
+ for ( ; (elem = this[i]) != null; i++ ) {
+ // Remove element nodes and prevent memory leaks
+ if ( elem.nodeType === 1 ) {
+ jQuery.cleanData( elem.getElementsByTagName("*") );
+ }
+
+ // Remove any remaining nodes
+ while ( elem.firstChild ) {
+ elem.removeChild( elem.firstChild );
+ }
+ }
+
+ return this;
+ },
+
+ clone: function( dataAndEvents, deepDataAndEvents ) {
+ dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+ deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+ return this.map( function () {
+ return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+ });
+ },
+
+ html: function( value ) {
+ return jQuery.access( this, function( value ) {
+ var elem = this[0] || {},
+ i = 0,
+ l = this.length;
+
+ if ( value === undefined ) {
+ return elem.nodeType === 1 ?
+ elem.innerHTML.replace( rinlinejQuery, "" ) :
+ undefined;
+ }
+
+ // See if we can take a shortcut and just use innerHTML
+ if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
+ ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) &&
+ ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
+ !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
+
+ value = value.replace( rxhtmlTag, "<$1>$2>" );
+
+ try {
+ for (; i < l; i++ ) {
+ // Remove element nodes and prevent memory leaks
+ elem = this[i] || {};
+ if ( elem.nodeType === 1 ) {
+ jQuery.cleanData( elem.getElementsByTagName( "*" ) );
+ elem.innerHTML = value;
+ }
+ }
+
+ elem = 0;
+
+ // If using innerHTML throws an exception, use the fallback method
+ } catch(e) {}
+ }
+
+ if ( elem ) {
+ this.empty().append( value );
+ }
+ }, null, value, arguments.length );
+ },
+
+ replaceWith: function( value ) {
+ if ( !isDisconnected( this[0] ) ) {
+ // Make sure that the elements are removed from the DOM before they are inserted
+ // this can help fix replacing a parent with child elements
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function(i) {
+ var self = jQuery(this), old = self.html();
+ self.replaceWith( value.call( this, i, old ) );
+ });
+ }
+
+ if ( typeof value !== "string" ) {
+ value = jQuery( value ).detach();
+ }
+
+ return this.each(function() {
+ var next = this.nextSibling,
+ parent = this.parentNode;
+
+ jQuery( this ).remove();
+
+ if ( next ) {
+ jQuery(next).before( value );
+ } else {
+ jQuery(parent).append( value );
+ }
+ });
+ }
+
+ return this.length ?
+ this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) :
+ this;
+ },
+
+ detach: function( selector ) {
+ return this.remove( selector, true );
+ },
+
+ domManip: function( args, table, callback ) {
+
+ // Flatten any nested arrays
+ args = [].concat.apply( [], args );
+
+ var results, first, fragment, iNoClone,
+ i = 0,
+ value = args[0],
+ scripts = [],
+ l = this.length;
+
+ // We can't cloneNode fragments that contain checked, in WebKit
+ if ( !jQuery.support.checkClone && l > 1 && typeof value === "string" && rchecked.test( value ) ) {
+ return this.each(function() {
+ jQuery(this).domManip( args, table, callback );
+ });
+ }
+
+ if ( jQuery.isFunction(value) ) {
+ return this.each(function(i) {
+ var self = jQuery(this);
+ args[0] = value.call( this, i, table ? self.html() : undefined );
+ self.domManip( args, table, callback );
+ });
+ }
+
+ if ( this[0] ) {
+ results = jQuery.buildFragment( args, this, scripts );
+ fragment = results.fragment;
+ first = fragment.firstChild;
+
+ if ( fragment.childNodes.length === 1 ) {
+ fragment = first;
+ }
+
+ if ( first ) {
+ table = table && jQuery.nodeName( first, "tr" );
+
+ // Use the original fragment for the last item instead of the first because it can end up
+ // being emptied incorrectly in certain situations (#8070).
+ // Fragments from the fragment cache must always be cloned and never used in place.
+ for ( iNoClone = results.cacheable || l - 1; i < l; i++ ) {
+ callback.call(
+ table && jQuery.nodeName( this[i], "table" ) ?
+ findOrAppend( this[i], "tbody" ) :
+ this[i],
+ i === iNoClone ?
+ fragment :
+ jQuery.clone( fragment, true, true )
+ );
+ }
+ }
+
+ // Fix #11809: Avoid leaking memory
+ fragment = first = null;
+
+ if ( scripts.length ) {
+ jQuery.each( scripts, function( i, elem ) {
+ if ( elem.src ) {
+ if ( jQuery.ajax ) {
+ jQuery.ajax({
+ url: elem.src,
+ type: "GET",
+ dataType: "script",
+ async: false,
+ global: false,
+ "throws": true
+ });
+ } else {
+ jQuery.error("no ajax");
+ }
+ } else {
+ jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "" ) );
+ }
+
+ if ( elem.parentNode ) {
+ elem.parentNode.removeChild( elem );
+ }
+ });
+ }
+ }
+
+ return this;
+ }
+});
+
+function findOrAppend( elem, tag ) {
+ return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) );
+}
+
+function cloneCopyEvent( src, dest ) {
+
+ if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
+ return;
+ }
+
+ var type, i, l,
+ oldData = jQuery._data( src ),
+ curData = jQuery._data( dest, oldData ),
+ events = oldData.events;
+
+ if ( events ) {
+ delete curData.handle;
+ curData.events = {};
+
+ for ( type in events ) {
+ for ( i = 0, l = events[ type ].length; i < l; i++ ) {
+ jQuery.event.add( dest, type, events[ type ][ i ] );
+ }
+ }
+ }
+
+ // make the cloned public data object a copy from the original
+ if ( curData.data ) {
+ curData.data = jQuery.extend( {}, curData.data );
+ }
+}
+
+function cloneFixAttributes( src, dest ) {
+ var nodeName;
+
+ // We do not need to do anything for non-Elements
+ if ( dest.nodeType !== 1 ) {
+ return;
+ }
+
+ // clearAttributes removes the attributes, which we don't want,
+ // but also removes the attachEvent events, which we *do* want
+ if ( dest.clearAttributes ) {
+ dest.clearAttributes();
+ }
+
+ // mergeAttributes, in contrast, only merges back on the
+ // original attributes, not the events
+ if ( dest.mergeAttributes ) {
+ dest.mergeAttributes( src );
+ }
+
+ nodeName = dest.nodeName.toLowerCase();
+
+ if ( nodeName === "object" ) {
+ // IE6-10 improperly clones children of object elements using classid.
+ // IE10 throws NoModificationAllowedError if parent is null, #12132.
+ if ( dest.parentNode ) {
+ dest.outerHTML = src.outerHTML;
+ }
+
+ // This path appears unavoidable for IE9. When cloning an object
+ // element in IE9, the outerHTML strategy above is not sufficient.
+ // If the src has innerHTML and the destination does not,
+ // copy the src.innerHTML into the dest.innerHTML. #10324
+ if ( jQuery.support.html5Clone && (src.innerHTML && !jQuery.trim(dest.innerHTML)) ) {
+ dest.innerHTML = src.innerHTML;
+ }
+
+ } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
+ // IE6-8 fails to persist the checked state of a cloned checkbox
+ // or radio button. Worse, IE6-7 fail to give the cloned element
+ // a checked appearance if the defaultChecked value isn't also set
+
+ dest.defaultChecked = dest.checked = src.checked;
+
+ // IE6-7 get confused and end up setting the value of a cloned
+ // checkbox/radio button to an empty string instead of "on"
+ if ( dest.value !== src.value ) {
+ dest.value = src.value;
+ }
+
+ // IE6-8 fails to return the selected option to the default selected
+ // state when cloning options
+ } else if ( nodeName === "option" ) {
+ dest.selected = src.defaultSelected;
+
+ // IE6-8 fails to set the defaultValue to the correct value when
+ // cloning other types of input fields
+ } else if ( nodeName === "input" || nodeName === "textarea" ) {
+ dest.defaultValue = src.defaultValue;
+
+ // IE blanks contents when cloning scripts
+ } else if ( nodeName === "script" && dest.text !== src.text ) {
+ dest.text = src.text;
+ }
+
+ // Event data gets referenced instead of copied if the expando
+ // gets copied too
+ dest.removeAttribute( jQuery.expando );
+}
+
+jQuery.buildFragment = function( args, context, scripts ) {
+ var fragment, cacheable, cachehit,
+ first = args[ 0 ];
+
+ // Set context from what may come in as undefined or a jQuery collection or a node
+ // Updated to fix #12266 where accessing context[0] could throw an exception in IE9/10 &
+ // also doubles as fix for #8950 where plain objects caused createDocumentFragment exception
+ context = context || document;
+ context = !context.nodeType && context[0] || context;
+ context = context.ownerDocument || context;
+
+ // Only cache "small" (1/2 KB) HTML strings that are associated with the main document
+ // Cloning options loses the selected state, so don't cache them
+ // IE 6 doesn't like it when you put or elements in a fragment
+ // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
+ // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501
+ if ( args.length === 1 && typeof first === "string" && first.length < 512 && context === document &&
+ first.charAt(0) === "<" && !rnocache.test( first ) &&
+ (jQuery.support.checkClone || !rchecked.test( first )) &&
+ (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
+
+ // Mark cacheable and look for a hit
+ cacheable = true;
+ fragment = jQuery.fragments[ first ];
+ cachehit = fragment !== undefined;
+ }
+
+ if ( !fragment ) {
+ fragment = context.createDocumentFragment();
+ jQuery.clean( args, context, fragment, scripts );
+
+ // Update the cache, but only store false
+ // unless this is a second parsing of the same content
+ if ( cacheable ) {
+ jQuery.fragments[ first ] = cachehit && fragment;
+ }
+ }
+
+ return { fragment: fragment, cacheable: cacheable };
+};
+
+jQuery.fragments = {};
+
+jQuery.each({
+ appendTo: "append",
+ prependTo: "prepend",
+ insertBefore: "before",
+ insertAfter: "after",
+ replaceAll: "replaceWith"
+}, function( name, original ) {
+ jQuery.fn[ name ] = function( selector ) {
+ var elems,
+ i = 0,
+ ret = [],
+ insert = jQuery( selector ),
+ l = insert.length,
+ parent = this.length === 1 && this[0].parentNode;
+
+ if ( (parent == null || parent && parent.nodeType === 11 && parent.childNodes.length === 1) && l === 1 ) {
+ insert[ original ]( this[0] );
+ return this;
+ } else {
+ for ( ; i < l; i++ ) {
+ elems = ( i > 0 ? this.clone(true) : this ).get();
+ jQuery( insert[i] )[ original ]( elems );
+ ret = ret.concat( elems );
+ }
+
+ return this.pushStack( ret, name, insert.selector );
+ }
+ };
+});
+
+function getAll( elem ) {
+ if ( typeof elem.getElementsByTagName !== "undefined" ) {
+ return elem.getElementsByTagName( "*" );
+
+ } else if ( typeof elem.querySelectorAll !== "undefined" ) {
+ return elem.querySelectorAll( "*" );
+
+ } else {
+ return [];
+ }
+}
+
+// Used in clean, fixes the defaultChecked property
+function fixDefaultChecked( elem ) {
+ if ( rcheckableType.test( elem.type ) ) {
+ elem.defaultChecked = elem.checked;
+ }
+}
+
+jQuery.extend({
+ clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+ var srcElements,
+ destElements,
+ i,
+ clone;
+
+ if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
+ clone = elem.cloneNode( true );
+
+ // IE<=8 does not properly clone detached, unknown element nodes
+ } else {
+ fragmentDiv.innerHTML = elem.outerHTML;
+ fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
+ }
+
+ if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
+ (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
+ // IE copies events bound via attachEvent when using cloneNode.
+ // Calling detachEvent on the clone will also remove the events
+ // from the original. In order to get around this, we use some
+ // proprietary methods to clear the events. Thanks to MooTools
+ // guys for this hotness.
+
+ cloneFixAttributes( elem, clone );
+
+ // Using Sizzle here is crazy slow, so we use getElementsByTagName instead
+ srcElements = getAll( elem );
+ destElements = getAll( clone );
+
+ // Weird iteration because IE will replace the length property
+ // with an element if you are cloning the body and one of the
+ // elements on the page has a name or id of "length"
+ for ( i = 0; srcElements[i]; ++i ) {
+ // Ensure that the destination node is not null; Fixes #9587
+ if ( destElements[i] ) {
+ cloneFixAttributes( srcElements[i], destElements[i] );
+ }
+ }
+ }
+
+ // Copy the events from the original to the clone
+ if ( dataAndEvents ) {
+ cloneCopyEvent( elem, clone );
+
+ if ( deepDataAndEvents ) {
+ srcElements = getAll( elem );
+ destElements = getAll( clone );
+
+ for ( i = 0; srcElements[i]; ++i ) {
+ cloneCopyEvent( srcElements[i], destElements[i] );
+ }
+ }
+ }
+
+ srcElements = destElements = null;
+
+ // Return the cloned set
+ return clone;
+ },
+
+ clean: function( elems, context, fragment, scripts ) {
+ var i, j, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags,
+ safe = context === document && safeFragment,
+ ret = [];
+
+ // Ensure that context is a document
+ if ( !context || typeof context.createDocumentFragment === "undefined" ) {
+ context = document;
+ }
+
+ // Use the already-created safe fragment if context permits
+ for ( i = 0; (elem = elems[i]) != null; i++ ) {
+ if ( typeof elem === "number" ) {
+ elem += "";
+ }
+
+ if ( !elem ) {
+ continue;
+ }
+
+ // Convert html string into DOM nodes
+ if ( typeof elem === "string" ) {
+ if ( !rhtml.test( elem ) ) {
+ elem = context.createTextNode( elem );
+ } else {
+ // Ensure a safe container in which to render the html
+ safe = safe || createSafeFragment( context );
+ div = context.createElement("div");
+ safe.appendChild( div );
+
+ // Fix "XHTML"-style tags in all browsers
+ elem = elem.replace(rxhtmlTag, "<$1>$2>");
+
+ // Go to html and back, then peel off extra wrappers
+ tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase();
+ wrap = wrapMap[ tag ] || wrapMap._default;
+ depth = wrap[0];
+ div.innerHTML = wrap[1] + elem + wrap[2];
+
+ // Move to the right depth
+ while ( depth-- ) {
+ div = div.lastChild;
+ }
+
+ // Remove IE's autoinserted from table fragments
+ if ( !jQuery.support.tbody ) {
+
+ // String was a , *may* have spurious
+ hasBody = rtbody.test(elem);
+ tbody = tag === "table" && !hasBody ?
+ div.firstChild && div.firstChild.childNodes :
+
+ // String was a bare or
+ wrap[1] === "" && !hasBody ?
+ div.childNodes :
+ [];
+
+ for ( j = tbody.length - 1; j >= 0 ; --j ) {
+ if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
+ tbody[ j ].parentNode.removeChild( tbody[ j ] );
+ }
+ }
+ }
+
+ // IE completely kills leading whitespace when innerHTML is used
+ if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
+ div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
+ }
+
+ elem = div.childNodes;
+
+ // Take out of fragment container (we need a fresh div each time)
+ div.parentNode.removeChild( div );
+ }
+ }
+
+ if ( elem.nodeType ) {
+ ret.push( elem );
+ } else {
+ jQuery.merge( ret, elem );
+ }
+ }
+
+ // Fix #11356: Clear elements from safeFragment
+ if ( div ) {
+ elem = div = safe = null;
+ }
+
+ // Reset defaultChecked for any radios and checkboxes
+ // about to be appended to the DOM in IE 6/7 (#8060)
+ if ( !jQuery.support.appendChecked ) {
+ for ( i = 0; (elem = ret[i]) != null; i++ ) {
+ if ( jQuery.nodeName( elem, "input" ) ) {
+ fixDefaultChecked( elem );
+ } else if ( typeof elem.getElementsByTagName !== "undefined" ) {
+ jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
+ }
+ }
+ }
+
+ // Append elements to a provided document fragment
+ if ( fragment ) {
+ // Special handling of each script element
+ handleScript = function( elem ) {
+ // Check if we consider it executable
+ if ( !elem.type || rscriptType.test( elem.type ) ) {
+ // Detach the script and store it in the scripts array (if provided) or the fragment
+ // Return truthy to indicate that it has been handled
+ return scripts ?
+ scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) :
+ fragment.appendChild( elem );
+ }
+ };
+
+ for ( i = 0; (elem = ret[i]) != null; i++ ) {
+ // Check if we're done after handling an executable script
+ if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) {
+ // Append to fragment and handle embedded scripts
+ fragment.appendChild( elem );
+ if ( typeof elem.getElementsByTagName !== "undefined" ) {
+ // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration
+ jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript );
+
+ // Splice the scripts into ret after their former ancestor and advance our index beyond them
+ ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
+ i += jsTags.length;
+ }
+ }
+ }
+ }
+
+ return ret;
+ },
+
+ cleanData: function( elems, /* internal */ acceptData ) {
+ var data, id, elem, type,
+ i = 0,
+ internalKey = jQuery.expando,
+ cache = jQuery.cache,
+ deleteExpando = jQuery.support.deleteExpando,
+ special = jQuery.event.special;
+
+ for ( ; (elem = elems[i]) != null; i++ ) {
+
+ if ( acceptData || jQuery.acceptData( elem ) ) {
+
+ id = elem[ internalKey ];
+ data = id && cache[ id ];
+
+ if ( data ) {
+ if ( data.events ) {
+ for ( type in data.events ) {
+ if ( special[ type ] ) {
+ jQuery.event.remove( elem, type );
+
+ // This is a shortcut to avoid jQuery.event.remove's overhead
+ } else {
+ jQuery.removeEvent( elem, type, data.handle );
+ }
+ }
+ }
+
+ // Remove cache only if it was not already removed by jQuery.event.remove
+ if ( cache[ id ] ) {
+
+ delete cache[ id ];
+
+ // IE does not allow us to delete expando properties from nodes,
+ // nor does it have a removeAttribute function on Document nodes;
+ // we must handle all of these cases
+ if ( deleteExpando ) {
+ delete elem[ internalKey ];
+
+ } else if ( elem.removeAttribute ) {
+ elem.removeAttribute( internalKey );
+
+ } else {
+ elem[ internalKey ] = null;
+ }
+
+ jQuery.deletedIds.push( id );
+ }
+ }
+ }
+ }
+ }
+});
+// Limit scope pollution from any deprecated API
+(function() {
+
+var matched, browser;
+
+// Use of jQuery.browser is frowned upon.
+// More details: http://api.jquery.com/jQuery.browser
+// jQuery.uaMatch maintained for back-compat
+jQuery.uaMatch = function( ua ) {
+ ua = ua.toLowerCase();
+
+ var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
+ /(webkit)[ \/]([\w.]+)/.exec( ua ) ||
+ /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
+ /(msie) ([\w.]+)/.exec( ua ) ||
+ ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
+ [];
+
+ return {
+ browser: match[ 1 ] || "",
+ version: match[ 2 ] || "0"
+ };
+};
+
+matched = jQuery.uaMatch( navigator.userAgent );
+browser = {};
+
+if ( matched.browser ) {
+ browser[ matched.browser ] = true;
+ browser.version = matched.version;
+}
+
+// Chrome is Webkit, but Webkit is also Safari.
+if ( browser.chrome ) {
+ browser.webkit = true;
+} else if ( browser.webkit ) {
+ browser.safari = true;
+}
+
+jQuery.browser = browser;
+
+jQuery.sub = function() {
+ function jQuerySub( selector, context ) {
+ return new jQuerySub.fn.init( selector, context );
+ }
+ jQuery.extend( true, jQuerySub, this );
+ jQuerySub.superclass = this;
+ jQuerySub.fn = jQuerySub.prototype = this();
+ jQuerySub.fn.constructor = jQuerySub;
+ jQuerySub.sub = this.sub;
+ jQuerySub.fn.init = function init( selector, context ) {
+ if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
+ context = jQuerySub( context );
+ }
+
+ return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
+ };
+ jQuerySub.fn.init.prototype = jQuerySub.fn;
+ var rootjQuerySub = jQuerySub(document);
+ return jQuerySub;
+};
+
+})();
+var curCSS, iframe, iframeDoc,
+ ralpha = /alpha\([^)]*\)/i,
+ ropacity = /opacity=([^)]*)/,
+ rposition = /^(top|right|bottom|left)$/,
+ // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
+ // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
+ rdisplayswap = /^(none|table(?!-c[ea]).+)/,
+ rmargin = /^margin/,
+ rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
+ rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
+ rrelNum = new RegExp( "^([-+])=(" + core_pnum + ")", "i" ),
+ elemdisplay = { BODY: "block" },
+
+ cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+ cssNormalTransform = {
+ letterSpacing: 0,
+ fontWeight: 400
+ },
+
+ cssExpand = [ "Top", "Right", "Bottom", "Left" ],
+ cssPrefixes = [ "Webkit", "O", "Moz", "ms" ],
+
+ eventsToggle = jQuery.fn.toggle;
+
+// return a css property mapped to a potentially vendor prefixed property
+function vendorPropName( style, name ) {
+
+ // shortcut for names that are not vendor prefixed
+ if ( name in style ) {
+ return name;
+ }
+
+ // check for vendor prefixed names
+ var capName = name.charAt(0).toUpperCase() + name.slice(1),
+ origName = name,
+ i = cssPrefixes.length;
+
+ while ( i-- ) {
+ name = cssPrefixes[ i ] + capName;
+ if ( name in style ) {
+ return name;
+ }
+ }
+
+ return origName;
+}
+
+function isHidden( elem, el ) {
+ elem = el || elem;
+ return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
+}
+
+function showHide( elements, show ) {
+ var elem, display,
+ values = [],
+ index = 0,
+ length = elements.length;
+
+ for ( ; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+ values[ index ] = jQuery._data( elem, "olddisplay" );
+ if ( show ) {
+ // Reset the inline display of this element to learn if it is
+ // being hidden by cascaded rules or not
+ if ( !values[ index ] && elem.style.display === "none" ) {
+ elem.style.display = "";
+ }
+
+ // Set elements which have been overridden with display: none
+ // in a stylesheet to whatever the default browser style is
+ // for such an element
+ if ( elem.style.display === "" && isHidden( elem ) ) {
+ values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );
+ }
+ } else {
+ display = curCSS( elem, "display" );
+
+ if ( !values[ index ] && display !== "none" ) {
+ jQuery._data( elem, "olddisplay", display );
+ }
+ }
+ }
+
+ // Set the display of most of the elements in a second loop
+ // to avoid the constant reflow
+ for ( index = 0; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+ if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
+ elem.style.display = show ? values[ index ] || "" : "none";
+ }
+ }
+
+ return elements;
+}
+
+jQuery.fn.extend({
+ css: function( name, value ) {
+ return jQuery.access( this, function( elem, name, value ) {
+ return value !== undefined ?
+ jQuery.style( elem, name, value ) :
+ jQuery.css( elem, name );
+ }, name, value, arguments.length > 1 );
+ },
+ show: function() {
+ return showHide( this, true );
+ },
+ hide: function() {
+ return showHide( this );
+ },
+ toggle: function( state, fn2 ) {
+ var bool = typeof state === "boolean";
+
+ if ( jQuery.isFunction( state ) && jQuery.isFunction( fn2 ) ) {
+ return eventsToggle.apply( this, arguments );
+ }
+
+ return this.each(function() {
+ if ( bool ? state : isHidden( this ) ) {
+ jQuery( this ).show();
+ } else {
+ jQuery( this ).hide();
+ }
+ });
+ }
+});
+
+jQuery.extend({
+ // Add in style property hooks for overriding the default
+ // behavior of getting and setting a style property
+ cssHooks: {
+ opacity: {
+ get: function( elem, computed ) {
+ if ( computed ) {
+ // We should always get a number back from opacity
+ var ret = curCSS( elem, "opacity" );
+ return ret === "" ? "1" : ret;
+
+ }
+ }
+ }
+ },
+
+ // Exclude the following css properties to add px
+ cssNumber: {
+ "fillOpacity": true,
+ "fontWeight": true,
+ "lineHeight": true,
+ "opacity": true,
+ "orphans": true,
+ "widows": true,
+ "zIndex": true,
+ "zoom": true
+ },
+
+ // Add in properties whose names you wish to fix before
+ // setting or getting the value
+ cssProps: {
+ // normalize float css property
+ "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
+ },
+
+ // Get and set the style property on a DOM Node
+ style: function( elem, name, value, extra ) {
+ // Don't set styles on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+ return;
+ }
+
+ // Make sure that we're working with the right name
+ var ret, type, hooks,
+ origName = jQuery.camelCase( name ),
+ style = elem.style;
+
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
+
+ // gets hook for the prefixed version
+ // followed by the unprefixed version
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // Check if we're setting a value
+ if ( value !== undefined ) {
+ type = typeof value;
+
+ // convert relative number strings (+= or -=) to relative numbers. #7345
+ if ( type === "string" && (ret = rrelNum.exec( value )) ) {
+ value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
+ // Fixes bug #9237
+ type = "number";
+ }
+
+ // Make sure that NaN and null values aren't set. See: #7116
+ if ( value == null || type === "number" && isNaN( value ) ) {
+ return;
+ }
+
+ // If a number was passed in, add 'px' to the (except for certain CSS properties)
+ if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
+ value += "px";
+ }
+
+ // If a hook was provided, use that value, otherwise just set the specified value
+ if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
+ // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
+ // Fixes bug #5509
+ try {
+ style[ name ] = value;
+ } catch(e) {}
+ }
+
+ } else {
+ // If a hook was provided get the non-computed value from there
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+ return ret;
+ }
+
+ // Otherwise just get the value from the style object
+ return style[ name ];
+ }
+ },
+
+ css: function( elem, name, numeric, extra ) {
+ var val, num, hooks,
+ origName = jQuery.camelCase( name );
+
+ // Make sure that we're working with the right name
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
+
+ // gets hook for the prefixed version
+ // followed by the unprefixed version
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // If a hook was provided get the computed value from there
+ if ( hooks && "get" in hooks ) {
+ val = hooks.get( elem, true, extra );
+ }
+
+ // Otherwise, if a way to get the computed value exists, use that
+ if ( val === undefined ) {
+ val = curCSS( elem, name );
+ }
+
+ //convert "normal" to computed value
+ if ( val === "normal" && name in cssNormalTransform ) {
+ val = cssNormalTransform[ name ];
+ }
+
+ // Return, converting to number if forced or a qualifier was provided and val looks numeric
+ if ( numeric || extra !== undefined ) {
+ num = parseFloat( val );
+ return numeric || jQuery.isNumeric( num ) ? num || 0 : val;
+ }
+ return val;
+ },
+
+ // A method for quickly swapping in/out CSS properties to get correct calculations
+ swap: function( elem, options, callback ) {
+ var ret, name,
+ old = {};
+
+ // Remember the old values, and insert the new ones
+ for ( name in options ) {
+ old[ name ] = elem.style[ name ];
+ elem.style[ name ] = options[ name ];
+ }
+
+ ret = callback.call( elem );
+
+ // Revert the old values
+ for ( name in options ) {
+ elem.style[ name ] = old[ name ];
+ }
+
+ return ret;
+ }
+});
+
+// NOTE: To any future maintainer, we've window.getComputedStyle
+// because jsdom on node.js will break without it.
+if ( window.getComputedStyle ) {
+ curCSS = function( elem, name ) {
+ var ret, width, minWidth, maxWidth,
+ computed = window.getComputedStyle( elem, null ),
+ style = elem.style;
+
+ if ( computed ) {
+
+ // getPropertyValue is only needed for .css('filter') in IE9, see #12537
+ ret = computed.getPropertyValue( name ) || computed[ name ];
+
+ if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
+ ret = jQuery.style( elem, name );
+ }
+
+ // A tribute to the "awesome hack by Dean Edwards"
+ // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
+ // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
+ // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
+ if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
+ width = style.width;
+ minWidth = style.minWidth;
+ maxWidth = style.maxWidth;
+
+ style.minWidth = style.maxWidth = style.width = ret;
+ ret = computed.width;
+
+ style.width = width;
+ style.minWidth = minWidth;
+ style.maxWidth = maxWidth;
+ }
+ }
+
+ return ret;
+ };
+} else if ( document.documentElement.currentStyle ) {
+ curCSS = function( elem, name ) {
+ var left, rsLeft,
+ ret = elem.currentStyle && elem.currentStyle[ name ],
+ style = elem.style;
+
+ // Avoid setting ret to empty string here
+ // so we don't default to auto
+ if ( ret == null && style && style[ name ] ) {
+ ret = style[ name ];
+ }
+
+ // From the awesome hack by Dean Edwards
+ // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+
+ // If we're not dealing with a regular pixel number
+ // but a number that has a weird ending, we need to convert it to pixels
+ // but not position css attributes, as those are proportional to the parent element instead
+ // and we can't measure the parent instead because it might trigger a "stacking dolls" problem
+ if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
+
+ // Remember the original values
+ left = style.left;
+ rsLeft = elem.runtimeStyle && elem.runtimeStyle.left;
+
+ // Put in the new values to get a computed value out
+ if ( rsLeft ) {
+ elem.runtimeStyle.left = elem.currentStyle.left;
+ }
+ style.left = name === "fontSize" ? "1em" : ret;
+ ret = style.pixelLeft + "px";
+
+ // Revert the changed values
+ style.left = left;
+ if ( rsLeft ) {
+ elem.runtimeStyle.left = rsLeft;
+ }
+ }
+
+ return ret === "" ? "auto" : ret;
+ };
+}
+
+function setPositiveNumber( elem, value, subtract ) {
+ var matches = rnumsplit.exec( value );
+ return matches ?
+ Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
+ value;
+}
+
+function augmentWidthOrHeight( elem, name, extra, isBorderBox ) {
+ var i = extra === ( isBorderBox ? "border" : "content" ) ?
+ // If we already have the right measurement, avoid augmentation
+ 4 :
+ // Otherwise initialize for horizontal or vertical properties
+ name === "width" ? 1 : 0,
+
+ val = 0;
+
+ for ( ; i < 4; i += 2 ) {
+ // both box models exclude margin, so add it if we want it
+ if ( extra === "margin" ) {
+ // we use jQuery.css instead of curCSS here
+ // because of the reliableMarginRight CSS hook!
+ val += jQuery.css( elem, extra + cssExpand[ i ], true );
+ }
+
+ // From this point on we use curCSS for maximum performance (relevant in animations)
+ if ( isBorderBox ) {
+ // border-box includes padding, so remove it if we want content
+ if ( extra === "content" ) {
+ val -= parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0;
+ }
+
+ // at this point, extra isn't border nor margin, so remove border
+ if ( extra !== "margin" ) {
+ val -= parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;
+ }
+ } else {
+ // at this point, extra isn't content, so add padding
+ val += parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0;
+
+ // at this point, extra isn't content nor padding, so add border
+ if ( extra !== "padding" ) {
+ val += parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;
+ }
+ }
+ }
+
+ return val;
+}
+
+function getWidthOrHeight( elem, name, extra ) {
+
+ // Start with offset property, which is equivalent to the border-box value
+ var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+ valueIsBorderBox = true,
+ isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box";
+
+ // some non-html elements return undefined for offsetWidth, so check for null/undefined
+ // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
+ // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
+ if ( val <= 0 || val == null ) {
+ // Fall back to computed then uncomputed css if necessary
+ val = curCSS( elem, name );
+ if ( val < 0 || val == null ) {
+ val = elem.style[ name ];
+ }
+
+ // Computed unit is not pixels. Stop here and return.
+ if ( rnumnonpx.test(val) ) {
+ return val;
+ }
+
+ // we need the check for style in case a browser which returns unreliable values
+ // for getComputedStyle silently falls back to the reliable elem.style
+ valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );
+
+ // Normalize "", auto, and prepare for extra
+ val = parseFloat( val ) || 0;
+ }
+
+ // use the active box-sizing model to add/subtract irrelevant styles
+ return ( val +
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra || ( isBorderBox ? "border" : "content" ),
+ valueIsBorderBox
+ )
+ ) + "px";
+}
+
+
+// Try to determine the default display value of an element
+function css_defaultDisplay( nodeName ) {
+ if ( elemdisplay[ nodeName ] ) {
+ return elemdisplay[ nodeName ];
+ }
+
+ var elem = jQuery( "<" + nodeName + ">" ).appendTo( document.body ),
+ display = elem.css("display");
+ elem.remove();
+
+ // If the simple way fails,
+ // get element's real default display by attaching it to a temp iframe
+ if ( display === "none" || display === "" ) {
+ // Use the already-created iframe if possible
+ iframe = document.body.appendChild(
+ iframe || jQuery.extend( document.createElement("iframe"), {
+ frameBorder: 0,
+ width: 0,
+ height: 0
+ })
+ );
+
+ // Create a cacheable copy of the iframe document on first call.
+ // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
+ // document to it; WebKit & Firefox won't allow reusing the iframe document.
+ if ( !iframeDoc || !iframe.createElement ) {
+ iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
+ iframeDoc.write("");
+ iframeDoc.close();
+ }
+
+ elem = iframeDoc.body.appendChild( iframeDoc.createElement(nodeName) );
+
+ display = curCSS( elem, "display" );
+ document.body.removeChild( iframe );
+ }
+
+ // Store the correct default display
+ elemdisplay[ nodeName ] = display;
+
+ return display;
+}
+
+jQuery.each([ "height", "width" ], function( i, name ) {
+ jQuery.cssHooks[ name ] = {
+ get: function( elem, computed, extra ) {
+ if ( computed ) {
+ // certain elements can have dimension info if we invisibly show them
+ // however, it must have a current display style that would benefit from this
+ if ( elem.offsetWidth === 0 && rdisplayswap.test( curCSS( elem, "display" ) ) ) {
+ return jQuery.swap( elem, cssShow, function() {
+ return getWidthOrHeight( elem, name, extra );
+ });
+ } else {
+ return getWidthOrHeight( elem, name, extra );
+ }
+ }
+ },
+
+ set: function( elem, value, extra ) {
+ return setPositiveNumber( elem, value, extra ?
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra,
+ jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box"
+ ) : 0
+ );
+ }
+ };
+});
+
+if ( !jQuery.support.opacity ) {
+ jQuery.cssHooks.opacity = {
+ get: function( elem, computed ) {
+ // IE uses filters for opacity
+ return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
+ ( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
+ computed ? "1" : "";
+ },
+
+ set: function( elem, value ) {
+ var style = elem.style,
+ currentStyle = elem.currentStyle,
+ opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
+ filter = currentStyle && currentStyle.filter || style.filter || "";
+
+ // IE has trouble with opacity if it does not have layout
+ // Force it by setting the zoom level
+ style.zoom = 1;
+
+ // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
+ if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
+ style.removeAttribute ) {
+
+ // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
+ // if "filter:" is present at all, clearType is disabled, we want to avoid this
+ // style.removeAttribute is IE Only, but so apparently is this code path...
+ style.removeAttribute( "filter" );
+
+ // if there there is no filter style applied in a css rule, we are done
+ if ( currentStyle && !currentStyle.filter ) {
+ return;
+ }
+ }
+
+ // otherwise, set new filter values
+ style.filter = ralpha.test( filter ) ?
+ filter.replace( ralpha, opacity ) :
+ filter + " " + opacity;
+ }
+ };
+}
+
+// These hooks cannot be added until DOM ready because the support test
+// for it is not run until after DOM ready
+jQuery(function() {
+ if ( !jQuery.support.reliableMarginRight ) {
+ jQuery.cssHooks.marginRight = {
+ get: function( elem, computed ) {
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ // Work around by temporarily setting element display to inline-block
+ return jQuery.swap( elem, { "display": "inline-block" }, function() {
+ if ( computed ) {
+ return curCSS( elem, "marginRight" );
+ }
+ });
+ }
+ };
+ }
+
+ // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
+ // getComputedStyle returns percent when specified for top/left/bottom/right
+ // rather than make the css module depend on the offset module, we just check for it here
+ if ( !jQuery.support.pixelPosition && jQuery.fn.position ) {
+ jQuery.each( [ "top", "left" ], function( i, prop ) {
+ jQuery.cssHooks[ prop ] = {
+ get: function( elem, computed ) {
+ if ( computed ) {
+ var ret = curCSS( elem, prop );
+ // if curCSS returns percentage, fallback to offset
+ return rnumnonpx.test( ret ) ? jQuery( elem ).position()[ prop ] + "px" : ret;
+ }
+ }
+ };
+ });
+ }
+
+});
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+ jQuery.expr.filters.hidden = function( elem ) {
+ return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || curCSS( elem, "display" )) === "none");
+ };
+
+ jQuery.expr.filters.visible = function( elem ) {
+ return !jQuery.expr.filters.hidden( elem );
+ };
+}
+
+// These hooks are used by animate to expand properties
+jQuery.each({
+ margin: "",
+ padding: "",
+ border: "Width"
+}, function( prefix, suffix ) {
+ jQuery.cssHooks[ prefix + suffix ] = {
+ expand: function( value ) {
+ var i,
+
+ // assumes a single number if not a string
+ parts = typeof value === "string" ? value.split(" ") : [ value ],
+ expanded = {};
+
+ for ( i = 0; i < 4; i++ ) {
+ expanded[ prefix + cssExpand[ i ] + suffix ] =
+ parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
+ }
+
+ return expanded;
+ }
+ };
+
+ if ( !rmargin.test( prefix ) ) {
+ jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
+ }
+});
+var r20 = /%20/g,
+ rbracket = /\[\]$/,
+ rCRLF = /\r?\n/g,
+ rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
+ rselectTextarea = /^(?:select|textarea)/i;
+
+jQuery.fn.extend({
+ serialize: function() {
+ return jQuery.param( this.serializeArray() );
+ },
+ serializeArray: function() {
+ return this.map(function(){
+ return this.elements ? jQuery.makeArray( this.elements ) : this;
+ })
+ .filter(function(){
+ return this.name && !this.disabled &&
+ ( this.checked || rselectTextarea.test( this.nodeName ) ||
+ rinput.test( this.type ) );
+ })
+ .map(function( i, elem ){
+ var val = jQuery( this ).val();
+
+ return val == null ?
+ null :
+ jQuery.isArray( val ) ?
+ jQuery.map( val, function( val, i ){
+ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }) :
+ { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }).get();
+ }
+});
+
+//Serialize an array of form elements or a set of
+//key/values into a query string
+jQuery.param = function( a, traditional ) {
+ var prefix,
+ s = [],
+ add = function( key, value ) {
+ // If value is a function, invoke it and return its value
+ value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
+ s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
+ };
+
+ // Set traditional to true for jQuery <= 1.3.2 behavior.
+ if ( traditional === undefined ) {
+ traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
+ }
+
+ // If an array was passed in, assume that it is an array of form elements.
+ if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+ // Serialize the form elements
+ jQuery.each( a, function() {
+ add( this.name, this.value );
+ });
+
+ } else {
+ // If traditional, encode the "old" way (the way 1.3.2 or older
+ // did it), otherwise encode params recursively.
+ for ( prefix in a ) {
+ buildParams( prefix, a[ prefix ], traditional, add );
+ }
+ }
+
+ // Return the resulting serialization
+ return s.join( "&" ).replace( r20, "+" );
+};
+
+function buildParams( prefix, obj, traditional, add ) {
+ var name;
+
+ if ( jQuery.isArray( obj ) ) {
+ // Serialize array item.
+ jQuery.each( obj, function( i, v ) {
+ if ( traditional || rbracket.test( prefix ) ) {
+ // Treat each array item as a scalar.
+ add( prefix, v );
+
+ } else {
+ // If array item is non-scalar (array or object), encode its
+ // numeric index to resolve deserialization ambiguity issues.
+ // Note that rack (as of 1.0.0) can't currently deserialize
+ // nested arrays properly, and attempting to do so may cause
+ // a server error. Possible fixes are to modify rack's
+ // deserialization algorithm or to provide an option or flag
+ // to force array serialization to be shallow.
+ buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
+ }
+ });
+
+ } else if ( !traditional && jQuery.type( obj ) === "object" ) {
+ // Serialize object item.
+ for ( name in obj ) {
+ buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+ }
+
+ } else {
+ // Serialize scalar item.
+ add( prefix, obj );
+ }
+}
+var
+ // Document location
+ ajaxLocParts,
+ ajaxLocation,
+
+ rhash = /#.*$/,
+ rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
+ // #7653, #8125, #8152: local protocol detection
+ rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
+ rnoContent = /^(?:GET|HEAD)$/,
+ rprotocol = /^\/\//,
+ rquery = /\?/,
+ rscript = /
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Wicked Charts
-
version @projectVersion@ :: Wicket @wicketVersion@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
To add a chart to your Wicket page, include the following HTML
- and Java fragments into your code:
-
Markup:
-
-
-<!-- HTML code -->
-<div wicket:id="chart"/>
-
-
-
-
Wicket Page:
-
-
-// Java code
-Options options = new Options();
-options.setTitle(new Title("My Chart"));
-... // to see more options, select a chart below and click the button "Show Java code"
-add(new Chart("chart", options));
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/Homepage.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/Homepage.java
deleted file mode 100644
index 791d6bd1..00000000
--- a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/Homepage.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/**
- * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
- *
- * 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 de.adesso.wickedcharts.showcase;
-
-import org.apache.wicket.markup.html.IHeaderResponse;
-import org.apache.wicket.markup.html.WebPage;
-import org.apache.wicket.markup.html.basic.Label;
-
-import de.adesso.wickedcharts.wicket15.highcharts.Chart;
-
-import de.adesso.wickedcharts.highcharts.options.Options;
-import de.adesso.wickedcharts.highcharts.theme.DarkBlueTheme;
-import de.adesso.wickedcharts.highcharts.theme.GrayTheme;
-import de.adesso.wickedcharts.highcharts.theme.GridTheme;
-import de.adesso.wickedcharts.highcharts.theme.SkiesTheme;
-import de.adesso.wickedcharts.highcharts.theme.Theme;
-import de.adesso.wickedcharts.showcase.links.UpdateChartLink;
-import de.adesso.wickedcharts.showcase.options.AreaInvertedAxisOptions;
-import de.adesso.wickedcharts.showcase.options.AreaMissingOptions;
-import de.adesso.wickedcharts.showcase.options.AreaSplineOptions;
-import de.adesso.wickedcharts.showcase.options.AreaWithNegativeValuesOptions;
-import de.adesso.wickedcharts.showcase.options.BarWithNegativeStackOptions;
-import de.adesso.wickedcharts.showcase.options.BasicAreaOptions;
-import de.adesso.wickedcharts.showcase.options.BasicBarOptions;
-import de.adesso.wickedcharts.showcase.options.BasicColumnOptions;
-import de.adesso.wickedcharts.showcase.options.BasicLineOptions;
-import de.adesso.wickedcharts.showcase.options.BasicPieOptions;
-import de.adesso.wickedcharts.showcase.options.BubbleChartOptions;
-import de.adesso.wickedcharts.showcase.options.ColumnWithDrilldownOptions;
-import de.adesso.wickedcharts.showcase.options.ColumnWithNegativeValuesOptions;
-import de.adesso.wickedcharts.showcase.options.ColumnWithRotatedLabelsOptions;
-import de.adesso.wickedcharts.showcase.options.ComboOptions;
-import de.adesso.wickedcharts.showcase.options.DonutOptions;
-import de.adesso.wickedcharts.showcase.options.LineWithDataLabelsOptions;
-import de.adesso.wickedcharts.showcase.options.LogarithmicAxisOptions;
-import de.adesso.wickedcharts.showcase.options.PercentageAreaOptions;
-import de.adesso.wickedcharts.showcase.options.PieWithGradientOptions;
-import de.adesso.wickedcharts.showcase.options.PieWithLegendOptions;
-import de.adesso.wickedcharts.showcase.options.PolarOptions;
-import de.adesso.wickedcharts.showcase.options.ScatterPlotOptions;
-import de.adesso.wickedcharts.showcase.options.SplineWithInvertedAxisOptions;
-import de.adesso.wickedcharts.showcase.options.SplineWithPlotBandsOptions;
-import de.adesso.wickedcharts.showcase.options.SplineWithSymbolsOptions;
-import de.adesso.wickedcharts.showcase.options.StackedAndGroupedColumnOptions;
-import de.adesso.wickedcharts.showcase.options.StackedAreaOptions;
-import de.adesso.wickedcharts.showcase.options.StackedBarOptions;
-import de.adesso.wickedcharts.showcase.options.StackedColumnOptions;
-import de.adesso.wickedcharts.showcase.options.StackedPercentageOptions;
-import de.adesso.wickedcharts.showcase.options.TimeDataWithIrregularIntervalsOptions;
-import de.adesso.wickedcharts.showcase.options.ZoomableTimeSeriesOptions;
-import org.apache.wicket.request.mapper.parameter.PageParameters;
-
-public class Homepage extends WebPage {
-
- private static final long serialVersionUID = 1L;
-
- public Homepage(final PageParameters parameters) {
- Theme theme = this.getThemeFromParams(parameters);
- Options options = this.getOptionsToDisplay();
- final Chart chart = new Chart("chart", options, theme);
- this.add(chart);
- Label codeContainer = this.addCodeContainer();
- this.addChartLinks(chart, codeContainer);
- }
-
- private void addChartLinks(final Chart chart, final Label codeContainer) {
- this.add(new UpdateChartLink("line", chart, codeContainer,
- new BasicLineOptions()));
- this.add(new UpdateChartLink("splineWithSymbols", chart, codeContainer,
- new SplineWithSymbolsOptions()));
- this.add(new UpdateChartLink("irregularIntervals", chart,
- codeContainer, new TimeDataWithIrregularIntervalsOptions()));
- this.add(new UpdateChartLink("logarithmicAxis", chart, codeContainer,
- new LogarithmicAxisOptions()));
- this.add(new UpdateChartLink("scatter", chart, codeContainer,
- new ScatterPlotOptions()));
-
- this.add(new UpdateChartLink("area", chart, codeContainer,
- new BasicAreaOptions()));
- this.add(new UpdateChartLink("areaWithNegativeValues", chart,
- codeContainer, new AreaWithNegativeValuesOptions()));
-
- this.add(new UpdateChartLink("stackedAndGroupedColumn", chart,
- codeContainer, new StackedAndGroupedColumnOptions()));
- this.add(new UpdateChartLink("combo", chart, codeContainer,
- new ComboOptions()));
- this.add(new UpdateChartLink("donut", chart, codeContainer,
- new DonutOptions()));
- this.add(new UpdateChartLink("withDataLabels", chart, codeContainer,
- new LineWithDataLabelsOptions()));
- this.add(new UpdateChartLink("zoomableTimeSeries", chart,
- codeContainer, new ZoomableTimeSeriesOptions(false)));
- this.add(new UpdateChartLink("splineInverted", chart, codeContainer,
- new SplineWithInvertedAxisOptions()));
- this.add(new UpdateChartLink("splineWithPlotBands", chart,
- codeContainer, new SplineWithPlotBandsOptions()));
- this.add(new UpdateChartLink("polar", chart, codeContainer,
- new PolarOptions()));
- this.add(new UpdateChartLink("stackedArea", chart, codeContainer,
- new StackedAreaOptions()));
- this.add(new UpdateChartLink("percentageArea", chart, codeContainer,
- new PercentageAreaOptions()));
- this.add(new UpdateChartLink("areaMissing", chart, codeContainer,
- new AreaMissingOptions()));
- this.add(new UpdateChartLink("areaInverted", chart, codeContainer,
- new AreaInvertedAxisOptions()));
-
- this.add(new UpdateChartLink("areaSpline", chart, codeContainer,
- new AreaSplineOptions()));
- this.add(new UpdateChartLink("basicBar", chart, codeContainer,
- new BasicBarOptions()));
- this.add(new UpdateChartLink("columnWithDrilldown", chart,
- codeContainer, new ColumnWithDrilldownOptions()));
- this.add(new UpdateChartLink("columnRotated", chart, codeContainer,
- new ColumnWithRotatedLabelsOptions()));
- this.add(new UpdateChartLink("stackedBar", chart, codeContainer,
- new StackedBarOptions()));
- this.add(new UpdateChartLink("barNegativeStack", chart, codeContainer,
- new BarWithNegativeStackOptions()));
- this.add(new UpdateChartLink("basicColumn", chart, codeContainer,
- new BasicColumnOptions()));
- this.add(new UpdateChartLink("columnWithNegativeValues", chart,
- codeContainer, new ColumnWithNegativeValuesOptions()));
- this.add(new UpdateChartLink("stackedColumn", chart, codeContainer,
- new StackedColumnOptions()));
- this.add(new UpdateChartLink("stackedPercentage", chart, codeContainer,
- new StackedPercentageOptions()));
- this.add(new UpdateChartLink("basicPie", chart, codeContainer,
- new BasicPieOptions()));
- this.add(new UpdateChartLink("pieWithGradient", chart, codeContainer,
- new PieWithGradientOptions()));
- this.add(new UpdateChartLink("pieWithLegend", chart, codeContainer,
- new PieWithLegendOptions()));
- this.add(new UpdateChartLink("bubble", chart, codeContainer,
- new BubbleChartOptions()));
-
- }
-
- private Label addCodeContainer() {
- Label codeContainer = new Label("code", new StringFromResourceModel(
- BasicLineOptions.class, BasicLineOptions.class.getSimpleName()
- + ".java"));
- codeContainer.setOutputMarkupId(true);
- this.add(codeContainer);
- return codeContainer;
- }
-
- private Options getOptionsToDisplay() {
- Options options = ((ShowcaseSession) this.getSession())
- .getCurrentChartOptions();
- if (options == null) {
- options = new BasicLineOptions();
- }
- return options;
- }
-
- private int getSelectedTab() {
- String theme = this.getPageParameters().get("theme").toString();
- if ("grid".equals(theme)) {
- return 1;
- } else if ("skies".equals(theme)) {
- return 2;
- } else if ("gray".equals(theme)) {
- return 3;
- } else if ("darkblue".equals(theme)) {
- return 4;
- } else if ("darkgreen".equals(theme)) {
- return 5;
- } else {
- return 0;
- }
- }
-
- private Theme getThemeFromParams(final PageParameters params) {
- String themeString = params.get("theme").toString();
- if ("grid".equals(themeString)) {
- return new GridTheme();
- } else if ("skies".equals(themeString)) {
- return new SkiesTheme();
- } else if ("gray".equals(themeString)) {
- return new GrayTheme();
- } else if ("darkblue".equals(themeString)) {
- return new DarkBlueTheme();
- } else {
- // default theme
- return null;
- }
- }
-
- @Override
- public void renderHead(final IHeaderResponse response) {
- // select bootstrap tab for current theme selected
- int selectedTab = this.getSelectedTab();
- response.renderOnDomReadyJavaScript(("$('#themes li:eq(" + selectedTab + ") a').tab('show');"));
- }
-}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.html b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.html
new file mode 100644
index 00000000..bb2de483
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.html
@@ -0,0 +1,291 @@
+
+
+
+
+
+ Wicked Charts :: Showcase :: Wicket 1.5.x
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Wicked Charts
+
+
version @projectVersion@ :: Wicket @wicketVersion@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
To add a chart to your Wicket page, include the following HTML
+ and Java fragments into your code:
+
+
Markup:
+
+
+<!-- HTML code -->
+<div>
+ <canvas wicket:id="chart"></canvas>
+</div>
+
+
+
+
Wicket Page:
+
+
+// Java code
+ChartConfiguration chart = new ChartConfiguration();
+chart.setType(ChartType.LINE);
+chart.setOptions(new Options().setTitle(new Title().setText("My Chart")));
+chart.setData(new Data().setDatasets(Arrays.asList(new Dataset().setData(IntegerValue.of(1,2,3,4)))));
+//to see more options, select a chart below and click the button "Show Java code"
+
+add(new Chart("chart", chart));
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.java
new file mode 100644
index 00000000..affd70f9
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.java
@@ -0,0 +1,398 @@
+package de.adesso.wickedcharts.showcase;
+/*
+ * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
+ *
+ * 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.
+ */
+
+
+import de.adesso.wickedcharts.showcase.configurations.*;
+import de.adesso.wickedcharts.showcase.configurations.gridlines.*;
+import de.adesso.wickedcharts.showcase.configurations.interactions.*;
+import de.adesso.wickedcharts.showcase.configurations.legendposition.LegendPositionBottomConfiguration;
+import de.adesso.wickedcharts.showcase.configurations.legendposition.LegendPositionLeftConfiguration;
+import de.adesso.wickedcharts.showcase.configurations.legendposition.LegendPositionRightConfiguration;
+import de.adesso.wickedcharts.showcase.configurations.legendposition.LegendPositionTopConfiguration;
+import de.adesso.wickedcharts.showcase.links.ChartjsShowcaseLink;
+import de.adesso.wickedcharts.showcase.links.HighchartsShowcaseLink;
+import de.adesso.wickedcharts.showcase.links.UpdateChartJsLink;
+import de.adesso.wickedcharts.wicket15.chartjs.Chart;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * This page takes care of the Chart.js showcase logic.
+ * @author SvenWirz
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+public class HomepageChartJs extends WebPage implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Constructs the page according to the current parameters
+ * This constructor is called each time a new chart is
+ * selected.
+ * @param parameters the page parameters from the page URI
+ */
+ public HomepageChartJs(final PageParameters parameters) {
+ addCharts(parameters);
+ addNavigationLinks();
+ addChartLinks();
+ }
+
+ /**
+ * Gets the charts and the code containers from the page parameters,
+ * constructs Wicket componenets from them and
+ * adds them to a Wicket ListView.
+ * @param parameters the page parameters from the page URI
+ */
+ private void addCharts(PageParameters parameters){
+
+ List charts = getChartFromParams(parameters);
+
+ //If we have more than one chart - use SmallComponents
+ if(charts.size() > 1){
+ List components = new ArrayList<>();
+ for(Chart i : charts){
+ components.add(new SmallChartComponent(i));
+ }
+ add( new ListView( "components", components ){
+ protected void populateItem(ListItem item)
+ {
+ item.add( (SmallChartComponent)item.getModelObject() );
+ }
+ });
+ }else { //else use the regular full-width chart component
+ List components = new ArrayList<>();
+ for (Chart i : charts) {
+ components.add(new ChartComponent(i));
+ }
+ add( new ListView( "components", components ){
+ protected void populateItem(ListItem item)
+ {
+ item.add( (ChartComponent)item.getModelObject() );
+ }
+ });
+ }
+
+ //Add Code Components
+ List code_components = new ArrayList<>();
+ for(Chart i : charts){
+ code_components.add(new CodeComponent(i));
+ }
+ add( new ListView( "code_components", code_components ){
+ protected void populateItem(ListItem item){
+ item.add( (CodeComponent)item.getModelObject() );
+ }
+ });
+ }
+
+ private void addNavigationLinks() {
+ this.add(new HighchartsShowcaseLink());
+ this.add(new ChartjsShowcaseLink());
+ }
+
+ /**
+ * Adds links to the charts in the navigation sidebar
+ */
+ private void addChartLinks() {
+ this.add(new UpdateChartJsLink("LineChartBasic", "lineBasic"));
+ this.add(new UpdateChartJsLink("BarChartVertical" , "barVertical"));
+ this.add(new UpdateChartJsLink("LineChartMultiAxis", "lineMultiAxis"));
+ this.add(new UpdateChartJsLink("LineChartStepped", "lineStepped"));
+ this.add(new UpdateChartJsLink("LineChartInterpolated", "lineInterpolated"));
+ this.add(new UpdateChartJsLink("LineStyles", "lineStyles"));
+ this.add(new UpdateChartJsLink("PointStyles", "pointStyles"));
+ this.add(new UpdateChartJsLink("PointSizes", "pointSizes"));
+ this.add(new UpdateChartJsLink("BarChartHorizontal", "barHorizontal"));
+ this.add(new UpdateChartJsLink("BarChartStacked", "barStacked"));
+ this.add(new UpdateChartJsLink("BarChartStackedGroup", "barStackedGroup"));
+ this.add(new UpdateChartJsLink("BarChartMultiAxis", "barMultiAxis"));
+ this.add(new UpdateChartJsLink("PieChart", "pie"));
+ this.add(new UpdateChartJsLink("AreaLineBoundariesChart", "areaLineBoundaries"));
+ this.add(new UpdateChartJsLink("LineChartStacked", "lineStacked"));
+ this.add(new UpdateChartJsLink("LineChartDataset", "lineDataset"));
+ this.add(new UpdateChartJsLink("RadarChart", "radar"));
+ this.add(new UpdateChartJsLink("DoughnutChart", "doughnut"));
+ this.add(new UpdateChartJsLink("PolarAreaChart", "polarArea"));
+ this.add(new UpdateChartJsLink("ScatterChart", "scatter"));
+ this.add(new UpdateChartJsLink("ScatterChartMultiAxis", "scatterMultiAxis"));
+ this.add(new UpdateChartJsLink("ComboBarLineChart", "comboBarLine"));
+ this.add(new UpdateChartJsLink("LegendPosition", "legendPosition"));
+ this.add(new UpdateChartJsLink("StepSize", "stepSize"));
+ this.add(new UpdateChartJsLink("MinMax", "minMax"));
+ this.add(new UpdateChartJsLink("GridLines", "gridLines"));
+ this.add(new UpdateChartJsLink("MultilineLabels", "multiLineLabels"));
+ this.add(new UpdateChartJsLink("LogarithmicLineChart", "lineLogarithmic"));
+ this.add(new UpdateChartJsLink("LogarithmicScatterChart", "scatterLogarithmic"));
+ this.add(new UpdateChartJsLink("BubbleChart", "bubble"));
+ this.add(new UpdateChartJsLink("FilteringLabels", "filteringLabels"));
+ this.add(new UpdateChartJsLink("TimeLine", "timeLine"));
+ this.add(new UpdateChartJsLink("NonNumeric", "nonNumeric"));
+ this.add(new UpdateChartJsLink("TimePoint", "timePoint"));
+ this.add(new UpdateChartJsLink("TimeSeries", "timeSeries"));
+ this.add(new UpdateChartJsLink("TimeCombo", "timeCombo"));
+ this.add(new UpdateChartJsLink("OtherRadar", "radar2"));
+ this.add(new UpdateChartJsLink("Tooltip", "tooltip"));
+ this.add(new UpdateChartJsLink("TooltipHtml", "tooltipHtml"));
+ this.add(new UpdateChartJsLink("LegendPointStyle", "legendPointStyle"));
+ this.add(new UpdateChartJsLink("LineChartProgressBar", "lineProgressBar"));
+ this.add(new UpdateChartJsLink("DataLabellingChart", "dataLabelling"));
+ this.add(new UpdateChartJsLink("TooltipInteractions", "tooltipInteractions"));
+ }
+
+ /**
+ * Returns a List of Chart objects from the current page parameters.
+ * @param params the page parameters from the page URI
+ * @return a List of Chart objects
+ */
+ private List getChartFromParams(final PageParameters params) {
+ String chartString;
+ List config = new ArrayList<>();
+
+ //Get the parameters of the page
+ List pairs = params.getAllNamed();
+
+ //If the showcase is started without any parameters
+ //set the parameters to lineBasic and give us a line Chart
+ if(params.getAllNamed().size() == 0){
+ PageParameters temp = new PageParameters();
+ temp.add("chart", "lineBasic");
+ setResponsePage(HomepageChartJs.class, temp);
+ config.add(new Chart("chart", new LineChartBasicConfiguration()));
+ return config;
+ }
+
+ chartString = params.getAllNamed().get(0).getValue();
+ if(chartString == null) {
+ config.add(new Chart("chart", new LineChartBasicConfiguration()));
+ return config;
+ }
+
+ switch(chartString) {
+
+ case "barVertical":
+ config.add(new Chart("chart", new BarChartVerticalConfiguration()));
+ break;
+
+ case "barHorizontal":
+ config.add(new Chart("chart", new BarChartHorizontalConfiguration()));
+ break;
+
+ case "barMultiAxis":
+ config.add(new Chart("chart", new BarChartMultiAxisConfiguration()));
+ break;
+
+ case "barStacked":
+ config.add(new Chart("chart", new BarChartStackedConfiguration()));
+ break;
+
+ case "barStackedGroup":
+ config.add(new Chart("chart", new BarChartStackedGroupConfiguration()));
+ break;
+
+ case "lineBasic":
+ config.add(new Chart("chart", new LineChartBasicConfiguration()));
+ break;
+
+ case "lineMultiAxis":
+ config.add(new Chart("chart", new LineChartMultiAxisConfiguration()));
+ break;
+
+ case "lineStepped":
+ config.add(new Chart("chart", new LineChartSteppedBeforeConfiguration()));
+ config.add(new Chart("chart", new LineChartSteppedAfterConfiguration()));
+ break;
+
+ case "lineInterpolated":
+ config.add(new Chart("chart", new LineChartInterpolatedConfiguration()));
+ break;
+
+ case "lineStyles":
+ config.add(new Chart("chart", new LineStylesConfiguration()));
+ break;
+
+ case "pointStyles":
+ config.add(new Chart("chart", new PointStylesConfiguration()));
+ break;
+
+ case "pointSizes":
+ config.add(new Chart("chart", new LineChartWithDifferentPointSizesConfiguration()));
+ break;
+
+ case "areaLineBoundaries":
+ config.add(new Chart("chart", new AreaLineBoundariesChartStartConfiguration()));
+ config.add(new Chart("chart", new AreaLineBoundariesChartEndConfiguration()));
+ config.add(new Chart("chart", new AreaLineBoundariesChartOriginConfiguration()));
+ config.add(new Chart("chart", new AreaLineBoundariesChartFalseConfiguration()));
+ break;
+
+ case "lineDataset":
+ config.add(new Chart("chart", new LineChartAreaDatasetConfiguration()));
+ break;
+
+ case "lineStacked":
+ config.add(new Chart("chart", new LineChartStackedConfiguration()));
+ break;
+
+ case "radar":
+ config.add(new Chart("chart", new RadarChartConfiguration()));
+ break;
+
+ case "scatter":
+ config.add(new Chart("chart", new ScatterChartConfiguration()));
+ break;
+
+ case "scatterMultiAxis":
+ config.add(new Chart("chart", new ScatterChartMultiAxisConfiguration()));
+ break;
+
+ case "doughnut":
+ config.add(new Chart("chart", new DoughnutChartConfiguration()));
+ break;
+
+ case "pie":
+ config.add(new Chart("chart", new PieChartConfiguration()));
+ break;
+
+ case "polarArea":
+ config.add(new Chart("chart", new PolarAreaChartConfiguration()));
+ break;
+
+ case "radar2":
+ config.add(new Chart("chart", new OtherRadarChartConfiguration()));
+ break;
+
+ case "comboBarLine":
+ config.add(new Chart("chart", new ComboBarLineChartConfiguration()));
+ break;
+
+ case "stepSize":
+ config.add(new Chart("chart", new LinearStepSizeConfiguration()));
+ break;
+
+ case "minMax":
+ config.add(new Chart("chart", new MinMaxConfiguration()));
+ config.add(new Chart("chart", new MinMaxSuggestedConfiguration()));
+ break;
+
+ case "lineLogarithmic":
+ config.add(new Chart("chart", new LogarithmicLineChartConfiguration()));
+ break;
+
+ case "scatterLogarithmic":
+ config.add(new Chart("chart", new LogarithmicScatterChartConfiguration()));
+ break;
+
+ case "timeLine":
+ config.add(new Chart("chart", new TimeLineConfiguration()));
+ break;
+
+ case "timePoint":
+ config.add(new Chart("chart", new TimePointConfiguration()));
+ break;
+
+ case "timeSeries":
+ config.add(new Chart("chart", new TimeSeriesConfiguration()));
+ break;
+
+ case "timeCombo":
+ config.add(new Chart("chart", new TimeComboConfiguration()));
+ break;
+
+ case "gridLines":
+ config.add(new Chart("chart", new GridLinesBasicConfiguration()));
+ config.add(new Chart("chart", new GridLinesDisplayFalseConfiguration()));
+ config.add(new Chart("chart", new GridLinesDisplayFalseNoBorderConfiguration()));
+ config.add(new Chart("chart", new GridLinesChartAreaConfiguration()));
+ config.add(new Chart("chart", new GridLinesTicksConfiguration()));
+ config.add(new Chart("chart", new GridLineStylesConfiguration()));
+ break;
+
+ case "multiLineLabels":
+ config.add(new Chart("chart", new MultilineLabelsConfiguration()));
+ break;
+
+ case "filteringLabels":
+ config.add(new Chart("chart", new FilteringLabelsConfiguration()));
+ break;
+
+ case "nonNumeric":
+ config.add(new Chart("chart", new NonNumericConfiguration()));
+ break;
+
+ case "legendPosition":
+ config.add(new Chart("chart", new LegendPositionTopConfiguration()));
+ config.add(new Chart("chart", new LegendPositionRightConfiguration()));
+ config.add(new Chart("chart", new LegendPositionBottomConfiguration()));
+ config.add(new Chart("chart", new LegendPositionLeftConfiguration()));
+ break;
+
+ case "legendPointStyle":
+ config.add(new Chart("chart", new LegendPointStyleConfiguration()));
+ break;
+
+ case "tooltip":
+ config.add(new Chart("chart", new TooltipBorderConfiguration()));
+ config.add(new Chart("chart", new TooltipCallbacksConfiguration()));
+ config.add(new Chart("chart", new TooltipAverageConfiguration()));
+ config.add(new Chart("chart", new TooltipNearestConfiguration()));
+ break;
+
+ case "tooltipHtml":
+ config.add(new Chart("chart", new TooltipHtmlLineConfiguration()));
+ config.add(new Chart("chart", new TooltipHtmlPieConfiguration()));
+ config.add(new Chart("chart", new TooltipHtmlPointsConfiguration()));
+ break;
+
+ case "bubble":
+ config.add(new Chart("chart", new BubbleChartConfiguration()));
+ break;
+
+ case "lineProgressBar":
+ config.add(new Chart("chart", new LineChartProgressBarConfiguration()));
+ break;
+
+ case "dataLabelling":
+ config.add(new Chart("chart", new DataLabellingChartConfiguration()));
+ break;
+
+ case "tooltipInteractions":
+ config.add(new Chart("chart", new DatasetIntersectFalseConfiguration()));
+ config.add(new Chart("chart", new DatasetIntersectTrueConfiguration()));
+ config.add(new Chart("chart", new IndexIntersectFalseConfiguration()));
+ config.add(new Chart("chart", new IndexIntersectTrueConfiguration()));
+ config.add(new Chart("chart", new NearestIntersectFalseConfiguration()));
+ config.add(new Chart("chart", new NearestIntersectTrueConfiguration()));
+ config.add(new Chart("chart", new PointIntersectFalseConfiguration()));
+ config.add(new Chart("chart", new PointIntersectTrueConfiguration()));
+ config.add(new Chart("chart", new xIntersectFalseConfiguration()));
+ config.add(new Chart("chart", new xIntersectTrueConfiguration()));
+ config.add(new Chart("chart", new yIntersectFalseConfiguration()));
+ config.add(new Chart("chart", new yIntersectTrueConfiguration()));
+ break;
+
+ default:
+ config.add(new Chart("chart", new LineChartBasicConfiguration()));
+ break;
+ }
+ return config;
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.html b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.html
new file mode 100644
index 00000000..8396861c
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.html
@@ -0,0 +1,267 @@
+
+
+
+
+ Wicked Charts :: Showcase :: Wicket 1.5.x
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Wicked Charts
+
+
version @projectVersion@ :: Wicket @wicketVersion@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
To add a chart to your Wicket page, include the following HTML
+ and Java fragments into your code:
+
+
Markup:
+
+
+<!-- HTML code -->
+<div wicket:id="chart"/>
+
+
+
+
Wicket Page:
+
+
+// Java code
+Options options = new Options();
+options.setTitle(new Title("My Chart"));
+... // to see more options, select a chart below and click the button "Show Java code"
+add(new Chart("chart", options));
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.java
new file mode 100644
index 00000000..417db407
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.java
@@ -0,0 +1,441 @@
+/*
+ * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
+ *
+ * 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 de.adesso.wickedcharts.showcase;
+
+import de.adesso.wickedcharts.highcharts.theme.*;
+import de.adesso.wickedcharts.showcase.links.ChartjsShowcaseLink;
+import de.adesso.wickedcharts.showcase.links.HighchartsShowcaseLink;
+import de.adesso.wickedcharts.showcase.links.UpdateHighchartLink;
+import de.adesso.wickedcharts.showcase.links.UpdateThemeLink;
+import de.adesso.wickedcharts.showcase.options.*;
+import de.adesso.wickedcharts.wicket15.highcharts.Chart;
+import org.apache.wicket.markup.html.IHeaderResponse;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+
+import java.util.List;
+
+/**
+ * This page takes care of the Highcharts showcase logic.
+ * @author SvenWirz
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+public class HomepageHighcharts extends WebPage {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Constructs the page according to the current parameters
+ * This constructor is called each time a new chart or theme is
+ * selected.
+ * @param parameters the page parameters from the page URI
+ */
+ public HomepageHighcharts(final PageParameters parameters) {
+ Chart chart = getChartFromParams(parameters);
+ add(chart);
+ addNavigationLinks();
+ addCodeContainer(chart);
+ addChartLinks(getThemeString(parameters));
+ addThemeLinks(parameters);
+ }
+
+ /**
+ * Adds links to the different themes
+ * @param parameters the page parameters from the page URI
+ */
+ private void addThemeLinks(PageParameters parameters){
+ List pairs = parameters.getAllNamed();
+ if (parameters.getAllNamed().size() < 2) {
+ add(new UpdateThemeLink("defaultTheme", "chart"));
+ add(new UpdateThemeLink("grid", "chart"));
+ add(new UpdateThemeLink("skies", "chart"));
+ add(new UpdateThemeLink("gray", "chart"));
+ add(new UpdateThemeLink("darkblue", "chart"));
+ } else {
+ String chartString = parameters.getAllNamed().get(1).getValue();
+ add(new UpdateThemeLink("defaultTheme", chartString));
+ add(new UpdateThemeLink("grid", chartString));
+ add(new UpdateThemeLink("skies", chartString));
+ add(new UpdateThemeLink("gray", chartString));
+ add(new UpdateThemeLink("darkblue", chartString));
+ }
+ }
+
+ /**
+ * Returns the name of the current theme from the page parameters
+ * @param parameters the page parameters from the page URI
+ * @return The name of the current theme
+ */
+ private String getThemeString(PageParameters parameters){
+ String themeString = "default";
+ List pairs = parameters.getAllNamed();
+ if (parameters.getAllNamed().size() < 2) {
+ return themeString;
+ } else {
+ themeString= parameters.getAllNamed().get(0).getValue();
+ }
+ return themeString;
+ }
+
+ private void addNavigationLinks() {
+ add(new HighchartsShowcaseLink());
+ add(new ChartjsShowcaseLink());
+ }
+
+ /**
+ * Adds links to the charts in the navigation sidebar
+ */
+ private void addChartLinks(String theme) {
+ add(new UpdateHighchartLink("line", theme));
+ add(new UpdateHighchartLink("splineWithSymbols", theme));
+ add(new UpdateHighchartLink("irregularIntervals", theme));
+ add(new UpdateHighchartLink("logarithmicAxis", theme));
+ add(new UpdateHighchartLink("scatter", theme));
+ add(new UpdateHighchartLink("area", theme));
+ add(new UpdateHighchartLink("areaWithNegativeValues",theme));
+ add(new UpdateHighchartLink("stackedAndGroupedColumn", theme));
+ add(new UpdateHighchartLink("combo", theme));
+ add(new UpdateHighchartLink("donut", theme));
+ add(new UpdateHighchartLink("withDataLabels", theme));
+ add(new UpdateHighchartLink("splineInverted", theme));
+ add(new UpdateHighchartLink("splineWithPlotBands", theme));
+ add(new UpdateHighchartLink("polar", theme));
+ add(new UpdateHighchartLink("percentageArea", theme));
+ add(new UpdateHighchartLink("areaMissing", theme));
+ add(new UpdateHighchartLink("areaInverted", theme));
+ add(new UpdateHighchartLink("areaSpline", theme));
+ add(new UpdateHighchartLink("areaSplineRange", theme));
+ add(new UpdateHighchartLink("basicBar", theme));
+ add(new UpdateHighchartLink("columnWithDrilldown", theme));
+ add(new UpdateHighchartLink("columnRotated", theme));
+ add(new UpdateHighchartLink("stackedBar", theme));
+ add(new UpdateHighchartLink("barNegativeStack", theme));
+ add(new UpdateHighchartLink("basicColumn", theme));
+ add(new UpdateHighchartLink("columnWithNegativeValues", theme));
+ add(new UpdateHighchartLink("stackedColumn", theme));
+ add(new UpdateHighchartLink("stackedArea", theme));
+ add(new UpdateHighchartLink("stackedPercentage", theme));
+ add(new UpdateHighchartLink("basicPie", theme));
+ add(new UpdateHighchartLink("pieWithGradient", theme));
+ add(new UpdateHighchartLink("pieWithLegend", theme));
+ add(new UpdateHighchartLink("bubble", theme));
+ add(new UpdateHighchartLink("3dbubble", theme));
+ add(new UpdateHighchartLink("boxplot", theme));
+ add(new UpdateHighchartLink("angularGauge", theme));
+ add(new UpdateHighchartLink("spiderweb", theme));
+ add(new UpdateHighchartLink("windrose", theme));
+ add(new UpdateHighchartLink("columnrange", theme));
+ add(new UpdateHighchartLink("arearange", theme));
+ add(new UpdateHighchartLink("clicktoadd", theme));
+ add(new UpdateHighchartLink("dualAxes", theme));
+ add(new UpdateHighchartLink("scatterWithRegression", theme));
+ add(new UpdateHighchartLink("multipleAxes", theme));
+ add(new UpdateHighchartLink("errorBar", theme));
+ add(new UpdateHighchartLink("funnel", theme));
+ add(new UpdateHighchartLink("pyramid", theme));
+ add(new UpdateHighchartLink("heatmap", theme));
+ }
+
+
+ /**
+ * Adds a code container corresponding to the current chart
+ * @param chart The currently selected chart
+ */
+ private void addCodeContainer(Chart chart) {
+ Label codeContainer = new Label("code", new StringFromResourceModel(
+ chart.getOptions().getClass(), chart.getOptions().getClass().getSimpleName()
+ + ".java"));
+ codeContainer.setOutputMarkupId(true);
+ add(codeContainer);
+ }
+
+ /**
+ * Returns a Chart object from the current page parameters
+ * @param params the page parameters from the page URI
+ * @return a Chart
+ */
+ private Chart getChartFromParams(final PageParameters params) {
+ String chartString;
+ String themeString;
+ Chart config;
+
+ //If the showcase is started without any parameters
+ //set the parameters to lineBasic and give us a line Chart
+ if(params.getAllNamed().size() < 2){
+ PageParameters temp = new PageParameters();
+ temp.add("theme", "default");
+ temp.add("chart", "line");
+ setResponsePage(HomepageHighcharts.class, temp);
+ config = new Chart("chart", new BasicLineOptions(), null);
+ return config;
+ }
+
+ themeString = params.getAllNamed().get(0).getValue();
+ Theme theme = getThemeFromParams(themeString);
+ chartString = params.getAllNamed().get(1).getValue();
+
+ if(chartString == null) {
+ config = new Chart("chart", new BasicLineOptions(), theme);
+ return config;
+ }
+
+ switch(chartString) {
+ case "basicBar":
+ config = new Chart("chart", new BasicBarOptions(), theme);
+ break;
+
+ case "splineWithSymbols":
+ config = new Chart("chart", new SplineWithSymbolsOptions(), theme);
+ break;
+
+ case "irregularIntervals":
+ config = new Chart("chart", new TimeDataWithIrregularIntervalsOptions(), theme);
+ break;
+
+ case "logarithmicAxis":
+ config = new Chart("chart", new LogarithmicAxisOptions(), theme);
+ break;
+
+ case "scatter":
+ config = new Chart("chart", new ScatterPlotOptions(), theme);
+ break;
+
+ case "area":
+ config = new Chart("chart", new BasicAreaOptions(), theme);
+ break;
+
+ case "areaWithNegativeValues":
+ config = new Chart("chart", new AreaWithNegativeValuesOptions(), theme);
+ break;
+
+ case "stackedAndGroupedColumn":
+ config = new Chart("chart", new StackedAndGroupedColumnOptions(), theme);
+ break;
+
+ case "combo":
+ config = new Chart("chart", new ComboOptions(), theme);
+ break;
+
+ case "donut":
+ config = new Chart("chart", new DonutOptions(), theme);
+ break;
+
+ case "withDataLabels":
+ config = new Chart("chart", new LineWithDataLabelsOptions(), theme);
+ break;
+
+ case "splineInverted":
+ config = new Chart("chart", new SplineWithInvertedAxisOptions(), theme);
+ break;
+
+ case "splineWithPlotBands":
+ config = new Chart("chart", new SplineWithPlotBandsOptions(), theme);
+ break;
+
+ case "polar":
+ config = new Chart("chart", new PolarOptions(), theme);
+ break;
+
+ case "stackedArea":
+ config = new Chart("chart", new StackedAreaOptions(), theme);
+ break;
+
+ case "percentageArea":
+ config = new Chart("chart", new PercentageAreaOptions(), theme);
+ break;
+
+ case "areaMissing":
+ config = new Chart("chart", new AreaMissingOptions(), theme);
+ break;
+
+ case "areaInverted":
+ config = new Chart("chart", new AreaInvertedAxisOptions(), theme);
+ break;
+
+ case "areaSpline":
+ config = new Chart("chart", new AreaSplineOptions(), theme);
+ break;
+
+ case "areaSplineRange":
+ config = new Chart("chart", new AreaSplineRangeOptions(), theme);
+ break;
+
+ case "columnWithDrilldown":
+ config = new Chart("chart", new ColumnWithDrilldownOptions(), theme);
+ break;
+
+ case "columnRotated":
+ config = new Chart("chart", new ColumnWithRotatedLabelsOptions(), theme);
+ break;
+
+ case "stackedBar":
+ config = new Chart("chart", new StackedBarOptions(), theme);
+ break;
+
+ case "barNegativeStack":
+ config = new Chart("chart", new StackedBarOptions(), theme);
+ break;
+
+ case "basicColumn":
+ config = new Chart("chart", new BasicColumnOptions(), theme);
+ break;
+
+ case "columnWithNegativeValues":
+ config = new Chart("chart", new ColumnWithNegativeValuesOptions(), theme);
+ break;
+
+ case "stackedColumn":
+ config = new Chart("chart", new StackedColumnOptions(), theme);
+ break;
+
+ case "stackedPercentage":
+ config = new Chart("chart", new StackedPercentageOptions(), theme);
+ break;
+
+ case "basicPie":
+ config = new Chart("chart", new BasicPieOptions(), theme);
+ break;
+
+ case "pieWithGradient":
+ config = new Chart("chart", new PieWithGradientOptions(), theme);
+ break;
+
+ case "pieWithLegend":
+ config = new Chart("chart", new PieWithLegendOptions(), theme);
+ break;
+
+ case "bubble":
+ config = new Chart("chart", new BubbleChartOptions(), theme);
+ break;
+
+ case "3dbubble":
+ config = new Chart("chart", new BubbleChart3DOptions(), theme);
+ break;
+
+ case "boxplot":
+ config = new Chart("chart", new BoxplotChartOptions(), theme);
+ break;
+
+ case "angularGauge":
+ config = new Chart("chart", new AngularGaugeOptions(), theme);
+ break;
+
+ case "spiderweb":
+ config = new Chart("chart", new SpiderwebOptions(), theme);
+ break;
+
+ case "windrose":
+ config = new Chart("chart", new WindroseOptions(), theme);
+ break;
+
+ case "columnrange":
+ config = new Chart("chart", new ColumnRangeOptions(), theme);
+ break;
+
+ case "arearange":
+ config = new Chart("chart", new AreaRangeOptions(), theme);
+ break;
+
+ case "clicktoadd":
+ config = new Chart("chart", new ClickToAddAPointOptions(), theme);
+ break;
+
+ case "dualAxes":
+ config = new Chart("chart", new DualAxesOptions(), theme);
+ break;
+
+ case "scatterWithRegression":
+ config = new Chart("chart", new ScatterWithRegressionLineOptions(), theme);
+ break;
+
+ case "multipleAxes":
+ config = new Chart("chart", new MultipleAxesOptions(), theme);
+ break;
+
+ case "errorBar":
+ config = new Chart("chart", new ErrorBarOptions(), theme);
+ break;
+
+ case "funnel":
+ config = new Chart("chart", new FunnelOptions(), theme);
+ break;
+
+ case "pyramid":
+ config = new Chart("chart", new PyramidOptions(), theme);
+ break;
+
+ case "heatmap":
+ config = new Chart("chart", new HeatmapOptions(), theme);
+ break;
+
+ default:
+ config = new Chart("chart", new BasicLineOptions(), theme);
+ break;
+ }
+ return config;
+ }
+
+ private Theme getThemeFromParams(String themeString) {
+ if ("grid".equals(themeString)) {
+ return new GridTheme();
+ } else if ("skies".equals(themeString)) {
+ return new SkiesTheme();
+ } else if ("gray".equals(themeString)) {
+ return new GrayTheme();
+ } else if ("darkblue".equals(themeString)) {
+ return new DarkBlueTheme();
+ } else {
+ // default theme
+ return null;
+ }
+ }
+
+ /**
+ * Used in the renderHead method to highlight the currently
+ * selected theme tab
+ * @return the index of the currently selected theme tab
+ */
+ private int getSelectedTab() {
+ String theme = "default";
+ List pairs = getPageParameters().getAllNamed();
+ theme = pairs.get(0).getValue();
+ if ("grid".equals(theme)) {
+ return 1;
+ } else if ("skies".equals(theme)) {
+ return 2;
+ } else if ("gray".equals(theme)) {
+ return 3;
+ } else if ("darkblue".equals(theme)) {
+ return 4;
+ } else if ("darkgreen".equals(theme)) {
+ return 5;
+ } else {
+ return 0;
+ }
+ }
+
+ /**
+ * Highlights the currently selected theme tab
+ * @param response .
+ */
+ @Override
+ public void renderHead(final IHeaderResponse response) {
+ // select bootstrap tab for current theme selected
+ int selectedTab = this.getSelectedTab();
+ response.renderOnDomReadyJavaScript(("$('#themes li:eq(" + selectedTab + ") a').tab('show');"));
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/NoIDMount.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/NoIDMount.java
new file mode 100644
index 00000000..96ffc68e
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/NoIDMount.java
@@ -0,0 +1,29 @@
+package de.adesso.wickedcharts.showcase;
+
+import org.apache.wicket.request.Url;
+import org.apache.wicket.request.component.IRequestablePage;
+import org.apache.wicket.request.mapper.MountedMapper;
+import org.apache.wicket.request.mapper.info.PageComponentInfo;
+import org.apache.wicket.request.mapper.parameter.PageParametersEncoder;
+import org.apache.wicket.util.string.Strings;
+
+public class NoIDMount extends MountedMapper {
+
+ NoIDMount(String path, Class extends IRequestablePage> pageClass) {
+ super(path, pageClass, new PageParametersEncoder());
+ }
+
+ @Override protected void encodePageComponentInfo(Url url, PageComponentInfo info) {
+ if (info != null) {
+ String s = info.toString();
+ if (!Strings.isEmpty(s)) {
+ try{ //If the resulting parameter is not a number then we add it to the url
+ Integer.parseInt(s);
+ }catch (NumberFormatException e){
+ Url.QueryParameter parameter = new Url.QueryParameter(s, "");
+ url.getQueryParameters().add(parameter);
+ }
+ }
+ }
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseApplication.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseApplication.java
index b874126c..06bf238f 100644
--- a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseApplication.java
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseApplication.java
@@ -14,12 +14,12 @@
*/
package de.adesso.wickedcharts.showcase;
+import de.adesso.wickedcharts.wicket15.JavaScriptResourceRegistry;
import org.apache.wicket.Session;
import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.request.Request;
import org.apache.wicket.request.Response;
-
-import de.adesso.wickedcharts.wicket15.JavaScriptResourceRegistry;
+import org.apache.wicket.request.mapper.MountedMapper;
import org.springframework.stereotype.Component;
@Component
@@ -28,8 +28,8 @@ public class ShowcaseApplication extends WebApplication {
* @see org.apache.wicket.Application#getHomePage()
*/
@Override
- public Class getHomePage() {
- return Homepage.class;
+ public Class getHomePage() {
+ return HomepageChartJs.class;
}
/**
@@ -41,10 +41,11 @@ public void init() {
.init();
JavaScriptResourceRegistry
.getInstance()
- .setJQueryReference("js/jquery-1.8.1.min.js");
+ .setJQueryReference("js/jquery-1.8.3.min-IEfix.js");
+
+ mount(new NoIDMount("/chartjs/${chart}", HomepageChartJs.class));
+ mount(new NoIDMount("/highcharts/${theme}/${chart}", HomepageHighcharts.class));
- mountPage("/start", Homepage.class);
- mountPage("/start/${theme}", Homepage.class);
}
@Override
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseSession.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseSession.java
index 97fb6763..f88719c2 100644
--- a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseSession.java
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseSession.java
@@ -14,11 +14,10 @@
*/
package de.adesso.wickedcharts.showcase;
+import de.adesso.wickedcharts.highcharts.options.Options;
import org.apache.wicket.protocol.http.WebSession;
import org.apache.wicket.request.Request;
-import de.adesso.wickedcharts.highcharts.options.Options;
-
public class ShowcaseSession extends WebSession {
private static final long serialVersionUID = 1L;
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.html b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.html
new file mode 100644
index 00000000..e8a1a330
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.html
@@ -0,0 +1,22 @@
+
+
+
+
+
panel
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.java
new file mode 100644
index 00000000..8b2ea830
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.java
@@ -0,0 +1,14 @@
+package de.adesso.wickedcharts.showcase;
+
+import de.adesso.wickedcharts.wicket15.chartjs.Chart;
+
+/**
+ * Wicket-component that adds the chart configuration and a smaller markup to the page.
+ */
+public class SmallChartComponent extends ChartComponent {
+
+ public SmallChartComponent(Chart chart)
+ {
+ super(chart);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/StringFromResourceModel.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/StringFromResourceModel.java
index b1432419..6fb81f90 100644
--- a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/StringFromResourceModel.java
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/StringFromResourceModel.java
@@ -14,14 +14,14 @@
*/
package de.adesso.wickedcharts.showcase;
+import org.apache.commons.io.IOUtils;
+import org.apache.wicket.model.IModel;
+
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
-import org.apache.commons.io.IOUtils;
-import org.apache.wicket.model.IModel;
-
public class StringFromResourceModel implements IModel {
private static final long serialVersionUID = 1L;
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartEndConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartEndConfiguration.java
new file mode 100644
index 00000000..bfcd00db
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartEndConfiguration.java
@@ -0,0 +1,65 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how the 'end' fill option works
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/line-boundaries.html
+ *
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class AreaLineBoundariesChartEndConfiguration extends ShowcaseConfiguration {
+ public AreaLineBoundariesChartEndConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(-40, 20, 30, -70, 12, 60, -30))
+ .setFill(BoundaryFillingMode.END);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setMaintainAspectRatio(true)
+ .setSpanGaps(false)
+ .setElements(new Element()
+ .setLine(new Line()
+ .setTension(0.000001)))
+ .setPlugins(new Plugins().
+ setFiller(new Filler().
+ setPropagate(false)))
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Boundaries Chart - End"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month"))
+ .setTicks(new Ticks()
+ .setAutoSkip(false)
+ .setMaxRotation(0))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartFalseConfiguration.java
new file mode 100644
index 00000000..0ac5393a
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartFalseConfiguration.java
@@ -0,0 +1,63 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how the 'false' fill option works
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/line-boundaries.html
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class AreaLineBoundariesChartFalseConfiguration extends ShowcaseConfiguration {
+ public AreaLineBoundariesChartFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(-40, 20, 30, -70, 12, 60, -30))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setMaintainAspectRatio(true)
+ .setSpanGaps(false)
+ .setElements(new Element()
+ .setLine(new Line()
+ .setTension(0.000001)))
+ .setPlugins(new Plugins().
+ setFiller(new Filler().
+ setPropagate(false)))
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Boundaries Chart - False"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month"))
+ .setTicks(new Ticks()
+ .setAutoSkip(false)
+ .setMaxRotation(0))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartOriginConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartOriginConfiguration.java
new file mode 100644
index 00000000..7bca9aeb
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartOriginConfiguration.java
@@ -0,0 +1,65 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how the 'origin' fill option works
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/line-boundaries.html
+ *
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class AreaLineBoundariesChartOriginConfiguration extends ShowcaseConfiguration {
+ public AreaLineBoundariesChartOriginConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(-40, 20, 30, -70, 12, 60, -30))
+ .setFill(BoundaryFillingMode.ORIGIN);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setMaintainAspectRatio(true)
+ .setSpanGaps(false)
+ .setElements(new Element()
+ .setLine(new Line()
+ .setTension(0.000001)))
+ .setPlugins(new Plugins().
+ setFiller(new Filler().
+ setPropagate(false)))
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Boundaries Chart - Origin"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month"))
+ .setTicks(new Ticks()
+ .setAutoSkip(false)
+ .setMaxRotation(0))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartStartConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartStartConfiguration.java
new file mode 100644
index 00000000..8905576a
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartStartConfiguration.java
@@ -0,0 +1,65 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how the 'start' fill option works
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/line-boundaries.html
+ *
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class AreaLineBoundariesChartStartConfiguration extends ShowcaseConfiguration {
+ public AreaLineBoundariesChartStartConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(-40, 20, 30, -70, 12, 60, -30))
+ .setFill(BoundaryFillingMode.START);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setMaintainAspectRatio(true)
+ .setSpanGaps(false)
+ .setElements(new Element()
+ .setLine(new Line()
+ .setTension(0.000001)))
+ .setPlugins(new Plugins().
+ setFiller(new Filler().
+ setPropagate(false)))
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Boundaries Chart - Start"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month"))
+ .setTicks(new Ticks()
+ .setAutoSkip(false)
+ .setMaxRotation(0))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartHorizontalConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartHorizontalConfiguration.java
new file mode 100644
index 00000000..7178325e
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartHorizontalConfiguration.java
@@ -0,0 +1,65 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * A sample that shows how a horizontal bar chart configuration looks.
+ */
+
+/**
+ *
+ * A sample that shows how a horizontal bar chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/bar/horizontal.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class BarChartHorizontalConfiguration extends ShowcaseConfiguration {
+ public BarChartHorizontalConfiguration() {
+ super();
+ setType(ChartType.HORIZONTAL_BAR);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setElements(new Rectangle())
+ .setLegend(new Legend()
+ .setPosition(Position.RIGHT))
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Horizontal Bar Chart"))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartMultiAxisConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartMultiAxisConfiguration.java
new file mode 100644
index 00000000..1573712e
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartMultiAxisConfiguration.java
@@ -0,0 +1,80 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * A sample that shows how a multi-axis bar chart configuration looks.
+ */
+
+/**
+ *
+ * A sample that shows how a multi-axis bar chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/bar/multi-axis.html
+ *
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class BarChartMultiAxisConfiguration extends ShowcaseConfiguration{
+ public BarChartMultiAxisConfiguration() {
+ setType(ChartType.BAR);
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setYAxisID("y-axis-1");
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setYAxisID("y-axis-2");
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Bar Chart - Multi Axis"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setScales(new Scales()
+ .setYAxes(Arrays.asList(new AxesScale()
+ .setType("linear")
+ .setDisplay(true)
+ .setPosition(Position.LEFT)
+ .setId("y-axis-1"),
+ new AxesScale()
+ .setType("linear")
+ .setDisplay(true)
+ .setPosition(Position.RIGHT)
+ .setId("y-axis-2")
+ .setGridLines(new GridLines()
+ .setDrawOnChartArea(false)))))
+
+ ;
+ setOptions(options);
+
+ }
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedConfiguration.java
new file mode 100644
index 00000000..20a05db5
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedConfiguration.java
@@ -0,0 +1,88 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * A sample that shows how a stacked bar chart configuration looks.
+ */
+
+/**
+ *
+ * A sample that shows how a stack bar chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/bar/stacked.html
+ *
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class BarChartStackedConfiguration extends ShowcaseConfiguration {
+ public BarChartStackedConfiguration() {
+ setType(ChartType.STACKED_BAR);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setStack("1");
+
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setStack("1");
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("Dataset 3")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setStack("1");
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2, dataset3));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Bar Chart - Stacked"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setStacked(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setStacked(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedGroupConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedGroupConfiguration.java
new file mode 100644
index 00000000..cd1cea4f
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedGroupConfiguration.java
@@ -0,0 +1,86 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * A sample that shows how a stacked group bar chart configuration looks.
+ */
+
+/**
+ *
+ * A sample that shows how a stacked bar chart group configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/bar/stacked-group.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class BarChartStackedGroupConfiguration extends ShowcaseConfiguration {
+ public BarChartStackedGroupConfiguration() {
+ setType(ChartType.STACKED_BAR);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setStack("0");
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setStack("0");
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("Dataset 3")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setStack("1");
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2, dataset3));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Bar Chart - Stacked Groups"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setStacked(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setStacked(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartVerticalConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartVerticalConfiguration.java
new file mode 100644
index 00000000..c0275a09
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartVerticalConfiguration.java
@@ -0,0 +1,61 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * A sample that shows how a vertical bar chart configuration looks.
+ */
+
+/**
+ *
+ * A sample that shows how a vertical bar chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/bar/vertical.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class BarChartVerticalConfiguration extends ShowcaseConfiguration {
+ public BarChartVerticalConfiguration() {
+ super();
+ setType(ChartType.BAR);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Bar Chart"))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/BubbleChartConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/BubbleChartConfiguration.java
new file mode 100644
index 00000000..ba8c44d3
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/BubbleChartConfiguration.java
@@ -0,0 +1,103 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.BubbleValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+import java.util.Random;
+
+/**
+ *
+ * A sample that shows how a bubble chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/scriptable/bubble.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class BubbleChartConfiguration extends ShowcaseConfiguration {
+ public BubbleChartConfiguration() {
+ super();
+ setType(ChartType.BUBBLE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.YELLOW)
+ .setHoverBackgroundColor(SimpleColor.WHITE)
+ .setHoverBorderColor(SimpleColor.RED)
+ .setHoverBorderWidth(10.0)
+ .setData(Arrays.asList(
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100))
+ ))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setHoverBackgroundColor(SimpleColor.WHITE)
+ .setHoverBorderColor(SimpleColor.RED)
+ .setHoverBorderWidth(10.0)
+ .setData(Arrays.asList(
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100))
+ ))
+ .setFill(false);
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("My Third dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.YELLOW)
+ .setHoverBackgroundColor(SimpleColor.WHITE)
+ .setHoverBorderColor(SimpleColor.RED)
+ .setHoverBorderWidth(10.0)
+ .setData(Arrays.asList(
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100))
+ ))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2,dataset3));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setAspectRatio((double)1)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Bubble Chart"))
+ ;
+ setOptions(options);
+
+
+ }
+
+ private Double randomDouble(int bound) {
+ Random random = new Random();
+ return (double)random.nextInt(bound)+1;
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/ComboBarLineChartConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/ComboBarLineChartConfiguration.java
new file mode 100644
index 00000000..02987aff
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/ComboBarLineChartConfiguration.java
@@ -0,0 +1,64 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+
+/**
+ *
+ * A sample that shows how a combo bar-line chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/combo-bar-line.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class ComboBarLineChartConfiguration extends ShowcaseConfiguration {
+ public ComboBarLineChartConfiguration() {
+ super();
+ setType(ChartType.BAR);
+ Data data = new Data();
+ Dataset dataset1 = new Dataset();
+ dataset1.setType(ChartType.LINE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderWidth(2)
+ .setFill(false)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setLabel("Dataset 1");
+
+ Dataset dataset2 = new Dataset()
+ .setType(ChartType.BAR)
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.WHITE)
+ .setBorderWidth(2)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setLabel("Dataset 2");
+
+ Dataset dataset3 = new Dataset()
+ .setType(ChartType.BAR)
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setLabel("Dataset 3");
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2,dataset3))
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+
+ setData(data);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Combo Bar Line Chart"))
+ .setTooltips(new Tooltips()
+ .setIntersect(true)
+ .setMode(TooltipMode.INDEX));
+ setOptions(options);
+
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/DataLabellingChartConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/DataLabellingChartConfiguration.java
new file mode 100644
index 00000000..9e2d6573
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/DataLabellingChartConfiguration.java
@@ -0,0 +1,71 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+
+/**
+ *
+ * A sample that shows how a combo bar-line chart configuration with data labelling.
+ *
+ * @see http://www.chartjs.org/samples/latest/advanced/data-labelling.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class DataLabellingChartConfiguration extends ShowcaseConfiguration {
+ public DataLabellingChartConfiguration() {
+ super();
+ setType(ChartType.BAR);
+ String optionalJavascript=readFile("de/adesso/wickedcharts/showcase/dataLabellingPlugin.js");
+
+ setOptionalJavascript(new ArrayList<>());
+ addOptionalJavascript(optionalJavascript);
+
+ Data data = new Data();
+ Dataset dataset1 = new Dataset();
+ dataset1.setType(ChartType.LINE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderWidth(2)
+ .setFill(false)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setLabel("Dataset 1");
+
+ Dataset dataset2 = new Dataset()
+ .setType(ChartType.BAR)
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.WHITE)
+ .setBorderWidth(2)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setLabel("Dataset 2");
+
+ Dataset dataset3 = new Dataset()
+ .setType(ChartType.BAR)
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setLabel("Dataset 3");
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2,dataset3))
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+
+ setData(data);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Combo Bar Line Chart"))
+ .setTooltips(new Tooltips()
+ .setIntersect(true)
+ .setMode(TooltipMode.INDEX));
+ setOptions(options);
+
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/DoughnutChartConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/DoughnutChartConfiguration.java
new file mode 100644
index 00000000..71103554
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/DoughnutChartConfiguration.java
@@ -0,0 +1,50 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a doughnut configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/doughnut.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class DoughnutChartConfiguration extends ShowcaseConfiguration {
+ public DoughnutChartConfiguration() {
+ super();
+ setType(ChartType.DOUGHNUT);
+
+ Data data = new Data();
+
+ Dataset dataset = new Dataset()
+ .setData(IntegerValue.of(randomIntegerList(5)))
+ .setBackgroundColor(
+ Arrays.asList(SimpleColor.RED,SimpleColor.ORANGE, SimpleColor.YELLOW, SimpleColor.GREEN, SimpleColor.BLUE))
+ .setLabel("Dataset 1");
+
+ data.setDatasets(Arrays.asList(dataset)).setLabels(TextLabel.of("Red", "Orange", "Yellow", "Green", "Blue"));
+
+ setData(data);
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("ChartJs Doughnut Chart"))
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setAnimation(new Animation()
+ .setAnimateScale(true)
+ .setAnimateRotate(true));
+ setOptions(options);
+
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/FilteringLabelsConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/FilteringLabelsConfiguration.java
new file mode 100644
index 00000000..bc7a4aa4
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/FilteringLabelsConfiguration.java
@@ -0,0 +1,68 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a chart with label filtering is configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/filtering-labels.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class FilteringLabelsConfiguration extends ShowcaseConfiguration {
+ public FilteringLabelsConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart - X-Axis Filter"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month"))
+ .setTicks(new Ticks()
+ .setCallback(
+ new CallbackFunction("function(dataLabel, index) {\r\n" +
+ " // Hide the label of every 2nd dataset. return null to hide the grid line too\r\n" +
+ " return index % 2 === 0 ? dataLabel : '';}"))))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setBeginAtZero(true)))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LegendPointStyleConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LegendPointStyleConfiguration.java
new file mode 100644
index 00000000..14938151
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LegendPointStyleConfiguration.java
@@ -0,0 +1,71 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how different point style configurations look.
+ *
+ * @see http://www.chartjs.org/samples/latest/legend/point-style.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LegendPointStyleConfiguration extends ShowcaseConfiguration {
+ public LegendPointStyleConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setPointStyle(PointStyle.RECT_ROT)
+ .setPointRadius(10)
+ .setData(IntegerValue.of(-40, 20, 30, -70, 12, 60, -30))
+ .setFill(BoundaryFillingMode.ORIGIN);
+
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Point Style Legend"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setLegend(new Legend()
+ .setLabels(new LegendLabel()
+ .setUsePointStyle(true)))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartAreaDatasetConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartAreaDatasetConfiguration.java
new file mode 100644
index 00000000..af88eb23
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartAreaDatasetConfiguration.java
@@ -0,0 +1,143 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.AbsoluteIndex;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.RelativeIndex;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a chart with different datasets can be configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/line-datasets.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartAreaDatasetConfiguration extends ShowcaseConfiguration {
+ public LineChartAreaDatasetConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset0 = new Dataset()
+ .setLabel("D0 (hidden), Fill: undefined")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(BoundaryFillingMode.UNDEFINED)
+ .setHidden(true);
+
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("D1 Fill: -1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(new RelativeIndex("-1"));
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("D2 (hidden) Fill: 1")
+ .setBackgroundColor(SimpleColor.ORANGE_TRANSPARENT)
+ .setBorderColor(SimpleColor.ORANGE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setHidden(true)
+ .setFill(new AbsoluteIndex(1));
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("D3 Fill: -1")
+ .setBackgroundColor(SimpleColor.YELLOW_TRANSPARENT)
+ .setBorderColor(SimpleColor.YELLOW)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset4 = new Dataset()
+ .setLabel("D4 Fill: -1")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(new RelativeIndex("-1"));
+
+ Dataset dataset5 = new Dataset()
+ .setLabel("D5 Fill: +2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(new RelativeIndex("+2"));
+
+
+ Dataset dataset6 = new Dataset()
+ .setLabel("D6 Fill: false")
+ .setBackgroundColor(SimpleColor.GREY_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREY)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ Dataset dataset7 = new Dataset()
+ .setLabel("D7 Fill: 8")
+ .setBackgroundColor(SimpleColor.PURPLE_TRANSPARENT)
+ .setBorderColor(SimpleColor.PURPLE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(new AbsoluteIndex(8));
+
+
+ Dataset dataset8 = new Dataset()
+ .setLabel("D8 (hidden) Fill: end")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setHidden(true)
+ .setFill(BoundaryFillingMode.END);
+
+ data.setDatasets(Arrays.asList(dataset0, dataset1, dataset2, dataset3, dataset4,
+ dataset5, dataset6, dataset7, dataset8));
+
+ Options options = new Options()
+ .setMaintainAspectRatio(true)
+ .setSpanGaps(false)
+ .setElements(new Element()
+ .setLine(new Line()
+ .setTension(0.000001)))
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Dataset Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setPlugins(new Plugins()
+ .setFiller(new Filler()
+ .setPropagate(false))
+ .setSamples_filler_analyzer(new SamplesFillerAnalyzer()
+ .setTarget("chart-analyzer")))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setStacked(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartBasicConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartBasicConfiguration.java
new file mode 100644
index 00000000..49e6c1af
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartBasicConfiguration.java
@@ -0,0 +1,72 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample of a basic line chart configuration.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/basic.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LineChartBasicConfiguration extends ShowcaseConfiguration {
+ public LineChartBasicConfiguration() {
+
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartInterpolatedConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartInterpolatedConfiguration.java
new file mode 100644
index 00000000..5b51dafd
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartInterpolatedConfiguration.java
@@ -0,0 +1,84 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ *
+ * A sample that shows how configuring interpolation of lines in a line chart is configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/interpolation-modes.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartInterpolatedConfiguration extends ShowcaseConfiguration {
+ public LineChartInterpolatedConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ List datasetsData = IntegerValue.of(randomIntegerList(7));
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Cubic interpolation (monotone)")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(datasetsData)
+ .setFill(false)
+ .setCubicInterpolationMode(CubicInterpolationMode.MONOTONE);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Cubic interpolation (default)")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(datasetsData)
+ .setFill(false);
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("Linear interpolation")
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(datasetsData)
+ .setFill(false)
+ .setLineTension(0);
+
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2, dataset3));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart Interpolation"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartMultiAxisConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartMultiAxisConfiguration.java
new file mode 100644
index 00000000..fe82651a
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartMultiAxisConfiguration.java
@@ -0,0 +1,76 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how multiple axes in a line chart are configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/multi-axis.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartMultiAxisConfiguration extends ShowcaseConfiguration{
+ public LineChartMultiAxisConfiguration() {
+ setType(ChartType.LINE);
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setYAxisID("y-axis-1");
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setYAxisID("y-axis-2");
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart - Multi Axis"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setScales(new Scales()
+ .setYAxes(Arrays.asList(new AxesScale()
+ .setType("linear")
+ .setDisplay(true)
+ .setPosition(Position.LEFT)
+ .setId("y-axis-1"),
+ new AxesScale()
+ .setType("linear")
+ .setDisplay(true)
+ .setPosition(Position.RIGHT)
+ .setId("y-axis-2")
+ .setGridLines(new GridLines()
+ .setDrawOnChartArea(false)))))
+
+ ;
+ setOptions(options);
+
+ }
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartProgressBarConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartProgressBarConfiguration.java
new file mode 100644
index 00000000..cf6f940d
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartProgressBarConfiguration.java
@@ -0,0 +1,95 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import org.apache.wicket.markup.html.panel.Fragment;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a line chart with a progress bar is configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/advanced/progress-bar.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartProgressBarConfiguration extends ShowcaseConfiguration {
+ public LineChartProgressBarConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ String optionalJavascript= readFile("de/adesso/wickedcharts/showcase/progressBar.js");
+
+ setOptionalJavascript(new ArrayList());
+ addOptionalJavascript(optionalJavascript);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart Progress Bar"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setAnimation(new Animation()
+ .setDuration(2000)
+ .setOnProgress(new CallbackFunction("function(animation) {\r\n" +
+ " progress.value = animation.currentStep / animation.numSteps;\r\n" +
+ " }"))
+ .setOnComplete(new CallbackFunction("function(animation) {\r\n" +
+ " window.setTimeout(function() {\r\n" +
+ " progress.value = 0;\r\n" +
+ " }, 2000);\r\n" +
+ " }")))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+
+ @Override
+ public void modfiyIndividualMarkup(Fragment optionalMarkup) {
+ Fragment frag = new Fragment("optionalMarkup","progressBar",optionalMarkup.getParent());
+ optionalMarkup.replaceWith(frag);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartStackedConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartStackedConfiguration.java
new file mode 100644
index 00000000..383c7a06
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartStackedConfiguration.java
@@ -0,0 +1,77 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a stacked line chart is configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/line-stacked.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartStackedConfiguration extends ShowcaseConfiguration{
+ public LineChartStackedConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("My Third dataset")
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2, dataset3));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Stacked Line Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setStacked(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedAfterConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedAfterConfiguration.java
new file mode 100644
index 00000000..cc3da325
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedAfterConfiguration.java
@@ -0,0 +1,66 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a stepped line chart configuration looks with stepped = after.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/stepped.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartSteppedAfterConfiguration extends ShowcaseConfiguration {
+ public LineChartSteppedAfterConfiguration() {
+ super();
+ setType(ChartType.LINE);
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Stepped After")
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setSteppedLine(SteppedLineValue.AFTER);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart Stepped - After"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedBeforeConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedBeforeConfiguration.java
new file mode 100644
index 00000000..4cfde004
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedBeforeConfiguration.java
@@ -0,0 +1,65 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a stepped line chart configuration looks with stepped = before.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/stepped.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartSteppedBeforeConfiguration extends ShowcaseConfiguration {
+ public LineChartSteppedBeforeConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Stepped Before")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setSteppedLine(SteppedLineValue.BEFORE);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart Stepped - Before"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartWithDifferentPointSizesConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartWithDifferentPointSizesConfiguration.java
new file mode 100644
index 00000000..205fbf11
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartWithDifferentPointSizesConfiguration.java
@@ -0,0 +1,94 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+import java.util.Collections;
+
+/**
+ *
+ * A sample that shows how a line chart can be configured to have different point sizes.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/point-sizes.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartWithDifferentPointSizesConfiguration extends ShowcaseConfiguration {
+ public LineChartWithDifferentPointSizesConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("dataset - big points")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setPointRadius(Collections.nCopies(7, 15))
+ .setPointHoverRadius(10)
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("dataset - individual point sizes")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderDash(Arrays.asList("5", "5"))
+ .setPointRadius(Arrays.asList(2, 4, 6, 18, 0, 12, 20))
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("dataset - large pointHoverRadius")
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setPointHoverRadius(30)
+ .setFill(false);
+
+
+ Dataset dataset4 = new Dataset()
+ .setLabel("dataset - large pointHitRadius")
+ .setBackgroundColor(SimpleColor.YELLOW)
+ .setBorderColor(SimpleColor.YELLOW)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setPointHitRadius(20)
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2,dataset3, dataset4));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart with Different Point Sizes"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineStylesConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineStylesConfiguration.java
new file mode 100644
index 00000000..0862c977
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineStylesConfiguration.java
@@ -0,0 +1,80 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how different line styles can be configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/line-styles.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineStylesConfiguration extends ShowcaseConfiguration {
+ public LineStylesConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Filled")
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Unfilled")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("Dashed")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderDash(Arrays.asList("5", "5"))
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2,dataset3));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Styles"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LinearStepSizeConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LinearStepSizeConfiguration.java
new file mode 100644
index 00000000..84f1afb3
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LinearStepSizeConfiguration.java
@@ -0,0 +1,75 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a line chart with linear step size is configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/linear/step-size.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LinearStepSizeConfiguration extends ShowcaseConfiguration {
+ public LinearStepSizeConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))
+ .setTicks(new Ticks()
+ .setMin(0)
+ .setMax(100)
+ .setStepSize(5))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicLineChartConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicLineChartConfiguration.java
new file mode 100644
index 00000000..0924670d
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicLineChartConfiguration.java
@@ -0,0 +1,72 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a logarithmic line chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/logarithmic/line.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LogarithmicLineChartConfiguration extends ShowcaseConfiguration {
+ public LogarithmicLineChartConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Logarithmic Line Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setType("logarithmic")
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicScatterChartConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicScatterChartConfiguration.java
new file mode 100644
index 00000000..db5c6709
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicScatterChartConfiguration.java
@@ -0,0 +1,85 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.PointValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * A sample that shows how a logarithmic scatter chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/logarithmic/scatter.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LogarithmicScatterChartConfiguration extends ShowcaseConfiguration {
+ public LogarithmicScatterChartConfiguration() {
+ super();
+ setType(ChartType.SCATTER);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(Arrays.asList(
+ new PointValue(4,14),
+ new PointValue(40,42),
+ new PointValue(23,42),
+ new PointValue(40,22),
+ new PointValue(80,12),
+ new PointValue(30,32)))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(Arrays.asList(
+ new PointValue(7,56),
+ new PointValue(15,54),
+ new PointValue(46,34),
+ new PointValue(36,42),
+ new PointValue(78,64),
+ new PointValue(12,48)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Logarithmic Scatter Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setType("logarithmic")
+ .setPosition(Position.BOTTOM)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Frequency")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setType("linear")
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Voltage"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxConfiguration.java
new file mode 100644
index 00000000..2d826156
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxConfiguration.java
@@ -0,0 +1,60 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+
+/**
+ *
+ * A sample that shows how to configure min and max Ticks in the chart options.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/linear/min-max.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class MinMaxConfiguration extends ShowcaseConfiguration {
+ public MinMaxConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(Arrays.asList(10, 30, 39, 20, 25, 34, -10)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(Arrays.asList(100, 33, 22, 19, 11, 49, 30)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Min and Max"))
+ .setScales(new Scales()
+ .setYAxes(new AxesScale()
+ .setTicks(new Ticks()
+ .setMin(10)
+ .setMax(50))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxSuggestedConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxSuggestedConfiguration.java
new file mode 100644
index 00000000..b83ce23d
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxSuggestedConfiguration.java
@@ -0,0 +1,60 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+
+/**
+ *
+ * A sample that shows how to configure suggestedMin and suggestedMax Ticks in the chart options.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/linear/min-max-suggested.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class MinMaxSuggestedConfiguration extends ShowcaseConfiguration {
+ public MinMaxSuggestedConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(Arrays.asList(10, 30, 50, 20, 25, 44, -10)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(Arrays.asList(18, 33, 22, 19, 11, 39, 30)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Min and Max - Suggested"))
+ .setScales(new Scales()
+ .setYAxes(new AxesScale()
+ .setTicks(new Ticks()
+ .setSuggestedMin(10)
+ .setSuggestedMax(50))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/MultilineLabelsConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/MultilineLabelsConfiguration.java
new file mode 100644
index 00000000..85e23292
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/MultilineLabelsConfiguration.java
@@ -0,0 +1,69 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextListLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+
+/**
+ *
+ * A sample that shows how to configure multiline labels.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/multiline-labels.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class MultilineLabelsConfiguration extends ShowcaseConfiguration {
+
+ public MultilineLabelsConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(Arrays.asList(
+ new TextListLabel("June","2015"),
+ new TextLabel("July"),
+ new TextLabel("August"),
+ new TextLabel("September"),
+ new TextLabel("October"),
+ new TextLabel("November"),
+ new TextLabel("December"),
+ new TextListLabel("January","2016"),
+ new TextLabel("February"),
+ new TextLabel("March"),
+ new TextLabel("April"),
+ new TextLabel("May")
+ ));
+
+ Dataset dataset1 = new Dataset()
+ .setData(IntegerValue.of(randomIntegerList(12)))
+ .setLabel("My First dataset")
+ .setFill(false)
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED);
+
+ Dataset dataset2 = new Dataset()
+ .setData(IntegerValue.of(randomIntegerList(12)))
+ .setLabel("My Second dataset")
+ .setFill(false)
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ setData(data);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart with Multiline Labels"));
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/NonNumericConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/NonNumericConfiguration.java
new file mode 100644
index 00000000..a6f3c0e7
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/NonNumericConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.ConstLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.ConstValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+
+/**
+ *
+ * A sample that shows how to configure non-numeric values in a chart.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/non-numeric-y.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class NonNumericConfiguration extends ShowcaseConfiguration {
+
+ public NonNumericConfiguration() {
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setXLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"))
+ .setYLabels(ConstLabel.of("", "Request Added", "Request Viewed", "Request Accepted", "Request Solved", "Solving Confirmed"))
+ ;
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First Dataset")
+ .setFill(false)
+ .setBorderColor(SimpleColor.RED)
+ .setBackgroundColor(SimpleColor.RED)
+ .setData(ConstValue.of("", "Request Added", "Request Added", "Request Added", "Request Viewed", "Request Viewed", "Request Viewed"))
+ ;
+ data.setDatasets(Arrays.asList(dataset1));
+ setData(data);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart with Non Numeric Y Axis"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setType("category")
+ .setPosition(Position.LEFT)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Request State"))
+ .setTicks(new Ticks()
+ .setReverse(true))))
+ ;
+ setOptions(options);
+
+
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/OtherRadarChartConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/OtherRadarChartConfiguration.java
new file mode 100644
index 00000000..19e7d5ec
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/OtherRadarChartConfiguration.java
@@ -0,0 +1,65 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextListLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that displays different datasets on a radar.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/radar.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class OtherRadarChartConfiguration extends ShowcaseConfiguration {
+ public OtherRadarChartConfiguration() {
+ super();
+ setType(ChartType.RADAR);
+
+ Data data = new Data()
+ .setLabels(Arrays.asList(
+ new TextListLabel("Eating", "Dinner"),
+ new TextListLabel("Drining", "Water"),
+ new TextLabel("Sleeping"),
+ new TextListLabel("Designing","Graphics"),
+ new TextLabel("Coding"),
+ new TextLabel("Cycling"),
+ new TextLabel("Running")
+ ));
+ setData(data);
+
+ Dataset dataset0 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setPointBackgroundColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My second dataset")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setPointBackgroundColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ data.setDatasets(Arrays.asList(dataset0, dataset1));
+
+ Options options = new Options()
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Radar Chart"))
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setScale(new Scale()
+ .setTicks(new Ticks()
+ .setBeginAtZero(true)));
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/PieChartConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/PieChartConfiguration.java
new file mode 100644
index 00000000..9301accc
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/PieChartConfiguration.java
@@ -0,0 +1,44 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
+import de.adesso.wickedcharts.chartjs.chartoptions.Data;
+import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
+import de.adesso.wickedcharts.chartjs.chartoptions.Options;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that displays a dataset as a pie chart.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/pie.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class PieChartConfiguration extends ShowcaseConfiguration {
+ public PieChartConfiguration() {
+ super();
+ setType(ChartType.PIE);
+
+ Data data = new Data();
+
+ Dataset dataset = new Dataset()
+ .setData(IntegerValue.of(randomIntegerList(5)))
+ .setBackgroundColor(
+ Arrays.asList(SimpleColor.RED,SimpleColor.ORANGE, SimpleColor.YELLOW, SimpleColor.GREEN, SimpleColor.BLUE))
+ .setLabel("Dataset 1");
+
+ data.setDatasets(Arrays.asList(dataset)).setLabels(TextLabel.of("Red", "Orange", "Yellow", "Green", "Blue"));
+
+ setData(data);
+ Options options = new Options()
+ .setResponsive(true);
+ setOptions(options);
+
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/PointStylesConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/PointStylesConfiguration.java
new file mode 100644
index 00000000..47e62fc4
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/PointStylesConfiguration.java
@@ -0,0 +1,182 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that supports different point styles:
+ * 'circle',
+ * 'triangle',
+ * 'rect',
+ * 'rectRounded',
+ * 'rectRot',
+ * 'cross',
+ * 'crossRot',
+ * 'star',
+ * 'line',
+ * 'dash'
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/point-styles.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class PointStylesConfiguration extends ShowcaseConfiguration {
+ public PointStylesConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dash")
+ .setBackgroundColor(SimpleColor.GREY)
+ .setBorderColor(SimpleColor.GREY)
+ .setData(IntegerValue.of(Arrays.asList(1,1,1,1,1,1,1)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.DASH)
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Star")
+ .setBackgroundColor(SimpleColor.PURPLE)
+ .setBorderColor(SimpleColor.PURPLE)
+ .setData(IntegerValue.of(Arrays.asList(2,2,2,2,2,2,2)))
+ .setShowLine(false)
+ .setPointRadius(20)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.STAR)
+ .setFill(false);
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("Rectangle")
+ .setBackgroundColor(SimpleColor.YELLOW)
+ .setBorderColor(SimpleColor.YELLOW)
+ .setData(IntegerValue.of(Arrays.asList(3,3,3,3,3,3,3)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.RECT)
+ .setFill(false);
+
+ Dataset dataset4 = new Dataset()
+ .setLabel("Triangle")
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(Arrays.asList(4,4,4,4,4,4,4)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.TRIANGLE)
+ .setFill(false);
+
+ Dataset dataset5 = new Dataset()
+ .setLabel("Circle")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(Arrays.asList(5,5,5,5,5,5,5)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.CIRCLE)
+ .setFill(false);
+
+ Dataset dataset6 = new Dataset()
+ .setLabel("CrossRot")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(Arrays.asList(6,6,6,6,6,6,6)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.CROSS_ROT)
+ .setFill(false);
+
+ Dataset dataset7 = new Dataset()
+ .setLabel("Line")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED_TRANSPARENT)
+ .setData(IntegerValue.of(Arrays.asList(7,7,7,7,7,7,7)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.LINE)
+ .setFill(false);
+
+ Dataset dataset8 = new Dataset()
+ .setLabel("Cross")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE_TRANSPARENT)
+ .setData(IntegerValue.of(Arrays.asList(8,8,8,8,8,8,8)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.CROSS)
+ .setFill(false);
+
+ Dataset dataset9 = new Dataset()
+ .setLabel("Rectangle Rounded")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(Arrays.asList(9,9,9,9,9,9,9)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.RECT_ROUNDED)
+ .setFill(false);
+
+ Dataset dataset10 = new Dataset()
+ .setLabel("Rectangle Rotated")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN_TRANSPARENT)
+ .setData(IntegerValue.of(Arrays.asList(11,11,11,11,11,11,11)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.RECT_ROT)
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1, dataset2, dataset3, dataset4, dataset5, dataset6,
+ dataset7, dataset8, dataset9, dataset10));
+
+ //Point Style Can also be set in the options using the Elements option
+ //But you can only have one point style for all datasets
+
+ //Some Point Styles are drawn incorrectly
+ //See this issue: https://github.com/chartjs/Chart.js/issues/2607
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Point Styles"))
+ .setLegend(new Legend()
+ .setPosition(Position.RIGHT))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))
+ .setTicks(new Ticks()
+ .setMax(13)
+ .setMin(0))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/PolarAreaChartConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/PolarAreaChartConfiguration.java
new file mode 100644
index 00000000..03d581f6
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/PolarAreaChartConfiguration.java
@@ -0,0 +1,55 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that distributes data in a polar area chart.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/polar-area.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class PolarAreaChartConfiguration extends ShowcaseConfiguration {
+ public PolarAreaChartConfiguration() {
+ super();
+ setType(ChartType.POLAR_AREA);
+
+ Data data = new Data();
+
+ Dataset dataset = new Dataset()
+ .setData(IntegerValue.of(randomIntegerList(5)))
+ .setBackgroundColor(
+ Arrays.asList(SimpleColor.RED_TRANSPARENT,SimpleColor.ORANGE_TRANSPARENT,
+ SimpleColor.YELLOW_TRANSPARENT, SimpleColor.GREEN_TRANSPARENT,
+ SimpleColor.BLUE_TRANSPARENT))
+ .setLabel("Dataset 1");
+
+ data.setDatasets(Arrays.asList(dataset)).setLabels(TextLabel.of("Red", "Orange", "Yellow", "Green", "Blue"));
+
+ setData(data);
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("ChartJs Polar Area Chart"))
+ .setLegend(new Legend()
+ .setPosition(Position.RIGHT))
+ .setScale(new Scale()
+ .setTicks(new Ticks()
+ .setBeginAtZero(true))
+ .setReverse(false))
+ .setAnimation(new Animation()
+ .setAnimateScale(true)
+ .setAnimateRotate(false));
+ setOptions(options);
+
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/RadarChartConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/RadarChartConfiguration.java
new file mode 100644
index 00000000..be74b50d
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/RadarChartConfiguration.java
@@ -0,0 +1,98 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.AbsoluteIndex;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.RelativeIndex;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that displays different datasets on a radar.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/radar.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class RadarChartConfiguration extends ShowcaseConfiguration {
+ public RadarChartConfiguration() {
+ super();
+ setType(ChartType.RADAR);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset0 = new Dataset()
+ .setLabel("D0")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(Arrays.asList(1, 2, 3, 1, 2, 1, 2)))
+ .setFill(BoundaryFillingMode.UNDEFINED);
+
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("D1 (hidden) Fill: -1")
+ .setBackgroundColor(SimpleColor.ORANGE_TRANSPARENT)
+ .setBorderColor(SimpleColor.ORANGE)
+ .setData(IntegerValue.of(Arrays.asList(5, 4, 3, 5, 4, 3, 5)))
+ .setHidden(true)
+ .setFill(new RelativeIndex("-1"));
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("D2 Fill: 1")
+ .setBackgroundColor(SimpleColor.YELLOW)
+ .setBorderColor(SimpleColor.YELLOW_TRANSPARENT)
+ .setData(IntegerValue.of(Arrays.asList(10, 8, 12, 6, 13, 10, 9)))
+ .setFill(new AbsoluteIndex(1));
+
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("D3 Fill: False")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(Arrays.asList(20, 18, 22, 16, 23, 20, 19)))
+ .setFill(false);
+
+ Dataset dataset4 = new Dataset()
+ .setLabel("D4 Fill: -1")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(Arrays.asList(30, 28, 32, 26, 33, 30, 29)))
+ .setFill(new RelativeIndex("-1"));
+
+
+ Dataset dataset5 = new Dataset()
+ .setLabel("D5 Fill: -1")
+ .setBackgroundColor(SimpleColor.PURPLE_TRANSPARENT)
+ .setBorderColor(SimpleColor.PURPLE)
+ .setData(IntegerValue.of(Arrays.asList(40, 38, 42, 36, 43, 40, 39)))
+ .setFill(new RelativeIndex("-1"));
+
+ data.setDatasets(Arrays.asList(dataset0, dataset1, dataset2, dataset3, dataset4, dataset5));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Radar Chart"))
+ .setMaintainAspectRatio(true)
+ .setSpanGaps(false)
+ .setElements(new Element()
+ .setLine(new Line()
+ .setTension(0.000001)))
+ .setPlugins(new Plugins()
+ .setFiller(new Filler()
+ .setPropagate(false))
+ .setSamples_filler_analyzer(new SamplesFillerAnalyzer()
+ .setTarget("chart-analyzer")))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartConfiguration.java
new file mode 100644
index 00000000..b9cee224
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartConfiguration.java
@@ -0,0 +1,79 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.PointValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample which displays data as scattered points in the coordinate system.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/scatter/basic.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class ScatterChartConfiguration extends ShowcaseConfiguration {
+ public ScatterChartConfiguration() {
+ super();
+ setType(ChartType.SCATTER);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(Arrays.asList(
+ new PointValue(4,14),
+ new PointValue(40,42),
+ new PointValue(23,42),
+ new PointValue(40,22),
+ new PointValue(80,12),
+ new PointValue(30,32)))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(Arrays.asList(
+ new PointValue(7,56),
+ new PointValue(15,54),
+ new PointValue(46,34),
+ new PointValue(36,42),
+ new PointValue(78,64),
+ new PointValue(12,48)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Scatter Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setType("linear")
+ .setPosition(Position.BOTTOM)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartMultiAxisConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartMultiAxisConfiguration.java
new file mode 100644
index 00000000..0dc680a2
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartMultiAxisConfiguration.java
@@ -0,0 +1,91 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.RgbaColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.PointValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that displays a scatter chart with two y-axes.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/scatter/multi-axis.html
+ *
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class ScatterChartMultiAxisConfiguration extends ShowcaseConfiguration {
+ public ScatterChartMultiAxisConfiguration() {
+ super();
+ setType(ChartType.SCATTER);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setYAxisID("y-axis-1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(Arrays.asList(
+ new PointValue(4,14),
+ new PointValue(40,42),
+ new PointValue(23,42),
+ new PointValue(40,22),
+ new PointValue(80,12),
+ new PointValue(30,32)))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setYAxisID("y-axis-2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(Arrays.asList(
+ new PointValue(7,56),
+ new PointValue(15,54),
+ new PointValue(46,34),
+ new PointValue(36,42),
+ new PointValue(78,64),
+ new PointValue(12,48)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Scatter Chart Multi Axis"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setType("linear")
+ .setPosition(Position.BOTTOM)
+ .setGridLines(new GridLines()
+ .setZeroLineColor(new RgbaColor(0, 0, 0, 1)))
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(Arrays.asList(new AxesScale()
+ .setType("linear")
+ .setDisplay(true)
+ .setPosition(Position.LEFT)
+ .setId("y-axis-1"),
+ new AxesScale()
+ .setType("linear")
+ .setDisplay(true)
+ .setPosition(Position.RIGHT)
+ .setReverse(true)
+ .setId("y-axis-2")
+ .setGridLines(new GridLines()
+ .setDrawOnChartArea(false)))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeComboConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeComboConfiguration.java
new file mode 100644
index 00000000..102fdcd0
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeComboConfiguration.java
@@ -0,0 +1,87 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import org.apache.wicket.Session;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * Sample which displays a bar chart for the data distribution and a line chart for the time progression of datasets.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/time/combo.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TimeComboConfiguration extends ShowcaseConfiguration {
+
+
+ public TimeComboConfiguration() {
+ setType(ChartType.BAR);
+
+ String timeFormat = "MM/DD/YYYY HH:mm";
+
+ List labels = new ArrayList(7);
+
+ LocalDateTime now = LocalDateTime.now();
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM/dd/uuuu HH:mm", Session.get().getLocale());
+
+
+ for(int i = 0; i < 7; i++) {
+ labels.add(new TextLabel(now.plus(i,ChronoUnit.DAYS).format(formatter)));
+ }
+
+ Dataset dataset1 = new Dataset()
+ .setType(ChartType.BAR)
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ Dataset dataset2 = new Dataset()
+ .setType(ChartType.BAR)
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ Dataset dataset3 = new Dataset()
+ .setType(ChartType.LINE)
+ .setLabel("Dataset 3")
+ .setFill(false)
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+
+
+ setData( new Data()
+ .setLabels(labels)
+ .setDatasets(Arrays.asList(dataset1,dataset2,dataset3))
+ );
+
+
+
+ setOptions( new Options()
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Combo Time Scale"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setType("time")
+ .setDisplay(true)
+ .setTime(new TimeFormat()
+ .setFormat(timeFormat)
+// .setRound(TimeFormatRound.DAY)
+ ))));
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeLineConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeLineConfiguration.java
new file mode 100644
index 00000000..1771cd0d
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeLineConfiguration.java
@@ -0,0 +1,126 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.DateTimeLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.PointValue;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.StringValue;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.ValueType;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Random;
+
+/**
+ * Sample which displays a time progression line for datasets.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/time/line.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TimeLineConfiguration extends ShowcaseConfiguration {
+
+ public TimeLineConfiguration() {
+ setType(ChartType.LINE);
+
+ Data data = new Data();
+
+ String timeFormat = "MM/DD/YYYY HH:mm";
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern(timeFormat);
+
+ List dateList = new ArrayList();
+ for(int i = 0; i < 7; i++) {
+ dateList.add(new DateTimeLabel(LocalDateTime.of(2018, 1,1, 8+i, 00)));
+ }
+ data.setLabels(dateList);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First Dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setFill(false)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ ;
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second Dataset")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setFill(false)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ ;
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("Dataset with point data")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN)
+ .setFill(false)
+ .setData(Arrays.asList(
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(0).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(1).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(2).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(3).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(4).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(5).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(6).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(LocalDateTime.of(2018, 1, 1, 15, 0))))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(LocalDateTime.of(2018, 1, 1, 16, 0))))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(LocalDateTime.of(2018, 1, 1, 17, 0))))
+ .setY(randomInteger())
+ ))
+ ;
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2,dataset3));
+ setData(data);
+
+ Options options = new Options()
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Time Scale"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setType("time")
+ .setTime(new TimeFormat()
+ .setTimeFormat(timeFormat )
+ .setTooltipFormat("ll HH:mm")))
+ .setYAxes(new AxesScale()
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("value"))));
+ setOptions(options);
+
+
+ }
+
+ private ValueType randomInteger() {
+ Random rng = new Random();
+ return new IntegerValue(rng.nextInt(60)+1);
+ }
+
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimePointConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimePointConfiguration.java
new file mode 100644
index 00000000..9913c110
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimePointConfiguration.java
@@ -0,0 +1,138 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.StringValueColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.DateTimeLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.*;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Random;
+
+/**
+ * Sample which highlights the important points of the x-axis.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/time/line-point-data.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TimePointConfiguration extends ShowcaseConfiguration {
+
+
+ public TimePointConfiguration() {
+ setType(ChartType.LINE);
+
+ String timeFormat = "MM/DD/YYYY HH:mm";
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern(timeFormat);
+
+ Data data = new Data();
+
+ List dateList = new ArrayList();
+ for(int i = 0; i < 7; i++) {
+ dateList.add(new DateTimeLabel(LocalDateTime.of(2018, 1,1, 8+i, 00)));
+ }
+ data.setLabels(dateList);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset with date object point data")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setFill(false)
+ .setData(Arrays.asList(
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(0).getDate()))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(1).getDate()))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(2).getDate()))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(3).getDate()))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(4).getDate()))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(5).getDate()))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(6).getDate()))
+ .setY(randomInteger())
+ ));
+
+
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset with string point data")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setFill(false)
+ .setData(Arrays.asList(
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(0).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(1).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(2).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(3).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(4).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(5).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(6).getDate())))
+ .setY(randomInteger())
+ ))
+ ;
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+ setData(data);
+
+ Options options = new Options()
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Time Scale"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setType("time")
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Date"))
+ .setTicks(new Ticks()
+ .setMajor(new TickStyle()
+ .setFontColor(new StringValueColor("red"))
+ .setFontStyle(FontStyle.BOLD))))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("value"))));
+ setOptions(options);
+
+
+ }
+
+ private ValueType randomInteger() {
+ Random rng = new Random();
+ return new IntegerValue(rng.nextInt(60)+1);
+ }
+
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeSeriesConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeSeriesConfiguration.java
new file mode 100644
index 00000000..b634b84d
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeSeriesConfiguration.java
@@ -0,0 +1,94 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.DateTimeLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.DoubleValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.time.LocalDateTime;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * Sample that displays a progression of a dataset.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/time/financial.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TimeSeriesConfiguration extends ShowcaseConfiguration {
+
+ public TimeSeriesConfiguration() {
+
+
+ Options options = new Options()
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("ChartJs Time Series"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setType("time")
+ .setDistribution(DistributionType.SERIES)
+ .setTicks(new Ticks()
+ .setSource(TickSource.LABELS)
+ )
+ )
+ .setYAxes(new AxesScale()
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Closing price ($)"))
+ ));
+
+ setOptions(options);
+
+ setType(ChartType.LINE);
+
+ LocalDateTime now = LocalDateTime.now();
+
+
+ List labels = new ArrayList(60);
+ List randomData = new ArrayList(60);
+
+ labels.add(new DateTimeLabel(now));
+ randomData.add(randomBar(30));
+
+
+ for(int i = 1; i < 60; i++) {
+ int dayOfTheWeek = now.plus(i, ChronoUnit.DAYS).getDayOfWeek().getValue();
+ if( 1 <= dayOfTheWeek && dayOfTheWeek <= 5) {
+ labels.add(new DateTimeLabel(now.plus(i, ChronoUnit.DAYS)));
+ }
+ randomData.add(randomBar(randomData.get(i-1).getValue()));
+ }
+
+
+
+ Data data = new Data()
+ .setLabels(labels)
+ .setDatasets(Arrays.asList(new Dataset()
+ .setLabel("My Dataset")
+ .setData(randomData)
+ .setType(ChartType.LINE)
+ .setPointRadius(0)
+ .setFill(false)
+ .setLineTension(0)
+ .setBorderWidth(2)
+ ));
+ setData(data);
+ }
+
+ private DoubleValue randomBar(double lastClose) {
+ double open = randomNumber(lastClose * .95, lastClose *1.05);
+ double close = randomNumber(open * .95, open *1.05);
+// double high = randomNumber(Math.max(open, close), Math.max(open, close) * 1.1);
+// double low = randomNumber(Math.min(open, close) * .9, Math.min(open, close));
+ return new DoubleValue(close);
+ }
+
+ private double randomNumber(double min, double max) {
+ return Math.random() * (max - min) + min;
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipAverageConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipAverageConfiguration.java
new file mode 100644
index 00000000..25664e15
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipAverageConfiguration.java
@@ -0,0 +1,68 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that enables tooltips to be at a average position to the data points.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/positioning.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipAverageConfiguration extends ShowcaseConfiguration {
+ public TooltipAverageConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Tooltip Average Position"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setPosition(TooltipPosition.AVERAGE)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipBorderConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipBorderConfiguration.java
new file mode 100644
index 00000000..7271021f
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipBorderConfiguration.java
@@ -0,0 +1,62 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.RgbColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.RgbaColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample which adds a border to the tooltips.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/border.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipBorderConfiguration extends ShowcaseConfiguration {
+ public TooltipBorderConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(10, 30, 46, 2,8,50,0))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+
+ RgbColor black = new RgbColor(0,0,0);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Tooltip with border"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setPosition(TooltipPosition.NEAREST)
+ .setIntersect(false)
+ .setYPadding(10)
+ .setXPadding(10)
+ .setCaretSize(8)
+ .setBackgroundColor(new RgbaColor(72, 241, 12,1.0f))
+ .setTitleFontColor(black)
+ .setBodyFontColor(black)
+ .setBorderColor(new RgbaColor(0,0,0,1.0f))
+ .setBorderWidth(4))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipCallbacksConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipCallbacksConfiguration.java
new file mode 100644
index 00000000..87bb95eb
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipCallbacksConfiguration.java
@@ -0,0 +1,81 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that enables the use of callback functions for tooltips.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/callbacks.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipCallbacksConfiguration extends ShowcaseConfiguration {
+ public TooltipCallbacksConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ String footerFunction = "function(tooltipItems, data) {\r\n" +
+ " var sum = 0;\r\n" +
+ "\r\n" +
+ " tooltipItems.forEach(function(tooltipItem) {\r\n" +
+ " sum += data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index];\r\n" +
+ " });\r\n" +
+ " return 'Sum: ' + sum;\r\n" +
+ " }";
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Custom Information in Tooltip"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setCallbacks(new TooltipCallbacks()
+ .setFooter(new CallbackFunction(footerFunction)))
+ .setFooterFontStyle(FontStyle.NORMAL))
+ .setHover(new Hover()
+ .setMode(HoverMode.INDEX)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlLineConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlLineConfiguration.java
new file mode 100644
index 00000000..686cc84b
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlLineConfiguration.java
@@ -0,0 +1,64 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+/**
+ * Sample that enables the use of custom html markup for tooltips in a line chart.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/custom-line.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipHtmlLineConfiguration extends ShowcaseConfiguration {
+ public TooltipHtmlLineConfiguration() {
+ setType(ChartType.LINE);
+
+ String optionalJavascript= readFile("de/adesso/wickedcharts/showcase/customTooltip.js");
+
+ setOptionalJavascript(new ArrayList());
+ addOptionalJavascript(optionalJavascript);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("HTML Tooltip - Line"))
+ .setTooltips(new Tooltips()
+ .setEnabled(false)
+ .setMode(TooltipMode.INDEX)
+ .setPosition(TooltipPosition.NEAREST)
+ .setCustom(new JavaScriptReference("customTooltips"))
+ );
+ setOptions(options);
+ }
+
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPieConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPieConfiguration.java
new file mode 100644
index 00000000..f6ba2261
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPieConfiguration.java
@@ -0,0 +1,59 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import org.apache.wicket.markup.html.panel.Fragment;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+/**
+ * Sample that enables the use of custom html markup for tooltips in a pie chart.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/custom-pie.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipHtmlPieConfiguration extends ShowcaseConfiguration {
+ public TooltipHtmlPieConfiguration() {
+ setType(ChartType.PIE);
+
+ String optionalJavascript=readFile("de/adesso/wickedcharts/showcase/customTooltip-Pie.js");
+
+ setOptionalJavascript(new ArrayList());
+ addOptionalJavascript(optionalJavascript);
+
+ Data data = new Data();
+ setData(data);
+
+ Dataset dataset = new Dataset()
+ .setLabel("My Dataset")
+ .setBackgroundColor(Arrays.asList(SimpleColor.RED,SimpleColor.ORANGE,SimpleColor.YELLOW, SimpleColor.GREEN, SimpleColor.BLUE))
+ .setData(IntegerValue.of(300, 50, 100, 40, 10));
+
+ data.setDatasets(Arrays.asList(dataset)).setLabels(TextLabel.of("Red", "Orange", "Yellow", "Green", "Blue"));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setLegend(new Legend()
+ .setDisplay(true))
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("HTML Tooltip - Pie"))
+ .setTooltips(new Tooltips()
+ .setEnabled(false)
+// .setCustom(new JavaScriptReference("customTooltips"))
+ );
+ setOptions(options);
+ }
+
+ @Override
+ public void modfiyIndividualMarkup(Fragment optionalMarkup) {
+ Fragment frag = new Fragment("optionalMarkup","pieTooltip",optionalMarkup.getParent());
+ optionalMarkup.replaceWith(frag);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPointsConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPointsConfiguration.java
new file mode 100644
index 00000000..247c5dbd
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPointsConfiguration.java
@@ -0,0 +1,69 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import org.apache.wicket.markup.html.panel.Fragment;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+/**
+ * Sample that enables the use of custom html markup for tooltip points.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/custom-points.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipHtmlPointsConfiguration extends ShowcaseConfiguration {
+ public TooltipHtmlPointsConfiguration() {
+ setType(ChartType.LINE);
+
+ String optionalJavascript=readFile("de/adesso/wickedcharts/showcase/customTooltip-Point.js");
+
+ setOptionalJavascript(new ArrayList());
+ addOptionalJavascript(optionalJavascript);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setPointBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setPointBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("HTML Tooltip - Points"))
+ .setTooltips(new Tooltips()
+ .setEnabled(false)
+ .setIntersect(false)
+ .setMode(TooltipMode.INDEX)
+ .setCustom(new JavaScriptReference("customTooltips"))
+ );
+ setOptions(options);
+ }
+
+ @Override
+ public void modfiyIndividualMarkup(Fragment optionalMarkup) {
+ Fragment frag = new Fragment("optionalMarkup","pointTooltip",optionalMarkup.getParent());
+ optionalMarkup.replaceWith(frag);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipNearestConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipNearestConfiguration.java
new file mode 100644
index 00000000..81ef4a14
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipNearestConfiguration.java
@@ -0,0 +1,69 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+
+/**
+ * Sample that enables tooltips to be at the nearest possible position to the data points.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/positioning.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipNearestConfiguration extends ShowcaseConfiguration {
+ public TooltipNearestConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Tooltip Nearest Position"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setPosition(TooltipPosition.NEAREST)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/base/ShowcaseConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/base/ShowcaseConfiguration.java
new file mode 100644
index 00000000..b15b4d9f
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/base/ShowcaseConfiguration.java
@@ -0,0 +1,58 @@
+package de.adesso.wickedcharts.showcase.configurations.base;
+
+import de.adesso.wickedcharts.chartjs.ChartConfiguration;
+import org.apache.wicket.markup.html.panel.Fragment;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+import java.util.Scanner;
+
+/**
+ * The base class for all chart configurations for the showcase
+ */
+@SuppressWarnings("serial")
+public abstract class ShowcaseConfiguration extends ChartConfiguration implements Serializable {
+
+ protected List randomIntegerList(int size) {
+ List dataList = new ArrayList();
+ Random rng = new Random();
+ for (int i = 0; i < size; i++) {
+ dataList.add(rng.nextInt(60) + 1);
+ }
+ return dataList;
+ }
+
+ protected String readFile(String fileName) {
+
+ StringBuilder result = new StringBuilder("");
+
+ // Get file from resources folder
+ ClassLoader classLoader = getClass().getClassLoader();
+ File file = new File(classLoader.getResource(fileName).getFile());
+
+ try (Scanner scanner = new Scanner(file)) {
+
+ while (scanner.hasNextLine()) {
+ String line = scanner.nextLine();
+ result.append(line).append("\n");
+ }
+
+ scanner.close();
+
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ return result.toString();
+
+ }
+
+ public void modfiyIndividualMarkup(Fragment optionalMarkup) {
+ Fragment frag = new Fragment("optionalMarkup","defaultTooltip",optionalMarkup.getParent());
+ optionalMarkup.replaceWith(frag);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLineStylesConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLineStylesConfiguration.java
new file mode 100644
index 00000000..c54b2548
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLineStylesConfiguration.java
@@ -0,0 +1,74 @@
+package de.adesso.wickedcharts.showcase.configurations.gridlines;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.StringValueColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+
+/**
+ *
+ * Chart configuration for different grid line styles.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/gridlines-style.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class GridLineStylesConfiguration extends ShowcaseConfiguration {
+ public GridLineStylesConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(Arrays.asList(10, 30, 39, 20, 25, 34, -10)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(Arrays.asList(18, 33, 22, 19, 11, 39, 30)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Gridlines - Styles"))
+ .setScales(new Scales()
+ .setYAxes(new AxesScale()
+ .setGridLines(new GridLines()
+ .setDrawBorder(true)
+ .setColor(Arrays.asList(
+ new StringValueColor("pink"),
+ new StringValueColor("red"),
+ new StringValueColor("orange"),
+ new StringValueColor("yellow"),
+ new StringValueColor("green"),
+ new StringValueColor("blue"),
+ new StringValueColor("indigo"),
+ new StringValueColor("purple"))))
+ .setTicks(new Ticks()
+ .setMin(0)
+ .setMax(100)
+ .setStepSize(10))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesBasicConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesBasicConfiguration.java
new file mode 100644
index 00000000..ea0a665c
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesBasicConfiguration.java
@@ -0,0 +1,69 @@
+package de.adesso.wickedcharts.showcase.configurations.gridlines;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * Chart configuration for the basic grid line layout.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/gridlines-display.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class GridLinesBasicConfiguration extends ShowcaseConfiguration {
+
+ protected GridLines gridLines;
+
+ public GridLinesBasicConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(10, 30, 39, 20, 25, 34, -10))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(Arrays.asList(18, 33, 22, 19, 11, 39, 30)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ gridLines = new GridLines()
+ .setDisplay(true);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Gridlines - Basic"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setGridLines(gridLines))
+ .setYAxes(new AxesScale()
+ .setGridLines(gridLines)
+ .setTicks(new Ticks()
+ .setMin(0)
+ .setMax(100)
+ .setStepSize(10))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesChartAreaConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesChartAreaConfiguration.java
new file mode 100644
index 00000000..b45bc4c9
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesChartAreaConfiguration.java
@@ -0,0 +1,27 @@
+package de.adesso.wickedcharts.showcase.configurations.gridlines;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+
+/**
+ *
+ * Chart configuration for the area chart grid line layout.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/gridlines-display.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class GridLinesChartAreaConfiguration extends GridLinesBasicConfiguration {
+
+ public GridLinesChartAreaConfiguration() {
+ super();
+
+ gridLines.setDisplay(true)
+ .setDrawBorder(true)
+ .setDrawOnChartArea(false);
+ getOptions().setTitle(new Title()
+ .setDisplay(true)
+ .setText("Gridlines - Chart Area"));
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseConfiguration.java
new file mode 100644
index 00000000..171a41fe
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseConfiguration.java
@@ -0,0 +1,25 @@
+package de.adesso.wickedcharts.showcase.configurations.gridlines;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+
+/**
+ *
+ * Chart configuration in order to not display grid lines.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/gridlines-display.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class GridLinesDisplayFalseConfiguration extends GridLinesBasicConfiguration {
+
+ public GridLinesDisplayFalseConfiguration() {
+ super();
+
+ gridLines.setDisplay(false);
+ getOptions().setTitle(new Title()
+ .setDisplay(true)
+ .setText("Gridlines - Display False"));
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseNoBorderConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseNoBorderConfiguration.java
new file mode 100644
index 00000000..2893b59a
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseNoBorderConfiguration.java
@@ -0,0 +1,25 @@
+package de.adesso.wickedcharts.showcase.configurations.gridlines;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+
+/**
+ *
+ * Chart configuration in order to not display grid lines and axes.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/gridlines-display.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class GridLinesDisplayFalseNoBorderConfiguration extends GridLinesBasicConfiguration {
+
+ public GridLinesDisplayFalseNoBorderConfiguration() {
+ super();
+
+ gridLines.setDisplay(false)
+ .setDrawBorder(false);
+ getOptions().setTitle(new Title()
+ .setDisplay(true)
+ .setText("Gridlines - Display False No Border"));
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesTicksConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesTicksConfiguration.java
new file mode 100644
index 00000000..9c05bfd8
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesTicksConfiguration.java
@@ -0,0 +1,28 @@
+package de.adesso.wickedcharts.showcase.configurations.gridlines;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+
+/**
+ *
+ * Chart configuration in order to not display the ticks.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/gridlines-display.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class GridLinesTicksConfiguration extends GridLinesBasicConfiguration {
+
+ public GridLinesTicksConfiguration() {
+ super();
+
+ gridLines.setDisplay(true)
+ .setDrawBorder(true)
+ .setDrawOnChartArea(true)
+ .setDrawTicks(false);
+ getOptions().setTitle(new Title()
+ .setDisplay(true)
+ .setText("Gridlines - Ticks"));
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectFalseConfiguration.java
new file mode 100644
index 00000000..b44975d6
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectFalseConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * If intersect false the nearest item is used to determine the index.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class DatasetIntersectFalseConfiguration extends ShowcaseConfiguration {
+ public DatasetIntersectFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Dataset, intersect: false"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.DATASET)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectTrueConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectTrueConfiguration.java
new file mode 100644
index 00000000..e6fd9d62
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectTrueConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * If the intersect setting is true, the first intersecting item is used to determine the index in the data.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class DatasetIntersectTrueConfiguration extends ShowcaseConfiguration {
+ public DatasetIntersectTrueConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Dataset, intersect: true"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.DATASET)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectFalseConfiguration.java
new file mode 100644
index 00000000..7e4409cc
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectFalseConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * If intersect false the nearest item, in the x direction, is used to determine the index.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class IndexIntersectFalseConfiguration extends ShowcaseConfiguration {
+ public IndexIntersectFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Index, intersect: false"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectTrueConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectTrueConfiguration.java
new file mode 100644
index 00000000..51d05303
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectTrueConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * If the intersect setting is true, the first intersecting item is used to determine the index in the data.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class IndexIntersectTrueConfiguration extends ShowcaseConfiguration {
+ public IndexIntersectTrueConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Index, intersect: true"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectFalseConfiguration.java
new file mode 100644
index 00000000..34c6fb77
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectFalseConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * If intersect is false, this is not triggered when the mouse position intersects an item in the graph.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class NearestIntersectFalseConfiguration extends ShowcaseConfiguration {
+ public NearestIntersectFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Nearest, intersect: false"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.NEAREST)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectTrueConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectTrueConfiguration.java
new file mode 100644
index 00000000..cc445895
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectTrueConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * If intersect is true, this is only triggered when the mouse position intersects an item in the graph.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class NearestIntersectTrueConfiguration extends ShowcaseConfiguration {
+ public NearestIntersectTrueConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Nearest, intersect: true"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectFalseConfiguration.java
new file mode 100644
index 00000000..d0dabfa2
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectFalseConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Finds no items that intersect the point.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class PointIntersectFalseConfiguration extends ShowcaseConfiguration {
+ public PointIntersectFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Point, intersect: false"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.POINT)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectTrueConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectTrueConfiguration.java
new file mode 100644
index 00000000..3cd2b690
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectTrueConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Finds all of the items that intersect the point.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class PointIntersectTrueConfiguration extends ShowcaseConfiguration {
+ public PointIntersectTrueConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Point, intersect: true"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.POINT)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectFalseConfiguration.java
new file mode 100644
index 00000000..d1fa9739
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectFalseConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Does not return all items that would intersect based on the X coordinate of the position only.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class xIntersectFalseConfiguration extends ShowcaseConfiguration {
+ public xIntersectFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: x, intersect: false"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.X)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectTrueConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectTrueConfiguration.java
new file mode 100644
index 00000000..f4f97476
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectTrueConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Returns all items that would intersect based on the X coordinate of the position only.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class xIntersectTrueConfiguration extends ShowcaseConfiguration {
+ public xIntersectTrueConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: x, intersect: true"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.X)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectFalseConfiguration.java
new file mode 100644
index 00000000..f48e7a2e
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectFalseConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Does not return all items that would intersect based on the Y coordinate of the position.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class yIntersectFalseConfiguration extends ShowcaseConfiguration {
+ public yIntersectFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: y, intersect: false"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.Y)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectTrueConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectTrueConfiguration.java
new file mode 100644
index 00000000..16512e31
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectTrueConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Returns all items that would intersect based on the Y coordinate of the position.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class yIntersectTrueConfiguration extends ShowcaseConfiguration {
+ public yIntersectTrueConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: y, intersect: true"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.Y)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionBottomConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionBottomConfiguration.java
new file mode 100644
index 00000000..bc02dee4
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionBottomConfiguration.java
@@ -0,0 +1,27 @@
+
+package de.adesso.wickedcharts.showcase.configurations.legendposition;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
+import de.adesso.wickedcharts.chartjs.chartoptions.Position;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+
+/**
+ * Shows how to configure a chart with the legend position at the bottom
+ * @see http://www.chartjs.org/samples/latest/legend/positioning.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LegendPositionBottomConfiguration extends LegendPositionChartBasicConfiguration {
+
+ public LegendPositionBottomConfiguration() {
+ super();
+
+ getData().getDatasets().get(0).setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN);
+
+ getOptions().setLegend(new Legend().setPosition(Position.BOTTOM));
+
+ getOptions().getTitle().setText("Legend Position: Bottom");
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionChartBasicConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionChartBasicConfiguration.java
new file mode 100644
index 00000000..1a8aecd5
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionChartBasicConfiguration.java
@@ -0,0 +1,55 @@
+
+package de.adesso.wickedcharts.showcase.configurations.legendposition;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Base class for the other configurations for the legend position
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LegendPositionChartBasicConfiguration extends ShowcaseConfiguration {
+ public LegendPositionChartBasicConfiguration() {
+ super();
+
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setBorderWidth(1);
+
+ data.setDatasets(Arrays.asList(dataset1));
+ setData(data);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value")))
+ )
+ .setTitle(new Title()
+ .setDisplay(true))
+ ;
+ setOptions(options);
+
+ }
+}
+
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionLeftConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionLeftConfiguration.java
new file mode 100644
index 00000000..910e34f8
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionLeftConfiguration.java
@@ -0,0 +1,28 @@
+
+package de.adesso.wickedcharts.showcase.configurations.legendposition;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
+import de.adesso.wickedcharts.chartjs.chartoptions.Position;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+
+/**
+ * Shows how to configure a chart with the legend position on the left
+ *
+ * @see http://www.chartjs.org/samples/latest/legend/positioning.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LegendPositionLeftConfiguration extends LegendPositionChartBasicConfiguration {
+
+ public LegendPositionLeftConfiguration() {
+ super();
+
+ getData().getDatasets().get(0).setBackgroundColor(SimpleColor.YELLOW_TRANSPARENT)
+ .setBorderColor(SimpleColor.YELLOW);
+
+ getOptions().setLegend(new Legend().setPosition(Position.LEFT));
+
+ getOptions().getTitle().setText("Legend Position: Left");
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionRightConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionRightConfiguration.java
new file mode 100644
index 00000000..38dcecc9
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionRightConfiguration.java
@@ -0,0 +1,29 @@
+
+package de.adesso.wickedcharts.showcase.configurations.legendposition;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
+import de.adesso.wickedcharts.chartjs.chartoptions.Position;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+
+/**
+ * Shows how to configure a chart with the legend position on the right
+ *
+ * @see http://www.chartjs.org/samples/latest/legend/positioning.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LegendPositionRightConfiguration extends LegendPositionChartBasicConfiguration {
+
+ public LegendPositionRightConfiguration() {
+ super();
+
+ getData().getDatasets().get(0).setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE);
+
+ getOptions().setLegend(new Legend().setPosition(Position.RIGHT));
+
+ getOptions().getTitle().setText("Legend Position: Right");
+ }
+}
+
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionTopConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionTopConfiguration.java
new file mode 100644
index 00000000..711c225c
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionTopConfiguration.java
@@ -0,0 +1,29 @@
+
+package de.adesso.wickedcharts.showcase.configurations.legendposition;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
+import de.adesso.wickedcharts.chartjs.chartoptions.Position;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+
+/**
+ * Shows how to configure a chart with the legend position at the top
+ *
+ * @see http://www.chartjs.org/samples/latest/legend/positioning.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LegendPositionTopConfiguration extends LegendPositionChartBasicConfiguration {
+
+ public LegendPositionTopConfiguration() {
+ super();
+
+ getData().getDatasets().get(0).setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED);
+
+ getOptions().setLegend(new Legend().setPosition(Position.TOP));
+
+ getOptions().getTitle().setText("Legend Position: Top");
+ }
+}
+
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/ChartjsShowcaseLink.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/ChartjsShowcaseLink.java
new file mode 100644
index 00000000..ff646dc3
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/ChartjsShowcaseLink.java
@@ -0,0 +1,15 @@
+package de.adesso.wickedcharts.showcase.links;
+
+import de.adesso.wickedcharts.showcase.HomepageChartJs;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+
+/**
+ * Adds a link to the Chart.js showcase in the main page
+ */
+@SuppressWarnings("serial")
+public class ChartjsShowcaseLink extends BookmarkablePageLink {
+
+ public ChartjsShowcaseLink() {
+ super("chartJsShowcaseLink", HomepageChartJs.class);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/HighchartsShowcaseLink.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/HighchartsShowcaseLink.java
new file mode 100644
index 00000000..95425689
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/HighchartsShowcaseLink.java
@@ -0,0 +1,20 @@
+
+package de.adesso.wickedcharts.showcase.links;
+
+import de.adesso.wickedcharts.showcase.HomepageHighcharts;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+
+/**
+ * Adds a link to the Highcharts showcase in the main page
+ */
+@SuppressWarnings("serial")
+public class HighchartsShowcaseLink extends BookmarkablePageLink {
+
+ public HighchartsShowcaseLink() {
+ super("highchartShowcaseLink", HomepageHighcharts.class, new PageParameters()
+ .add("theme", "default")
+ .add("chart", "line"));
+ }
+}
+
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartJsLink.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartJsLink.java
new file mode 100644
index 00000000..e3413d75
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartJsLink.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
+ *
+ * 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 de.adesso.wickedcharts.showcase.links;
+
+import de.adesso.wickedcharts.showcase.HomepageChartJs;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+
+/**
+ * Adds a link to a chart in the showcase navigation sidebar.
+ * Clicking on the link calls the onClick() method, which sets page
+ * parameters accordingly.
+ */
+public class UpdateChartJsLink extends Link {
+
+ private static final long serialVersionUID = 1L;
+
+ private final String chartVal;
+
+ /**
+ * Constructs a new Link.
+ *
+ * @param id the wicket id of the link
+ * @param val the name of the chart the link points to
+ */
+ public UpdateChartJsLink(final String id, final String val) {
+ super(id);
+ this.chartVal = val;
+ }
+
+ @Override
+ public void onClick() {
+ PageParameters params = new PageParameters();
+ params.add("chart", chartVal);
+ setResponsePage(HomepageChartJs.class, params);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartLink.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartLink.java
deleted file mode 100644
index a9782b52..00000000
--- a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartLink.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
- *
- * 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 de.adesso.wickedcharts.showcase.links;
-
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.markup.html.AjaxLink;
-import org.apache.wicket.markup.html.basic.Label;
-
-import de.adesso.wickedcharts.wicket15.highcharts.Chart;
-
-import de.adesso.wickedcharts.highcharts.options.Options;
-import de.adesso.wickedcharts.showcase.ShowcaseSession;
-import de.adesso.wickedcharts.showcase.StringFromResourceModel;
-
-public class UpdateChartLink extends AjaxLink {
-
- private static final long serialVersionUID = 1L;
-
- private final Chart chart;
-
- private final Options options;
-
- private final Label codeContainer;
-
- /**
- * Constructs a new Link.
- *
- * @param id
- * the wicket id of the link
- * @param chart
- * the container containing the chart
- * @param codeContainer
- * the container containing the code display of the chart's options
- * @param options
- * the options of the chart.
- */
- public UpdateChartLink(final String id, final Chart chart,
- final Label codeContainer, final Options options) {
- super(id);
- this.chart = chart;
- this.codeContainer = codeContainer;
- this.options = options;
- }
-
- public Chart getChartContainer() {
- return this.chart;
- }
-
- public Label getCodeContainer() {
- return this.codeContainer;
- }
-
- public Options getOptions() {
- return this.options;
- }
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- this.chart
- .setOptions(this.options);
- ((ShowcaseSession) getSession())
- .setCurrentChartOptions(this.options);
- this.codeContainer
- .setDefaultModel(new StringFromResourceModel(this.options
- .getClass(), this.options
- .getClass()
- .getSimpleName() + ".java"));
- target
- .add(this.chart);
- target
- .add(this.codeContainer);
-
- // make syntaxhighlighter highlight the changed code
- target
- .appendJavaScript("SyntaxHighlighter.highlight();");
- }
-
-}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateHighchartLink.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateHighchartLink.java
new file mode 100644
index 00000000..cf9d82c9
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateHighchartLink.java
@@ -0,0 +1,54 @@
+/**
+ * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
+ *
+ * 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 de.adesso.wickedcharts.showcase.links;
+
+import de.adesso.wickedcharts.showcase.HomepageHighcharts;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+
+/**
+ * Adds a link to a chart in the showcase navigation sidebar.
+ * Clicking on the link calls the onClick() method, which sets page
+ * parameters accordingly.
+ */
+public class UpdateHighchartLink extends Link {
+
+ private static final long serialVersionUID = 1L;
+
+ private String chartVal;
+ private String themeVal;
+
+ /**
+ * Constructs a new Link.
+ *
+ * @param id the wicket id of the link
+ * @param themeVal the name of the theme that will be used
+ */
+ public UpdateHighchartLink(final String id, String themeVal) {
+ super(id);
+ this.chartVal = id;
+ this.themeVal = themeVal;
+ }
+
+
+ @Override
+ public void onClick() {
+ PageParameters params = new PageParameters();
+ params.add("theme", themeVal);
+ params.add("chart", chartVal);
+ setResponsePage(HomepageHighcharts.class, params);
+ }
+
+}
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateThemeLink.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateThemeLink.java
new file mode 100644
index 00000000..b86794c8
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateThemeLink.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
+ *
+ * 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 de.adesso.wickedcharts.showcase.links;
+
+import de.adesso.wickedcharts.showcase.HomepageHighcharts;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+
+/**
+ * Adds a link to a theme in the Highcharts showcase.
+ * Clicking on the link calls the onClick() method, which sets page
+ * parameters accordingly.
+ */
+public class UpdateThemeLink extends Link {
+
+ private static final long serialVersionUID = 1L;
+
+ private String chartVal;
+ private String themeVal;
+
+ /**
+ * Constructs a new Link.
+ *
+ * @param id the wicket id of the link
+ * @param chart the name of the chart the link points to
+ */
+ public UpdateThemeLink(final String id, String chart) {
+ super(id);
+ this.chartVal = chart;
+ this.themeVal = id;
+ }
+
+ @Override
+ public void onClick() {
+ PageParameters params = new PageParameters();
+ params.add("theme", themeVal);
+ params.add("chart", chartVal);
+ setResponsePage(HomepageHighcharts.class, params);
+ }
+
+}
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Pie.js b/showcase/wicked-charts-showcase-wicket15/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Pie.js
new file mode 100644
index 00000000..a54bc7a6
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Pie.js
@@ -0,0 +1,62 @@
+Chart.defaults.global.tooltips.custom = function(tooltip) {
+ // Tooltip Element
+ var tooltipEl = document.getElementById('chartjs-tooltip');
+
+ // Hide if no tooltip
+ if (tooltip.opacity === 0) {
+ tooltipEl.style.opacity = 0;
+ return;
+ }
+
+ // Set caret Position
+ tooltipEl.classList.remove('above', 'below', 'no-transform');
+ if (tooltip.yAlign) {
+ tooltipEl.classList.add(tooltip.yAlign);
+ } else {
+ tooltipEl.classList.add('no-transform');
+ }
+
+ function getBody(bodyItem) {
+ return bodyItem.lines;
+ }
+
+ // Set Text
+ if (tooltip.body) {
+ var titleLines = tooltip.title || [];
+ var bodyLines = tooltip.body.map(getBody);
+
+ var innerHtml = '';
+
+ titleLines.forEach(function(title) {
+ innerHtml += '' + title + ' ';
+ });
+ innerHtml += ' ';
+
+ bodyLines.forEach(function(body, i) {
+ var colors = tooltip.labelColors[i];
+ var style = 'background:' + colors.backgroundColor;
+ style += '; border-color:' + colors.borderColor;
+ style += '; border-width: 2px';
+ var span = ' ';
+ innerHtml += '' + span + body + ' ';
+ });
+ innerHtml += ' ';
+
+ var tableRoot = tooltipEl.querySelector('table');
+ tableRoot.innerHTML = innerHtml;
+ }
+
+ var positionY = this._chart.canvas.offsetTop;
+ var positionX = this._chart.canvas.offsetLeft;
+
+ // Display, position, and set styles for font
+ tooltipEl.style.opacity = 1;
+ tooltipEl.style.left = positionX + tooltip.caretX + 'px';
+ tooltipEl.style.top = positionY + tooltip.caretY + 'px';
+ tooltipEl.style.fontFamily = tooltip._fontFamily;
+ tooltipEl.style.fontSize = tooltip.fontSize;
+ tooltipEl.style.fontStyle = tooltip._fontStyle;
+ tooltipEl.style.padding = tooltip.yPadding + 'px ' + tooltip.xPadding
+ + 'px';
+};
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Point.js b/showcase/wicked-charts-showcase-wicket15/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Point.js
new file mode 100644
index 00000000..da5ed22a
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Point.js
@@ -0,0 +1,28 @@
+var customTooltips = function(tooltip) {
+ $(this._chart.canvas).css("cursor", "pointer");
+
+ var positionY = this._chart.canvas.offsetTop;
+ var positionX = this._chart.canvas.offsetLeft;
+
+ $(".chartjs-tooltip").css({
+ opacity : 0,
+ });
+
+ if (!tooltip || !tooltip.opacity) {
+ return;
+ }
+
+ if (tooltip.dataPoints.length > 0) {
+ tooltip.dataPoints.forEach(function(dataPoint) {
+ var content = [ dataPoint.xLabel, dataPoint.yLabel ].join(": ");
+ var $tooltip = $("#tooltip-" + dataPoint.datasetIndex);
+
+ $tooltip.html(content);
+ $tooltip.css({
+ opacity : 1,
+ top : positionY + dataPoint.y + "px",
+ left : positionX + dataPoint.x + "px",
+ });
+ });
+ }
+};
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip.js b/showcase/wicked-charts-showcase-wicket15/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip.js
new file mode 100644
index 00000000..cb39657a
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip.js
@@ -0,0 +1,71 @@
+Chart.defaults.global.pointHitDetectionRadius = 1;
+
+var customTooltips = function(tooltip) {
+ // Tooltip Element
+ var tooltipEl = document.getElementById('chartjs-tooltip');
+
+ if (!tooltipEl) {
+ tooltipEl = document.createElement('div');
+ tooltipEl.id = 'chartjs-tooltip';
+ tooltipEl.innerHTML = ""
+ this._chart.canvas.parentNode.appendChild(tooltipEl);
+ }
+
+ // Hide if no tooltip
+ if (tooltip.opacity === 0) {
+ tooltipEl.style.opacity = 0;
+ return;
+ }
+
+ // Set caret Position
+ tooltipEl.classList.remove('above', 'below', 'no-transform');
+ if (tooltip.yAlign) {
+ tooltipEl.classList.add(tooltip.yAlign);
+ } else {
+ tooltipEl.classList.add('no-transform');
+ }
+
+ function getBody(bodyItem) {
+ return bodyItem.lines;
+ }
+
+ // Set Text
+ if (tooltip.body) {
+ var titleLines = tooltip.title || [];
+ var bodyLines = tooltip.body.map(getBody);
+
+ var innerHtml = '';
+
+ titleLines.forEach(function(title) {
+ innerHtml += '' + title + ' ';
+ });
+ innerHtml += ' ';
+
+ bodyLines.forEach(function(body, i) {
+ var colors = tooltip.labelColors[i];
+ var style = 'background:' + colors.backgroundColor;
+ style += '; border-color:' + colors.borderColor;
+ style += '; border-width: 2px';
+ var span = ' ';
+ innerHtml += '' + span + body + ' ';
+ });
+ innerHtml += ' ';
+
+ var tableRoot = tooltipEl.querySelector('table');
+ tableRoot.innerHTML = innerHtml;
+ }
+
+ var positionY = this._chart.canvas.offsetTop;
+ var positionX = this._chart.canvas.offsetLeft;
+
+ // Display, position, and set styles for font
+ tooltipEl.style.opacity = 1;
+ tooltipEl.style.left = positionX + tooltip.caretX + 'px';
+ tooltipEl.style.top = positionY + tooltip.caretY + 'px';
+ tooltipEl.style.fontFamily = tooltip._fontFamily;
+ tooltipEl.style.fontSize = tooltip.fontSize;
+ tooltipEl.style.fontStyle = tooltip._fontStyle;
+ tooltipEl.style.padding = tooltip.yPadding + 'px ' + tooltip.xPadding
+ + 'px';
+};
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/resources/de/adesso/wickedcharts/showcase/dataLabellingPlugin.js b/showcase/wicked-charts-showcase-wicket15/src/main/resources/de/adesso/wickedcharts/showcase/dataLabellingPlugin.js
new file mode 100644
index 00000000..7b9e8cb1
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/resources/de/adesso/wickedcharts/showcase/dataLabellingPlugin.js
@@ -0,0 +1,33 @@
+// Define a plugin to provide data labels
+ Chart.plugins.register({
+ afterDatasetsDraw: function(chart, easing) {
+ // To only draw at the end of animation, check for easing === 1
+ var ctx = {0};
+
+ chart.data.datasets.forEach(function (dataset, i) {
+ var meta = chart.getDatasetMeta(i);
+ if (!meta.hidden) {
+ meta.data.forEach(function(element, index) {
+ // Draw the text in black, with the specified font
+ ctx.fillStyle = 'rgb(0, 0, 0)';
+
+ var fontSize = 16;
+ var fontStyle = 'normal';
+ var fontFamily = 'Helvetica Neue';
+ ctx.font = Chart.helpers.fontString(fontSize, fontStyle, fontFamily);
+
+ // Just naively convert to string for now
+ var dataString = dataset.data[index].toString();
+
+ // Make sure alignment settings are correct
+ ctx.textAlign = 'center';
+ ctx.textBaseline = 'middle';
+
+ var padding = 5;
+ var position = element.tooltipPosition();
+ ctx.fillText(dataString, position.x, position.y - (fontSize / 2) - padding);
+ });
+ }
+ });
+ }
+ });
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/resources/de/adesso/wickedcharts/showcase/jquery-1.8.3.min-IEfix.js b/showcase/wicked-charts-showcase-wicket15/src/main/resources/de/adesso/wickedcharts/showcase/jquery-1.8.3.min-IEfix.js
new file mode 100644
index 00000000..012ab88e
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket15/src/main/resources/de/adesso/wickedcharts/showcase/jquery-1.8.3.min-IEfix.js
@@ -0,0 +1,9473 @@
+
+/*!
+ * jQuery JavaScript Library v1.8.3
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2012-2018 jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: Tue Nov 13 2012 08:20:33 GMT-0500 (Eastern Standard Time)
+ */
+(function( window, undefined ) {
+var
+ // A central reference to the root jQuery(document)
+ rootjQuery,
+
+ // The deferred used on DOM ready
+ readyList,
+
+ // Use the correct document accordingly with window argument (sandbox)
+ document = window.document,
+ location = window.location,
+ navigator = window.navigator,
+
+ // Map over jQuery in case of overwrite
+ _jQuery = window.jQuery,
+
+ // Map over the $ in case of overwrite
+ _$ = window.$,
+
+ // Save a reference to some core methods
+ core_push = Array.prototype.push,
+ core_slice = Array.prototype.slice,
+ core_indexOf = Array.prototype.indexOf,
+ core_toString = Object.prototype.toString,
+ core_hasOwn = Object.prototype.hasOwnProperty,
+ core_trim = String.prototype.trim,
+
+ // Define a local copy of jQuery
+ jQuery = function( selector, context ) {
+ // The jQuery object is actually just the init constructor 'enhanced'
+ return new jQuery.fn.init( selector, context, rootjQuery );
+ },
+
+ // Used for matching numbers
+ core_pnum = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,
+
+ // Used for detecting and trimming whitespace
+ core_rnotwhite = /\S/,
+ core_rspace = /\s+/,
+
+ // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
+ rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+ // A simple way to check for HTML strings
+ // Prioritize #id over to avoid XSS via location.hash (#9521)
+ rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
+
+ // Match a standalone tag
+ rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
+
+ // JSON RegExp
+ rvalidchars = /^[\],:{}\s]*$/,
+ rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+ rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
+ rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,
+
+ // Matches dashed string for camelizing
+ rmsPrefix = /^-ms-/,
+ rdashAlpha = /-([\da-z])/gi,
+
+ // Used by jQuery.camelCase as callback to replace()
+ fcamelCase = function( all, letter ) {
+ return ( letter + "" ).toUpperCase();
+ },
+
+ // The ready event handler and self cleanup method
+ DOMContentLoaded = function() {
+ if ( document.addEventListener ) {
+ document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+ jQuery.ready();
+ } else if ( document.readyState === "complete" ) {
+ // we're here because readyState === "complete" in oldIE
+ // which is good enough for us to call the dom ready!
+ document.detachEvent( "onreadystatechange", DOMContentLoaded );
+ jQuery.ready();
+ }
+ },
+
+ // [[Class]] -> type pairs
+ class2type = {};
+
+jQuery.fn = jQuery.prototype = {
+ constructor: jQuery,
+ init: function( selector, context, rootjQuery ) {
+ var match, elem, ret, doc;
+
+ // Handle $(""), $(null), $(undefined), $(false)
+ if ( !selector ) {
+ return this;
+ }
+
+ // Handle $(DOMElement)
+ if ( selector.nodeType ) {
+ this.context = this[0] = selector;
+ this.length = 1;
+ return this;
+ }
+
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
+ // Assume that strings that start and end with <> are HTML and skip the regex check
+ match = [ null, selector, null ];
+
+ } else {
+ match = rquickExpr.exec( selector );
+ }
+
+ // Match html or make sure no context is specified for #id
+ if ( match && (match[1] || !context) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[1] ) {
+ context = context instanceof jQuery ? context[0] : context;
+ doc = ( context && context.nodeType ? context.ownerDocument || context : document );
+
+ // scripts is true for back-compat
+ selector = jQuery.parseHTML( match[1], doc, true );
+ if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
+ this.attr.call( selector, context, true );
+ }
+
+ return jQuery.merge( this, selector );
+
+ // HANDLE: $(#id)
+ } else {
+ elem = document.getElementById( match[2] );
+
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE and Opera return items
+ // by name instead of ID
+ if ( elem.id !== match[2] ) {
+ return rootjQuery.find( selector );
+ }
+
+ // Otherwise, we inject the element directly into the jQuery object
+ this.length = 1;
+ this[0] = elem;
+ }
+
+ this.context = document;
+ this.selector = selector;
+ return this;
+ }
+
+ // HANDLE: $(expr, $(...))
+ } else if ( !context || context.jquery ) {
+ return ( context || rootjQuery ).find( selector );
+
+ // HANDLE: $(expr, context)
+ // (which is just equivalent to: $(context).find(expr)
+ } else {
+ return this.constructor( context ).find( selector );
+ }
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ } else if ( jQuery.isFunction( selector ) ) {
+ return rootjQuery.ready( selector );
+ }
+
+ if ( selector.selector !== undefined ) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
+ return jQuery.makeArray( selector, this );
+ },
+
+ // Start with an empty selector
+ selector: "",
+
+ // The current version of jQuery being used
+ jquery: "1.8.3",
+
+ // The default length of a jQuery object is 0
+ length: 0,
+
+ // The number of elements contained in the matched element set
+ size: function() {
+ return this.length;
+ },
+
+ toArray: function() {
+ return core_slice.call( this );
+ },
+
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function( num ) {
+ return num == null ?
+
+ // Return a 'clean' array
+ this.toArray() :
+
+ // Return just the object
+ ( num < 0 ? this[ this.length + num ] : this[ num ] );
+ },
+
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function( elems, name, selector ) {
+
+ // Build a new jQuery matched element set
+ var ret = jQuery.merge( this.constructor(), elems );
+
+ // Add the old object onto the stack (as a reference)
+ ret.prevObject = this;
+
+ ret.context = this.context;
+
+ if ( name === "find" ) {
+ ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
+ } else if ( name ) {
+ ret.selector = this.selector + "." + name + "(" + selector + ")";
+ }
+
+ // Return the newly-formed element set
+ return ret;
+ },
+
+ // Execute a callback for every element in the matched set.
+ // (You can seed the arguments with an array of args, but this is
+ // only used internally.)
+ each: function( callback, args ) {
+ return jQuery.each( this, callback, args );
+ },
+
+ ready: function( fn ) {
+ // Add the callback
+ jQuery.ready.promise().done( fn );
+
+ return this;
+ },
+
+ eq: function( i ) {
+ i = +i;
+ return i === -1 ?
+ this.slice( i ) :
+ this.slice( i, i + 1 );
+ },
+
+ first: function() {
+ return this.eq( 0 );
+ },
+
+ last: function() {
+ return this.eq( -1 );
+ },
+
+ slice: function() {
+ return this.pushStack( core_slice.apply( this, arguments ),
+ "slice", core_slice.call(arguments).join(",") );
+ },
+
+ map: function( callback ) {
+ return this.pushStack( jQuery.map(this, function( elem, i ) {
+ return callback.call( elem, i, elem );
+ }));
+ },
+
+ end: function() {
+ return this.prevObject || this.constructor(null);
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: core_push,
+ sort: [].sort,
+ splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[0] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+ target = arguments[1] || {};
+ // skip the boolean and the target
+ i = 2;
+ }
+
+ // Handle case when target is a string or something (possible in deep copy)
+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+ target = {};
+ }
+
+ // extend jQuery itself if only one argument is passed
+ if ( length === i ) {
+ target = this;
+ --i;
+ }
+
+ for ( ; i < length; i++ ) {
+ // Only deal with non-null/undefined values
+ if ( (options = arguments[ i ]) != null ) {
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+ if ( copyIsArray ) {
+ copyIsArray = false;
+ clone = src && jQuery.isArray(src) ? src : [];
+
+ } else {
+ clone = src && jQuery.isPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend({
+ noConflict: function( deep ) {
+ if ( window.$ === jQuery ) {
+ window.$ = _$;
+ }
+
+ if ( deep && window.jQuery === jQuery ) {
+ window.jQuery = _jQuery;
+ }
+
+ return jQuery;
+ },
+
+ // Is the DOM ready to be used? Set to true once it occurs.
+ isReady: false,
+
+ // A counter to track how many items to wait for before
+ // the ready event fires. See #6781
+ readyWait: 1,
+
+ // Hold (or release) the ready event
+ holdReady: function( hold ) {
+ if ( hold ) {
+ jQuery.readyWait++;
+ } else {
+ jQuery.ready( true );
+ }
+ },
+
+ // Handle when the DOM is ready
+ ready: function( wait ) {
+
+ // Abort if there are pending holds or we're already ready
+ if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
+ return;
+ }
+
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+ if ( !document.body ) {
+ return setTimeout( jQuery.ready, 1 );
+ }
+
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If a normal DOM Ready event fired, decrement, and wait if need be
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
+ return;
+ }
+
+ // If there are functions bound, to execute
+ readyList.resolveWith( document, [ jQuery ] );
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.trigger ) {
+ jQuery( document ).trigger("ready").off("ready");
+ }
+ },
+
+ // See test/unit/core.js for details concerning isFunction.
+ // Since version 1.3, DOM methods and functions like alert
+ // aren't supported. They return false on IE (#2968).
+ isFunction: function( obj ) {
+ return jQuery.type(obj) === "function";
+ },
+
+ isArray: Array.isArray || function( obj ) {
+ return jQuery.type(obj) === "array";
+ },
+
+ isWindow: function( obj ) {
+ return obj != null && obj == obj.window;
+ },
+
+ isNumeric: function( obj ) {
+ return !isNaN( parseFloat(obj) ) && isFinite( obj );
+ },
+
+ type: function( obj ) {
+ return obj == null ?
+ String( obj ) :
+ class2type[ core_toString.call(obj) ] || "object";
+ },
+
+ isPlainObject: function( obj ) {
+ // Must be an Object.
+ // Because of IE, we also have to check the presence of the constructor property.
+ // Make sure that DOM nodes and window objects don't pass through, as well
+ if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ try {
+ // Not own constructor property must be Object
+ if ( obj.constructor &&
+ !core_hasOwn.call(obj, "constructor") &&
+ !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+ return false;
+ }
+ } catch ( e ) {
+ // IE8,9 Will throw exceptions on certain host objects #9897
+ return false;
+ }
+
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+
+ var key;
+ for ( key in obj ) {}
+
+ return key === undefined || core_hasOwn.call( obj, key );
+ },
+
+ isEmptyObject: function( obj ) {
+ var name;
+ for ( name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ error: function( msg ) {
+ throw new Error( msg );
+ },
+
+ // data: string of html
+ // context (optional): If specified, the fragment will be created in this context, defaults to document
+ // scripts (optional): If true, will include scripts passed in the html string
+ parseHTML: function( data, context, scripts ) {
+ var parsed;
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+ if ( typeof context === "boolean" ) {
+ scripts = context;
+ context = 0;
+ }
+ context = context || document;
+
+ // Single tag
+ if ( (parsed = rsingleTag.exec( data )) ) {
+ return [ context.createElement( parsed[1] ) ];
+ }
+
+ parsed = jQuery.buildFragment( [ data ], context, scripts ? null : [] );
+ return jQuery.merge( [],
+ (parsed.cacheable ? jQuery.clone( parsed.fragment ) : parsed.fragment).childNodes );
+ },
+
+ parseJSON: function( data ) {
+ if ( !data || typeof data !== "string") {
+ return null;
+ }
+
+ // Make sure leading/trailing whitespace is removed (IE can't handle it)
+ data = jQuery.trim( data );
+
+ // Attempt to parse using the native JSON parser first
+ if ( window.JSON && window.JSON.parse ) {
+ return window.JSON.parse( data );
+ }
+
+ // Make sure the incoming data is actual JSON
+ // Logic borrowed from http://json.org/json2.js
+ if ( rvalidchars.test( data.replace( rvalidescape, "@" )
+ .replace( rvalidtokens, "]" )
+ .replace( rvalidbraces, "")) ) {
+
+ return ( new Function( "return " + data ) )();
+
+ }
+ jQuery.error( "Invalid JSON: " + data );
+ },
+
+ // Cross-browser xml parsing
+ parseXML: function( data ) {
+ var xml, tmp;
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+ try {
+ if ( window.DOMParser ) { // Standard
+ tmp = new DOMParser();
+ xml = tmp.parseFromString( data , "text/xml" );
+ } else { // IE
+ xml = new ActiveXObject( "Microsoft.XMLDOM" );
+ xml.async = "false";
+ xml.loadXML( data );
+ }
+ } catch( e ) {
+ xml = undefined;
+ }
+ if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
+ jQuery.error( "Invalid XML: " + data );
+ }
+ return xml;
+ },
+
+ noop: function() {},
+
+ // Evaluates a script in a global context
+ // Workarounds based on findings by Jim Driscoll
+ // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+ globalEval: function( data ) {
+ if ( data && core_rnotwhite.test( data ) ) {
+ // We use execScript on Internet Explorer
+ // We use an anonymous function so that context is window
+ // rather than jQuery in Firefox
+ ( window.execScript || function( data ) {
+ window[ "eval" ].call( window, data );
+ } )( data );
+ }
+ },
+
+ // Convert dashed to camelCase; used by the css and data modules
+ // Microsoft forgot to hump their vendor prefix (#9572)
+ camelCase: function( string ) {
+ return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+ },
+
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+ },
+
+ // args is for internal usage only
+ each: function( obj, callback, args ) {
+ var name,
+ i = 0,
+ length = obj.length,
+ isObj = length === undefined || jQuery.isFunction( obj );
+
+ if ( args ) {
+ if ( isObj ) {
+ for ( name in obj ) {
+ if ( callback.apply( obj[ name ], args ) === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( ; i < length; ) {
+ if ( callback.apply( obj[ i++ ], args ) === false ) {
+ break;
+ }
+ }
+ }
+
+ // A special, fast, case for the most common use of each
+ } else {
+ if ( isObj ) {
+ for ( name in obj ) {
+ if ( callback.call( obj[ name ], name, obj[ name ] ) === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( ; i < length; ) {
+ if ( callback.call( obj[ i ], i, obj[ i++ ] ) === false ) {
+ break;
+ }
+ }
+ }
+ }
+
+ return obj;
+ },
+
+ // Use native String.trim function wherever possible
+ trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
+ function( text ) {
+ return text == null ?
+ "" :
+ core_trim.call( text );
+ } :
+
+ // Otherwise use our own trimming functionality
+ function( text ) {
+ return text == null ?
+ "" :
+ ( text + "" ).replace( rtrim, "" );
+ },
+
+ // results is for internal usage only
+ makeArray: function( arr, results ) {
+ var type,
+ ret = results || [];
+
+ if ( arr != null ) {
+ // The window, strings (and functions) also have 'length'
+ // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+ type = jQuery.type( arr );
+
+ if ( arr.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( arr ) ) {
+ core_push.call( ret, arr );
+ } else {
+ jQuery.merge( ret, arr );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, arr, i ) {
+ var len;
+
+ if ( arr ) {
+ if ( core_indexOf ) {
+ return core_indexOf.call( arr, elem, i );
+ }
+
+ len = arr.length;
+ i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
+
+ for ( ; i < len; i++ ) {
+ // Skip accessing in sparse arrays
+ if ( i in arr && arr[ i ] === elem ) {
+ return i;
+ }
+ }
+ }
+
+ return -1;
+ },
+
+ merge: function( first, second ) {
+ var l = second.length,
+ i = first.length,
+ j = 0;
+
+ if ( typeof l === "number" ) {
+ for ( ; j < l; j++ ) {
+ first[ i++ ] = second[ j ];
+ }
+
+ } else {
+ while ( second[j] !== undefined ) {
+ first[ i++ ] = second[ j++ ];
+ }
+ }
+
+ first.length = i;
+
+ return first;
+ },
+
+ grep: function( elems, callback, inv ) {
+ var retVal,
+ ret = [],
+ i = 0,
+ length = elems.length;
+ inv = !!inv;
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( ; i < length; i++ ) {
+ retVal = !!callback( elems[ i ], i );
+ if ( inv !== retVal ) {
+ ret.push( elems[ i ] );
+ }
+ }
+
+ return ret;
+ },
+
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var value, key,
+ ret = [],
+ i = 0,
+ length = elems.length,
+ // jquery objects are treated as arrays
+ isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
+
+ // Go through the array, translating each of the items to their
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+
+ // Go through every key on the object,
+ } else {
+ for ( key in elems ) {
+ value = callback( elems[ key ], key, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+ }
+
+ // Flatten any nested arrays
+ return ret.concat.apply( [], ret );
+ },
+
+ // A global GUID counter for objects
+ guid: 1,
+
+ // Bind a function to a context, optionally partially applying any
+ // arguments.
+ proxy: function( fn, context ) {
+ var tmp, args, proxy;
+
+ if ( typeof context === "string" ) {
+ tmp = fn[ context ];
+ context = fn;
+ fn = tmp;
+ }
+
+ // Quick check to determine if target is callable, in the spec
+ // this throws a TypeError, but we will just return undefined.
+ if ( !jQuery.isFunction( fn ) ) {
+ return undefined;
+ }
+
+ // Simulated bind
+ args = core_slice.call( arguments, 2 );
+ proxy = function() {
+ return fn.apply( context, args.concat( core_slice.call( arguments ) ) );
+ };
+
+ // Set the guid of unique handler to the same of original handler, so it can be removed
+ proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+ return proxy;
+ },
+
+ // Multifunctional method to get and set values of a collection
+ // The value/s can optionally be executed if it's a function
+ access: function( elems, fn, key, value, chainable, emptyGet, pass ) {
+ var exec,
+ bulk = key == null,
+ i = 0,
+ length = elems.length;
+
+ // Sets many values
+ if ( key && typeof key === "object" ) {
+ for ( i in key ) {
+ jQuery.access( elems, fn, i, key[i], 1, emptyGet, value );
+ }
+ chainable = 1;
+
+ // Sets one value
+ } else if ( value !== undefined ) {
+ // Optionally, function values get executed if exec is true
+ exec = pass === undefined && jQuery.isFunction( value );
+
+ if ( bulk ) {
+ // Bulk operations only iterate when executing function values
+ if ( exec ) {
+ exec = fn;
+ fn = function( elem, key, value ) {
+ return exec.call( jQuery( elem ), value );
+ };
+
+ // Otherwise they run against the entire set
+ } else {
+ fn.call( elems, value );
+ fn = null;
+ }
+ }
+
+ if ( fn ) {
+ for (; i < length; i++ ) {
+ fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
+ }
+ }
+
+ chainable = 1;
+ }
+
+ return chainable ?
+ elems :
+
+ // Gets
+ bulk ?
+ fn.call( elems ) :
+ length ? fn( elems[0], key ) : emptyGet;
+ },
+
+ now: function() {
+ return ( new Date() ).getTime();
+ }
+});
+
+jQuery.ready.promise = function( obj ) {
+ if ( !readyList ) {
+
+ readyList = jQuery.Deferred();
+
+ // Catch cases where $(document).ready() is called after the browser event has already occurred.
+ // we once tried to use readyState "interactive" here, but it caused issues like the one
+ // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+ if ( document.readyState === "complete" ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ setTimeout( jQuery.ready, 1 );
+
+ // Standards-based browsers support DOMContentLoaded
+ } else if ( document.addEventListener ) {
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", jQuery.ready, false );
+
+ // If IE event model is used
+ } else {
+ // Ensure firing before onload, maybe late but safe also for iframes
+ document.attachEvent( "onreadystatechange", DOMContentLoaded );
+
+ // A fallback to window.onload, that will always work
+ window.attachEvent( "onload", jQuery.ready );
+
+ // If IE and not a frame
+ // continually check to see if the document is ready
+ var top = false;
+
+ try {
+ top = window.frameElement == null && document.documentElement;
+ } catch(e) {}
+
+ if ( top && top.doScroll ) {
+ (function doScrollCheck() {
+ if ( !jQuery.isReady ) {
+
+ try {
+ // Use the trick by Diego Perini
+ // http://javascript.nwbox.com/IEContentLoaded/
+ top.doScroll("left");
+ } catch(e) {
+ return setTimeout( doScrollCheck, 50 );
+ }
+
+ // and execute any waiting functions
+ jQuery.ready();
+ }
+ })();
+ }
+ }
+ }
+ return readyList.promise( obj );
+};
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+// String to Object options format cache
+var optionsCache = {};
+
+// Convert String-formatted options into Object-formatted ones and store in cache
+function createOptions( options ) {
+ var object = optionsCache[ options ] = {};
+ jQuery.each( options.split( core_rspace ), function( _, flag ) {
+ object[ flag ] = true;
+ });
+ return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ * options: an optional list of space-separated options that will change how
+ * the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible options:
+ *
+ * once: will ensure the callback list can only be fired once (like a Deferred)
+ *
+ * memory: will keep track of previous values and will call any callback added
+ * after the list has been fired right away with the latest "memorized"
+ * values (like a Deferred)
+ *
+ * unique: will ensure a callback can only be added once (no duplicate in the list)
+ *
+ * stopOnFalse: interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+ // Convert options from String-formatted to Object-formatted if needed
+ // (we check in cache first)
+ options = typeof options === "string" ?
+ ( optionsCache[ options ] || createOptions( options ) ) :
+ jQuery.extend( {}, options );
+
+ var // Last fire value (for non-forgettable lists)
+ memory,
+ // Flag to know if list was already fired
+ fired,
+ // Flag to know if list is currently firing
+ firing,
+ // First callback to fire (used internally by add and fireWith)
+ firingStart,
+ // End of the loop when firing
+ firingLength,
+ // Index of currently firing callback (modified by remove if needed)
+ firingIndex,
+ // Actual callback list
+ list = [],
+ // Stack of fire calls for repeatable lists
+ stack = !options.once && [],
+ // Fire callbacks
+ fire = function( data ) {
+ memory = options.memory && data;
+ fired = true;
+ firingIndex = firingStart || 0;
+ firingStart = 0;
+ firingLength = list.length;
+ firing = true;
+ for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+ if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
+ memory = false; // To prevent further calls using add
+ break;
+ }
+ }
+ firing = false;
+ if ( list ) {
+ if ( stack ) {
+ if ( stack.length ) {
+ fire( stack.shift() );
+ }
+ } else if ( memory ) {
+ list = [];
+ } else {
+ self.disable();
+ }
+ }
+ },
+ // Actual Callbacks object
+ self = {
+ // Add a callback or a collection of callbacks to the list
+ add: function() {
+ if ( list ) {
+ // First, we save the current length
+ var start = list.length;
+ (function add( args ) {
+ jQuery.each( args, function( _, arg ) {
+ var type = jQuery.type( arg );
+ if ( type === "function" ) {
+ if ( !options.unique || !self.has( arg ) ) {
+ list.push( arg );
+ }
+ } else if ( arg && arg.length && type !== "string" ) {
+ // Inspect recursively
+ add( arg );
+ }
+ });
+ })( arguments );
+ // Do we need to add the callbacks to the
+ // current firing batch?
+ if ( firing ) {
+ firingLength = list.length;
+ // With memory, if we're not firing then
+ // we should call right away
+ } else if ( memory ) {
+ firingStart = start;
+ fire( memory );
+ }
+ }
+ return this;
+ },
+ // Remove a callback from the list
+ remove: function() {
+ if ( list ) {
+ jQuery.each( arguments, function( _, arg ) {
+ var index;
+ while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
+ list.splice( index, 1 );
+ // Handle firing indexes
+ if ( firing ) {
+ if ( index <= firingLength ) {
+ firingLength--;
+ }
+ if ( index <= firingIndex ) {
+ firingIndex--;
+ }
+ }
+ }
+ });
+ }
+ return this;
+ },
+ // Control if a given callback is in the list
+ has: function( fn ) {
+ return jQuery.inArray( fn, list ) > -1;
+ },
+ // Remove all callbacks from the list
+ empty: function() {
+ list = [];
+ return this;
+ },
+ // Have the list do nothing anymore
+ disable: function() {
+ list = stack = memory = undefined;
+ return this;
+ },
+ // Is it disabled?
+ disabled: function() {
+ return !list;
+ },
+ // Lock the list in its current state
+ lock: function() {
+ stack = undefined;
+ if ( !memory ) {
+ self.disable();
+ }
+ return this;
+ },
+ // Is it locked?
+ locked: function() {
+ return !stack;
+ },
+ // Call all callbacks with the given context and arguments
+ fireWith: function( context, args ) {
+ args = args || [];
+ args = [ context, args.slice ? args.slice() : args ];
+ if ( list && ( !fired || stack ) ) {
+ if ( firing ) {
+ stack.push( args );
+ } else {
+ fire( args );
+ }
+ }
+ return this;
+ },
+ // Call all the callbacks with the given arguments
+ fire: function() {
+ self.fireWith( this, arguments );
+ return this;
+ },
+ // To know if the callbacks have already been called at least once
+ fired: function() {
+ return !!fired;
+ }
+ };
+
+ return self;
+};
+jQuery.extend({
+
+ Deferred: function( func ) {
+ var tuples = [
+ // action, add listener, listener list, final state
+ [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
+ [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
+ [ "notify", "progress", jQuery.Callbacks("memory") ]
+ ],
+ state = "pending",
+ promise = {
+ state: function() {
+ return state;
+ },
+ always: function() {
+ deferred.done( arguments ).fail( arguments );
+ return this;
+ },
+ then: function( /* fnDone, fnFail, fnProgress */ ) {
+ var fns = arguments;
+ return jQuery.Deferred(function( newDefer ) {
+ jQuery.each( tuples, function( i, tuple ) {
+ var action = tuple[ 0 ],
+ fn = fns[ i ];
+ // deferred[ done | fail | progress ] for forwarding actions to newDefer
+ deferred[ tuple[1] ]( jQuery.isFunction( fn ) ?
+ function() {
+ var returned = fn.apply( this, arguments );
+ if ( returned && jQuery.isFunction( returned.promise ) ) {
+ returned.promise()
+ .done( newDefer.resolve )
+ .fail( newDefer.reject )
+ .progress( newDefer.notify );
+ } else {
+ newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
+ }
+ } :
+ newDefer[ action ]
+ );
+ });
+ fns = null;
+ }).promise();
+ },
+ // Get a promise for this deferred
+ // If obj is provided, the promise aspect is added to the object
+ promise: function( obj ) {
+ return obj != null ? jQuery.extend( obj, promise ) : promise;
+ }
+ },
+ deferred = {};
+
+ // Keep pipe for back-compat
+ promise.pipe = promise.then;
+
+ // Add list-specific methods
+ jQuery.each( tuples, function( i, tuple ) {
+ var list = tuple[ 2 ],
+ stateString = tuple[ 3 ];
+
+ // promise[ done | fail | progress ] = list.add
+ promise[ tuple[1] ] = list.add;
+
+ // Handle state
+ if ( stateString ) {
+ list.add(function() {
+ // state = [ resolved | rejected ]
+ state = stateString;
+
+ // [ reject_list | resolve_list ].disable; progress_list.lock
+ }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
+ }
+
+ // deferred[ resolve | reject | notify ] = list.fire
+ deferred[ tuple[0] ] = list.fire;
+ deferred[ tuple[0] + "With" ] = list.fireWith;
+ });
+
+ // Make the deferred a promise
+ promise.promise( deferred );
+
+ // Call given func if any
+ if ( func ) {
+ func.call( deferred, deferred );
+ }
+
+ // All done!
+ return deferred;
+ },
+
+ // Deferred helper
+ when: function( subordinate /* , ..., subordinateN */ ) {
+ var i = 0,
+ resolveValues = core_slice.call( arguments ),
+ length = resolveValues.length,
+
+ // the count of uncompleted subordinates
+ remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
+
+ // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
+ deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
+
+ // Update function for both resolve and progress values
+ updateFunc = function( i, contexts, values ) {
+ return function( value ) {
+ contexts[ i ] = this;
+ values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
+ if( values === progressValues ) {
+ deferred.notifyWith( contexts, values );
+ } else if ( !( --remaining ) ) {
+ deferred.resolveWith( contexts, values );
+ }
+ };
+ },
+
+ progressValues, progressContexts, resolveContexts;
+
+ // add listeners to Deferred subordinates; treat others as resolved
+ if ( length > 1 ) {
+ progressValues = new Array( length );
+ progressContexts = new Array( length );
+ resolveContexts = new Array( length );
+ for ( ; i < length; i++ ) {
+ if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
+ resolveValues[ i ].promise()
+ .done( updateFunc( i, resolveContexts, resolveValues ) )
+ .fail( deferred.reject )
+ .progress( updateFunc( i, progressContexts, progressValues ) );
+ } else {
+ --remaining;
+ }
+ }
+ }
+
+ // if we're not waiting on anything, resolve the master
+ if ( !remaining ) {
+ deferred.resolveWith( resolveContexts, resolveValues );
+ }
+
+ return deferred.promise();
+ }
+});
+jQuery.support = (function() {
+
+ var support,
+ all,
+ a,
+ select,
+ opt,
+ input,
+ fragment,
+ eventName,
+ i,
+ isSupported,
+ clickFn,
+ div = document.createElement("div");
+
+ // Setup
+ div.setAttribute( "className", "t" );
+ div.innerHTML = " a ";
+
+ // Support tests won't run in some limited or non-browser environments
+ all = div.getElementsByTagName("*");
+ a = div.getElementsByTagName("a")[ 0 ];
+ if ( !all || !a || !all.length ) {
+ return {};
+ }
+
+ // First batch of tests
+ select = document.createElement("select");
+ opt = select.appendChild( document.createElement("option") );
+ input = div.getElementsByTagName("input")[ 0 ];
+
+ a.style.cssText = "top:1px;float:left;opacity:.5";
+ support = {
+ // IE strips leading whitespace when .innerHTML is used
+ leadingWhitespace: ( div.firstChild.nodeType === 3 ),
+
+ // Make sure that tbody elements aren't automatically inserted
+ // IE will insert them into empty tables
+ tbody: !div.getElementsByTagName("tbody").length,
+
+ // Make sure that link elements get serialized correctly by innerHTML
+ // This requires a wrapper element in IE
+ htmlSerialize: !!div.getElementsByTagName("link").length,
+
+ // Get the style information from getAttribute
+ // (IE uses .cssText instead)
+ style: /top/.test( a.getAttribute("style") ),
+
+ // Make sure that URLs aren't manipulated
+ // (IE normalizes it by default)
+ hrefNormalized: ( a.getAttribute("href") === "/a" ),
+
+ // Make sure that element opacity exists
+ // (IE uses filter instead)
+ // Use a regex to work around a WebKit issue. See #5145
+ opacity: /^0.5/.test( a.style.opacity ),
+
+ // Verify style float existence
+ // (IE uses styleFloat instead of cssFloat)
+ cssFloat: !!a.style.cssFloat,
+
+ // Make sure that if no value is specified for a checkbox
+ // that it defaults to "on".
+ // (WebKit defaults to "" instead)
+ checkOn: ( input.value === "on" ),
+
+ // Make sure that a selected-by-default option has a working selected property.
+ // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+ optSelected: opt.selected,
+
+ // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+ getSetAttribute: div.className !== "t",
+
+ // Tests for enctype support on a form (#6743)
+ enctype: !!document.createElement("form").enctype,
+
+ // Makes sure cloning an html5 element does not cause problems
+ // Where outerHTML is undefined, this still works
+ html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>",
+
+ // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
+ boxModel: ( document.compatMode === "CSS1Compat" ),
+
+ // Will be defined later
+ submitBubbles: true,
+ changeBubbles: true,
+ focusinBubbles: false,
+ deleteExpando: true,
+ noCloneEvent: true,
+ inlineBlockNeedsLayout: false,
+ shrinkWrapBlocks: false,
+ reliableMarginRight: true,
+ boxSizingReliable: true,
+ pixelPosition: false
+ };
+
+ // Make sure checked status is properly cloned
+ input.checked = true;
+ support.noCloneChecked = input.cloneNode( true ).checked;
+
+ // Make sure that the options inside disabled selects aren't marked as disabled
+ // (WebKit marks them as disabled)
+ select.disabled = true;
+ support.optDisabled = !opt.disabled;
+
+ // Test to see if it's possible to delete an expando from an element
+ // Fails in Internet Explorer
+ try {
+ delete div.test;
+ } catch( e ) {
+ support.deleteExpando = false;
+ }
+
+ if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
+ div.attachEvent( "onclick", clickFn = function() {
+ // Cloning a node shouldn't copy over any
+ // bound event handlers (IE does this)
+ support.noCloneEvent = false;
+ });
+ div.cloneNode( true ).fireEvent("onclick");
+ div.detachEvent( "onclick", clickFn );
+ }
+
+ // Check if a radio maintains its value
+ // after being appended to the DOM
+ input = document.createElement("input");
+ input.value = "t";
+ input.setAttribute( "type", "radio" );
+ support.radioValue = input.value === "t";
+
+ input.setAttribute( "checked", "checked" );
+
+ // #11217 - WebKit loses check when the name is after the checked attribute
+ input.setAttribute( "name", "t" );
+
+ div.appendChild( input );
+ fragment = document.createDocumentFragment();
+ fragment.appendChild( div.lastChild );
+
+ // WebKit doesn't clone checked state correctly in fragments
+ support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+ // Check if a disconnected checkbox will retain its checked
+ // value of true after appended to the DOM (IE6/7)
+ support.appendChecked = input.checked;
+
+ fragment.removeChild( input );
+ fragment.appendChild( div );
+
+ // Technique from Juriy Zaytsev
+ // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
+ // We only care about the case where non-standard event systems
+ // are used, namely in IE. Short-circuiting here helps us to
+ // avoid an eval call (in setAttribute) which can cause CSP
+ // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
+ if ( div.attachEvent ) {
+ for ( i in {
+ submit: true,
+ change: true,
+ focusin: true
+ }) {
+ eventName = "on" + i;
+ isSupported = ( eventName in div );
+ if ( !isSupported ) {
+ div.setAttribute( eventName, "return;" );
+ isSupported = ( typeof div[ eventName ] === "function" );
+ }
+ support[ i + "Bubbles" ] = isSupported;
+ }
+ }
+
+ // Run tests that need a body at doc ready
+ jQuery(function() {
+ var container, div, tds, marginDiv,
+ divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;",
+ body = document.getElementsByTagName("body")[0];
+
+ if ( !body ) {
+ // Return for frameset docs that don't have a body
+ return;
+ }
+
+ container = document.createElement("div");
+ container.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px";
+ body.insertBefore( container, body.firstChild );
+
+ // Construct the test element
+ div = document.createElement("div");
+ container.appendChild( div );
+
+ // Check if table cells still have offsetWidth/Height when they are set
+ // to display:none and there are still other visible table cells in a
+ // table row; if so, offsetWidth/Height are not reliable for use when
+ // determining if an element has been hidden directly using
+ // display:none (it is still safe to use offsets if a parent element is
+ // hidden; don safety goggles and see bug #4512 for more information).
+ // (only IE 8 fails this test)
+ div.innerHTML = "";
+ tds = div.getElementsByTagName("td");
+ tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
+ isSupported = ( tds[ 0 ].offsetHeight === 0 );
+
+ tds[ 0 ].style.display = "";
+ tds[ 1 ].style.display = "none";
+
+ // Check if empty table cells still have offsetWidth/Height
+ // (IE <= 8 fail this test)
+ support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
+
+ // Check box-sizing and margin behavior
+ div.innerHTML = "";
+ div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
+ support.boxSizing = ( div.offsetWidth === 4 );
+ support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );
+
+ // NOTE: To any future maintainer, we've window.getComputedStyle
+ // because jsdom on node.js will break without it.
+ if ( window.getComputedStyle ) {
+ support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
+ support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
+
+ // Check if div with explicit width and no margin-right incorrectly
+ // gets computed margin-right based on width of container. For more
+ // info see bug #3333
+ // Fails in WebKit before Feb 2011 nightlies
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ marginDiv = document.createElement("div");
+ marginDiv.style.cssText = div.style.cssText = divReset;
+ marginDiv.style.marginRight = marginDiv.style.width = "0";
+ div.style.width = "1px";
+ div.appendChild( marginDiv );
+ support.reliableMarginRight =
+ !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
+ }
+
+ if ( typeof div.style.zoom !== "undefined" ) {
+ // Check if natively block-level elements act like inline-block
+ // elements when setting their display to 'inline' and giving
+ // them layout
+ // (IE < 8 does this)
+ div.innerHTML = "";
+ div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
+ support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
+
+ // Check if elements with layout shrink-wrap their children
+ // (IE 6 does this)
+ div.style.display = "block";
+ div.style.overflow = "visible";
+ div.innerHTML = "
";
+ div.firstChild.style.width = "5px";
+ support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
+
+ container.style.zoom = 1;
+ }
+
+ // Null elements to avoid leaks in IE
+ body.removeChild( container );
+ container = div = tds = marginDiv = null;
+ });
+
+ // Null elements to avoid leaks in IE
+ fragment.removeChild( div );
+ all = a = select = opt = input = fragment = div = null;
+
+ return support;
+})();
+var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
+ rmultiDash = /([A-Z])/g;
+
+jQuery.extend({
+ cache: {},
+
+ deletedIds: [],
+
+ // Remove at next major release (1.9/2.0)
+ uuid: 0,
+
+ // Unique for each copy of jQuery on the page
+ // Non-digits removed to match rinlinejQuery
+ expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
+
+ // The following elements throw uncatchable exceptions if you
+ // attempt to add expando properties to them.
+ noData: {
+ "embed": true,
+ // Ban all objects except for Flash (which handle expandos)
+ "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
+ "applet": true
+ },
+
+ hasData: function( elem ) {
+ elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
+ return !!elem && !isEmptyDataObject( elem );
+ },
+
+ data: function( elem, name, data, pvt /* Internal Use Only */ ) {
+ if ( !jQuery.acceptData( elem ) ) {
+ return;
+ }
+
+ var thisCache, ret,
+ internalKey = jQuery.expando,
+ getByName = typeof name === "string",
+
+ // We have to handle DOM nodes and JS objects differently because IE6-7
+ // can't GC object references properly across the DOM-JS boundary
+ isNode = elem.nodeType,
+
+ // Only DOM nodes need the global jQuery cache; JS object data is
+ // attached directly to the object so GC can occur automatically
+ cache = isNode ? jQuery.cache : elem,
+
+ // Only defining an ID for JS objects if its cache already exists allows
+ // the code to shortcut on the same path as a DOM node with no cache
+ id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
+
+ // Avoid doing any more work than we need to when trying to get data on an
+ // object that has no data at all
+ if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) {
+ return;
+ }
+
+ if ( !id ) {
+ // Only DOM nodes need a new unique ID for each element since their data
+ // ends up in the global cache
+ if ( isNode ) {
+ elem[ internalKey ] = id = jQuery.deletedIds.pop() || jQuery.guid++;
+ } else {
+ id = internalKey;
+ }
+ }
+
+ if ( !cache[ id ] ) {
+ cache[ id ] = {};
+
+ // Avoids exposing jQuery metadata on plain JS objects when the object
+ // is serialized using JSON.stringify
+ if ( !isNode ) {
+ cache[ id ].toJSON = jQuery.noop;
+ }
+ }
+
+ // An object can be passed to jQuery.data instead of a key/value pair; this gets
+ // shallow copied over onto the existing cache
+ if ( typeof name === "object" || typeof name === "function" ) {
+ if ( pvt ) {
+ cache[ id ] = jQuery.extend( cache[ id ], name );
+ } else {
+ cache[ id ].data = jQuery.extend( cache[ id ].data, name );
+ }
+ }
+
+ thisCache = cache[ id ];
+
+ // jQuery data() is stored in a separate object inside the object's internal data
+ // cache in order to avoid key collisions between internal data and user-defined
+ // data.
+ if ( !pvt ) {
+ if ( !thisCache.data ) {
+ thisCache.data = {};
+ }
+
+ thisCache = thisCache.data;
+ }
+
+ if ( data !== undefined ) {
+ thisCache[ jQuery.camelCase( name ) ] = data;
+ }
+
+ // Check for both converted-to-camel and non-converted data property names
+ // If a data property was specified
+ if ( getByName ) {
+
+ // First Try to find as-is property data
+ ret = thisCache[ name ];
+
+ // Test for null|undefined property data
+ if ( ret == null ) {
+
+ // Try to find the camelCased property
+ ret = thisCache[ jQuery.camelCase( name ) ];
+ }
+ } else {
+ ret = thisCache;
+ }
+
+ return ret;
+ },
+
+ removeData: function( elem, name, pvt /* Internal Use Only */ ) {
+ if ( !jQuery.acceptData( elem ) ) {
+ return;
+ }
+
+ var thisCache, i, l,
+
+ isNode = elem.nodeType,
+
+ // See jQuery.data for more information
+ cache = isNode ? jQuery.cache : elem,
+ id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
+
+ // If there is already no cache entry for this object, there is no
+ // purpose in continuing
+ if ( !cache[ id ] ) {
+ return;
+ }
+
+ if ( name ) {
+
+ thisCache = pvt ? cache[ id ] : cache[ id ].data;
+
+ if ( thisCache ) {
+
+ // Support array or space separated string names for data keys
+ if ( !jQuery.isArray( name ) ) {
+
+ // try the string as a key before any manipulation
+ if ( name in thisCache ) {
+ name = [ name ];
+ } else {
+
+ // split the camel cased version by spaces unless a key with the spaces exists
+ name = jQuery.camelCase( name );
+ if ( name in thisCache ) {
+ name = [ name ];
+ } else {
+ name = name.split(" ");
+ }
+ }
+ }
+
+ for ( i = 0, l = name.length; i < l; i++ ) {
+ delete thisCache[ name[i] ];
+ }
+
+ // If there is no data left in the cache, we want to continue
+ // and let the cache object itself get destroyed
+ if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
+ return;
+ }
+ }
+ }
+
+ // See jQuery.data for more information
+ if ( !pvt ) {
+ delete cache[ id ].data;
+
+ // Don't destroy the parent cache unless the internal data object
+ // had been the only thing left in it
+ if ( !isEmptyDataObject( cache[ id ] ) ) {
+ return;
+ }
+ }
+
+ // Destroy the cache
+ if ( isNode ) {
+ jQuery.cleanData( [ elem ], true );
+
+ // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
+ } else if ( jQuery.support.deleteExpando || cache != cache.window ) {
+ delete cache[ id ];
+
+ // When all else fails, null
+ } else {
+ cache[ id ] = null;
+ }
+ },
+
+ // For internal use only.
+ _data: function( elem, name, data ) {
+ return jQuery.data( elem, name, data, true );
+ },
+
+ // A method for determining if a DOM node can handle the data expando
+ acceptData: function( elem ) {
+ var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+ // nodes accept data unless otherwise specified; rejection can be conditional
+ return !noData || noData !== true && elem.getAttribute("classid") === noData;
+ }
+});
+
+jQuery.fn.extend({
+ data: function( key, value ) {
+ var parts, part, attr, name, l,
+ elem = this[0],
+ i = 0,
+ data = null;
+
+ // Gets all values
+ if ( key === undefined ) {
+ if ( this.length ) {
+ data = jQuery.data( elem );
+
+ if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
+ attr = elem.attributes;
+ for ( l = attr.length; i < l; i++ ) {
+ name = attr[i].name;
+
+ if ( !name.indexOf( "data-" ) ) {
+ name = jQuery.camelCase( name.substring(5) );
+
+ dataAttr( elem, name, data[ name ] );
+ }
+ }
+ jQuery._data( elem, "parsedAttrs", true );
+ }
+ }
+
+ return data;
+ }
+
+ // Sets multiple values
+ if ( typeof key === "object" ) {
+ return this.each(function() {
+ jQuery.data( this, key );
+ });
+ }
+
+ parts = key.split( ".", 2 );
+ parts[1] = parts[1] ? "." + parts[1] : "";
+ part = parts[1] + "!";
+
+ return jQuery.access( this, function( value ) {
+
+ if ( value === undefined ) {
+ data = this.triggerHandler( "getData" + part, [ parts[0] ] );
+
+ // Try to fetch any internally stored data first
+ if ( data === undefined && elem ) {
+ data = jQuery.data( elem, key );
+ data = dataAttr( elem, key, data );
+ }
+
+ return data === undefined && parts[1] ?
+ this.data( parts[0] ) :
+ data;
+ }
+
+ parts[1] = value;
+ this.each(function() {
+ var self = jQuery( this );
+
+ self.triggerHandler( "setData" + part, parts );
+ jQuery.data( this, key, value );
+ self.triggerHandler( "changeData" + part, parts );
+ });
+ }, null, value, arguments.length > 1, null, false );
+ },
+
+ removeData: function( key ) {
+ return this.each(function() {
+ jQuery.removeData( this, key );
+ });
+ }
+});
+
+function dataAttr( elem, key, data ) {
+ // If nothing was found internally, try to fetch any
+ // data from the HTML5 data-* attribute
+ if ( data === undefined && elem.nodeType === 1 ) {
+
+ var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
+
+ data = elem.getAttribute( name );
+
+ if ( typeof data === "string" ) {
+ try {
+ data = data === "true" ? true :
+ data === "false" ? false :
+ data === "null" ? null :
+ // Only convert to a number if it doesn't change the string
+ +data + "" === data ? +data :
+ rbrace.test( data ) ? jQuery.parseJSON( data ) :
+ data;
+ } catch( e ) {}
+
+ // Make sure we set the data so it isn't changed later
+ jQuery.data( elem, key, data );
+
+ } else {
+ data = undefined;
+ }
+ }
+
+ return data;
+}
+
+// checks a cache object for emptiness
+function isEmptyDataObject( obj ) {
+ var name;
+ for ( name in obj ) {
+
+ // if the public data object is empty, the private is still empty
+ if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
+ continue;
+ }
+ if ( name !== "toJSON" ) {
+ return false;
+ }
+ }
+
+ return true;
+}
+jQuery.extend({
+ queue: function( elem, type, data ) {
+ var queue;
+
+ if ( elem ) {
+ type = ( type || "fx" ) + "queue";
+ queue = jQuery._data( elem, type );
+
+ // Speed up dequeue by getting out quickly if this is just a lookup
+ if ( data ) {
+ if ( !queue || jQuery.isArray(data) ) {
+ queue = jQuery._data( elem, type, jQuery.makeArray(data) );
+ } else {
+ queue.push( data );
+ }
+ }
+ return queue || [];
+ }
+ },
+
+ dequeue: function( elem, type ) {
+ type = type || "fx";
+
+ var queue = jQuery.queue( elem, type ),
+ startLength = queue.length,
+ fn = queue.shift(),
+ hooks = jQuery._queueHooks( elem, type ),
+ next = function() {
+ jQuery.dequeue( elem, type );
+ };
+
+ // If the fx queue is dequeued, always remove the progress sentinel
+ if ( fn === "inprogress" ) {
+ fn = queue.shift();
+ startLength--;
+ }
+
+ if ( fn ) {
+
+ // Add a progress sentinel to prevent the fx queue from being
+ // automatically dequeued
+ if ( type === "fx" ) {
+ queue.unshift( "inprogress" );
+ }
+
+ // clear up the last queue stop function
+ delete hooks.stop;
+ fn.call( elem, next, hooks );
+ }
+
+ if ( !startLength && hooks ) {
+ hooks.empty.fire();
+ }
+ },
+
+ // not intended for public consumption - generates a queueHooks object, or returns the current one
+ _queueHooks: function( elem, type ) {
+ var key = type + "queueHooks";
+ return jQuery._data( elem, key ) || jQuery._data( elem, key, {
+ empty: jQuery.Callbacks("once memory").add(function() {
+ jQuery.removeData( elem, type + "queue", true );
+ jQuery.removeData( elem, key, true );
+ })
+ });
+ }
+});
+
+jQuery.fn.extend({
+ queue: function( type, data ) {
+ var setter = 2;
+
+ if ( typeof type !== "string" ) {
+ data = type;
+ type = "fx";
+ setter--;
+ }
+
+ if ( arguments.length < setter ) {
+ return jQuery.queue( this[0], type );
+ }
+
+ return data === undefined ?
+ this :
+ this.each(function() {
+ var queue = jQuery.queue( this, type, data );
+
+ // ensure a hooks for this queue
+ jQuery._queueHooks( this, type );
+
+ if ( type === "fx" && queue[0] !== "inprogress" ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ dequeue: function( type ) {
+ return this.each(function() {
+ jQuery.dequeue( this, type );
+ });
+ },
+ // Based off of the plugin by Clint Helfers, with permission.
+ // http://blindsignals.com/index.php/2009/07/jquery-delay/
+ delay: function( time, type ) {
+ time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+ type = type || "fx";
+
+ return this.queue( type, function( next, hooks ) {
+ var timeout = setTimeout( next, time );
+ hooks.stop = function() {
+ clearTimeout( timeout );
+ };
+ });
+ },
+ clearQueue: function( type ) {
+ return this.queue( type || "fx", [] );
+ },
+ // Get a promise resolved when queues of a certain type
+ // are emptied (fx is the type by default)
+ promise: function( type, obj ) {
+ var tmp,
+ count = 1,
+ defer = jQuery.Deferred(),
+ elements = this,
+ i = this.length,
+ resolve = function() {
+ if ( !( --count ) ) {
+ defer.resolveWith( elements, [ elements ] );
+ }
+ };
+
+ if ( typeof type !== "string" ) {
+ obj = type;
+ type = undefined;
+ }
+ type = type || "fx";
+
+ while( i-- ) {
+ tmp = jQuery._data( elements[ i ], type + "queueHooks" );
+ if ( tmp && tmp.empty ) {
+ count++;
+ tmp.empty.add( resolve );
+ }
+ }
+ resolve();
+ return defer.promise( obj );
+ }
+});
+var nodeHook, boolHook, fixSpecified,
+ rclass = /[\t\r\n]/g,
+ rreturn = /\r/g,
+ rtype = /^(?:button|input)$/i,
+ rfocusable = /^(?:button|input|object|select|textarea)$/i,
+ rclickable = /^a(?:rea|)$/i,
+ rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
+ getSetAttribute = jQuery.support.getSetAttribute;
+
+jQuery.fn.extend({
+ attr: function( name, value ) {
+ return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
+ },
+
+ removeAttr: function( name ) {
+ return this.each(function() {
+ jQuery.removeAttr( this, name );
+ });
+ },
+
+ prop: function( name, value ) {
+ return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
+ },
+
+ removeProp: function( name ) {
+ name = jQuery.propFix[ name ] || name;
+ return this.each(function() {
+ // try/catch handles cases where IE balks (such as removing a property on window)
+ try {
+ this[ name ] = undefined;
+ delete this[ name ];
+ } catch( e ) {}
+ });
+ },
+
+ addClass: function( value ) {
+ var classNames, i, l, elem,
+ setClass, c, cl;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).addClass( value.call(this, j, this.className) );
+ });
+ }
+
+ if ( value && typeof value === "string" ) {
+ classNames = value.split( core_rspace );
+
+ for ( i = 0, l = this.length; i < l; i++ ) {
+ elem = this[ i ];
+
+ if ( elem.nodeType === 1 ) {
+ if ( !elem.className && classNames.length === 1 ) {
+ elem.className = value;
+
+ } else {
+ setClass = " " + elem.className + " ";
+
+ for ( c = 0, cl = classNames.length; c < cl; c++ ) {
+ if ( setClass.indexOf( " " + classNames[ c ] + " " ) < 0 ) {
+ setClass += classNames[ c ] + " ";
+ }
+ }
+ elem.className = jQuery.trim( setClass );
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ removeClass: function( value ) {
+ var removes, className, elem, c, cl, i, l;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).removeClass( value.call(this, j, this.className) );
+ });
+ }
+ if ( (value && typeof value === "string") || value === undefined ) {
+ removes = ( value || "" ).split( core_rspace );
+
+ for ( i = 0, l = this.length; i < l; i++ ) {
+ elem = this[ i ];
+ if ( elem.nodeType === 1 && elem.className ) {
+
+ className = (" " + elem.className + " ").replace( rclass, " " );
+
+ // loop over each item in the removal list
+ for ( c = 0, cl = removes.length; c < cl; c++ ) {
+ // Remove until there is nothing to remove,
+ while ( className.indexOf(" " + removes[ c ] + " ") >= 0 ) {
+ className = className.replace( " " + removes[ c ] + " " , " " );
+ }
+ }
+ elem.className = value ? jQuery.trim( className ) : "";
+ }
+ }
+ }
+
+ return this;
+ },
+
+ toggleClass: function( value, stateVal ) {
+ var type = typeof value,
+ isBool = typeof stateVal === "boolean";
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+ });
+ }
+
+ return this.each(function() {
+ if ( type === "string" ) {
+ // toggle individual class names
+ var className,
+ i = 0,
+ self = jQuery( this ),
+ state = stateVal,
+ classNames = value.split( core_rspace );
+
+ while ( (className = classNames[ i++ ]) ) {
+ // check each className given, space separated list
+ state = isBool ? state : !self.hasClass( className );
+ self[ state ? "addClass" : "removeClass" ]( className );
+ }
+
+ } else if ( type === "undefined" || type === "boolean" ) {
+ if ( this.className ) {
+ // store className if set
+ jQuery._data( this, "__className__", this.className );
+ }
+
+ // toggle whole className
+ this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
+ }
+ });
+ },
+
+ hasClass: function( selector ) {
+ var className = " " + selector + " ",
+ i = 0,
+ l = this.length;
+ for ( ; i < l; i++ ) {
+ if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
+ return true;
+ }
+ }
+
+ return false;
+ },
+
+ val: function( value ) {
+ var hooks, ret, isFunction,
+ elem = this[0];
+
+ if ( !arguments.length ) {
+ if ( elem ) {
+ hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+ return ret;
+ }
+
+ ret = elem.value;
+
+ return typeof ret === "string" ?
+ // handle most common string cases
+ ret.replace(rreturn, "") :
+ // handle cases where value is null/undef or number
+ ret == null ? "" : ret;
+ }
+
+ return;
+ }
+
+ isFunction = jQuery.isFunction( value );
+
+ return this.each(function( i ) {
+ var val,
+ self = jQuery(this);
+
+ if ( this.nodeType !== 1 ) {
+ return;
+ }
+
+ if ( isFunction ) {
+ val = value.call( this, i, self.val() );
+ } else {
+ val = value;
+ }
+
+ // Treat null/undefined as ""; convert numbers to string
+ if ( val == null ) {
+ val = "";
+ } else if ( typeof val === "number" ) {
+ val += "";
+ } else if ( jQuery.isArray( val ) ) {
+ val = jQuery.map(val, function ( value ) {
+ return value == null ? "" : value + "";
+ });
+ }
+
+ hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+ // If set returns undefined, fall back to normal setting
+ if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
+ this.value = val;
+ }
+ });
+ }
+});
+
+jQuery.extend({
+ valHooks: {
+ option: {
+ get: function( elem ) {
+ // attributes.value is undefined in Blackberry 4.7 but
+ // uses .value. See #6932
+ var val = elem.attributes.value;
+ return !val || val.specified ? elem.value : elem.text;
+ }
+ },
+ select: {
+ get: function( elem ) {
+ var value, option,
+ options = elem.options,
+ index = elem.selectedIndex,
+ one = elem.type === "select-one" || index < 0,
+ values = one ? null : [],
+ max = one ? index + 1 : options.length,
+ i = index < 0 ?
+ max :
+ one ? index : 0;
+
+ // Loop through all the selected options
+ for ( ; i < max; i++ ) {
+ option = options[ i ];
+
+ // oldIE doesn't update selected after form reset (#2551)
+ if ( ( option.selected || i === index ) &&
+ // Don't return options that are disabled or in a disabled optgroup
+ ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
+ ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
+
+ // Get the specific value for the option
+ value = jQuery( option ).val();
+
+ // We don't need an array for one selects
+ if ( one ) {
+ return value;
+ }
+
+ // Multi-Selects return an array
+ values.push( value );
+ }
+ }
+
+ return values;
+ },
+
+ set: function( elem, value ) {
+ var values = jQuery.makeArray( value );
+
+ jQuery(elem).find("option").each(function() {
+ this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
+ });
+
+ if ( !values.length ) {
+ elem.selectedIndex = -1;
+ }
+ return values;
+ }
+ }
+ },
+
+ // Unused in 1.8, left in so attrFn-stabbers won't die; remove in 1.9
+ attrFn: {},
+
+ attr: function( elem, name, value, pass ) {
+ var ret, hooks, notxml,
+ nType = elem.nodeType;
+
+ // don't get/set attributes on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ if ( pass && jQuery.isFunction( jQuery.fn[ name ] ) ) {
+ return jQuery( elem )[ name ]( value );
+ }
+
+ // Fallback to prop when attributes are not supported
+ if ( typeof elem.getAttribute === "undefined" ) {
+ return jQuery.prop( elem, name, value );
+ }
+
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+ // All attributes are lowercase
+ // Grab necessary hook if one is defined
+ if ( notxml ) {
+ name = name.toLowerCase();
+ hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
+ }
+
+ if ( value !== undefined ) {
+
+ if ( value === null ) {
+ jQuery.removeAttr( elem, name );
+ return;
+
+ } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ elem.setAttribute( name, value + "" );
+ return value;
+ }
+
+ } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
+ return ret;
+
+ } else {
+
+ ret = elem.getAttribute( name );
+
+ // Non-existent attributes return null, we normalize to undefined
+ return ret === null ?
+ undefined :
+ ret;
+ }
+ },
+
+ removeAttr: function( elem, value ) {
+ var propName, attrNames, name, isBool,
+ i = 0;
+
+ if ( value && elem.nodeType === 1 ) {
+
+ attrNames = value.split( core_rspace );
+
+ for ( ; i < attrNames.length; i++ ) {
+ name = attrNames[ i ];
+
+ if ( name ) {
+ propName = jQuery.propFix[ name ] || name;
+ isBool = rboolean.test( name );
+
+ // See #9699 for explanation of this approach (setting first, then removal)
+ // Do not do this for boolean attributes (see #10870)
+ if ( !isBool ) {
+ jQuery.attr( elem, name, "" );
+ }
+ elem.removeAttribute( getSetAttribute ? name : propName );
+
+ // Set corresponding property to false for boolean attributes
+ if ( isBool && propName in elem ) {
+ elem[ propName ] = false;
+ }
+ }
+ }
+ }
+ },
+
+ attrHooks: {
+ type: {
+ set: function( elem, value ) {
+ // We can't allow the type property to be changed (since it causes problems in IE)
+ if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
+ jQuery.error( "type property can't be changed" );
+ } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
+ // Setting the type on a radio button after the value resets the value in IE6-9
+ // Reset value to it's default in case type is set after value
+ // This is for element creation
+ var val = elem.value;
+ elem.setAttribute( "type", value );
+ if ( val ) {
+ elem.value = val;
+ }
+ return value;
+ }
+ }
+ },
+ // Use the value property for back compat
+ // Use the nodeHook for button elements in IE6/7 (#1954)
+ value: {
+ get: function( elem, name ) {
+ if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+ return nodeHook.get( elem, name );
+ }
+ return name in elem ?
+ elem.value :
+ null;
+ },
+ set: function( elem, value, name ) {
+ if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+ return nodeHook.set( elem, value, name );
+ }
+ // Does not return so that setAttribute is also used
+ elem.value = value;
+ }
+ }
+ },
+
+ propFix: {
+ tabindex: "tabIndex",
+ readonly: "readOnly",
+ "for": "htmlFor",
+ "class": "className",
+ maxlength: "maxLength",
+ cellspacing: "cellSpacing",
+ cellpadding: "cellPadding",
+ rowspan: "rowSpan",
+ colspan: "colSpan",
+ usemap: "useMap",
+ frameborder: "frameBorder",
+ contenteditable: "contentEditable"
+ },
+
+ prop: function( elem, name, value ) {
+ var ret, hooks, notxml,
+ nType = elem.nodeType;
+
+ // don't get/set properties on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+ if ( notxml ) {
+ // Fix name and attach hooks
+ name = jQuery.propFix[ name ] || name;
+ hooks = jQuery.propHooks[ name ];
+ }
+
+ if ( value !== undefined ) {
+ if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ return ( elem[ name ] = value );
+ }
+
+ } else {
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+ return ret;
+
+ } else {
+ return elem[ name ];
+ }
+ }
+ },
+
+ propHooks: {
+ tabIndex: {
+ get: function( elem ) {
+ // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+ // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+ var attributeNode = elem.getAttributeNode("tabindex");
+
+ return attributeNode && attributeNode.specified ?
+ parseInt( attributeNode.value, 10 ) :
+ rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+ 0 :
+ undefined;
+ }
+ }
+ }
+});
+
+// Hook for boolean attributes
+boolHook = {
+ get: function( elem, name ) {
+ // Align boolean attributes with corresponding properties
+ // Fall back to attribute presence where some booleans are not supported
+ var attrNode,
+ property = jQuery.prop( elem, name );
+ return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
+ name.toLowerCase() :
+ undefined;
+ },
+ set: function( elem, value, name ) {
+ var propName;
+ if ( value === false ) {
+ // Remove boolean attributes when set to false
+ jQuery.removeAttr( elem, name );
+ } else {
+ // value is true since we know at this point it's type boolean and not false
+ // Set boolean attributes to the same name and set the DOM property
+ propName = jQuery.propFix[ name ] || name;
+ if ( propName in elem ) {
+ // Only set the IDL specifically if it already exists on the element
+ elem[ propName ] = true;
+ }
+
+ elem.setAttribute( name, name.toLowerCase() );
+ }
+ return name;
+ }
+};
+
+// IE6/7 do not support getting/setting some attributes with get/setAttribute
+if ( !getSetAttribute ) {
+
+ fixSpecified = {
+ name: true,
+ id: true,
+ coords: true
+ };
+
+ // Use this for any attribute in IE6/7
+ // This fixes almost every IE6/7 issue
+ nodeHook = jQuery.valHooks.button = {
+ get: function( elem, name ) {
+ var ret;
+ ret = elem.getAttributeNode( name );
+ return ret && ( fixSpecified[ name ] ? ret.value !== "" : ret.specified ) ?
+ ret.value :
+ undefined;
+ },
+ set: function( elem, value, name ) {
+ // Set the existing or create a new attribute node
+ var ret = elem.getAttributeNode( name );
+ if ( !ret ) {
+ ret = document.createAttribute( name );
+ elem.setAttributeNode( ret );
+ }
+ return ( ret.value = value + "" );
+ }
+ };
+
+ // Set width and height to auto instead of 0 on empty string( Bug #8150 )
+ // This is for removals
+ jQuery.each([ "width", "height" ], function( i, name ) {
+ jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+ set: function( elem, value ) {
+ if ( value === "" ) {
+ elem.setAttribute( name, "auto" );
+ return value;
+ }
+ }
+ });
+ });
+
+ // Set contenteditable to false on removals(#10429)
+ // Setting to empty string throws an error as an invalid value
+ jQuery.attrHooks.contenteditable = {
+ get: nodeHook.get,
+ set: function( elem, value, name ) {
+ if ( value === "" ) {
+ value = "false";
+ }
+ nodeHook.set( elem, value, name );
+ }
+ };
+}
+
+
+// Some attributes require a special call on IE
+if ( !jQuery.support.hrefNormalized ) {
+ jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
+ jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+ get: function( elem ) {
+ var ret = elem.getAttribute( name, 2 );
+ return ret === null ? undefined : ret;
+ }
+ });
+ });
+}
+
+if ( !jQuery.support.style ) {
+ jQuery.attrHooks.style = {
+ get: function( elem ) {
+ // Return undefined in the case of empty string
+ // Normalize to lowercase since IE uppercases css property names
+ return elem.style.cssText.toLowerCase() || undefined;
+ },
+ set: function( elem, value ) {
+ return ( elem.style.cssText = value + "" );
+ }
+ };
+}
+
+// Safari mis-reports the default selected property of an option
+// Accessing the parent's selectedIndex property fixes it
+if ( !jQuery.support.optSelected ) {
+ jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
+ get: function( elem ) {
+ var parent = elem.parentNode;
+
+ if ( parent ) {
+ parent.selectedIndex;
+
+ // Make sure that it also works with optgroups, see #5701
+ if ( parent.parentNode ) {
+ parent.parentNode.selectedIndex;
+ }
+ }
+ return null;
+ }
+ });
+}
+
+// IE6/7 call enctype encoding
+if ( !jQuery.support.enctype ) {
+ jQuery.propFix.enctype = "encoding";
+}
+
+// Radios and checkboxes getter/setter
+if ( !jQuery.support.checkOn ) {
+ jQuery.each([ "radio", "checkbox" ], function() {
+ jQuery.valHooks[ this ] = {
+ get: function( elem ) {
+ // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
+ return elem.getAttribute("value") === null ? "on" : elem.value;
+ }
+ };
+ });
+}
+jQuery.each([ "radio", "checkbox" ], function() {
+ jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
+ set: function( elem, value ) {
+ if ( jQuery.isArray( value ) ) {
+ return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
+ }
+ }
+ });
+});
+var rformElems = /^(?:textarea|input|select)$/i,
+ rtypenamespace = /^([^\.]*|)(?:\.(.+)|)$/,
+ rhoverHack = /(?:^|\s)hover(\.\S+|)\b/,
+ rkeyEvent = /^key/,
+ rmouseEvent = /^(?:mouse|contextmenu)|click/,
+ rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+ hoverHack = function( events ) {
+ return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
+ };
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+ add: function( elem, types, handler, data, selector ) {
+
+ var elemData, eventHandle, events,
+ t, tns, type, namespaces, handleObj,
+ handleObjIn, handlers, special;
+
+ // Don't attach events to noData or text/comment nodes (allow plain objects tho)
+ if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {
+ return;
+ }
+
+ // Caller can pass in an object of custom data in lieu of the handler
+ if ( handler.handler ) {
+ handleObjIn = handler;
+ handler = handleObjIn.handler;
+ selector = handleObjIn.selector;
+ }
+
+ // Make sure that the handler has a unique ID, used to find/remove it later
+ if ( !handler.guid ) {
+ handler.guid = jQuery.guid++;
+ }
+
+ // Init the element's event structure and main handler, if this is the first
+ events = elemData.events;
+ if ( !events ) {
+ elemData.events = events = {};
+ }
+ eventHandle = elemData.handle;
+ if ( !eventHandle ) {
+ elemData.handle = eventHandle = function( e ) {
+ // Discard the second event of a jQuery.event.trigger() and
+ // when an event is called after a page has unloaded
+ return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
+ jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
+ undefined;
+ };
+ // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
+ eventHandle.elem = elem;
+ }
+
+ // Handle multiple events separated by a space
+ // jQuery(...).bind("mouseover mouseout", fn);
+ types = jQuery.trim( hoverHack(types) ).split( " " );
+ for ( t = 0; t < types.length; t++ ) {
+
+ tns = rtypenamespace.exec( types[t] ) || [];
+ type = tns[1];
+ namespaces = ( tns[2] || "" ).split( "." ).sort();
+
+ // If event changes its type, use the special event handlers for the changed type
+ special = jQuery.event.special[ type ] || {};
+
+ // If selector defined, determine special event api type, otherwise given type
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+
+ // Update special based on newly reset type
+ special = jQuery.event.special[ type ] || {};
+
+ // handleObj is passed to all event handlers
+ handleObj = jQuery.extend({
+ type: type,
+ origType: tns[1],
+ data: data,
+ handler: handler,
+ guid: handler.guid,
+ selector: selector,
+ needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
+ namespace: namespaces.join(".")
+ }, handleObjIn );
+
+ // Init the event handler queue if we're the first
+ handlers = events[ type ];
+ if ( !handlers ) {
+ handlers = events[ type ] = [];
+ handlers.delegateCount = 0;
+
+ // Only use addEventListener/attachEvent if the special events handler returns false
+ if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+ // Bind the global event handler to the element
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, eventHandle, false );
+
+ } else if ( elem.attachEvent ) {
+ elem.attachEvent( "on" + type, eventHandle );
+ }
+ }
+ }
+
+ if ( special.add ) {
+ special.add.call( elem, handleObj );
+
+ if ( !handleObj.handler.guid ) {
+ handleObj.handler.guid = handler.guid;
+ }
+ }
+
+ // Add to the element's handler list, delegates in front
+ if ( selector ) {
+ handlers.splice( handlers.delegateCount++, 0, handleObj );
+ } else {
+ handlers.push( handleObj );
+ }
+
+ // Keep track of which events have ever been used, for event optimization
+ jQuery.event.global[ type ] = true;
+ }
+
+ // Nullify elem to prevent memory leaks in IE
+ elem = null;
+ },
+
+ global: {},
+
+ // Detach an event or set of events from an element
+ remove: function( elem, types, handler, selector, mappedTypes ) {
+
+ var t, tns, type, origType, namespaces, origCount,
+ j, events, special, eventType, handleObj,
+ elemData = jQuery.hasData( elem ) && jQuery._data( elem );
+
+ if ( !elemData || !(events = elemData.events) ) {
+ return;
+ }
+
+ // Once for each type.namespace in types; type may be omitted
+ types = jQuery.trim( hoverHack( types || "" ) ).split(" ");
+ for ( t = 0; t < types.length; t++ ) {
+ tns = rtypenamespace.exec( types[t] ) || [];
+ type = origType = tns[1];
+ namespaces = tns[2];
+
+ // Unbind all events (on this namespace, if provided) for the element
+ if ( !type ) {
+ for ( type in events ) {
+ jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+ }
+ continue;
+ }
+
+ special = jQuery.event.special[ type ] || {};
+ type = ( selector? special.delegateType : special.bindType ) || type;
+ eventType = events[ type ] || [];
+ origCount = eventType.length;
+ namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
+
+ // Remove matching events
+ for ( j = 0; j < eventType.length; j++ ) {
+ handleObj = eventType[ j ];
+
+ if ( ( mappedTypes || origType === handleObj.origType ) &&
+ ( !handler || handler.guid === handleObj.guid ) &&
+ ( !namespaces || namespaces.test( handleObj.namespace ) ) &&
+ ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+ eventType.splice( j--, 1 );
+
+ if ( handleObj.selector ) {
+ eventType.delegateCount--;
+ }
+ if ( special.remove ) {
+ special.remove.call( elem, handleObj );
+ }
+ }
+ }
+
+ // Remove generic event handler if we removed something and no more handlers exist
+ // (avoids potential for endless recursion during removal of special event handlers)
+ if ( eventType.length === 0 && origCount !== eventType.length ) {
+ if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+ jQuery.removeEvent( elem, type, elemData.handle );
+ }
+
+ delete events[ type ];
+ }
+ }
+
+ // Remove the expando if it's no longer used
+ if ( jQuery.isEmptyObject( events ) ) {
+ delete elemData.handle;
+
+ // removeData also checks for emptiness and clears the expando if empty
+ // so use it instead of delete
+ jQuery.removeData( elem, "events", true );
+ }
+ },
+
+ // Events that are safe to short-circuit if no handlers are attached.
+ // Native DOM events should not be added, they may have inline handlers.
+ customEvent: {
+ "getData": true,
+ "setData": true,
+ "changeData": true
+ },
+
+ trigger: function( event, data, elem, onlyHandlers ) {
+ // Don't do events on text and comment nodes
+ if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
+ return;
+ }
+
+ // Event object or event type
+ var cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType,
+ type = event.type || event,
+ namespaces = [];
+
+ // focus/blur morphs to focusin/out; ensure we're not firing them right now
+ if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+ return;
+ }
+
+ if ( type.indexOf( "!" ) >= 0 ) {
+ // Exclusive events trigger only for the exact event (no namespaces)
+ type = type.slice(0, -1);
+ exclusive = true;
+ }
+
+ if ( type.indexOf( "." ) >= 0 ) {
+ // Namespaced trigger; create a regexp to match event type in handle()
+ namespaces = type.split(".");
+ type = namespaces.shift();
+ namespaces.sort();
+ }
+
+ if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
+ // No jQuery handlers for this event type, and it can't have inline handlers
+ return;
+ }
+
+ // Caller can pass in an Event, Object, or just an event type string
+ event = typeof event === "object" ?
+ // jQuery.Event object
+ event[ jQuery.expando ] ? event :
+ // Object literal
+ new jQuery.Event( type, event ) :
+ // Just the event type (string)
+ new jQuery.Event( type );
+
+ event.type = type;
+ event.isTrigger = true;
+ event.exclusive = exclusive;
+ event.namespace = namespaces.join( "." );
+ event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
+ ontype = type.indexOf( ":" ) < 0 ? "on" + type : "";
+
+ // Handle a global trigger
+ if ( !elem ) {
+
+ // TODO: Stop taunting the data cache; remove global events and always attach to document
+ cache = jQuery.cache;
+ for ( i in cache ) {
+ if ( cache[ i ].events && cache[ i ].events[ type ] ) {
+ jQuery.event.trigger( event, data, cache[ i ].handle.elem, true );
+ }
+ }
+ return;
+ }
+
+ // Clean up the event in case it is being reused
+ event.result = undefined;
+ if ( !event.target ) {
+ event.target = elem;
+ }
+
+ // Clone any incoming data and prepend the event, creating the handler arg list
+ data = data != null ? jQuery.makeArray( data ) : [];
+ data.unshift( event );
+
+ // Allow special events to draw outside the lines
+ special = jQuery.event.special[ type ] || {};
+ if ( special.trigger && special.trigger.apply( elem, data ) === false ) {
+ return;
+ }
+
+ // Determine event propagation path in advance, per W3C events spec (#9951)
+ // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+ eventPath = [[ elem, special.bindType || type ]];
+ if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
+
+ bubbleType = special.delegateType || type;
+ cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode;
+ for ( old = elem; cur; cur = cur.parentNode ) {
+ eventPath.push([ cur, bubbleType ]);
+ old = cur;
+ }
+
+ // Only add window if we got to document (e.g., not plain obj or detached DOM)
+ if ( old === (elem.ownerDocument || document) ) {
+ eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]);
+ }
+ }
+
+ // Fire handlers on the event path
+ for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) {
+
+ cur = eventPath[i][0];
+ event.type = eventPath[i][1];
+
+ handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
+ if ( handle ) {
+ handle.apply( cur, data );
+ }
+ // Note that this is a bare JS function and not a jQuery handler
+ handle = ontype && cur[ ontype ];
+ if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
+ event.preventDefault();
+ }
+ }
+ event.type = type;
+
+ // If nobody prevented the default action, do it now
+ if ( !onlyHandlers && !event.isDefaultPrevented() ) {
+
+ if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
+ !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
+
+ // Call a native DOM method on the target with the same name name as the event.
+ // Can't use an .isFunction() check here because IE6/7 fails that test.
+ // Don't do default actions on window, that's where global variables be (#6170)
+ // IE<9 dies on focus/blur to hidden element (#1486)
+ if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) {
+
+ // Don't re-trigger an onFOO event when we call its FOO() method
+ old = elem[ ontype ];
+
+ if ( old ) {
+ elem[ ontype ] = null;
+ }
+
+ // Prevent re-triggering of the same event, since we already bubbled it above
+ jQuery.event.triggered = type;
+ elem[ type ]();
+ jQuery.event.triggered = undefined;
+
+ if ( old ) {
+ elem[ ontype ] = old;
+ }
+ }
+ }
+ }
+
+ return event.result;
+ },
+
+ dispatch: function( event ) {
+
+ // Make a writable jQuery.Event from the native event object
+ event = jQuery.event.fix( event || window.event );
+
+ var i, j, cur, ret, selMatch, matched, matches, handleObj, sel, related,
+ handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []),
+ delegateCount = handlers.delegateCount,
+ args = core_slice.call( arguments ),
+ run_all = !event.exclusive && !event.namespace,
+ special = jQuery.event.special[ event.type ] || {},
+ handlerQueue = [];
+
+ // Use the fix-ed jQuery.Event rather than the (read-only) native event
+ args[0] = event;
+ event.delegateTarget = this;
+
+ // Call the preDispatch hook for the mapped type, and let it bail if desired
+ if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+ return;
+ }
+
+ // Determine handlers that should run if there are delegated events
+ // Avoid non-left-click bubbling in Firefox (#3861)
+ if ( delegateCount && !(event.button && event.type === "click") ) {
+
+ for ( cur = event.target; cur != this; cur = cur.parentNode || this ) {
+
+ // Don't process clicks (ONLY) on disabled elements (#6911, #8165, #11382, #11764)
+ if ( cur.disabled !== true || event.type !== "click" ) {
+ selMatch = {};
+ matches = [];
+ for ( i = 0; i < delegateCount; i++ ) {
+ handleObj = handlers[ i ];
+ sel = handleObj.selector;
+
+ if ( selMatch[ sel ] === undefined ) {
+ selMatch[ sel ] = handleObj.needsContext ?
+ jQuery( sel, this ).index( cur ) >= 0 :
+ jQuery.find( sel, this, null, [ cur ] ).length;
+ }
+ if ( selMatch[ sel ] ) {
+ matches.push( handleObj );
+ }
+ }
+ if ( matches.length ) {
+ handlerQueue.push({ elem: cur, matches: matches });
+ }
+ }
+ }
+ }
+
+ // Add the remaining (directly-bound) handlers
+ if ( handlers.length > delegateCount ) {
+ handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) });
+ }
+
+ // Run delegates first; they may want to stop propagation beneath us
+ for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) {
+ matched = handlerQueue[ i ];
+ event.currentTarget = matched.elem;
+
+ for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) {
+ handleObj = matched.matches[ j ];
+
+ // Triggered event must either 1) be non-exclusive and have no namespace, or
+ // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
+ if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
+
+ event.data = handleObj.data;
+ event.handleObj = handleObj;
+
+ ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
+ .apply( matched.elem, args );
+
+ if ( ret !== undefined ) {
+ event.result = ret;
+ if ( ret === false ) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ }
+ }
+ }
+ }
+
+ // Call the postDispatch hook for the mapped type
+ if ( special.postDispatch ) {
+ special.postDispatch.call( this, event );
+ }
+
+ return event.result;
+ },
+
+ // Includes some event props shared by KeyEvent and MouseEvent
+ // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 ***
+ props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
+
+ fixHooks: {},
+
+ keyHooks: {
+ props: "char charCode key keyCode".split(" "),
+ filter: function( event, original ) {
+
+ // Add which for key events
+ if ( event.which == null ) {
+ event.which = original.charCode != null ? original.charCode : original.keyCode;
+ }
+
+ return event;
+ }
+ },
+
+ mouseHooks: {
+ props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
+ filter: function( event, original ) {
+ var eventDoc, doc, body,
+ button = original.button,
+ fromElement = original.fromElement;
+
+ // Calculate pageX/Y if missing and clientX/Y available
+ if ( event.pageX == null && original.clientX != null ) {
+ eventDoc = event.target.ownerDocument || document;
+ doc = eventDoc.documentElement;
+ body = eventDoc.body;
+
+ event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+ event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
+ }
+
+ // Add relatedTarget, if necessary
+ if ( !event.relatedTarget && fromElement ) {
+ event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
+ }
+
+ // Add which for click: 1 === left; 2 === middle; 3 === right
+ // Note: button is not normalized, so don't use it
+ if ( !event.which && button !== undefined ) {
+ event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+ }
+
+ return event;
+ }
+ },
+
+ fix: function( event ) {
+ if ( event[ jQuery.expando ] ) {
+ return event;
+ }
+
+ // Create a writable copy of the event object and normalize some properties
+ var i, prop,
+ originalEvent = event,
+ fixHook = jQuery.event.fixHooks[ event.type ] || {},
+ copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
+
+ event = jQuery.Event( originalEvent );
+
+ for ( i = copy.length; i; ) {
+ prop = copy[ --i ];
+ event[ prop ] = originalEvent[ prop ];
+ }
+
+ // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)
+ if ( !event.target ) {
+ event.target = originalEvent.srcElement || document;
+ }
+
+ // Target should not be a text node (#504, Safari)
+ if ( event.target.nodeType === 3 ) {
+ event.target = event.target.parentNode;
+ }
+
+ // For mouse/key events, metaKey==false if it's undefined (#3368, #11328; IE6/7/8)
+ event.metaKey = !!event.metaKey;
+
+ return fixHook.filter? fixHook.filter( event, originalEvent ) : event;
+ },
+
+ special: {
+ load: {
+ // Prevent triggered image.load events from bubbling to window.load
+ noBubble: true
+ },
+
+ focus: {
+ delegateType: "focusin"
+ },
+ blur: {
+ delegateType: "focusout"
+ },
+
+ beforeunload: {
+ setup: function( data, namespaces, eventHandle ) {
+ // We only want to do this special case on windows
+ if ( jQuery.isWindow( this ) ) {
+ this.onbeforeunload = eventHandle;
+ }
+ },
+
+ teardown: function( namespaces, eventHandle ) {
+ if ( this.onbeforeunload === eventHandle ) {
+ this.onbeforeunload = null;
+ }
+ }
+ }
+ },
+
+ simulate: function( type, elem, event, bubble ) {
+ // Piggyback on a donor event to simulate a different one.
+ // Fake originalEvent to avoid donor's stopPropagation, but if the
+ // simulated event prevents default then we do the same on the donor.
+ var e = jQuery.extend(
+ new jQuery.Event(),
+ event,
+ { type: type,
+ isSimulated: true,
+ originalEvent: {}
+ }
+ );
+ if ( bubble ) {
+ jQuery.event.trigger( e, null, elem );
+ } else {
+ jQuery.event.dispatch.call( elem, e );
+ }
+ if ( e.isDefaultPrevented() ) {
+ event.preventDefault();
+ }
+ }
+};
+
+// Some plugins are using, but it's undocumented/deprecated and will be removed.
+// The 1.7 special event interface should provide all the hooks needed now.
+jQuery.event.handle = jQuery.event.dispatch;
+
+jQuery.removeEvent = document.removeEventListener ?
+ function( elem, type, handle ) {
+ if ( elem.removeEventListener ) {
+ elem.removeEventListener( type, handle, false );
+ }
+ } :
+ function( elem, type, handle ) {
+ var name = "on" + type;
+
+ if ( elem.detachEvent ) {
+
+ // #8545, #7054, preventing memory leaks for custom events in IE6-8
+ // detachEvent needed property on element, by name of that event, to properly expose it to GC
+ if ( typeof elem[ name ] === "undefined" ) {
+ elem[ name ] = null;
+ }
+
+ elem.detachEvent( name, handle );
+ }
+ };
+
+jQuery.Event = function( src, props ) {
+ // Allow instantiation without the 'new' keyword
+ if ( !(this instanceof jQuery.Event) ) {
+ return new jQuery.Event( src, props );
+ }
+
+ // Event object
+ if ( src && src.type ) {
+ this.originalEvent = src;
+ this.type = src.type;
+
+ // Events bubbling up the document may have been marked as prevented
+ // by a handler lower down the tree; reflect the correct value.
+ this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
+ src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
+
+ // Event type
+ } else {
+ this.type = src;
+ }
+
+ // Put explicitly provided properties onto the event object
+ if ( props ) {
+ jQuery.extend( this, props );
+ }
+
+ // Create a timestamp if incoming event doesn't have one
+ this.timeStamp = src && src.timeStamp || jQuery.now();
+
+ // Mark it as fixed
+ this[ jQuery.expando ] = true;
+};
+
+function returnFalse() {
+ return false;
+}
+function returnTrue() {
+ return true;
+}
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+ preventDefault: function() {
+ this.isDefaultPrevented = returnTrue;
+
+ var e = this.originalEvent;
+ if ( !e ) {
+ return;
+ }
+
+ // if preventDefault exists run it on the original event
+ if ( e.preventDefault ) {
+ e.preventDefault();
+
+ // otherwise set the returnValue property of the original event to false (IE)
+ } else {
+ e.returnValue = false;
+ }
+ },
+ stopPropagation: function() {
+ this.isPropagationStopped = returnTrue;
+
+ var e = this.originalEvent;
+ if ( !e ) {
+ return;
+ }
+ // if stopPropagation exists run it on the original event
+ if ( e.stopPropagation ) {
+ e.stopPropagation();
+ }
+ // otherwise set the cancelBubble property of the original event to true (IE)
+ e.cancelBubble = true;
+ },
+ stopImmediatePropagation: function() {
+ this.isImmediatePropagationStopped = returnTrue;
+ this.stopPropagation();
+ },
+ isDefaultPrevented: returnFalse,
+ isPropagationStopped: returnFalse,
+ isImmediatePropagationStopped: returnFalse
+};
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+jQuery.each({
+ mouseenter: "mouseover",
+ mouseleave: "mouseout"
+}, function( orig, fix ) {
+ jQuery.event.special[ orig ] = {
+ delegateType: fix,
+ bindType: fix,
+
+ handle: function( event ) {
+ var ret,
+ target = this,
+ related = event.relatedTarget,
+ handleObj = event.handleObj,
+ selector = handleObj.selector;
+
+ // For mousenter/leave call the handler if related is outside the target.
+ // NB: No relatedTarget if the mouse left/entered the browser window
+ if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
+ event.type = handleObj.origType;
+ ret = handleObj.handler.apply( this, arguments );
+ event.type = fix;
+ }
+ return ret;
+ }
+ };
+});
+
+// IE submit delegation
+if ( !jQuery.support.submitBubbles ) {
+
+ jQuery.event.special.submit = {
+ setup: function() {
+ // Only need this for delegated form submit events
+ if ( jQuery.nodeName( this, "form" ) ) {
+ return false;
+ }
+
+ // Lazy-add a submit handler when a descendant form may potentially be submitted
+ jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
+ // Node name check avoids a VML-related crash in IE (#9807)
+ var elem = e.target,
+ form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
+ if ( form && !jQuery._data( form, "_submit_attached" ) ) {
+ jQuery.event.add( form, "submit._submit", function( event ) {
+ event._submit_bubble = true;
+ });
+ jQuery._data( form, "_submit_attached", true );
+ }
+ });
+ // return undefined since we don't need an event listener
+ },
+
+ postDispatch: function( event ) {
+ // If form was submitted by the user, bubble the event up the tree
+ if ( event._submit_bubble ) {
+ delete event._submit_bubble;
+ if ( this.parentNode && !event.isTrigger ) {
+ jQuery.event.simulate( "submit", this.parentNode, event, true );
+ }
+ }
+ },
+
+ teardown: function() {
+ // Only need this for delegated form submit events
+ if ( jQuery.nodeName( this, "form" ) ) {
+ return false;
+ }
+
+ // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
+ jQuery.event.remove( this, "._submit" );
+ }
+ };
+}
+
+// IE change delegation and checkbox/radio fix
+if ( !jQuery.support.changeBubbles ) {
+
+ jQuery.event.special.change = {
+
+ setup: function() {
+
+ if ( rformElems.test( this.nodeName ) ) {
+ // IE doesn't fire change on a check/radio until blur; trigger it on click
+ // after a propertychange. Eat the blur-change in special.change.handle.
+ // This still fires onchange a second time for check/radio after blur.
+ if ( this.type === "checkbox" || this.type === "radio" ) {
+ jQuery.event.add( this, "propertychange._change", function( event ) {
+ if ( event.originalEvent.propertyName === "checked" ) {
+ this._just_changed = true;
+ }
+ });
+ jQuery.event.add( this, "click._change", function( event ) {
+ if ( this._just_changed && !event.isTrigger ) {
+ this._just_changed = false;
+ }
+ // Allow triggered, simulated change events (#11500)
+ jQuery.event.simulate( "change", this, event, true );
+ });
+ }
+ return false;
+ }
+ // Delegated event; lazy-add a change handler on descendant inputs
+ jQuery.event.add( this, "beforeactivate._change", function( e ) {
+ var elem = e.target;
+
+ if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "_change_attached" ) ) {
+ jQuery.event.add( elem, "change._change", function( event ) {
+ if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
+ jQuery.event.simulate( "change", this.parentNode, event, true );
+ }
+ });
+ jQuery._data( elem, "_change_attached", true );
+ }
+ });
+ },
+
+ handle: function( event ) {
+ var elem = event.target;
+
+ // Swallow native change events from checkbox/radio, we already triggered them above
+ if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
+ return event.handleObj.handler.apply( this, arguments );
+ }
+ },
+
+ teardown: function() {
+ jQuery.event.remove( this, "._change" );
+
+ return !rformElems.test( this.nodeName );
+ }
+ };
+}
+
+// Create "bubbling" focus and blur events
+if ( !jQuery.support.focusinBubbles ) {
+ jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+ // Attach a single capturing handler while someone wants focusin/focusout
+ var attaches = 0,
+ handler = function( event ) {
+ jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
+ };
+
+ jQuery.event.special[ fix ] = {
+ setup: function() {
+ if ( attaches++ === 0 ) {
+ document.addEventListener( orig, handler, true );
+ }
+ },
+ teardown: function() {
+ if ( --attaches === 0 ) {
+ document.removeEventListener( orig, handler, true );
+ }
+ }
+ };
+ });
+}
+
+jQuery.fn.extend({
+
+ on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
+ var origFn, type;
+
+ // Types can be a map of types/handlers
+ if ( typeof types === "object" ) {
+ // ( types-Object, selector, data )
+ if ( typeof selector !== "string" ) { // && selector != null
+ // ( types-Object, data )
+ data = data || selector;
+ selector = undefined;
+ }
+ for ( type in types ) {
+ this.on( type, selector, data, types[ type ], one );
+ }
+ return this;
+ }
+
+ if ( data == null && fn == null ) {
+ // ( types, fn )
+ fn = selector;
+ data = selector = undefined;
+ } else if ( fn == null ) {
+ if ( typeof selector === "string" ) {
+ // ( types, selector, fn )
+ fn = data;
+ data = undefined;
+ } else {
+ // ( types, data, fn )
+ fn = data;
+ data = selector;
+ selector = undefined;
+ }
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ } else if ( !fn ) {
+ return this;
+ }
+
+ if ( one === 1 ) {
+ origFn = fn;
+ fn = function( event ) {
+ // Can use an empty set, since event contains the info
+ jQuery().off( event );
+ return origFn.apply( this, arguments );
+ };
+ // Use same guid so caller can remove using origFn
+ fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+ }
+ return this.each( function() {
+ jQuery.event.add( this, types, fn, data, selector );
+ });
+ },
+ one: function( types, selector, data, fn ) {
+ return this.on( types, selector, data, fn, 1 );
+ },
+ off: function( types, selector, fn ) {
+ var handleObj, type;
+ if ( types && types.preventDefault && types.handleObj ) {
+ // ( event ) dispatched jQuery.Event
+ handleObj = types.handleObj;
+ jQuery( types.delegateTarget ).off(
+ handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
+ handleObj.selector,
+ handleObj.handler
+ );
+ return this;
+ }
+ if ( typeof types === "object" ) {
+ // ( types-object [, selector] )
+ for ( type in types ) {
+ this.off( type, selector, types[ type ] );
+ }
+ return this;
+ }
+ if ( selector === false || typeof selector === "function" ) {
+ // ( types [, fn] )
+ fn = selector;
+ selector = undefined;
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ }
+ return this.each(function() {
+ jQuery.event.remove( this, types, fn, selector );
+ });
+ },
+
+ bind: function( types, data, fn ) {
+ return this.on( types, null, data, fn );
+ },
+ unbind: function( types, fn ) {
+ return this.off( types, null, fn );
+ },
+
+ live: function( types, data, fn ) {
+ jQuery( this.context ).on( types, this.selector, data, fn );
+ return this;
+ },
+ die: function( types, fn ) {
+ jQuery( this.context ).off( types, this.selector || "**", fn );
+ return this;
+ },
+
+ delegate: function( selector, types, data, fn ) {
+ return this.on( types, selector, data, fn );
+ },
+ undelegate: function( selector, types, fn ) {
+ // ( namespace ) or ( selector, types [, fn] )
+ return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
+ },
+
+ trigger: function( type, data ) {
+ return this.each(function() {
+ jQuery.event.trigger( type, data, this );
+ });
+ },
+ triggerHandler: function( type, data ) {
+ if ( this[0] ) {
+ return jQuery.event.trigger( type, data, this[0], true );
+ }
+ },
+
+ toggle: function( fn ) {
+ // Save reference to arguments for access in closure
+ var args = arguments,
+ guid = fn.guid || jQuery.guid++,
+ i = 0,
+ toggler = function( event ) {
+ // Figure out which function to execute
+ var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
+ jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
+
+ // Make sure that clicks stop
+ event.preventDefault();
+
+ // and execute the function
+ return args[ lastToggle ].apply( this, arguments ) || false;
+ };
+
+ // link all the functions, so any of them can unbind this click handler
+ toggler.guid = guid;
+ while ( i < args.length ) {
+ args[ i++ ].guid = guid;
+ }
+
+ return this.click( toggler );
+ },
+
+ hover: function( fnOver, fnOut ) {
+ return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+ }
+});
+
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+ "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+ "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
+
+ // Handle event binding
+ jQuery.fn[ name ] = function( data, fn ) {
+ if ( fn == null ) {
+ fn = data;
+ data = null;
+ }
+
+ return arguments.length > 0 ?
+ this.on( name, null, data, fn ) :
+ this.trigger( name );
+ };
+
+ if ( rkeyEvent.test( name ) ) {
+ jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks;
+ }
+
+ if ( rmouseEvent.test( name ) ) {
+ jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;
+ }
+});
+/*!
+ * Sizzle CSS Selector Engine
+ * Copyright 2012-2018 jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://sizzlejs.com/
+ */
+(function( window, undefined ) {
+
+var cachedruns,
+ assertGetIdNotName,
+ Expr,
+ getText,
+ isXML,
+ contains,
+ compile,
+ sortOrder,
+ hasDuplicate,
+ outermostContext,
+
+ baseHasDuplicate = true,
+ strundefined = "undefined",
+
+ expando = ( "sizcache" + Math.random() ).replace( ".", "" ),
+
+ Token = String,
+ document = window.document,
+ docElem = document.documentElement,
+ dirruns = 0,
+ done = 0,
+ pop = [].pop,
+ push = [].push,
+ slice = [].slice,
+ // Use a stripped-down indexOf if a native one is unavailable
+ indexOf = [].indexOf || function( elem ) {
+ var i = 0,
+ len = this.length;
+ for ( ; i < len; i++ ) {
+ if ( this[i] === elem ) {
+ return i;
+ }
+ }
+ return -1;
+ },
+
+ // Augment a function for special use by Sizzle
+ markFunction = function( fn, value ) {
+ fn[ expando ] = value == null || value;
+ return fn;
+ },
+
+ createCache = function() {
+ var cache = {},
+ keys = [];
+
+ return markFunction(function( key, value ) {
+ // Only keep the most recent entries
+ if ( keys.push( key ) > Expr.cacheLength ) {
+ delete cache[ keys.shift() ];
+ }
+
+ // Retrieve with (key + " ") to avoid collision with native Object.prototype properties (see Issue #157)
+ return (cache[ key + " " ] = value);
+ }, cache );
+ },
+
+ classCache = createCache(),
+ tokenCache = createCache(),
+ compilerCache = createCache(),
+
+ // Regex
+
+ // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
+ whitespace = "[\\x20\\t\\r\\n\\f]",
+ // http://www.w3.org/TR/css3-syntax/#characters
+ characterEncoding = "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",
+
+ // Loosely modeled on CSS identifier characters
+ // An unquoted value should be a CSS identifier (http://www.w3.org/TR/css3-selectors/#attribute-selectors)
+ // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+ identifier = characterEncoding.replace( "w", "w#" ),
+
+ // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
+ operators = "([*^$|!~]?=)",
+ attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
+ "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
+
+ // Prefer arguments not in parens/brackets,
+ // then attribute selectors and non-pseudos (denoted by :),
+ // then anything else
+ // These preferences are here to reduce the number of selectors
+ // needing tokenize in the PSEUDO preFilter
+ pseudos = ":(" + characterEncoding + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:" + attributes + ")|[^:]|\\\\.)*|.*))\\)|)",
+
+ // For matchExpr.POS and matchExpr.needsContext
+ pos = ":(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace +
+ "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)",
+
+ // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+ rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+
+ rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+ rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ),
+ rpseudo = new RegExp( pseudos ),
+
+ // Easily-parseable/retrievable ID or TAG or CLASS selectors
+ rquickExpr = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,
+
+ rnot = /^:not/,
+ rsibling = /[\x20\t\r\n\f]*[+~]/,
+ rendsWithNot = /:not\($/,
+
+ rheader = /h\d/i,
+ rinputs = /input|select|textarea|button/i,
+
+ rbackslash = /\\(?!\\)/g,
+
+ matchExpr = {
+ "ID": new RegExp( "^#(" + characterEncoding + ")" ),
+ "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
+ "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ),
+ "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
+ "ATTR": new RegExp( "^" + attributes ),
+ "PSEUDO": new RegExp( "^" + pseudos ),
+ "POS": new RegExp( pos, "i" ),
+ "CHILD": new RegExp( "^:(only|nth|first|last)-child(?:\\(" + whitespace +
+ "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
+ "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+ // For use in libraries implementing .is()
+ "needsContext": new RegExp( "^" + whitespace + "*[>+~]|" + pos, "i" )
+ },
+
+ // Support
+
+ // Used for testing something on an element
+ assert = function( fn ) {
+ var div = document.createElement("div");
+
+ try {
+ return fn( div );
+ } catch (e) {
+ return false;
+ } finally {
+ // release memory in IE
+ div = null;
+ }
+ },
+
+ // Check if getElementsByTagName("*") returns only elements
+ assertTagNameNoComments = assert(function( div ) {
+ div.appendChild( document.createComment("") );
+ return !div.getElementsByTagName("*").length;
+ }),
+
+ // Check if getAttribute returns normalized href attributes
+ assertHrefNotNormalized = assert(function( div ) {
+ div.innerHTML = " ";
+ return div.firstChild && typeof div.firstChild.getAttribute !== strundefined &&
+ div.firstChild.getAttribute("href") === "#";
+ }),
+
+ // Check if attributes should be retrieved by attribute nodes
+ assertAttributes = assert(function( div ) {
+ div.innerHTML = " ";
+ var type = typeof div.lastChild.getAttribute("multiple");
+ // IE8 returns a string for some attributes even when not present
+ return type !== "boolean" && type !== "string";
+ }),
+
+ // Check if getElementsByClassName can be trusted
+ assertUsableClassName = assert(function( div ) {
+ // Opera can't find a second classname (in 9.6)
+ div.innerHTML = "
";
+ if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) {
+ return false;
+ }
+
+ // Safari 3.2 caches class attributes and doesn't catch changes
+ div.lastChild.className = "e";
+ return div.getElementsByClassName("e").length === 2;
+ }),
+
+ // Check if getElementById returns elements by name
+ // Check if getElementsByName privileges form controls or returns elements by ID
+ assertUsableName = assert(function( div ) {
+ // Inject content
+ div.id = expando + 0;
+ div.innerHTML = "
";
+ docElem.insertBefore( div, docElem.firstChild );
+
+ // Test
+ var pass = document.getElementsByName &&
+ // buggy browsers will return fewer than the correct 2
+ document.getElementsByName( expando ).length === 2 +
+ // buggy browsers will return more than the correct 0
+ document.getElementsByName( expando + 0 ).length;
+ assertGetIdNotName = !document.getElementById( expando );
+
+ // Cleanup
+ docElem.removeChild( div );
+
+ return pass;
+ });
+
+// If slice is not available, provide a backup
+try {
+ slice.call( docElem.childNodes, 0 )[0].nodeType;
+} catch ( e ) {
+ slice = function( i ) {
+ var elem,
+ results = [];
+ for ( ; (elem = this[i]); i++ ) {
+ results.push( elem );
+ }
+ return results;
+ };
+}
+
+function Sizzle( selector, context, results, seed ) {
+ results = results || [];
+ context = context || document;
+ var match, elem, xml, m,
+ nodeType = context.nodeType;
+
+ if ( !selector || typeof selector !== "string" ) {
+ return results;
+ }
+
+ if ( nodeType !== 1 && nodeType !== 9 ) {
+ return [];
+ }
+
+ xml = isXML( context );
+
+ if ( !xml && !seed ) {
+ if ( (match = rquickExpr.exec( selector )) ) {
+ // Speed-up: Sizzle("#ID")
+ if ( (m = match[1]) ) {
+ if ( nodeType === 9 ) {
+ elem = context.getElementById( m );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE, Opera, and Webkit return items
+ // by name instead of ID
+ if ( elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ } else {
+ return results;
+ }
+ } else {
+ // Context is not a document
+ if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
+ contains( context, elem ) && elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ }
+
+ // Speed-up: Sizzle("TAG")
+ } else if ( match[2] ) {
+ push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) );
+ return results;
+
+ // Speed-up: Sizzle(".CLASS")
+ } else if ( (m = match[3]) && assertUsableClassName && context.getElementsByClassName ) {
+ push.apply( results, slice.call(context.getElementsByClassName( m ), 0) );
+ return results;
+ }
+ }
+ }
+
+ // All others
+ return select( selector.replace( rtrim, "$1" ), context, results, seed, xml );
+}
+
+Sizzle.matches = function( expr, elements ) {
+ return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+ return Sizzle( expr, null, null, [ elem ] ).length > 0;
+};
+
+// Returns a function to use in pseudos for input types
+function createInputPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === type;
+ };
+}
+
+// Returns a function to use in pseudos for buttons
+function createButtonPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return (name === "input" || name === "button") && elem.type === type;
+ };
+}
+
+// Returns a function to use in pseudos for positionals
+function createPositionalPseudo( fn ) {
+ return markFunction(function( argument ) {
+ argument = +argument;
+ return markFunction(function( seed, matches ) {
+ var j,
+ matchIndexes = fn( [], seed.length, argument ),
+ i = matchIndexes.length;
+
+ // Match elements found at the specified indexes
+ while ( i-- ) {
+ if ( seed[ (j = matchIndexes[i]) ] ) {
+ seed[j] = !(matches[j] = seed[j]);
+ }
+ }
+ });
+ });
+}
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+ var node,
+ ret = "",
+ i = 0,
+ nodeType = elem.nodeType;
+
+ if ( nodeType ) {
+ if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+ // Use textContent for elements
+ // innerText usage removed for consistency of new lines (see #11153)
+ if ( typeof elem.textContent === "string" ) {
+ return elem.textContent;
+ } else {
+ // Traverse its children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ ret += getText( elem );
+ }
+ }
+ } else if ( nodeType === 3 || nodeType === 4 ) {
+ return elem.nodeValue;
+ }
+ // Do not include comment or processing instruction nodes
+ } else {
+
+ // If no nodeType, this is expected to be an array
+ for ( ; (node = elem[i]); i++ ) {
+ // Do not traverse comment nodes
+ ret += getText( node );
+ }
+ }
+ return ret;
+};
+
+isXML = Sizzle.isXML = function( elem ) {
+ // documentElement is verified for cases where it doesn't yet exist
+ // (such as loading iframes in IE - #4833)
+ var documentElement = elem && (elem.ownerDocument || elem).documentElement;
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+// Element contains another
+contains = Sizzle.contains = docElem.contains ?
+ function( a, b ) {
+ var adown = a.nodeType === 9 ? a.documentElement : a,
+ bup = b && b.parentNode;
+ return a === bup || !!( bup && bup.nodeType === 1 && adown.contains && adown.contains(bup) );
+ } :
+ docElem.compareDocumentPosition ?
+ function( a, b ) {
+ return b && !!( a.compareDocumentPosition( b ) & 16 );
+ } :
+ function( a, b ) {
+ while ( (b = b.parentNode) ) {
+ if ( b === a ) {
+ return true;
+ }
+ }
+ return false;
+ };
+
+Sizzle.attr = function( elem, name ) {
+ var val,
+ xml = isXML( elem );
+
+ if ( !xml ) {
+ name = name.toLowerCase();
+ }
+ if ( (val = Expr.attrHandle[ name ]) ) {
+ return val( elem );
+ }
+ if ( xml || assertAttributes ) {
+ return elem.getAttribute( name );
+ }
+ val = elem.getAttributeNode( name );
+ return val ?
+ typeof elem[ name ] === "boolean" ?
+ elem[ name ] ? name : null :
+ val.specified ? val.value : null :
+ null;
+};
+
+Expr = Sizzle.selectors = {
+
+ // Can be adjusted by the user
+ cacheLength: 50,
+
+ createPseudo: markFunction,
+
+ match: matchExpr,
+
+ // IE6/7 return a modified href
+ attrHandle: assertHrefNotNormalized ?
+ {} :
+ {
+ "href": function( elem ) {
+ return elem.getAttribute( "href", 2 );
+ },
+ "type": function( elem ) {
+ return elem.getAttribute("type");
+ }
+ },
+
+ find: {
+ "ID": assertGetIdNotName ?
+ function( id, context, xml ) {
+ if ( typeof context.getElementById !== strundefined && !xml ) {
+ var m = context.getElementById( id );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ return m && m.parentNode ? [m] : [];
+ }
+ } :
+ function( id, context, xml ) {
+ if ( typeof context.getElementById !== strundefined && !xml ) {
+ var m = context.getElementById( id );
+
+ return m ?
+ m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ?
+ [m] :
+ undefined :
+ [];
+ }
+ },
+
+ "TAG": assertTagNameNoComments ?
+ function( tag, context ) {
+ if ( typeof context.getElementsByTagName !== strundefined ) {
+ return context.getElementsByTagName( tag );
+ }
+ } :
+ function( tag, context ) {
+ var results = context.getElementsByTagName( tag );
+
+ // Filter out possible comments
+ if ( tag === "*" ) {
+ var elem,
+ tmp = [],
+ i = 0;
+
+ for ( ; (elem = results[i]); i++ ) {
+ if ( elem.nodeType === 1 ) {
+ tmp.push( elem );
+ }
+ }
+
+ return tmp;
+ }
+ return results;
+ },
+
+ "NAME": assertUsableName && function( tag, context ) {
+ if ( typeof context.getElementsByName !== strundefined ) {
+ return context.getElementsByName( name );
+ }
+ },
+
+ "CLASS": assertUsableClassName && function( className, context, xml ) {
+ if ( typeof context.getElementsByClassName !== strundefined && !xml ) {
+ return context.getElementsByClassName( className );
+ }
+ }
+ },
+
+ relative: {
+ ">": { dir: "parentNode", first: true },
+ " ": { dir: "parentNode" },
+ "+": { dir: "previousSibling", first: true },
+ "~": { dir: "previousSibling" }
+ },
+
+ preFilter: {
+ "ATTR": function( match ) {
+ match[1] = match[1].replace( rbackslash, "" );
+
+ // Move the given value to match[3] whether quoted or unquoted
+ match[3] = ( match[4] || match[5] || "" ).replace( rbackslash, "" );
+
+ if ( match[2] === "~=" ) {
+ match[3] = " " + match[3] + " ";
+ }
+
+ return match.slice( 0, 4 );
+ },
+
+ "CHILD": function( match ) {
+ /* matches from matchExpr["CHILD"]
+ 1 type (only|nth|...)
+ 2 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+ 3 xn-component of xn+y argument ([+-]?\d*n|)
+ 4 sign of xn-component
+ 5 x of xn-component
+ 6 sign of y-component
+ 7 y of y-component
+ */
+ match[1] = match[1].toLowerCase();
+
+ if ( match[1] === "nth" ) {
+ // nth-child requires argument
+ if ( !match[2] ) {
+ Sizzle.error( match[0] );
+ }
+
+ // numeric x and y parameters for Expr.filter.CHILD
+ // remember that false/true cast respectively to 0/1
+ match[3] = +( match[3] ? match[4] + (match[5] || 1) : 2 * ( match[2] === "even" || match[2] === "odd" ) );
+ match[4] = +( ( match[6] + match[7] ) || match[2] === "odd" );
+
+ // other types prohibit arguments
+ } else if ( match[2] ) {
+ Sizzle.error( match[0] );
+ }
+
+ return match;
+ },
+
+ "PSEUDO": function( match ) {
+ var unquoted, excess;
+ if ( matchExpr["CHILD"].test( match[0] ) ) {
+ return null;
+ }
+
+ if ( match[3] ) {
+ match[2] = match[3];
+ } else if ( (unquoted = match[4]) ) {
+ // Only check arguments that contain a pseudo
+ if ( rpseudo.test(unquoted) &&
+ // Get excess from tokenize (recursively)
+ (excess = tokenize( unquoted, true )) &&
+ // advance to the next closing parenthesis
+ (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+
+ // excess is a negative index
+ unquoted = unquoted.slice( 0, excess );
+ match[0] = match[0].slice( 0, excess );
+ }
+ match[2] = unquoted;
+ }
+
+ // Return only captures needed by the pseudo filter method (type and argument)
+ return match.slice( 0, 3 );
+ }
+ },
+
+ filter: {
+ "ID": assertGetIdNotName ?
+ function( id ) {
+ id = id.replace( rbackslash, "" );
+ return function( elem ) {
+ return elem.getAttribute("id") === id;
+ };
+ } :
+ function( id ) {
+ id = id.replace( rbackslash, "" );
+ return function( elem ) {
+ var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
+ return node && node.value === id;
+ };
+ },
+
+ "TAG": function( nodeName ) {
+ if ( nodeName === "*" ) {
+ return function() { return true; };
+ }
+ nodeName = nodeName.replace( rbackslash, "" ).toLowerCase();
+
+ return function( elem ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+ };
+ },
+
+ "CLASS": function( className ) {
+ var pattern = classCache[ expando ][ className + " " ];
+
+ return pattern ||
+ (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
+ classCache( className, function( elem ) {
+ return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" );
+ });
+ },
+
+ "ATTR": function( name, operator, check ) {
+ return function( elem, context ) {
+ var result = Sizzle.attr( elem, name );
+
+ if ( result == null ) {
+ return operator === "!=";
+ }
+ if ( !operator ) {
+ return true;
+ }
+
+ result += "";
+
+ return operator === "=" ? result === check :
+ operator === "!=" ? result !== check :
+ operator === "^=" ? check && result.indexOf( check ) === 0 :
+ operator === "*=" ? check && result.indexOf( check ) > -1 :
+ operator === "$=" ? check && result.substr( result.length - check.length ) === check :
+ operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
+ operator === "|=" ? result === check || result.substr( 0, check.length + 1 ) === check + "-" :
+ false;
+ };
+ },
+
+ "CHILD": function( type, argument, first, last ) {
+
+ if ( type === "nth" ) {
+ return function( elem ) {
+ var node, diff,
+ parent = elem.parentNode;
+
+ if ( first === 1 && last === 0 ) {
+ return true;
+ }
+
+ if ( parent ) {
+ diff = 0;
+ for ( node = parent.firstChild; node; node = node.nextSibling ) {
+ if ( node.nodeType === 1 ) {
+ diff++;
+ if ( elem === node ) {
+ break;
+ }
+ }
+ }
+ }
+
+ // Incorporate the offset (or cast to NaN), then check against cycle size
+ diff -= last;
+ return diff === first || ( diff % first === 0 && diff / first >= 0 );
+ };
+ }
+
+ return function( elem ) {
+ var node = elem;
+
+ switch ( type ) {
+ case "only":
+ case "first":
+ while ( (node = node.previousSibling) ) {
+ if ( node.nodeType === 1 ) {
+ return false;
+ }
+ }
+
+ if ( type === "first" ) {
+ return true;
+ }
+
+ node = elem;
+
+ /* falls through */
+ case "last":
+ while ( (node = node.nextSibling) ) {
+ if ( node.nodeType === 1 ) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+ };
+ },
+
+ "PSEUDO": function( pseudo, argument ) {
+ // pseudo-class names are case-insensitive
+ // http://www.w3.org/TR/selectors/#pseudo-classes
+ // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+ // Remember that setFilters inherits from pseudos
+ var args,
+ fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+ Sizzle.error( "unsupported pseudo: " + pseudo );
+
+ // The user may use createPseudo to indicate that
+ // arguments are needed to create the filter function
+ // just as Sizzle does
+ if ( fn[ expando ] ) {
+ return fn( argument );
+ }
+
+ // But maintain support for old signatures
+ if ( fn.length > 1 ) {
+ args = [ pseudo, pseudo, "", argument ];
+ return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+ markFunction(function( seed, matches ) {
+ var idx,
+ matched = fn( seed, argument ),
+ i = matched.length;
+ while ( i-- ) {
+ idx = indexOf.call( seed, matched[i] );
+ seed[ idx ] = !( matches[ idx ] = matched[i] );
+ }
+ }) :
+ function( elem ) {
+ return fn( elem, 0, args );
+ };
+ }
+
+ return fn;
+ }
+ },
+
+ pseudos: {
+ "not": markFunction(function( selector ) {
+ // Trim the selector passed to compile
+ // to avoid treating leading and trailing
+ // spaces as combinators
+ var input = [],
+ results = [],
+ matcher = compile( selector.replace( rtrim, "$1" ) );
+
+ return matcher[ expando ] ?
+ markFunction(function( seed, matches, context, xml ) {
+ var elem,
+ unmatched = matcher( seed, null, xml, [] ),
+ i = seed.length;
+
+ // Match elements unmatched by `matcher`
+ while ( i-- ) {
+ if ( (elem = unmatched[i]) ) {
+ seed[i] = !(matches[i] = elem);
+ }
+ }
+ }) :
+ function( elem, context, xml ) {
+ input[0] = elem;
+ matcher( input, null, xml, results );
+ return !results.pop();
+ };
+ }),
+
+ "has": markFunction(function( selector ) {
+ return function( elem ) {
+ return Sizzle( selector, elem ).length > 0;
+ };
+ }),
+
+ "contains": markFunction(function( text ) {
+ return function( elem ) {
+ return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+ };
+ }),
+
+ "enabled": function( elem ) {
+ return elem.disabled === false;
+ },
+
+ "disabled": function( elem ) {
+ return elem.disabled === true;
+ },
+
+ "checked": function( elem ) {
+ // In CSS3, :checked should return both checked and selected elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ var nodeName = elem.nodeName.toLowerCase();
+ return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+ },
+
+ "selected": function( elem ) {
+ // Accessing this property makes selected-by-default
+ // options in Safari work properly
+ if ( elem.parentNode ) {
+ elem.parentNode.selectedIndex;
+ }
+
+ return elem.selected === true;
+ },
+
+ "parent": function( elem ) {
+ return !Expr.pseudos["empty"]( elem );
+ },
+
+ "empty": function( elem ) {
+ // http://www.w3.org/TR/selectors/#empty-pseudo
+ // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
+ // not comment, processing instructions, or others
+ // Thanks to Diego Perini for the nodeName shortcut
+ // Greater than "@" means alpha characters (specifically not starting with "#" or "?")
+ var nodeType;
+ elem = elem.firstChild;
+ while ( elem ) {
+ if ( elem.nodeName > "@" || (nodeType = elem.nodeType) === 3 || nodeType === 4 ) {
+ return false;
+ }
+ elem = elem.nextSibling;
+ }
+ return true;
+ },
+
+ "header": function( elem ) {
+ return rheader.test( elem.nodeName );
+ },
+
+ "text": function( elem ) {
+ var type, attr;
+ // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
+ // use getAttribute instead to test this case
+ return elem.nodeName.toLowerCase() === "input" &&
+ (type = elem.type) === "text" &&
+ ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === type );
+ },
+
+ // Input types
+ "radio": createInputPseudo("radio"),
+ "checkbox": createInputPseudo("checkbox"),
+ "file": createInputPseudo("file"),
+ "password": createInputPseudo("password"),
+ "image": createInputPseudo("image"),
+
+ "submit": createButtonPseudo("submit"),
+ "reset": createButtonPseudo("reset"),
+
+ "button": function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === "button" || name === "button";
+ },
+
+ "input": function( elem ) {
+ return rinputs.test( elem.nodeName );
+ },
+
+ "focus": function( elem ) {
+ var doc = elem.ownerDocument;
+ return elem === doc.activeElement && (!doc.hasFocus || doc.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+ },
+
+ "active": function( elem ) {
+ return elem === elem.ownerDocument.activeElement;
+ },
+
+ // Positional types
+ "first": createPositionalPseudo(function() {
+ return [ 0 ];
+ }),
+
+ "last": createPositionalPseudo(function( matchIndexes, length ) {
+ return [ length - 1 ];
+ }),
+
+ "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ return [ argument < 0 ? argument + length : argument ];
+ }),
+
+ "even": createPositionalPseudo(function( matchIndexes, length ) {
+ for ( var i = 0; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "odd": createPositionalPseudo(function( matchIndexes, length ) {
+ for ( var i = 1; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ for ( var i = argument < 0 ? argument + length : argument; --i >= 0; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ for ( var i = argument < 0 ? argument + length : argument; ++i < length; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ })
+ }
+};
+
+function siblingCheck( a, b, ret ) {
+ if ( a === b ) {
+ return ret;
+ }
+
+ var cur = a.nextSibling;
+
+ while ( cur ) {
+ if ( cur === b ) {
+ return -1;
+ }
+
+ cur = cur.nextSibling;
+ }
+
+ return 1;
+}
+
+sortOrder = docElem.compareDocumentPosition ?
+ function( a, b ) {
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ return ( !a.compareDocumentPosition || !b.compareDocumentPosition ?
+ a.compareDocumentPosition :
+ a.compareDocumentPosition(b) & 4
+ ) ? -1 : 1;
+ } :
+ function( a, b ) {
+ // The nodes are identical, we can exit early
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+
+ // Fallback to using sourceIndex (in IE) if it's available on both nodes
+ } else if ( a.sourceIndex && b.sourceIndex ) {
+ return a.sourceIndex - b.sourceIndex;
+ }
+
+ var al, bl,
+ ap = [],
+ bp = [],
+ aup = a.parentNode,
+ bup = b.parentNode,
+ cur = aup;
+
+ // If the nodes are siblings (or identical) we can do a quick check
+ if ( aup === bup ) {
+ return siblingCheck( a, b );
+
+ // If no parents were found then the nodes are disconnected
+ } else if ( !aup ) {
+ return -1;
+
+ } else if ( !bup ) {
+ return 1;
+ }
+
+ // Otherwise they're somewhere else in the tree so we need
+ // to build up a full list of the parentNodes for comparison
+ while ( cur ) {
+ ap.unshift( cur );
+ cur = cur.parentNode;
+ }
+
+ cur = bup;
+
+ while ( cur ) {
+ bp.unshift( cur );
+ cur = cur.parentNode;
+ }
+
+ al = ap.length;
+ bl = bp.length;
+
+ // Start walking down the tree looking for a discrepancy
+ for ( var i = 0; i < al && i < bl; i++ ) {
+ if ( ap[i] !== bp[i] ) {
+ return siblingCheck( ap[i], bp[i] );
+ }
+ }
+
+ // We ended someplace up the tree so do a sibling check
+ return i === al ?
+ siblingCheck( a, bp[i], -1 ) :
+ siblingCheck( ap[i], b, 1 );
+ };
+
+// Always assume the presence of duplicates if sort doesn't
+// pass them to our comparison function (as in Google Chrome).
+[0, 0].sort( sortOrder );
+baseHasDuplicate = !hasDuplicate;
+
+// Document sorting and removing duplicates
+Sizzle.uniqueSort = function( results ) {
+ var elem,
+ duplicates = [],
+ i = 1,
+ j = 0;
+
+ hasDuplicate = baseHasDuplicate;
+ results.sort( sortOrder );
+
+ if ( hasDuplicate ) {
+ for ( ; (elem = results[i]); i++ ) {
+ if ( elem === results[ i - 1 ] ) {
+ j = duplicates.push( i );
+ }
+ }
+ while ( j-- ) {
+ results.splice( duplicates[ j ], 1 );
+ }
+ }
+
+ return results;
+};
+
+Sizzle.error = function( msg ) {
+ throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+function tokenize( selector, parseOnly ) {
+ var matched, match, tokens, type,
+ soFar, groups, preFilters,
+ cached = tokenCache[ expando ][ selector + " " ];
+
+ if ( cached ) {
+ return parseOnly ? 0 : cached.slice( 0 );
+ }
+
+ soFar = selector;
+ groups = [];
+ preFilters = Expr.preFilter;
+
+ while ( soFar ) {
+
+ // Comma and first run
+ if ( !matched || (match = rcomma.exec( soFar )) ) {
+ if ( match ) {
+ // Don't consume trailing commas as valid
+ soFar = soFar.slice( match[0].length ) || soFar;
+ }
+ groups.push( tokens = [] );
+ }
+
+ matched = false;
+
+ // Combinators
+ if ( (match = rcombinators.exec( soFar )) ) {
+ tokens.push( matched = new Token( match.shift() ) );
+ soFar = soFar.slice( matched.length );
+
+ // Cast descendant combinators to space
+ matched.type = match[0].replace( rtrim, " " );
+ }
+
+ // Filters
+ for ( type in Expr.filter ) {
+ if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
+ (match = preFilters[ type ]( match ))) ) {
+
+ tokens.push( matched = new Token( match.shift() ) );
+ soFar = soFar.slice( matched.length );
+ matched.type = type;
+ matched.matches = match;
+ }
+ }
+
+ if ( !matched ) {
+ break;
+ }
+ }
+
+ // Return the length of the invalid excess
+ // if we're just parsing
+ // Otherwise, throw an error or return tokens
+ return parseOnly ?
+ soFar.length :
+ soFar ?
+ Sizzle.error( selector ) :
+ // Cache the tokens
+ tokenCache( selector, groups ).slice( 0 );
+}
+
+function addCombinator( matcher, combinator, base ) {
+ var dir = combinator.dir,
+ checkNonElements = base && combinator.dir === "parentNode",
+ doneName = done++;
+
+ return combinator.first ?
+ // Check against closest ancestor/preceding element
+ function( elem, context, xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( checkNonElements || elem.nodeType === 1 ) {
+ return matcher( elem, context, xml );
+ }
+ }
+ } :
+
+ // Check against all ancestor/preceding elements
+ function( elem, context, xml ) {
+ // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
+ if ( !xml ) {
+ var cache,
+ dirkey = dirruns + " " + doneName + " ",
+ cachedkey = dirkey + cachedruns;
+ while ( (elem = elem[ dir ]) ) {
+ if ( checkNonElements || elem.nodeType === 1 ) {
+ if ( (cache = elem[ expando ]) === cachedkey ) {
+ return elem.sizset;
+ } else if ( typeof cache === "string" && cache.indexOf(dirkey) === 0 ) {
+ if ( elem.sizset ) {
+ return elem;
+ }
+ } else {
+ elem[ expando ] = cachedkey;
+ if ( matcher( elem, context, xml ) ) {
+ elem.sizset = true;
+ return elem;
+ }
+ elem.sizset = false;
+ }
+ }
+ }
+ } else {
+ while ( (elem = elem[ dir ]) ) {
+ if ( checkNonElements || elem.nodeType === 1 ) {
+ if ( matcher( elem, context, xml ) ) {
+ return elem;
+ }
+ }
+ }
+ }
+ };
+}
+
+function elementMatcher( matchers ) {
+ return matchers.length > 1 ?
+ function( elem, context, xml ) {
+ var i = matchers.length;
+ while ( i-- ) {
+ if ( !matchers[i]( elem, context, xml ) ) {
+ return false;
+ }
+ }
+ return true;
+ } :
+ matchers[0];
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+ var elem,
+ newUnmatched = [],
+ i = 0,
+ len = unmatched.length,
+ mapped = map != null;
+
+ for ( ; i < len; i++ ) {
+ if ( (elem = unmatched[i]) ) {
+ if ( !filter || filter( elem, context, xml ) ) {
+ newUnmatched.push( elem );
+ if ( mapped ) {
+ map.push( i );
+ }
+ }
+ }
+ }
+
+ return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+ if ( postFilter && !postFilter[ expando ] ) {
+ postFilter = setMatcher( postFilter );
+ }
+ if ( postFinder && !postFinder[ expando ] ) {
+ postFinder = setMatcher( postFinder, postSelector );
+ }
+ return markFunction(function( seed, results, context, xml ) {
+ var temp, i, elem,
+ preMap = [],
+ postMap = [],
+ preexisting = results.length,
+
+ // Get initial elements from seed or context
+ elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
+
+ // Prefilter to get matcher input, preserving a map for seed-results synchronization
+ matcherIn = preFilter && ( seed || !selector ) ?
+ condense( elems, preMap, preFilter, context, xml ) :
+ elems,
+
+ matcherOut = matcher ?
+ // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+ postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+ // ...intermediate processing is necessary
+ [] :
+
+ // ...otherwise use results directly
+ results :
+ matcherIn;
+
+ // Find primary matches
+ if ( matcher ) {
+ matcher( matcherIn, matcherOut, context, xml );
+ }
+
+ // Apply postFilter
+ if ( postFilter ) {
+ temp = condense( matcherOut, postMap );
+ postFilter( temp, [], context, xml );
+
+ // Un-match failing elements by moving them back to matcherIn
+ i = temp.length;
+ while ( i-- ) {
+ if ( (elem = temp[i]) ) {
+ matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+ }
+ }
+ }
+
+ if ( seed ) {
+ if ( postFinder || preFilter ) {
+ if ( postFinder ) {
+ // Get the final matcherOut by condensing this intermediate into postFinder contexts
+ temp = [];
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) ) {
+ // Restore matcherIn since elem is not yet a final match
+ temp.push( (matcherIn[i] = elem) );
+ }
+ }
+ postFinder( null, (matcherOut = []), temp, xml );
+ }
+
+ // Move matched elements from seed to results to keep them synchronized
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) &&
+ (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
+
+ seed[temp] = !(results[temp] = elem);
+ }
+ }
+ }
+
+ // Add elements to results, through postFinder if defined
+ } else {
+ matcherOut = condense(
+ matcherOut === results ?
+ matcherOut.splice( preexisting, matcherOut.length ) :
+ matcherOut
+ );
+ if ( postFinder ) {
+ postFinder( null, results, matcherOut, xml );
+ } else {
+ push.apply( results, matcherOut );
+ }
+ }
+ });
+}
+
+function matcherFromTokens( tokens ) {
+ var checkContext, matcher, j,
+ len = tokens.length,
+ leadingRelative = Expr.relative[ tokens[0].type ],
+ implicitRelative = leadingRelative || Expr.relative[" "],
+ i = leadingRelative ? 1 : 0,
+
+ // The foundational matcher ensures that elements are reachable from top-level context(s)
+ matchContext = addCombinator( function( elem ) {
+ return elem === checkContext;
+ }, implicitRelative, true ),
+ matchAnyContext = addCombinator( function( elem ) {
+ return indexOf.call( checkContext, elem ) > -1;
+ }, implicitRelative, true ),
+ matchers = [ function( elem, context, xml ) {
+ return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+ (checkContext = context).nodeType ?
+ matchContext( elem, context, xml ) :
+ matchAnyContext( elem, context, xml ) );
+ } ];
+
+ for ( ; i < len; i++ ) {
+ if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+ matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];
+ } else {
+ matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+ // Return special upon seeing a positional matcher
+ if ( matcher[ expando ] ) {
+ // Find the next relative operator (if any) for proper handling
+ j = ++i;
+ for ( ; j < len; j++ ) {
+ if ( Expr.relative[ tokens[j].type ] ) {
+ break;
+ }
+ }
+ return setMatcher(
+ i > 1 && elementMatcher( matchers ),
+ i > 1 && tokens.slice( 0, i - 1 ).join("").replace( rtrim, "$1" ),
+ matcher,
+ i < j && matcherFromTokens( tokens.slice( i, j ) ),
+ j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+ j < len && tokens.join("")
+ );
+ }
+ matchers.push( matcher );
+ }
+ }
+
+ return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+ var bySet = setMatchers.length > 0,
+ byElement = elementMatchers.length > 0,
+ superMatcher = function( seed, context, xml, results, expandContext ) {
+ var elem, j, matcher,
+ setMatched = [],
+ matchedCount = 0,
+ i = "0",
+ unmatched = seed && [],
+ outermost = expandContext != null,
+ contextBackup = outermostContext,
+ // We must always have either seed elements or context
+ elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
+ // Nested matchers should use non-integer dirruns
+ dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.E);
+
+ if ( outermost ) {
+ outermostContext = context !== document && context;
+ cachedruns = superMatcher.el;
+ }
+
+ // Add elements passing elementMatchers directly to results
+ for ( ; (elem = elems[i]) != null; i++ ) {
+ if ( byElement && elem ) {
+ for ( j = 0; (matcher = elementMatchers[j]); j++ ) {
+ if ( matcher( elem, context, xml ) ) {
+ results.push( elem );
+ break;
+ }
+ }
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ cachedruns = ++superMatcher.el;
+ }
+ }
+
+ // Track unmatched elements for set filters
+ if ( bySet ) {
+ // They will have gone through all possible matchers
+ if ( (elem = !matcher && elem) ) {
+ matchedCount--;
+ }
+
+ // Lengthen the array for every element, matched or not
+ if ( seed ) {
+ unmatched.push( elem );
+ }
+ }
+ }
+
+ // Apply set filters to unmatched elements
+ matchedCount += i;
+ if ( bySet && i !== matchedCount ) {
+ for ( j = 0; (matcher = setMatchers[j]); j++ ) {
+ matcher( unmatched, setMatched, context, xml );
+ }
+
+ if ( seed ) {
+ // Reintegrate element matches to eliminate the need for sorting
+ if ( matchedCount > 0 ) {
+ while ( i-- ) {
+ if ( !(unmatched[i] || setMatched[i]) ) {
+ setMatched[i] = pop.call( results );
+ }
+ }
+ }
+
+ // Discard index placeholder values to get only actual matches
+ setMatched = condense( setMatched );
+ }
+
+ // Add matches to results
+ push.apply( results, setMatched );
+
+ // Seedless set matches succeeding multiple successful matchers stipulate sorting
+ if ( outermost && !seed && setMatched.length > 0 &&
+ ( matchedCount + setMatchers.length ) > 1 ) {
+
+ Sizzle.uniqueSort( results );
+ }
+ }
+
+ // Override manipulation of globals by nested matchers
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ outermostContext = contextBackup;
+ }
+
+ return unmatched;
+ };
+
+ superMatcher.el = 0;
+ return bySet ?
+ markFunction( superMatcher ) :
+ superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
+ var i,
+ setMatchers = [],
+ elementMatchers = [],
+ cached = compilerCache[ expando ][ selector + " " ];
+
+ if ( !cached ) {
+ // Generate a function of recursive functions that can be used to check each element
+ if ( !group ) {
+ group = tokenize( selector );
+ }
+ i = group.length;
+ while ( i-- ) {
+ cached = matcherFromTokens( group[i] );
+ if ( cached[ expando ] ) {
+ setMatchers.push( cached );
+ } else {
+ elementMatchers.push( cached );
+ }
+ }
+
+ // Cache the compiled function
+ cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+ }
+ return cached;
+};
+
+function multipleContexts( selector, contexts, results ) {
+ var i = 0,
+ len = contexts.length;
+ for ( ; i < len; i++ ) {
+ Sizzle( selector, contexts[i], results );
+ }
+ return results;
+}
+
+function select( selector, context, results, seed, xml ) {
+ var i, tokens, token, type, find,
+ match = tokenize( selector ),
+ j = match.length;
+
+ if ( !seed ) {
+ // Try to minimize operations if there is only one group
+ if ( match.length === 1 ) {
+
+ // Take a shortcut and set the context if the root selector is an ID
+ tokens = match[0] = match[0].slice( 0 );
+ if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+ context.nodeType === 9 && !xml &&
+ Expr.relative[ tokens[1].type ] ) {
+
+ context = Expr.find["ID"]( token.matches[0].replace( rbackslash, "" ), context, xml )[0];
+ if ( !context ) {
+ return results;
+ }
+
+ selector = selector.slice( tokens.shift().length );
+ }
+
+ // Fetch a seed set for right-to-left matching
+ for ( i = matchExpr["POS"].test( selector ) ? -1 : tokens.length - 1; i >= 0; i-- ) {
+ token = tokens[i];
+
+ // Abort if we hit a combinator
+ if ( Expr.relative[ (type = token.type) ] ) {
+ break;
+ }
+ if ( (find = Expr.find[ type ]) ) {
+ // Search, expanding context for leading sibling combinators
+ if ( (seed = find(
+ token.matches[0].replace( rbackslash, "" ),
+ rsibling.test( tokens[0].type ) && context.parentNode || context,
+ xml
+ )) ) {
+
+ // If seed is empty or no tokens remain, we can return early
+ tokens.splice( i, 1 );
+ selector = seed.length && tokens.join("");
+ if ( !selector ) {
+ push.apply( results, slice.call( seed, 0 ) );
+ return results;
+ }
+
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ // Compile and execute a filtering function
+ // Provide `match` to avoid retokenization if we modified the selector above
+ compile( selector, match )(
+ seed,
+ context,
+ xml,
+ results,
+ rsibling.test( selector )
+ );
+ return results;
+}
+
+if ( document.querySelectorAll ) {
+ (function() {
+ var disconnectedMatch,
+ oldSelect = select,
+ rescape = /'|\\/g,
+ rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,
+
+ // qSa(:focus) reports false when true (Chrome 21), no need to also add to buggyMatches since matches checks buggyQSA
+ // A support test would require too much code (would include document ready)
+ rbuggyQSA = [ ":focus" ],
+
+ // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+ // A support test would require too much code (would include document ready)
+ // just skip matchesSelector for :active
+ rbuggyMatches = [ ":active" ],
+ matches = docElem.matchesSelector ||
+ docElem.mozMatchesSelector ||
+ docElem.webkitMatchesSelector ||
+ docElem.oMatchesSelector ||
+ docElem.msMatchesSelector;
+
+ // Build QSA regex
+ // Regex strategy adopted from Diego Perini
+ assert(function( div ) {
+ // Select is set to empty string on purpose
+ // This is to test IE's treatment of not explictly
+ // setting a boolean content attribute,
+ // since its presence should be enough
+ // http://bugs.jquery.com/ticket/12359
+ div.innerHTML = " ";
+
+ // IE8 - Some boolean attributes are not treated correctly
+ if ( !div.querySelectorAll("[selected]").length ) {
+ rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" );
+ }
+
+ // Webkit/Opera - :checked should return selected option elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ // IE8 throws error here (do not put tests after this one)
+ if ( !div.querySelectorAll(":checked").length ) {
+ rbuggyQSA.push(":checked");
+ }
+ });
+
+ assert(function( div ) {
+
+ // Opera 10-12/IE9 - ^= $= *= and empty values
+ // Should not select anything
+ div.innerHTML = "
";
+ if ( div.querySelectorAll("[test^='']").length ) {
+ rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" );
+ }
+
+ // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+ // IE8 throws error here (do not put tests after this one)
+ div.innerHTML = " ";
+ if ( !div.querySelectorAll(":enabled").length ) {
+ rbuggyQSA.push(":enabled", ":disabled");
+ }
+ });
+
+ // rbuggyQSA always contains :focus, so no need for a length check
+ rbuggyQSA = /* rbuggyQSA.length && */ new RegExp( rbuggyQSA.join("|") );
+
+ select = function( selector, context, results, seed, xml ) {
+ // Only use querySelectorAll when not filtering,
+ // when this is not xml,
+ // and when no QSA bugs apply
+ if ( !seed && !xml && !rbuggyQSA.test( selector ) ) {
+ var groups, i,
+ old = true,
+ nid = expando,
+ newContext = context,
+ newSelector = context.nodeType === 9 && selector;
+
+ // qSA works strangely on Element-rooted queries
+ // We can work around this by specifying an extra ID on the root
+ // and working up from there (Thanks to Andrew Dupont for the technique)
+ // IE 8 doesn't work on object elements
+ if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+ groups = tokenize( selector );
+
+ if ( (old = context.getAttribute("id")) ) {
+ nid = old.replace( rescape, "\\$&" );
+ } else {
+ context.setAttribute( "id", nid );
+ }
+ nid = "[id='" + nid + "'] ";
+
+ i = groups.length;
+ while ( i-- ) {
+ groups[i] = nid + groups[i].join("");
+ }
+ newContext = rsibling.test( selector ) && context.parentNode || context;
+ newSelector = groups.join(",");
+ }
+
+ if ( newSelector ) {
+ try {
+ push.apply( results, slice.call( newContext.querySelectorAll(
+ newSelector
+ ), 0 ) );
+ return results;
+ } catch(qsaError) {
+ } finally {
+ if ( !old ) {
+ context.removeAttribute("id");
+ }
+ }
+ }
+ }
+
+ return oldSelect( selector, context, results, seed, xml );
+ };
+
+ if ( matches ) {
+ assert(function( div ) {
+ // Check to see if it's possible to do matchesSelector
+ // on a disconnected node (IE 9)
+ disconnectedMatch = matches.call( div, "div" );
+
+ // This should fail with an exception
+ // Gecko does not error, returns false instead
+ try {
+ matches.call( div, "[test!='']:sizzle" );
+ rbuggyMatches.push( "!=", pseudos );
+ } catch ( e ) {}
+ });
+
+ // rbuggyMatches always contains :active and :focus, so no need for a length check
+ rbuggyMatches = /* rbuggyMatches.length && */ new RegExp( rbuggyMatches.join("|") );
+
+ Sizzle.matchesSelector = function( elem, expr ) {
+ // Make sure that attribute selectors are quoted
+ expr = expr.replace( rattributeQuotes, "='$1']" );
+
+ // rbuggyMatches always contains :active, so no need for an existence check
+ if ( !isXML( elem ) && !rbuggyMatches.test( expr ) && !rbuggyQSA.test( expr ) ) {
+ try {
+ var ret = matches.call( elem, expr );
+
+ // IE 9's matchesSelector returns false on disconnected nodes
+ if ( ret || disconnectedMatch ||
+ // As well, disconnected nodes are said to be in a document
+ // fragment in IE 9
+ elem.document && elem.document.nodeType !== 11 ) {
+ return ret;
+ }
+ } catch(e) {}
+ }
+
+ return Sizzle( expr, null, null, [ elem ] ).length > 0;
+ };
+ }
+ })();
+}
+
+// Deprecated
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Back-compat
+function setFilters() {}
+Expr.filters = setFilters.prototype = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+// Override sizzle attribute retrieval
+Sizzle.attr = jQuery.attr;
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.pseudos;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})( window );
+var runtil = /Until$/,
+ rparentsprev = /^(?:parents|prev(?:Until|All))/,
+ isSimple = /^.[^:#\[\.,]*$/,
+ rneedsContext = jQuery.expr.match.needsContext,
+ // methods guaranteed to produce a unique set when starting from a unique set
+ guaranteedUnique = {
+ children: true,
+ contents: true,
+ next: true,
+ prev: true
+ };
+
+jQuery.fn.extend({
+ find: function( selector ) {
+ var i, l, length, n, r, ret,
+ self = this;
+
+ if ( typeof selector !== "string" ) {
+ return jQuery( selector ).filter(function() {
+ for ( i = 0, l = self.length; i < l; i++ ) {
+ if ( jQuery.contains( self[ i ], this ) ) {
+ return true;
+ }
+ }
+ });
+ }
+
+ ret = this.pushStack( "", "find", selector );
+
+ for ( i = 0, l = this.length; i < l; i++ ) {
+ length = ret.length;
+ jQuery.find( selector, this[i], ret );
+
+ if ( i > 0 ) {
+ // Make sure that the results are unique
+ for ( n = length; n < ret.length; n++ ) {
+ for ( r = 0; r < length; r++ ) {
+ if ( ret[r] === ret[n] ) {
+ ret.splice(n--, 1);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ return ret;
+ },
+
+ has: function( target ) {
+ var i,
+ targets = jQuery( target, this ),
+ len = targets.length;
+
+ return this.filter(function() {
+ for ( i = 0; i < len; i++ ) {
+ if ( jQuery.contains( this, targets[i] ) ) {
+ return true;
+ }
+ }
+ });
+ },
+
+ not: function( selector ) {
+ return this.pushStack( winnow(this, selector, false), "not", selector);
+ },
+
+ filter: function( selector ) {
+ return this.pushStack( winnow(this, selector, true), "filter", selector );
+ },
+
+ is: function( selector ) {
+ return !!selector && (
+ typeof selector === "string" ?
+ // If this is a positional/relative selector, check membership in the returned set
+ // so $("p:first").is("p:last") won't return true for a doc with two "p".
+ rneedsContext.test( selector ) ?
+ jQuery( selector, this.context ).index( this[0] ) >= 0 :
+ jQuery.filter( selector, this ).length > 0 :
+ this.filter( selector ).length > 0 );
+ },
+
+ closest: function( selectors, context ) {
+ var cur,
+ i = 0,
+ l = this.length,
+ ret = [],
+ pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
+ jQuery( selectors, context || this.context ) :
+ 0;
+
+ for ( ; i < l; i++ ) {
+ cur = this[i];
+
+ while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) {
+ if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
+ ret.push( cur );
+ break;
+ }
+ cur = cur.parentNode;
+ }
+ }
+
+ ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
+
+ return this.pushStack( ret, "closest", selectors );
+ },
+
+ // Determine the position of an element within
+ // the matched set of elements
+ index: function( elem ) {
+
+ // No argument, return index in parent
+ if ( !elem ) {
+ return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1;
+ }
+
+ // index in selector
+ if ( typeof elem === "string" ) {
+ return jQuery.inArray( this[0], jQuery( elem ) );
+ }
+
+ // Locate the position of the desired element
+ return jQuery.inArray(
+ // If it receives a jQuery object, the first element is used
+ elem.jquery ? elem[0] : elem, this );
+ },
+
+ add: function( selector, context ) {
+ var set = typeof selector === "string" ?
+ jQuery( selector, context ) :
+ jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
+ all = jQuery.merge( this.get(), set );
+
+ return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
+ all :
+ jQuery.unique( all ) );
+ },
+
+ addBack: function( selector ) {
+ return this.add( selector == null ?
+ this.prevObject : this.prevObject.filter(selector)
+ );
+ }
+});
+
+jQuery.fn.andSelf = jQuery.fn.addBack;
+
+// A painfully simple check to see if an element is disconnected
+// from a document (should be improved, where feasible).
+function isDisconnected( node ) {
+ return !node || !node.parentNode || node.parentNode.nodeType === 11;
+}
+
+function sibling( cur, dir ) {
+ do {
+ cur = cur[ dir ];
+ } while ( cur && cur.nodeType !== 1 );
+
+ return cur;
+}
+
+jQuery.each({
+ parent: function( elem ) {
+ var parent = elem.parentNode;
+ return parent && parent.nodeType !== 11 ? parent : null;
+ },
+ parents: function( elem ) {
+ return jQuery.dir( elem, "parentNode" );
+ },
+ parentsUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "parentNode", until );
+ },
+ next: function( elem ) {
+ return sibling( elem, "nextSibling" );
+ },
+ prev: function( elem ) {
+ return sibling( elem, "previousSibling" );
+ },
+ nextAll: function( elem ) {
+ return jQuery.dir( elem, "nextSibling" );
+ },
+ prevAll: function( elem ) {
+ return jQuery.dir( elem, "previousSibling" );
+ },
+ nextUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "nextSibling", until );
+ },
+ prevUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "previousSibling", until );
+ },
+ siblings: function( elem ) {
+ return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
+ },
+ children: function( elem ) {
+ return jQuery.sibling( elem.firstChild );
+ },
+ contents: function( elem ) {
+ return jQuery.nodeName( elem, "iframe" ) ?
+ elem.contentDocument || elem.contentWindow.document :
+ jQuery.merge( [], elem.childNodes );
+ }
+}, function( name, fn ) {
+ jQuery.fn[ name ] = function( until, selector ) {
+ var ret = jQuery.map( this, fn, until );
+
+ if ( !runtil.test( name ) ) {
+ selector = until;
+ }
+
+ if ( selector && typeof selector === "string" ) {
+ ret = jQuery.filter( selector, ret );
+ }
+
+ ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
+
+ if ( this.length > 1 && rparentsprev.test( name ) ) {
+ ret = ret.reverse();
+ }
+
+ return this.pushStack( ret, name, core_slice.call( arguments ).join(",") );
+ };
+});
+
+jQuery.extend({
+ filter: function( expr, elems, not ) {
+ if ( not ) {
+ expr = ":not(" + expr + ")";
+ }
+
+ return elems.length === 1 ?
+ jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
+ jQuery.find.matches(expr, elems);
+ },
+
+ dir: function( elem, dir, until ) {
+ var matched = [],
+ cur = elem[ dir ];
+
+ while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
+ if ( cur.nodeType === 1 ) {
+ matched.push( cur );
+ }
+ cur = cur[dir];
+ }
+ return matched;
+ },
+
+ sibling: function( n, elem ) {
+ var r = [];
+
+ for ( ; n; n = n.nextSibling ) {
+ if ( n.nodeType === 1 && n !== elem ) {
+ r.push( n );
+ }
+ }
+
+ return r;
+ }
+});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, keep ) {
+
+ // Can't pass null or undefined to indexOf in Firefox 4
+ // Set to 0 to skip string check
+ qualifier = qualifier || 0;
+
+ if ( jQuery.isFunction( qualifier ) ) {
+ return jQuery.grep(elements, function( elem, i ) {
+ var retVal = !!qualifier.call( elem, i, elem );
+ return retVal === keep;
+ });
+
+ } else if ( qualifier.nodeType ) {
+ return jQuery.grep(elements, function( elem, i ) {
+ return ( elem === qualifier ) === keep;
+ });
+
+ } else if ( typeof qualifier === "string" ) {
+ var filtered = jQuery.grep(elements, function( elem ) {
+ return elem.nodeType === 1;
+ });
+
+ if ( isSimple.test( qualifier ) ) {
+ return jQuery.filter(qualifier, filtered, !keep);
+ } else {
+ qualifier = jQuery.filter( qualifier, filtered );
+ }
+ }
+
+ return jQuery.grep(elements, function( elem, i ) {
+ return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
+ });
+}
+function createSafeFragment( document ) {
+ var list = nodeNames.split( "|" ),
+ safeFrag = document.createDocumentFragment();
+
+ if ( safeFrag.createElement ) {
+ while ( list.length ) {
+ safeFrag.createElement(
+ list.pop()
+ );
+ }
+ }
+ return safeFrag;
+}
+
+var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
+ "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
+ rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
+ rleadingWhitespace = /^\s+/,
+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
+ rtagName = /<([\w:]+)/,
+ rtbody = / ]", "i"),
+ rcheckableType = /^(?:checkbox|radio)$/,
+ // checked="checked" or checked
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+ rscriptType = /\/(java|ecma)script/i,
+ rcleanScript = /^\s*\s*$/g,
+ wrapMap = {
+ option: [ 1, "", " " ],
+ legend: [ 1, "", " " ],
+ thead: [ 1, "" ],
+ tr: [ 2, "" ],
+ td: [ 3, "" ],
+ col: [ 2, "" ],
+ area: [ 1, "", " " ],
+ _default: [ 0, "", "" ]
+ },
+ safeFragment = createSafeFragment( document ),
+ fragmentDiv = safeFragment.appendChild( document.createElement("div") );
+
+wrapMap.optgroup = wrapMap.option;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
+// unless wrapped in a div with non-breaking characters in front of it.
+if ( !jQuery.support.htmlSerialize ) {
+ wrapMap._default = [ 1, "X", "
" ];
+}
+
+jQuery.fn.extend({
+ text: function( value ) {
+ return jQuery.access( this, function( value ) {
+ return value === undefined ?
+ jQuery.text( this ) :
+ this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
+ }, null, value, arguments.length );
+ },
+
+ wrapAll: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function(i) {
+ jQuery(this).wrapAll( html.call(this, i) );
+ });
+ }
+
+ if ( this[0] ) {
+ // The elements to wrap the target around
+ var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
+
+ if ( this[0].parentNode ) {
+ wrap.insertBefore( this[0] );
+ }
+
+ wrap.map(function() {
+ var elem = this;
+
+ while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
+ elem = elem.firstChild;
+ }
+
+ return elem;
+ }).append( this );
+ }
+
+ return this;
+ },
+
+ wrapInner: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function(i) {
+ jQuery(this).wrapInner( html.call(this, i) );
+ });
+ }
+
+ return this.each(function() {
+ var self = jQuery( this ),
+ contents = self.contents();
+
+ if ( contents.length ) {
+ contents.wrapAll( html );
+
+ } else {
+ self.append( html );
+ }
+ });
+ },
+
+ wrap: function( html ) {
+ var isFunction = jQuery.isFunction( html );
+
+ return this.each(function(i) {
+ jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
+ });
+ },
+
+ unwrap: function() {
+ return this.parent().each(function() {
+ if ( !jQuery.nodeName( this, "body" ) ) {
+ jQuery( this ).replaceWith( this.childNodes );
+ }
+ }).end();
+ },
+
+ append: function() {
+ return this.domManip(arguments, true, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 ) {
+ this.appendChild( elem );
+ }
+ });
+ },
+
+ prepend: function() {
+ return this.domManip(arguments, true, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 ) {
+ this.insertBefore( elem, this.firstChild );
+ }
+ });
+ },
+
+ before: function() {
+ if ( !isDisconnected( this[0] ) ) {
+ return this.domManip(arguments, false, function( elem ) {
+ this.parentNode.insertBefore( elem, this );
+ });
+ }
+
+ if ( arguments.length ) {
+ var set = jQuery.clean( arguments );
+ return this.pushStack( jQuery.merge( set, this ), "before", this.selector );
+ }
+ },
+
+ after: function() {
+ if ( !isDisconnected( this[0] ) ) {
+ return this.domManip(arguments, false, function( elem ) {
+ this.parentNode.insertBefore( elem, this.nextSibling );
+ });
+ }
+
+ if ( arguments.length ) {
+ var set = jQuery.clean( arguments );
+ return this.pushStack( jQuery.merge( this, set ), "after", this.selector );
+ }
+ },
+
+ // keepData is for internal use only--do not document
+ remove: function( selector, keepData ) {
+ var elem,
+ i = 0;
+
+ for ( ; (elem = this[i]) != null; i++ ) {
+ if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
+ if ( !keepData && elem.nodeType === 1 ) {
+ jQuery.cleanData( elem.getElementsByTagName("*") );
+ jQuery.cleanData( [ elem ] );
+ }
+
+ if ( elem.parentNode ) {
+ elem.parentNode.removeChild( elem );
+ }
+ }
+ }
+
+ return this;
+ },
+
+ empty: function() {
+ var elem,
+ i = 0;
+
+ for ( ; (elem = this[i]) != null; i++ ) {
+ // Remove element nodes and prevent memory leaks
+ if ( elem.nodeType === 1 ) {
+ jQuery.cleanData( elem.getElementsByTagName("*") );
+ }
+
+ // Remove any remaining nodes
+ while ( elem.firstChild ) {
+ elem.removeChild( elem.firstChild );
+ }
+ }
+
+ return this;
+ },
+
+ clone: function( dataAndEvents, deepDataAndEvents ) {
+ dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+ deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+ return this.map( function () {
+ return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+ });
+ },
+
+ html: function( value ) {
+ return jQuery.access( this, function( value ) {
+ var elem = this[0] || {},
+ i = 0,
+ l = this.length;
+
+ if ( value === undefined ) {
+ return elem.nodeType === 1 ?
+ elem.innerHTML.replace( rinlinejQuery, "" ) :
+ undefined;
+ }
+
+ // See if we can take a shortcut and just use innerHTML
+ if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
+ ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) &&
+ ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
+ !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
+
+ value = value.replace( rxhtmlTag, "<$1>$2>" );
+
+ try {
+ for (; i < l; i++ ) {
+ // Remove element nodes and prevent memory leaks
+ elem = this[i] || {};
+ if ( elem.nodeType === 1 ) {
+ jQuery.cleanData( elem.getElementsByTagName( "*" ) );
+ elem.innerHTML = value;
+ }
+ }
+
+ elem = 0;
+
+ // If using innerHTML throws an exception, use the fallback method
+ } catch(e) {}
+ }
+
+ if ( elem ) {
+ this.empty().append( value );
+ }
+ }, null, value, arguments.length );
+ },
+
+ replaceWith: function( value ) {
+ if ( !isDisconnected( this[0] ) ) {
+ // Make sure that the elements are removed from the DOM before they are inserted
+ // this can help fix replacing a parent with child elements
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function(i) {
+ var self = jQuery(this), old = self.html();
+ self.replaceWith( value.call( this, i, old ) );
+ });
+ }
+
+ if ( typeof value !== "string" ) {
+ value = jQuery( value ).detach();
+ }
+
+ return this.each(function() {
+ var next = this.nextSibling,
+ parent = this.parentNode;
+
+ jQuery( this ).remove();
+
+ if ( next ) {
+ jQuery(next).before( value );
+ } else {
+ jQuery(parent).append( value );
+ }
+ });
+ }
+
+ return this.length ?
+ this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) :
+ this;
+ },
+
+ detach: function( selector ) {
+ return this.remove( selector, true );
+ },
+
+ domManip: function( args, table, callback ) {
+
+ // Flatten any nested arrays
+ args = [].concat.apply( [], args );
+
+ var results, first, fragment, iNoClone,
+ i = 0,
+ value = args[0],
+ scripts = [],
+ l = this.length;
+
+ // We can't cloneNode fragments that contain checked, in WebKit
+ if ( !jQuery.support.checkClone && l > 1 && typeof value === "string" && rchecked.test( value ) ) {
+ return this.each(function() {
+ jQuery(this).domManip( args, table, callback );
+ });
+ }
+
+ if ( jQuery.isFunction(value) ) {
+ return this.each(function(i) {
+ var self = jQuery(this);
+ args[0] = value.call( this, i, table ? self.html() : undefined );
+ self.domManip( args, table, callback );
+ });
+ }
+
+ if ( this[0] ) {
+ results = jQuery.buildFragment( args, this, scripts );
+ fragment = results.fragment;
+ first = fragment.firstChild;
+
+ if ( fragment.childNodes.length === 1 ) {
+ fragment = first;
+ }
+
+ if ( first ) {
+ table = table && jQuery.nodeName( first, "tr" );
+
+ // Use the original fragment for the last item instead of the first because it can end up
+ // being emptied incorrectly in certain situations (#8070).
+ // Fragments from the fragment cache must always be cloned and never used in place.
+ for ( iNoClone = results.cacheable || l - 1; i < l; i++ ) {
+ callback.call(
+ table && jQuery.nodeName( this[i], "table" ) ?
+ findOrAppend( this[i], "tbody" ) :
+ this[i],
+ i === iNoClone ?
+ fragment :
+ jQuery.clone( fragment, true, true )
+ );
+ }
+ }
+
+ // Fix #11809: Avoid leaking memory
+ fragment = first = null;
+
+ if ( scripts.length ) {
+ jQuery.each( scripts, function( i, elem ) {
+ if ( elem.src ) {
+ if ( jQuery.ajax ) {
+ jQuery.ajax({
+ url: elem.src,
+ type: "GET",
+ dataType: "script",
+ async: false,
+ global: false,
+ "throws": true
+ });
+ } else {
+ jQuery.error("no ajax");
+ }
+ } else {
+ jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "" ) );
+ }
+
+ if ( elem.parentNode ) {
+ elem.parentNode.removeChild( elem );
+ }
+ });
+ }
+ }
+
+ return this;
+ }
+});
+
+function findOrAppend( elem, tag ) {
+ return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) );
+}
+
+function cloneCopyEvent( src, dest ) {
+
+ if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
+ return;
+ }
+
+ var type, i, l,
+ oldData = jQuery._data( src ),
+ curData = jQuery._data( dest, oldData ),
+ events = oldData.events;
+
+ if ( events ) {
+ delete curData.handle;
+ curData.events = {};
+
+ for ( type in events ) {
+ for ( i = 0, l = events[ type ].length; i < l; i++ ) {
+ jQuery.event.add( dest, type, events[ type ][ i ] );
+ }
+ }
+ }
+
+ // make the cloned public data object a copy from the original
+ if ( curData.data ) {
+ curData.data = jQuery.extend( {}, curData.data );
+ }
+}
+
+function cloneFixAttributes( src, dest ) {
+ var nodeName;
+
+ // We do not need to do anything for non-Elements
+ if ( dest.nodeType !== 1 ) {
+ return;
+ }
+
+ // clearAttributes removes the attributes, which we don't want,
+ // but also removes the attachEvent events, which we *do* want
+ if ( dest.clearAttributes ) {
+ dest.clearAttributes();
+ }
+
+ // mergeAttributes, in contrast, only merges back on the
+ // original attributes, not the events
+ if ( dest.mergeAttributes ) {
+ dest.mergeAttributes( src );
+ }
+
+ nodeName = dest.nodeName.toLowerCase();
+
+ if ( nodeName === "object" ) {
+ // IE6-10 improperly clones children of object elements using classid.
+ // IE10 throws NoModificationAllowedError if parent is null, #12132.
+ if ( dest.parentNode ) {
+ dest.outerHTML = src.outerHTML;
+ }
+
+ // This path appears unavoidable for IE9. When cloning an object
+ // element in IE9, the outerHTML strategy above is not sufficient.
+ // If the src has innerHTML and the destination does not,
+ // copy the src.innerHTML into the dest.innerHTML. #10324
+ if ( jQuery.support.html5Clone && (src.innerHTML && !jQuery.trim(dest.innerHTML)) ) {
+ dest.innerHTML = src.innerHTML;
+ }
+
+ } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
+ // IE6-8 fails to persist the checked state of a cloned checkbox
+ // or radio button. Worse, IE6-7 fail to give the cloned element
+ // a checked appearance if the defaultChecked value isn't also set
+
+ dest.defaultChecked = dest.checked = src.checked;
+
+ // IE6-7 get confused and end up setting the value of a cloned
+ // checkbox/radio button to an empty string instead of "on"
+ if ( dest.value !== src.value ) {
+ dest.value = src.value;
+ }
+
+ // IE6-8 fails to return the selected option to the default selected
+ // state when cloning options
+ } else if ( nodeName === "option" ) {
+ dest.selected = src.defaultSelected;
+
+ // IE6-8 fails to set the defaultValue to the correct value when
+ // cloning other types of input fields
+ } else if ( nodeName === "input" || nodeName === "textarea" ) {
+ dest.defaultValue = src.defaultValue;
+
+ // IE blanks contents when cloning scripts
+ } else if ( nodeName === "script" && dest.text !== src.text ) {
+ dest.text = src.text;
+ }
+
+ // Event data gets referenced instead of copied if the expando
+ // gets copied too
+ dest.removeAttribute( jQuery.expando );
+}
+
+jQuery.buildFragment = function( args, context, scripts ) {
+ var fragment, cacheable, cachehit,
+ first = args[ 0 ];
+
+ // Set context from what may come in as undefined or a jQuery collection or a node
+ // Updated to fix #12266 where accessing context[0] could throw an exception in IE9/10 &
+ // also doubles as fix for #8950 where plain objects caused createDocumentFragment exception
+ context = context || document;
+ context = !context.nodeType && context[0] || context;
+ context = context.ownerDocument || context;
+
+ // Only cache "small" (1/2 KB) HTML strings that are associated with the main document
+ // Cloning options loses the selected state, so don't cache them
+ // IE 6 doesn't like it when you put or elements in a fragment
+ // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
+ // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501
+ if ( args.length === 1 && typeof first === "string" && first.length < 512 && context === document &&
+ first.charAt(0) === "<" && !rnocache.test( first ) &&
+ (jQuery.support.checkClone || !rchecked.test( first )) &&
+ (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
+
+ // Mark cacheable and look for a hit
+ cacheable = true;
+ fragment = jQuery.fragments[ first ];
+ cachehit = fragment !== undefined;
+ }
+
+ if ( !fragment ) {
+ fragment = context.createDocumentFragment();
+ jQuery.clean( args, context, fragment, scripts );
+
+ // Update the cache, but only store false
+ // unless this is a second parsing of the same content
+ if ( cacheable ) {
+ jQuery.fragments[ first ] = cachehit && fragment;
+ }
+ }
+
+ return { fragment: fragment, cacheable: cacheable };
+};
+
+jQuery.fragments = {};
+
+jQuery.each({
+ appendTo: "append",
+ prependTo: "prepend",
+ insertBefore: "before",
+ insertAfter: "after",
+ replaceAll: "replaceWith"
+}, function( name, original ) {
+ jQuery.fn[ name ] = function( selector ) {
+ var elems,
+ i = 0,
+ ret = [],
+ insert = jQuery( selector ),
+ l = insert.length,
+ parent = this.length === 1 && this[0].parentNode;
+
+ if ( (parent == null || parent && parent.nodeType === 11 && parent.childNodes.length === 1) && l === 1 ) {
+ insert[ original ]( this[0] );
+ return this;
+ } else {
+ for ( ; i < l; i++ ) {
+ elems = ( i > 0 ? this.clone(true) : this ).get();
+ jQuery( insert[i] )[ original ]( elems );
+ ret = ret.concat( elems );
+ }
+
+ return this.pushStack( ret, name, insert.selector );
+ }
+ };
+});
+
+function getAll( elem ) {
+ if ( typeof elem.getElementsByTagName !== "undefined" ) {
+ return elem.getElementsByTagName( "*" );
+
+ } else if ( typeof elem.querySelectorAll !== "undefined" ) {
+ return elem.querySelectorAll( "*" );
+
+ } else {
+ return [];
+ }
+}
+
+// Used in clean, fixes the defaultChecked property
+function fixDefaultChecked( elem ) {
+ if ( rcheckableType.test( elem.type ) ) {
+ elem.defaultChecked = elem.checked;
+ }
+}
+
+jQuery.extend({
+ clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+ var srcElements,
+ destElements,
+ i,
+ clone;
+
+ if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
+ clone = elem.cloneNode( true );
+
+ // IE<=8 does not properly clone detached, unknown element nodes
+ } else {
+ fragmentDiv.innerHTML = elem.outerHTML;
+ fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
+ }
+
+ if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
+ (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
+ // IE copies events bound via attachEvent when using cloneNode.
+ // Calling detachEvent on the clone will also remove the events
+ // from the original. In order to get around this, we use some
+ // proprietary methods to clear the events. Thanks to MooTools
+ // guys for this hotness.
+
+ cloneFixAttributes( elem, clone );
+
+ // Using Sizzle here is crazy slow, so we use getElementsByTagName instead
+ srcElements = getAll( elem );
+ destElements = getAll( clone );
+
+ // Weird iteration because IE will replace the length property
+ // with an element if you are cloning the body and one of the
+ // elements on the page has a name or id of "length"
+ for ( i = 0; srcElements[i]; ++i ) {
+ // Ensure that the destination node is not null; Fixes #9587
+ if ( destElements[i] ) {
+ cloneFixAttributes( srcElements[i], destElements[i] );
+ }
+ }
+ }
+
+ // Copy the events from the original to the clone
+ if ( dataAndEvents ) {
+ cloneCopyEvent( elem, clone );
+
+ if ( deepDataAndEvents ) {
+ srcElements = getAll( elem );
+ destElements = getAll( clone );
+
+ for ( i = 0; srcElements[i]; ++i ) {
+ cloneCopyEvent( srcElements[i], destElements[i] );
+ }
+ }
+ }
+
+ srcElements = destElements = null;
+
+ // Return the cloned set
+ return clone;
+ },
+
+ clean: function( elems, context, fragment, scripts ) {
+ var i, j, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags,
+ safe = context === document && safeFragment,
+ ret = [];
+
+ // Ensure that context is a document
+ if ( !context || typeof context.createDocumentFragment === "undefined" ) {
+ context = document;
+ }
+
+ // Use the already-created safe fragment if context permits
+ for ( i = 0; (elem = elems[i]) != null; i++ ) {
+ if ( typeof elem === "number" ) {
+ elem += "";
+ }
+
+ if ( !elem ) {
+ continue;
+ }
+
+ // Convert html string into DOM nodes
+ if ( typeof elem === "string" ) {
+ if ( !rhtml.test( elem ) ) {
+ elem = context.createTextNode( elem );
+ } else {
+ // Ensure a safe container in which to render the html
+ safe = safe || createSafeFragment( context );
+ div = context.createElement("div");
+ safe.appendChild( div );
+
+ // Fix "XHTML"-style tags in all browsers
+ elem = elem.replace(rxhtmlTag, "<$1>$2>");
+
+ // Go to html and back, then peel off extra wrappers
+ tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase();
+ wrap = wrapMap[ tag ] || wrapMap._default;
+ depth = wrap[0];
+ div.innerHTML = wrap[1] + elem + wrap[2];
+
+ // Move to the right depth
+ while ( depth-- ) {
+ div = div.lastChild;
+ }
+
+ // Remove IE's autoinserted from table fragments
+ if ( !jQuery.support.tbody ) {
+
+ // String was a , *may* have spurious
+ hasBody = rtbody.test(elem);
+ tbody = tag === "table" && !hasBody ?
+ div.firstChild && div.firstChild.childNodes :
+
+ // String was a bare or
+ wrap[1] === "" && !hasBody ?
+ div.childNodes :
+ [];
+
+ for ( j = tbody.length - 1; j >= 0 ; --j ) {
+ if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
+ tbody[ j ].parentNode.removeChild( tbody[ j ] );
+ }
+ }
+ }
+
+ // IE completely kills leading whitespace when innerHTML is used
+ if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
+ div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
+ }
+
+ elem = div.childNodes;
+
+ // Take out of fragment container (we need a fresh div each time)
+ div.parentNode.removeChild( div );
+ }
+ }
+
+ if ( elem.nodeType ) {
+ ret.push( elem );
+ } else {
+ jQuery.merge( ret, elem );
+ }
+ }
+
+ // Fix #11356: Clear elements from safeFragment
+ if ( div ) {
+ elem = div = safe = null;
+ }
+
+ // Reset defaultChecked for any radios and checkboxes
+ // about to be appended to the DOM in IE 6/7 (#8060)
+ if ( !jQuery.support.appendChecked ) {
+ for ( i = 0; (elem = ret[i]) != null; i++ ) {
+ if ( jQuery.nodeName( elem, "input" ) ) {
+ fixDefaultChecked( elem );
+ } else if ( typeof elem.getElementsByTagName !== "undefined" ) {
+ jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
+ }
+ }
+ }
+
+ // Append elements to a provided document fragment
+ if ( fragment ) {
+ // Special handling of each script element
+ handleScript = function( elem ) {
+ // Check if we consider it executable
+ if ( !elem.type || rscriptType.test( elem.type ) ) {
+ // Detach the script and store it in the scripts array (if provided) or the fragment
+ // Return truthy to indicate that it has been handled
+ return scripts ?
+ scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) :
+ fragment.appendChild( elem );
+ }
+ };
+
+ for ( i = 0; (elem = ret[i]) != null; i++ ) {
+ // Check if we're done after handling an executable script
+ if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) {
+ // Append to fragment and handle embedded scripts
+ fragment.appendChild( elem );
+ if ( typeof elem.getElementsByTagName !== "undefined" ) {
+ // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration
+ jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript );
+
+ // Splice the scripts into ret after their former ancestor and advance our index beyond them
+ ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
+ i += jsTags.length;
+ }
+ }
+ }
+ }
+
+ return ret;
+ },
+
+ cleanData: function( elems, /* internal */ acceptData ) {
+ var data, id, elem, type,
+ i = 0,
+ internalKey = jQuery.expando,
+ cache = jQuery.cache,
+ deleteExpando = jQuery.support.deleteExpando,
+ special = jQuery.event.special;
+
+ for ( ; (elem = elems[i]) != null; i++ ) {
+
+ if ( acceptData || jQuery.acceptData( elem ) ) {
+
+ id = elem[ internalKey ];
+ data = id && cache[ id ];
+
+ if ( data ) {
+ if ( data.events ) {
+ for ( type in data.events ) {
+ if ( special[ type ] ) {
+ jQuery.event.remove( elem, type );
+
+ // This is a shortcut to avoid jQuery.event.remove's overhead
+ } else {
+ jQuery.removeEvent( elem, type, data.handle );
+ }
+ }
+ }
+
+ // Remove cache only if it was not already removed by jQuery.event.remove
+ if ( cache[ id ] ) {
+
+ delete cache[ id ];
+
+ // IE does not allow us to delete expando properties from nodes,
+ // nor does it have a removeAttribute function on Document nodes;
+ // we must handle all of these cases
+ if ( deleteExpando ) {
+ delete elem[ internalKey ];
+
+ } else if ( elem.removeAttribute ) {
+ elem.removeAttribute( internalKey );
+
+ } else {
+ elem[ internalKey ] = null;
+ }
+
+ jQuery.deletedIds.push( id );
+ }
+ }
+ }
+ }
+ }
+});
+// Limit scope pollution from any deprecated API
+(function() {
+
+var matched, browser;
+
+// Use of jQuery.browser is frowned upon.
+// More details: http://api.jquery.com/jQuery.browser
+// jQuery.uaMatch maintained for back-compat
+jQuery.uaMatch = function( ua ) {
+ ua = ua.toLowerCase();
+
+ var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
+ /(webkit)[ \/]([\w.]+)/.exec( ua ) ||
+ /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
+ /(msie) ([\w.]+)/.exec( ua ) ||
+ ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
+ [];
+
+ return {
+ browser: match[ 1 ] || "",
+ version: match[ 2 ] || "0"
+ };
+};
+
+matched = jQuery.uaMatch( navigator.userAgent );
+browser = {};
+
+if ( matched.browser ) {
+ browser[ matched.browser ] = true;
+ browser.version = matched.version;
+}
+
+// Chrome is Webkit, but Webkit is also Safari.
+if ( browser.chrome ) {
+ browser.webkit = true;
+} else if ( browser.webkit ) {
+ browser.safari = true;
+}
+
+jQuery.browser = browser;
+
+jQuery.sub = function() {
+ function jQuerySub( selector, context ) {
+ return new jQuerySub.fn.init( selector, context );
+ }
+ jQuery.extend( true, jQuerySub, this );
+ jQuerySub.superclass = this;
+ jQuerySub.fn = jQuerySub.prototype = this();
+ jQuerySub.fn.constructor = jQuerySub;
+ jQuerySub.sub = this.sub;
+ jQuerySub.fn.init = function init( selector, context ) {
+ if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
+ context = jQuerySub( context );
+ }
+
+ return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
+ };
+ jQuerySub.fn.init.prototype = jQuerySub.fn;
+ var rootjQuerySub = jQuerySub(document);
+ return jQuerySub;
+};
+
+})();
+var curCSS, iframe, iframeDoc,
+ ralpha = /alpha\([^)]*\)/i,
+ ropacity = /opacity=([^)]*)/,
+ rposition = /^(top|right|bottom|left)$/,
+ // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
+ // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
+ rdisplayswap = /^(none|table(?!-c[ea]).+)/,
+ rmargin = /^margin/,
+ rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
+ rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
+ rrelNum = new RegExp( "^([-+])=(" + core_pnum + ")", "i" ),
+ elemdisplay = { BODY: "block" },
+
+ cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+ cssNormalTransform = {
+ letterSpacing: 0,
+ fontWeight: 400
+ },
+
+ cssExpand = [ "Top", "Right", "Bottom", "Left" ],
+ cssPrefixes = [ "Webkit", "O", "Moz", "ms" ],
+
+ eventsToggle = jQuery.fn.toggle;
+
+// return a css property mapped to a potentially vendor prefixed property
+function vendorPropName( style, name ) {
+
+ // shortcut for names that are not vendor prefixed
+ if ( name in style ) {
+ return name;
+ }
+
+ // check for vendor prefixed names
+ var capName = name.charAt(0).toUpperCase() + name.slice(1),
+ origName = name,
+ i = cssPrefixes.length;
+
+ while ( i-- ) {
+ name = cssPrefixes[ i ] + capName;
+ if ( name in style ) {
+ return name;
+ }
+ }
+
+ return origName;
+}
+
+function isHidden( elem, el ) {
+ elem = el || elem;
+ return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
+}
+
+function showHide( elements, show ) {
+ var elem, display,
+ values = [],
+ index = 0,
+ length = elements.length;
+
+ for ( ; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+ values[ index ] = jQuery._data( elem, "olddisplay" );
+ if ( show ) {
+ // Reset the inline display of this element to learn if it is
+ // being hidden by cascaded rules or not
+ if ( !values[ index ] && elem.style.display === "none" ) {
+ elem.style.display = "";
+ }
+
+ // Set elements which have been overridden with display: none
+ // in a stylesheet to whatever the default browser style is
+ // for such an element
+ if ( elem.style.display === "" && isHidden( elem ) ) {
+ values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );
+ }
+ } else {
+ display = curCSS( elem, "display" );
+
+ if ( !values[ index ] && display !== "none" ) {
+ jQuery._data( elem, "olddisplay", display );
+ }
+ }
+ }
+
+ // Set the display of most of the elements in a second loop
+ // to avoid the constant reflow
+ for ( index = 0; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+ if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
+ elem.style.display = show ? values[ index ] || "" : "none";
+ }
+ }
+
+ return elements;
+}
+
+jQuery.fn.extend({
+ css: function( name, value ) {
+ return jQuery.access( this, function( elem, name, value ) {
+ return value !== undefined ?
+ jQuery.style( elem, name, value ) :
+ jQuery.css( elem, name );
+ }, name, value, arguments.length > 1 );
+ },
+ show: function() {
+ return showHide( this, true );
+ },
+ hide: function() {
+ return showHide( this );
+ },
+ toggle: function( state, fn2 ) {
+ var bool = typeof state === "boolean";
+
+ if ( jQuery.isFunction( state ) && jQuery.isFunction( fn2 ) ) {
+ return eventsToggle.apply( this, arguments );
+ }
+
+ return this.each(function() {
+ if ( bool ? state : isHidden( this ) ) {
+ jQuery( this ).show();
+ } else {
+ jQuery( this ).hide();
+ }
+ });
+ }
+});
+
+jQuery.extend({
+ // Add in style property hooks for overriding the default
+ // behavior of getting and setting a style property
+ cssHooks: {
+ opacity: {
+ get: function( elem, computed ) {
+ if ( computed ) {
+ // We should always get a number back from opacity
+ var ret = curCSS( elem, "opacity" );
+ return ret === "" ? "1" : ret;
+
+ }
+ }
+ }
+ },
+
+ // Exclude the following css properties to add px
+ cssNumber: {
+ "fillOpacity": true,
+ "fontWeight": true,
+ "lineHeight": true,
+ "opacity": true,
+ "orphans": true,
+ "widows": true,
+ "zIndex": true,
+ "zoom": true
+ },
+
+ // Add in properties whose names you wish to fix before
+ // setting or getting the value
+ cssProps: {
+ // normalize float css property
+ "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
+ },
+
+ // Get and set the style property on a DOM Node
+ style: function( elem, name, value, extra ) {
+ // Don't set styles on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+ return;
+ }
+
+ // Make sure that we're working with the right name
+ var ret, type, hooks,
+ origName = jQuery.camelCase( name ),
+ style = elem.style;
+
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
+
+ // gets hook for the prefixed version
+ // followed by the unprefixed version
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // Check if we're setting a value
+ if ( value !== undefined ) {
+ type = typeof value;
+
+ // convert relative number strings (+= or -=) to relative numbers. #7345
+ if ( type === "string" && (ret = rrelNum.exec( value )) ) {
+ value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
+ // Fixes bug #9237
+ type = "number";
+ }
+
+ // Make sure that NaN and null values aren't set. See: #7116
+ if ( value == null || type === "number" && isNaN( value ) ) {
+ return;
+ }
+
+ // If a number was passed in, add 'px' to the (except for certain CSS properties)
+ if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
+ value += "px";
+ }
+
+ // If a hook was provided, use that value, otherwise just set the specified value
+ if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
+ // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
+ // Fixes bug #5509
+ try {
+ style[ name ] = value;
+ } catch(e) {}
+ }
+
+ } else {
+ // If a hook was provided get the non-computed value from there
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+ return ret;
+ }
+
+ // Otherwise just get the value from the style object
+ return style[ name ];
+ }
+ },
+
+ css: function( elem, name, numeric, extra ) {
+ var val, num, hooks,
+ origName = jQuery.camelCase( name );
+
+ // Make sure that we're working with the right name
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
+
+ // gets hook for the prefixed version
+ // followed by the unprefixed version
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // If a hook was provided get the computed value from there
+ if ( hooks && "get" in hooks ) {
+ val = hooks.get( elem, true, extra );
+ }
+
+ // Otherwise, if a way to get the computed value exists, use that
+ if ( val === undefined ) {
+ val = curCSS( elem, name );
+ }
+
+ //convert "normal" to computed value
+ if ( val === "normal" && name in cssNormalTransform ) {
+ val = cssNormalTransform[ name ];
+ }
+
+ // Return, converting to number if forced or a qualifier was provided and val looks numeric
+ if ( numeric || extra !== undefined ) {
+ num = parseFloat( val );
+ return numeric || jQuery.isNumeric( num ) ? num || 0 : val;
+ }
+ return val;
+ },
+
+ // A method for quickly swapping in/out CSS properties to get correct calculations
+ swap: function( elem, options, callback ) {
+ var ret, name,
+ old = {};
+
+ // Remember the old values, and insert the new ones
+ for ( name in options ) {
+ old[ name ] = elem.style[ name ];
+ elem.style[ name ] = options[ name ];
+ }
+
+ ret = callback.call( elem );
+
+ // Revert the old values
+ for ( name in options ) {
+ elem.style[ name ] = old[ name ];
+ }
+
+ return ret;
+ }
+});
+
+// NOTE: To any future maintainer, we've window.getComputedStyle
+// because jsdom on node.js will break without it.
+if ( window.getComputedStyle ) {
+ curCSS = function( elem, name ) {
+ var ret, width, minWidth, maxWidth,
+ computed = window.getComputedStyle( elem, null ),
+ style = elem.style;
+
+ if ( computed ) {
+
+ // getPropertyValue is only needed for .css('filter') in IE9, see #12537
+ ret = computed.getPropertyValue( name ) || computed[ name ];
+
+ if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
+ ret = jQuery.style( elem, name );
+ }
+
+ // A tribute to the "awesome hack by Dean Edwards"
+ // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
+ // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
+ // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
+ if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
+ width = style.width;
+ minWidth = style.minWidth;
+ maxWidth = style.maxWidth;
+
+ style.minWidth = style.maxWidth = style.width = ret;
+ ret = computed.width;
+
+ style.width = width;
+ style.minWidth = minWidth;
+ style.maxWidth = maxWidth;
+ }
+ }
+
+ return ret;
+ };
+} else if ( document.documentElement.currentStyle ) {
+ curCSS = function( elem, name ) {
+ var left, rsLeft,
+ ret = elem.currentStyle && elem.currentStyle[ name ],
+ style = elem.style;
+
+ // Avoid setting ret to empty string here
+ // so we don't default to auto
+ if ( ret == null && style && style[ name ] ) {
+ ret = style[ name ];
+ }
+
+ // From the awesome hack by Dean Edwards
+ // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+
+ // If we're not dealing with a regular pixel number
+ // but a number that has a weird ending, we need to convert it to pixels
+ // but not position css attributes, as those are proportional to the parent element instead
+ // and we can't measure the parent instead because it might trigger a "stacking dolls" problem
+ if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
+
+ // Remember the original values
+ left = style.left;
+ rsLeft = elem.runtimeStyle && elem.runtimeStyle.left;
+
+ // Put in the new values to get a computed value out
+ if ( rsLeft ) {
+ elem.runtimeStyle.left = elem.currentStyle.left;
+ }
+ style.left = name === "fontSize" ? "1em" : ret;
+ ret = style.pixelLeft + "px";
+
+ // Revert the changed values
+ style.left = left;
+ if ( rsLeft ) {
+ elem.runtimeStyle.left = rsLeft;
+ }
+ }
+
+ return ret === "" ? "auto" : ret;
+ };
+}
+
+function setPositiveNumber( elem, value, subtract ) {
+ var matches = rnumsplit.exec( value );
+ return matches ?
+ Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
+ value;
+}
+
+function augmentWidthOrHeight( elem, name, extra, isBorderBox ) {
+ var i = extra === ( isBorderBox ? "border" : "content" ) ?
+ // If we already have the right measurement, avoid augmentation
+ 4 :
+ // Otherwise initialize for horizontal or vertical properties
+ name === "width" ? 1 : 0,
+
+ val = 0;
+
+ for ( ; i < 4; i += 2 ) {
+ // both box models exclude margin, so add it if we want it
+ if ( extra === "margin" ) {
+ // we use jQuery.css instead of curCSS here
+ // because of the reliableMarginRight CSS hook!
+ val += jQuery.css( elem, extra + cssExpand[ i ], true );
+ }
+
+ // From this point on we use curCSS for maximum performance (relevant in animations)
+ if ( isBorderBox ) {
+ // border-box includes padding, so remove it if we want content
+ if ( extra === "content" ) {
+ val -= parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0;
+ }
+
+ // at this point, extra isn't border nor margin, so remove border
+ if ( extra !== "margin" ) {
+ val -= parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;
+ }
+ } else {
+ // at this point, extra isn't content, so add padding
+ val += parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0;
+
+ // at this point, extra isn't content nor padding, so add border
+ if ( extra !== "padding" ) {
+ val += parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;
+ }
+ }
+ }
+
+ return val;
+}
+
+function getWidthOrHeight( elem, name, extra ) {
+
+ // Start with offset property, which is equivalent to the border-box value
+ var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+ valueIsBorderBox = true,
+ isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box";
+
+ // some non-html elements return undefined for offsetWidth, so check for null/undefined
+ // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
+ // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
+ if ( val <= 0 || val == null ) {
+ // Fall back to computed then uncomputed css if necessary
+ val = curCSS( elem, name );
+ if ( val < 0 || val == null ) {
+ val = elem.style[ name ];
+ }
+
+ // Computed unit is not pixels. Stop here and return.
+ if ( rnumnonpx.test(val) ) {
+ return val;
+ }
+
+ // we need the check for style in case a browser which returns unreliable values
+ // for getComputedStyle silently falls back to the reliable elem.style
+ valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );
+
+ // Normalize "", auto, and prepare for extra
+ val = parseFloat( val ) || 0;
+ }
+
+ // use the active box-sizing model to add/subtract irrelevant styles
+ return ( val +
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra || ( isBorderBox ? "border" : "content" ),
+ valueIsBorderBox
+ )
+ ) + "px";
+}
+
+
+// Try to determine the default display value of an element
+function css_defaultDisplay( nodeName ) {
+ if ( elemdisplay[ nodeName ] ) {
+ return elemdisplay[ nodeName ];
+ }
+
+ var elem = jQuery( "<" + nodeName + ">" ).appendTo( document.body ),
+ display = elem.css("display");
+ elem.remove();
+
+ // If the simple way fails,
+ // get element's real default display by attaching it to a temp iframe
+ if ( display === "none" || display === "" ) {
+ // Use the already-created iframe if possible
+ iframe = document.body.appendChild(
+ iframe || jQuery.extend( document.createElement("iframe"), {
+ frameBorder: 0,
+ width: 0,
+ height: 0
+ })
+ );
+
+ // Create a cacheable copy of the iframe document on first call.
+ // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
+ // document to it; WebKit & Firefox won't allow reusing the iframe document.
+ if ( !iframeDoc || !iframe.createElement ) {
+ iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
+ iframeDoc.write("");
+ iframeDoc.close();
+ }
+
+ elem = iframeDoc.body.appendChild( iframeDoc.createElement(nodeName) );
+
+ display = curCSS( elem, "display" );
+ document.body.removeChild( iframe );
+ }
+
+ // Store the correct default display
+ elemdisplay[ nodeName ] = display;
+
+ return display;
+}
+
+jQuery.each([ "height", "width" ], function( i, name ) {
+ jQuery.cssHooks[ name ] = {
+ get: function( elem, computed, extra ) {
+ if ( computed ) {
+ // certain elements can have dimension info if we invisibly show them
+ // however, it must have a current display style that would benefit from this
+ if ( elem.offsetWidth === 0 && rdisplayswap.test( curCSS( elem, "display" ) ) ) {
+ return jQuery.swap( elem, cssShow, function() {
+ return getWidthOrHeight( elem, name, extra );
+ });
+ } else {
+ return getWidthOrHeight( elem, name, extra );
+ }
+ }
+ },
+
+ set: function( elem, value, extra ) {
+ return setPositiveNumber( elem, value, extra ?
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra,
+ jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box"
+ ) : 0
+ );
+ }
+ };
+});
+
+if ( !jQuery.support.opacity ) {
+ jQuery.cssHooks.opacity = {
+ get: function( elem, computed ) {
+ // IE uses filters for opacity
+ return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
+ ( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
+ computed ? "1" : "";
+ },
+
+ set: function( elem, value ) {
+ var style = elem.style,
+ currentStyle = elem.currentStyle,
+ opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
+ filter = currentStyle && currentStyle.filter || style.filter || "";
+
+ // IE has trouble with opacity if it does not have layout
+ // Force it by setting the zoom level
+ style.zoom = 1;
+
+ // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
+ if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
+ style.removeAttribute ) {
+
+ // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
+ // if "filter:" is present at all, clearType is disabled, we want to avoid this
+ // style.removeAttribute is IE Only, but so apparently is this code path...
+ style.removeAttribute( "filter" );
+
+ // if there there is no filter style applied in a css rule, we are done
+ if ( currentStyle && !currentStyle.filter ) {
+ return;
+ }
+ }
+
+ // otherwise, set new filter values
+ style.filter = ralpha.test( filter ) ?
+ filter.replace( ralpha, opacity ) :
+ filter + " " + opacity;
+ }
+ };
+}
+
+// These hooks cannot be added until DOM ready because the support test
+// for it is not run until after DOM ready
+jQuery(function() {
+ if ( !jQuery.support.reliableMarginRight ) {
+ jQuery.cssHooks.marginRight = {
+ get: function( elem, computed ) {
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ // Work around by temporarily setting element display to inline-block
+ return jQuery.swap( elem, { "display": "inline-block" }, function() {
+ if ( computed ) {
+ return curCSS( elem, "marginRight" );
+ }
+ });
+ }
+ };
+ }
+
+ // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
+ // getComputedStyle returns percent when specified for top/left/bottom/right
+ // rather than make the css module depend on the offset module, we just check for it here
+ if ( !jQuery.support.pixelPosition && jQuery.fn.position ) {
+ jQuery.each( [ "top", "left" ], function( i, prop ) {
+ jQuery.cssHooks[ prop ] = {
+ get: function( elem, computed ) {
+ if ( computed ) {
+ var ret = curCSS( elem, prop );
+ // if curCSS returns percentage, fallback to offset
+ return rnumnonpx.test( ret ) ? jQuery( elem ).position()[ prop ] + "px" : ret;
+ }
+ }
+ };
+ });
+ }
+
+});
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+ jQuery.expr.filters.hidden = function( elem ) {
+ return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || curCSS( elem, "display" )) === "none");
+ };
+
+ jQuery.expr.filters.visible = function( elem ) {
+ return !jQuery.expr.filters.hidden( elem );
+ };
+}
+
+// These hooks are used by animate to expand properties
+jQuery.each({
+ margin: "",
+ padding: "",
+ border: "Width"
+}, function( prefix, suffix ) {
+ jQuery.cssHooks[ prefix + suffix ] = {
+ expand: function( value ) {
+ var i,
+
+ // assumes a single number if not a string
+ parts = typeof value === "string" ? value.split(" ") : [ value ],
+ expanded = {};
+
+ for ( i = 0; i < 4; i++ ) {
+ expanded[ prefix + cssExpand[ i ] + suffix ] =
+ parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
+ }
+
+ return expanded;
+ }
+ };
+
+ if ( !rmargin.test( prefix ) ) {
+ jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
+ }
+});
+var r20 = /%20/g,
+ rbracket = /\[\]$/,
+ rCRLF = /\r?\n/g,
+ rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
+ rselectTextarea = /^(?:select|textarea)/i;
+
+jQuery.fn.extend({
+ serialize: function() {
+ return jQuery.param( this.serializeArray() );
+ },
+ serializeArray: function() {
+ return this.map(function(){
+ return this.elements ? jQuery.makeArray( this.elements ) : this;
+ })
+ .filter(function(){
+ return this.name && !this.disabled &&
+ ( this.checked || rselectTextarea.test( this.nodeName ) ||
+ rinput.test( this.type ) );
+ })
+ .map(function( i, elem ){
+ var val = jQuery( this ).val();
+
+ return val == null ?
+ null :
+ jQuery.isArray( val ) ?
+ jQuery.map( val, function( val, i ){
+ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }) :
+ { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }).get();
+ }
+});
+
+//Serialize an array of form elements or a set of
+//key/values into a query string
+jQuery.param = function( a, traditional ) {
+ var prefix,
+ s = [],
+ add = function( key, value ) {
+ // If value is a function, invoke it and return its value
+ value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
+ s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
+ };
+
+ // Set traditional to true for jQuery <= 1.3.2 behavior.
+ if ( traditional === undefined ) {
+ traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
+ }
+
+ // If an array was passed in, assume that it is an array of form elements.
+ if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+ // Serialize the form elements
+ jQuery.each( a, function() {
+ add( this.name, this.value );
+ });
+
+ } else {
+ // If traditional, encode the "old" way (the way 1.3.2 or older
+ // did it), otherwise encode params recursively.
+ for ( prefix in a ) {
+ buildParams( prefix, a[ prefix ], traditional, add );
+ }
+ }
+
+ // Return the resulting serialization
+ return s.join( "&" ).replace( r20, "+" );
+};
+
+function buildParams( prefix, obj, traditional, add ) {
+ var name;
+
+ if ( jQuery.isArray( obj ) ) {
+ // Serialize array item.
+ jQuery.each( obj, function( i, v ) {
+ if ( traditional || rbracket.test( prefix ) ) {
+ // Treat each array item as a scalar.
+ add( prefix, v );
+
+ } else {
+ // If array item is non-scalar (array or object), encode its
+ // numeric index to resolve deserialization ambiguity issues.
+ // Note that rack (as of 1.0.0) can't currently deserialize
+ // nested arrays properly, and attempting to do so may cause
+ // a server error. Possible fixes are to modify rack's
+ // deserialization algorithm or to provide an option or flag
+ // to force array serialization to be shallow.
+ buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
+ }
+ });
+
+ } else if ( !traditional && jQuery.type( obj ) === "object" ) {
+ // Serialize object item.
+ for ( name in obj ) {
+ buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+ }
+
+ } else {
+ // Serialize scalar item.
+ add( prefix, obj );
+ }
+}
+var
+ // Document location
+ ajaxLocParts,
+ ajaxLocation,
+
+ rhash = /#.*$/,
+ rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
+ // #7653, #8125, #8152: local protocol detection
+ rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
+ rnoContent = /^(?:GET|HEAD)$/,
+ rprotocol = /^\/\//,
+ rquery = /\?/,
+ rscript = /
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Wicked Charts
+
+
version @projectVersion@ :: Wicket @wicketVersion@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
To add a chart to your Wicket page, include the following HTML
+ and Java fragments into your code:
+
+
Markup:
+
+
+<!-- HTML code -->
+<div>
+ <canvas wicket:id="chart"></canvas>
+</div>
+
+
+
+
Wicket Page:
+
+
+// Java code
+ChartConfiguration chart = new ChartConfiguration();
+chart.setType(ChartType.LINE);
+chart.setOptions(new Options().setTitle(new Title().setText("My Chart")));
+chart.setData(new Data().setDatasets(Arrays.asList(new Dataset().setData(IntegerValue.of(1,2,3,4)))));
+//to see more options, select a chart below and click the button "Show Java code"
+
+add(new Chart("chart", chart));
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.java
new file mode 100644
index 00000000..9391f4b8
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.java
@@ -0,0 +1,396 @@
+package de.adesso.wickedcharts.showcase;
+/*
+ * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
+ *
+ * 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.
+ */
+
+
+import de.adesso.wickedcharts.showcase.configurations.*;
+import de.adesso.wickedcharts.showcase.configurations.gridlines.*;
+import de.adesso.wickedcharts.showcase.configurations.interactions.*;
+import de.adesso.wickedcharts.showcase.configurations.legendposition.LegendPositionBottomConfiguration;
+import de.adesso.wickedcharts.showcase.configurations.legendposition.LegendPositionLeftConfiguration;
+import de.adesso.wickedcharts.showcase.configurations.legendposition.LegendPositionRightConfiguration;
+import de.adesso.wickedcharts.showcase.configurations.legendposition.LegendPositionTopConfiguration;
+import de.adesso.wickedcharts.showcase.links.ChartjsShowcaseLink;
+import de.adesso.wickedcharts.showcase.links.HighchartsShowcaseLink;
+import de.adesso.wickedcharts.showcase.links.UpdateChartJsLink;
+import de.adesso.wickedcharts.wicket6.chartjs.Chart;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * This page takes care of the Chart.js showcase logic.
+ * @author SvenWirz
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+public class HomepageChartJs extends WebPage implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Constructs the page according to the current parameters
+ * This constructor is called each time a new chart is
+ * selected.
+ * @param parameters the page parameters from the page URI
+ */
+ public HomepageChartJs(final PageParameters parameters) {
+ addCharts(parameters);
+ addNavigationLinks();
+ addChartLinks();
+ }
+
+ /**
+ * Gets the charts and the code containers from the page parameters,
+ * constructs Wicket componenets from them and
+ * adds them to a Wicket ListView.
+ * @param parameters the page parameters from the page URI
+ */
+ private void addCharts(PageParameters parameters){
+
+ List charts = getChartFromParams(parameters);
+
+ //If we have more than one chart - use SmallComponents
+ if(charts.size() > 1){
+ List components = new ArrayList<>();
+ for(Chart i : charts){
+ components.add(new SmallChartComponent(i));
+ }
+ add( new ListView( "components", components ){
+ protected void populateItem(ListItem item)
+ {
+ item.add( (SmallChartComponent)item.getModelObject() );
+ }
+ });
+ }else { //else use the regular full-width chart component
+ List components = new ArrayList<>();
+ for (Chart i : charts) {
+ components.add(new ChartComponent(i));
+ }
+ add( new ListView( "components", components ){
+ protected void populateItem(ListItem item)
+ {
+ item.add( (ChartComponent)item.getModelObject() );
+ }
+ });
+ }
+
+ //Add Code Components
+ List code_components = new ArrayList<>();
+ for(Chart i : charts){
+ code_components.add(new CodeComponent(i));
+ }
+ add( new ListView( "code_components", code_components ){
+ protected void populateItem(ListItem item){
+ item.add( (CodeComponent)item.getModelObject() );
+ }
+ });
+ }
+
+ private void addNavigationLinks() {
+ this.add(new HighchartsShowcaseLink());
+ this.add(new ChartjsShowcaseLink());
+ }
+
+ /**
+ * Adds links to the charts in the navigation sidebar
+ */
+ private void addChartLinks() {
+ this.add(new UpdateChartJsLink("LineChartBasic", "lineBasic"));
+ this.add(new UpdateChartJsLink("BarChartVertical" , "barVertical"));
+ this.add(new UpdateChartJsLink("LineChartMultiAxis", "lineMultiAxis"));
+ this.add(new UpdateChartJsLink("LineChartStepped", "lineStepped"));
+ this.add(new UpdateChartJsLink("LineChartInterpolated", "lineInterpolated"));
+ this.add(new UpdateChartJsLink("LineStyles", "lineStyles"));
+ this.add(new UpdateChartJsLink("PointStyles", "pointStyles"));
+ this.add(new UpdateChartJsLink("PointSizes", "pointSizes"));
+ this.add(new UpdateChartJsLink("BarChartHorizontal", "barHorizontal"));
+ this.add(new UpdateChartJsLink("BarChartStacked", "barStacked"));
+ this.add(new UpdateChartJsLink("BarChartStackedGroup", "barStackedGroup"));
+ this.add(new UpdateChartJsLink("BarChartMultiAxis", "barMultiAxis"));
+ this.add(new UpdateChartJsLink("PieChart", "pie"));
+ this.add(new UpdateChartJsLink("AreaLineBoundariesChart", "areaLineBoundaries"));
+ this.add(new UpdateChartJsLink("LineChartStacked", "lineStacked"));
+ this.add(new UpdateChartJsLink("LineChartDataset", "lineDataset"));
+ this.add(new UpdateChartJsLink("RadarChart", "radar"));
+ this.add(new UpdateChartJsLink("DoughnutChart", "doughnut"));
+ this.add(new UpdateChartJsLink("PolarAreaChart", "polarArea"));
+ this.add(new UpdateChartJsLink("ScatterChart", "scatter"));
+ this.add(new UpdateChartJsLink("ScatterChartMultiAxis", "scatterMultiAxis"));
+ this.add(new UpdateChartJsLink("ComboBarLineChart", "comboBarLine"));
+ this.add(new UpdateChartJsLink("LegendPosition", "legendPosition"));
+ this.add(new UpdateChartJsLink("StepSize", "stepSize"));
+ this.add(new UpdateChartJsLink("MinMax", "minMax"));
+ this.add(new UpdateChartJsLink("GridLines", "gridLines"));
+ this.add(new UpdateChartJsLink("MultilineLabels", "multiLineLabels"));
+ this.add(new UpdateChartJsLink("LogarithmicLineChart", "lineLogarithmic"));
+ this.add(new UpdateChartJsLink("LogarithmicScatterChart", "scatterLogarithmic"));
+ this.add(new UpdateChartJsLink("BubbleChart", "bubble"));
+ this.add(new UpdateChartJsLink("FilteringLabels", "filteringLabels"));
+ this.add(new UpdateChartJsLink("TimeLine", "timeLine"));
+ this.add(new UpdateChartJsLink("NonNumeric", "nonNumeric"));
+ this.add(new UpdateChartJsLink("TimePoint", "timePoint"));
+ this.add(new UpdateChartJsLink("TimeSeries", "timeSeries"));
+ this.add(new UpdateChartJsLink("TimeCombo", "timeCombo"));
+ this.add(new UpdateChartJsLink("OtherRadar", "radar2"));
+ this.add(new UpdateChartJsLink("Tooltip", "tooltip"));
+ this.add(new UpdateChartJsLink("TooltipHtml", "tooltipHtml"));
+ this.add(new UpdateChartJsLink("LegendPointStyle", "legendPointStyle"));
+ this.add(new UpdateChartJsLink("LineChartProgressBar", "lineProgressBar"));
+ this.add(new UpdateChartJsLink("DataLabellingChart", "dataLabelling"));
+ this.add(new UpdateChartJsLink("TooltipInteractions", "tooltipInteractions"));
+ }
+
+ /**
+ * Returns a List of Chart objects from the current page parameters.
+ * @param params the page parameters from the page URI
+ * @return a List of Chart objects
+ */
+ private List getChartFromParams(final PageParameters params) {
+ String chartString;
+ List config = new ArrayList<>();
+
+
+ //If the showcase is started without any parameters
+ //set the parameters to lineBasic and give us a line Chart
+ if(params.getAllNamed().size() == 0){
+ PageParameters temp = new PageParameters();
+ temp.add("chart", "lineBasic");
+ setResponsePage(HomepageChartJs.class, temp);
+ config.add(new Chart("chart", new LineChartBasicConfiguration()));
+ return config;
+ }
+
+ chartString = params.getAllNamed().get(0).getValue();
+ if(chartString == null) {
+ config.add(new Chart("chart", new LineChartBasicConfiguration()));
+ return config;
+ }
+
+ switch(chartString) {
+
+ case "barVertical":
+ config.add(new Chart("chart", new BarChartVerticalConfiguration()));
+ break;
+
+ case "barHorizontal":
+ config.add(new Chart("chart", new BarChartHorizontalConfiguration()));
+ break;
+
+ case "barMultiAxis":
+ config.add(new Chart("chart", new BarChartMultiAxisConfiguration()));
+ break;
+
+ case "barStacked":
+ config.add(new Chart("chart", new BarChartStackedConfiguration()));
+ break;
+
+ case "barStackedGroup":
+ config.add(new Chart("chart", new BarChartStackedGroupConfiguration()));
+ break;
+
+ case "lineBasic":
+ config.add(new Chart("chart", new LineChartBasicConfiguration()));
+ break;
+
+ case "lineMultiAxis":
+ config.add(new Chart("chart", new LineChartMultiAxisConfiguration()));
+ break;
+
+ case "lineStepped":
+ config.add(new Chart("chart", new LineChartSteppedBeforeConfiguration()));
+ config.add(new Chart("chart", new LineChartSteppedAfterConfiguration()));
+ break;
+
+ case "lineInterpolated":
+ config.add(new Chart("chart", new LineChartInterpolatedConfiguration()));
+ break;
+
+ case "lineStyles":
+ config.add(new Chart("chart", new LineStylesConfiguration()));
+ break;
+
+ case "pointStyles":
+ config.add(new Chart("chart", new PointStylesConfiguration()));
+ break;
+
+ case "pointSizes":
+ config.add(new Chart("chart", new LineChartWithDifferentPointSizesConfiguration()));
+ break;
+
+ case "areaLineBoundaries":
+ config.add(new Chart("chart", new AreaLineBoundariesChartStartConfiguration()));
+ config.add(new Chart("chart", new AreaLineBoundariesChartEndConfiguration()));
+ config.add(new Chart("chart", new AreaLineBoundariesChartOriginConfiguration()));
+ config.add(new Chart("chart", new AreaLineBoundariesChartFalseConfiguration()));
+ break;
+
+ case "lineDataset":
+ config.add(new Chart("chart", new LineChartAreaDatasetConfiguration()));
+ break;
+
+ case "lineStacked":
+ config.add(new Chart("chart", new LineChartStackedConfiguration()));
+ break;
+
+ case "radar":
+ config.add(new Chart("chart", new RadarChartConfiguration()));
+ break;
+
+ case "scatter":
+ config.add(new Chart("chart", new ScatterChartConfiguration()));
+ break;
+
+ case "scatterMultiAxis":
+ config.add(new Chart("chart", new ScatterChartMultiAxisConfiguration()));
+ break;
+
+ case "doughnut":
+ config.add(new Chart("chart", new DoughnutChartConfiguration()));
+ break;
+
+ case "pie":
+ config.add(new Chart("chart", new PieChartConfiguration()));
+ break;
+
+ case "polarArea":
+ config.add(new Chart("chart", new PolarAreaChartConfiguration()));
+ break;
+
+ case "radar2":
+ config.add(new Chart("chart", new OtherRadarChartConfiguration()));
+ break;
+
+ case "comboBarLine":
+ config.add(new Chart("chart", new ComboBarLineChartConfiguration()));
+ break;
+
+ case "stepSize":
+ config.add(new Chart("chart", new LinearStepSizeConfiguration()));
+ break;
+
+ case "minMax":
+ config.add(new Chart("chart", new MinMaxConfiguration()));
+ config.add(new Chart("chart", new MinMaxSuggestedConfiguration()));
+ break;
+
+ case "lineLogarithmic":
+ config.add(new Chart("chart", new LogarithmicLineChartConfiguration()));
+ break;
+
+ case "scatterLogarithmic":
+ config.add(new Chart("chart", new LogarithmicScatterChartConfiguration()));
+ break;
+
+ case "timeLine":
+ config.add(new Chart("chart", new TimeLineConfiguration()));
+ break;
+
+ case "timePoint":
+ config.add(new Chart("chart", new TimePointConfiguration()));
+ break;
+
+ case "timeSeries":
+ config.add(new Chart("chart", new TimeSeriesConfiguration()));
+ break;
+
+ case "timeCombo":
+ config.add(new Chart("chart", new TimeComboConfiguration()));
+ break;
+
+ case "gridLines":
+ config.add(new Chart("chart", new GridLinesBasicConfiguration()));
+ config.add(new Chart("chart", new GridLinesDisplayFalseConfiguration()));
+ config.add(new Chart("chart", new GridLinesDisplayFalseNoBorderConfiguration()));
+ config.add(new Chart("chart", new GridLinesChartAreaConfiguration()));
+ config.add(new Chart("chart", new GridLinesTicksConfiguration()));
+ config.add(new Chart("chart", new GridLineStylesConfiguration()));
+ break;
+
+ case "multiLineLabels":
+ config.add(new Chart("chart", new MultilineLabelsConfiguration()));
+ break;
+
+ case "filteringLabels":
+ config.add(new Chart("chart", new FilteringLabelsConfiguration()));
+ break;
+
+ case "nonNumeric":
+ config.add(new Chart("chart", new NonNumericConfiguration()));
+ break;
+
+ case "legendPosition":
+ config.add(new Chart("chart", new LegendPositionTopConfiguration()));
+ config.add(new Chart("chart", new LegendPositionRightConfiguration()));
+ config.add(new Chart("chart", new LegendPositionBottomConfiguration()));
+ config.add(new Chart("chart", new LegendPositionLeftConfiguration()));
+ break;
+
+ case "legendPointStyle":
+ config.add(new Chart("chart", new LegendPointStyleConfiguration()));
+ break;
+
+ case "tooltip":
+ config.add(new Chart("chart", new TooltipBorderConfiguration()));
+ config.add(new Chart("chart", new TooltipCallbacksConfiguration()));
+ config.add(new Chart("chart", new TooltipAverageConfiguration()));
+ config.add(new Chart("chart", new TooltipNearestConfiguration()));
+ break;
+
+ case "tooltipHtml":
+ config.add(new Chart("chart", new TooltipHtmlLineConfiguration()));
+ config.add(new Chart("chart", new TooltipHtmlPieConfiguration()));
+ config.add(new Chart("chart", new TooltipHtmlPointsConfiguration()));
+ break;
+
+ case "bubble":
+ config.add(new Chart("chart", new BubbleChartConfiguration()));
+ break;
+
+ case "lineProgressBar":
+ config.add(new Chart("chart", new LineChartProgressBarConfiguration()));
+ break;
+
+ case "dataLabelling":
+ config.add(new Chart("chart", new DataLabellingChartConfiguration()));
+ break;
+
+ case "tooltipInteractions":
+ config.add(new Chart("chart", new DatasetIntersectFalseConfiguration()));
+ config.add(new Chart("chart", new DatasetIntersectTrueConfiguration()));
+ config.add(new Chart("chart", new IndexIntersectFalseConfiguration()));
+ config.add(new Chart("chart", new IndexIntersectTrueConfiguration()));
+ config.add(new Chart("chart", new NearestIntersectFalseConfiguration()));
+ config.add(new Chart("chart", new NearestIntersectTrueConfiguration()));
+ config.add(new Chart("chart", new PointIntersectFalseConfiguration()));
+ config.add(new Chart("chart", new PointIntersectTrueConfiguration()));
+ config.add(new Chart("chart", new xIntersectFalseConfiguration()));
+ config.add(new Chart("chart", new xIntersectTrueConfiguration()));
+ config.add(new Chart("chart", new yIntersectFalseConfiguration()));
+ config.add(new Chart("chart", new yIntersectTrueConfiguration()));
+ break;
+
+ default:
+ config.add(new Chart("chart", new LineChartBasicConfiguration()));
+ break;
+ }
+ return config;
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.html b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.html
new file mode 100644
index 00000000..ce881247
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.html
@@ -0,0 +1,267 @@
+
+
+
+
+ Wicked Charts :: Showcase :: Wicket 7.x
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Wicked Charts
+
+
version @projectVersion@ :: Wicket @wicketVersion@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
To add a chart to your Wicket page, include the following HTML
+ and Java fragments into your code:
+
+
Markup:
+
+
+<!-- HTML code -->
+<div wicket:id="chart"/>
+
+
+
+
Wicket Page:
+
+
+// Java code
+Options options = new Options();
+options.setTitle(new Title("My Chart"));
+... // to see more options, select a chart below and click the button "Show Java code"
+add(new Chart("chart", options));
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.java
new file mode 100644
index 00000000..2985ef89
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.java
@@ -0,0 +1,458 @@
+/*
+ * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
+ *
+ * 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 de.adesso.wickedcharts.showcase;
+
+import de.adesso.wickedcharts.highcharts.theme.*;
+import de.adesso.wickedcharts.showcase.links.ChartjsShowcaseLink;
+import de.adesso.wickedcharts.showcase.links.HighchartsShowcaseLink;
+import de.adesso.wickedcharts.showcase.links.UpdateHighchartLink;
+import de.adesso.wickedcharts.showcase.links.UpdateThemeLink;
+import de.adesso.wickedcharts.showcase.options.*;
+import de.adesso.wickedcharts.wicket6.highcharts.Chart;
+import org.apache.wicket.markup.head.IHeaderResponse;
+import org.apache.wicket.markup.head.OnDomReadyHeaderItem;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.request.mapper.parameter.INamedParameters;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * This page takes care of the Highcharts showcase logic.
+ * @author SvenWirz
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+public class HomepageHighcharts extends WebPage {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Constructs the page according to the current parameters
+ * This constructor is called each time a new chart or theme is
+ * selected.
+ * @param parameters the page parameters from the page URI
+ */
+ public HomepageHighcharts(final PageParameters parameters) {
+ Chart chart = getChartFromParams(parameters);
+ add(chart);
+ addNavigationLinks();
+ addCodeContainer(chart);
+ addChartLinks(getThemeString(parameters));
+ addThemeLinks(parameters);
+ }
+
+ /**
+ * Adds links to the different themes
+ * @param parameters the page parameters from the page URI
+ */
+ private void addThemeLinks(PageParameters parameters){
+ if (parameters.getAllNamed().size() < 2) {
+ add(new UpdateThemeLink("defaultTheme", "chart"));
+ add(new UpdateThemeLink("grid", "chart"));
+ add(new UpdateThemeLink("skies", "chart"));
+ add(new UpdateThemeLink("gray", "chart"));
+ add(new UpdateThemeLink("darkblue", "chart"));
+ } else {
+ String chartString = parameters.getAllNamed().get(1).getValue();
+ add(new UpdateThemeLink("defaultTheme", chartString));
+ add(new UpdateThemeLink("grid", chartString));
+ add(new UpdateThemeLink("skies", chartString));
+ add(new UpdateThemeLink("gray", chartString));
+ add(new UpdateThemeLink("darkblue", chartString));
+ }
+ }
+
+ /**
+ * Returns the name of the current theme from the page parameters
+ * @param parameters the page parameters from the page URI
+ * @return The name of the current theme
+ */
+ private String getThemeString(PageParameters parameters){
+ String themeString = "default";
+ if (parameters.getAllNamed().size() < 2) {
+ return themeString;
+ } else {
+ themeString= parameters.getAllNamed().get(0).getValue();
+ }
+ return themeString;
+ }
+
+ private void addNavigationLinks() {
+ add(new HighchartsShowcaseLink());
+ add(new ChartjsShowcaseLink());
+ }
+
+ /**
+ * Adds links to the charts in the navigation sidebar
+ */
+ private void addChartLinks(String theme) {
+ add(new UpdateHighchartLink("line", theme));
+ add(new UpdateHighchartLink("splineWithSymbols", theme));
+ add(new UpdateHighchartLink("irregularIntervals", theme));
+ add(new UpdateHighchartLink("logarithmicAxis", theme));
+ add(new UpdateHighchartLink("scatter", theme));
+ add(new UpdateHighchartLink("area", theme));
+ add(new UpdateHighchartLink("areaWithNegativeValues",theme));
+ add(new UpdateHighchartLink("stackedAndGroupedColumn", theme));
+ add(new UpdateHighchartLink("combo", theme));
+ add(new UpdateHighchartLink("donut", theme));
+ add(new UpdateHighchartLink("interactive", theme));
+ add(new UpdateHighchartLink("withDataLabels", theme));
+ add(new UpdateHighchartLink("zoomableTimeSeries", theme));
+ add(new UpdateHighchartLink("splineInverted", theme));
+ add(new UpdateHighchartLink("splineWithPlotBands", theme));
+ add(new UpdateHighchartLink("polar", theme));
+ add(new UpdateHighchartLink("percentageArea", theme));
+ add(new UpdateHighchartLink("areaMissing", theme));
+ add(new UpdateHighchartLink("areaInverted", theme));
+ add(new UpdateHighchartLink("areaSpline", theme));
+ add(new UpdateHighchartLink("areaSplineRange", theme));
+ add(new UpdateHighchartLink("basicBar", theme));
+ add(new UpdateHighchartLink("columnWithDrilldown", theme));
+ add(new UpdateHighchartLink("columnRotated", theme));
+ add(new UpdateHighchartLink("stackedBar", theme));
+ add(new UpdateHighchartLink("barNegativeStack", theme));
+ add(new UpdateHighchartLink("basicColumn", theme));
+ add(new UpdateHighchartLink("columnWithNegativeValues", theme));
+ add(new UpdateHighchartLink("stackedColumn", theme));
+ add(new UpdateHighchartLink("stackedArea", theme));
+ add(new UpdateHighchartLink("stackedPercentage", theme));
+ add(new UpdateHighchartLink("basicPie", theme));
+ add(new UpdateHighchartLink("pieWithGradient", theme));
+ add(new UpdateHighchartLink("pieWithLegend", theme));
+ add(new UpdateHighchartLink("splineUpdating", theme));
+ add(new UpdateHighchartLink("bubble", theme));
+ add(new UpdateHighchartLink("3dbubble", theme));
+ add(new UpdateHighchartLink("boxplot", theme));
+ add(new UpdateHighchartLink("angularGauge", theme));
+ add(new UpdateHighchartLink("spiderweb", theme));
+ add(new UpdateHighchartLink("windrose", theme));
+ add(new UpdateHighchartLink("columnrange", theme));
+ add(new UpdateHighchartLink("arearange", theme));
+ add(new UpdateHighchartLink("clicktoadd", theme));
+ add(new UpdateHighchartLink("dualAxes", theme));
+ add(new UpdateHighchartLink("scatterWithRegression", theme));
+ add(new UpdateHighchartLink("multipleAxes", theme));
+ add(new UpdateHighchartLink("errorBar", theme));
+ add(new UpdateHighchartLink("funnel", theme));
+ add(new UpdateHighchartLink("pyramid", theme));
+ add(new UpdateHighchartLink("heatmap", theme));
+ }
+
+
+ /**
+ * Adds a code container corresponding to the current chart
+ * @param chart The currently selected chart
+ */
+ private void addCodeContainer(Chart chart) {
+ Label codeContainer = new Label("code", new StringFromResourceModel(
+ chart.getOptions().getClass(), chart.getOptions().getClass().getSimpleName()
+ + ".java"));
+ codeContainer.setOutputMarkupId(true);
+ add(codeContainer);
+ }
+
+ /**
+ * Returns a Chart object from the current page parameters
+ * @param params the page parameters from the page URI
+ * @return a Chart
+ */
+ private Chart getChartFromParams(final PageParameters params) {
+ String chartString;
+ String themeString;
+ Chart config;
+
+ //If the showcase is started without any parameters
+ //set the parameters to lineBasic and give us a line Chart
+ if(params.getAllNamed().size() < 2){
+ PageParameters temp = new PageParameters();
+ temp.add("theme", "default");
+ temp.add("chart", "line");
+ setResponsePage(HomepageHighcharts.class, temp);
+ config = new Chart("chart", new BasicLineOptions(), null);
+ return config;
+ }
+
+ themeString = params.getAllNamed().get(0).getValue();
+ Theme theme = getThemeFromParams(themeString);
+ chartString = params.getAllNamed().get(1).getValue();
+
+ if(chartString == null) {
+ config = new Chart("chart", new BasicLineOptions(), theme);
+ return config;
+ }
+
+ switch(chartString) {
+ case "basicBar":
+ config = new Chart("chart", new BasicBarOptions(), theme);
+ break;
+
+ case "splineWithSymbols":
+ config = new Chart("chart", new SplineWithSymbolsOptions(), theme);
+ break;
+
+ case "irregularIntervals":
+ config = new Chart("chart", new TimeDataWithIrregularIntervalsOptions(), theme);
+ break;
+
+ case "logarithmicAxis":
+ config = new Chart("chart", new LogarithmicAxisOptions(), theme);
+ break;
+
+ case "scatter":
+ config = new Chart("chart", new ScatterPlotOptions(), theme);
+ break;
+
+ case "area":
+ config = new Chart("chart", new BasicAreaOptions(), theme);
+ break;
+
+ case "areaWithNegativeValues":
+ config = new Chart("chart", new AreaWithNegativeValuesOptions(), theme);
+ break;
+
+ case "stackedAndGroupedColumn":
+ config = new Chart("chart", new StackedAndGroupedColumnOptions(), theme);
+ break;
+
+ case "combo":
+ config = new Chart("chart", new ComboOptions(), theme);
+ break;
+
+ case "donut":
+ config = new Chart("chart", new DonutOptions(), theme);
+ break;
+
+ case "withDataLabels":
+ config = new Chart("chart", new LineWithDataLabelsOptions(), theme);
+ break;
+
+ case "zoomableTimeSeries":
+ config = new Chart("chart", new ZoomableTimeSeriesOptions(), theme);
+ break;
+
+ case "splineInverted":
+ config = new Chart("chart", new SplineWithInvertedAxisOptions(), theme);
+ break;
+
+ case "splineWithPlotBands":
+ config = new Chart("chart", new SplineWithPlotBandsOptions(), theme);
+ break;
+
+ case "polar":
+ config = new Chart("chart", new PolarOptions(), theme);
+ break;
+
+ case "stackedArea":
+ config = new Chart("chart", new StackedAreaOptions(), theme);
+ break;
+
+ case "percentageArea":
+ config = new Chart("chart", new PercentageAreaOptions(), theme);
+ break;
+
+ case "areaMissing":
+ config = new Chart("chart", new AreaMissingOptions(), theme);
+ break;
+
+ case "areaInverted":
+ config = new Chart("chart", new AreaInvertedAxisOptions(), theme);
+ break;
+
+ case "areaSpline":
+ config = new Chart("chart", new AreaSplineOptions(), theme);
+ break;
+
+ case "areaSplineRange":
+ config = new Chart("chart", new AreaSplineRangeOptions(), theme);
+ break;
+
+ case "columnWithDrilldown":
+ config = new Chart("chart", new ColumnWithDrilldownOptions(), theme);
+ break;
+
+ case "columnRotated":
+ config = new Chart("chart", new ColumnWithRotatedLabelsOptions(), theme);
+ break;
+
+ case "stackedBar":
+ config = new Chart("chart", new StackedBarOptions(), theme);
+ break;
+
+ case "barNegativeStack":
+ config = new Chart("chart", new StackedBarOptions(), theme);
+ break;
+
+ case "basicColumn":
+ config = new Chart("chart", new BasicColumnOptions(), theme);
+ break;
+
+ case "columnWithNegativeValues":
+ config = new Chart("chart", new ColumnWithNegativeValuesOptions(), theme);
+ break;
+
+ case "stackedColumn":
+ config = new Chart("chart", new StackedColumnOptions(), theme);
+ break;
+
+ case "stackedPercentage":
+ config = new Chart("chart", new StackedPercentageOptions(), theme);
+ break;
+
+ case "basicPie":
+ config = new Chart("chart", new BasicPieOptions(), theme);
+ break;
+
+ case "pieWithGradient":
+ config = new Chart("chart", new PieWithGradientOptions(), theme);
+ break;
+
+ case "pieWithLegend":
+ config = new Chart("chart", new PieWithLegendOptions(), theme);
+ break;
+
+ case "splineUpdating":
+ config = new Chart("chart", new WicketSplineUpdatingOptions(), theme);
+ break;
+
+ case "bubble":
+ config = new Chart("chart", new BubbleChartOptions(), theme);
+ break;
+
+ case "3dbubble":
+ config = new Chart("chart", new BubbleChart3DOptions(), theme);
+ break;
+
+ case "boxplot":
+ config = new Chart("chart", new BoxplotChartOptions(), theme);
+ break;
+
+ case "interactive":
+ config = new Chart("chart", new InteractionOptions(), theme);
+ break;
+
+ case "angularGauge":
+ config = new Chart("chart", new AngularGaugeOptions(), theme);
+ break;
+
+ case "spiderweb":
+ config = new Chart("chart", new SpiderwebOptions(), theme);
+ break;
+
+ case "windrose":
+ config = new Chart("chart", new WindroseOptions(), theme);
+ break;
+
+ case "columnrange":
+ config = new Chart("chart", new ColumnRangeOptions(), theme);
+ break;
+
+ case "arearange":
+ config = new Chart("chart", new AreaRangeOptions(), theme);
+ break;
+
+ case "clicktoadd":
+ config = new Chart("chart", new ClickToAddAPointOptions(), theme);
+ break;
+
+ case "dualAxes":
+ config = new Chart("chart", new DualAxesOptions(), theme);
+ break;
+
+ case "scatterWithRegression":
+ config = new Chart("chart", new ScatterWithRegressionLineOptions(), theme);
+ break;
+
+ case "multipleAxes":
+ config = new Chart("chart", new MultipleAxesOptions(), theme);
+ break;
+
+ case "errorBar":
+ config = new Chart("chart", new ErrorBarOptions(), theme);
+ break;
+
+ case "funnel":
+ config = new Chart("chart", new FunnelOptions(), theme);
+ break;
+
+ case "pyramid":
+ config = new Chart("chart", new PyramidOptions(), theme);
+ break;
+
+ case "heatmap":
+ config = new Chart("chart", new HeatmapOptions(), theme);
+ break;
+
+ default:
+ config = new Chart("chart", new BasicLineOptions(), theme);
+ break;
+ }
+ return config;
+ }
+
+ private Theme getThemeFromParams(String themeString) {
+ if ("grid".equals(themeString)) {
+ return new GridTheme();
+ } else if ("skies".equals(themeString)) {
+ return new SkiesTheme();
+ } else if ("gray".equals(themeString)) {
+ return new GrayTheme();
+ } else if ("darkblue".equals(themeString)) {
+ return new DarkBlueTheme();
+ } else {
+ // default theme
+ return null;
+ }
+ }
+
+ /**
+ * Used in the renderHead method to highlight the currently
+ * selected theme tab
+ * @return the index of the currently selected theme tab
+ */
+ private int getSelectedTab() {
+ String theme = "default";
+ List pairs = getPageParameters().getAllNamed();
+ theme = pairs.get(0).getValue();
+ if ("grid".equals(theme)) {
+ return 1;
+ } else if ("skies".equals(theme)) {
+ return 2;
+ } else if ("gray".equals(theme)) {
+ return 3;
+ } else if ("darkblue".equals(theme)) {
+ return 4;
+ } else if ("darkgreen".equals(theme)) {
+ return 5;
+ } else {
+ return 0;
+ }
+ }
+
+ /**
+ * Highlights the currently selected theme tab
+ * @param response .
+ */
+ @Override
+ public void renderHead(final IHeaderResponse response) {
+ // select bootstrap tab for current theme selected
+ int selectedTab = this.getSelectedTab();
+ response.render(OnDomReadyHeaderItem.forScript("$('#themes li:eq("
+ + selectedTab + ") a').tab('show');"));
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/NoIDMount.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/NoIDMount.java
new file mode 100644
index 00000000..b68cee08
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/NoIDMount.java
@@ -0,0 +1,29 @@
+package de.adesso.wickedcharts.showcase;
+
+import org.apache.wicket.core.request.mapper.MountedMapper;
+import org.apache.wicket.request.Url;
+import org.apache.wicket.request.component.IRequestablePage;
+import org.apache.wicket.request.mapper.info.PageComponentInfo;
+import org.apache.wicket.request.mapper.parameter.PageParametersEncoder;
+import org.apache.wicket.util.string.Strings;
+
+public class NoIDMount extends MountedMapper {
+
+ NoIDMount(String path, Class extends IRequestablePage> pageClass) {
+ super(path, pageClass, new PageParametersEncoder());
+ }
+
+ @Override protected void encodePageComponentInfo(Url url, PageComponentInfo info) {
+ if (info != null) {
+ String s = info.toString();
+ if (!Strings.isEmpty(s)) {
+ try{ //If the resulting parameter is not a number then we add it to the url
+ Integer.parseInt(s);
+ }catch (NumberFormatException e){
+ Url.QueryParameter parameter = new Url.QueryParameter(s, "");
+ url.getQueryParameters().add(parameter);
+ }
+ }
+ }
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseApplication.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseApplication.java
index 75e04889..1efe7748 100644
--- a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseApplication.java
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseApplication.java
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,26 +14,30 @@
*/
package de.adesso.wickedcharts.showcase;
+
+import de.adesso.wickedcharts.showcase.ie.SimplePage;
+import de.adesso.wickedcharts.showcase.modalwindow.ModalWindowPage;
+import de.adesso.wickedcharts.wicket6.JavaScriptResourceRegistry;
import org.apache.wicket.Session;
+import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.request.Request;
import org.apache.wicket.request.Response;
import org.apache.wicket.request.resource.JavaScriptResourceReference;
-
-import de.adesso.wickedcharts.wicket6.JavaScriptResourceRegistry;
-
-import de.adesso.wickedcharts.showcase.ie.SimplePage;
-import de.adesso.wickedcharts.showcase.modalwindow.ModalWindowPage;
import org.springframework.stereotype.Component;
+/**
+ * Application object for your web application. If you want to run this
+ * application without deploying, run `gradle bootRun` in wicked-charts-showcase-wicket7/
+ */
@Component
public class ShowcaseApplication extends WebApplication {
/**
* @see org.apache.wicket.Application#getHomePage()
*/
@Override
- public Class getHomePage() {
- return Homepage.class;
+ public Class extends WebPage> getHomePage() {
+ return HomepageChartJs.class;
}
/**
@@ -46,10 +50,10 @@ public void init() {
new JavaScriptResourceReference(ShowcaseApplication.class,
"jquery-1.8.3.min-IEfix.js"));
- mountPage("/start", Homepage.class);
- mountPage("/start/${theme}", Homepage.class);
- mountPage("/simple", SimplePage.class);
- mountPage("/modal", ModalWindowPage.class);
+ mount(new NoIDMount("/chartjs/${chart}", HomepageChartJs.class));
+ mount(new NoIDMount("/highcharts/${theme}/${chart}", HomepageHighcharts.class));
+ mount(new NoIDMount("/simple", SimplePage.class));
+ mount(new NoIDMount("/modal", ModalWindowPage.class));
getJavaScriptLibrarySettings().setJQueryReference(
new JavaScriptResourceReference(ShowcaseApplication.class,
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseSession.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseSession.java
index 97fb6763..f88719c2 100644
--- a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseSession.java
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseSession.java
@@ -14,11 +14,10 @@
*/
package de.adesso.wickedcharts.showcase;
+import de.adesso.wickedcharts.highcharts.options.Options;
import org.apache.wicket.protocol.http.WebSession;
import org.apache.wicket.request.Request;
-import de.adesso.wickedcharts.highcharts.options.Options;
-
public class ShowcaseSession extends WebSession {
private static final long serialVersionUID = 1L;
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.html b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.html
new file mode 100644
index 00000000..e8a1a330
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.html
@@ -0,0 +1,22 @@
+
+
+
+
+
panel
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.java
new file mode 100644
index 00000000..47f6ea02
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.java
@@ -0,0 +1,14 @@
+package de.adesso.wickedcharts.showcase;
+
+import de.adesso.wickedcharts.wicket6.chartjs.Chart;
+
+/**
+ * Wicket-component that adds the chart configuration and a smaller markup to the page.
+ */
+public class SmallChartComponent extends ChartComponent {
+
+ public SmallChartComponent(Chart chart)
+ {
+ super(chart);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/StringFromResourceModel.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/StringFromResourceModel.java
index b1432419..6fb81f90 100644
--- a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/StringFromResourceModel.java
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/StringFromResourceModel.java
@@ -14,14 +14,14 @@
*/
package de.adesso.wickedcharts.showcase;
+import org.apache.commons.io.IOUtils;
+import org.apache.wicket.model.IModel;
+
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
-import org.apache.commons.io.IOUtils;
-import org.apache.wicket.model.IModel;
-
public class StringFromResourceModel implements IModel {
private static final long serialVersionUID = 1L;
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/boot/WebInitializer.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/boot/WebInitializer.java
index dd336b1d..ebccdcd0 100644
--- a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/boot/WebInitializer.java
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/boot/WebInitializer.java
@@ -2,7 +2,6 @@
import org.apache.wicket.protocol.http.WicketFilter;
import org.apache.wicket.spring.SpringWebApplicationFactory;
-
import org.springframework.boot.web.servlet.ServletContextInitializer;
import org.springframework.context.annotation.Configuration;
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartEndConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartEndConfiguration.java
new file mode 100644
index 00000000..bfcd00db
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartEndConfiguration.java
@@ -0,0 +1,65 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how the 'end' fill option works
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/line-boundaries.html
+ *
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class AreaLineBoundariesChartEndConfiguration extends ShowcaseConfiguration {
+ public AreaLineBoundariesChartEndConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(-40, 20, 30, -70, 12, 60, -30))
+ .setFill(BoundaryFillingMode.END);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setMaintainAspectRatio(true)
+ .setSpanGaps(false)
+ .setElements(new Element()
+ .setLine(new Line()
+ .setTension(0.000001)))
+ .setPlugins(new Plugins().
+ setFiller(new Filler().
+ setPropagate(false)))
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Boundaries Chart - End"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month"))
+ .setTicks(new Ticks()
+ .setAutoSkip(false)
+ .setMaxRotation(0))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartFalseConfiguration.java
new file mode 100644
index 00000000..0ac5393a
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartFalseConfiguration.java
@@ -0,0 +1,63 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how the 'false' fill option works
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/line-boundaries.html
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class AreaLineBoundariesChartFalseConfiguration extends ShowcaseConfiguration {
+ public AreaLineBoundariesChartFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(-40, 20, 30, -70, 12, 60, -30))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setMaintainAspectRatio(true)
+ .setSpanGaps(false)
+ .setElements(new Element()
+ .setLine(new Line()
+ .setTension(0.000001)))
+ .setPlugins(new Plugins().
+ setFiller(new Filler().
+ setPropagate(false)))
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Boundaries Chart - False"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month"))
+ .setTicks(new Ticks()
+ .setAutoSkip(false)
+ .setMaxRotation(0))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartOriginConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartOriginConfiguration.java
new file mode 100644
index 00000000..7bca9aeb
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartOriginConfiguration.java
@@ -0,0 +1,65 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how the 'origin' fill option works
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/line-boundaries.html
+ *
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class AreaLineBoundariesChartOriginConfiguration extends ShowcaseConfiguration {
+ public AreaLineBoundariesChartOriginConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(-40, 20, 30, -70, 12, 60, -30))
+ .setFill(BoundaryFillingMode.ORIGIN);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setMaintainAspectRatio(true)
+ .setSpanGaps(false)
+ .setElements(new Element()
+ .setLine(new Line()
+ .setTension(0.000001)))
+ .setPlugins(new Plugins().
+ setFiller(new Filler().
+ setPropagate(false)))
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Boundaries Chart - Origin"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month"))
+ .setTicks(new Ticks()
+ .setAutoSkip(false)
+ .setMaxRotation(0))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartStartConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartStartConfiguration.java
new file mode 100644
index 00000000..8905576a
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartStartConfiguration.java
@@ -0,0 +1,65 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how the 'start' fill option works
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/line-boundaries.html
+ *
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class AreaLineBoundariesChartStartConfiguration extends ShowcaseConfiguration {
+ public AreaLineBoundariesChartStartConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(-40, 20, 30, -70, 12, 60, -30))
+ .setFill(BoundaryFillingMode.START);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setMaintainAspectRatio(true)
+ .setSpanGaps(false)
+ .setElements(new Element()
+ .setLine(new Line()
+ .setTension(0.000001)))
+ .setPlugins(new Plugins().
+ setFiller(new Filler().
+ setPropagate(false)))
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Boundaries Chart - Start"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month"))
+ .setTicks(new Ticks()
+ .setAutoSkip(false)
+ .setMaxRotation(0))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartHorizontalConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartHorizontalConfiguration.java
new file mode 100644
index 00000000..7178325e
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartHorizontalConfiguration.java
@@ -0,0 +1,65 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * A sample that shows how a horizontal bar chart configuration looks.
+ */
+
+/**
+ *
+ * A sample that shows how a horizontal bar chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/bar/horizontal.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class BarChartHorizontalConfiguration extends ShowcaseConfiguration {
+ public BarChartHorizontalConfiguration() {
+ super();
+ setType(ChartType.HORIZONTAL_BAR);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setElements(new Rectangle())
+ .setLegend(new Legend()
+ .setPosition(Position.RIGHT))
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Horizontal Bar Chart"))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartMultiAxisConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartMultiAxisConfiguration.java
new file mode 100644
index 00000000..1573712e
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartMultiAxisConfiguration.java
@@ -0,0 +1,80 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * A sample that shows how a multi-axis bar chart configuration looks.
+ */
+
+/**
+ *
+ * A sample that shows how a multi-axis bar chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/bar/multi-axis.html
+ *
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class BarChartMultiAxisConfiguration extends ShowcaseConfiguration{
+ public BarChartMultiAxisConfiguration() {
+ setType(ChartType.BAR);
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setYAxisID("y-axis-1");
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setYAxisID("y-axis-2");
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Bar Chart - Multi Axis"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setScales(new Scales()
+ .setYAxes(Arrays.asList(new AxesScale()
+ .setType("linear")
+ .setDisplay(true)
+ .setPosition(Position.LEFT)
+ .setId("y-axis-1"),
+ new AxesScale()
+ .setType("linear")
+ .setDisplay(true)
+ .setPosition(Position.RIGHT)
+ .setId("y-axis-2")
+ .setGridLines(new GridLines()
+ .setDrawOnChartArea(false)))))
+
+ ;
+ setOptions(options);
+
+ }
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedConfiguration.java
new file mode 100644
index 00000000..20a05db5
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedConfiguration.java
@@ -0,0 +1,88 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * A sample that shows how a stacked bar chart configuration looks.
+ */
+
+/**
+ *
+ * A sample that shows how a stack bar chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/bar/stacked.html
+ *
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class BarChartStackedConfiguration extends ShowcaseConfiguration {
+ public BarChartStackedConfiguration() {
+ setType(ChartType.STACKED_BAR);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setStack("1");
+
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setStack("1");
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("Dataset 3")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setStack("1");
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2, dataset3));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Bar Chart - Stacked"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setStacked(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setStacked(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedGroupConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedGroupConfiguration.java
new file mode 100644
index 00000000..cd1cea4f
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedGroupConfiguration.java
@@ -0,0 +1,86 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * A sample that shows how a stacked group bar chart configuration looks.
+ */
+
+/**
+ *
+ * A sample that shows how a stacked bar chart group configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/bar/stacked-group.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class BarChartStackedGroupConfiguration extends ShowcaseConfiguration {
+ public BarChartStackedGroupConfiguration() {
+ setType(ChartType.STACKED_BAR);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setStack("0");
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setStack("0");
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("Dataset 3")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setStack("1");
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2, dataset3));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Bar Chart - Stacked Groups"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setStacked(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setStacked(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartVerticalConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartVerticalConfiguration.java
new file mode 100644
index 00000000..c0275a09
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartVerticalConfiguration.java
@@ -0,0 +1,61 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * A sample that shows how a vertical bar chart configuration looks.
+ */
+
+/**
+ *
+ * A sample that shows how a vertical bar chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/bar/vertical.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class BarChartVerticalConfiguration extends ShowcaseConfiguration {
+ public BarChartVerticalConfiguration() {
+ super();
+ setType(ChartType.BAR);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Bar Chart"))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/BubbleChartConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/BubbleChartConfiguration.java
new file mode 100644
index 00000000..ba8c44d3
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/BubbleChartConfiguration.java
@@ -0,0 +1,103 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.BubbleValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+import java.util.Random;
+
+/**
+ *
+ * A sample that shows how a bubble chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/scriptable/bubble.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class BubbleChartConfiguration extends ShowcaseConfiguration {
+ public BubbleChartConfiguration() {
+ super();
+ setType(ChartType.BUBBLE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.YELLOW)
+ .setHoverBackgroundColor(SimpleColor.WHITE)
+ .setHoverBorderColor(SimpleColor.RED)
+ .setHoverBorderWidth(10.0)
+ .setData(Arrays.asList(
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100))
+ ))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setHoverBackgroundColor(SimpleColor.WHITE)
+ .setHoverBorderColor(SimpleColor.RED)
+ .setHoverBorderWidth(10.0)
+ .setData(Arrays.asList(
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100))
+ ))
+ .setFill(false);
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("My Third dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.YELLOW)
+ .setHoverBackgroundColor(SimpleColor.WHITE)
+ .setHoverBorderColor(SimpleColor.RED)
+ .setHoverBorderWidth(10.0)
+ .setData(Arrays.asList(
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100))
+ ))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2,dataset3));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setAspectRatio((double)1)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Bubble Chart"))
+ ;
+ setOptions(options);
+
+
+ }
+
+ private Double randomDouble(int bound) {
+ Random random = new Random();
+ return (double)random.nextInt(bound)+1;
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/ComboBarLineChartConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/ComboBarLineChartConfiguration.java
new file mode 100644
index 00000000..02987aff
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/ComboBarLineChartConfiguration.java
@@ -0,0 +1,64 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+
+/**
+ *
+ * A sample that shows how a combo bar-line chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/combo-bar-line.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class ComboBarLineChartConfiguration extends ShowcaseConfiguration {
+ public ComboBarLineChartConfiguration() {
+ super();
+ setType(ChartType.BAR);
+ Data data = new Data();
+ Dataset dataset1 = new Dataset();
+ dataset1.setType(ChartType.LINE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderWidth(2)
+ .setFill(false)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setLabel("Dataset 1");
+
+ Dataset dataset2 = new Dataset()
+ .setType(ChartType.BAR)
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.WHITE)
+ .setBorderWidth(2)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setLabel("Dataset 2");
+
+ Dataset dataset3 = new Dataset()
+ .setType(ChartType.BAR)
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setLabel("Dataset 3");
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2,dataset3))
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+
+ setData(data);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Combo Bar Line Chart"))
+ .setTooltips(new Tooltips()
+ .setIntersect(true)
+ .setMode(TooltipMode.INDEX));
+ setOptions(options);
+
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/DataLabellingChartConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/DataLabellingChartConfiguration.java
new file mode 100644
index 00000000..999a7bd3
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/DataLabellingChartConfiguration.java
@@ -0,0 +1,71 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+
+/**
+ *
+ * A sample that shows how a combo bar-line chart configuration with data labelling.
+ *
+ * @see http://www.chartjs.org/samples/latest/advanced/data-labelling.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class DataLabellingChartConfiguration extends ShowcaseConfiguration {
+ public DataLabellingChartConfiguration() {
+ super();
+ setType(ChartType.BAR);
+ String optionalJavascript=readFile("de/adesso/wickedcharts/showcase/dataLabellingPlugin.js");
+
+ setOptionalJavascript(new ArrayList());
+ addOptionalJavascript(optionalJavascript);
+
+ Data data = new Data();
+ Dataset dataset1 = new Dataset();
+ dataset1.setType(ChartType.LINE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderWidth(2)
+ .setFill(false)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setLabel("Dataset 1");
+
+ Dataset dataset2 = new Dataset()
+ .setType(ChartType.BAR)
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.WHITE)
+ .setBorderWidth(2)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setLabel("Dataset 2");
+
+ Dataset dataset3 = new Dataset()
+ .setType(ChartType.BAR)
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setLabel("Dataset 3");
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2,dataset3))
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+
+ setData(data);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Combo Bar Line Chart"))
+ .setTooltips(new Tooltips()
+ .setIntersect(true)
+ .setMode(TooltipMode.INDEX));
+ setOptions(options);
+
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/DoughnutChartConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/DoughnutChartConfiguration.java
new file mode 100644
index 00000000..71103554
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/DoughnutChartConfiguration.java
@@ -0,0 +1,50 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a doughnut configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/doughnut.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class DoughnutChartConfiguration extends ShowcaseConfiguration {
+ public DoughnutChartConfiguration() {
+ super();
+ setType(ChartType.DOUGHNUT);
+
+ Data data = new Data();
+
+ Dataset dataset = new Dataset()
+ .setData(IntegerValue.of(randomIntegerList(5)))
+ .setBackgroundColor(
+ Arrays.asList(SimpleColor.RED,SimpleColor.ORANGE, SimpleColor.YELLOW, SimpleColor.GREEN, SimpleColor.BLUE))
+ .setLabel("Dataset 1");
+
+ data.setDatasets(Arrays.asList(dataset)).setLabels(TextLabel.of("Red", "Orange", "Yellow", "Green", "Blue"));
+
+ setData(data);
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("ChartJs Doughnut Chart"))
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setAnimation(new Animation()
+ .setAnimateScale(true)
+ .setAnimateRotate(true));
+ setOptions(options);
+
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/FilteringLabelsConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/FilteringLabelsConfiguration.java
new file mode 100644
index 00000000..bc7a4aa4
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/FilteringLabelsConfiguration.java
@@ -0,0 +1,68 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a chart with label filtering is configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/filtering-labels.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class FilteringLabelsConfiguration extends ShowcaseConfiguration {
+ public FilteringLabelsConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart - X-Axis Filter"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month"))
+ .setTicks(new Ticks()
+ .setCallback(
+ new CallbackFunction("function(dataLabel, index) {\r\n" +
+ " // Hide the label of every 2nd dataset. return null to hide the grid line too\r\n" +
+ " return index % 2 === 0 ? dataLabel : '';}"))))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setBeginAtZero(true)))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LegendPointStyleConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LegendPointStyleConfiguration.java
new file mode 100644
index 00000000..14938151
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LegendPointStyleConfiguration.java
@@ -0,0 +1,71 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how different point style configurations look.
+ *
+ * @see http://www.chartjs.org/samples/latest/legend/point-style.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LegendPointStyleConfiguration extends ShowcaseConfiguration {
+ public LegendPointStyleConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setPointStyle(PointStyle.RECT_ROT)
+ .setPointRadius(10)
+ .setData(IntegerValue.of(-40, 20, 30, -70, 12, 60, -30))
+ .setFill(BoundaryFillingMode.ORIGIN);
+
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Point Style Legend"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setLegend(new Legend()
+ .setLabels(new LegendLabel()
+ .setUsePointStyle(true)))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartAreaDatasetConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartAreaDatasetConfiguration.java
new file mode 100644
index 00000000..af88eb23
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartAreaDatasetConfiguration.java
@@ -0,0 +1,143 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.AbsoluteIndex;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.RelativeIndex;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a chart with different datasets can be configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/line-datasets.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartAreaDatasetConfiguration extends ShowcaseConfiguration {
+ public LineChartAreaDatasetConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset0 = new Dataset()
+ .setLabel("D0 (hidden), Fill: undefined")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(BoundaryFillingMode.UNDEFINED)
+ .setHidden(true);
+
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("D1 Fill: -1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(new RelativeIndex("-1"));
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("D2 (hidden) Fill: 1")
+ .setBackgroundColor(SimpleColor.ORANGE_TRANSPARENT)
+ .setBorderColor(SimpleColor.ORANGE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setHidden(true)
+ .setFill(new AbsoluteIndex(1));
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("D3 Fill: -1")
+ .setBackgroundColor(SimpleColor.YELLOW_TRANSPARENT)
+ .setBorderColor(SimpleColor.YELLOW)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset4 = new Dataset()
+ .setLabel("D4 Fill: -1")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(new RelativeIndex("-1"));
+
+ Dataset dataset5 = new Dataset()
+ .setLabel("D5 Fill: +2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(new RelativeIndex("+2"));
+
+
+ Dataset dataset6 = new Dataset()
+ .setLabel("D6 Fill: false")
+ .setBackgroundColor(SimpleColor.GREY_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREY)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ Dataset dataset7 = new Dataset()
+ .setLabel("D7 Fill: 8")
+ .setBackgroundColor(SimpleColor.PURPLE_TRANSPARENT)
+ .setBorderColor(SimpleColor.PURPLE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(new AbsoluteIndex(8));
+
+
+ Dataset dataset8 = new Dataset()
+ .setLabel("D8 (hidden) Fill: end")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setHidden(true)
+ .setFill(BoundaryFillingMode.END);
+
+ data.setDatasets(Arrays.asList(dataset0, dataset1, dataset2, dataset3, dataset4,
+ dataset5, dataset6, dataset7, dataset8));
+
+ Options options = new Options()
+ .setMaintainAspectRatio(true)
+ .setSpanGaps(false)
+ .setElements(new Element()
+ .setLine(new Line()
+ .setTension(0.000001)))
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Dataset Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setPlugins(new Plugins()
+ .setFiller(new Filler()
+ .setPropagate(false))
+ .setSamples_filler_analyzer(new SamplesFillerAnalyzer()
+ .setTarget("chart-analyzer")))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setStacked(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartBasicConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartBasicConfiguration.java
new file mode 100644
index 00000000..49e6c1af
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartBasicConfiguration.java
@@ -0,0 +1,72 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample of a basic line chart configuration.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/basic.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LineChartBasicConfiguration extends ShowcaseConfiguration {
+ public LineChartBasicConfiguration() {
+
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartInterpolatedConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartInterpolatedConfiguration.java
new file mode 100644
index 00000000..5b51dafd
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartInterpolatedConfiguration.java
@@ -0,0 +1,84 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ *
+ * A sample that shows how configuring interpolation of lines in a line chart is configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/interpolation-modes.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartInterpolatedConfiguration extends ShowcaseConfiguration {
+ public LineChartInterpolatedConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ List datasetsData = IntegerValue.of(randomIntegerList(7));
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Cubic interpolation (monotone)")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(datasetsData)
+ .setFill(false)
+ .setCubicInterpolationMode(CubicInterpolationMode.MONOTONE);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Cubic interpolation (default)")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(datasetsData)
+ .setFill(false);
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("Linear interpolation")
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(datasetsData)
+ .setFill(false)
+ .setLineTension(0);
+
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2, dataset3));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart Interpolation"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartMultiAxisConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartMultiAxisConfiguration.java
new file mode 100644
index 00000000..fe82651a
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartMultiAxisConfiguration.java
@@ -0,0 +1,76 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how multiple axes in a line chart are configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/multi-axis.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartMultiAxisConfiguration extends ShowcaseConfiguration{
+ public LineChartMultiAxisConfiguration() {
+ setType(ChartType.LINE);
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setYAxisID("y-axis-1");
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setYAxisID("y-axis-2");
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart - Multi Axis"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setScales(new Scales()
+ .setYAxes(Arrays.asList(new AxesScale()
+ .setType("linear")
+ .setDisplay(true)
+ .setPosition(Position.LEFT)
+ .setId("y-axis-1"),
+ new AxesScale()
+ .setType("linear")
+ .setDisplay(true)
+ .setPosition(Position.RIGHT)
+ .setId("y-axis-2")
+ .setGridLines(new GridLines()
+ .setDrawOnChartArea(false)))))
+
+ ;
+ setOptions(options);
+
+ }
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartProgressBarConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartProgressBarConfiguration.java
new file mode 100644
index 00000000..cf6f940d
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartProgressBarConfiguration.java
@@ -0,0 +1,95 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import org.apache.wicket.markup.html.panel.Fragment;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a line chart with a progress bar is configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/advanced/progress-bar.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartProgressBarConfiguration extends ShowcaseConfiguration {
+ public LineChartProgressBarConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ String optionalJavascript= readFile("de/adesso/wickedcharts/showcase/progressBar.js");
+
+ setOptionalJavascript(new ArrayList());
+ addOptionalJavascript(optionalJavascript);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart Progress Bar"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setAnimation(new Animation()
+ .setDuration(2000)
+ .setOnProgress(new CallbackFunction("function(animation) {\r\n" +
+ " progress.value = animation.currentStep / animation.numSteps;\r\n" +
+ " }"))
+ .setOnComplete(new CallbackFunction("function(animation) {\r\n" +
+ " window.setTimeout(function() {\r\n" +
+ " progress.value = 0;\r\n" +
+ " }, 2000);\r\n" +
+ " }")))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+
+ @Override
+ public void modfiyIndividualMarkup(Fragment optionalMarkup) {
+ Fragment frag = new Fragment("optionalMarkup","progressBar",optionalMarkup.getParent());
+ optionalMarkup.replaceWith(frag);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartStackedConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartStackedConfiguration.java
new file mode 100644
index 00000000..383c7a06
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartStackedConfiguration.java
@@ -0,0 +1,77 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a stacked line chart is configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/line-stacked.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartStackedConfiguration extends ShowcaseConfiguration{
+ public LineChartStackedConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("My Third dataset")
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2, dataset3));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Stacked Line Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setStacked(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedAfterConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedAfterConfiguration.java
new file mode 100644
index 00000000..cc3da325
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedAfterConfiguration.java
@@ -0,0 +1,66 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a stepped line chart configuration looks with stepped = after.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/stepped.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartSteppedAfterConfiguration extends ShowcaseConfiguration {
+ public LineChartSteppedAfterConfiguration() {
+ super();
+ setType(ChartType.LINE);
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Stepped After")
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setSteppedLine(SteppedLineValue.AFTER);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart Stepped - After"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedBeforeConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedBeforeConfiguration.java
new file mode 100644
index 00000000..4cfde004
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedBeforeConfiguration.java
@@ -0,0 +1,65 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a stepped line chart configuration looks with stepped = before.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/stepped.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartSteppedBeforeConfiguration extends ShowcaseConfiguration {
+ public LineChartSteppedBeforeConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Stepped Before")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setSteppedLine(SteppedLineValue.BEFORE);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart Stepped - Before"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartWithDifferentPointSizesConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartWithDifferentPointSizesConfiguration.java
new file mode 100644
index 00000000..205fbf11
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartWithDifferentPointSizesConfiguration.java
@@ -0,0 +1,94 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+import java.util.Collections;
+
+/**
+ *
+ * A sample that shows how a line chart can be configured to have different point sizes.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/point-sizes.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartWithDifferentPointSizesConfiguration extends ShowcaseConfiguration {
+ public LineChartWithDifferentPointSizesConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("dataset - big points")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setPointRadius(Collections.nCopies(7, 15))
+ .setPointHoverRadius(10)
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("dataset - individual point sizes")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderDash(Arrays.asList("5", "5"))
+ .setPointRadius(Arrays.asList(2, 4, 6, 18, 0, 12, 20))
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("dataset - large pointHoverRadius")
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setPointHoverRadius(30)
+ .setFill(false);
+
+
+ Dataset dataset4 = new Dataset()
+ .setLabel("dataset - large pointHitRadius")
+ .setBackgroundColor(SimpleColor.YELLOW)
+ .setBorderColor(SimpleColor.YELLOW)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setPointHitRadius(20)
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2,dataset3, dataset4));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart with Different Point Sizes"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineStylesConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineStylesConfiguration.java
new file mode 100644
index 00000000..0862c977
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineStylesConfiguration.java
@@ -0,0 +1,80 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how different line styles can be configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/line-styles.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineStylesConfiguration extends ShowcaseConfiguration {
+ public LineStylesConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Filled")
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Unfilled")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("Dashed")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderDash(Arrays.asList("5", "5"))
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2,dataset3));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Styles"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LinearStepSizeConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LinearStepSizeConfiguration.java
new file mode 100644
index 00000000..84f1afb3
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LinearStepSizeConfiguration.java
@@ -0,0 +1,75 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a line chart with linear step size is configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/linear/step-size.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LinearStepSizeConfiguration extends ShowcaseConfiguration {
+ public LinearStepSizeConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))
+ .setTicks(new Ticks()
+ .setMin(0)
+ .setMax(100)
+ .setStepSize(5))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicLineChartConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicLineChartConfiguration.java
new file mode 100644
index 00000000..0924670d
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicLineChartConfiguration.java
@@ -0,0 +1,72 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a logarithmic line chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/logarithmic/line.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LogarithmicLineChartConfiguration extends ShowcaseConfiguration {
+ public LogarithmicLineChartConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Logarithmic Line Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setType("logarithmic")
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicScatterChartConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicScatterChartConfiguration.java
new file mode 100644
index 00000000..db5c6709
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicScatterChartConfiguration.java
@@ -0,0 +1,85 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.PointValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * A sample that shows how a logarithmic scatter chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/logarithmic/scatter.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LogarithmicScatterChartConfiguration extends ShowcaseConfiguration {
+ public LogarithmicScatterChartConfiguration() {
+ super();
+ setType(ChartType.SCATTER);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(Arrays.asList(
+ new PointValue(4,14),
+ new PointValue(40,42),
+ new PointValue(23,42),
+ new PointValue(40,22),
+ new PointValue(80,12),
+ new PointValue(30,32)))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(Arrays.asList(
+ new PointValue(7,56),
+ new PointValue(15,54),
+ new PointValue(46,34),
+ new PointValue(36,42),
+ new PointValue(78,64),
+ new PointValue(12,48)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Logarithmic Scatter Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setType("logarithmic")
+ .setPosition(Position.BOTTOM)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Frequency")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setType("linear")
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Voltage"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxConfiguration.java
new file mode 100644
index 00000000..2d826156
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxConfiguration.java
@@ -0,0 +1,60 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+
+/**
+ *
+ * A sample that shows how to configure min and max Ticks in the chart options.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/linear/min-max.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class MinMaxConfiguration extends ShowcaseConfiguration {
+ public MinMaxConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(Arrays.asList(10, 30, 39, 20, 25, 34, -10)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(Arrays.asList(100, 33, 22, 19, 11, 49, 30)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Min and Max"))
+ .setScales(new Scales()
+ .setYAxes(new AxesScale()
+ .setTicks(new Ticks()
+ .setMin(10)
+ .setMax(50))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxSuggestedConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxSuggestedConfiguration.java
new file mode 100644
index 00000000..b83ce23d
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxSuggestedConfiguration.java
@@ -0,0 +1,60 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+
+/**
+ *
+ * A sample that shows how to configure suggestedMin and suggestedMax Ticks in the chart options.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/linear/min-max-suggested.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class MinMaxSuggestedConfiguration extends ShowcaseConfiguration {
+ public MinMaxSuggestedConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(Arrays.asList(10, 30, 50, 20, 25, 44, -10)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(Arrays.asList(18, 33, 22, 19, 11, 39, 30)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Min and Max - Suggested"))
+ .setScales(new Scales()
+ .setYAxes(new AxesScale()
+ .setTicks(new Ticks()
+ .setSuggestedMin(10)
+ .setSuggestedMax(50))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/MultilineLabelsConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/MultilineLabelsConfiguration.java
new file mode 100644
index 00000000..85e23292
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/MultilineLabelsConfiguration.java
@@ -0,0 +1,69 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextListLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+
+/**
+ *
+ * A sample that shows how to configure multiline labels.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/multiline-labels.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class MultilineLabelsConfiguration extends ShowcaseConfiguration {
+
+ public MultilineLabelsConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(Arrays.asList(
+ new TextListLabel("June","2015"),
+ new TextLabel("July"),
+ new TextLabel("August"),
+ new TextLabel("September"),
+ new TextLabel("October"),
+ new TextLabel("November"),
+ new TextLabel("December"),
+ new TextListLabel("January","2016"),
+ new TextLabel("February"),
+ new TextLabel("March"),
+ new TextLabel("April"),
+ new TextLabel("May")
+ ));
+
+ Dataset dataset1 = new Dataset()
+ .setData(IntegerValue.of(randomIntegerList(12)))
+ .setLabel("My First dataset")
+ .setFill(false)
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED);
+
+ Dataset dataset2 = new Dataset()
+ .setData(IntegerValue.of(randomIntegerList(12)))
+ .setLabel("My Second dataset")
+ .setFill(false)
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ setData(data);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart with Multiline Labels"));
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/NonNumericConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/NonNumericConfiguration.java
new file mode 100644
index 00000000..a6f3c0e7
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/NonNumericConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.ConstLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.ConstValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+
+/**
+ *
+ * A sample that shows how to configure non-numeric values in a chart.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/non-numeric-y.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class NonNumericConfiguration extends ShowcaseConfiguration {
+
+ public NonNumericConfiguration() {
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setXLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"))
+ .setYLabels(ConstLabel.of("", "Request Added", "Request Viewed", "Request Accepted", "Request Solved", "Solving Confirmed"))
+ ;
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First Dataset")
+ .setFill(false)
+ .setBorderColor(SimpleColor.RED)
+ .setBackgroundColor(SimpleColor.RED)
+ .setData(ConstValue.of("", "Request Added", "Request Added", "Request Added", "Request Viewed", "Request Viewed", "Request Viewed"))
+ ;
+ data.setDatasets(Arrays.asList(dataset1));
+ setData(data);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart with Non Numeric Y Axis"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setType("category")
+ .setPosition(Position.LEFT)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Request State"))
+ .setTicks(new Ticks()
+ .setReverse(true))))
+ ;
+ setOptions(options);
+
+
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/OtherRadarChartConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/OtherRadarChartConfiguration.java
new file mode 100644
index 00000000..19e7d5ec
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/OtherRadarChartConfiguration.java
@@ -0,0 +1,65 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextListLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that displays different datasets on a radar.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/radar.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class OtherRadarChartConfiguration extends ShowcaseConfiguration {
+ public OtherRadarChartConfiguration() {
+ super();
+ setType(ChartType.RADAR);
+
+ Data data = new Data()
+ .setLabels(Arrays.asList(
+ new TextListLabel("Eating", "Dinner"),
+ new TextListLabel("Drining", "Water"),
+ new TextLabel("Sleeping"),
+ new TextListLabel("Designing","Graphics"),
+ new TextLabel("Coding"),
+ new TextLabel("Cycling"),
+ new TextLabel("Running")
+ ));
+ setData(data);
+
+ Dataset dataset0 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setPointBackgroundColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My second dataset")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setPointBackgroundColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ data.setDatasets(Arrays.asList(dataset0, dataset1));
+
+ Options options = new Options()
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Radar Chart"))
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setScale(new Scale()
+ .setTicks(new Ticks()
+ .setBeginAtZero(true)));
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/PieChartConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/PieChartConfiguration.java
new file mode 100644
index 00000000..9301accc
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/PieChartConfiguration.java
@@ -0,0 +1,44 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
+import de.adesso.wickedcharts.chartjs.chartoptions.Data;
+import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
+import de.adesso.wickedcharts.chartjs.chartoptions.Options;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that displays a dataset as a pie chart.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/pie.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class PieChartConfiguration extends ShowcaseConfiguration {
+ public PieChartConfiguration() {
+ super();
+ setType(ChartType.PIE);
+
+ Data data = new Data();
+
+ Dataset dataset = new Dataset()
+ .setData(IntegerValue.of(randomIntegerList(5)))
+ .setBackgroundColor(
+ Arrays.asList(SimpleColor.RED,SimpleColor.ORANGE, SimpleColor.YELLOW, SimpleColor.GREEN, SimpleColor.BLUE))
+ .setLabel("Dataset 1");
+
+ data.setDatasets(Arrays.asList(dataset)).setLabels(TextLabel.of("Red", "Orange", "Yellow", "Green", "Blue"));
+
+ setData(data);
+ Options options = new Options()
+ .setResponsive(true);
+ setOptions(options);
+
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/PointStylesConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/PointStylesConfiguration.java
new file mode 100644
index 00000000..47e62fc4
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/PointStylesConfiguration.java
@@ -0,0 +1,182 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that supports different point styles:
+ * 'circle',
+ * 'triangle',
+ * 'rect',
+ * 'rectRounded',
+ * 'rectRot',
+ * 'cross',
+ * 'crossRot',
+ * 'star',
+ * 'line',
+ * 'dash'
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/point-styles.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class PointStylesConfiguration extends ShowcaseConfiguration {
+ public PointStylesConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dash")
+ .setBackgroundColor(SimpleColor.GREY)
+ .setBorderColor(SimpleColor.GREY)
+ .setData(IntegerValue.of(Arrays.asList(1,1,1,1,1,1,1)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.DASH)
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Star")
+ .setBackgroundColor(SimpleColor.PURPLE)
+ .setBorderColor(SimpleColor.PURPLE)
+ .setData(IntegerValue.of(Arrays.asList(2,2,2,2,2,2,2)))
+ .setShowLine(false)
+ .setPointRadius(20)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.STAR)
+ .setFill(false);
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("Rectangle")
+ .setBackgroundColor(SimpleColor.YELLOW)
+ .setBorderColor(SimpleColor.YELLOW)
+ .setData(IntegerValue.of(Arrays.asList(3,3,3,3,3,3,3)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.RECT)
+ .setFill(false);
+
+ Dataset dataset4 = new Dataset()
+ .setLabel("Triangle")
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(Arrays.asList(4,4,4,4,4,4,4)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.TRIANGLE)
+ .setFill(false);
+
+ Dataset dataset5 = new Dataset()
+ .setLabel("Circle")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(Arrays.asList(5,5,5,5,5,5,5)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.CIRCLE)
+ .setFill(false);
+
+ Dataset dataset6 = new Dataset()
+ .setLabel("CrossRot")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(Arrays.asList(6,6,6,6,6,6,6)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.CROSS_ROT)
+ .setFill(false);
+
+ Dataset dataset7 = new Dataset()
+ .setLabel("Line")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED_TRANSPARENT)
+ .setData(IntegerValue.of(Arrays.asList(7,7,7,7,7,7,7)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.LINE)
+ .setFill(false);
+
+ Dataset dataset8 = new Dataset()
+ .setLabel("Cross")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE_TRANSPARENT)
+ .setData(IntegerValue.of(Arrays.asList(8,8,8,8,8,8,8)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.CROSS)
+ .setFill(false);
+
+ Dataset dataset9 = new Dataset()
+ .setLabel("Rectangle Rounded")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(Arrays.asList(9,9,9,9,9,9,9)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.RECT_ROUNDED)
+ .setFill(false);
+
+ Dataset dataset10 = new Dataset()
+ .setLabel("Rectangle Rotated")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN_TRANSPARENT)
+ .setData(IntegerValue.of(Arrays.asList(11,11,11,11,11,11,11)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.RECT_ROT)
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1, dataset2, dataset3, dataset4, dataset5, dataset6,
+ dataset7, dataset8, dataset9, dataset10));
+
+ //Point Style Can also be set in the options using the Elements option
+ //But you can only have one point style for all datasets
+
+ //Some Point Styles are drawn incorrectly
+ //See this issue: https://github.com/chartjs/Chart.js/issues/2607
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Point Styles"))
+ .setLegend(new Legend()
+ .setPosition(Position.RIGHT))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))
+ .setTicks(new Ticks()
+ .setMax(13)
+ .setMin(0))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/PolarAreaChartConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/PolarAreaChartConfiguration.java
new file mode 100644
index 00000000..03d581f6
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/PolarAreaChartConfiguration.java
@@ -0,0 +1,55 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that distributes data in a polar area chart.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/polar-area.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class PolarAreaChartConfiguration extends ShowcaseConfiguration {
+ public PolarAreaChartConfiguration() {
+ super();
+ setType(ChartType.POLAR_AREA);
+
+ Data data = new Data();
+
+ Dataset dataset = new Dataset()
+ .setData(IntegerValue.of(randomIntegerList(5)))
+ .setBackgroundColor(
+ Arrays.asList(SimpleColor.RED_TRANSPARENT,SimpleColor.ORANGE_TRANSPARENT,
+ SimpleColor.YELLOW_TRANSPARENT, SimpleColor.GREEN_TRANSPARENT,
+ SimpleColor.BLUE_TRANSPARENT))
+ .setLabel("Dataset 1");
+
+ data.setDatasets(Arrays.asList(dataset)).setLabels(TextLabel.of("Red", "Orange", "Yellow", "Green", "Blue"));
+
+ setData(data);
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("ChartJs Polar Area Chart"))
+ .setLegend(new Legend()
+ .setPosition(Position.RIGHT))
+ .setScale(new Scale()
+ .setTicks(new Ticks()
+ .setBeginAtZero(true))
+ .setReverse(false))
+ .setAnimation(new Animation()
+ .setAnimateScale(true)
+ .setAnimateRotate(false));
+ setOptions(options);
+
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/RadarChartConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/RadarChartConfiguration.java
new file mode 100644
index 00000000..be74b50d
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/RadarChartConfiguration.java
@@ -0,0 +1,98 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.AbsoluteIndex;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.RelativeIndex;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that displays different datasets on a radar.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/radar.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class RadarChartConfiguration extends ShowcaseConfiguration {
+ public RadarChartConfiguration() {
+ super();
+ setType(ChartType.RADAR);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset0 = new Dataset()
+ .setLabel("D0")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(Arrays.asList(1, 2, 3, 1, 2, 1, 2)))
+ .setFill(BoundaryFillingMode.UNDEFINED);
+
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("D1 (hidden) Fill: -1")
+ .setBackgroundColor(SimpleColor.ORANGE_TRANSPARENT)
+ .setBorderColor(SimpleColor.ORANGE)
+ .setData(IntegerValue.of(Arrays.asList(5, 4, 3, 5, 4, 3, 5)))
+ .setHidden(true)
+ .setFill(new RelativeIndex("-1"));
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("D2 Fill: 1")
+ .setBackgroundColor(SimpleColor.YELLOW)
+ .setBorderColor(SimpleColor.YELLOW_TRANSPARENT)
+ .setData(IntegerValue.of(Arrays.asList(10, 8, 12, 6, 13, 10, 9)))
+ .setFill(new AbsoluteIndex(1));
+
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("D3 Fill: False")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(Arrays.asList(20, 18, 22, 16, 23, 20, 19)))
+ .setFill(false);
+
+ Dataset dataset4 = new Dataset()
+ .setLabel("D4 Fill: -1")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(Arrays.asList(30, 28, 32, 26, 33, 30, 29)))
+ .setFill(new RelativeIndex("-1"));
+
+
+ Dataset dataset5 = new Dataset()
+ .setLabel("D5 Fill: -1")
+ .setBackgroundColor(SimpleColor.PURPLE_TRANSPARENT)
+ .setBorderColor(SimpleColor.PURPLE)
+ .setData(IntegerValue.of(Arrays.asList(40, 38, 42, 36, 43, 40, 39)))
+ .setFill(new RelativeIndex("-1"));
+
+ data.setDatasets(Arrays.asList(dataset0, dataset1, dataset2, dataset3, dataset4, dataset5));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Radar Chart"))
+ .setMaintainAspectRatio(true)
+ .setSpanGaps(false)
+ .setElements(new Element()
+ .setLine(new Line()
+ .setTension(0.000001)))
+ .setPlugins(new Plugins()
+ .setFiller(new Filler()
+ .setPropagate(false))
+ .setSamples_filler_analyzer(new SamplesFillerAnalyzer()
+ .setTarget("chart-analyzer")))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartConfiguration.java
new file mode 100644
index 00000000..b9cee224
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartConfiguration.java
@@ -0,0 +1,79 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.PointValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample which displays data as scattered points in the coordinate system.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/scatter/basic.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class ScatterChartConfiguration extends ShowcaseConfiguration {
+ public ScatterChartConfiguration() {
+ super();
+ setType(ChartType.SCATTER);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(Arrays.asList(
+ new PointValue(4,14),
+ new PointValue(40,42),
+ new PointValue(23,42),
+ new PointValue(40,22),
+ new PointValue(80,12),
+ new PointValue(30,32)))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(Arrays.asList(
+ new PointValue(7,56),
+ new PointValue(15,54),
+ new PointValue(46,34),
+ new PointValue(36,42),
+ new PointValue(78,64),
+ new PointValue(12,48)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Scatter Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setType("linear")
+ .setPosition(Position.BOTTOM)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartMultiAxisConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartMultiAxisConfiguration.java
new file mode 100644
index 00000000..0dc680a2
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartMultiAxisConfiguration.java
@@ -0,0 +1,91 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.RgbaColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.PointValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that displays a scatter chart with two y-axes.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/scatter/multi-axis.html
+ *
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class ScatterChartMultiAxisConfiguration extends ShowcaseConfiguration {
+ public ScatterChartMultiAxisConfiguration() {
+ super();
+ setType(ChartType.SCATTER);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setYAxisID("y-axis-1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(Arrays.asList(
+ new PointValue(4,14),
+ new PointValue(40,42),
+ new PointValue(23,42),
+ new PointValue(40,22),
+ new PointValue(80,12),
+ new PointValue(30,32)))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setYAxisID("y-axis-2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(Arrays.asList(
+ new PointValue(7,56),
+ new PointValue(15,54),
+ new PointValue(46,34),
+ new PointValue(36,42),
+ new PointValue(78,64),
+ new PointValue(12,48)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Scatter Chart Multi Axis"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setType("linear")
+ .setPosition(Position.BOTTOM)
+ .setGridLines(new GridLines()
+ .setZeroLineColor(new RgbaColor(0, 0, 0, 1)))
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(Arrays.asList(new AxesScale()
+ .setType("linear")
+ .setDisplay(true)
+ .setPosition(Position.LEFT)
+ .setId("y-axis-1"),
+ new AxesScale()
+ .setType("linear")
+ .setDisplay(true)
+ .setPosition(Position.RIGHT)
+ .setReverse(true)
+ .setId("y-axis-2")
+ .setGridLines(new GridLines()
+ .setDrawOnChartArea(false)))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeComboConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeComboConfiguration.java
new file mode 100644
index 00000000..102fdcd0
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeComboConfiguration.java
@@ -0,0 +1,87 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import org.apache.wicket.Session;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * Sample which displays a bar chart for the data distribution and a line chart for the time progression of datasets.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/time/combo.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TimeComboConfiguration extends ShowcaseConfiguration {
+
+
+ public TimeComboConfiguration() {
+ setType(ChartType.BAR);
+
+ String timeFormat = "MM/DD/YYYY HH:mm";
+
+ List labels = new ArrayList(7);
+
+ LocalDateTime now = LocalDateTime.now();
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM/dd/uuuu HH:mm", Session.get().getLocale());
+
+
+ for(int i = 0; i < 7; i++) {
+ labels.add(new TextLabel(now.plus(i,ChronoUnit.DAYS).format(formatter)));
+ }
+
+ Dataset dataset1 = new Dataset()
+ .setType(ChartType.BAR)
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ Dataset dataset2 = new Dataset()
+ .setType(ChartType.BAR)
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ Dataset dataset3 = new Dataset()
+ .setType(ChartType.LINE)
+ .setLabel("Dataset 3")
+ .setFill(false)
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+
+
+ setData( new Data()
+ .setLabels(labels)
+ .setDatasets(Arrays.asList(dataset1,dataset2,dataset3))
+ );
+
+
+
+ setOptions( new Options()
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Combo Time Scale"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setType("time")
+ .setDisplay(true)
+ .setTime(new TimeFormat()
+ .setFormat(timeFormat)
+// .setRound(TimeFormatRound.DAY)
+ ))));
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeLineConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeLineConfiguration.java
new file mode 100644
index 00000000..1771cd0d
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeLineConfiguration.java
@@ -0,0 +1,126 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.DateTimeLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.PointValue;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.StringValue;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.ValueType;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Random;
+
+/**
+ * Sample which displays a time progression line for datasets.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/time/line.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TimeLineConfiguration extends ShowcaseConfiguration {
+
+ public TimeLineConfiguration() {
+ setType(ChartType.LINE);
+
+ Data data = new Data();
+
+ String timeFormat = "MM/DD/YYYY HH:mm";
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern(timeFormat);
+
+ List dateList = new ArrayList();
+ for(int i = 0; i < 7; i++) {
+ dateList.add(new DateTimeLabel(LocalDateTime.of(2018, 1,1, 8+i, 00)));
+ }
+ data.setLabels(dateList);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First Dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setFill(false)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ ;
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second Dataset")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setFill(false)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ ;
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("Dataset with point data")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN)
+ .setFill(false)
+ .setData(Arrays.asList(
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(0).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(1).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(2).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(3).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(4).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(5).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(6).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(LocalDateTime.of(2018, 1, 1, 15, 0))))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(LocalDateTime.of(2018, 1, 1, 16, 0))))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(LocalDateTime.of(2018, 1, 1, 17, 0))))
+ .setY(randomInteger())
+ ))
+ ;
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2,dataset3));
+ setData(data);
+
+ Options options = new Options()
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Time Scale"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setType("time")
+ .setTime(new TimeFormat()
+ .setTimeFormat(timeFormat )
+ .setTooltipFormat("ll HH:mm")))
+ .setYAxes(new AxesScale()
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("value"))));
+ setOptions(options);
+
+
+ }
+
+ private ValueType randomInteger() {
+ Random rng = new Random();
+ return new IntegerValue(rng.nextInt(60)+1);
+ }
+
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimePointConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimePointConfiguration.java
new file mode 100644
index 00000000..9913c110
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimePointConfiguration.java
@@ -0,0 +1,138 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.StringValueColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.DateTimeLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.*;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Random;
+
+/**
+ * Sample which highlights the important points of the x-axis.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/time/line-point-data.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TimePointConfiguration extends ShowcaseConfiguration {
+
+
+ public TimePointConfiguration() {
+ setType(ChartType.LINE);
+
+ String timeFormat = "MM/DD/YYYY HH:mm";
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern(timeFormat);
+
+ Data data = new Data();
+
+ List dateList = new ArrayList();
+ for(int i = 0; i < 7; i++) {
+ dateList.add(new DateTimeLabel(LocalDateTime.of(2018, 1,1, 8+i, 00)));
+ }
+ data.setLabels(dateList);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset with date object point data")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setFill(false)
+ .setData(Arrays.asList(
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(0).getDate()))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(1).getDate()))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(2).getDate()))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(3).getDate()))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(4).getDate()))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(5).getDate()))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(6).getDate()))
+ .setY(randomInteger())
+ ));
+
+
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset with string point data")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setFill(false)
+ .setData(Arrays.asList(
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(0).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(1).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(2).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(3).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(4).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(5).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(6).getDate())))
+ .setY(randomInteger())
+ ))
+ ;
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+ setData(data);
+
+ Options options = new Options()
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Time Scale"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setType("time")
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Date"))
+ .setTicks(new Ticks()
+ .setMajor(new TickStyle()
+ .setFontColor(new StringValueColor("red"))
+ .setFontStyle(FontStyle.BOLD))))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("value"))));
+ setOptions(options);
+
+
+ }
+
+ private ValueType randomInteger() {
+ Random rng = new Random();
+ return new IntegerValue(rng.nextInt(60)+1);
+ }
+
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeSeriesConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeSeriesConfiguration.java
new file mode 100644
index 00000000..b634b84d
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeSeriesConfiguration.java
@@ -0,0 +1,94 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.DateTimeLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.DoubleValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.time.LocalDateTime;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * Sample that displays a progression of a dataset.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/time/financial.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TimeSeriesConfiguration extends ShowcaseConfiguration {
+
+ public TimeSeriesConfiguration() {
+
+
+ Options options = new Options()
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("ChartJs Time Series"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setType("time")
+ .setDistribution(DistributionType.SERIES)
+ .setTicks(new Ticks()
+ .setSource(TickSource.LABELS)
+ )
+ )
+ .setYAxes(new AxesScale()
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Closing price ($)"))
+ ));
+
+ setOptions(options);
+
+ setType(ChartType.LINE);
+
+ LocalDateTime now = LocalDateTime.now();
+
+
+ List labels = new ArrayList(60);
+ List randomData = new ArrayList(60);
+
+ labels.add(new DateTimeLabel(now));
+ randomData.add(randomBar(30));
+
+
+ for(int i = 1; i < 60; i++) {
+ int dayOfTheWeek = now.plus(i, ChronoUnit.DAYS).getDayOfWeek().getValue();
+ if( 1 <= dayOfTheWeek && dayOfTheWeek <= 5) {
+ labels.add(new DateTimeLabel(now.plus(i, ChronoUnit.DAYS)));
+ }
+ randomData.add(randomBar(randomData.get(i-1).getValue()));
+ }
+
+
+
+ Data data = new Data()
+ .setLabels(labels)
+ .setDatasets(Arrays.asList(new Dataset()
+ .setLabel("My Dataset")
+ .setData(randomData)
+ .setType(ChartType.LINE)
+ .setPointRadius(0)
+ .setFill(false)
+ .setLineTension(0)
+ .setBorderWidth(2)
+ ));
+ setData(data);
+ }
+
+ private DoubleValue randomBar(double lastClose) {
+ double open = randomNumber(lastClose * .95, lastClose *1.05);
+ double close = randomNumber(open * .95, open *1.05);
+// double high = randomNumber(Math.max(open, close), Math.max(open, close) * 1.1);
+// double low = randomNumber(Math.min(open, close) * .9, Math.min(open, close));
+ return new DoubleValue(close);
+ }
+
+ private double randomNumber(double min, double max) {
+ return Math.random() * (max - min) + min;
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipAverageConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipAverageConfiguration.java
new file mode 100644
index 00000000..25664e15
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipAverageConfiguration.java
@@ -0,0 +1,68 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that enables tooltips to be at a average position to the data points.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/positioning.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipAverageConfiguration extends ShowcaseConfiguration {
+ public TooltipAverageConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Tooltip Average Position"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setPosition(TooltipPosition.AVERAGE)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipBorderConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipBorderConfiguration.java
new file mode 100644
index 00000000..7271021f
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipBorderConfiguration.java
@@ -0,0 +1,62 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.RgbColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.RgbaColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample which adds a border to the tooltips.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/border.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipBorderConfiguration extends ShowcaseConfiguration {
+ public TooltipBorderConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(10, 30, 46, 2,8,50,0))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+
+ RgbColor black = new RgbColor(0,0,0);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Tooltip with border"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setPosition(TooltipPosition.NEAREST)
+ .setIntersect(false)
+ .setYPadding(10)
+ .setXPadding(10)
+ .setCaretSize(8)
+ .setBackgroundColor(new RgbaColor(72, 241, 12,1.0f))
+ .setTitleFontColor(black)
+ .setBodyFontColor(black)
+ .setBorderColor(new RgbaColor(0,0,0,1.0f))
+ .setBorderWidth(4))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipCallbacksConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipCallbacksConfiguration.java
new file mode 100644
index 00000000..87bb95eb
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipCallbacksConfiguration.java
@@ -0,0 +1,81 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that enables the use of callback functions for tooltips.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/callbacks.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipCallbacksConfiguration extends ShowcaseConfiguration {
+ public TooltipCallbacksConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ String footerFunction = "function(tooltipItems, data) {\r\n" +
+ " var sum = 0;\r\n" +
+ "\r\n" +
+ " tooltipItems.forEach(function(tooltipItem) {\r\n" +
+ " sum += data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index];\r\n" +
+ " });\r\n" +
+ " return 'Sum: ' + sum;\r\n" +
+ " }";
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Custom Information in Tooltip"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setCallbacks(new TooltipCallbacks()
+ .setFooter(new CallbackFunction(footerFunction)))
+ .setFooterFontStyle(FontStyle.NORMAL))
+ .setHover(new Hover()
+ .setMode(HoverMode.INDEX)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlLineConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlLineConfiguration.java
new file mode 100644
index 00000000..686cc84b
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlLineConfiguration.java
@@ -0,0 +1,64 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+/**
+ * Sample that enables the use of custom html markup for tooltips in a line chart.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/custom-line.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipHtmlLineConfiguration extends ShowcaseConfiguration {
+ public TooltipHtmlLineConfiguration() {
+ setType(ChartType.LINE);
+
+ String optionalJavascript= readFile("de/adesso/wickedcharts/showcase/customTooltip.js");
+
+ setOptionalJavascript(new ArrayList());
+ addOptionalJavascript(optionalJavascript);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("HTML Tooltip - Line"))
+ .setTooltips(new Tooltips()
+ .setEnabled(false)
+ .setMode(TooltipMode.INDEX)
+ .setPosition(TooltipPosition.NEAREST)
+ .setCustom(new JavaScriptReference("customTooltips"))
+ );
+ setOptions(options);
+ }
+
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPieConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPieConfiguration.java
new file mode 100644
index 00000000..f6ba2261
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPieConfiguration.java
@@ -0,0 +1,59 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import org.apache.wicket.markup.html.panel.Fragment;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+/**
+ * Sample that enables the use of custom html markup for tooltips in a pie chart.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/custom-pie.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipHtmlPieConfiguration extends ShowcaseConfiguration {
+ public TooltipHtmlPieConfiguration() {
+ setType(ChartType.PIE);
+
+ String optionalJavascript=readFile("de/adesso/wickedcharts/showcase/customTooltip-Pie.js");
+
+ setOptionalJavascript(new ArrayList());
+ addOptionalJavascript(optionalJavascript);
+
+ Data data = new Data();
+ setData(data);
+
+ Dataset dataset = new Dataset()
+ .setLabel("My Dataset")
+ .setBackgroundColor(Arrays.asList(SimpleColor.RED,SimpleColor.ORANGE,SimpleColor.YELLOW, SimpleColor.GREEN, SimpleColor.BLUE))
+ .setData(IntegerValue.of(300, 50, 100, 40, 10));
+
+ data.setDatasets(Arrays.asList(dataset)).setLabels(TextLabel.of("Red", "Orange", "Yellow", "Green", "Blue"));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setLegend(new Legend()
+ .setDisplay(true))
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("HTML Tooltip - Pie"))
+ .setTooltips(new Tooltips()
+ .setEnabled(false)
+// .setCustom(new JavaScriptReference("customTooltips"))
+ );
+ setOptions(options);
+ }
+
+ @Override
+ public void modfiyIndividualMarkup(Fragment optionalMarkup) {
+ Fragment frag = new Fragment("optionalMarkup","pieTooltip",optionalMarkup.getParent());
+ optionalMarkup.replaceWith(frag);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPointsConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPointsConfiguration.java
new file mode 100644
index 00000000..247c5dbd
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPointsConfiguration.java
@@ -0,0 +1,69 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import org.apache.wicket.markup.html.panel.Fragment;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+/**
+ * Sample that enables the use of custom html markup for tooltip points.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/custom-points.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipHtmlPointsConfiguration extends ShowcaseConfiguration {
+ public TooltipHtmlPointsConfiguration() {
+ setType(ChartType.LINE);
+
+ String optionalJavascript=readFile("de/adesso/wickedcharts/showcase/customTooltip-Point.js");
+
+ setOptionalJavascript(new ArrayList());
+ addOptionalJavascript(optionalJavascript);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setPointBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setPointBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("HTML Tooltip - Points"))
+ .setTooltips(new Tooltips()
+ .setEnabled(false)
+ .setIntersect(false)
+ .setMode(TooltipMode.INDEX)
+ .setCustom(new JavaScriptReference("customTooltips"))
+ );
+ setOptions(options);
+ }
+
+ @Override
+ public void modfiyIndividualMarkup(Fragment optionalMarkup) {
+ Fragment frag = new Fragment("optionalMarkup","pointTooltip",optionalMarkup.getParent());
+ optionalMarkup.replaceWith(frag);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipNearestConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipNearestConfiguration.java
new file mode 100644
index 00000000..81ef4a14
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipNearestConfiguration.java
@@ -0,0 +1,69 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+
+/**
+ * Sample that enables tooltips to be at the nearest possible position to the data points.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/positioning.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipNearestConfiguration extends ShowcaseConfiguration {
+ public TooltipNearestConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Tooltip Nearest Position"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setPosition(TooltipPosition.NEAREST)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/base/ShowcaseConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/base/ShowcaseConfiguration.java
new file mode 100644
index 00000000..4cc80e54
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/base/ShowcaseConfiguration.java
@@ -0,0 +1,59 @@
+package de.adesso.wickedcharts.showcase.configurations.base;
+
+
+import de.adesso.wickedcharts.chartjs.ChartConfiguration;
+import org.apache.wicket.markup.html.panel.Fragment;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+import java.util.Scanner;
+
+/**
+ * The base class for all chart configurations for the showcase
+ */
+@SuppressWarnings("serial")
+public abstract class ShowcaseConfiguration extends ChartConfiguration implements Serializable {
+
+ protected List randomIntegerList(int size) {
+ List dataList = new ArrayList();
+ Random rng = new Random();
+ for (int i = 0; i < size; i++) {
+ dataList.add(rng.nextInt(60) + 1);
+ }
+ return dataList;
+ }
+
+ protected String readFile(String fileName) {
+
+ StringBuilder result = new StringBuilder("");
+
+ // Get file from resources folder
+ ClassLoader classLoader = getClass().getClassLoader();
+ File file = new File(classLoader.getResource(fileName).getFile());
+
+ try (Scanner scanner = new Scanner(file)) {
+
+ while (scanner.hasNextLine()) {
+ String line = scanner.nextLine();
+ result.append(line).append("\n");
+ }
+
+ scanner.close();
+
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ return result.toString();
+
+ }
+
+ public void modfiyIndividualMarkup(Fragment optionalMarkup) {
+ Fragment frag = new Fragment("optionalMarkup","defaultTooltip",optionalMarkup.getParent());
+ optionalMarkup.replaceWith(frag);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLineStylesConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLineStylesConfiguration.java
new file mode 100644
index 00000000..c54b2548
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLineStylesConfiguration.java
@@ -0,0 +1,74 @@
+package de.adesso.wickedcharts.showcase.configurations.gridlines;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.StringValueColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+
+/**
+ *
+ * Chart configuration for different grid line styles.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/gridlines-style.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class GridLineStylesConfiguration extends ShowcaseConfiguration {
+ public GridLineStylesConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(Arrays.asList(10, 30, 39, 20, 25, 34, -10)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(Arrays.asList(18, 33, 22, 19, 11, 39, 30)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Gridlines - Styles"))
+ .setScales(new Scales()
+ .setYAxes(new AxesScale()
+ .setGridLines(new GridLines()
+ .setDrawBorder(true)
+ .setColor(Arrays.asList(
+ new StringValueColor("pink"),
+ new StringValueColor("red"),
+ new StringValueColor("orange"),
+ new StringValueColor("yellow"),
+ new StringValueColor("green"),
+ new StringValueColor("blue"),
+ new StringValueColor("indigo"),
+ new StringValueColor("purple"))))
+ .setTicks(new Ticks()
+ .setMin(0)
+ .setMax(100)
+ .setStepSize(10))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesBasicConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesBasicConfiguration.java
new file mode 100644
index 00000000..ea0a665c
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesBasicConfiguration.java
@@ -0,0 +1,69 @@
+package de.adesso.wickedcharts.showcase.configurations.gridlines;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * Chart configuration for the basic grid line layout.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/gridlines-display.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class GridLinesBasicConfiguration extends ShowcaseConfiguration {
+
+ protected GridLines gridLines;
+
+ public GridLinesBasicConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(10, 30, 39, 20, 25, 34, -10))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(Arrays.asList(18, 33, 22, 19, 11, 39, 30)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ gridLines = new GridLines()
+ .setDisplay(true);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Gridlines - Basic"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setGridLines(gridLines))
+ .setYAxes(new AxesScale()
+ .setGridLines(gridLines)
+ .setTicks(new Ticks()
+ .setMin(0)
+ .setMax(100)
+ .setStepSize(10))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesChartAreaConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesChartAreaConfiguration.java
new file mode 100644
index 00000000..b45bc4c9
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesChartAreaConfiguration.java
@@ -0,0 +1,27 @@
+package de.adesso.wickedcharts.showcase.configurations.gridlines;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+
+/**
+ *
+ * Chart configuration for the area chart grid line layout.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/gridlines-display.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class GridLinesChartAreaConfiguration extends GridLinesBasicConfiguration {
+
+ public GridLinesChartAreaConfiguration() {
+ super();
+
+ gridLines.setDisplay(true)
+ .setDrawBorder(true)
+ .setDrawOnChartArea(false);
+ getOptions().setTitle(new Title()
+ .setDisplay(true)
+ .setText("Gridlines - Chart Area"));
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseConfiguration.java
new file mode 100644
index 00000000..171a41fe
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseConfiguration.java
@@ -0,0 +1,25 @@
+package de.adesso.wickedcharts.showcase.configurations.gridlines;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+
+/**
+ *
+ * Chart configuration in order to not display grid lines.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/gridlines-display.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class GridLinesDisplayFalseConfiguration extends GridLinesBasicConfiguration {
+
+ public GridLinesDisplayFalseConfiguration() {
+ super();
+
+ gridLines.setDisplay(false);
+ getOptions().setTitle(new Title()
+ .setDisplay(true)
+ .setText("Gridlines - Display False"));
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseNoBorderConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseNoBorderConfiguration.java
new file mode 100644
index 00000000..2893b59a
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseNoBorderConfiguration.java
@@ -0,0 +1,25 @@
+package de.adesso.wickedcharts.showcase.configurations.gridlines;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+
+/**
+ *
+ * Chart configuration in order to not display grid lines and axes.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/gridlines-display.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class GridLinesDisplayFalseNoBorderConfiguration extends GridLinesBasicConfiguration {
+
+ public GridLinesDisplayFalseNoBorderConfiguration() {
+ super();
+
+ gridLines.setDisplay(false)
+ .setDrawBorder(false);
+ getOptions().setTitle(new Title()
+ .setDisplay(true)
+ .setText("Gridlines - Display False No Border"));
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesTicksConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesTicksConfiguration.java
new file mode 100644
index 00000000..9c05bfd8
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesTicksConfiguration.java
@@ -0,0 +1,28 @@
+package de.adesso.wickedcharts.showcase.configurations.gridlines;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+
+/**
+ *
+ * Chart configuration in order to not display the ticks.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/gridlines-display.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class GridLinesTicksConfiguration extends GridLinesBasicConfiguration {
+
+ public GridLinesTicksConfiguration() {
+ super();
+
+ gridLines.setDisplay(true)
+ .setDrawBorder(true)
+ .setDrawOnChartArea(true)
+ .setDrawTicks(false);
+ getOptions().setTitle(new Title()
+ .setDisplay(true)
+ .setText("Gridlines - Ticks"));
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectFalseConfiguration.java
new file mode 100644
index 00000000..b44975d6
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectFalseConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * If intersect false the nearest item is used to determine the index.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class DatasetIntersectFalseConfiguration extends ShowcaseConfiguration {
+ public DatasetIntersectFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Dataset, intersect: false"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.DATASET)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectTrueConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectTrueConfiguration.java
new file mode 100644
index 00000000..e6fd9d62
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectTrueConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * If the intersect setting is true, the first intersecting item is used to determine the index in the data.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class DatasetIntersectTrueConfiguration extends ShowcaseConfiguration {
+ public DatasetIntersectTrueConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Dataset, intersect: true"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.DATASET)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectFalseConfiguration.java
new file mode 100644
index 00000000..7e4409cc
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectFalseConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * If intersect false the nearest item, in the x direction, is used to determine the index.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class IndexIntersectFalseConfiguration extends ShowcaseConfiguration {
+ public IndexIntersectFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Index, intersect: false"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectTrueConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectTrueConfiguration.java
new file mode 100644
index 00000000..866e97d7
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectTrueConfiguration.java
@@ -0,0 +1,68 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * If the intersect setting is true, the first intersecting item is used to determine the index in the data.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class IndexIntersectTrueConfiguration extends ShowcaseConfiguration {
+ public IndexIntersectTrueConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Index, intersect: true"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectFalseConfiguration.java
new file mode 100644
index 00000000..34c6fb77
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectFalseConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * If intersect is false, this is not triggered when the mouse position intersects an item in the graph.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class NearestIntersectFalseConfiguration extends ShowcaseConfiguration {
+ public NearestIntersectFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Nearest, intersect: false"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.NEAREST)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectTrueConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectTrueConfiguration.java
new file mode 100644
index 00000000..cc445895
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectTrueConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * If intersect is true, this is only triggered when the mouse position intersects an item in the graph.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class NearestIntersectTrueConfiguration extends ShowcaseConfiguration {
+ public NearestIntersectTrueConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Nearest, intersect: true"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectFalseConfiguration.java
new file mode 100644
index 00000000..91cec1ba
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectFalseConfiguration.java
@@ -0,0 +1,68 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Finds no items that intersect the point.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class PointIntersectFalseConfiguration extends ShowcaseConfiguration {
+ public PointIntersectFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Point, intersect: false"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.POINT)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectTrueConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectTrueConfiguration.java
new file mode 100644
index 00000000..885b4b12
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectTrueConfiguration.java
@@ -0,0 +1,68 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Finds all of the items that intersect the point.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class PointIntersectTrueConfiguration extends ShowcaseConfiguration {
+ public PointIntersectTrueConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Point, intersect: true"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.POINT)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectFalseConfiguration.java
new file mode 100644
index 00000000..58113ff7
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectFalseConfiguration.java
@@ -0,0 +1,68 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Does not return all items that would intersect based on the X coordinate of the position only.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class xIntersectFalseConfiguration extends ShowcaseConfiguration {
+ public xIntersectFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: x, intersect: false"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.X)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectTrueConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectTrueConfiguration.java
new file mode 100644
index 00000000..f4f97476
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectTrueConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Returns all items that would intersect based on the X coordinate of the position only.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class xIntersectTrueConfiguration extends ShowcaseConfiguration {
+ public xIntersectTrueConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: x, intersect: true"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.X)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectFalseConfiguration.java
new file mode 100644
index 00000000..f48e7a2e
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectFalseConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Does not return all items that would intersect based on the Y coordinate of the position.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class yIntersectFalseConfiguration extends ShowcaseConfiguration {
+ public yIntersectFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: y, intersect: false"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.Y)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectTrueConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectTrueConfiguration.java
new file mode 100644
index 00000000..16512e31
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectTrueConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Returns all items that would intersect based on the Y coordinate of the position.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class yIntersectTrueConfiguration extends ShowcaseConfiguration {
+ public yIntersectTrueConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: y, intersect: true"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.Y)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionBottomConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionBottomConfiguration.java
new file mode 100644
index 00000000..bc02dee4
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionBottomConfiguration.java
@@ -0,0 +1,27 @@
+
+package de.adesso.wickedcharts.showcase.configurations.legendposition;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
+import de.adesso.wickedcharts.chartjs.chartoptions.Position;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+
+/**
+ * Shows how to configure a chart with the legend position at the bottom
+ * @see http://www.chartjs.org/samples/latest/legend/positioning.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LegendPositionBottomConfiguration extends LegendPositionChartBasicConfiguration {
+
+ public LegendPositionBottomConfiguration() {
+ super();
+
+ getData().getDatasets().get(0).setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN);
+
+ getOptions().setLegend(new Legend().setPosition(Position.BOTTOM));
+
+ getOptions().getTitle().setText("Legend Position: Bottom");
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionChartBasicConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionChartBasicConfiguration.java
new file mode 100644
index 00000000..1a8aecd5
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionChartBasicConfiguration.java
@@ -0,0 +1,55 @@
+
+package de.adesso.wickedcharts.showcase.configurations.legendposition;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Base class for the other configurations for the legend position
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LegendPositionChartBasicConfiguration extends ShowcaseConfiguration {
+ public LegendPositionChartBasicConfiguration() {
+ super();
+
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setBorderWidth(1);
+
+ data.setDatasets(Arrays.asList(dataset1));
+ setData(data);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value")))
+ )
+ .setTitle(new Title()
+ .setDisplay(true))
+ ;
+ setOptions(options);
+
+ }
+}
+
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionLeftConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionLeftConfiguration.java
new file mode 100644
index 00000000..910e34f8
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionLeftConfiguration.java
@@ -0,0 +1,28 @@
+
+package de.adesso.wickedcharts.showcase.configurations.legendposition;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
+import de.adesso.wickedcharts.chartjs.chartoptions.Position;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+
+/**
+ * Shows how to configure a chart with the legend position on the left
+ *
+ * @see http://www.chartjs.org/samples/latest/legend/positioning.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LegendPositionLeftConfiguration extends LegendPositionChartBasicConfiguration {
+
+ public LegendPositionLeftConfiguration() {
+ super();
+
+ getData().getDatasets().get(0).setBackgroundColor(SimpleColor.YELLOW_TRANSPARENT)
+ .setBorderColor(SimpleColor.YELLOW);
+
+ getOptions().setLegend(new Legend().setPosition(Position.LEFT));
+
+ getOptions().getTitle().setText("Legend Position: Left");
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionRightConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionRightConfiguration.java
new file mode 100644
index 00000000..38dcecc9
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionRightConfiguration.java
@@ -0,0 +1,29 @@
+
+package de.adesso.wickedcharts.showcase.configurations.legendposition;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
+import de.adesso.wickedcharts.chartjs.chartoptions.Position;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+
+/**
+ * Shows how to configure a chart with the legend position on the right
+ *
+ * @see http://www.chartjs.org/samples/latest/legend/positioning.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LegendPositionRightConfiguration extends LegendPositionChartBasicConfiguration {
+
+ public LegendPositionRightConfiguration() {
+ super();
+
+ getData().getDatasets().get(0).setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE);
+
+ getOptions().setLegend(new Legend().setPosition(Position.RIGHT));
+
+ getOptions().getTitle().setText("Legend Position: Right");
+ }
+}
+
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionTopConfiguration.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionTopConfiguration.java
new file mode 100644
index 00000000..711c225c
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionTopConfiguration.java
@@ -0,0 +1,29 @@
+
+package de.adesso.wickedcharts.showcase.configurations.legendposition;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
+import de.adesso.wickedcharts.chartjs.chartoptions.Position;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+
+/**
+ * Shows how to configure a chart with the legend position at the top
+ *
+ * @see http://www.chartjs.org/samples/latest/legend/positioning.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LegendPositionTopConfiguration extends LegendPositionChartBasicConfiguration {
+
+ public LegendPositionTopConfiguration() {
+ super();
+
+ getData().getDatasets().get(0).setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED);
+
+ getOptions().setLegend(new Legend().setPosition(Position.TOP));
+
+ getOptions().getTitle().setText("Legend Position: Top");
+ }
+}
+
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/ie/SimplePage.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/ie/SimplePage.java
index 24cd3303..549b8f05 100644
--- a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/ie/SimplePage.java
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/ie/SimplePage.java
@@ -1,62 +1,19 @@
package de.adesso.wickedcharts.showcase.ie;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
+import de.adesso.wickedcharts.highcharts.options.Options;
+import de.adesso.wickedcharts.showcase.options.*;
+import de.adesso.wickedcharts.showcase.options.base.ShowcaseOptions;
+import de.adesso.wickedcharts.wicket6.highcharts.Chart;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.form.ChoiceRenderer;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.markup.html.form.IChoiceRenderer;
import org.apache.wicket.model.PropertyModel;
-import de.adesso.wickedcharts.wicket6.highcharts.Chart;
-
-import de.adesso.wickedcharts.highcharts.options.Options;
-import de.adesso.wickedcharts.showcase.options.AngularGaugeOptions;
-import de.adesso.wickedcharts.showcase.options.AreaInvertedAxisOptions;
-import de.adesso.wickedcharts.showcase.options.AreaMissingOptions;
-import de.adesso.wickedcharts.showcase.options.AreaRangeOptions;
-import de.adesso.wickedcharts.showcase.options.AreaSplineOptions;
-import de.adesso.wickedcharts.showcase.options.AreaWithNegativeValuesOptions;
-import de.adesso.wickedcharts.showcase.options.BarWithNegativeStackOptions;
-import de.adesso.wickedcharts.showcase.options.BasicAreaOptions;
-import de.adesso.wickedcharts.showcase.options.BasicBarOptions;
-import de.adesso.wickedcharts.showcase.options.BasicColumnOptions;
-import de.adesso.wickedcharts.showcase.options.BasicLineOptions;
-import de.adesso.wickedcharts.showcase.options.BasicPieOptions;
-import de.adesso.wickedcharts.showcase.options.BubbleChartOptions;
-import de.adesso.wickedcharts.showcase.options.ClickToAddAPointOptions;
-import de.adesso.wickedcharts.showcase.options.ColumnRangeOptions;
-import de.adesso.wickedcharts.showcase.options.ColumnWithDrilldownOptions;
-import de.adesso.wickedcharts.showcase.options.ColumnWithNegativeValuesOptions;
-import de.adesso.wickedcharts.showcase.options.ColumnWithRotatedLabelsOptions;
-import de.adesso.wickedcharts.showcase.options.ComboOptions;
-import de.adesso.wickedcharts.showcase.options.DonutOptions;
-import de.adesso.wickedcharts.showcase.options.LineWithDataLabelsOptions;
-import de.adesso.wickedcharts.showcase.options.LogarithmicAxisOptions;
-import de.adesso.wickedcharts.showcase.options.PercentageAreaOptions;
-import de.adesso.wickedcharts.showcase.options.PieWithGradientOptions;
-import de.adesso.wickedcharts.showcase.options.PieWithLegendOptions;
-import de.adesso.wickedcharts.showcase.options.PolarOptions;
-import de.adesso.wickedcharts.showcase.options.ScatterPlotOptions;
-import de.adesso.wickedcharts.showcase.options.ScatterWithRegressionLineOptions;
-import de.adesso.wickedcharts.showcase.options.SpiderwebOptions;
-import de.adesso.wickedcharts.showcase.options.SplineWithInvertedAxisOptions;
-import de.adesso.wickedcharts.showcase.options.SplineWithPlotBandsOptions;
-import de.adesso.wickedcharts.showcase.options.SplineWithSymbolsOptions;
-import de.adesso.wickedcharts.showcase.options.StackedAndGroupedColumnOptions;
-import de.adesso.wickedcharts.showcase.options.StackedAreaOptions;
-import de.adesso.wickedcharts.showcase.options.StackedBarOptions;
-import de.adesso.wickedcharts.showcase.options.StackedColumnOptions;
-import de.adesso.wickedcharts.showcase.options.StackedPercentageOptions;
-import de.adesso.wickedcharts.showcase.options.TimeDataWithIrregularIntervalsOptions;
-import de.adesso.wickedcharts.showcase.options.WicketSplineUpdatingOptions;
-import de.adesso.wickedcharts.showcase.options.WindroseOptions;
-import de.adesso.wickedcharts.showcase.options.ZoomableTimeSeriesOptions;
-import de.adesso.wickedcharts.showcase.options.base.ShowcaseOptions;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
/**
* This page has been build to show all Options in a basic design without jquery
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/ChartjsShowcaseLink.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/ChartjsShowcaseLink.java
new file mode 100644
index 00000000..ff646dc3
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/ChartjsShowcaseLink.java
@@ -0,0 +1,15 @@
+package de.adesso.wickedcharts.showcase.links;
+
+import de.adesso.wickedcharts.showcase.HomepageChartJs;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+
+/**
+ * Adds a link to the Chart.js showcase in the main page
+ */
+@SuppressWarnings("serial")
+public class ChartjsShowcaseLink extends BookmarkablePageLink {
+
+ public ChartjsShowcaseLink() {
+ super("chartJsShowcaseLink", HomepageChartJs.class);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/HighchartsShowcaseLink.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/HighchartsShowcaseLink.java
new file mode 100644
index 00000000..9965b20a
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/HighchartsShowcaseLink.java
@@ -0,0 +1,17 @@
+
+package de.adesso.wickedcharts.showcase.links;
+
+import de.adesso.wickedcharts.showcase.HomepageHighcharts;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+
+/**
+ * Adds a link to the Highcharts showcase in the main page
+ */
+@SuppressWarnings("serial")
+public class HighchartsShowcaseLink extends BookmarkablePageLink {
+
+ public HighchartsShowcaseLink() {
+ super("highchartShowcaseLink", HomepageHighcharts.class);
+ }
+}
+
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java
deleted file mode 100644
index ba128b49..00000000
--- a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
- *
- * 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 de.adesso.wickedcharts.showcase.links;
-
-import org.apache.wicket.markup.html.basic.Label;
-
-import de.adesso.wickedcharts.wicket6.highcharts.Chart;
-
-import de.adesso.wickedcharts.highcharts.options.Options;
-import de.adesso.wickedcharts.showcase.options.WicketSplineUpdatingOptions;
-
-public class SplineUpdatingChartLink extends UpdateChartLink {
-
- public SplineUpdatingChartLink(String id, Chart chart, Label codeContainer,
- Options options) {
- super(id, chart, codeContainer, options);
- }
-
- private static final long serialVersionUID = 1L;
-
- /**
- * Always return a fresh {@link Options} object, so that the date ticks are
- * current.
- */
- @Override
- public Options getOptions() {
- return new WicketSplineUpdatingOptions();
- }
-
-}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartJsLink.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartJsLink.java
new file mode 100644
index 00000000..e3413d75
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartJsLink.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
+ *
+ * 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 de.adesso.wickedcharts.showcase.links;
+
+import de.adesso.wickedcharts.showcase.HomepageChartJs;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+
+/**
+ * Adds a link to a chart in the showcase navigation sidebar.
+ * Clicking on the link calls the onClick() method, which sets page
+ * parameters accordingly.
+ */
+public class UpdateChartJsLink extends Link {
+
+ private static final long serialVersionUID = 1L;
+
+ private final String chartVal;
+
+ /**
+ * Constructs a new Link.
+ *
+ * @param id the wicket id of the link
+ * @param val the name of the chart the link points to
+ */
+ public UpdateChartJsLink(final String id, final String val) {
+ super(id);
+ this.chartVal = val;
+ }
+
+ @Override
+ public void onClick() {
+ PageParameters params = new PageParameters();
+ params.add("chart", chartVal);
+ setResponsePage(HomepageChartJs.class, params);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartLink.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartLink.java
deleted file mode 100644
index 1900e0ba..00000000
--- a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartLink.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
- *
- * 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 de.adesso.wickedcharts.showcase.links;
-
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.markup.html.AjaxLink;
-import org.apache.wicket.markup.html.basic.Label;
-
-import de.adesso.wickedcharts.wicket6.highcharts.Chart;
-
-import de.adesso.wickedcharts.highcharts.options.Options;
-import de.adesso.wickedcharts.showcase.ShowcaseSession;
-import de.adesso.wickedcharts.showcase.StringFromResourceModel;
-
-public class UpdateChartLink extends AjaxLink {
-
- private static final long serialVersionUID = 1L;
-
- private final Chart chart;
-
- private final Options options;
-
- private final Label codeContainer;
-
- /**
- * Constructs a new Link.
- *
- * @param id
- * the wicket id of the link
- * @param chart
- * the container containing the chart
- * @param codeContainer
- * the container containing the code display of the chart's options
- * @param options
- * the options of the chart.
- */
- public UpdateChartLink(final String id, final Chart chart,
- final Label codeContainer, final Options options) {
- super(id);
- this.chart = chart;
- this.codeContainer = codeContainer;
- this.options = options;
- }
-
- public Chart getChartContainer() {
- return this.chart;
- }
-
- public Label getCodeContainer() {
- return this.codeContainer;
- }
-
- public Options getOptions() {
- return this.options;
- }
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- this.chart
- .setOptions(this.getOptions());
- ((ShowcaseSession) getSession())
- .setCurrentChartOptions(this.options);
- this.codeContainer
- .setDefaultModel(new StringFromResourceModel(this.options
- .getClass(), this.options
- .getClass()
- .getSimpleName() + ".java"));
- target
- .add(this.chart);
- target
- .add(this.codeContainer);
-
- // make syntaxhighlighter highlight the changed code
- target
- .appendJavaScript("SyntaxHighlighter.highlight();");
- }
-
-}
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateHighchartLink.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateHighchartLink.java
new file mode 100644
index 00000000..cf9d82c9
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateHighchartLink.java
@@ -0,0 +1,54 @@
+/**
+ * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
+ *
+ * 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 de.adesso.wickedcharts.showcase.links;
+
+import de.adesso.wickedcharts.showcase.HomepageHighcharts;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+
+/**
+ * Adds a link to a chart in the showcase navigation sidebar.
+ * Clicking on the link calls the onClick() method, which sets page
+ * parameters accordingly.
+ */
+public class UpdateHighchartLink extends Link {
+
+ private static final long serialVersionUID = 1L;
+
+ private String chartVal;
+ private String themeVal;
+
+ /**
+ * Constructs a new Link.
+ *
+ * @param id the wicket id of the link
+ * @param themeVal the name of the theme that will be used
+ */
+ public UpdateHighchartLink(final String id, String themeVal) {
+ super(id);
+ this.chartVal = id;
+ this.themeVal = themeVal;
+ }
+
+
+ @Override
+ public void onClick() {
+ PageParameters params = new PageParameters();
+ params.add("theme", themeVal);
+ params.add("chart", chartVal);
+ setResponsePage(HomepageHighcharts.class, params);
+ }
+
+}
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateThemeLink.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateThemeLink.java
new file mode 100644
index 00000000..b86794c8
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateThemeLink.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
+ *
+ * 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 de.adesso.wickedcharts.showcase.links;
+
+import de.adesso.wickedcharts.showcase.HomepageHighcharts;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+
+/**
+ * Adds a link to a theme in the Highcharts showcase.
+ * Clicking on the link calls the onClick() method, which sets page
+ * parameters accordingly.
+ */
+public class UpdateThemeLink extends Link {
+
+ private static final long serialVersionUID = 1L;
+
+ private String chartVal;
+ private String themeVal;
+
+ /**
+ * Constructs a new Link.
+ *
+ * @param id the wicket id of the link
+ * @param chart the name of the chart the link points to
+ */
+ public UpdateThemeLink(final String id, String chart) {
+ super(id);
+ this.chartVal = chart;
+ this.themeVal = id;
+ }
+
+ @Override
+ public void onClick() {
+ PageParameters params = new PageParameters();
+ params.add("theme", themeVal);
+ params.add("chart", chartVal);
+ setResponsePage(HomepageHighcharts.class, params);
+ }
+
+}
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/modalwindow/ChartPanel.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/modalwindow/ChartPanel.java
index d2e8e4f4..7f1a8cbf 100644
--- a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/modalwindow/ChartPanel.java
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/modalwindow/ChartPanel.java
@@ -1,10 +1,8 @@
package de.adesso.wickedcharts.showcase.modalwindow;
-import org.apache.wicket.markup.html.panel.Panel;
-
-import de.adesso.wickedcharts.wicket6.highcharts.Chart;
-
import de.adesso.wickedcharts.showcase.options.BasicBarOptions;
+import de.adesso.wickedcharts.wicket6.highcharts.Chart;
+import org.apache.wicket.markup.html.panel.Panel;
public class ChartPanel extends Panel {
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/options/WicketSplineUpdatingOptions.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/options/WicketSplineUpdatingOptions.java
index 95c22777..7000e619 100644
--- a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/options/WicketSplineUpdatingOptions.java
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/options/WicketSplineUpdatingOptions.java
@@ -14,33 +14,21 @@
*/
package de.adesso.wickedcharts.showcase.options;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.List;
-
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.markup.head.OnDomReadyHeaderItem;
-
-import de.adesso.wickedcharts.wicket6.highcharts.features.livedata.WicketLiveDataUpdateEvent;
-
-import de.adesso.wickedcharts.highcharts.options.Axis;
-import de.adesso.wickedcharts.highcharts.options.AxisType;
-import de.adesso.wickedcharts.highcharts.options.ChartOptions;
-import de.adesso.wickedcharts.highcharts.options.ExportingOptions;
-import de.adesso.wickedcharts.highcharts.options.Function;
-import de.adesso.wickedcharts.highcharts.options.Legend;
-import de.adesso.wickedcharts.highcharts.options.Marker;
-import de.adesso.wickedcharts.highcharts.options.PlotLine;
-import de.adesso.wickedcharts.highcharts.options.SeriesType;
-import de.adesso.wickedcharts.highcharts.options.Title;
-import de.adesso.wickedcharts.highcharts.options.Tooltip;
+import de.adesso.wickedcharts.highcharts.options.*;
import de.adesso.wickedcharts.highcharts.options.color.HexColor;
import de.adesso.wickedcharts.highcharts.options.livedata.JavaScriptParameters;
import de.adesso.wickedcharts.highcharts.options.livedata.LiveDataSeries;
import de.adesso.wickedcharts.highcharts.options.livedata.LiveDataUpdateEvent;
import de.adesso.wickedcharts.highcharts.options.series.Point;
import de.adesso.wickedcharts.showcase.options.base.ShowcaseOptions;
+import de.adesso.wickedcharts.wicket6.highcharts.features.livedata.WicketLiveDataUpdateEvent;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.markup.head.OnDomReadyHeaderItem;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
public class WicketSplineUpdatingOptions extends ShowcaseOptions {
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Pie.js b/showcase/wicked-charts-showcase-wicket6/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Pie.js
new file mode 100644
index 00000000..a54bc7a6
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Pie.js
@@ -0,0 +1,62 @@
+Chart.defaults.global.tooltips.custom = function(tooltip) {
+ // Tooltip Element
+ var tooltipEl = document.getElementById('chartjs-tooltip');
+
+ // Hide if no tooltip
+ if (tooltip.opacity === 0) {
+ tooltipEl.style.opacity = 0;
+ return;
+ }
+
+ // Set caret Position
+ tooltipEl.classList.remove('above', 'below', 'no-transform');
+ if (tooltip.yAlign) {
+ tooltipEl.classList.add(tooltip.yAlign);
+ } else {
+ tooltipEl.classList.add('no-transform');
+ }
+
+ function getBody(bodyItem) {
+ return bodyItem.lines;
+ }
+
+ // Set Text
+ if (tooltip.body) {
+ var titleLines = tooltip.title || [];
+ var bodyLines = tooltip.body.map(getBody);
+
+ var innerHtml = '';
+
+ titleLines.forEach(function(title) {
+ innerHtml += '' + title + ' ';
+ });
+ innerHtml += ' ';
+
+ bodyLines.forEach(function(body, i) {
+ var colors = tooltip.labelColors[i];
+ var style = 'background:' + colors.backgroundColor;
+ style += '; border-color:' + colors.borderColor;
+ style += '; border-width: 2px';
+ var span = ' ';
+ innerHtml += '' + span + body + ' ';
+ });
+ innerHtml += ' ';
+
+ var tableRoot = tooltipEl.querySelector('table');
+ tableRoot.innerHTML = innerHtml;
+ }
+
+ var positionY = this._chart.canvas.offsetTop;
+ var positionX = this._chart.canvas.offsetLeft;
+
+ // Display, position, and set styles for font
+ tooltipEl.style.opacity = 1;
+ tooltipEl.style.left = positionX + tooltip.caretX + 'px';
+ tooltipEl.style.top = positionY + tooltip.caretY + 'px';
+ tooltipEl.style.fontFamily = tooltip._fontFamily;
+ tooltipEl.style.fontSize = tooltip.fontSize;
+ tooltipEl.style.fontStyle = tooltip._fontStyle;
+ tooltipEl.style.padding = tooltip.yPadding + 'px ' + tooltip.xPadding
+ + 'px';
+};
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Point.js b/showcase/wicked-charts-showcase-wicket6/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Point.js
new file mode 100644
index 00000000..da5ed22a
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Point.js
@@ -0,0 +1,28 @@
+var customTooltips = function(tooltip) {
+ $(this._chart.canvas).css("cursor", "pointer");
+
+ var positionY = this._chart.canvas.offsetTop;
+ var positionX = this._chart.canvas.offsetLeft;
+
+ $(".chartjs-tooltip").css({
+ opacity : 0,
+ });
+
+ if (!tooltip || !tooltip.opacity) {
+ return;
+ }
+
+ if (tooltip.dataPoints.length > 0) {
+ tooltip.dataPoints.forEach(function(dataPoint) {
+ var content = [ dataPoint.xLabel, dataPoint.yLabel ].join(": ");
+ var $tooltip = $("#tooltip-" + dataPoint.datasetIndex);
+
+ $tooltip.html(content);
+ $tooltip.css({
+ opacity : 1,
+ top : positionY + dataPoint.y + "px",
+ left : positionX + dataPoint.x + "px",
+ });
+ });
+ }
+};
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip.js b/showcase/wicked-charts-showcase-wicket6/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip.js
new file mode 100644
index 00000000..cb39657a
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip.js
@@ -0,0 +1,71 @@
+Chart.defaults.global.pointHitDetectionRadius = 1;
+
+var customTooltips = function(tooltip) {
+ // Tooltip Element
+ var tooltipEl = document.getElementById('chartjs-tooltip');
+
+ if (!tooltipEl) {
+ tooltipEl = document.createElement('div');
+ tooltipEl.id = 'chartjs-tooltip';
+ tooltipEl.innerHTML = ""
+ this._chart.canvas.parentNode.appendChild(tooltipEl);
+ }
+
+ // Hide if no tooltip
+ if (tooltip.opacity === 0) {
+ tooltipEl.style.opacity = 0;
+ return;
+ }
+
+ // Set caret Position
+ tooltipEl.classList.remove('above', 'below', 'no-transform');
+ if (tooltip.yAlign) {
+ tooltipEl.classList.add(tooltip.yAlign);
+ } else {
+ tooltipEl.classList.add('no-transform');
+ }
+
+ function getBody(bodyItem) {
+ return bodyItem.lines;
+ }
+
+ // Set Text
+ if (tooltip.body) {
+ var titleLines = tooltip.title || [];
+ var bodyLines = tooltip.body.map(getBody);
+
+ var innerHtml = '';
+
+ titleLines.forEach(function(title) {
+ innerHtml += '' + title + ' ';
+ });
+ innerHtml += ' ';
+
+ bodyLines.forEach(function(body, i) {
+ var colors = tooltip.labelColors[i];
+ var style = 'background:' + colors.backgroundColor;
+ style += '; border-color:' + colors.borderColor;
+ style += '; border-width: 2px';
+ var span = ' ';
+ innerHtml += '' + span + body + ' ';
+ });
+ innerHtml += ' ';
+
+ var tableRoot = tooltipEl.querySelector('table');
+ tableRoot.innerHTML = innerHtml;
+ }
+
+ var positionY = this._chart.canvas.offsetTop;
+ var positionX = this._chart.canvas.offsetLeft;
+
+ // Display, position, and set styles for font
+ tooltipEl.style.opacity = 1;
+ tooltipEl.style.left = positionX + tooltip.caretX + 'px';
+ tooltipEl.style.top = positionY + tooltip.caretY + 'px';
+ tooltipEl.style.fontFamily = tooltip._fontFamily;
+ tooltipEl.style.fontSize = tooltip.fontSize;
+ tooltipEl.style.fontStyle = tooltip._fontStyle;
+ tooltipEl.style.padding = tooltip.yPadding + 'px ' + tooltip.xPadding
+ + 'px';
+};
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/resources/de/adesso/wickedcharts/showcase/dataLabellingPlugin.js b/showcase/wicked-charts-showcase-wicket6/src/main/resources/de/adesso/wickedcharts/showcase/dataLabellingPlugin.js
new file mode 100644
index 00000000..7b9e8cb1
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/resources/de/adesso/wickedcharts/showcase/dataLabellingPlugin.js
@@ -0,0 +1,33 @@
+// Define a plugin to provide data labels
+ Chart.plugins.register({
+ afterDatasetsDraw: function(chart, easing) {
+ // To only draw at the end of animation, check for easing === 1
+ var ctx = {0};
+
+ chart.data.datasets.forEach(function (dataset, i) {
+ var meta = chart.getDatasetMeta(i);
+ if (!meta.hidden) {
+ meta.data.forEach(function(element, index) {
+ // Draw the text in black, with the specified font
+ ctx.fillStyle = 'rgb(0, 0, 0)';
+
+ var fontSize = 16;
+ var fontStyle = 'normal';
+ var fontFamily = 'Helvetica Neue';
+ ctx.font = Chart.helpers.fontString(fontSize, fontStyle, fontFamily);
+
+ // Just naively convert to string for now
+ var dataString = dataset.data[index].toString();
+
+ // Make sure alignment settings are correct
+ ctx.textAlign = 'center';
+ ctx.textBaseline = 'middle';
+
+ var padding = 5;
+ var position = element.tooltipPosition();
+ ctx.fillText(dataString, position.x, position.y - (fontSize / 2) - padding);
+ });
+ }
+ });
+ }
+ });
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/resources/de/adesso/wickedcharts/showcase/progressBar.js b/showcase/wicked-charts-showcase-wicket6/src/main/resources/de/adesso/wickedcharts/showcase/progressBar.js
new file mode 100644
index 00000000..d2a238ab
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket6/src/main/resources/de/adesso/wickedcharts/showcase/progressBar.js
@@ -0,0 +1,3 @@
+var progress = document.getElementById('animationProgress');
+
+
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket7/build.gradle b/showcase/wicked-charts-showcase-wicket7/build.gradle
index 032e1041..d326d3c1 100644
--- a/showcase/wicked-charts-showcase-wicket7/build.gradle
+++ b/showcase/wicked-charts-showcase-wicket7/build.gradle
@@ -1,12 +1,11 @@
import org.apache.tools.ant.filters.ReplaceTokens
dependencies {
- compile 'org.apache.wicket:wicket-core:7.1.0'
- compile 'de.adesso.wicked-charts:wicked-charts-wicket7:3.0.0'
+ compile group: 'org.apache.wicket', name: 'wicket-core', version: "${wicket_spring_version}"
compile project(':wicked-charts-showcase-options')
testCompile 'junit:junit:4.12'
compile 'commons-io:commons-io:2.4'
- compile 'org.apache.wicket:wicket-extensions:7.1.0'
+ compile group: 'org.apache.wicket', name: 'wicket-extensions', version: "${wicket_spring_version}"
compile(
[group: 'org.apache.wicket', name: 'wicket-spring', version: "${wicket_spring_version}"],
[group: 'de.adesso.wicked-charts', name: 'wicked-charts-wicket7', version: "${wicketcharts_version}"],
diff --git a/showcase/wicked-charts-showcase-wicket7/gradle.properties b/showcase/wicked-charts-showcase-wicket7/gradle.properties
new file mode 100644
index 00000000..a80749c2
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket7/gradle.properties
@@ -0,0 +1 @@
+wicket_spring_version=7.1.0
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.java
index ecc6fe49..adfe0f46 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.java
@@ -1,12 +1,8 @@
package de.adesso.wickedcharts.showcase;
import de.adesso.wickedcharts.chartjs.ChartConfiguration;
-import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
import de.adesso.wickedcharts.wicket7.chartjs.Chart;
-import org.apache.wicket.Component;
import org.apache.wicket.markup.html.basic.Label;
-import org.apache.wicket.markup.html.internal.Enclosure;
-import org.apache.wicket.markup.html.panel.Fragment;
import org.apache.wicket.markup.html.panel.Panel;
/**
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/Demo.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/Demo.java
index 01cf1948..e39275ee 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/Demo.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/Demo.java
@@ -14,19 +14,11 @@
*/
package de.adesso.wickedcharts.showcase;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.highcharts.options.Axis;
-import de.adesso.wickedcharts.highcharts.options.ChartOptions;
-import de.adesso.wickedcharts.highcharts.options.HorizontalAlignment;
-import de.adesso.wickedcharts.highcharts.options.Legend;
-import de.adesso.wickedcharts.highcharts.options.LegendLayout;
-import de.adesso.wickedcharts.highcharts.options.Options;
-import de.adesso.wickedcharts.highcharts.options.SeriesType;
-import de.adesso.wickedcharts.highcharts.options.Title;
-import de.adesso.wickedcharts.highcharts.options.VerticalAlignment;
+import de.adesso.wickedcharts.highcharts.options.*;
import de.adesso.wickedcharts.highcharts.options.series.SimpleSeries;
+import java.util.Arrays;
+
/**
* This code is simply to display it on the front page of
* http://code.google.com/p/wicked-charts/.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.html b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.html
index b1340860..433facb5 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.html
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.html
@@ -230,7 +230,7 @@ Markup:
<!-- HTML code -->
<div>
- <canvas wicket:id="chart"</canvas>
+ <canvas wicket:id="chart"></canvas>
</div>
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.java
index f5df124f..d53953d1 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.java
@@ -15,26 +15,26 @@
*/
-import java.awt.*;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
+import de.adesso.wickedcharts.showcase.configurations.*;
import de.adesso.wickedcharts.showcase.configurations.gridlines.*;
import de.adesso.wickedcharts.showcase.configurations.interactions.*;
-import de.adesso.wickedcharts.showcase.links.UpdateThemeLink;
+import de.adesso.wickedcharts.showcase.configurations.legendposition.LegendPositionBottomConfiguration;
+import de.adesso.wickedcharts.showcase.configurations.legendposition.LegendPositionLeftConfiguration;
+import de.adesso.wickedcharts.showcase.configurations.legendposition.LegendPositionRightConfiguration;
+import de.adesso.wickedcharts.showcase.configurations.legendposition.LegendPositionTopConfiguration;
+import de.adesso.wickedcharts.showcase.links.ChartjsShowcaseLink;
+import de.adesso.wickedcharts.showcase.links.HighchartsShowcaseLink;
+import de.adesso.wickedcharts.showcase.links.UpdateChartJsLink;
+import de.adesso.wickedcharts.wicket7.chartjs.Chart;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
-import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.request.mapper.parameter.INamedParameters;
import org.apache.wicket.request.mapper.parameter.PageParameters;
-import de.adesso.wickedcharts.wicket7.chartjs.Chart;
-import de.adesso.wickedcharts.showcase.configurations.*;
-import de.adesso.wickedcharts.showcase.configurations.legendposition.*;
-import de.adesso.wickedcharts.showcase.links.ChartjsShowcaseLink;
-import de.adesso.wickedcharts.showcase.links.HighchartsShowcaseLink;
-import de.adesso.wickedcharts.showcase.links.UpdateChartJsLink;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
/**
* This page takes care of the Chart.js showcase logic.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.html b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.html
index 0cc9a20b..ce881247 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.html
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.html
@@ -188,7 +188,7 @@ Wicked Charts
Skies
Gray
Dark Blue
- Dark Green
+ Dark Green
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.java
index 1b0553c4..0b1b3e33 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.java
@@ -14,21 +14,19 @@
*/
package de.adesso.wickedcharts.showcase;
-import de.adesso.wickedcharts.highcharts.options.ChartOptions;
-import de.adesso.wickedcharts.highcharts.options.Options;
import de.adesso.wickedcharts.highcharts.theme.*;
-import de.adesso.wickedcharts.showcase.links.*;
-import de.adesso.wickedcharts.wicket7.highcharts.Chart;
-
+import de.adesso.wickedcharts.showcase.links.ChartjsShowcaseLink;
+import de.adesso.wickedcharts.showcase.links.HighchartsShowcaseLink;
+import de.adesso.wickedcharts.showcase.links.UpdateHighchartLink;
+import de.adesso.wickedcharts.showcase.links.UpdateThemeLink;
import de.adesso.wickedcharts.showcase.options.*;
-
+import de.adesso.wickedcharts.wicket7.highcharts.Chart;
import org.apache.wicket.markup.head.IHeaderResponse;
import org.apache.wicket.markup.head.OnDomReadyHeaderItem;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.request.mapper.parameter.INamedParameters;
import org.apache.wicket.request.mapper.parameter.PageParameters;
-import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
@@ -70,7 +68,6 @@ private void addThemeLinks(PageParameters parameters){
add(new UpdateThemeLink("skies", "chart"));
add(new UpdateThemeLink("gray", "chart"));
add(new UpdateThemeLink("darkblue", "chart"));
- add(new UpdateThemeLink("darkgreen", "chart"));
} else {
String chartString = parameters.getAllNamed().get(1).getValue();
add(new UpdateThemeLink("defaultTheme", chartString));
@@ -78,7 +75,6 @@ private void addThemeLinks(PageParameters parameters){
add(new UpdateThemeLink("skies", chartString));
add(new UpdateThemeLink("gray", chartString));
add(new UpdateThemeLink("darkblue", chartString));
- add(new UpdateThemeLink("darkgreen", chartString));
}
}
@@ -89,7 +85,6 @@ private void addThemeLinks(PageParameters parameters){
*/
private String getThemeString(PageParameters parameters){
String themeString = "default";
- List pairs = parameters.getAllNamed();
if (parameters.getAllNamed().size() < 2) {
return themeString;
} else {
@@ -181,10 +176,7 @@ private void addCodeContainer(Chart chart) {
private Chart getChartFromParams(final PageParameters params) {
String chartString;
String themeString;
- List config = new ArrayList<>();
-
- //Get the parameters of the page
- List pairs = params.getAllNamed();
+ Chart config;
//If the showcase is started without any parameters
//set the parameters to lineBasic and give us a line Chart
@@ -193,8 +185,8 @@ private Chart getChartFromParams(final PageParameters params) {
temp.add("theme", "default");
temp.add("chart", "line");
setResponsePage(HomepageHighcharts.class, temp);
- config.add(new Chart("chart", new BasicLineOptions(), null));
- return config.get(0);
+ config = new Chart("chart", new BasicLineOptions(), null);
+ return config;
}
themeString = params.getAllNamed().get(0).getValue();
@@ -202,216 +194,216 @@ private Chart getChartFromParams(final PageParameters params) {
chartString = params.getAllNamed().get(1).getValue();
if(chartString == null) {
- config.add(new Chart("chart", new BasicLineOptions(), theme));
- return config.get(0);
+ config = new Chart("chart", new BasicLineOptions(), theme);
+ return config;
}
switch(chartString) {
case "basicBar":
- config.add(new Chart("chart", new BasicBarOptions(), theme));
+ config = new Chart("chart", new BasicBarOptions(), theme);
break;
case "splineWithSymbols":
- config.add(new Chart("chart", new SplineWithSymbolsOptions(), theme));
+ config = new Chart("chart", new SplineWithSymbolsOptions(), theme);
break;
case "irregularIntervals":
- config.add(new Chart("chart", new TimeDataWithIrregularIntervalsOptions(), theme));
+ config = new Chart("chart", new TimeDataWithIrregularIntervalsOptions(), theme);
break;
case "logarithmicAxis":
- config.add(new Chart("chart", new LogarithmicAxisOptions(), theme));
+ config = new Chart("chart", new LogarithmicAxisOptions(), theme);
break;
case "scatter":
- config.add(new Chart("chart", new ScatterPlotOptions(), theme));
+ config = new Chart("chart", new ScatterPlotOptions(), theme);
break;
case "area":
- config.add(new Chart("chart", new BasicAreaOptions(), theme));
+ config = new Chart("chart", new BasicAreaOptions(), theme);
break;
case "areaWithNegativeValues":
- config.add(new Chart("chart", new AreaWithNegativeValuesOptions(), theme));
+ config = new Chart("chart", new AreaWithNegativeValuesOptions(), theme);
break;
case "stackedAndGroupedColumn":
- config.add(new Chart("chart", new StackedAndGroupedColumnOptions(), theme));
+ config = new Chart("chart", new StackedAndGroupedColumnOptions(), theme);
break;
case "combo":
- config.add(new Chart("chart", new ComboOptions(), theme));
+ config = new Chart("chart", new ComboOptions(), theme);
break;
case "donut":
- config.add(new Chart("chart", new DonutOptions(), theme));
+ config = new Chart("chart", new DonutOptions(), theme);
break;
case "withDataLabels":
- config.add(new Chart("chart", new LineWithDataLabelsOptions(), theme));
+ config = new Chart("chart", new LineWithDataLabelsOptions(), theme);
break;
case "zoomableTimeSeries":
- config.add(new Chart("chart", new ZoomableTimeSeriesOptions(), theme));
+ config = new Chart("chart", new ZoomableTimeSeriesOptions(), theme);
break;
case "splineInverted":
- config.add(new Chart("chart", new SplineWithInvertedAxisOptions(), theme));
+ config = new Chart("chart", new SplineWithInvertedAxisOptions(), theme);
break;
case "splineWithPlotBands":
- config.add(new Chart("chart", new SplineWithPlotBandsOptions(), theme));
+ config = new Chart("chart", new SplineWithPlotBandsOptions(), theme);
break;
case "polar":
- config.add(new Chart("chart", new PolarOptions(), theme));
+ config = new Chart("chart", new PolarOptions(), theme);
break;
case "stackedArea":
- config.add(new Chart("chart", new StackedAreaOptions(), theme));
+ config = new Chart("chart", new StackedAreaOptions(), theme);
break;
case "percentageArea":
- config.add(new Chart("chart", new PercentageAreaOptions(), theme));
+ config = new Chart("chart", new PercentageAreaOptions(), theme);
break;
case "areaMissing":
- config.add(new Chart("chart", new AreaMissingOptions(), theme));
+ config = new Chart("chart", new AreaMissingOptions(), theme);
break;
case "areaInverted":
- config.add(new Chart("chart", new AreaInvertedAxisOptions(), theme));
+ config = new Chart("chart", new AreaInvertedAxisOptions(), theme);
break;
case "areaSpline":
- config.add(new Chart("chart", new AreaSplineOptions(), theme));
+ config = new Chart("chart", new AreaSplineOptions(), theme);
break;
case "areaSplineRange":
- config.add(new Chart("chart", new AreaSplineRangeOptions(), theme));
+ config = new Chart("chart", new AreaSplineRangeOptions(), theme);
break;
case "columnWithDrilldown":
- config.add(new Chart("chart", new ColumnWithDrilldownOptions(), theme));
+ config = new Chart("chart", new ColumnWithDrilldownOptions(), theme);
break;
case "columnRotated":
- config.add(new Chart("chart", new ColumnWithRotatedLabelsOptions(), theme));
+ config = new Chart("chart", new ColumnWithRotatedLabelsOptions(), theme);
break;
case "stackedBar":
- config.add(new Chart("chart", new StackedBarOptions(), theme));
+ config = new Chart("chart", new StackedBarOptions(), theme);
break;
case "barNegativeStack":
- config.add(new Chart("chart", new StackedBarOptions(), theme));
+ config = new Chart("chart", new StackedBarOptions(), theme);
break;
case "basicColumn":
- config.add(new Chart("chart", new BasicColumnOptions(), theme));
+ config = new Chart("chart", new BasicColumnOptions(), theme);
break;
case "columnWithNegativeValues":
- config.add(new Chart("chart", new ColumnWithNegativeValuesOptions(), theme));
+ config = new Chart("chart", new ColumnWithNegativeValuesOptions(), theme);
break;
case "stackedColumn":
- config.add(new Chart("chart", new StackedColumnOptions(), theme));
+ config = new Chart("chart", new StackedColumnOptions(), theme);
break;
case "stackedPercentage":
- config.add(new Chart("chart", new StackedPercentageOptions(), theme));
+ config = new Chart("chart", new StackedPercentageOptions(), theme);
break;
case "basicPie":
- config.add(new Chart("chart", new BasicPieOptions(), theme));
+ config = new Chart("chart", new BasicPieOptions(), theme);
break;
case "pieWithGradient":
- config.add(new Chart("chart", new PieWithGradientOptions(), theme));
+ config = new Chart("chart", new PieWithGradientOptions(), theme);
break;
case "pieWithLegend":
- config.add(new Chart("chart", new PieWithLegendOptions(), theme));
+ config = new Chart("chart", new PieWithLegendOptions(), theme);
break;
case "splineUpdating":
- config.add(new Chart("chart", new WicketSplineUpdatingOptions(), theme));
+ config = new Chart("chart", new WicketSplineUpdatingOptions(), theme);
break;
case "bubble":
- config.add(new Chart("chart", new BubbleChartOptions(), theme));
+ config = new Chart("chart", new BubbleChartOptions(), theme);
break;
case "3dbubble":
- config.add(new Chart("chart", new BubbleChart3DOptions(), theme));
+ config = new Chart("chart", new BubbleChart3DOptions(), theme);
break;
case "boxplot":
- config.add(new Chart("chart", new BoxplotChartOptions(), theme));
+ config = new Chart("chart", new BoxplotChartOptions(), theme);
break;
case "interactive":
- config.add(new Chart("chart", new InteractionOptions(), theme));
+ config = new Chart("chart", new InteractionOptions(), theme);
break;
case "angularGauge":
- config.add(new Chart("chart", new AngularGaugeOptions(), theme));
+ config = new Chart("chart", new AngularGaugeOptions(), theme);
break;
case "spiderweb":
- config.add(new Chart("chart", new SpiderwebOptions(), theme));
+ config = new Chart("chart", new SpiderwebOptions(), theme);
break;
case "windrose":
- config.add(new Chart("chart", new WindroseOptions(), theme));
+ config = new Chart("chart", new WindroseOptions(), theme);
break;
case "columnrange":
- config.add(new Chart("chart", new ColumnRangeOptions(), theme));
+ config = new Chart("chart", new ColumnRangeOptions(), theme);
break;
case "arearange":
- config.add(new Chart("chart", new AreaRangeOptions(), theme));
+ config = new Chart("chart", new AreaRangeOptions(), theme);
break;
case "clicktoadd":
- config.add(new Chart("chart", new ClickToAddAPointOptions(), theme));
+ config = new Chart("chart", new ClickToAddAPointOptions(), theme);
break;
case "dualAxes":
- config.add(new Chart("chart", new DualAxesOptions(), theme));
+ config = new Chart("chart", new DualAxesOptions(), theme);
break;
case "scatterWithRegression":
- config.add(new Chart("chart", new ScatterWithRegressionLineOptions(), theme));
+ config = new Chart("chart", new ScatterWithRegressionLineOptions(), theme);
break;
case "multipleAxes":
- config.add(new Chart("chart", new MultipleAxesOptions(), theme));
+ config = new Chart("chart", new MultipleAxesOptions(), theme);
break;
case "errorBar":
- config.add(new Chart("chart", new ErrorBarOptions(), theme));
+ config = new Chart("chart", new ErrorBarOptions(), theme);
break;
case "funnel":
- config.add(new Chart("chart", new FunnelOptions(), theme));
+ config = new Chart("chart", new FunnelOptions(), theme);
break;
case "pyramid":
- config.add(new Chart("chart", new PyramidOptions(), theme));
+ config = new Chart("chart", new PyramidOptions(), theme);
break;
case "heatmap":
- config.add(new Chart("chart", new HeatmapOptions(), theme));
+ config = new Chart("chart", new HeatmapOptions(), theme);
break;
default:
- config.add(new Chart("chart", new BasicLineOptions(), theme));
+ config = new Chart("chart", new BasicLineOptions(), theme);
break;
}
- return config.get(0);
+ return config;
}
private Theme getThemeFromParams(String themeString) {
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseApplication.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseApplication.java
index 601ee3a5..16b6f5a0 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseApplication.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseApplication.java
@@ -15,11 +15,9 @@
package de.adesso.wickedcharts.showcase;
-import de.adesso.wickedcharts.wicket7.JavaScriptResourceRegistry;
-
import de.adesso.wickedcharts.showcase.ie.SimplePage;
import de.adesso.wickedcharts.showcase.modalwindow.ModalWindowPage;
-
+import de.adesso.wickedcharts.wicket7.JavaScriptResourceRegistry;
import org.apache.wicket.Session;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.protocol.http.WebApplication;
@@ -52,8 +50,8 @@ public void init() {
new JavaScriptResourceReference(ShowcaseApplication.class,
"jquery-1.8.3.min-IEfix.js"));
- mount(new NoIDMount("/chartjs/", HomepageChartJs.class));
- mount(new NoIDMount("/highcharts/", HomepageHighcharts.class));
+ mount(new NoIDMount("/chartjs/${chart}", HomepageChartJs.class));
+ mount(new NoIDMount("/highcharts/${theme}/${chart}", HomepageHighcharts.class));
mount(new NoIDMount("/simple", SimplePage.class));
mount(new NoIDMount("/modal", ModalWindowPage.class));
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseSession.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseSession.java
index 456a9a66..effba840 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseSession.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseSession.java
@@ -14,13 +14,10 @@
*/
package de.adesso.wickedcharts.showcase;
+import de.adesso.wickedcharts.chartjs.ChartConfiguration;
+import de.adesso.wickedcharts.highcharts.options.Options;
import org.apache.wicket.protocol.http.WebSession;
import org.apache.wicket.request.Request;
-import org.springframework.stereotype.Component;
-
-import de.adesso.wickedcharts.highcharts.options.Options;
-
-import de.adesso.wickedcharts.chartjs.ChartConfiguration;
public class ShowcaseSession extends WebSession {
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.java
index eb9f428d..9f205d38 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.java
@@ -1,9 +1,6 @@
package de.adesso.wickedcharts.showcase;
-import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
import de.adesso.wickedcharts.wicket7.chartjs.Chart;
-import org.apache.wicket.markup.html.panel.Fragment;
-import org.apache.wicket.markup.html.panel.Panel;
/**
* Wicket-component that adds the chart configuration and a smaller markup to the page.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/StringFromResourceModel.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/StringFromResourceModel.java
index 72519f97..6fb81f90 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/StringFromResourceModel.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/StringFromResourceModel.java
@@ -14,15 +14,14 @@
*/
package de.adesso.wickedcharts.showcase;
+import org.apache.commons.io.IOUtils;
+import org.apache.wicket.model.IModel;
+
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
-import org.apache.commons.io.IOUtils;
-import org.apache.wicket.model.IModel;
-import org.springframework.stereotype.Component;
-
public class StringFromResourceModel implements IModel {
private static final long serialVersionUID = 1L;
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/boot/ShowcaseBooter.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/boot/ShowcaseBooter.java
index eef57c53..7815427f 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/boot/ShowcaseBooter.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/boot/ShowcaseBooter.java
@@ -1,11 +1,7 @@
package de.adesso.wickedcharts.showcase.boot;
import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.domain.EntityScan;
-import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
-import org.springframework.boot.autoconfigure.web.MultipartAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
// excluding configurations since they are not compatible with libraries within the application
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartEndConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartEndConfiguration.java
index ef5969c6..bfcd00db 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartEndConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartEndConfiguration.java
@@ -1,26 +1,14 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Element;
-import de.adesso.wickedcharts.chartjs.chartoptions.Filler;
-import de.adesso.wickedcharts.chartjs.chartoptions.Line;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Plugins;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Ticks;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
*
* A sample that shows how the 'end' fill option works
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartFalseConfiguration.java
index 765678ef..0ac5393a 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartFalseConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartFalseConfiguration.java
@@ -1,26 +1,13 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Element;
-import de.adesso.wickedcharts.chartjs.chartoptions.Filler;
-import de.adesso.wickedcharts.chartjs.chartoptions.Line;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Plugins;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Ticks;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
-import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
*
* A sample that shows how the 'false' fill option works
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartOriginConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartOriginConfiguration.java
index fd7326e7..7bca9aeb 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartOriginConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartOriginConfiguration.java
@@ -1,26 +1,14 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Element;
-import de.adesso.wickedcharts.chartjs.chartoptions.Filler;
-import de.adesso.wickedcharts.chartjs.chartoptions.Line;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Plugins;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Ticks;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
*
* A sample that shows how the 'origin' fill option works
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartStartConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartStartConfiguration.java
index 544180bb..8905576a 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartStartConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartStartConfiguration.java
@@ -1,26 +1,14 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Element;
-import de.adesso.wickedcharts.chartjs.chartoptions.Filler;
-import de.adesso.wickedcharts.chartjs.chartoptions.Line;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Plugins;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Ticks;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
*
* A sample that shows how the 'start' fill option works
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartHorizontalConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartHorizontalConfiguration.java
index 9e5dbd0a..7178325e 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartHorizontalConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartHorizontalConfiguration.java
@@ -1,26 +1,17 @@
package de.adesso.wickedcharts.showcase.configurations;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
import java.util.Arrays;
/**
- *
* A sample that shows how a horizontal bar chart configuration looks.
- *
*/
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Position;
-import de.adesso.wickedcharts.chartjs.chartoptions.Rectangle;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
-import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
-import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
-
/**
*
* A sample that shows how a horizontal bar chart configuration looks.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartMultiAxisConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartMultiAxisConfiguration.java
index ab74404c..1573712e 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartMultiAxisConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartMultiAxisConfiguration.java
@@ -1,30 +1,17 @@
package de.adesso.wickedcharts.showcase.configurations;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
import java.util.Arrays;
/**
- *
* A sample that shows how a multi-axis bar chart configuration looks.
- *
*/
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.GridLines;
-import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Position;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Tooltips;
-import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
-import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
-import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
-
/**
*
* A sample that shows how a multi-axis bar chart configuration looks.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedConfiguration.java
index 2a73d6d5..20a05db5 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedConfiguration.java
@@ -1,28 +1,17 @@
package de.adesso.wickedcharts.showcase.configurations;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
import java.util.Arrays;
/**
- *
* A sample that shows how a stacked bar chart configuration looks.
- *
*/
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Position;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
-import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
-import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
-
/**
*
* A sample that shows how a stack bar chart configuration looks.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedGroupConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedGroupConfiguration.java
index 6dc9f012..cd1cea4f 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedGroupConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedGroupConfiguration.java
@@ -1,28 +1,17 @@
package de.adesso.wickedcharts.showcase.configurations;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
import java.util.Arrays;
/**
- *
* A sample that shows how a stacked group bar chart configuration looks.
- *
*/
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Position;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
-import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
-import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
-
/**
*
* A sample that shows how a stacked bar chart group configuration looks.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartVerticalConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartVerticalConfiguration.java
index 239b86ff..c0275a09 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartVerticalConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartVerticalConfiguration.java
@@ -1,25 +1,17 @@
package de.adesso.wickedcharts.showcase.configurations;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
import java.util.Arrays;
/**
- *
* A sample that shows how a vertical bar chart configuration looks.
- *
*/
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Position;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
-import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
-import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
-
/**
*
* A sample that shows how a vertical bar chart configuration looks.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/BubbleChartConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/BubbleChartConfiguration.java
index bf367fd4..ba8c44d3 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/BubbleChartConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/BubbleChartConfiguration.java
@@ -1,18 +1,14 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-import java.util.Random;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.BubbleValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+import java.util.Random;
+
/**
*
* A sample that shows how a bubble chart configuration looks.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/ComboBarLineChartConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/ComboBarLineChartConfiguration.java
index b76e7f46..02987aff 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/ComboBarLineChartConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/ComboBarLineChartConfiguration.java
@@ -1,19 +1,13 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Tooltips;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
*
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/DataLabellingChartConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/DataLabellingChartConfiguration.java
index 24a58761..999a7bd3 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/DataLabellingChartConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/DataLabellingChartConfiguration.java
@@ -1,20 +1,14 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Tooltips;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.ArrayList;
+import java.util.Arrays;
+
/**
*
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/DoughnutChartConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/DoughnutChartConfiguration.java
index 8c1ae6e5..71103554 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/DoughnutChartConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/DoughnutChartConfiguration.java
@@ -1,20 +1,13 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.Animation;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Position;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
*
* A sample that shows how a doughnut configuration looks.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/FilteringLabelsConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/FilteringLabelsConfiguration.java
index 87b9fb22..bc7a4aa4 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/FilteringLabelsConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/FilteringLabelsConfiguration.java
@@ -1,22 +1,13 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.CallbackFunction;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Ticks;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
*
* A sample that shows how a chart with label filtering is configured.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LegendPointStyleConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LegendPointStyleConfiguration.java
index d79199cf..14938151 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LegendPointStyleConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LegendPointStyleConfiguration.java
@@ -1,28 +1,14 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Hover;
-import de.adesso.wickedcharts.chartjs.chartoptions.HoverMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
-import de.adesso.wickedcharts.chartjs.chartoptions.LegendLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.PointStyle;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Tooltips;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
*
* A sample that shows how different point style configurations look.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartAreaDatasetConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartAreaDatasetConfiguration.java
index c4dce03e..af88eb23 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartAreaDatasetConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartAreaDatasetConfiguration.java
@@ -1,24 +1,6 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Element;
-import de.adesso.wickedcharts.chartjs.chartoptions.Filler;
-import de.adesso.wickedcharts.chartjs.chartoptions.Hover;
-import de.adesso.wickedcharts.chartjs.chartoptions.HoverMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Line;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Plugins;
-import de.adesso.wickedcharts.chartjs.chartoptions.SamplesFillerAnalyzer;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Tooltips;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.AbsoluteIndex;
import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
@@ -27,6 +9,8 @@
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
*
* A sample that shows how a chart with different datasets can be configured.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartBasicConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartBasicConfiguration.java
index 097b16e3..49e6c1af 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartBasicConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartBasicConfiguration.java
@@ -1,26 +1,13 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.ChartConfiguration;
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Hover;
-import de.adesso.wickedcharts.chartjs.chartoptions.HoverMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Tooltips;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
*
* A sample of a basic line chart configuration.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartInterpolatedConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartInterpolatedConfiguration.java
index b967d284..5b51dafd 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartInterpolatedConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartInterpolatedConfiguration.java
@@ -1,26 +1,14 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-import java.util.List;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.CubicInterpolationMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Hover;
-import de.adesso.wickedcharts.chartjs.chartoptions.HoverMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Tooltips;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+import java.util.List;
+
/**
*
* A sample that shows how configuring interpolation of lines in a line chart is configured.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartMultiAxisConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartMultiAxisConfiguration.java
index c594d71e..fe82651a 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartMultiAxisConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartMultiAxisConfiguration.java
@@ -1,24 +1,13 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.GridLines;
-import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Position;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Tooltips;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
*
* A sample that shows how multiple axes in a line chart are configured.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartProgressBarConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartProgressBarConfiguration.java
index 51201ad3..cf6f940d 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartProgressBarConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartProgressBarConfiguration.java
@@ -1,28 +1,14 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import org.apache.wicket.markup.html.panel.Fragment;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.Animation;
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.CallbackFunction;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Hover;
-import de.adesso.wickedcharts.chartjs.chartoptions.HoverMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Tooltips;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import org.apache.wicket.markup.html.panel.Fragment;
+
+import java.util.ArrayList;
+import java.util.Arrays;
/**
*
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartStackedConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartStackedConfiguration.java
index 54d86ddc..383c7a06 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartStackedConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartStackedConfiguration.java
@@ -1,24 +1,13 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Hover;
-import de.adesso.wickedcharts.chartjs.chartoptions.HoverMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Tooltips;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
*
* A sample that shows how a stacked line chart is configured.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedAfterConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedAfterConfiguration.java
index 9e85032e..cc3da325 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedAfterConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedAfterConfiguration.java
@@ -1,25 +1,13 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Hover;
-import de.adesso.wickedcharts.chartjs.chartoptions.HoverMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.SteppedLineValue;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Tooltips;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
*
* A sample that shows how a stepped line chart configuration looks with stepped = after.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedBeforeConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedBeforeConfiguration.java
index 96d396dc..4cfde004 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedBeforeConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedBeforeConfiguration.java
@@ -1,25 +1,13 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Hover;
-import de.adesso.wickedcharts.chartjs.chartoptions.HoverMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.SteppedLineValue;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Tooltips;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
*
* A sample that shows how a stepped line chart configuration looks with stepped = before.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartWithDifferentPointSizesConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartWithDifferentPointSizesConfiguration.java
index 10a31ec5..205fbf11 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartWithDifferentPointSizesConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartWithDifferentPointSizesConfiguration.java
@@ -1,25 +1,14 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-import java.util.Collections;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Hover;
-import de.adesso.wickedcharts.chartjs.chartoptions.HoverMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Tooltips;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+import java.util.Collections;
+
/**
*
* A sample that shows how a line chart can be configured to have different point sizes.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineStylesConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineStylesConfiguration.java
index b20bac43..0862c977 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineStylesConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineStylesConfiguration.java
@@ -1,24 +1,13 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Hover;
-import de.adesso.wickedcharts.chartjs.chartoptions.HoverMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Tooltips;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
*
* A sample that shows how different line styles can be configured.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LinearStepSizeConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LinearStepSizeConfiguration.java
index 6514ff51..84f1afb3 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LinearStepSizeConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LinearStepSizeConfiguration.java
@@ -1,25 +1,13 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Hover;
-import de.adesso.wickedcharts.chartjs.chartoptions.HoverMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Ticks;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Tooltips;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
*
* A sample that shows how a line chart with linear step size is configured.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicLineChartConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicLineChartConfiguration.java
index f414d859..0924670d 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicLineChartConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicLineChartConfiguration.java
@@ -1,24 +1,13 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Hover;
-import de.adesso.wickedcharts.chartjs.chartoptions.HoverMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Tooltips;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
*
* A sample that shows how a logarithmic line chart configuration looks.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicScatterChartConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicScatterChartConfiguration.java
index f25f3ff1..db5c6709 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicScatterChartConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicScatterChartConfiguration.java
@@ -1,13 +1,13 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.PointValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
* A sample that shows how a logarithmic scatter chart configuration looks.
*
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxConfiguration.java
index 96754ccb..2d826156 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxConfiguration.java
@@ -1,20 +1,13 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Ticks;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
*
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxSuggestedConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxSuggestedConfiguration.java
index fe6a0882..b83ce23d 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxSuggestedConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxSuggestedConfiguration.java
@@ -1,20 +1,13 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Ticks;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
*
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/MultilineLabelsConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/MultilineLabelsConfiguration.java
index cef0ef45..85e23292 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/MultilineLabelsConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/MultilineLabelsConfiguration.java
@@ -1,18 +1,14 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextListLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
*
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/NonNumericConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/NonNumericConfiguration.java
index 129f45e6..a6f3c0e7 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/NonNumericConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/NonNumericConfiguration.java
@@ -1,23 +1,14 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Position;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Ticks;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.ConstLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.ConstValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
*
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/OtherRadarChartConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/OtherRadarChartConfiguration.java
index 8842d4b1..19e7d5ec 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/OtherRadarChartConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/OtherRadarChartConfiguration.java
@@ -1,22 +1,14 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Position;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scale;
-import de.adesso.wickedcharts.chartjs.chartoptions.Ticks;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextListLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
* Sample that displays different datasets on a radar.
*
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/PieChartConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/PieChartConfiguration.java
index 6006a3ef..9301accc 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/PieChartConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/PieChartConfiguration.java
@@ -1,7 +1,5 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
import de.adesso.wickedcharts.chartjs.chartoptions.Data;
import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
@@ -11,6 +9,8 @@
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
* Sample that displays a dataset as a pie chart.
*
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/PointStylesConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/PointStylesConfiguration.java
index 4bf0d1db..47e62fc4 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/PointStylesConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/PointStylesConfiguration.java
@@ -1,23 +1,13 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.PointStyle;
-import de.adesso.wickedcharts.chartjs.chartoptions.Position;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Ticks;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
* Sample that supports different point styles:
* 'circle',
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/PolarAreaChartConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/PolarAreaChartConfiguration.java
index 40fa53e9..03d581f6 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/PolarAreaChartConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/PolarAreaChartConfiguration.java
@@ -1,22 +1,13 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.Animation;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Position;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scale;
-import de.adesso.wickedcharts.chartjs.chartoptions.Ticks;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
* Sample that distributes data in a polar area chart.
*
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/RadarChartConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/RadarChartConfiguration.java
index b5adf83f..be74b50d 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/RadarChartConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/RadarChartConfiguration.java
@@ -1,19 +1,6 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-
-
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Element;
-import de.adesso.wickedcharts.chartjs.chartoptions.Filler;
-import de.adesso.wickedcharts.chartjs.chartoptions.Line;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Plugins;
-import de.adesso.wickedcharts.chartjs.chartoptions.SamplesFillerAnalyzer;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.AbsoluteIndex;
import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
@@ -22,6 +9,8 @@
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
* Sample that displays different datasets on a radar.
*
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartConfiguration.java
index 3af6ccdd..b9cee224 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartConfiguration.java
@@ -1,13 +1,13 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.PointValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
* Sample which displays data as scattered points in the coordinate system.
*
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartMultiAxisConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartMultiAxisConfiguration.java
index 87721e2f..0dc680a2 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartMultiAxisConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartMultiAxisConfiguration.java
@@ -1,23 +1,14 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.GridLines;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Position;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.RgbaColor;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.PointValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
* Sample that displays a scatter chart with two y-axes.
*
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeComboConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeComboConfiguration.java
index 7992015f..102fdcd0 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeComboConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeComboConfiguration.java
@@ -1,25 +1,18 @@
package de.adesso.wickedcharts.showcase.configurations;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import org.apache.wicket.Session;
+
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import org.apache.wicket.Session;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.TimeFormat;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
-import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
-import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
/**
* Sample which displays a bar chart for the data distribution and a line chart for the time progression of datasets.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeLineConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeLineConfiguration.java
index f17b8949..1771cd0d 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeLineConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeLineConfiguration.java
@@ -1,21 +1,6 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.time.LocalDateTime;
-import java.time.format.DateTimeFormatter;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Random;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.TimeFormat;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.DateTimeLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
@@ -24,6 +9,13 @@
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.ValueType;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Random;
+
/**
* Sample which displays a time progression line for datasets.
*
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimePointConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimePointConfiguration.java
index ac66dadd..9913c110 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimePointConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimePointConfiguration.java
@@ -1,5 +1,12 @@
package de.adesso.wickedcharts.showcase.configurations;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.StringValueColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.DateTimeLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.*;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
@@ -7,27 +14,6 @@
import java.util.List;
import java.util.Random;
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.FontStyle;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.TickStyle;
-import de.adesso.wickedcharts.chartjs.chartoptions.Ticks;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
-import de.adesso.wickedcharts.chartjs.chartoptions.colors.StringValueColor;
-import de.adesso.wickedcharts.chartjs.chartoptions.label.DateTimeLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.DateTimeValue;
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.PointValue;
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.StringValue;
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.ValueType;
-import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
-
/**
* Sample which highlights the important points of the x-axis.
*
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeSeriesConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeSeriesConfiguration.java
index b159d4df..b634b84d 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeSeriesConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeSeriesConfiguration.java
@@ -1,26 +1,16 @@
package de.adesso.wickedcharts.showcase.configurations;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.DateTimeLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.DoubleValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.DistributionType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.TickSource;
-import de.adesso.wickedcharts.chartjs.chartoptions.Ticks;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.label.DateTimeLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.valueType.DoubleValue;
-import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
-
/**
* Sample that displays a progression of a dataset.
*
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipAverageConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipAverageConfiguration.java
index e2e4a09f..25664e15 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipAverageConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipAverageConfiguration.java
@@ -1,24 +1,13 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Position;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipPosition;
-import de.adesso.wickedcharts.chartjs.chartoptions.Tooltips;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
* Sample that enables tooltips to be at a average position to the data points.
*
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipBorderConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipBorderConfiguration.java
index 764f4ec1..7271021f 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipBorderConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipBorderConfiguration.java
@@ -1,16 +1,6 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Position;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipPosition;
-import de.adesso.wickedcharts.chartjs.chartoptions.Tooltips;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.RgbColor;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.RgbaColor;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
@@ -18,6 +8,8 @@
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
* Sample which adds a border to the tooltips.
*
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipCallbacksConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipCallbacksConfiguration.java
index b9d36d41..87bb95eb 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipCallbacksConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipCallbacksConfiguration.java
@@ -1,27 +1,13 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.CallbackFunction;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.FontStyle;
-import de.adesso.wickedcharts.chartjs.chartoptions.Hover;
-import de.adesso.wickedcharts.chartjs.chartoptions.HoverMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipCallbacks;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Tooltips;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
* Sample that enables the use of callback functions for tooltips.
*
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlLineConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlLineConfiguration.java
index 44b6bb38..686cc84b 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlLineConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlLineConfiguration.java
@@ -1,23 +1,14 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.JavaScriptReference;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Position;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipPosition;
-import de.adesso.wickedcharts.chartjs.chartoptions.Tooltips;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.ArrayList;
+import java.util.Arrays;
+
/**
* Sample that enables the use of custom html markup for tooltips in a line chart.
*
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPieConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPieConfiguration.java
index 1e7400ce..f6ba2261 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPieConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPieConfiguration.java
@@ -1,15 +1,14 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.ArrayList;
-import java.util.Arrays;
-
import de.adesso.wickedcharts.chartjs.chartoptions.*;
-import org.apache.wicket.markup.html.panel.Fragment;
-
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import org.apache.wicket.markup.html.panel.Fragment;
+
+import java.util.ArrayList;
+import java.util.Arrays;
/**
* Sample that enables the use of custom html markup for tooltips in a pie chart.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPointsConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPointsConfiguration.java
index e0fe0fbe..247c5dbd 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPointsConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPointsConfiguration.java
@@ -1,22 +1,14 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import org.apache.wicket.markup.html.panel.Fragment;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.JavaScriptReference;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.Tooltips;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import org.apache.wicket.markup.html.panel.Fragment;
+
+import java.util.ArrayList;
+import java.util.Arrays;
/**
* Sample that enables the use of custom html markup for tooltip points.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipNearestConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipNearestConfiguration.java
index ebb35c4c..81ef4a14 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipNearestConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipNearestConfiguration.java
@@ -1,24 +1,13 @@
package de.adesso.wickedcharts.showcase.configurations;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Position;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipPosition;
-import de.adesso.wickedcharts.chartjs.chartoptions.Tooltips;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
* Sample that enables tooltips to be at the nearest possible position to the data points.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/base/ShowcaseConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/base/ShowcaseConfiguration.java
index cb1b539b..b15b4d9f 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/base/ShowcaseConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/base/ShowcaseConfiguration.java
@@ -1,5 +1,8 @@
package de.adesso.wickedcharts.showcase.configurations.base;
+import de.adesso.wickedcharts.chartjs.ChartConfiguration;
+import org.apache.wicket.markup.html.panel.Fragment;
+
import java.io.File;
import java.io.IOException;
import java.io.Serializable;
@@ -8,10 +11,6 @@
import java.util.Random;
import java.util.Scanner;
-import org.apache.wicket.markup.html.panel.Fragment;
-
-import de.adesso.wickedcharts.chartjs.ChartConfiguration;
-
/**
* The base class for all chart configurations for the showcase
*/
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLineStylesConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLineStylesConfiguration.java
index 9849d28c..c54b2548 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLineStylesConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLineStylesConfiguration.java
@@ -1,22 +1,14 @@
package de.adesso.wickedcharts.showcase.configurations.gridlines;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.GridLines;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Ticks;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.StringValueColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
*
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesBasicConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesBasicConfiguration.java
index 777f7143..ea0a665c 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesBasicConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesBasicConfiguration.java
@@ -1,21 +1,13 @@
package de.adesso.wickedcharts.showcase.configurations.gridlines;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.GridLines;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Ticks;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
*
* Chart configuration for the basic grid line layout.
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectTrueConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectTrueConfiguration.java
index 2d8c79c5..866e97d7 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectTrueConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectTrueConfiguration.java
@@ -1,24 +1,14 @@
package de.adesso.wickedcharts.showcase.configurations.interactions;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipMode;
-import de.adesso.wickedcharts.chartjs.chartoptions.TooltipPosition;
-import de.adesso.wickedcharts.chartjs.chartoptions.Tooltips;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
* If the intersect setting is true, the first intersecting item is used to determine the index in the data.
*
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionChartBasicConfiguration.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionChartBasicConfiguration.java
index 204ec0b9..1a8aecd5 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionChartBasicConfiguration.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionChartBasicConfiguration.java
@@ -1,20 +1,13 @@
package de.adesso.wickedcharts.showcase.configurations.legendposition;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.chartjs.chartoptions.AxesScale;
-import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
-import de.adesso.wickedcharts.chartjs.chartoptions.Data;
-import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
-import de.adesso.wickedcharts.chartjs.chartoptions.Options;
-import de.adesso.wickedcharts.chartjs.chartoptions.ScaleLabel;
-import de.adesso.wickedcharts.chartjs.chartoptions.Scales;
-import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import java.util.Arrays;
+
/**
* Base class for the other configurations for the legend position
*
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/ie/SimplePage.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/ie/SimplePage.java
index cfd3992b..172a9dea 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/ie/SimplePage.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/ie/SimplePage.java
@@ -1,11 +1,9 @@
package de.adesso.wickedcharts.showcase.ie;
import de.adesso.wickedcharts.highcharts.options.Options;
-import de.adesso.wickedcharts.wicket7.highcharts.Chart;
-
import de.adesso.wickedcharts.showcase.options.*;
import de.adesso.wickedcharts.showcase.options.base.ShowcaseOptions;
-
+import de.adesso.wickedcharts.wicket7.highcharts.Chart;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.form.ChoiceRenderer;
import org.apache.wicket.markup.html.form.DropDownChoice;
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/ChartjsShowcaseLink.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/ChartjsShowcaseLink.java
index 092685f6..ff646dc3 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/ChartjsShowcaseLink.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/ChartjsShowcaseLink.java
@@ -1,8 +1,7 @@
package de.adesso.wickedcharts.showcase.links;
-import org.apache.wicket.markup.html.link.BookmarkablePageLink;
-
import de.adesso.wickedcharts.showcase.HomepageChartJs;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
/**
* Adds a link to the Chart.js showcase in the main page
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/HighchartsShowcaseLink.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/HighchartsShowcaseLink.java
index c38d07e9..9965b20a 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/HighchartsShowcaseLink.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/HighchartsShowcaseLink.java
@@ -1,9 +1,8 @@
package de.adesso.wickedcharts.showcase.links;
-import org.apache.wicket.markup.html.link.BookmarkablePageLink;
-
import de.adesso.wickedcharts.showcase.HomepageHighcharts;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
/**
* Adds a link to the Highcharts showcase in the main page
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java
deleted file mode 100644
index c449513a..00000000
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java
+++ /dev/null
@@ -1,40 +0,0 @@
-
-/**
- * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
- *
- * 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 de.adesso.wickedcharts.showcase.links;
-
-import de.adesso.wickedcharts.highcharts.options.Options;
-import de.adesso.wickedcharts.wicket7.highcharts.Chart;
-
-import de.adesso.wickedcharts.showcase.options.WicketSplineUpdatingOptions;
-
-import org.apache.wicket.markup.html.basic.Label;
-
-public class SplineUpdatingChartLink {
-
- //public SplineUpdatingChartLink(String id, Chart chart, Label codeContainer,
- // Options options) {
- //super(id, chart, codeContainer, options);
- //}
-
- private static final long serialVersionUID = 1L;
-
- /**
- * Always return a fresh {@link Options} object, so that the date ticks are
- * current.
- */
-
-
-}
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartJsLink.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartJsLink.java
index 9a918981..e3413d75 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartJsLink.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartJsLink.java
@@ -15,8 +15,7 @@
package de.adesso.wickedcharts.showcase.links;
import de.adesso.wickedcharts.showcase.HomepageChartJs;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.request.mapper.parameter.PageParameters;
/**
@@ -24,7 +23,7 @@
* Clicking on the link calls the onClick() method, which sets page
* parameters accordingly.
*/
-public class UpdateChartJsLink extends AjaxLink {
+public class UpdateChartJsLink extends Link {
private static final long serialVersionUID = 1L;
@@ -42,7 +41,7 @@ public UpdateChartJsLink(final String id, final String val) {
}
@Override
- public void onClick(final AjaxRequestTarget target) {
+ public void onClick() {
PageParameters params = new PageParameters();
params.add("chart", chartVal);
setResponsePage(HomepageChartJs.class, params);
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateHighchartLink.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateHighchartLink.java
index cd49b0ba..cf9d82c9 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateHighchartLink.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateHighchartLink.java
@@ -14,16 +14,8 @@
*/
package de.adesso.wickedcharts.showcase.links;
-import de.adesso.wickedcharts.highcharts.options.Options;
import de.adesso.wickedcharts.showcase.HomepageHighcharts;
-import de.adesso.wickedcharts.wicket7.highcharts.Chart;
-
-import de.adesso.wickedcharts.showcase.ShowcaseSession;
-import de.adesso.wickedcharts.showcase.StringFromResourceModel;
-
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.markup.html.AjaxLink;
-import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.request.mapper.parameter.PageParameters;
/**
@@ -31,7 +23,7 @@
* Clicking on the link calls the onClick() method, which sets page
* parameters accordingly.
*/
-public class UpdateHighchartLink extends AjaxLink {
+public class UpdateHighchartLink extends Link {
private static final long serialVersionUID = 1L;
@@ -52,7 +44,7 @@ public UpdateHighchartLink(final String id, String themeVal) {
@Override
- public void onClick(final AjaxRequestTarget target) {
+ public void onClick() {
PageParameters params = new PageParameters();
params.add("theme", themeVal);
params.add("chart", chartVal);
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateThemeLink.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateThemeLink.java
index a611b842..b86794c8 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateThemeLink.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateThemeLink.java
@@ -15,8 +15,7 @@
package de.adesso.wickedcharts.showcase.links;
import de.adesso.wickedcharts.showcase.HomepageHighcharts;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.request.mapper.parameter.PageParameters;
/**
@@ -24,7 +23,7 @@
* Clicking on the link calls the onClick() method, which sets page
* parameters accordingly.
*/
-public class UpdateThemeLink extends AjaxLink {
+public class UpdateThemeLink extends Link {
private static final long serialVersionUID = 1L;
@@ -44,7 +43,7 @@ public UpdateThemeLink(final String id, String chart) {
}
@Override
- public void onClick(final AjaxRequestTarget target) {
+ public void onClick() {
PageParameters params = new PageParameters();
params.add("theme", themeVal);
params.add("chart", chartVal);
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/modalwindow/ChartPanel.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/modalwindow/ChartPanel.java
index 6ed37806..40792423 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/modalwindow/ChartPanel.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/modalwindow/ChartPanel.java
@@ -1,9 +1,7 @@
package de.adesso.wickedcharts.showcase.modalwindow;
-import de.adesso.wickedcharts.wicket7.highcharts.Chart;
-
import de.adesso.wickedcharts.showcase.options.BasicBarOptions;
-
+import de.adesso.wickedcharts.wicket7.highcharts.Chart;
import org.apache.wicket.markup.html.panel.Panel;
public class ChartPanel extends Panel {
diff --git a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/options/WicketSplineUpdatingOptions.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/options/WicketSplineUpdatingOptions.java
index 3537d96d..f41c8fc5 100644
--- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/options/WicketSplineUpdatingOptions.java
+++ b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/options/WicketSplineUpdatingOptions.java
@@ -20,10 +20,8 @@
import de.adesso.wickedcharts.highcharts.options.livedata.LiveDataSeries;
import de.adesso.wickedcharts.highcharts.options.livedata.LiveDataUpdateEvent;
import de.adesso.wickedcharts.highcharts.options.series.Point;
-import de.adesso.wickedcharts.wicket7.highcharts.features.livedata.WicketLiveDataUpdateEvent;
-
import de.adesso.wickedcharts.showcase.options.base.ShowcaseOptions;
-
+import de.adesso.wickedcharts.wicket7.highcharts.features.livedata.WicketLiveDataUpdateEvent;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.markup.head.OnDomReadyHeaderItem;
diff --git a/showcase/wicked-charts-showcase-wicket8/.gitignore b/showcase/wicked-charts-showcase-wicket8/.gitignore
new file mode 100644
index 00000000..84c048a7
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/.gitignore
@@ -0,0 +1 @@
+/build/
diff --git a/showcase/wicked-charts-showcase-wicket8/build.gradle b/showcase/wicked-charts-showcase-wicket8/build.gradle
new file mode 100644
index 00000000..251a4b40
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/build.gradle
@@ -0,0 +1,63 @@
+import org.apache.tools.ant.filters.ReplaceTokens
+
+buildscript {
+ repositories {
+ mavenLocal()
+ jcenter()
+ maven {
+ url "https://plugins.gradle.org/m2/"
+ }
+ }
+ dependencies {
+ classpath group: 'org.springframework.boot', name: 'spring-boot-gradle-plugin', version: "${spring_boot_version}"
+ classpath group: 'org.springframework', name: 'springloaded', version: "${springloaded_version}"
+ classpath 'com.google.cloud.tools:appengine-gradle-plugin:+'
+ }
+}
+
+dependencies {
+ compile group: 'org.apache.wicket', name: 'wicket-core', version: "${wicket_spring_version}"
+ compile project(':wicked-charts-showcase-options')
+ testCompile 'junit:junit:4.12'
+ compile 'commons-io:commons-io:2.4'
+ compile 'com.google.appengine:appengine-api-1.0-sdk:+'
+ compile group: 'org.apache.wicket', name: 'wicket-extensions', version: "${wicket_spring_version}"
+ compile(
+ [group: 'org.apache.wicket', name: 'wicket-spring', version: "${wicket_spring_version}"],
+ [group: 'de.adesso.wicked-charts', name: 'wicked-charts-wicket8', version: "${wicketcharts_version}"],
+ )
+ compile(
+ [group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: "${spring_boot_version}"],
+ )
+
+ testCompile 'com.google.appengine:appengine-testing:+'
+ testCompile 'com.google.appengine:appengine-api-stubs:+'
+ testCompile 'com.google.appengine:appengine-tools-sdk:+'
+}
+
+apply plugin: 'war'
+apply plugin: 'org.springframework.boot'
+apply plugin: 'com.google.cloud.tools.appengine'
+
+appengine { // App Engine tasks configuration
+ deploy { // deploy configuration
+
+ }
+}
+
+processResources {
+ from 'src/main/java'
+ from 'src/main/resources'
+ filter(ReplaceTokens, tokens: [projectVersion : wicketcharts_version])
+ filter(ReplaceTokens, tokens: [wicketVersion : wicket_spring_version])
+}
+
+bootRun {
+ // default application configuration for running application via bootRun in development mode
+ // (in production, these properties are defined in application.properties)
+ jvmArgs '-Xdebug',
+ '-Dserver.port=8080',
+ '-Dwicket.configurationType=DEVELOPMENT',
+ '-Dspring.jpa.hibernate.ddl-auto=update',
+ '-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009'
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/eclipse/code-formatter.xml b/showcase/wicked-charts-showcase-wicket8/eclipse/code-formatter.xml
new file mode 100644
index 00000000..be68db85
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/eclipse/code-formatter.xml
@@ -0,0 +1,295 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/showcase/wicked-charts-showcase-wicket8/eclipse/wicket-charts-showcase package release.launch b/showcase/wicked-charts-showcase-wicket8/eclipse/wicket-charts-showcase package release.launch
new file mode 100644
index 00000000..33eb2682
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/eclipse/wicket-charts-showcase package release.launch
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/showcase/wicked-charts-showcase-wicket8/gradle.properties b/showcase/wicked-charts-showcase-wicket8/gradle.properties
new file mode 100644
index 00000000..b9945fe9
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/gradle.properties
@@ -0,0 +1 @@
+wicket_spring_version=8.0.0
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.html b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.html
new file mode 100644
index 00000000..a83567a0
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.html
@@ -0,0 +1,22 @@
+
+
+
+
+
panel
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.java
new file mode 100644
index 00000000..d1ed8a78
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.java
@@ -0,0 +1,26 @@
+package de.adesso.wickedcharts.showcase;
+
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import de.adesso.wickedcharts.wicket8.chartjs.Chart;
+import org.apache.wicket.markup.html.panel.Fragment;
+import org.apache.wicket.markup.html.panel.Panel;
+
+/**
+ * Wicket-component that adds the chart configuration and markup to the page.
+ */
+public class ChartComponent extends Panel {
+
+ public ChartComponent(Chart chart)
+ {
+ super( "chart" );
+ add(chart);
+ Fragment optionalMarkup = new Fragment("optionalMarkup","defaultTooltip",this);
+ chart.getParent().add(optionalMarkup);
+ ((ShowcaseConfiguration)chart.getChartConfiguration()).modfiyIndividualMarkup((Fragment)chart.getParent().get("optionalMarkup"));
+ ((Fragment) chart.getParent().get("optionalMarkup")).detach();
+ optionalMarkup = (Fragment) chart.getParent().get("optionalMarkup");
+ this.add(optionalMarkup);
+ optionalMarkup.setOutputMarkupId(true);
+ add(optionalMarkup);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.html b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.html
new file mode 100644
index 00000000..4b9db1dd
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.html
@@ -0,0 +1,6 @@
+
+
+
+ Here comes the code
+
+
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.java
new file mode 100644
index 00000000..add8a54c
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.java
@@ -0,0 +1,23 @@
+package de.adesso.wickedcharts.showcase;
+
+import de.adesso.wickedcharts.chartjs.ChartConfiguration;
+import de.adesso.wickedcharts.wicket8.chartjs.Chart;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.panel.Panel;
+
+/**
+ * Wicket-component that adds the appropriate code container for the displayed charts to the page.
+ */
+public class CodeComponent extends Panel {
+
+ public CodeComponent(Chart chart)
+ {
+ super("code");
+ ChartConfiguration chartConfig = chart.getChartConfiguration();
+ Label codeContainer = new Label("code", new StringFromResourceModel(
+ chartConfig.getClass(), chartConfig.getClass().getSimpleName()
+ + ".java"));
+ codeContainer.setOutputMarkupId (true);
+ this.add(codeContainer);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/Demo.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/Demo.java
similarity index 80%
rename from showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/Demo.java
rename to showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/Demo.java
index 01cf1948..e39275ee 100644
--- a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/Demo.java
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/Demo.java
@@ -14,19 +14,11 @@
*/
package de.adesso.wickedcharts.showcase;
-import java.util.Arrays;
-
-import de.adesso.wickedcharts.highcharts.options.Axis;
-import de.adesso.wickedcharts.highcharts.options.ChartOptions;
-import de.adesso.wickedcharts.highcharts.options.HorizontalAlignment;
-import de.adesso.wickedcharts.highcharts.options.Legend;
-import de.adesso.wickedcharts.highcharts.options.LegendLayout;
-import de.adesso.wickedcharts.highcharts.options.Options;
-import de.adesso.wickedcharts.highcharts.options.SeriesType;
-import de.adesso.wickedcharts.highcharts.options.Title;
-import de.adesso.wickedcharts.highcharts.options.VerticalAlignment;
+import de.adesso.wickedcharts.highcharts.options.*;
import de.adesso.wickedcharts.highcharts.options.series.SimpleSeries;
+import java.util.Arrays;
+
/**
* This code is simply to display it on the front page of
* http://code.google.com/p/wicked-charts/.
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.html b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.html
new file mode 100644
index 00000000..0e36c32d
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.html
@@ -0,0 +1,291 @@
+
+
+
+
+
+ Wicked Charts :: Showcase :: Wicket 8.x
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Wicked Charts
+
+
version @projectVersion@ :: Wicket @wicketVersion@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
To add a chart to your Wicket page, include the following HTML
+ and Java fragments into your code:
+
+
Markup:
+
+
+<!-- HTML code -->
+<div>
+ <canvas wicket:id="chart"></canvas>
+</div>
+
+
+
+
Wicket Page:
+
+
+// Java code
+ChartConfiguration chart = new ChartConfiguration();
+chart.setType(ChartType.LINE);
+chart.setOptions(new Options().setTitle(new Title().setText("My Chart")));
+chart.setData(new Data().setDatasets(Arrays.asList(new Dataset().setData(IntegerValue.of(1,2,3,4)))));
+//to see more options, select a chart below and click the button "Show Java code"
+
+add(new Chart("chart", chart));
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.java
new file mode 100644
index 00000000..fa8084d4
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.java
@@ -0,0 +1,399 @@
+package de.adesso.wickedcharts.showcase;
+/*
+ * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
+ *
+ * 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.
+ */
+
+
+import de.adesso.wickedcharts.showcase.configurations.*;
+import de.adesso.wickedcharts.showcase.configurations.gridlines.*;
+import de.adesso.wickedcharts.showcase.configurations.interactions.*;
+import de.adesso.wickedcharts.showcase.configurations.legendposition.LegendPositionBottomConfiguration;
+import de.adesso.wickedcharts.showcase.configurations.legendposition.LegendPositionLeftConfiguration;
+import de.adesso.wickedcharts.showcase.configurations.legendposition.LegendPositionRightConfiguration;
+import de.adesso.wickedcharts.showcase.configurations.legendposition.LegendPositionTopConfiguration;
+import de.adesso.wickedcharts.showcase.links.ChartjsShowcaseLink;
+import de.adesso.wickedcharts.showcase.links.HighchartsShowcaseLink;
+import de.adesso.wickedcharts.showcase.links.UpdateChartJsLink;
+import de.adesso.wickedcharts.wicket8.chartjs.Chart;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.request.mapper.parameter.INamedParameters;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * This page takes care of the Chart.js showcase logic.
+ * @author SvenWirz
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+public class HomepageChartJs extends WebPage implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Constructs the page according to the current parameters
+ * This constructor is called each time a new chart is
+ * selected.
+ * @param parameters the page parameters from the page URI
+ */
+ public HomepageChartJs(final PageParameters parameters) {
+ addCharts(parameters);
+ addNavigationLinks();
+ addChartLinks();
+ }
+
+ /**
+ * Gets the charts and the code containers from the page parameters,
+ * constructs Wicket componenets from them and
+ * adds them to a Wicket ListView.
+ * @param parameters the page parameters from the page URI
+ */
+ private void addCharts(PageParameters parameters){
+
+ List charts = getChartFromParams(parameters);
+
+ //If we have more than one chart - use SmallComponents
+ if(charts.size() > 1){
+ List components = new ArrayList<>();
+ for(Chart i : charts){
+ components.add(new SmallChartComponent(i));
+ }
+ add( new ListView( "components", components ){
+ protected void populateItem(ListItem item)
+ {
+ item.add( (SmallChartComponent)item.getModelObject() );
+ }
+ });
+ }else { //else use the regular full-width chart component
+ List components = new ArrayList<>();
+ for (Chart i : charts) {
+ components.add(new ChartComponent(i));
+ }
+ add( new ListView( "components", components ){
+ protected void populateItem(ListItem item)
+ {
+ item.add( (ChartComponent)item.getModelObject() );
+ }
+ });
+ }
+
+ //Add Code Components
+ List code_components = new ArrayList<>();
+ for(Chart i : charts){
+ code_components.add(new CodeComponent(i));
+ }
+ add( new ListView( "code_components", code_components ){
+ protected void populateItem(ListItem item){
+ item.add( (CodeComponent)item.getModelObject() );
+ }
+ });
+ }
+
+ private void addNavigationLinks() {
+ this.add(new HighchartsShowcaseLink());
+ this.add(new ChartjsShowcaseLink());
+ }
+
+ /**
+ * Adds links to the charts in the navigation sidebar
+ */
+ private void addChartLinks() {
+ this.add(new UpdateChartJsLink("LineChartBasic", "lineBasic"));
+ this.add(new UpdateChartJsLink("BarChartVertical" , "barVertical"));
+ this.add(new UpdateChartJsLink("LineChartMultiAxis", "lineMultiAxis"));
+ this.add(new UpdateChartJsLink("LineChartStepped", "lineStepped"));
+ this.add(new UpdateChartJsLink("LineChartInterpolated", "lineInterpolated"));
+ this.add(new UpdateChartJsLink("LineStyles", "lineStyles"));
+ this.add(new UpdateChartJsLink("PointStyles", "pointStyles"));
+ this.add(new UpdateChartJsLink("PointSizes", "pointSizes"));
+ this.add(new UpdateChartJsLink("BarChartHorizontal", "barHorizontal"));
+ this.add(new UpdateChartJsLink("BarChartStacked", "barStacked"));
+ this.add(new UpdateChartJsLink("BarChartStackedGroup", "barStackedGroup"));
+ this.add(new UpdateChartJsLink("BarChartMultiAxis", "barMultiAxis"));
+ this.add(new UpdateChartJsLink("PieChart", "pie"));
+ this.add(new UpdateChartJsLink("AreaLineBoundariesChart", "areaLineBoundaries"));
+ this.add(new UpdateChartJsLink("LineChartStacked", "lineStacked"));
+ this.add(new UpdateChartJsLink("LineChartDataset", "lineDataset"));
+ this.add(new UpdateChartJsLink("RadarChart", "radar"));
+ this.add(new UpdateChartJsLink("DoughnutChart", "doughnut"));
+ this.add(new UpdateChartJsLink("PolarAreaChart", "polarArea"));
+ this.add(new UpdateChartJsLink("ScatterChart", "scatter"));
+ this.add(new UpdateChartJsLink("ScatterChartMultiAxis", "scatterMultiAxis"));
+ this.add(new UpdateChartJsLink("ComboBarLineChart", "comboBarLine"));
+ this.add(new UpdateChartJsLink("LegendPosition", "legendPosition"));
+ this.add(new UpdateChartJsLink("StepSize", "stepSize"));
+ this.add(new UpdateChartJsLink("MinMax", "minMax"));
+ this.add(new UpdateChartJsLink("GridLines", "gridLines"));
+ this.add(new UpdateChartJsLink("MultilineLabels", "multiLineLabels"));
+ this.add(new UpdateChartJsLink("LogarithmicLineChart", "lineLogarithmic"));
+ this.add(new UpdateChartJsLink("LogarithmicScatterChart", "scatterLogarithmic"));
+ this.add(new UpdateChartJsLink("BubbleChart", "bubble"));
+ this.add(new UpdateChartJsLink("FilteringLabels", "filteringLabels"));
+ this.add(new UpdateChartJsLink("TimeLine", "timeLine"));
+ this.add(new UpdateChartJsLink("NonNumeric", "nonNumeric"));
+ this.add(new UpdateChartJsLink("TimePoint", "timePoint"));
+ this.add(new UpdateChartJsLink("TimeSeries", "timeSeries"));
+ this.add(new UpdateChartJsLink("TimeCombo", "timeCombo"));
+ this.add(new UpdateChartJsLink("OtherRadar", "radar2"));
+ this.add(new UpdateChartJsLink("Tooltip", "tooltip"));
+ this.add(new UpdateChartJsLink("TooltipHtml", "tooltipHtml"));
+ this.add(new UpdateChartJsLink("LegendPointStyle", "legendPointStyle"));
+ this.add(new UpdateChartJsLink("LineChartProgressBar", "lineProgressBar"));
+ this.add(new UpdateChartJsLink("DataLabellingChart", "dataLabelling"));
+ this.add(new UpdateChartJsLink("TooltipInteractions", "tooltipInteractions"));
+ }
+
+ /**
+ * Returns a List of Chart objects from the current page parameters.
+ * @param params the page parameters from the page URI
+ * @return a List of Chart objects
+ */
+ private List getChartFromParams(final PageParameters params) {
+ String chartString;
+ List config = new ArrayList<>();
+
+ //Get the parameters of the page
+ List pairs = params.getAllNamed();
+
+ //If the showcase is started without any parameters
+ //set the parameters to lineBasic and give us a line Chart
+ if(params.getAllNamed().size() == 0){
+ PageParameters temp = new PageParameters();
+ temp.add("chart", "lineBasic");
+ setResponsePage(HomepageChartJs.class, temp);
+ config.add(new Chart("chart", new LineChartBasicConfiguration()));
+ return config;
+ }
+
+ chartString = params.getAllNamed().get(0).getValue();
+ if(chartString == null) {
+ config.add(new Chart("chart", new LineChartBasicConfiguration()));
+ return config;
+ }
+
+ switch(chartString) {
+
+ case "barVertical":
+ config.add(new Chart("chart", new BarChartVerticalConfiguration()));
+ break;
+
+ case "barHorizontal":
+ config.add(new Chart("chart", new BarChartHorizontalConfiguration()));
+ break;
+
+ case "barMultiAxis":
+ config.add(new Chart("chart", new BarChartMultiAxisConfiguration()));
+ break;
+
+ case "barStacked":
+ config.add(new Chart("chart", new BarChartStackedConfiguration()));
+ break;
+
+ case "barStackedGroup":
+ config.add(new Chart("chart", new BarChartStackedGroupConfiguration()));
+ break;
+
+ case "lineBasic":
+ config.add(new Chart("chart", new LineChartBasicConfiguration()));
+ break;
+
+ case "lineMultiAxis":
+ config.add(new Chart("chart", new LineChartMultiAxisConfiguration()));
+ break;
+
+ case "lineStepped":
+ config.add(new Chart("chart", new LineChartSteppedBeforeConfiguration()));
+ config.add(new Chart("chart", new LineChartSteppedAfterConfiguration()));
+ break;
+
+ case "lineInterpolated":
+ config.add(new Chart("chart", new LineChartInterpolatedConfiguration()));
+ break;
+
+ case "lineStyles":
+ config.add(new Chart("chart", new LineStylesConfiguration()));
+ break;
+
+ case "pointStyles":
+ config.add(new Chart("chart", new PointStylesConfiguration()));
+ break;
+
+ case "pointSizes":
+ config.add(new Chart("chart", new LineChartWithDifferentPointSizesConfiguration()));
+ break;
+
+ case "areaLineBoundaries":
+ config.add(new Chart("chart", new AreaLineBoundariesChartStartConfiguration()));
+ config.add(new Chart("chart", new AreaLineBoundariesChartEndConfiguration()));
+ config.add(new Chart("chart", new AreaLineBoundariesChartOriginConfiguration()));
+ config.add(new Chart("chart", new AreaLineBoundariesChartFalseConfiguration()));
+ break;
+
+ case "lineDataset":
+ config.add(new Chart("chart", new LineChartAreaDatasetConfiguration()));
+ break;
+
+ case "lineStacked":
+ config.add(new Chart("chart", new LineChartStackedConfiguration()));
+ break;
+
+ case "radar":
+ config.add(new Chart("chart", new RadarChartConfiguration()));
+ break;
+
+ case "scatter":
+ config.add(new Chart("chart", new ScatterChartConfiguration()));
+ break;
+
+ case "scatterMultiAxis":
+ config.add(new Chart("chart", new ScatterChartMultiAxisConfiguration()));
+ break;
+
+ case "doughnut":
+ config.add(new Chart("chart", new DoughnutChartConfiguration()));
+ break;
+
+ case "pie":
+ config.add(new Chart("chart", new PieChartConfiguration()));
+ break;
+
+ case "polarArea":
+ config.add(new Chart("chart", new PolarAreaChartConfiguration()));
+ break;
+
+ case "radar2":
+ config.add(new Chart("chart", new OtherRadarChartConfiguration()));
+ break;
+
+ case "comboBarLine":
+ config.add(new Chart("chart", new ComboBarLineChartConfiguration()));
+ break;
+
+ case "stepSize":
+ config.add(new Chart("chart", new LinearStepSizeConfiguration()));
+ break;
+
+ case "minMax":
+ config.add(new Chart("chart", new MinMaxConfiguration()));
+ config.add(new Chart("chart", new MinMaxSuggestedConfiguration()));
+ break;
+
+ case "lineLogarithmic":
+ config.add(new Chart("chart", new LogarithmicLineChartConfiguration()));
+ break;
+
+ case "scatterLogarithmic":
+ config.add(new Chart("chart", new LogarithmicScatterChartConfiguration()));
+ break;
+
+ case "timeLine":
+ config.add(new Chart("chart", new TimeLineConfiguration()));
+ break;
+
+ case "timePoint":
+ config.add(new Chart("chart", new TimePointConfiguration()));
+ break;
+
+ case "timeSeries":
+ config.add(new Chart("chart", new TimeSeriesConfiguration()));
+ break;
+
+ case "timeCombo":
+ config.add(new Chart("chart", new TimeComboConfiguration()));
+ break;
+
+ case "gridLines":
+ config.add(new Chart("chart", new GridLinesBasicConfiguration()));
+ config.add(new Chart("chart", new GridLinesDisplayFalseConfiguration()));
+ config.add(new Chart("chart", new GridLinesDisplayFalseNoBorderConfiguration()));
+ config.add(new Chart("chart", new GridLinesChartAreaConfiguration()));
+ config.add(new Chart("chart", new GridLinesTicksConfiguration()));
+ config.add(new Chart("chart", new GridLineStylesConfiguration()));
+ break;
+
+ case "multiLineLabels":
+ config.add(new Chart("chart", new MultilineLabelsConfiguration()));
+ break;
+
+ case "filteringLabels":
+ config.add(new Chart("chart", new FilteringLabelsConfiguration()));
+ break;
+
+ case "nonNumeric":
+ config.add(new Chart("chart", new NonNumericConfiguration()));
+ break;
+
+ case "legendPosition":
+ config.add(new Chart("chart", new LegendPositionTopConfiguration()));
+ config.add(new Chart("chart", new LegendPositionRightConfiguration()));
+ config.add(new Chart("chart", new LegendPositionBottomConfiguration()));
+ config.add(new Chart("chart", new LegendPositionLeftConfiguration()));
+ break;
+
+ case "legendPointStyle":
+ config.add(new Chart("chart", new LegendPointStyleConfiguration()));
+ break;
+
+ case "tooltip":
+ config.add(new Chart("chart", new TooltipBorderConfiguration()));
+ config.add(new Chart("chart", new TooltipCallbacksConfiguration()));
+ config.add(new Chart("chart", new TooltipAverageConfiguration()));
+ config.add(new Chart("chart", new TooltipNearestConfiguration()));
+ break;
+
+ case "tooltipHtml":
+ config.add(new Chart("chart", new TooltipHtmlLineConfiguration()));
+ config.add(new Chart("chart", new TooltipHtmlPieConfiguration()));
+ config.add(new Chart("chart", new TooltipHtmlPointsConfiguration()));
+ break;
+
+ case "bubble":
+ config.add(new Chart("chart", new BubbleChartConfiguration()));
+ break;
+
+ case "lineProgressBar":
+ config.add(new Chart("chart", new LineChartProgressBarConfiguration()));
+ break;
+
+ case "dataLabelling":
+ config.add(new Chart("chart", new DataLabellingChartConfiguration()));
+ break;
+
+ case "tooltipInteractions":
+ config.add(new Chart("chart", new DatasetIntersectFalseConfiguration()));
+ config.add(new Chart("chart", new DatasetIntersectTrueConfiguration()));
+ config.add(new Chart("chart", new IndexIntersectFalseConfiguration()));
+ config.add(new Chart("chart", new IndexIntersectTrueConfiguration()));
+ config.add(new Chart("chart", new NearestIntersectFalseConfiguration()));
+ config.add(new Chart("chart", new NearestIntersectTrueConfiguration()));
+ config.add(new Chart("chart", new PointIntersectFalseConfiguration()));
+ config.add(new Chart("chart", new PointIntersectTrueConfiguration()));
+ config.add(new Chart("chart", new xIntersectFalseConfiguration()));
+ config.add(new Chart("chart", new xIntersectTrueConfiguration()));
+ config.add(new Chart("chart", new yIntersectFalseConfiguration()));
+ config.add(new Chart("chart", new yIntersectTrueConfiguration()));
+ break;
+
+ default:
+ config.add(new Chart("chart", new LineChartBasicConfiguration()));
+ break;
+ }
+ return config;
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.html b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.html
new file mode 100644
index 00000000..d33f1bff
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.html
@@ -0,0 +1,267 @@
+
+
+
+
+ Wicked Charts :: Showcase :: Wicket 8.x
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Wicked Charts
+
+
version @projectVersion@ :: Wicket @wicketVersion@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
To add a chart to your Wicket page, include the following HTML
+ and Java fragments into your code:
+
+
Markup:
+
+
+<!-- HTML code -->
+<div wicket:id="chart"/>
+
+
+
+
Wicket Page:
+
+
+// Java code
+Options options = new Options();
+options.setTitle(new Title("My Chart"));
+... // to see more options, select a chart below and click the button "Show Java code"
+add(new Chart("chart", options));
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.java
new file mode 100644
index 00000000..65df137d
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.java
@@ -0,0 +1,458 @@
+/*
+ * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
+ *
+ * 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 de.adesso.wickedcharts.showcase;
+
+import de.adesso.wickedcharts.highcharts.theme.*;
+import de.adesso.wickedcharts.showcase.links.ChartjsShowcaseLink;
+import de.adesso.wickedcharts.showcase.links.HighchartsShowcaseLink;
+import de.adesso.wickedcharts.showcase.links.UpdateHighchartLink;
+import de.adesso.wickedcharts.showcase.links.UpdateThemeLink;
+import de.adesso.wickedcharts.showcase.options.*;
+import de.adesso.wickedcharts.wicket8.highcharts.Chart;
+import org.apache.wicket.markup.head.IHeaderResponse;
+import org.apache.wicket.markup.head.OnDomReadyHeaderItem;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.request.mapper.parameter.INamedParameters;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * This page takes care of the Highcharts showcase logic.
+ * @author SvenWirz
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+public class HomepageHighcharts extends WebPage {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Constructs the page according to the current parameters
+ * This constructor is called each time a new chart or theme is
+ * selected.
+ * @param parameters the page parameters from the page URI
+ */
+ public HomepageHighcharts(final PageParameters parameters) {
+ Chart chart = getChartFromParams(parameters);
+ add(chart);
+ addNavigationLinks();
+ addCodeContainer(chart);
+ addChartLinks(getThemeString(parameters));
+ addThemeLinks(parameters);
+ }
+
+ /**
+ * Adds links to the different themes
+ * @param parameters the page parameters from the page URI
+ */
+ private void addThemeLinks(PageParameters parameters){
+ if (parameters.getAllNamed().size() < 2) {
+ add(new UpdateThemeLink("defaultTheme", "chart"));
+ add(new UpdateThemeLink("grid", "chart"));
+ add(new UpdateThemeLink("skies", "chart"));
+ add(new UpdateThemeLink("gray", "chart"));
+ add(new UpdateThemeLink("darkblue", "chart"));
+ } else {
+ String chartString = parameters.getAllNamed().get(1).getValue();
+ add(new UpdateThemeLink("defaultTheme", chartString));
+ add(new UpdateThemeLink("grid", chartString));
+ add(new UpdateThemeLink("skies", chartString));
+ add(new UpdateThemeLink("gray", chartString));
+ add(new UpdateThemeLink("darkblue", chartString));
+ }
+ }
+
+ /**
+ * Returns the name of the current theme from the page parameters
+ * @param parameters the page parameters from the page URI
+ * @return The name of the current theme
+ */
+ private String getThemeString(PageParameters parameters){
+ String themeString = "default";
+ if (parameters.getAllNamed().size() < 2) {
+ return themeString;
+ } else {
+ themeString= parameters.getAllNamed().get(0).getValue();
+ }
+ return themeString;
+ }
+
+ private void addNavigationLinks() {
+ add(new HighchartsShowcaseLink());
+ add(new ChartjsShowcaseLink());
+ }
+
+ /**
+ * Adds links to the charts in the navigation sidebar
+ */
+ private void addChartLinks(String theme) {
+ add(new UpdateHighchartLink("line", theme));
+ add(new UpdateHighchartLink("splineWithSymbols", theme));
+ add(new UpdateHighchartLink("irregularIntervals", theme));
+ add(new UpdateHighchartLink("logarithmicAxis", theme));
+ add(new UpdateHighchartLink("scatter", theme));
+ add(new UpdateHighchartLink("area", theme));
+ add(new UpdateHighchartLink("areaWithNegativeValues",theme));
+ add(new UpdateHighchartLink("stackedAndGroupedColumn", theme));
+ add(new UpdateHighchartLink("combo", theme));
+ add(new UpdateHighchartLink("donut", theme));
+ add(new UpdateHighchartLink("interactive", theme));
+ add(new UpdateHighchartLink("withDataLabels", theme));
+ add(new UpdateHighchartLink("zoomableTimeSeries", theme));
+ add(new UpdateHighchartLink("splineInverted", theme));
+ add(new UpdateHighchartLink("splineWithPlotBands", theme));
+ add(new UpdateHighchartLink("polar", theme));
+ add(new UpdateHighchartLink("percentageArea", theme));
+ add(new UpdateHighchartLink("areaMissing", theme));
+ add(new UpdateHighchartLink("areaInverted", theme));
+ add(new UpdateHighchartLink("areaSpline", theme));
+ add(new UpdateHighchartLink("areaSplineRange", theme));
+ add(new UpdateHighchartLink("basicBar", theme));
+ add(new UpdateHighchartLink("columnWithDrilldown", theme));
+ add(new UpdateHighchartLink("columnRotated", theme));
+ add(new UpdateHighchartLink("stackedBar", theme));
+ add(new UpdateHighchartLink("barNegativeStack", theme));
+ add(new UpdateHighchartLink("basicColumn", theme));
+ add(new UpdateHighchartLink("columnWithNegativeValues", theme));
+ add(new UpdateHighchartLink("stackedColumn", theme));
+ add(new UpdateHighchartLink("stackedArea", theme));
+ add(new UpdateHighchartLink("stackedPercentage", theme));
+ add(new UpdateHighchartLink("basicPie", theme));
+ add(new UpdateHighchartLink("pieWithGradient", theme));
+ add(new UpdateHighchartLink("pieWithLegend", theme));
+ add(new UpdateHighchartLink("splineUpdating", theme));
+ add(new UpdateHighchartLink("bubble", theme));
+ add(new UpdateHighchartLink("3dbubble", theme));
+ add(new UpdateHighchartLink("boxplot", theme));
+ add(new UpdateHighchartLink("angularGauge", theme));
+ add(new UpdateHighchartLink("spiderweb", theme));
+ add(new UpdateHighchartLink("windrose", theme));
+ add(new UpdateHighchartLink("columnrange", theme));
+ add(new UpdateHighchartLink("arearange", theme));
+ add(new UpdateHighchartLink("clicktoadd", theme));
+ add(new UpdateHighchartLink("dualAxes", theme));
+ add(new UpdateHighchartLink("scatterWithRegression", theme));
+ add(new UpdateHighchartLink("multipleAxes", theme));
+ add(new UpdateHighchartLink("errorBar", theme));
+ add(new UpdateHighchartLink("funnel", theme));
+ add(new UpdateHighchartLink("pyramid", theme));
+ add(new UpdateHighchartLink("heatmap", theme));
+ }
+
+
+ /**
+ * Adds a code container corresponding to the current chart
+ * @param chart The currently selected chart
+ */
+ private void addCodeContainer(Chart chart) {
+ Label codeContainer = new Label("code", new StringFromResourceModel(
+ chart.getOptions().getClass(), chart.getOptions().getClass().getSimpleName()
+ + ".java"));
+ codeContainer.setOutputMarkupId(true);
+ add(codeContainer);
+ }
+
+ /**
+ * Returns a Chart object from the current page parameters
+ * @param params the page parameters from the page URI
+ * @return a Chart
+ */
+ private Chart getChartFromParams(final PageParameters params) {
+ String chartString;
+ String themeString;
+ Chart config;
+
+ //If the showcase is started without any parameters
+ //set the parameters to lineBasic and give us a line Chart
+ if(params.getAllNamed().size() < 2){
+ PageParameters temp = new PageParameters();
+ temp.add("theme", "default");
+ temp.add("chart", "line");
+ setResponsePage(HomepageHighcharts.class, temp);
+ config = new Chart("chart", new BasicLineOptions(), null);
+ return config;
+ }
+
+ themeString = params.getAllNamed().get(0).getValue();
+ Theme theme = getThemeFromParams(themeString);
+ chartString = params.getAllNamed().get(1).getValue();
+
+ if(chartString == null) {
+ config = new Chart("chart", new BasicLineOptions(), theme);
+ return config;
+ }
+
+ switch(chartString) {
+ case "basicBar":
+ config = new Chart("chart", new BasicBarOptions(), theme);
+ break;
+
+ case "splineWithSymbols":
+ config = new Chart("chart", new SplineWithSymbolsOptions(), theme);
+ break;
+
+ case "irregularIntervals":
+ config = new Chart("chart", new TimeDataWithIrregularIntervalsOptions(), theme);
+ break;
+
+ case "logarithmicAxis":
+ config = new Chart("chart", new LogarithmicAxisOptions(), theme);
+ break;
+
+ case "scatter":
+ config = new Chart("chart", new ScatterPlotOptions(), theme);
+ break;
+
+ case "area":
+ config = new Chart("chart", new BasicAreaOptions(), theme);
+ break;
+
+ case "areaWithNegativeValues":
+ config = new Chart("chart", new AreaWithNegativeValuesOptions(), theme);
+ break;
+
+ case "stackedAndGroupedColumn":
+ config = new Chart("chart", new StackedAndGroupedColumnOptions(), theme);
+ break;
+
+ case "combo":
+ config = new Chart("chart", new ComboOptions(), theme);
+ break;
+
+ case "donut":
+ config = new Chart("chart", new DonutOptions(), theme);
+ break;
+
+ case "withDataLabels":
+ config = new Chart("chart", new LineWithDataLabelsOptions(), theme);
+ break;
+
+ case "zoomableTimeSeries":
+ config = new Chart("chart", new ZoomableTimeSeriesOptions(), theme);
+ break;
+
+ case "splineInverted":
+ config = new Chart("chart", new SplineWithInvertedAxisOptions(), theme);
+ break;
+
+ case "splineWithPlotBands":
+ config = new Chart("chart", new SplineWithPlotBandsOptions(), theme);
+ break;
+
+ case "polar":
+ config = new Chart("chart", new PolarOptions(), theme);
+ break;
+
+ case "stackedArea":
+ config = new Chart("chart", new StackedAreaOptions(), theme);
+ break;
+
+ case "percentageArea":
+ config = new Chart("chart", new PercentageAreaOptions(), theme);
+ break;
+
+ case "areaMissing":
+ config = new Chart("chart", new AreaMissingOptions(), theme);
+ break;
+
+ case "areaInverted":
+ config = new Chart("chart", new AreaInvertedAxisOptions(), theme);
+ break;
+
+ case "areaSpline":
+ config = new Chart("chart", new AreaSplineOptions(), theme);
+ break;
+
+ case "areaSplineRange":
+ config = new Chart("chart", new AreaSplineRangeOptions(), theme);
+ break;
+
+ case "columnWithDrilldown":
+ config = new Chart("chart", new ColumnWithDrilldownOptions(), theme);
+ break;
+
+ case "columnRotated":
+ config = new Chart("chart", new ColumnWithRotatedLabelsOptions(), theme);
+ break;
+
+ case "stackedBar":
+ config = new Chart("chart", new StackedBarOptions(), theme);
+ break;
+
+ case "barNegativeStack":
+ config = new Chart("chart", new StackedBarOptions(), theme);
+ break;
+
+ case "basicColumn":
+ config = new Chart("chart", new BasicColumnOptions(), theme);
+ break;
+
+ case "columnWithNegativeValues":
+ config = new Chart("chart", new ColumnWithNegativeValuesOptions(), theme);
+ break;
+
+ case "stackedColumn":
+ config = new Chart("chart", new StackedColumnOptions(), theme);
+ break;
+
+ case "stackedPercentage":
+ config = new Chart("chart", new StackedPercentageOptions(), theme);
+ break;
+
+ case "basicPie":
+ config = new Chart("chart", new BasicPieOptions(), theme);
+ break;
+
+ case "pieWithGradient":
+ config = new Chart("chart", new PieWithGradientOptions(), theme);
+ break;
+
+ case "pieWithLegend":
+ config = new Chart("chart", new PieWithLegendOptions(), theme);
+ break;
+
+ case "splineUpdating":
+ config = new Chart("chart", new WicketSplineUpdatingOptions(), theme);
+ break;
+
+ case "bubble":
+ config = new Chart("chart", new BubbleChartOptions(), theme);
+ break;
+
+ case "3dbubble":
+ config = new Chart("chart", new BubbleChart3DOptions(), theme);
+ break;
+
+ case "boxplot":
+ config = new Chart("chart", new BoxplotChartOptions(), theme);
+ break;
+
+ case "interactive":
+ config = new Chart("chart", new InteractionOptions(), theme);
+ break;
+
+ case "angularGauge":
+ config = new Chart("chart", new AngularGaugeOptions(), theme);
+ break;
+
+ case "spiderweb":
+ config = new Chart("chart", new SpiderwebOptions(), theme);
+ break;
+
+ case "windrose":
+ config = new Chart("chart", new WindroseOptions(), theme);
+ break;
+
+ case "columnrange":
+ config = new Chart("chart", new ColumnRangeOptions(), theme);
+ break;
+
+ case "arearange":
+ config = new Chart("chart", new AreaRangeOptions(), theme);
+ break;
+
+ case "clicktoadd":
+ config = new Chart("chart", new ClickToAddAPointOptions(), theme);
+ break;
+
+ case "dualAxes":
+ config = new Chart("chart", new DualAxesOptions(), theme);
+ break;
+
+ case "scatterWithRegression":
+ config = new Chart("chart", new ScatterWithRegressionLineOptions(), theme);
+ break;
+
+ case "multipleAxes":
+ config = new Chart("chart", new MultipleAxesOptions(), theme);
+ break;
+
+ case "errorBar":
+ config = new Chart("chart", new ErrorBarOptions(), theme);
+ break;
+
+ case "funnel":
+ config = new Chart("chart", new FunnelOptions(), theme);
+ break;
+
+ case "pyramid":
+ config = new Chart("chart", new PyramidOptions(), theme);
+ break;
+
+ case "heatmap":
+ config = new Chart("chart", new HeatmapOptions(), theme);
+ break;
+
+ default:
+ config = new Chart("chart", new BasicLineOptions(), theme);
+ break;
+ }
+ return config;
+ }
+
+ private Theme getThemeFromParams(String themeString) {
+ if ("grid".equals(themeString)) {
+ return new GridTheme();
+ } else if ("skies".equals(themeString)) {
+ return new SkiesTheme();
+ } else if ("gray".equals(themeString)) {
+ return new GrayTheme();
+ } else if ("darkblue".equals(themeString)) {
+ return new DarkBlueTheme();
+ } else {
+ // default theme
+ return null;
+ }
+ }
+
+ /**
+ * Used in the renderHead method to highlight the currently
+ * selected theme tab
+ * @return the index of the currently selected theme tab
+ */
+ private int getSelectedTab() {
+ String theme = "default";
+ List pairs = getPageParameters().getAllNamed();
+ theme = pairs.get(0).getValue();
+ if ("grid".equals(theme)) {
+ return 1;
+ } else if ("skies".equals(theme)) {
+ return 2;
+ } else if ("gray".equals(theme)) {
+ return 3;
+ } else if ("darkblue".equals(theme)) {
+ return 4;
+ } else if ("darkgreen".equals(theme)) {
+ return 5;
+ } else {
+ return 0;
+ }
+ }
+
+ /**
+ * Highlights the currently selected theme tab
+ * @param response .
+ */
+ @Override
+ public void renderHead(final IHeaderResponse response) {
+ // select bootstrap tab for current theme selected
+ int selectedTab = this.getSelectedTab();
+ response.render(OnDomReadyHeaderItem.forScript("$('#themes li:eq("
+ + selectedTab + ") a').tab('show');"));
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/NoIDMount.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/NoIDMount.java
new file mode 100644
index 00000000..b68cee08
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/NoIDMount.java
@@ -0,0 +1,29 @@
+package de.adesso.wickedcharts.showcase;
+
+import org.apache.wicket.core.request.mapper.MountedMapper;
+import org.apache.wicket.request.Url;
+import org.apache.wicket.request.component.IRequestablePage;
+import org.apache.wicket.request.mapper.info.PageComponentInfo;
+import org.apache.wicket.request.mapper.parameter.PageParametersEncoder;
+import org.apache.wicket.util.string.Strings;
+
+public class NoIDMount extends MountedMapper {
+
+ NoIDMount(String path, Class extends IRequestablePage> pageClass) {
+ super(path, pageClass, new PageParametersEncoder());
+ }
+
+ @Override protected void encodePageComponentInfo(Url url, PageComponentInfo info) {
+ if (info != null) {
+ String s = info.toString();
+ if (!Strings.isEmpty(s)) {
+ try{ //If the resulting parameter is not a number then we add it to the url
+ Integer.parseInt(s);
+ }catch (NumberFormatException e){
+ Url.QueryParameter parameter = new Url.QueryParameter(s, "");
+ url.getQueryParameters().add(parameter);
+ }
+ }
+ }
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseApplication.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseApplication.java
new file mode 100644
index 00000000..344c4c6c
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseApplication.java
@@ -0,0 +1,68 @@
+/**
+ * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
+ *
+ * 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 de.adesso.wickedcharts.showcase;
+
+
+import de.adesso.wickedcharts.showcase.ie.SimplePage;
+import de.adesso.wickedcharts.showcase.modalwindow.ModalWindowPage;
+import de.adesso.wickedcharts.wicket8.JavaScriptResourceRegistry;
+import org.apache.wicket.Session;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.protocol.http.WebApplication;
+import org.apache.wicket.request.Request;
+import org.apache.wicket.request.Response;
+import org.apache.wicket.request.resource.JavaScriptResourceReference;
+import org.springframework.stereotype.Component;
+
+/**
+ * Application object for your web application. If you want to run this
+ * application without deploying, run `gradle bootRun` in wicked-charts-showcase-wicket7/
+ */
+@Component
+public class ShowcaseApplication extends WebApplication {
+ /**
+ * @see org.apache.wicket.Application#getHomePage()
+ */
+ @Override
+ public Class extends WebPage> getHomePage() {
+ return HomepageChartJs.class;
+ }
+
+ /**
+ * @see org.apache.wicket.Application#init()
+ */
+ @Override
+ public void init() {
+ super.init();
+ JavaScriptResourceRegistry.getInstance().setJQueryReference(
+ new JavaScriptResourceReference(ShowcaseApplication.class,
+ "jquery-1.8.3.min-IEfix.js"));
+
+ mount(new NoIDMount("/chartjs/${chart}", HomepageChartJs.class));
+ mount(new NoIDMount("/highcharts/${theme}/${chart}", HomepageHighcharts.class));
+ mount(new NoIDMount("/simple", SimplePage.class));
+ mount(new NoIDMount("/modal", ModalWindowPage.class));
+
+ getJavaScriptLibrarySettings().setJQueryReference(
+ new JavaScriptResourceReference(ShowcaseApplication.class,
+ "jquery-1.8.3.min-IEfix.js"));
+ }
+
+ @Override
+ public Session newSession(final Request request, final Response response) {
+ return new ShowcaseSession(request);
+ }
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseSession.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseSession.java
new file mode 100644
index 00000000..effba840
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseSession.java
@@ -0,0 +1,50 @@
+/**
+ * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
+ *
+ * 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 de.adesso.wickedcharts.showcase;
+
+import de.adesso.wickedcharts.chartjs.ChartConfiguration;
+import de.adesso.wickedcharts.highcharts.options.Options;
+import org.apache.wicket.protocol.http.WebSession;
+import org.apache.wicket.request.Request;
+
+public class ShowcaseSession extends WebSession {
+
+ private static final long serialVersionUID = 1L;
+
+ private Options currentHighchartOptions;
+
+ private ChartConfiguration currentChartjsConfiguration;
+
+ public ShowcaseSession(final Request request) {
+ super(request);
+ }
+
+ public Options getCurrentChartOptions() {
+ return this.currentHighchartOptions;
+ }
+
+ public void setCurrentHighchartOptions(final Options currentHighchartOptions) {
+ this.currentHighchartOptions = currentHighchartOptions;
+ }
+
+ public void setCurrentChartjsConfiguration(final ChartConfiguration currentChartjsConfiguration) {
+ this.currentChartjsConfiguration = currentChartjsConfiguration;
+ }
+
+ public ChartConfiguration getCurrentChartjsConfiguration() {
+ return currentChartjsConfiguration;
+ }
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.html b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.html
new file mode 100644
index 00000000..e8a1a330
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.html
@@ -0,0 +1,22 @@
+
+
+
+
+
panel
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.java
new file mode 100644
index 00000000..846f9ad0
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.java
@@ -0,0 +1,14 @@
+package de.adesso.wickedcharts.showcase;
+
+import de.adesso.wickedcharts.wicket8.chartjs.Chart;
+
+/**
+ * Wicket-component that adds the chart configuration and a smaller markup to the page.
+ */
+public class SmallChartComponent extends ChartComponent {
+
+ public SmallChartComponent(Chart chart)
+ {
+ super(chart);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/StringFromResourceModel.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/StringFromResourceModel.java
new file mode 100644
index 00000000..6fb81f90
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/StringFromResourceModel.java
@@ -0,0 +1,70 @@
+/**
+ * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
+ *
+ * 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 de.adesso.wickedcharts.showcase;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.wicket.model.IModel;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+public class StringFromResourceModel implements IModel {
+
+ private static final long serialVersionUID = 1L;
+
+ private String modelObject;
+
+ public StringFromResourceModel(Class> scope, String resourceName) {
+ InputStream in = null;
+ BufferedReader reader = null;
+ try {
+ in = scope.getResourceAsStream(resourceName);
+ reader = new BufferedReader(
+ new InputStreamReader(in));
+ StringBuffer stringBuffer = new StringBuffer();
+ String line;
+ while ((line = reader.readLine()) != null) {
+ stringBuffer.append(line);
+ stringBuffer.append("\n");
+ }
+ this.modelObject = stringBuffer.toString();
+ } catch (IOException e) {
+ throw new RuntimeException("Error reading resource '"
+ + resourceName + "' from class '" + scope.getName() + "'.",
+ e);
+ } finally {
+ IOUtils.closeQuietly(in);
+ IOUtils.closeQuietly(reader);
+ }
+ }
+
+ @Override
+ public void detach() {
+ // do nothing
+ }
+
+ @Override
+ public String getObject() {
+ return this.modelObject;
+ }
+
+ @Override
+ public void setObject(String object) {
+ this.modelObject = object;
+ }
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/boot/ShowcaseBooter.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/boot/ShowcaseBooter.java
new file mode 100644
index 00000000..7815427f
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/boot/ShowcaseBooter.java
@@ -0,0 +1,16 @@
+package de.adesso.wickedcharts.showcase.boot;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.ComponentScan;
+
+// excluding configurations since they are not compatible with libraries within the application
+@SpringBootApplication
+@ComponentScan("de.adesso.wickedcharts.showcase")
+public class ShowcaseBooter {
+
+ public static void main(String[] args) {
+ SpringApplication.run(ShowcaseBooter.class, args);
+ }
+
+}
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/boot/WarInitializer.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/boot/WarInitializer.java
new file mode 100644
index 00000000..88afcbe8
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/boot/WarInitializer.java
@@ -0,0 +1,19 @@
+package de.adesso.wickedcharts.showcase.boot;
+
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.support.SpringBootServletInitializer;
+
+/**
+ * This class is needed for deployment on an application server.
+ * It is the counterpart of the main method in WicketWebApplication.
+ *
+ * @author Stefan Kloe
+ */
+public class WarInitializer extends SpringBootServletInitializer {
+
+ @Override
+ protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
+ return application.sources(ShowcaseBooter.class);
+ }
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/boot/WebInitializer.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/boot/WebInitializer.java
new file mode 100644
index 00000000..36371a14
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/boot/WebInitializer.java
@@ -0,0 +1,26 @@
+package de.adesso.wickedcharts.showcase.boot;
+
+import org.apache.wicket.protocol.http.WicketFilter;
+import org.apache.wicket.spring.SpringWebApplicationFactory;
+import org.springframework.boot.web.servlet.ServletContextInitializer;
+import org.springframework.context.annotation.Configuration;
+
+import javax.servlet.FilterRegistration;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+
+@Configuration
+public class WebInitializer implements ServletContextInitializer {
+
+ @Override
+ public void onStartup(ServletContext sc) throws ServletException {
+ FilterRegistration filter = sc.addFilter("wicket-filter",
+ WicketFilter.class);
+ filter.setInitParameter(WicketFilter.APP_FACT_PARAM,
+ SpringWebApplicationFactory.class.getName());
+ filter.setInitParameter("applicationBean", "showcaseApplication");
+ filter.setInitParameter(WicketFilter.FILTER_MAPPING_PARAM, "/*");
+ filter.addMappingForUrlPatterns(null, false, "/*");
+ }
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartEndConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartEndConfiguration.java
new file mode 100644
index 00000000..bfcd00db
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartEndConfiguration.java
@@ -0,0 +1,65 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how the 'end' fill option works
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/line-boundaries.html
+ *
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class AreaLineBoundariesChartEndConfiguration extends ShowcaseConfiguration {
+ public AreaLineBoundariesChartEndConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(-40, 20, 30, -70, 12, 60, -30))
+ .setFill(BoundaryFillingMode.END);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setMaintainAspectRatio(true)
+ .setSpanGaps(false)
+ .setElements(new Element()
+ .setLine(new Line()
+ .setTension(0.000001)))
+ .setPlugins(new Plugins().
+ setFiller(new Filler().
+ setPropagate(false)))
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Boundaries Chart - End"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month"))
+ .setTicks(new Ticks()
+ .setAutoSkip(false)
+ .setMaxRotation(0))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartFalseConfiguration.java
new file mode 100644
index 00000000..0ac5393a
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartFalseConfiguration.java
@@ -0,0 +1,63 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how the 'false' fill option works
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/line-boundaries.html
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class AreaLineBoundariesChartFalseConfiguration extends ShowcaseConfiguration {
+ public AreaLineBoundariesChartFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(-40, 20, 30, -70, 12, 60, -30))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setMaintainAspectRatio(true)
+ .setSpanGaps(false)
+ .setElements(new Element()
+ .setLine(new Line()
+ .setTension(0.000001)))
+ .setPlugins(new Plugins().
+ setFiller(new Filler().
+ setPropagate(false)))
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Boundaries Chart - False"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month"))
+ .setTicks(new Ticks()
+ .setAutoSkip(false)
+ .setMaxRotation(0))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartOriginConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartOriginConfiguration.java
new file mode 100644
index 00000000..7bca9aeb
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartOriginConfiguration.java
@@ -0,0 +1,65 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how the 'origin' fill option works
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/line-boundaries.html
+ *
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class AreaLineBoundariesChartOriginConfiguration extends ShowcaseConfiguration {
+ public AreaLineBoundariesChartOriginConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(-40, 20, 30, -70, 12, 60, -30))
+ .setFill(BoundaryFillingMode.ORIGIN);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setMaintainAspectRatio(true)
+ .setSpanGaps(false)
+ .setElements(new Element()
+ .setLine(new Line()
+ .setTension(0.000001)))
+ .setPlugins(new Plugins().
+ setFiller(new Filler().
+ setPropagate(false)))
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Boundaries Chart - Origin"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month"))
+ .setTicks(new Ticks()
+ .setAutoSkip(false)
+ .setMaxRotation(0))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartStartConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartStartConfiguration.java
new file mode 100644
index 00000000..8905576a
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartStartConfiguration.java
@@ -0,0 +1,65 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how the 'start' fill option works
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/line-boundaries.html
+ *
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class AreaLineBoundariesChartStartConfiguration extends ShowcaseConfiguration {
+ public AreaLineBoundariesChartStartConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(-40, 20, 30, -70, 12, 60, -30))
+ .setFill(BoundaryFillingMode.START);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setMaintainAspectRatio(true)
+ .setSpanGaps(false)
+ .setElements(new Element()
+ .setLine(new Line()
+ .setTension(0.000001)))
+ .setPlugins(new Plugins().
+ setFiller(new Filler().
+ setPropagate(false)))
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Boundaries Chart - Start"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month"))
+ .setTicks(new Ticks()
+ .setAutoSkip(false)
+ .setMaxRotation(0))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartHorizontalConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartHorizontalConfiguration.java
new file mode 100644
index 00000000..7178325e
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartHorizontalConfiguration.java
@@ -0,0 +1,65 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * A sample that shows how a horizontal bar chart configuration looks.
+ */
+
+/**
+ *
+ * A sample that shows how a horizontal bar chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/bar/horizontal.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class BarChartHorizontalConfiguration extends ShowcaseConfiguration {
+ public BarChartHorizontalConfiguration() {
+ super();
+ setType(ChartType.HORIZONTAL_BAR);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setElements(new Rectangle())
+ .setLegend(new Legend()
+ .setPosition(Position.RIGHT))
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Horizontal Bar Chart"))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartMultiAxisConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartMultiAxisConfiguration.java
new file mode 100644
index 00000000..1573712e
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartMultiAxisConfiguration.java
@@ -0,0 +1,80 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * A sample that shows how a multi-axis bar chart configuration looks.
+ */
+
+/**
+ *
+ * A sample that shows how a multi-axis bar chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/bar/multi-axis.html
+ *
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class BarChartMultiAxisConfiguration extends ShowcaseConfiguration{
+ public BarChartMultiAxisConfiguration() {
+ setType(ChartType.BAR);
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setYAxisID("y-axis-1");
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setYAxisID("y-axis-2");
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Bar Chart - Multi Axis"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setScales(new Scales()
+ .setYAxes(Arrays.asList(new AxesScale()
+ .setType("linear")
+ .setDisplay(true)
+ .setPosition(Position.LEFT)
+ .setId("y-axis-1"),
+ new AxesScale()
+ .setType("linear")
+ .setDisplay(true)
+ .setPosition(Position.RIGHT)
+ .setId("y-axis-2")
+ .setGridLines(new GridLines()
+ .setDrawOnChartArea(false)))))
+
+ ;
+ setOptions(options);
+
+ }
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedConfiguration.java
new file mode 100644
index 00000000..20a05db5
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedConfiguration.java
@@ -0,0 +1,88 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * A sample that shows how a stacked bar chart configuration looks.
+ */
+
+/**
+ *
+ * A sample that shows how a stack bar chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/bar/stacked.html
+ *
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class BarChartStackedConfiguration extends ShowcaseConfiguration {
+ public BarChartStackedConfiguration() {
+ setType(ChartType.STACKED_BAR);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setStack("1");
+
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setStack("1");
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("Dataset 3")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setStack("1");
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2, dataset3));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Bar Chart - Stacked"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setStacked(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setStacked(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedGroupConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedGroupConfiguration.java
new file mode 100644
index 00000000..cd1cea4f
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedGroupConfiguration.java
@@ -0,0 +1,86 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * A sample that shows how a stacked group bar chart configuration looks.
+ */
+
+/**
+ *
+ * A sample that shows how a stacked bar chart group configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/bar/stacked-group.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class BarChartStackedGroupConfiguration extends ShowcaseConfiguration {
+ public BarChartStackedGroupConfiguration() {
+ setType(ChartType.STACKED_BAR);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setStack("0");
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setStack("0");
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("Dataset 3")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setStack("1");
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2, dataset3));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Bar Chart - Stacked Groups"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setStacked(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setStacked(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartVerticalConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartVerticalConfiguration.java
new file mode 100644
index 00000000..c0275a09
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartVerticalConfiguration.java
@@ -0,0 +1,61 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * A sample that shows how a vertical bar chart configuration looks.
+ */
+
+/**
+ *
+ * A sample that shows how a vertical bar chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/bar/vertical.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class BarChartVerticalConfiguration extends ShowcaseConfiguration {
+ public BarChartVerticalConfiguration() {
+ super();
+ setType(ChartType.BAR);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderWidth(1)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Bar Chart"))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/BubbleChartConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/BubbleChartConfiguration.java
new file mode 100644
index 00000000..ba8c44d3
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/BubbleChartConfiguration.java
@@ -0,0 +1,103 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.BubbleValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+import java.util.Random;
+
+/**
+ *
+ * A sample that shows how a bubble chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/scriptable/bubble.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class BubbleChartConfiguration extends ShowcaseConfiguration {
+ public BubbleChartConfiguration() {
+ super();
+ setType(ChartType.BUBBLE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.YELLOW)
+ .setHoverBackgroundColor(SimpleColor.WHITE)
+ .setHoverBorderColor(SimpleColor.RED)
+ .setHoverBorderWidth(10.0)
+ .setData(Arrays.asList(
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100))
+ ))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setHoverBackgroundColor(SimpleColor.WHITE)
+ .setHoverBorderColor(SimpleColor.RED)
+ .setHoverBorderWidth(10.0)
+ .setData(Arrays.asList(
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100))
+ ))
+ .setFill(false);
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("My Third dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.YELLOW)
+ .setHoverBackgroundColor(SimpleColor.WHITE)
+ .setHoverBorderColor(SimpleColor.RED)
+ .setHoverBorderWidth(10.0)
+ .setData(Arrays.asList(
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100)),
+ new BubbleValue(randomDouble(100),randomDouble(100),randomDouble(100))
+ ))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2,dataset3));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setAspectRatio((double)1)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Bubble Chart"))
+ ;
+ setOptions(options);
+
+
+ }
+
+ private Double randomDouble(int bound) {
+ Random random = new Random();
+ return (double)random.nextInt(bound)+1;
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/ComboBarLineChartConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/ComboBarLineChartConfiguration.java
new file mode 100644
index 00000000..02987aff
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/ComboBarLineChartConfiguration.java
@@ -0,0 +1,64 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+
+/**
+ *
+ * A sample that shows how a combo bar-line chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/combo-bar-line.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class ComboBarLineChartConfiguration extends ShowcaseConfiguration {
+ public ComboBarLineChartConfiguration() {
+ super();
+ setType(ChartType.BAR);
+ Data data = new Data();
+ Dataset dataset1 = new Dataset();
+ dataset1.setType(ChartType.LINE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderWidth(2)
+ .setFill(false)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setLabel("Dataset 1");
+
+ Dataset dataset2 = new Dataset()
+ .setType(ChartType.BAR)
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.WHITE)
+ .setBorderWidth(2)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setLabel("Dataset 2");
+
+ Dataset dataset3 = new Dataset()
+ .setType(ChartType.BAR)
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setLabel("Dataset 3");
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2,dataset3))
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+
+ setData(data);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Combo Bar Line Chart"))
+ .setTooltips(new Tooltips()
+ .setIntersect(true)
+ .setMode(TooltipMode.INDEX));
+ setOptions(options);
+
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/DataLabellingChartConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/DataLabellingChartConfiguration.java
new file mode 100644
index 00000000..999a7bd3
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/DataLabellingChartConfiguration.java
@@ -0,0 +1,71 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+
+/**
+ *
+ * A sample that shows how a combo bar-line chart configuration with data labelling.
+ *
+ * @see http://www.chartjs.org/samples/latest/advanced/data-labelling.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class DataLabellingChartConfiguration extends ShowcaseConfiguration {
+ public DataLabellingChartConfiguration() {
+ super();
+ setType(ChartType.BAR);
+ String optionalJavascript=readFile("de/adesso/wickedcharts/showcase/dataLabellingPlugin.js");
+
+ setOptionalJavascript(new ArrayList());
+ addOptionalJavascript(optionalJavascript);
+
+ Data data = new Data();
+ Dataset dataset1 = new Dataset();
+ dataset1.setType(ChartType.LINE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderWidth(2)
+ .setFill(false)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setLabel("Dataset 1");
+
+ Dataset dataset2 = new Dataset()
+ .setType(ChartType.BAR)
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.WHITE)
+ .setBorderWidth(2)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setLabel("Dataset 2");
+
+ Dataset dataset3 = new Dataset()
+ .setType(ChartType.BAR)
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setLabel("Dataset 3");
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2,dataset3))
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+
+ setData(data);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Combo Bar Line Chart"))
+ .setTooltips(new Tooltips()
+ .setIntersect(true)
+ .setMode(TooltipMode.INDEX));
+ setOptions(options);
+
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/DoughnutChartConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/DoughnutChartConfiguration.java
new file mode 100644
index 00000000..71103554
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/DoughnutChartConfiguration.java
@@ -0,0 +1,50 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a doughnut configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/doughnut.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class DoughnutChartConfiguration extends ShowcaseConfiguration {
+ public DoughnutChartConfiguration() {
+ super();
+ setType(ChartType.DOUGHNUT);
+
+ Data data = new Data();
+
+ Dataset dataset = new Dataset()
+ .setData(IntegerValue.of(randomIntegerList(5)))
+ .setBackgroundColor(
+ Arrays.asList(SimpleColor.RED,SimpleColor.ORANGE, SimpleColor.YELLOW, SimpleColor.GREEN, SimpleColor.BLUE))
+ .setLabel("Dataset 1");
+
+ data.setDatasets(Arrays.asList(dataset)).setLabels(TextLabel.of("Red", "Orange", "Yellow", "Green", "Blue"));
+
+ setData(data);
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("ChartJs Doughnut Chart"))
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setAnimation(new Animation()
+ .setAnimateScale(true)
+ .setAnimateRotate(true));
+ setOptions(options);
+
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/FilteringLabelsConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/FilteringLabelsConfiguration.java
new file mode 100644
index 00000000..bc7a4aa4
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/FilteringLabelsConfiguration.java
@@ -0,0 +1,68 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a chart with label filtering is configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/filtering-labels.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class FilteringLabelsConfiguration extends ShowcaseConfiguration {
+ public FilteringLabelsConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart - X-Axis Filter"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month"))
+ .setTicks(new Ticks()
+ .setCallback(
+ new CallbackFunction("function(dataLabel, index) {\r\n" +
+ " // Hide the label of every 2nd dataset. return null to hide the grid line too\r\n" +
+ " return index % 2 === 0 ? dataLabel : '';}"))))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setBeginAtZero(true)))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LegendPointStyleConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LegendPointStyleConfiguration.java
new file mode 100644
index 00000000..14938151
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LegendPointStyleConfiguration.java
@@ -0,0 +1,71 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how different point style configurations look.
+ *
+ * @see http://www.chartjs.org/samples/latest/legend/point-style.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LegendPointStyleConfiguration extends ShowcaseConfiguration {
+ public LegendPointStyleConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setPointStyle(PointStyle.RECT_ROT)
+ .setPointRadius(10)
+ .setData(IntegerValue.of(-40, 20, 30, -70, 12, 60, -30))
+ .setFill(BoundaryFillingMode.ORIGIN);
+
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Point Style Legend"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setLegend(new Legend()
+ .setLabels(new LegendLabel()
+ .setUsePointStyle(true)))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartAreaDatasetConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartAreaDatasetConfiguration.java
new file mode 100644
index 00000000..af88eb23
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartAreaDatasetConfiguration.java
@@ -0,0 +1,143 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.AbsoluteIndex;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.RelativeIndex;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a chart with different datasets can be configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/line-datasets.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartAreaDatasetConfiguration extends ShowcaseConfiguration {
+ public LineChartAreaDatasetConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset0 = new Dataset()
+ .setLabel("D0 (hidden), Fill: undefined")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(BoundaryFillingMode.UNDEFINED)
+ .setHidden(true);
+
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("D1 Fill: -1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(new RelativeIndex("-1"));
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("D2 (hidden) Fill: 1")
+ .setBackgroundColor(SimpleColor.ORANGE_TRANSPARENT)
+ .setBorderColor(SimpleColor.ORANGE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setHidden(true)
+ .setFill(new AbsoluteIndex(1));
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("D3 Fill: -1")
+ .setBackgroundColor(SimpleColor.YELLOW_TRANSPARENT)
+ .setBorderColor(SimpleColor.YELLOW)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset4 = new Dataset()
+ .setLabel("D4 Fill: -1")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(new RelativeIndex("-1"));
+
+ Dataset dataset5 = new Dataset()
+ .setLabel("D5 Fill: +2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(new RelativeIndex("+2"));
+
+
+ Dataset dataset6 = new Dataset()
+ .setLabel("D6 Fill: false")
+ .setBackgroundColor(SimpleColor.GREY_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREY)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ Dataset dataset7 = new Dataset()
+ .setLabel("D7 Fill: 8")
+ .setBackgroundColor(SimpleColor.PURPLE_TRANSPARENT)
+ .setBorderColor(SimpleColor.PURPLE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(new AbsoluteIndex(8));
+
+
+ Dataset dataset8 = new Dataset()
+ .setLabel("D8 (hidden) Fill: end")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setHidden(true)
+ .setFill(BoundaryFillingMode.END);
+
+ data.setDatasets(Arrays.asList(dataset0, dataset1, dataset2, dataset3, dataset4,
+ dataset5, dataset6, dataset7, dataset8));
+
+ Options options = new Options()
+ .setMaintainAspectRatio(true)
+ .setSpanGaps(false)
+ .setElements(new Element()
+ .setLine(new Line()
+ .setTension(0.000001)))
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Dataset Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setPlugins(new Plugins()
+ .setFiller(new Filler()
+ .setPropagate(false))
+ .setSamples_filler_analyzer(new SamplesFillerAnalyzer()
+ .setTarget("chart-analyzer")))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setStacked(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartBasicConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartBasicConfiguration.java
new file mode 100644
index 00000000..49e6c1af
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartBasicConfiguration.java
@@ -0,0 +1,72 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample of a basic line chart configuration.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/basic.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LineChartBasicConfiguration extends ShowcaseConfiguration {
+ public LineChartBasicConfiguration() {
+
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartInterpolatedConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartInterpolatedConfiguration.java
new file mode 100644
index 00000000..5b51dafd
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartInterpolatedConfiguration.java
@@ -0,0 +1,84 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ *
+ * A sample that shows how configuring interpolation of lines in a line chart is configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/interpolation-modes.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartInterpolatedConfiguration extends ShowcaseConfiguration {
+ public LineChartInterpolatedConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ List datasetsData = IntegerValue.of(randomIntegerList(7));
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Cubic interpolation (monotone)")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(datasetsData)
+ .setFill(false)
+ .setCubicInterpolationMode(CubicInterpolationMode.MONOTONE);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Cubic interpolation (default)")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(datasetsData)
+ .setFill(false);
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("Linear interpolation")
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(datasetsData)
+ .setFill(false)
+ .setLineTension(0);
+
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2, dataset3));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart Interpolation"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartMultiAxisConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartMultiAxisConfiguration.java
new file mode 100644
index 00000000..fe82651a
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartMultiAxisConfiguration.java
@@ -0,0 +1,76 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how multiple axes in a line chart are configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/multi-axis.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartMultiAxisConfiguration extends ShowcaseConfiguration{
+ public LineChartMultiAxisConfiguration() {
+ setType(ChartType.LINE);
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setYAxisID("y-axis-1");
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setYAxisID("y-axis-2");
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart - Multi Axis"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setScales(new Scales()
+ .setYAxes(Arrays.asList(new AxesScale()
+ .setType("linear")
+ .setDisplay(true)
+ .setPosition(Position.LEFT)
+ .setId("y-axis-1"),
+ new AxesScale()
+ .setType("linear")
+ .setDisplay(true)
+ .setPosition(Position.RIGHT)
+ .setId("y-axis-2")
+ .setGridLines(new GridLines()
+ .setDrawOnChartArea(false)))))
+
+ ;
+ setOptions(options);
+
+ }
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartProgressBarConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartProgressBarConfiguration.java
new file mode 100644
index 00000000..cf6f940d
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartProgressBarConfiguration.java
@@ -0,0 +1,95 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import org.apache.wicket.markup.html.panel.Fragment;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a line chart with a progress bar is configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/advanced/progress-bar.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartProgressBarConfiguration extends ShowcaseConfiguration {
+ public LineChartProgressBarConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ String optionalJavascript= readFile("de/adesso/wickedcharts/showcase/progressBar.js");
+
+ setOptionalJavascript(new ArrayList());
+ addOptionalJavascript(optionalJavascript);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart Progress Bar"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setAnimation(new Animation()
+ .setDuration(2000)
+ .setOnProgress(new CallbackFunction("function(animation) {\r\n" +
+ " progress.value = animation.currentStep / animation.numSteps;\r\n" +
+ " }"))
+ .setOnComplete(new CallbackFunction("function(animation) {\r\n" +
+ " window.setTimeout(function() {\r\n" +
+ " progress.value = 0;\r\n" +
+ " }, 2000);\r\n" +
+ " }")))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+
+ @Override
+ public void modfiyIndividualMarkup(Fragment optionalMarkup) {
+ Fragment frag = new Fragment("optionalMarkup","progressBar",optionalMarkup.getParent());
+ optionalMarkup.replaceWith(frag);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartStackedConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartStackedConfiguration.java
new file mode 100644
index 00000000..383c7a06
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartStackedConfiguration.java
@@ -0,0 +1,77 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a stacked line chart is configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/line-stacked.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartStackedConfiguration extends ShowcaseConfiguration{
+ public LineChartStackedConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("My Third dataset")
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2, dataset3));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Stacked Line Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setStacked(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedAfterConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedAfterConfiguration.java
new file mode 100644
index 00000000..cc3da325
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedAfterConfiguration.java
@@ -0,0 +1,66 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a stepped line chart configuration looks with stepped = after.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/stepped.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartSteppedAfterConfiguration extends ShowcaseConfiguration {
+ public LineChartSteppedAfterConfiguration() {
+ super();
+ setType(ChartType.LINE);
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Stepped After")
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setSteppedLine(SteppedLineValue.AFTER);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart Stepped - After"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedBeforeConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedBeforeConfiguration.java
new file mode 100644
index 00000000..4cfde004
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedBeforeConfiguration.java
@@ -0,0 +1,65 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a stepped line chart configuration looks with stepped = before.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/stepped.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartSteppedBeforeConfiguration extends ShowcaseConfiguration {
+ public LineChartSteppedBeforeConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Stepped Before")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false)
+ .setSteppedLine(SteppedLineValue.BEFORE);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart Stepped - Before"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartWithDifferentPointSizesConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartWithDifferentPointSizesConfiguration.java
new file mode 100644
index 00000000..205fbf11
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartWithDifferentPointSizesConfiguration.java
@@ -0,0 +1,94 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+import java.util.Collections;
+
+/**
+ *
+ * A sample that shows how a line chart can be configured to have different point sizes.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/point-sizes.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineChartWithDifferentPointSizesConfiguration extends ShowcaseConfiguration {
+ public LineChartWithDifferentPointSizesConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("dataset - big points")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setPointRadius(Collections.nCopies(7, 15))
+ .setPointHoverRadius(10)
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("dataset - individual point sizes")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderDash(Arrays.asList("5", "5"))
+ .setPointRadius(Arrays.asList(2, 4, 6, 18, 0, 12, 20))
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("dataset - large pointHoverRadius")
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setPointHoverRadius(30)
+ .setFill(false);
+
+
+ Dataset dataset4 = new Dataset()
+ .setLabel("dataset - large pointHitRadius")
+ .setBackgroundColor(SimpleColor.YELLOW)
+ .setBorderColor(SimpleColor.YELLOW)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setPointHitRadius(20)
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2,dataset3, dataset4));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart with Different Point Sizes"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineStylesConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineStylesConfiguration.java
new file mode 100644
index 00000000..0862c977
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineStylesConfiguration.java
@@ -0,0 +1,80 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how different line styles can be configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/line-styles.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LineStylesConfiguration extends ShowcaseConfiguration {
+ public LineStylesConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Filled")
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Unfilled")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("Dashed")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setBorderDash(Arrays.asList("5", "5"))
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2,dataset3));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Styles"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LinearStepSizeConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LinearStepSizeConfiguration.java
new file mode 100644
index 00000000..84f1afb3
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LinearStepSizeConfiguration.java
@@ -0,0 +1,75 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a line chart with linear step size is configured.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/linear/step-size.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LinearStepSizeConfiguration extends ShowcaseConfiguration {
+ public LinearStepSizeConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Line Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))
+ .setTicks(new Ticks()
+ .setMin(0)
+ .setMax(100)
+ .setStepSize(5))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicLineChartConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicLineChartConfiguration.java
new file mode 100644
index 00000000..0924670d
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicLineChartConfiguration.java
@@ -0,0 +1,72 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * A sample that shows how a logarithmic line chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/logarithmic/line.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LogarithmicLineChartConfiguration extends ShowcaseConfiguration {
+ public LogarithmicLineChartConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Logarithmic Line Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setType("logarithmic")
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicScatterChartConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicScatterChartConfiguration.java
new file mode 100644
index 00000000..db5c6709
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicScatterChartConfiguration.java
@@ -0,0 +1,85 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.PointValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * A sample that shows how a logarithmic scatter chart configuration looks.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/logarithmic/scatter.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class LogarithmicScatterChartConfiguration extends ShowcaseConfiguration {
+ public LogarithmicScatterChartConfiguration() {
+ super();
+ setType(ChartType.SCATTER);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(Arrays.asList(
+ new PointValue(4,14),
+ new PointValue(40,42),
+ new PointValue(23,42),
+ new PointValue(40,22),
+ new PointValue(80,12),
+ new PointValue(30,32)))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(Arrays.asList(
+ new PointValue(7,56),
+ new PointValue(15,54),
+ new PointValue(46,34),
+ new PointValue(36,42),
+ new PointValue(78,64),
+ new PointValue(12,48)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Logarithmic Scatter Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setType("logarithmic")
+ .setPosition(Position.BOTTOM)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Frequency")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setType("linear")
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Voltage"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxConfiguration.java
new file mode 100644
index 00000000..2d826156
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxConfiguration.java
@@ -0,0 +1,60 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+
+/**
+ *
+ * A sample that shows how to configure min and max Ticks in the chart options.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/linear/min-max.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class MinMaxConfiguration extends ShowcaseConfiguration {
+ public MinMaxConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(Arrays.asList(10, 30, 39, 20, 25, 34, -10)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(Arrays.asList(100, 33, 22, 19, 11, 49, 30)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Min and Max"))
+ .setScales(new Scales()
+ .setYAxes(new AxesScale()
+ .setTicks(new Ticks()
+ .setMin(10)
+ .setMax(50))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxSuggestedConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxSuggestedConfiguration.java
new file mode 100644
index 00000000..b83ce23d
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxSuggestedConfiguration.java
@@ -0,0 +1,60 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+
+/**
+ *
+ * A sample that shows how to configure suggestedMin and suggestedMax Ticks in the chart options.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/linear/min-max-suggested.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class MinMaxSuggestedConfiguration extends ShowcaseConfiguration {
+ public MinMaxSuggestedConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(Arrays.asList(10, 30, 50, 20, 25, 44, -10)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(Arrays.asList(18, 33, 22, 19, 11, 39, 30)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Min and Max - Suggested"))
+ .setScales(new Scales()
+ .setYAxes(new AxesScale()
+ .setTicks(new Ticks()
+ .setSuggestedMin(10)
+ .setSuggestedMax(50))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/MultilineLabelsConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/MultilineLabelsConfiguration.java
new file mode 100644
index 00000000..85e23292
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/MultilineLabelsConfiguration.java
@@ -0,0 +1,69 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextListLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+
+/**
+ *
+ * A sample that shows how to configure multiline labels.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/multiline-labels.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class MultilineLabelsConfiguration extends ShowcaseConfiguration {
+
+ public MultilineLabelsConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(Arrays.asList(
+ new TextListLabel("June","2015"),
+ new TextLabel("July"),
+ new TextLabel("August"),
+ new TextLabel("September"),
+ new TextLabel("October"),
+ new TextLabel("November"),
+ new TextLabel("December"),
+ new TextListLabel("January","2016"),
+ new TextLabel("February"),
+ new TextLabel("March"),
+ new TextLabel("April"),
+ new TextLabel("May")
+ ));
+
+ Dataset dataset1 = new Dataset()
+ .setData(IntegerValue.of(randomIntegerList(12)))
+ .setLabel("My First dataset")
+ .setFill(false)
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED);
+
+ Dataset dataset2 = new Dataset()
+ .setData(IntegerValue.of(randomIntegerList(12)))
+ .setLabel("My Second dataset")
+ .setFill(false)
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ setData(data);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart with Multiline Labels"));
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/NonNumericConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/NonNumericConfiguration.java
new file mode 100644
index 00000000..a6f3c0e7
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/NonNumericConfiguration.java
@@ -0,0 +1,67 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.ConstLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.ConstValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+
+/**
+ *
+ * A sample that shows how to configure non-numeric values in a chart.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/non-numeric-y.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class NonNumericConfiguration extends ShowcaseConfiguration {
+
+ public NonNumericConfiguration() {
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setXLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"))
+ .setYLabels(ConstLabel.of("", "Request Added", "Request Viewed", "Request Accepted", "Request Solved", "Solving Confirmed"))
+ ;
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First Dataset")
+ .setFill(false)
+ .setBorderColor(SimpleColor.RED)
+ .setBackgroundColor(SimpleColor.RED)
+ .setData(ConstValue.of("", "Request Added", "Request Added", "Request Added", "Request Viewed", "Request Viewed", "Request Viewed"))
+ ;
+ data.setDatasets(Arrays.asList(dataset1));
+ setData(data);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart with Non Numeric Y Axis"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setType("category")
+ .setPosition(Position.LEFT)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Request State"))
+ .setTicks(new Ticks()
+ .setReverse(true))))
+ ;
+ setOptions(options);
+
+
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/OtherRadarChartConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/OtherRadarChartConfiguration.java
new file mode 100644
index 00000000..19e7d5ec
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/OtherRadarChartConfiguration.java
@@ -0,0 +1,65 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextListLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that displays different datasets on a radar.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/radar.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class OtherRadarChartConfiguration extends ShowcaseConfiguration {
+ public OtherRadarChartConfiguration() {
+ super();
+ setType(ChartType.RADAR);
+
+ Data data = new Data()
+ .setLabels(Arrays.asList(
+ new TextListLabel("Eating", "Dinner"),
+ new TextListLabel("Drining", "Water"),
+ new TextLabel("Sleeping"),
+ new TextListLabel("Designing","Graphics"),
+ new TextLabel("Coding"),
+ new TextLabel("Cycling"),
+ new TextLabel("Running")
+ ));
+ setData(data);
+
+ Dataset dataset0 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setPointBackgroundColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My second dataset")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setPointBackgroundColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ data.setDatasets(Arrays.asList(dataset0, dataset1));
+
+ Options options = new Options()
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Radar Chart"))
+ .setLegend(new Legend()
+ .setPosition(Position.TOP))
+ .setScale(new Scale()
+ .setTicks(new Ticks()
+ .setBeginAtZero(true)));
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/PieChartConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/PieChartConfiguration.java
new file mode 100644
index 00000000..9301accc
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/PieChartConfiguration.java
@@ -0,0 +1,44 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.ChartType;
+import de.adesso.wickedcharts.chartjs.chartoptions.Data;
+import de.adesso.wickedcharts.chartjs.chartoptions.Dataset;
+import de.adesso.wickedcharts.chartjs.chartoptions.Options;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that displays a dataset as a pie chart.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/pie.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class PieChartConfiguration extends ShowcaseConfiguration {
+ public PieChartConfiguration() {
+ super();
+ setType(ChartType.PIE);
+
+ Data data = new Data();
+
+ Dataset dataset = new Dataset()
+ .setData(IntegerValue.of(randomIntegerList(5)))
+ .setBackgroundColor(
+ Arrays.asList(SimpleColor.RED,SimpleColor.ORANGE, SimpleColor.YELLOW, SimpleColor.GREEN, SimpleColor.BLUE))
+ .setLabel("Dataset 1");
+
+ data.setDatasets(Arrays.asList(dataset)).setLabels(TextLabel.of("Red", "Orange", "Yellow", "Green", "Blue"));
+
+ setData(data);
+ Options options = new Options()
+ .setResponsive(true);
+ setOptions(options);
+
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/PointStylesConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/PointStylesConfiguration.java
new file mode 100644
index 00000000..47e62fc4
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/PointStylesConfiguration.java
@@ -0,0 +1,182 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that supports different point styles:
+ * 'circle',
+ * 'triangle',
+ * 'rect',
+ * 'rectRounded',
+ * 'rectRot',
+ * 'cross',
+ * 'crossRot',
+ * 'star',
+ * 'line',
+ * 'dash'
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/line/point-styles.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class PointStylesConfiguration extends ShowcaseConfiguration {
+ public PointStylesConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dash")
+ .setBackgroundColor(SimpleColor.GREY)
+ .setBorderColor(SimpleColor.GREY)
+ .setData(IntegerValue.of(Arrays.asList(1,1,1,1,1,1,1)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.DASH)
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Star")
+ .setBackgroundColor(SimpleColor.PURPLE)
+ .setBorderColor(SimpleColor.PURPLE)
+ .setData(IntegerValue.of(Arrays.asList(2,2,2,2,2,2,2)))
+ .setShowLine(false)
+ .setPointRadius(20)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.STAR)
+ .setFill(false);
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("Rectangle")
+ .setBackgroundColor(SimpleColor.YELLOW)
+ .setBorderColor(SimpleColor.YELLOW)
+ .setData(IntegerValue.of(Arrays.asList(3,3,3,3,3,3,3)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.RECT)
+ .setFill(false);
+
+ Dataset dataset4 = new Dataset()
+ .setLabel("Triangle")
+ .setBackgroundColor(SimpleColor.GREEN)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(Arrays.asList(4,4,4,4,4,4,4)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.TRIANGLE)
+ .setFill(false);
+
+ Dataset dataset5 = new Dataset()
+ .setLabel("Circle")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(Arrays.asList(5,5,5,5,5,5,5)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.CIRCLE)
+ .setFill(false);
+
+ Dataset dataset6 = new Dataset()
+ .setLabel("CrossRot")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(Arrays.asList(6,6,6,6,6,6,6)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.CROSS_ROT)
+ .setFill(false);
+
+ Dataset dataset7 = new Dataset()
+ .setLabel("Line")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED_TRANSPARENT)
+ .setData(IntegerValue.of(Arrays.asList(7,7,7,7,7,7,7)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.LINE)
+ .setFill(false);
+
+ Dataset dataset8 = new Dataset()
+ .setLabel("Cross")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE_TRANSPARENT)
+ .setData(IntegerValue.of(Arrays.asList(8,8,8,8,8,8,8)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.CROSS)
+ .setFill(false);
+
+ Dataset dataset9 = new Dataset()
+ .setLabel("Rectangle Rounded")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(Arrays.asList(9,9,9,9,9,9,9)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.RECT_ROUNDED)
+ .setFill(false);
+
+ Dataset dataset10 = new Dataset()
+ .setLabel("Rectangle Rotated")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN_TRANSPARENT)
+ .setData(IntegerValue.of(Arrays.asList(11,11,11,11,11,11,11)))
+ .setShowLine(false)
+ .setPointRadius(10)
+ .setPointHoverRadius(15)
+ .setPointStyle(PointStyle.RECT_ROT)
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1, dataset2, dataset3, dataset4, dataset5, dataset6,
+ dataset7, dataset8, dataset9, dataset10));
+
+ //Point Style Can also be set in the options using the Elements option
+ //But you can only have one point style for all datasets
+
+ //Some Point Styles are drawn incorrectly
+ //See this issue: https://github.com/chartjs/Chart.js/issues/2607
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Point Styles"))
+ .setLegend(new Legend()
+ .setPosition(Position.RIGHT))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))
+ .setTicks(new Ticks()
+ .setMax(13)
+ .setMin(0))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/PolarAreaChartConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/PolarAreaChartConfiguration.java
new file mode 100644
index 00000000..03d581f6
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/PolarAreaChartConfiguration.java
@@ -0,0 +1,55 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that distributes data in a polar area chart.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/polar-area.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class PolarAreaChartConfiguration extends ShowcaseConfiguration {
+ public PolarAreaChartConfiguration() {
+ super();
+ setType(ChartType.POLAR_AREA);
+
+ Data data = new Data();
+
+ Dataset dataset = new Dataset()
+ .setData(IntegerValue.of(randomIntegerList(5)))
+ .setBackgroundColor(
+ Arrays.asList(SimpleColor.RED_TRANSPARENT,SimpleColor.ORANGE_TRANSPARENT,
+ SimpleColor.YELLOW_TRANSPARENT, SimpleColor.GREEN_TRANSPARENT,
+ SimpleColor.BLUE_TRANSPARENT))
+ .setLabel("Dataset 1");
+
+ data.setDatasets(Arrays.asList(dataset)).setLabels(TextLabel.of("Red", "Orange", "Yellow", "Green", "Blue"));
+
+ setData(data);
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("ChartJs Polar Area Chart"))
+ .setLegend(new Legend()
+ .setPosition(Position.RIGHT))
+ .setScale(new Scale()
+ .setTicks(new Ticks()
+ .setBeginAtZero(true))
+ .setReverse(false))
+ .setAnimation(new Animation()
+ .setAnimateScale(true)
+ .setAnimateRotate(false));
+ setOptions(options);
+
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/RadarChartConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/RadarChartConfiguration.java
new file mode 100644
index 00000000..be74b50d
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/RadarChartConfiguration.java
@@ -0,0 +1,98 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.AbsoluteIndex;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.BoundaryFillingMode;
+import de.adesso.wickedcharts.chartjs.chartoptions.fillingmodes.RelativeIndex;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that displays different datasets on a radar.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/area/radar.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class RadarChartConfiguration extends ShowcaseConfiguration {
+ public RadarChartConfiguration() {
+ super();
+ setType(ChartType.RADAR);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset0 = new Dataset()
+ .setLabel("D0")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(Arrays.asList(1, 2, 3, 1, 2, 1, 2)))
+ .setFill(BoundaryFillingMode.UNDEFINED);
+
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("D1 (hidden) Fill: -1")
+ .setBackgroundColor(SimpleColor.ORANGE_TRANSPARENT)
+ .setBorderColor(SimpleColor.ORANGE)
+ .setData(IntegerValue.of(Arrays.asList(5, 4, 3, 5, 4, 3, 5)))
+ .setHidden(true)
+ .setFill(new RelativeIndex("-1"));
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("D2 Fill: 1")
+ .setBackgroundColor(SimpleColor.YELLOW)
+ .setBorderColor(SimpleColor.YELLOW_TRANSPARENT)
+ .setData(IntegerValue.of(Arrays.asList(10, 8, 12, 6, 13, 10, 9)))
+ .setFill(new AbsoluteIndex(1));
+
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("D3 Fill: False")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(Arrays.asList(20, 18, 22, 16, 23, 20, 19)))
+ .setFill(false);
+
+ Dataset dataset4 = new Dataset()
+ .setLabel("D4 Fill: -1")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(Arrays.asList(30, 28, 32, 26, 33, 30, 29)))
+ .setFill(new RelativeIndex("-1"));
+
+
+ Dataset dataset5 = new Dataset()
+ .setLabel("D5 Fill: -1")
+ .setBackgroundColor(SimpleColor.PURPLE_TRANSPARENT)
+ .setBorderColor(SimpleColor.PURPLE)
+ .setData(IntegerValue.of(Arrays.asList(40, 38, 42, 36, 43, 40, 39)))
+ .setFill(new RelativeIndex("-1"));
+
+ data.setDatasets(Arrays.asList(dataset0, dataset1, dataset2, dataset3, dataset4, dataset5));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Radar Chart"))
+ .setMaintainAspectRatio(true)
+ .setSpanGaps(false)
+ .setElements(new Element()
+ .setLine(new Line()
+ .setTension(0.000001)))
+ .setPlugins(new Plugins()
+ .setFiller(new Filler()
+ .setPropagate(false))
+ .setSamples_filler_analyzer(new SamplesFillerAnalyzer()
+ .setTarget("chart-analyzer")))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartConfiguration.java
new file mode 100644
index 00000000..b9cee224
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartConfiguration.java
@@ -0,0 +1,79 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.PointValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample which displays data as scattered points in the coordinate system.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/scatter/basic.html
+ *
+ * @author maximAtanasov
+ * @author anedomansky
+ */
+@SuppressWarnings("serial")
+public class ScatterChartConfiguration extends ShowcaseConfiguration {
+ public ScatterChartConfiguration() {
+ super();
+ setType(ChartType.SCATTER);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(Arrays.asList(
+ new PointValue(4,14),
+ new PointValue(40,42),
+ new PointValue(23,42),
+ new PointValue(40,22),
+ new PointValue(80,12),
+ new PointValue(30,32)))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(Arrays.asList(
+ new PointValue(7,56),
+ new PointValue(15,54),
+ new PointValue(46,34),
+ new PointValue(36,42),
+ new PointValue(78,64),
+ new PointValue(12,48)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Scatter Chart"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setHover(new Hover()
+ .setMode(HoverMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setType("linear")
+ .setPosition(Position.BOTTOM)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartMultiAxisConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartMultiAxisConfiguration.java
new file mode 100644
index 00000000..0dc680a2
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartMultiAxisConfiguration.java
@@ -0,0 +1,91 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.RgbaColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.PointValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that displays a scatter chart with two y-axes.
+ *
+ * @see http://www.chartjs.org/samples/latest/charts/scatter/multi-axis.html
+ *
+ * @author anedomansky
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class ScatterChartMultiAxisConfiguration extends ShowcaseConfiguration {
+ public ScatterChartMultiAxisConfiguration() {
+ super();
+ setType(ChartType.SCATTER);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setYAxisID("y-axis-1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(Arrays.asList(
+ new PointValue(4,14),
+ new PointValue(40,42),
+ new PointValue(23,42),
+ new PointValue(40,22),
+ new PointValue(80,12),
+ new PointValue(30,32)))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setYAxisID("y-axis-2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(Arrays.asList(
+ new PointValue(7,56),
+ new PointValue(15,54),
+ new PointValue(46,34),
+ new PointValue(36,42),
+ new PointValue(78,64),
+ new PointValue(12,48)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Scatter Chart Multi Axis"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setType("linear")
+ .setPosition(Position.BOTTOM)
+ .setGridLines(new GridLines()
+ .setZeroLineColor(new RgbaColor(0, 0, 0, 1)))
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(Arrays.asList(new AxesScale()
+ .setType("linear")
+ .setDisplay(true)
+ .setPosition(Position.LEFT)
+ .setId("y-axis-1"),
+ new AxesScale()
+ .setType("linear")
+ .setDisplay(true)
+ .setPosition(Position.RIGHT)
+ .setReverse(true)
+ .setId("y-axis-2")
+ .setGridLines(new GridLines()
+ .setDrawOnChartArea(false)))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeComboConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeComboConfiguration.java
new file mode 100644
index 00000000..102fdcd0
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeComboConfiguration.java
@@ -0,0 +1,87 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import org.apache.wicket.Session;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * Sample which displays a bar chart for the data distribution and a line chart for the time progression of datasets.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/time/combo.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TimeComboConfiguration extends ShowcaseConfiguration {
+
+
+ public TimeComboConfiguration() {
+ setType(ChartType.BAR);
+
+ String timeFormat = "MM/DD/YYYY HH:mm";
+
+ List labels = new ArrayList(7);
+
+ LocalDateTime now = LocalDateTime.now();
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM/dd/uuuu HH:mm", Session.get().getLocale());
+
+
+ for(int i = 0; i < 7; i++) {
+ labels.add(new TextLabel(now.plus(i,ChronoUnit.DAYS).format(formatter)));
+ }
+
+ Dataset dataset1 = new Dataset()
+ .setType(ChartType.BAR)
+ .setLabel("Dataset 1")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ Dataset dataset2 = new Dataset()
+ .setType(ChartType.BAR)
+ .setLabel("Dataset 2")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ Dataset dataset3 = new Dataset()
+ .setType(ChartType.LINE)
+ .setLabel("Dataset 3")
+ .setFill(false)
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+
+
+ setData( new Data()
+ .setLabels(labels)
+ .setDatasets(Arrays.asList(dataset1,dataset2,dataset3))
+ );
+
+
+
+ setOptions( new Options()
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Combo Time Scale"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setType("time")
+ .setDisplay(true)
+ .setTime(new TimeFormat()
+ .setFormat(timeFormat)
+// .setRound(TimeFormatRound.DAY)
+ ))));
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeLineConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeLineConfiguration.java
new file mode 100644
index 00000000..1771cd0d
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeLineConfiguration.java
@@ -0,0 +1,126 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.DateTimeLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.PointValue;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.StringValue;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.ValueType;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Random;
+
+/**
+ * Sample which displays a time progression line for datasets.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/time/line.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TimeLineConfiguration extends ShowcaseConfiguration {
+
+ public TimeLineConfiguration() {
+ setType(ChartType.LINE);
+
+ Data data = new Data();
+
+ String timeFormat = "MM/DD/YYYY HH:mm";
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern(timeFormat);
+
+ List dateList = new ArrayList();
+ for(int i = 0; i < 7; i++) {
+ dateList.add(new DateTimeLabel(LocalDateTime.of(2018, 1,1, 8+i, 00)));
+ }
+ data.setLabels(dateList);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First Dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setFill(false)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ ;
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second Dataset")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setFill(false)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ ;
+
+ Dataset dataset3 = new Dataset()
+ .setLabel("Dataset with point data")
+ .setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN)
+ .setFill(false)
+ .setData(Arrays.asList(
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(0).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(1).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(2).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(3).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(4).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(5).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(6).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(LocalDateTime.of(2018, 1, 1, 15, 0))))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(LocalDateTime.of(2018, 1, 1, 16, 0))))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(LocalDateTime.of(2018, 1, 1, 17, 0))))
+ .setY(randomInteger())
+ ))
+ ;
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2,dataset3));
+ setData(data);
+
+ Options options = new Options()
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Time Scale"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setType("time")
+ .setTime(new TimeFormat()
+ .setTimeFormat(timeFormat )
+ .setTooltipFormat("ll HH:mm")))
+ .setYAxes(new AxesScale()
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("value"))));
+ setOptions(options);
+
+
+ }
+
+ private ValueType randomInteger() {
+ Random rng = new Random();
+ return new IntegerValue(rng.nextInt(60)+1);
+ }
+
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimePointConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimePointConfiguration.java
new file mode 100644
index 00000000..9913c110
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimePointConfiguration.java
@@ -0,0 +1,138 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.StringValueColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.DateTimeLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.*;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Random;
+
+/**
+ * Sample which highlights the important points of the x-axis.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/time/line-point-data.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TimePointConfiguration extends ShowcaseConfiguration {
+
+
+ public TimePointConfiguration() {
+ setType(ChartType.LINE);
+
+ String timeFormat = "MM/DD/YYYY HH:mm";
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern(timeFormat);
+
+ Data data = new Data();
+
+ List dateList = new ArrayList();
+ for(int i = 0; i < 7; i++) {
+ dateList.add(new DateTimeLabel(LocalDateTime.of(2018, 1,1, 8+i, 00)));
+ }
+ data.setLabels(dateList);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset with date object point data")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED)
+ .setFill(false)
+ .setData(Arrays.asList(
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(0).getDate()))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(1).getDate()))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(2).getDate()))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(3).getDate()))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(4).getDate()))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(5).getDate()))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new DateTimeValue(dateList.get(6).getDate()))
+ .setY(randomInteger())
+ ));
+
+
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("Dataset with string point data")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE)
+ .setFill(false)
+ .setData(Arrays.asList(
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(0).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(1).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(2).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(3).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(4).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(5).getDate())))
+ .setY(randomInteger()),
+ new PointValue()
+ .setX(new StringValue(formatter.format(dateList.get(6).getDate())))
+ .setY(randomInteger())
+ ))
+ ;
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+ setData(data);
+
+ Options options = new Options()
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Chart.js Time Scale"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setType("time")
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Date"))
+ .setTicks(new Ticks()
+ .setMajor(new TickStyle()
+ .setFontColor(new StringValueColor("red"))
+ .setFontStyle(FontStyle.BOLD))))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("value"))));
+ setOptions(options);
+
+
+ }
+
+ private ValueType randomInteger() {
+ Random rng = new Random();
+ return new IntegerValue(rng.nextInt(60)+1);
+ }
+
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeSeriesConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeSeriesConfiguration.java
new file mode 100644
index 00000000..b634b84d
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeSeriesConfiguration.java
@@ -0,0 +1,94 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.DateTimeLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.DoubleValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.time.LocalDateTime;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * Sample that displays a progression of a dataset.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/time/financial.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TimeSeriesConfiguration extends ShowcaseConfiguration {
+
+ public TimeSeriesConfiguration() {
+
+
+ Options options = new Options()
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("ChartJs Time Series"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setType("time")
+ .setDistribution(DistributionType.SERIES)
+ .setTicks(new Ticks()
+ .setSource(TickSource.LABELS)
+ )
+ )
+ .setYAxes(new AxesScale()
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Closing price ($)"))
+ ));
+
+ setOptions(options);
+
+ setType(ChartType.LINE);
+
+ LocalDateTime now = LocalDateTime.now();
+
+
+ List labels = new ArrayList(60);
+ List randomData = new ArrayList(60);
+
+ labels.add(new DateTimeLabel(now));
+ randomData.add(randomBar(30));
+
+
+ for(int i = 1; i < 60; i++) {
+ int dayOfTheWeek = now.plus(i, ChronoUnit.DAYS).getDayOfWeek().getValue();
+ if( 1 <= dayOfTheWeek && dayOfTheWeek <= 5) {
+ labels.add(new DateTimeLabel(now.plus(i, ChronoUnit.DAYS)));
+ }
+ randomData.add(randomBar(randomData.get(i-1).getValue()));
+ }
+
+
+
+ Data data = new Data()
+ .setLabels(labels)
+ .setDatasets(Arrays.asList(new Dataset()
+ .setLabel("My Dataset")
+ .setData(randomData)
+ .setType(ChartType.LINE)
+ .setPointRadius(0)
+ .setFill(false)
+ .setLineTension(0)
+ .setBorderWidth(2)
+ ));
+ setData(data);
+ }
+
+ private DoubleValue randomBar(double lastClose) {
+ double open = randomNumber(lastClose * .95, lastClose *1.05);
+ double close = randomNumber(open * .95, open *1.05);
+// double high = randomNumber(Math.max(open, close), Math.max(open, close) * 1.1);
+// double low = randomNumber(Math.min(open, close) * .9, Math.min(open, close));
+ return new DoubleValue(close);
+ }
+
+ private double randomNumber(double min, double max) {
+ return Math.random() * (max - min) + min;
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipAverageConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipAverageConfiguration.java
new file mode 100644
index 00000000..25664e15
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipAverageConfiguration.java
@@ -0,0 +1,68 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that enables tooltips to be at a average position to the data points.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/positioning.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipAverageConfiguration extends ShowcaseConfiguration {
+ public TooltipAverageConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Tooltip Average Position"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setPosition(TooltipPosition.AVERAGE)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipBorderConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipBorderConfiguration.java
new file mode 100644
index 00000000..7271021f
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipBorderConfiguration.java
@@ -0,0 +1,62 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.RgbColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.RgbaColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample which adds a border to the tooltips.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/border.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipBorderConfiguration extends ShowcaseConfiguration {
+ public TooltipBorderConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("Dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(10, 30, 46, 2,8,50,0))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1));
+
+
+ RgbColor black = new RgbColor(0,0,0);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Tooltip with border"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setPosition(TooltipPosition.NEAREST)
+ .setIntersect(false)
+ .setYPadding(10)
+ .setXPadding(10)
+ .setCaretSize(8)
+ .setBackgroundColor(new RgbaColor(72, 241, 12,1.0f))
+ .setTitleFontColor(black)
+ .setBodyFontColor(black)
+ .setBorderColor(new RgbaColor(0,0,0,1.0f))
+ .setBorderWidth(4))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipCallbacksConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipCallbacksConfiguration.java
new file mode 100644
index 00000000..87bb95eb
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipCallbacksConfiguration.java
@@ -0,0 +1,81 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Sample that enables the use of callback functions for tooltips.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/callbacks.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipCallbacksConfiguration extends ShowcaseConfiguration {
+ public TooltipCallbacksConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ String footerFunction = "function(tooltipItems, data) {\r\n" +
+ " var sum = 0;\r\n" +
+ "\r\n" +
+ " tooltipItems.forEach(function(tooltipItem) {\r\n" +
+ " sum += data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index];\r\n" +
+ " });\r\n" +
+ " return 'Sum: ' + sum;\r\n" +
+ " }";
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Custom Information in Tooltip"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setCallbacks(new TooltipCallbacks()
+ .setFooter(new CallbackFunction(footerFunction)))
+ .setFooterFontStyle(FontStyle.NORMAL))
+ .setHover(new Hover()
+ .setMode(HoverMode.INDEX)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlLineConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlLineConfiguration.java
new file mode 100644
index 00000000..686cc84b
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlLineConfiguration.java
@@ -0,0 +1,64 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+/**
+ * Sample that enables the use of custom html markup for tooltips in a line chart.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/custom-line.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipHtmlLineConfiguration extends ShowcaseConfiguration {
+ public TooltipHtmlLineConfiguration() {
+ setType(ChartType.LINE);
+
+ String optionalJavascript= readFile("de/adesso/wickedcharts/showcase/customTooltip.js");
+
+ setOptionalJavascript(new ArrayList());
+ addOptionalJavascript(optionalJavascript);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("HTML Tooltip - Line"))
+ .setTooltips(new Tooltips()
+ .setEnabled(false)
+ .setMode(TooltipMode.INDEX)
+ .setPosition(TooltipPosition.NEAREST)
+ .setCustom(new JavaScriptReference("customTooltips"))
+ );
+ setOptions(options);
+ }
+
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPieConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPieConfiguration.java
new file mode 100644
index 00000000..f6ba2261
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPieConfiguration.java
@@ -0,0 +1,59 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import org.apache.wicket.markup.html.panel.Fragment;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+/**
+ * Sample that enables the use of custom html markup for tooltips in a pie chart.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/custom-pie.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipHtmlPieConfiguration extends ShowcaseConfiguration {
+ public TooltipHtmlPieConfiguration() {
+ setType(ChartType.PIE);
+
+ String optionalJavascript=readFile("de/adesso/wickedcharts/showcase/customTooltip-Pie.js");
+
+ setOptionalJavascript(new ArrayList());
+ addOptionalJavascript(optionalJavascript);
+
+ Data data = new Data();
+ setData(data);
+
+ Dataset dataset = new Dataset()
+ .setLabel("My Dataset")
+ .setBackgroundColor(Arrays.asList(SimpleColor.RED,SimpleColor.ORANGE,SimpleColor.YELLOW, SimpleColor.GREEN, SimpleColor.BLUE))
+ .setData(IntegerValue.of(300, 50, 100, 40, 10));
+
+ data.setDatasets(Arrays.asList(dataset)).setLabels(TextLabel.of("Red", "Orange", "Yellow", "Green", "Blue"));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setLegend(new Legend()
+ .setDisplay(true))
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("HTML Tooltip - Pie"))
+ .setTooltips(new Tooltips()
+ .setEnabled(false)
+// .setCustom(new JavaScriptReference("customTooltips"))
+ );
+ setOptions(options);
+ }
+
+ @Override
+ public void modfiyIndividualMarkup(Fragment optionalMarkup) {
+ Fragment frag = new Fragment("optionalMarkup","pieTooltip",optionalMarkup.getParent());
+ optionalMarkup.replaceWith(frag);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPointsConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPointsConfiguration.java
new file mode 100644
index 00000000..247c5dbd
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPointsConfiguration.java
@@ -0,0 +1,69 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+import org.apache.wicket.markup.html.panel.Fragment;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+/**
+ * Sample that enables the use of custom html markup for tooltip points.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/custom-points.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipHtmlPointsConfiguration extends ShowcaseConfiguration {
+ public TooltipHtmlPointsConfiguration() {
+ setType(ChartType.LINE);
+
+ String optionalJavascript=readFile("de/adesso/wickedcharts/showcase/customTooltip-Point.js");
+
+ setOptionalJavascript(new ArrayList());
+ addOptionalJavascript(optionalJavascript);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setPointBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setPointBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)));
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("HTML Tooltip - Points"))
+ .setTooltips(new Tooltips()
+ .setEnabled(false)
+ .setIntersect(false)
+ .setMode(TooltipMode.INDEX)
+ .setCustom(new JavaScriptReference("customTooltips"))
+ );
+ setOptions(options);
+ }
+
+ @Override
+ public void modfiyIndividualMarkup(Fragment optionalMarkup) {
+ Fragment frag = new Fragment("optionalMarkup","pointTooltip",optionalMarkup.getParent());
+ optionalMarkup.replaceWith(frag);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipNearestConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipNearestConfiguration.java
new file mode 100644
index 00000000..81ef4a14
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipNearestConfiguration.java
@@ -0,0 +1,69 @@
+package de.adesso.wickedcharts.showcase.configurations;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+
+/**
+ * Sample that enables tooltips to be at the nearest possible position to the data points.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/positioning.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class TooltipNearestConfiguration extends ShowcaseConfiguration {
+ public TooltipNearestConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Tooltip Nearest Position"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setPosition(TooltipPosition.NEAREST)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/base/ShowcaseConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/base/ShowcaseConfiguration.java
new file mode 100644
index 00000000..b15b4d9f
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/base/ShowcaseConfiguration.java
@@ -0,0 +1,58 @@
+package de.adesso.wickedcharts.showcase.configurations.base;
+
+import de.adesso.wickedcharts.chartjs.ChartConfiguration;
+import org.apache.wicket.markup.html.panel.Fragment;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+import java.util.Scanner;
+
+/**
+ * The base class for all chart configurations for the showcase
+ */
+@SuppressWarnings("serial")
+public abstract class ShowcaseConfiguration extends ChartConfiguration implements Serializable {
+
+ protected List randomIntegerList(int size) {
+ List dataList = new ArrayList();
+ Random rng = new Random();
+ for (int i = 0; i < size; i++) {
+ dataList.add(rng.nextInt(60) + 1);
+ }
+ return dataList;
+ }
+
+ protected String readFile(String fileName) {
+
+ StringBuilder result = new StringBuilder("");
+
+ // Get file from resources folder
+ ClassLoader classLoader = getClass().getClassLoader();
+ File file = new File(classLoader.getResource(fileName).getFile());
+
+ try (Scanner scanner = new Scanner(file)) {
+
+ while (scanner.hasNextLine()) {
+ String line = scanner.nextLine();
+ result.append(line).append("\n");
+ }
+
+ scanner.close();
+
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ return result.toString();
+
+ }
+
+ public void modfiyIndividualMarkup(Fragment optionalMarkup) {
+ Fragment frag = new Fragment("optionalMarkup","defaultTooltip",optionalMarkup.getParent());
+ optionalMarkup.replaceWith(frag);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLineStylesConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLineStylesConfiguration.java
new file mode 100644
index 00000000..c54b2548
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLineStylesConfiguration.java
@@ -0,0 +1,74 @@
+package de.adesso.wickedcharts.showcase.configurations.gridlines;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.StringValueColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+
+/**
+ *
+ * Chart configuration for different grid line styles.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/gridlines-style.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class GridLineStylesConfiguration extends ShowcaseConfiguration {
+ public GridLineStylesConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(Arrays.asList(10, 30, 39, 20, 25, 34, -10)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(Arrays.asList(18, 33, 22, 19, 11, 39, 30)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Gridlines - Styles"))
+ .setScales(new Scales()
+ .setYAxes(new AxesScale()
+ .setGridLines(new GridLines()
+ .setDrawBorder(true)
+ .setColor(Arrays.asList(
+ new StringValueColor("pink"),
+ new StringValueColor("red"),
+ new StringValueColor("orange"),
+ new StringValueColor("yellow"),
+ new StringValueColor("green"),
+ new StringValueColor("blue"),
+ new StringValueColor("indigo"),
+ new StringValueColor("purple"))))
+ .setTicks(new Ticks()
+ .setMin(0)
+ .setMax(100)
+ .setStepSize(10))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesBasicConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesBasicConfiguration.java
new file mode 100644
index 00000000..ea0a665c
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesBasicConfiguration.java
@@ -0,0 +1,69 @@
+package de.adesso.wickedcharts.showcase.configurations.gridlines;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ *
+ * Chart configuration for the basic grid line layout.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/gridlines-display.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class GridLinesBasicConfiguration extends ShowcaseConfiguration {
+
+ protected GridLines gridLines;
+
+ public GridLinesBasicConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(10, 30, 39, 20, 25, 34, -10))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(Arrays.asList(18, 33, 22, 19, 11, 39, 30)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ gridLines = new GridLines()
+ .setDisplay(true);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Gridlines - Basic"))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setGridLines(gridLines))
+ .setYAxes(new AxesScale()
+ .setGridLines(gridLines)
+ .setTicks(new Ticks()
+ .setMin(0)
+ .setMax(100)
+ .setStepSize(10))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesChartAreaConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesChartAreaConfiguration.java
new file mode 100644
index 00000000..b45bc4c9
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesChartAreaConfiguration.java
@@ -0,0 +1,27 @@
+package de.adesso.wickedcharts.showcase.configurations.gridlines;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+
+/**
+ *
+ * Chart configuration for the area chart grid line layout.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/gridlines-display.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class GridLinesChartAreaConfiguration extends GridLinesBasicConfiguration {
+
+ public GridLinesChartAreaConfiguration() {
+ super();
+
+ gridLines.setDisplay(true)
+ .setDrawBorder(true)
+ .setDrawOnChartArea(false);
+ getOptions().setTitle(new Title()
+ .setDisplay(true)
+ .setText("Gridlines - Chart Area"));
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseConfiguration.java
new file mode 100644
index 00000000..171a41fe
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseConfiguration.java
@@ -0,0 +1,25 @@
+package de.adesso.wickedcharts.showcase.configurations.gridlines;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+
+/**
+ *
+ * Chart configuration in order to not display grid lines.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/gridlines-display.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class GridLinesDisplayFalseConfiguration extends GridLinesBasicConfiguration {
+
+ public GridLinesDisplayFalseConfiguration() {
+ super();
+
+ gridLines.setDisplay(false);
+ getOptions().setTitle(new Title()
+ .setDisplay(true)
+ .setText("Gridlines - Display False"));
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseNoBorderConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseNoBorderConfiguration.java
new file mode 100644
index 00000000..2893b59a
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseNoBorderConfiguration.java
@@ -0,0 +1,25 @@
+package de.adesso.wickedcharts.showcase.configurations.gridlines;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+
+/**
+ *
+ * Chart configuration in order to not display grid lines and axes.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/gridlines-display.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class GridLinesDisplayFalseNoBorderConfiguration extends GridLinesBasicConfiguration {
+
+ public GridLinesDisplayFalseNoBorderConfiguration() {
+ super();
+
+ gridLines.setDisplay(false)
+ .setDrawBorder(false);
+ getOptions().setTitle(new Title()
+ .setDisplay(true)
+ .setText("Gridlines - Display False No Border"));
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesTicksConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesTicksConfiguration.java
new file mode 100644
index 00000000..9c05bfd8
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesTicksConfiguration.java
@@ -0,0 +1,28 @@
+package de.adesso.wickedcharts.showcase.configurations.gridlines;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Title;
+
+/**
+ *
+ * Chart configuration in order to not display the ticks.
+ *
+ * @see http://www.chartjs.org/samples/latest/scales/gridlines-display.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class GridLinesTicksConfiguration extends GridLinesBasicConfiguration {
+
+ public GridLinesTicksConfiguration() {
+ super();
+
+ gridLines.setDisplay(true)
+ .setDrawBorder(true)
+ .setDrawOnChartArea(true)
+ .setDrawTicks(false);
+ getOptions().setTitle(new Title()
+ .setDisplay(true)
+ .setText("Gridlines - Ticks"));
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectFalseConfiguration.java
new file mode 100644
index 00000000..c2839ec7
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectFalseConfiguration.java
@@ -0,0 +1,68 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * If intersect false the nearest item is used to determine the index.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class DatasetIntersectFalseConfiguration extends ShowcaseConfiguration {
+ public DatasetIntersectFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Dataset, intersect: false"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.DATASET)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectTrueConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectTrueConfiguration.java
new file mode 100644
index 00000000..049bbbff
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectTrueConfiguration.java
@@ -0,0 +1,68 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * If the intersect setting is true, the first intersecting item is used to determine the index in the data.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class DatasetIntersectTrueConfiguration extends ShowcaseConfiguration {
+ public DatasetIntersectTrueConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Dataset, intersect: true"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.DATASET)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectFalseConfiguration.java
new file mode 100644
index 00000000..3a6f231f
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectFalseConfiguration.java
@@ -0,0 +1,68 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * If intersect false the nearest item, in the x direction, is used to determine the index.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class IndexIntersectFalseConfiguration extends ShowcaseConfiguration {
+ public IndexIntersectFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Index, intersect: false"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectTrueConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectTrueConfiguration.java
new file mode 100644
index 00000000..866e97d7
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectTrueConfiguration.java
@@ -0,0 +1,68 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * If the intersect setting is true, the first intersecting item is used to determine the index in the data.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class IndexIntersectTrueConfiguration extends ShowcaseConfiguration {
+ public IndexIntersectTrueConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Index, intersect: true"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.INDEX)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectFalseConfiguration.java
new file mode 100644
index 00000000..e7f61e9d
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectFalseConfiguration.java
@@ -0,0 +1,68 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * If intersect is false, this is not triggered when the mouse position intersects an item in the graph.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class NearestIntersectFalseConfiguration extends ShowcaseConfiguration {
+ public NearestIntersectFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Nearest, intersect: false"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.NEAREST)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectTrueConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectTrueConfiguration.java
new file mode 100644
index 00000000..0ae1de00
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectTrueConfiguration.java
@@ -0,0 +1,68 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * If intersect is true, this is only triggered when the mouse position intersects an item in the graph.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class NearestIntersectTrueConfiguration extends ShowcaseConfiguration {
+ public NearestIntersectTrueConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Nearest, intersect: true"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.NEAREST)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectFalseConfiguration.java
new file mode 100644
index 00000000..91cec1ba
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectFalseConfiguration.java
@@ -0,0 +1,68 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Finds no items that intersect the point.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class PointIntersectFalseConfiguration extends ShowcaseConfiguration {
+ public PointIntersectFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Point, intersect: false"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.POINT)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectTrueConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectTrueConfiguration.java
new file mode 100644
index 00000000..885b4b12
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectTrueConfiguration.java
@@ -0,0 +1,68 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Finds all of the items that intersect the point.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class PointIntersectTrueConfiguration extends ShowcaseConfiguration {
+ public PointIntersectTrueConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: Point, intersect: true"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.POINT)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectFalseConfiguration.java
new file mode 100644
index 00000000..58113ff7
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectFalseConfiguration.java
@@ -0,0 +1,68 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Does not return all items that would intersect based on the X coordinate of the position only.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class xIntersectFalseConfiguration extends ShowcaseConfiguration {
+ public xIntersectFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: x, intersect: false"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.X)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectTrueConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectTrueConfiguration.java
new file mode 100644
index 00000000..afe5b960
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectTrueConfiguration.java
@@ -0,0 +1,68 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Returns all items that would intersect based on the X coordinate of the position only.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class xIntersectTrueConfiguration extends ShowcaseConfiguration {
+ public xIntersectTrueConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: x, intersect: true"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.X)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectFalseConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectFalseConfiguration.java
new file mode 100644
index 00000000..c561e419
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectFalseConfiguration.java
@@ -0,0 +1,68 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Does not return all items that would intersect based on the Y coordinate of the position.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class yIntersectFalseConfiguration extends ShowcaseConfiguration {
+ public yIntersectFalseConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: y, intersect: false"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.Y)
+ .setIntersect(false))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectTrueConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectTrueConfiguration.java
new file mode 100644
index 00000000..ea8de185
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectTrueConfiguration.java
@@ -0,0 +1,68 @@
+package de.adesso.wickedcharts.showcase.configurations.interactions;
+
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Returns all items that would intersect based on the Y coordinate of the position.
+ *
+ * @see http://www.chartjs.org/samples/latest/tooltips/interactions.html
+ *
+ * @author maximAtanasov
+ */
+@SuppressWarnings("serial")
+public class yIntersectTrueConfiguration extends ShowcaseConfiguration {
+ public yIntersectTrueConfiguration() {
+ super();
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+ setData(data);
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setBackgroundColor(SimpleColor.RED)
+ .setBorderColor(SimpleColor.RED)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+
+ Dataset dataset2 = new Dataset()
+ .setLabel("My Second dataset")
+ .setBackgroundColor(SimpleColor.BLUE)
+ .setBorderColor(SimpleColor.BLUE)
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setFill(false);
+
+ data.setDatasets(Arrays.asList(dataset1,dataset2));
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setTitle(new Title()
+ .setDisplay(true)
+ .setText("Mode: y, intersect: true"))
+ .setTooltips(new Tooltips()
+ .setMode(TooltipMode.Y)
+ .setIntersect(true))
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setYAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value"))))
+ ;
+ setOptions(options);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionBottomConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionBottomConfiguration.java
new file mode 100644
index 00000000..bc02dee4
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionBottomConfiguration.java
@@ -0,0 +1,27 @@
+
+package de.adesso.wickedcharts.showcase.configurations.legendposition;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
+import de.adesso.wickedcharts.chartjs.chartoptions.Position;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+
+/**
+ * Shows how to configure a chart with the legend position at the bottom
+ * @see http://www.chartjs.org/samples/latest/legend/positioning.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LegendPositionBottomConfiguration extends LegendPositionChartBasicConfiguration {
+
+ public LegendPositionBottomConfiguration() {
+ super();
+
+ getData().getDatasets().get(0).setBackgroundColor(SimpleColor.GREEN_TRANSPARENT)
+ .setBorderColor(SimpleColor.GREEN);
+
+ getOptions().setLegend(new Legend().setPosition(Position.BOTTOM));
+
+ getOptions().getTitle().setText("Legend Position: Bottom");
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionChartBasicConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionChartBasicConfiguration.java
new file mode 100644
index 00000000..1a8aecd5
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionChartBasicConfiguration.java
@@ -0,0 +1,55 @@
+
+package de.adesso.wickedcharts.showcase.configurations.legendposition;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.*;
+import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel;
+import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue;
+import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration;
+
+import java.util.Arrays;
+
+/**
+ * Base class for the other configurations for the legend position
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LegendPositionChartBasicConfiguration extends ShowcaseConfiguration {
+ public LegendPositionChartBasicConfiguration() {
+ super();
+
+ setType(ChartType.LINE);
+
+ Data data = new Data()
+ .setLabels(TextLabel.of("January", "February", "March", "April", "May", "June", "July"));
+
+ Dataset dataset1 = new Dataset()
+ .setLabel("My First dataset")
+ .setData(IntegerValue.of(randomIntegerList(7)))
+ .setBorderWidth(1);
+
+ data.setDatasets(Arrays.asList(dataset1));
+ setData(data);
+
+ Options options = new Options()
+ .setResponsive(true)
+ .setScales(new Scales()
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Month")))
+ .setXAxes(new AxesScale()
+ .setDisplay(true)
+ .setScaleLabel(new ScaleLabel()
+ .setDisplay(true)
+ .setLabelString("Value")))
+ )
+ .setTitle(new Title()
+ .setDisplay(true))
+ ;
+ setOptions(options);
+
+ }
+}
+
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionLeftConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionLeftConfiguration.java
new file mode 100644
index 00000000..910e34f8
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionLeftConfiguration.java
@@ -0,0 +1,28 @@
+
+package de.adesso.wickedcharts.showcase.configurations.legendposition;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
+import de.adesso.wickedcharts.chartjs.chartoptions.Position;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+
+/**
+ * Shows how to configure a chart with the legend position on the left
+ *
+ * @see http://www.chartjs.org/samples/latest/legend/positioning.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LegendPositionLeftConfiguration extends LegendPositionChartBasicConfiguration {
+
+ public LegendPositionLeftConfiguration() {
+ super();
+
+ getData().getDatasets().get(0).setBackgroundColor(SimpleColor.YELLOW_TRANSPARENT)
+ .setBorderColor(SimpleColor.YELLOW);
+
+ getOptions().setLegend(new Legend().setPosition(Position.LEFT));
+
+ getOptions().getTitle().setText("Legend Position: Left");
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionRightConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionRightConfiguration.java
new file mode 100644
index 00000000..38dcecc9
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionRightConfiguration.java
@@ -0,0 +1,29 @@
+
+package de.adesso.wickedcharts.showcase.configurations.legendposition;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
+import de.adesso.wickedcharts.chartjs.chartoptions.Position;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+
+/**
+ * Shows how to configure a chart with the legend position on the right
+ *
+ * @see http://www.chartjs.org/samples/latest/legend/positioning.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LegendPositionRightConfiguration extends LegendPositionChartBasicConfiguration {
+
+ public LegendPositionRightConfiguration() {
+ super();
+
+ getData().getDatasets().get(0).setBackgroundColor(SimpleColor.BLUE_TRANSPARENT)
+ .setBorderColor(SimpleColor.BLUE);
+
+ getOptions().setLegend(new Legend().setPosition(Position.RIGHT));
+
+ getOptions().getTitle().setText("Legend Position: Right");
+ }
+}
+
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionTopConfiguration.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionTopConfiguration.java
new file mode 100644
index 00000000..711c225c
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionTopConfiguration.java
@@ -0,0 +1,29 @@
+
+package de.adesso.wickedcharts.showcase.configurations.legendposition;
+
+import de.adesso.wickedcharts.chartjs.chartoptions.Legend;
+import de.adesso.wickedcharts.chartjs.chartoptions.Position;
+import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor;
+
+/**
+ * Shows how to configure a chart with the legend position at the top
+ *
+ * @see http://www.chartjs.org/samples/latest/legend/positioning.html
+ *
+ * @author SvenWirz
+ */
+@SuppressWarnings("serial")
+public class LegendPositionTopConfiguration extends LegendPositionChartBasicConfiguration {
+
+ public LegendPositionTopConfiguration() {
+ super();
+
+ getData().getDatasets().get(0).setBackgroundColor(SimpleColor.RED_TRANSPARENT)
+ .setBorderColor(SimpleColor.RED);
+
+ getOptions().setLegend(new Legend().setPosition(Position.TOP));
+
+ getOptions().getTitle().setText("Legend Position: Top");
+ }
+}
+
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/ie/SimplePage.html b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/ie/SimplePage.html
new file mode 100644
index 00000000..70d560bc
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/ie/SimplePage.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+ Choose a chart:
+
+
+
+
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/ie/SimplePage.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/ie/SimplePage.java
new file mode 100644
index 00000000..3cd85afb
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/ie/SimplePage.java
@@ -0,0 +1,113 @@
+package de.adesso.wickedcharts.showcase.ie;
+
+import de.adesso.wickedcharts.highcharts.options.Options;
+import de.adesso.wickedcharts.showcase.options.*;
+import de.adesso.wickedcharts.showcase.options.base.ShowcaseOptions;
+import de.adesso.wickedcharts.wicket8.highcharts.Chart;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.form.ChoiceRenderer;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.PropertyModel;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+/**
+ * This page has been build to show all Options in a basic design without jquery
+ * UI and such, so that it can be viewed in all browsers without hassle.
+ *
+ * @author Tom Hombergs (tom.hombergs@gmail.com)
+ */
+public class SimplePage extends WebPage {
+
+ private static final long serialVersionUID = 1L;
+
+ private Options selectedOptions;
+
+ private static List choices = Arrays.asList(
+ new AreaInvertedAxisOptions(), new AreaMissingOptions(),
+ new AreaSplineOptions(), new AreaWithNegativeValuesOptions(),
+ new BarWithNegativeStackOptions(), new BasicAreaOptions(),
+ new BasicBarOptions(), new BasicColumnOptions(),
+ new BasicLineOptions(), new BasicPieOptions(),
+ new BubbleChartOptions(), new ColumnWithDrilldownOptions(),
+ new ColumnWithNegativeValuesOptions(),
+ new ColumnWithRotatedLabelsOptions(), new ComboOptions(),
+ new DonutOptions(), new LineWithDataLabelsOptions(),
+ new LogarithmicAxisOptions(), new PercentageAreaOptions(),
+ new PieWithGradientOptions(), new PieWithLegendOptions(),
+ new PolarOptions(), new ScatterPlotOptions(),
+ new WicketSplineUpdatingOptions(),
+ new SplineWithInvertedAxisOptions(),
+ new SplineWithPlotBandsOptions(), new SplineWithSymbolsOptions(),
+ new StackedAndGroupedColumnOptions(), new StackedAreaOptions(),
+ new StackedBarOptions(), new StackedColumnOptions(),
+ new StackedPercentageOptions(),
+ new TimeDataWithIrregularIntervalsOptions(),
+ new ZoomableTimeSeriesOptions(true), new AngularGaugeOptions(),
+ new SpiderwebOptions(), new WindroseOptions(),
+ new ScatterWithRegressionLineOptions(), new ColumnRangeOptions(),
+ new AreaRangeOptions(), new ClickToAddAPointOptions());
+
+ static {
+
+ Collections.sort(SimplePage.choices, new Comparator() {
+
+ @Override
+ public int compare(ShowcaseOptions o1, ShowcaseOptions o2) {
+ return o1.getLabel().compareTo(o2.getLabel());
+ }
+ });
+
+ }
+
+ public SimplePage() {
+ this(SimplePage.choices.get(0));
+ }
+
+ public SimplePage(Options options) {
+ this.selectedOptions = options;
+
+ // create fresh instance of SplineUpdatingOptions for correct time ticks
+ if (this.selectedOptions instanceof WicketSplineUpdatingOptions) {
+ ((WicketSplineUpdatingOptions) this.selectedOptions).refresh();
+ }
+
+ final Chart chart = new Chart("chart", this.selectedOptions);
+ this.add(chart);
+
+ Form form = new Form("form") {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected void onSubmit() {
+ this.setResponsePage(new SimplePage(
+ SimplePage.this.selectedOptions));
+ }
+ };
+ this.add(form);
+
+ final DropDownChoice dropdown = new DropDownChoice(
+ "chartSelect", new PropertyModel(this,
+ "selectedOptions"), SimplePage.choices);
+ form.add(dropdown);
+
+ dropdown.setChoiceRenderer(new ChoiceRenderer() {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public Object getDisplayValue(ShowcaseOptions object) {
+ return object.getLabel();
+ }
+
+ @Override
+ public String getIdValue(ShowcaseOptions object, int index) {
+ return String.valueOf(index);
+ }
+ });
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/ChartjsShowcaseLink.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/ChartjsShowcaseLink.java
new file mode 100644
index 00000000..ff646dc3
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/ChartjsShowcaseLink.java
@@ -0,0 +1,15 @@
+package de.adesso.wickedcharts.showcase.links;
+
+import de.adesso.wickedcharts.showcase.HomepageChartJs;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+
+/**
+ * Adds a link to the Chart.js showcase in the main page
+ */
+@SuppressWarnings("serial")
+public class ChartjsShowcaseLink extends BookmarkablePageLink {
+
+ public ChartjsShowcaseLink() {
+ super("chartJsShowcaseLink", HomepageChartJs.class);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/HighchartsShowcaseLink.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/HighchartsShowcaseLink.java
new file mode 100644
index 00000000..9965b20a
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/HighchartsShowcaseLink.java
@@ -0,0 +1,17 @@
+
+package de.adesso.wickedcharts.showcase.links;
+
+import de.adesso.wickedcharts.showcase.HomepageHighcharts;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+
+/**
+ * Adds a link to the Highcharts showcase in the main page
+ */
+@SuppressWarnings("serial")
+public class HighchartsShowcaseLink extends BookmarkablePageLink {
+
+ public HighchartsShowcaseLink() {
+ super("highchartShowcaseLink", HomepageHighcharts.class);
+ }
+}
+
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartJsLink.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartJsLink.java
new file mode 100644
index 00000000..2738eed5
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartJsLink.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
+ *
+ * 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 de.adesso.wickedcharts.showcase.links;
+
+import de.adesso.wickedcharts.showcase.HomepageChartJs;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+
+/**
+ * Adds a link to a chart in the showcase navigation sidebar.
+ * Clicking on the link calls the onClick() method, which sets page
+ * parameters accordingly.
+ */
+public class UpdateChartJsLink extends Link {
+
+ private static final long serialVersionUID = 1L;
+
+ private final String chartVal;
+
+ /**
+ * Constructs a new Link.
+ *
+ * @param id the wicket id of the link
+ * @param val the name of the chart the link points to
+ */
+ public UpdateChartJsLink(final String id, final String val) {
+ super(id);
+ this.chartVal = val;
+ }
+
+ @Override
+ public void onClick() {
+ PageParameters params = new PageParameters();
+ params.add("chart", chartVal);
+ setResponsePage(HomepageChartJs.class, params);
+ }
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateHighchartLink.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateHighchartLink.java
new file mode 100644
index 00000000..1f69099b
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateHighchartLink.java
@@ -0,0 +1,56 @@
+/**
+ * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
+ *
+ * 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 de.adesso.wickedcharts.showcase.links;
+
+import de.adesso.wickedcharts.showcase.HomepageHighcharts;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+
+/**
+ * Adds a link to a chart in the showcase navigation sidebar.
+ * Clicking on the link calls the onClick() method, which sets page
+ * parameters accordingly.
+ */
+public class UpdateHighchartLink extends Link {
+
+ private static final long serialVersionUID = 1L;
+
+ private String chartVal;
+ private String themeVal;
+
+ /**
+ * Constructs a new Link.
+ *
+ * @param id the wicket id of the link
+ * @param themeVal the name of the theme that will be used
+ */
+ public UpdateHighchartLink(final String id, String themeVal) {
+ super(id);
+ this.chartVal = id;
+ this.themeVal = themeVal;
+ }
+
+
+ @Override
+ public void onClick() {
+ PageParameters params = new PageParameters();
+ params.add("theme", themeVal);
+ params.add("chart", chartVal);
+ setResponsePage(HomepageHighcharts.class, params);
+ }
+
+}
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateThemeLink.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateThemeLink.java
new file mode 100644
index 00000000..77465817
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateThemeLink.java
@@ -0,0 +1,55 @@
+/**
+ * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
+ *
+ * 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 de.adesso.wickedcharts.showcase.links;
+
+import de.adesso.wickedcharts.showcase.HomepageHighcharts;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+
+/**
+ * Adds a link to a theme in the Highcharts showcase.
+ * Clicking on the link calls the onClick() method, which sets page
+ * parameters accordingly.
+ */
+public class UpdateThemeLink extends Link {
+
+ private static final long serialVersionUID = 1L;
+
+ private String chartVal;
+ private String themeVal;
+
+ /**
+ * Constructs a new Link.
+ *
+ * @param id the wicket id of the link
+ * @param chart the name of the chart the link points to
+ */
+ public UpdateThemeLink(final String id, String chart) {
+ super(id);
+ this.chartVal = chart;
+ this.themeVal = id;
+ }
+
+ @Override
+ public void onClick() {
+ PageParameters params = new PageParameters();
+ params.add("theme", themeVal);
+ params.add("chart", chartVal);
+ setResponsePage(HomepageHighcharts.class, params);
+ }
+
+}
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/modalwindow/ChartPanel.html b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/modalwindow/ChartPanel.html
new file mode 100644
index 00000000..2d4f3ff2
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/modalwindow/ChartPanel.html
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/modalwindow/ChartPanel.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/modalwindow/ChartPanel.java
new file mode 100644
index 00000000..92e0f6df
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/modalwindow/ChartPanel.java
@@ -0,0 +1,16 @@
+package de.adesso.wickedcharts.showcase.modalwindow;
+
+import de.adesso.wickedcharts.showcase.options.BasicBarOptions;
+import de.adesso.wickedcharts.wicket8.highcharts.Chart;
+import org.apache.wicket.markup.html.panel.Panel;
+
+public class ChartPanel extends Panel {
+
+ private static final long serialVersionUID = 1L;
+
+ public ChartPanel(String id) {
+ super(id);
+ this.add(new Chart("chart", new BasicBarOptions()));
+ }
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/modalwindow/ModalWindowPage.html b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/modalwindow/ModalWindowPage.html
new file mode 100644
index 00000000..fc4c8b4c
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/modalwindow/ModalWindowPage.html
@@ -0,0 +1,7 @@
+
+
+
+ MODAL WINDOW
+
+
+
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/modalwindow/ModalWindowPage.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/modalwindow/ModalWindowPage.java
new file mode 100644
index 00000000..42e8a9bf
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/modalwindow/ModalWindowPage.java
@@ -0,0 +1,38 @@
+package de.adesso.wickedcharts.showcase.modalwindow;
+
+import org.apache.wicket.ajax.AjaxEventBehavior;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.form.Button;
+
+/**
+ * Tests if charts work within {@link ModalWindow}s.
+ *
+ * @author Tom Hombergs (tom.hombergs@gmail.com)
+ *
+ */
+public class ModalWindowPage extends WebPage {
+
+ private static final long serialVersionUID = 1L;
+
+ public ModalWindowPage() {
+
+ final ModalWindow window = new ModalWindow("modalWindow");
+ window.setContent(new ChartPanel("content"));
+ this.add(window);
+
+ Button button = new Button("button");
+ button.add(new AjaxEventBehavior("onclick") {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected void onEvent(AjaxRequestTarget target) {
+ window.show(target);
+ }
+ });
+ this.add(button);
+
+ }
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/options/WicketSplineUpdatingOptions.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/options/WicketSplineUpdatingOptions.java
new file mode 100644
index 00000000..530dca76
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/options/WicketSplineUpdatingOptions.java
@@ -0,0 +1,170 @@
+/**
+ * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts)
+ *
+ * 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 de.adesso.wickedcharts.showcase.options;
+
+import de.adesso.wickedcharts.highcharts.options.*;
+import de.adesso.wickedcharts.highcharts.options.color.HexColor;
+import de.adesso.wickedcharts.highcharts.options.livedata.JavaScriptParameters;
+import de.adesso.wickedcharts.highcharts.options.livedata.LiveDataSeries;
+import de.adesso.wickedcharts.highcharts.options.livedata.LiveDataUpdateEvent;
+import de.adesso.wickedcharts.highcharts.options.series.Point;
+import de.adesso.wickedcharts.showcase.options.base.ShowcaseOptions;
+import de.adesso.wickedcharts.wicket8.highcharts.features.livedata.WicketLiveDataUpdateEvent;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.markup.head.OnDomReadyHeaderItem;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+
+public class WicketSplineUpdatingOptions extends ShowcaseOptions {
+
+ private static final long serialVersionUID = 1L;
+
+ protected LiveDataSeries series;
+
+ protected LiveDataSeries series2;
+
+ public WicketSplineUpdatingOptions() {
+
+ this
+ .setChartOptions(new ChartOptions()
+ .setType(SeriesType.SPLINE)
+ .setMarginRight(10));
+
+ this
+ .setTitle(new Title("Live random data"))
+ .setSubtitle(
+ new Title(
+ "The Y values are calculated on the server. Depending on the value, the server creates javascript to change the color."));
+
+ this
+ .setxAxis(new Axis()
+ .setType(AxisType.DATETIME)
+ .setTickPixelInterval(150));
+
+ this
+ .setyAxis(new Axis()
+ .setTitle(new Title("Value"))
+ .setPlotLines(Collections
+ .singletonList(new PlotLine()
+ .setValue(0f)
+ .setWidth(1)
+ .setColor(new HexColor("#808080")))));
+
+ this
+ .setTooltip(new Tooltip()
+ .setFormatter(new Function()
+ .setFunction("return ''+ this.series.name +' '+"
+ + "Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x) +' '+"
+ + "Highcharts.numberFormat(this.y, 2);")));
+
+ this
+ .setLegend(new Legend(Boolean.FALSE));
+
+ this
+ .setExporting(new ExportingOptions()
+ .setEnabled(Boolean.FALSE));
+
+ this.series = createSeries(this.randomData(20));
+ // this.series2 = createSeries(this.randomData(20));
+ this.addSeries(this.series);
+ // this.addSeries(this.series2);
+
+ }
+
+ private LiveDataSeries createSeries(final List data) {
+ LiveDataSeries series = new LiveDataSeries(this, 1000) {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public Point update(final LiveDataUpdateEvent event) {
+ JavaScriptParameters params = event
+ .getParameters();
+ System.out
+ .println(params
+ .getParameterValue("currentTime"));
+
+ // switch color depending on y-value
+ double yValue = Math.random();
+ String newColor;
+ if (yValue > 0.5d) {
+ newColor = "#00ff00";
+ } else {
+ newColor = "#ff0000";
+ }
+
+ Point point = new Point();
+ point
+ .setX(new Date()
+ .getTime());
+ point
+ .setY(yValue);
+ point
+ .setMarker(new Marker()
+ .setFillColor(HexColor
+ .fromString(newColor)));
+
+ // update color of series via javascript
+ AjaxRequestTarget target = ((WicketLiveDataUpdateEvent) event).getAjaxRequestTarget();
+ target.getHeaderResponse().render(
+ OnDomReadyHeaderItem.forScript(event.getJavascriptChartName() + ".series[0].graph.attr('stroke', '"
+ + newColor
+ + "');"));
+
+ return point;
+ }
+ };
+ series.addJavaScriptParameter("currentTime", "new Date()");
+ series.setData(data);
+ series.setName("Random Data");
+ return series;
+ }
+
+ /**
+ * Refreshes the series data so that it starts at the current date.
+ */
+ public void refresh() {
+ this.series
+ .setData(this
+ .randomData(20));
+ this.series2
+ .setData(this
+ .randomData(20));
+ }
+
+ protected List randomData(final int size) {
+ long time = new Date()
+ .getTime() - 20000;
+ List result = new ArrayList();
+ for (int i = 0; i < size; i++) {
+ result
+ .add(new Point()
+ .setX(time)
+ .setY(Math
+ .random()));
+ time += 1000;
+ }
+ return result;
+ }
+
+ @Override
+ public String getLabel() {
+ return "Spline updating each second";
+ }
+
+}
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/resources/LICENSE b/showcase/wicked-charts-showcase-wicket8/src/main/resources/LICENSE
new file mode 100644
index 00000000..7a4a3ea2
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/resources/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ 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.
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Pie.js b/showcase/wicked-charts-showcase-wicket8/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Pie.js
new file mode 100644
index 00000000..a54bc7a6
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Pie.js
@@ -0,0 +1,62 @@
+Chart.defaults.global.tooltips.custom = function(tooltip) {
+ // Tooltip Element
+ var tooltipEl = document.getElementById('chartjs-tooltip');
+
+ // Hide if no tooltip
+ if (tooltip.opacity === 0) {
+ tooltipEl.style.opacity = 0;
+ return;
+ }
+
+ // Set caret Position
+ tooltipEl.classList.remove('above', 'below', 'no-transform');
+ if (tooltip.yAlign) {
+ tooltipEl.classList.add(tooltip.yAlign);
+ } else {
+ tooltipEl.classList.add('no-transform');
+ }
+
+ function getBody(bodyItem) {
+ return bodyItem.lines;
+ }
+
+ // Set Text
+ if (tooltip.body) {
+ var titleLines = tooltip.title || [];
+ var bodyLines = tooltip.body.map(getBody);
+
+ var innerHtml = '';
+
+ titleLines.forEach(function(title) {
+ innerHtml += '' + title + ' ';
+ });
+ innerHtml += ' ';
+
+ bodyLines.forEach(function(body, i) {
+ var colors = tooltip.labelColors[i];
+ var style = 'background:' + colors.backgroundColor;
+ style += '; border-color:' + colors.borderColor;
+ style += '; border-width: 2px';
+ var span = ' ';
+ innerHtml += '' + span + body + ' ';
+ });
+ innerHtml += ' ';
+
+ var tableRoot = tooltipEl.querySelector('table');
+ tableRoot.innerHTML = innerHtml;
+ }
+
+ var positionY = this._chart.canvas.offsetTop;
+ var positionX = this._chart.canvas.offsetLeft;
+
+ // Display, position, and set styles for font
+ tooltipEl.style.opacity = 1;
+ tooltipEl.style.left = positionX + tooltip.caretX + 'px';
+ tooltipEl.style.top = positionY + tooltip.caretY + 'px';
+ tooltipEl.style.fontFamily = tooltip._fontFamily;
+ tooltipEl.style.fontSize = tooltip.fontSize;
+ tooltipEl.style.fontStyle = tooltip._fontStyle;
+ tooltipEl.style.padding = tooltip.yPadding + 'px ' + tooltip.xPadding
+ + 'px';
+};
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Point.js b/showcase/wicked-charts-showcase-wicket8/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Point.js
new file mode 100644
index 00000000..da5ed22a
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Point.js
@@ -0,0 +1,28 @@
+var customTooltips = function(tooltip) {
+ $(this._chart.canvas).css("cursor", "pointer");
+
+ var positionY = this._chart.canvas.offsetTop;
+ var positionX = this._chart.canvas.offsetLeft;
+
+ $(".chartjs-tooltip").css({
+ opacity : 0,
+ });
+
+ if (!tooltip || !tooltip.opacity) {
+ return;
+ }
+
+ if (tooltip.dataPoints.length > 0) {
+ tooltip.dataPoints.forEach(function(dataPoint) {
+ var content = [ dataPoint.xLabel, dataPoint.yLabel ].join(": ");
+ var $tooltip = $("#tooltip-" + dataPoint.datasetIndex);
+
+ $tooltip.html(content);
+ $tooltip.css({
+ opacity : 1,
+ top : positionY + dataPoint.y + "px",
+ left : positionX + dataPoint.x + "px",
+ });
+ });
+ }
+};
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip.js b/showcase/wicked-charts-showcase-wicket8/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip.js
new file mode 100644
index 00000000..cb39657a
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip.js
@@ -0,0 +1,71 @@
+Chart.defaults.global.pointHitDetectionRadius = 1;
+
+var customTooltips = function(tooltip) {
+ // Tooltip Element
+ var tooltipEl = document.getElementById('chartjs-tooltip');
+
+ if (!tooltipEl) {
+ tooltipEl = document.createElement('div');
+ tooltipEl.id = 'chartjs-tooltip';
+ tooltipEl.innerHTML = ""
+ this._chart.canvas.parentNode.appendChild(tooltipEl);
+ }
+
+ // Hide if no tooltip
+ if (tooltip.opacity === 0) {
+ tooltipEl.style.opacity = 0;
+ return;
+ }
+
+ // Set caret Position
+ tooltipEl.classList.remove('above', 'below', 'no-transform');
+ if (tooltip.yAlign) {
+ tooltipEl.classList.add(tooltip.yAlign);
+ } else {
+ tooltipEl.classList.add('no-transform');
+ }
+
+ function getBody(bodyItem) {
+ return bodyItem.lines;
+ }
+
+ // Set Text
+ if (tooltip.body) {
+ var titleLines = tooltip.title || [];
+ var bodyLines = tooltip.body.map(getBody);
+
+ var innerHtml = '';
+
+ titleLines.forEach(function(title) {
+ innerHtml += '' + title + ' ';
+ });
+ innerHtml += ' ';
+
+ bodyLines.forEach(function(body, i) {
+ var colors = tooltip.labelColors[i];
+ var style = 'background:' + colors.backgroundColor;
+ style += '; border-color:' + colors.borderColor;
+ style += '; border-width: 2px';
+ var span = ' ';
+ innerHtml += '' + span + body + ' ';
+ });
+ innerHtml += ' ';
+
+ var tableRoot = tooltipEl.querySelector('table');
+ tableRoot.innerHTML = innerHtml;
+ }
+
+ var positionY = this._chart.canvas.offsetTop;
+ var positionX = this._chart.canvas.offsetLeft;
+
+ // Display, position, and set styles for font
+ tooltipEl.style.opacity = 1;
+ tooltipEl.style.left = positionX + tooltip.caretX + 'px';
+ tooltipEl.style.top = positionY + tooltip.caretY + 'px';
+ tooltipEl.style.fontFamily = tooltip._fontFamily;
+ tooltipEl.style.fontSize = tooltip.fontSize;
+ tooltipEl.style.fontStyle = tooltip._fontStyle;
+ tooltipEl.style.padding = tooltip.yPadding + 'px ' + tooltip.xPadding
+ + 'px';
+};
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/resources/de/adesso/wickedcharts/showcase/dataLabellingPlugin.js b/showcase/wicked-charts-showcase-wicket8/src/main/resources/de/adesso/wickedcharts/showcase/dataLabellingPlugin.js
new file mode 100644
index 00000000..7b9e8cb1
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/resources/de/adesso/wickedcharts/showcase/dataLabellingPlugin.js
@@ -0,0 +1,33 @@
+// Define a plugin to provide data labels
+ Chart.plugins.register({
+ afterDatasetsDraw: function(chart, easing) {
+ // To only draw at the end of animation, check for easing === 1
+ var ctx = {0};
+
+ chart.data.datasets.forEach(function (dataset, i) {
+ var meta = chart.getDatasetMeta(i);
+ if (!meta.hidden) {
+ meta.data.forEach(function(element, index) {
+ // Draw the text in black, with the specified font
+ ctx.fillStyle = 'rgb(0, 0, 0)';
+
+ var fontSize = 16;
+ var fontStyle = 'normal';
+ var fontFamily = 'Helvetica Neue';
+ ctx.font = Chart.helpers.fontString(fontSize, fontStyle, fontFamily);
+
+ // Just naively convert to string for now
+ var dataString = dataset.data[index].toString();
+
+ // Make sure alignment settings are correct
+ ctx.textAlign = 'center';
+ ctx.textBaseline = 'middle';
+
+ var padding = 5;
+ var position = element.tooltipPosition();
+ ctx.fillText(dataString, position.x, position.y - (fontSize / 2) - padding);
+ });
+ }
+ });
+ }
+ });
\ No newline at end of file
diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/resources/de/adesso/wickedcharts/showcase/jquery-1.8.3.min-IEfix.js b/showcase/wicked-charts-showcase-wicket8/src/main/resources/de/adesso/wickedcharts/showcase/jquery-1.8.3.min-IEfix.js
new file mode 100644
index 00000000..012ab88e
--- /dev/null
+++ b/showcase/wicked-charts-showcase-wicket8/src/main/resources/de/adesso/wickedcharts/showcase/jquery-1.8.3.min-IEfix.js
@@ -0,0 +1,9473 @@
+
+/*!
+ * jQuery JavaScript Library v1.8.3
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2012-2018 jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: Tue Nov 13 2012 08:20:33 GMT-0500 (Eastern Standard Time)
+ */
+(function( window, undefined ) {
+var
+ // A central reference to the root jQuery(document)
+ rootjQuery,
+
+ // The deferred used on DOM ready
+ readyList,
+
+ // Use the correct document accordingly with window argument (sandbox)
+ document = window.document,
+ location = window.location,
+ navigator = window.navigator,
+
+ // Map over jQuery in case of overwrite
+ _jQuery = window.jQuery,
+
+ // Map over the $ in case of overwrite
+ _$ = window.$,
+
+ // Save a reference to some core methods
+ core_push = Array.prototype.push,
+ core_slice = Array.prototype.slice,
+ core_indexOf = Array.prototype.indexOf,
+ core_toString = Object.prototype.toString,
+ core_hasOwn = Object.prototype.hasOwnProperty,
+ core_trim = String.prototype.trim,
+
+ // Define a local copy of jQuery
+ jQuery = function( selector, context ) {
+ // The jQuery object is actually just the init constructor 'enhanced'
+ return new jQuery.fn.init( selector, context, rootjQuery );
+ },
+
+ // Used for matching numbers
+ core_pnum = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,
+
+ // Used for detecting and trimming whitespace
+ core_rnotwhite = /\S/,
+ core_rspace = /\s+/,
+
+ // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
+ rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+ // A simple way to check for HTML strings
+ // Prioritize #id over to avoid XSS via location.hash (#9521)
+ rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
+
+ // Match a standalone tag
+ rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
+
+ // JSON RegExp
+ rvalidchars = /^[\],:{}\s]*$/,
+ rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+ rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
+ rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,
+
+ // Matches dashed string for camelizing
+ rmsPrefix = /^-ms-/,
+ rdashAlpha = /-([\da-z])/gi,
+
+ // Used by jQuery.camelCase as callback to replace()
+ fcamelCase = function( all, letter ) {
+ return ( letter + "" ).toUpperCase();
+ },
+
+ // The ready event handler and self cleanup method
+ DOMContentLoaded = function() {
+ if ( document.addEventListener ) {
+ document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+ jQuery.ready();
+ } else if ( document.readyState === "complete" ) {
+ // we're here because readyState === "complete" in oldIE
+ // which is good enough for us to call the dom ready!
+ document.detachEvent( "onreadystatechange", DOMContentLoaded );
+ jQuery.ready();
+ }
+ },
+
+ // [[Class]] -> type pairs
+ class2type = {};
+
+jQuery.fn = jQuery.prototype = {
+ constructor: jQuery,
+ init: function( selector, context, rootjQuery ) {
+ var match, elem, ret, doc;
+
+ // Handle $(""), $(null), $(undefined), $(false)
+ if ( !selector ) {
+ return this;
+ }
+
+ // Handle $(DOMElement)
+ if ( selector.nodeType ) {
+ this.context = this[0] = selector;
+ this.length = 1;
+ return this;
+ }
+
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
+ // Assume that strings that start and end with <> are HTML and skip the regex check
+ match = [ null, selector, null ];
+
+ } else {
+ match = rquickExpr.exec( selector );
+ }
+
+ // Match html or make sure no context is specified for #id
+ if ( match && (match[1] || !context) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[1] ) {
+ context = context instanceof jQuery ? context[0] : context;
+ doc = ( context && context.nodeType ? context.ownerDocument || context : document );
+
+ // scripts is true for back-compat
+ selector = jQuery.parseHTML( match[1], doc, true );
+ if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
+ this.attr.call( selector, context, true );
+ }
+
+ return jQuery.merge( this, selector );
+
+ // HANDLE: $(#id)
+ } else {
+ elem = document.getElementById( match[2] );
+
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE and Opera return items
+ // by name instead of ID
+ if ( elem.id !== match[2] ) {
+ return rootjQuery.find( selector );
+ }
+
+ // Otherwise, we inject the element directly into the jQuery object
+ this.length = 1;
+ this[0] = elem;
+ }
+
+ this.context = document;
+ this.selector = selector;
+ return this;
+ }
+
+ // HANDLE: $(expr, $(...))
+ } else if ( !context || context.jquery ) {
+ return ( context || rootjQuery ).find( selector );
+
+ // HANDLE: $(expr, context)
+ // (which is just equivalent to: $(context).find(expr)
+ } else {
+ return this.constructor( context ).find( selector );
+ }
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ } else if ( jQuery.isFunction( selector ) ) {
+ return rootjQuery.ready( selector );
+ }
+
+ if ( selector.selector !== undefined ) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
+ return jQuery.makeArray( selector, this );
+ },
+
+ // Start with an empty selector
+ selector: "",
+
+ // The current version of jQuery being used
+ jquery: "1.8.3",
+
+ // The default length of a jQuery object is 0
+ length: 0,
+
+ // The number of elements contained in the matched element set
+ size: function() {
+ return this.length;
+ },
+
+ toArray: function() {
+ return core_slice.call( this );
+ },
+
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function( num ) {
+ return num == null ?
+
+ // Return a 'clean' array
+ this.toArray() :
+
+ // Return just the object
+ ( num < 0 ? this[ this.length + num ] : this[ num ] );
+ },
+
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function( elems, name, selector ) {
+
+ // Build a new jQuery matched element set
+ var ret = jQuery.merge( this.constructor(), elems );
+
+ // Add the old object onto the stack (as a reference)
+ ret.prevObject = this;
+
+ ret.context = this.context;
+
+ if ( name === "find" ) {
+ ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
+ } else if ( name ) {
+ ret.selector = this.selector + "." + name + "(" + selector + ")";
+ }
+
+ // Return the newly-formed element set
+ return ret;
+ },
+
+ // Execute a callback for every element in the matched set.
+ // (You can seed the arguments with an array of args, but this is
+ // only used internally.)
+ each: function( callback, args ) {
+ return jQuery.each( this, callback, args );
+ },
+
+ ready: function( fn ) {
+ // Add the callback
+ jQuery.ready.promise().done( fn );
+
+ return this;
+ },
+
+ eq: function( i ) {
+ i = +i;
+ return i === -1 ?
+ this.slice( i ) :
+ this.slice( i, i + 1 );
+ },
+
+ first: function() {
+ return this.eq( 0 );
+ },
+
+ last: function() {
+ return this.eq( -1 );
+ },
+
+ slice: function() {
+ return this.pushStack( core_slice.apply( this, arguments ),
+ "slice", core_slice.call(arguments).join(",") );
+ },
+
+ map: function( callback ) {
+ return this.pushStack( jQuery.map(this, function( elem, i ) {
+ return callback.call( elem, i, elem );
+ }));
+ },
+
+ end: function() {
+ return this.prevObject || this.constructor(null);
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: core_push,
+ sort: [].sort,
+ splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[0] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+ target = arguments[1] || {};
+ // skip the boolean and the target
+ i = 2;
+ }
+
+ // Handle case when target is a string or something (possible in deep copy)
+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+ target = {};
+ }
+
+ // extend jQuery itself if only one argument is passed
+ if ( length === i ) {
+ target = this;
+ --i;
+ }
+
+ for ( ; i < length; i++ ) {
+ // Only deal with non-null/undefined values
+ if ( (options = arguments[ i ]) != null ) {
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+ if ( copyIsArray ) {
+ copyIsArray = false;
+ clone = src && jQuery.isArray(src) ? src : [];
+
+ } else {
+ clone = src && jQuery.isPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend({
+ noConflict: function( deep ) {
+ if ( window.$ === jQuery ) {
+ window.$ = _$;
+ }
+
+ if ( deep && window.jQuery === jQuery ) {
+ window.jQuery = _jQuery;
+ }
+
+ return jQuery;
+ },
+
+ // Is the DOM ready to be used? Set to true once it occurs.
+ isReady: false,
+
+ // A counter to track how many items to wait for before
+ // the ready event fires. See #6781
+ readyWait: 1,
+
+ // Hold (or release) the ready event
+ holdReady: function( hold ) {
+ if ( hold ) {
+ jQuery.readyWait++;
+ } else {
+ jQuery.ready( true );
+ }
+ },
+
+ // Handle when the DOM is ready
+ ready: function( wait ) {
+
+ // Abort if there are pending holds or we're already ready
+ if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
+ return;
+ }
+
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+ if ( !document.body ) {
+ return setTimeout( jQuery.ready, 1 );
+ }
+
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If a normal DOM Ready event fired, decrement, and wait if need be
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
+ return;
+ }
+
+ // If there are functions bound, to execute
+ readyList.resolveWith( document, [ jQuery ] );
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.trigger ) {
+ jQuery( document ).trigger("ready").off("ready");
+ }
+ },
+
+ // See test/unit/core.js for details concerning isFunction.
+ // Since version 1.3, DOM methods and functions like alert
+ // aren't supported. They return false on IE (#2968).
+ isFunction: function( obj ) {
+ return jQuery.type(obj) === "function";
+ },
+
+ isArray: Array.isArray || function( obj ) {
+ return jQuery.type(obj) === "array";
+ },
+
+ isWindow: function( obj ) {
+ return obj != null && obj == obj.window;
+ },
+
+ isNumeric: function( obj ) {
+ return !isNaN( parseFloat(obj) ) && isFinite( obj );
+ },
+
+ type: function( obj ) {
+ return obj == null ?
+ String( obj ) :
+ class2type[ core_toString.call(obj) ] || "object";
+ },
+
+ isPlainObject: function( obj ) {
+ // Must be an Object.
+ // Because of IE, we also have to check the presence of the constructor property.
+ // Make sure that DOM nodes and window objects don't pass through, as well
+ if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ try {
+ // Not own constructor property must be Object
+ if ( obj.constructor &&
+ !core_hasOwn.call(obj, "constructor") &&
+ !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+ return false;
+ }
+ } catch ( e ) {
+ // IE8,9 Will throw exceptions on certain host objects #9897
+ return false;
+ }
+
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+
+ var key;
+ for ( key in obj ) {}
+
+ return key === undefined || core_hasOwn.call( obj, key );
+ },
+
+ isEmptyObject: function( obj ) {
+ var name;
+ for ( name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ error: function( msg ) {
+ throw new Error( msg );
+ },
+
+ // data: string of html
+ // context (optional): If specified, the fragment will be created in this context, defaults to document
+ // scripts (optional): If true, will include scripts passed in the html string
+ parseHTML: function( data, context, scripts ) {
+ var parsed;
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+ if ( typeof context === "boolean" ) {
+ scripts = context;
+ context = 0;
+ }
+ context = context || document;
+
+ // Single tag
+ if ( (parsed = rsingleTag.exec( data )) ) {
+ return [ context.createElement( parsed[1] ) ];
+ }
+
+ parsed = jQuery.buildFragment( [ data ], context, scripts ? null : [] );
+ return jQuery.merge( [],
+ (parsed.cacheable ? jQuery.clone( parsed.fragment ) : parsed.fragment).childNodes );
+ },
+
+ parseJSON: function( data ) {
+ if ( !data || typeof data !== "string") {
+ return null;
+ }
+
+ // Make sure leading/trailing whitespace is removed (IE can't handle it)
+ data = jQuery.trim( data );
+
+ // Attempt to parse using the native JSON parser first
+ if ( window.JSON && window.JSON.parse ) {
+ return window.JSON.parse( data );
+ }
+
+ // Make sure the incoming data is actual JSON
+ // Logic borrowed from http://json.org/json2.js
+ if ( rvalidchars.test( data.replace( rvalidescape, "@" )
+ .replace( rvalidtokens, "]" )
+ .replace( rvalidbraces, "")) ) {
+
+ return ( new Function( "return " + data ) )();
+
+ }
+ jQuery.error( "Invalid JSON: " + data );
+ },
+
+ // Cross-browser xml parsing
+ parseXML: function( data ) {
+ var xml, tmp;
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+ try {
+ if ( window.DOMParser ) { // Standard
+ tmp = new DOMParser();
+ xml = tmp.parseFromString( data , "text/xml" );
+ } else { // IE
+ xml = new ActiveXObject( "Microsoft.XMLDOM" );
+ xml.async = "false";
+ xml.loadXML( data );
+ }
+ } catch( e ) {
+ xml = undefined;
+ }
+ if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
+ jQuery.error( "Invalid XML: " + data );
+ }
+ return xml;
+ },
+
+ noop: function() {},
+
+ // Evaluates a script in a global context
+ // Workarounds based on findings by Jim Driscoll
+ // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+ globalEval: function( data ) {
+ if ( data && core_rnotwhite.test( data ) ) {
+ // We use execScript on Internet Explorer
+ // We use an anonymous function so that context is window
+ // rather than jQuery in Firefox
+ ( window.execScript || function( data ) {
+ window[ "eval" ].call( window, data );
+ } )( data );
+ }
+ },
+
+ // Convert dashed to camelCase; used by the css and data modules
+ // Microsoft forgot to hump their vendor prefix (#9572)
+ camelCase: function( string ) {
+ return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+ },
+
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+ },
+
+ // args is for internal usage only
+ each: function( obj, callback, args ) {
+ var name,
+ i = 0,
+ length = obj.length,
+ isObj = length === undefined || jQuery.isFunction( obj );
+
+ if ( args ) {
+ if ( isObj ) {
+ for ( name in obj ) {
+ if ( callback.apply( obj[ name ], args ) === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( ; i < length; ) {
+ if ( callback.apply( obj[ i++ ], args ) === false ) {
+ break;
+ }
+ }
+ }
+
+ // A special, fast, case for the most common use of each
+ } else {
+ if ( isObj ) {
+ for ( name in obj ) {
+ if ( callback.call( obj[ name ], name, obj[ name ] ) === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( ; i < length; ) {
+ if ( callback.call( obj[ i ], i, obj[ i++ ] ) === false ) {
+ break;
+ }
+ }
+ }
+ }
+
+ return obj;
+ },
+
+ // Use native String.trim function wherever possible
+ trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
+ function( text ) {
+ return text == null ?
+ "" :
+ core_trim.call( text );
+ } :
+
+ // Otherwise use our own trimming functionality
+ function( text ) {
+ return text == null ?
+ "" :
+ ( text + "" ).replace( rtrim, "" );
+ },
+
+ // results is for internal usage only
+ makeArray: function( arr, results ) {
+ var type,
+ ret = results || [];
+
+ if ( arr != null ) {
+ // The window, strings (and functions) also have 'length'
+ // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+ type = jQuery.type( arr );
+
+ if ( arr.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( arr ) ) {
+ core_push.call( ret, arr );
+ } else {
+ jQuery.merge( ret, arr );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, arr, i ) {
+ var len;
+
+ if ( arr ) {
+ if ( core_indexOf ) {
+ return core_indexOf.call( arr, elem, i );
+ }
+
+ len = arr.length;
+ i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
+
+ for ( ; i < len; i++ ) {
+ // Skip accessing in sparse arrays
+ if ( i in arr && arr[ i ] === elem ) {
+ return i;
+ }
+ }
+ }
+
+ return -1;
+ },
+
+ merge: function( first, second ) {
+ var l = second.length,
+ i = first.length,
+ j = 0;
+
+ if ( typeof l === "number" ) {
+ for ( ; j < l; j++ ) {
+ first[ i++ ] = second[ j ];
+ }
+
+ } else {
+ while ( second[j] !== undefined ) {
+ first[ i++ ] = second[ j++ ];
+ }
+ }
+
+ first.length = i;
+
+ return first;
+ },
+
+ grep: function( elems, callback, inv ) {
+ var retVal,
+ ret = [],
+ i = 0,
+ length = elems.length;
+ inv = !!inv;
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( ; i < length; i++ ) {
+ retVal = !!callback( elems[ i ], i );
+ if ( inv !== retVal ) {
+ ret.push( elems[ i ] );
+ }
+ }
+
+ return ret;
+ },
+
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var value, key,
+ ret = [],
+ i = 0,
+ length = elems.length,
+ // jquery objects are treated as arrays
+ isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
+
+ // Go through the array, translating each of the items to their
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+
+ // Go through every key on the object,
+ } else {
+ for ( key in elems ) {
+ value = callback( elems[ key ], key, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+ }
+
+ // Flatten any nested arrays
+ return ret.concat.apply( [], ret );
+ },
+
+ // A global GUID counter for objects
+ guid: 1,
+
+ // Bind a function to a context, optionally partially applying any
+ // arguments.
+ proxy: function( fn, context ) {
+ var tmp, args, proxy;
+
+ if ( typeof context === "string" ) {
+ tmp = fn[ context ];
+ context = fn;
+ fn = tmp;
+ }
+
+ // Quick check to determine if target is callable, in the spec
+ // this throws a TypeError, but we will just return undefined.
+ if ( !jQuery.isFunction( fn ) ) {
+ return undefined;
+ }
+
+ // Simulated bind
+ args = core_slice.call( arguments, 2 );
+ proxy = function() {
+ return fn.apply( context, args.concat( core_slice.call( arguments ) ) );
+ };
+
+ // Set the guid of unique handler to the same of original handler, so it can be removed
+ proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+ return proxy;
+ },
+
+ // Multifunctional method to get and set values of a collection
+ // The value/s can optionally be executed if it's a function
+ access: function( elems, fn, key, value, chainable, emptyGet, pass ) {
+ var exec,
+ bulk = key == null,
+ i = 0,
+ length = elems.length;
+
+ // Sets many values
+ if ( key && typeof key === "object" ) {
+ for ( i in key ) {
+ jQuery.access( elems, fn, i, key[i], 1, emptyGet, value );
+ }
+ chainable = 1;
+
+ // Sets one value
+ } else if ( value !== undefined ) {
+ // Optionally, function values get executed if exec is true
+ exec = pass === undefined && jQuery.isFunction( value );
+
+ if ( bulk ) {
+ // Bulk operations only iterate when executing function values
+ if ( exec ) {
+ exec = fn;
+ fn = function( elem, key, value ) {
+ return exec.call( jQuery( elem ), value );
+ };
+
+ // Otherwise they run against the entire set
+ } else {
+ fn.call( elems, value );
+ fn = null;
+ }
+ }
+
+ if ( fn ) {
+ for (; i < length; i++ ) {
+ fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
+ }
+ }
+
+ chainable = 1;
+ }
+
+ return chainable ?
+ elems :
+
+ // Gets
+ bulk ?
+ fn.call( elems ) :
+ length ? fn( elems[0], key ) : emptyGet;
+ },
+
+ now: function() {
+ return ( new Date() ).getTime();
+ }
+});
+
+jQuery.ready.promise = function( obj ) {
+ if ( !readyList ) {
+
+ readyList = jQuery.Deferred();
+
+ // Catch cases where $(document).ready() is called after the browser event has already occurred.
+ // we once tried to use readyState "interactive" here, but it caused issues like the one
+ // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+ if ( document.readyState === "complete" ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ setTimeout( jQuery.ready, 1 );
+
+ // Standards-based browsers support DOMContentLoaded
+ } else if ( document.addEventListener ) {
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", jQuery.ready, false );
+
+ // If IE event model is used
+ } else {
+ // Ensure firing before onload, maybe late but safe also for iframes
+ document.attachEvent( "onreadystatechange", DOMContentLoaded );
+
+ // A fallback to window.onload, that will always work
+ window.attachEvent( "onload", jQuery.ready );
+
+ // If IE and not a frame
+ // continually check to see if the document is ready
+ var top = false;
+
+ try {
+ top = window.frameElement == null && document.documentElement;
+ } catch(e) {}
+
+ if ( top && top.doScroll ) {
+ (function doScrollCheck() {
+ if ( !jQuery.isReady ) {
+
+ try {
+ // Use the trick by Diego Perini
+ // http://javascript.nwbox.com/IEContentLoaded/
+ top.doScroll("left");
+ } catch(e) {
+ return setTimeout( doScrollCheck, 50 );
+ }
+
+ // and execute any waiting functions
+ jQuery.ready();
+ }
+ })();
+ }
+ }
+ }
+ return readyList.promise( obj );
+};
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+// String to Object options format cache
+var optionsCache = {};
+
+// Convert String-formatted options into Object-formatted ones and store in cache
+function createOptions( options ) {
+ var object = optionsCache[ options ] = {};
+ jQuery.each( options.split( core_rspace ), function( _, flag ) {
+ object[ flag ] = true;
+ });
+ return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ * options: an optional list of space-separated options that will change how
+ * the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible options:
+ *
+ * once: will ensure the callback list can only be fired once (like a Deferred)
+ *
+ * memory: will keep track of previous values and will call any callback added
+ * after the list has been fired right away with the latest "memorized"
+ * values (like a Deferred)
+ *
+ * unique: will ensure a callback can only be added once (no duplicate in the list)
+ *
+ * stopOnFalse: interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+ // Convert options from String-formatted to Object-formatted if needed
+ // (we check in cache first)
+ options = typeof options === "string" ?
+ ( optionsCache[ options ] || createOptions( options ) ) :
+ jQuery.extend( {}, options );
+
+ var // Last fire value (for non-forgettable lists)
+ memory,
+ // Flag to know if list was already fired
+ fired,
+ // Flag to know if list is currently firing
+ firing,
+ // First callback to fire (used internally by add and fireWith)
+ firingStart,
+ // End of the loop when firing
+ firingLength,
+ // Index of currently firing callback (modified by remove if needed)
+ firingIndex,
+ // Actual callback list
+ list = [],
+ // Stack of fire calls for repeatable lists
+ stack = !options.once && [],
+ // Fire callbacks
+ fire = function( data ) {
+ memory = options.memory && data;
+ fired = true;
+ firingIndex = firingStart || 0;
+ firingStart = 0;
+ firingLength = list.length;
+ firing = true;
+ for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+ if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
+ memory = false; // To prevent further calls using add
+ break;
+ }
+ }
+ firing = false;
+ if ( list ) {
+ if ( stack ) {
+ if ( stack.length ) {
+ fire( stack.shift() );
+ }
+ } else if ( memory ) {
+ list = [];
+ } else {
+ self.disable();
+ }
+ }
+ },
+ // Actual Callbacks object
+ self = {
+ // Add a callback or a collection of callbacks to the list
+ add: function() {
+ if ( list ) {
+ // First, we save the current length
+ var start = list.length;
+ (function add( args ) {
+ jQuery.each( args, function( _, arg ) {
+ var type = jQuery.type( arg );
+ if ( type === "function" ) {
+ if ( !options.unique || !self.has( arg ) ) {
+ list.push( arg );
+ }
+ } else if ( arg && arg.length && type !== "string" ) {
+ // Inspect recursively
+ add( arg );
+ }
+ });
+ })( arguments );
+ // Do we need to add the callbacks to the
+ // current firing batch?
+ if ( firing ) {
+ firingLength = list.length;
+ // With memory, if we're not firing then
+ // we should call right away
+ } else if ( memory ) {
+ firingStart = start;
+ fire( memory );
+ }
+ }
+ return this;
+ },
+ // Remove a callback from the list
+ remove: function() {
+ if ( list ) {
+ jQuery.each( arguments, function( _, arg ) {
+ var index;
+ while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
+ list.splice( index, 1 );
+ // Handle firing indexes
+ if ( firing ) {
+ if ( index <= firingLength ) {
+ firingLength--;
+ }
+ if ( index <= firingIndex ) {
+ firingIndex--;
+ }
+ }
+ }
+ });
+ }
+ return this;
+ },
+ // Control if a given callback is in the list
+ has: function( fn ) {
+ return jQuery.inArray( fn, list ) > -1;
+ },
+ // Remove all callbacks from the list
+ empty: function() {
+ list = [];
+ return this;
+ },
+ // Have the list do nothing anymore
+ disable: function() {
+ list = stack = memory = undefined;
+ return this;
+ },
+ // Is it disabled?
+ disabled: function() {
+ return !list;
+ },
+ // Lock the list in its current state
+ lock: function() {
+ stack = undefined;
+ if ( !memory ) {
+ self.disable();
+ }
+ return this;
+ },
+ // Is it locked?
+ locked: function() {
+ return !stack;
+ },
+ // Call all callbacks with the given context and arguments
+ fireWith: function( context, args ) {
+ args = args || [];
+ args = [ context, args.slice ? args.slice() : args ];
+ if ( list && ( !fired || stack ) ) {
+ if ( firing ) {
+ stack.push( args );
+ } else {
+ fire( args );
+ }
+ }
+ return this;
+ },
+ // Call all the callbacks with the given arguments
+ fire: function() {
+ self.fireWith( this, arguments );
+ return this;
+ },
+ // To know if the callbacks have already been called at least once
+ fired: function() {
+ return !!fired;
+ }
+ };
+
+ return self;
+};
+jQuery.extend({
+
+ Deferred: function( func ) {
+ var tuples = [
+ // action, add listener, listener list, final state
+ [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
+ [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
+ [ "notify", "progress", jQuery.Callbacks("memory") ]
+ ],
+ state = "pending",
+ promise = {
+ state: function() {
+ return state;
+ },
+ always: function() {
+ deferred.done( arguments ).fail( arguments );
+ return this;
+ },
+ then: function( /* fnDone, fnFail, fnProgress */ ) {
+ var fns = arguments;
+ return jQuery.Deferred(function( newDefer ) {
+ jQuery.each( tuples, function( i, tuple ) {
+ var action = tuple[ 0 ],
+ fn = fns[ i ];
+ // deferred[ done | fail | progress ] for forwarding actions to newDefer
+ deferred[ tuple[1] ]( jQuery.isFunction( fn ) ?
+ function() {
+ var returned = fn.apply( this, arguments );
+ if ( returned && jQuery.isFunction( returned.promise ) ) {
+ returned.promise()
+ .done( newDefer.resolve )
+ .fail( newDefer.reject )
+ .progress( newDefer.notify );
+ } else {
+ newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
+ }
+ } :
+ newDefer[ action ]
+ );
+ });
+ fns = null;
+ }).promise();
+ },
+ // Get a promise for this deferred
+ // If obj is provided, the promise aspect is added to the object
+ promise: function( obj ) {
+ return obj != null ? jQuery.extend( obj, promise ) : promise;
+ }
+ },
+ deferred = {};
+
+ // Keep pipe for back-compat
+ promise.pipe = promise.then;
+
+ // Add list-specific methods
+ jQuery.each( tuples, function( i, tuple ) {
+ var list = tuple[ 2 ],
+ stateString = tuple[ 3 ];
+
+ // promise[ done | fail | progress ] = list.add
+ promise[ tuple[1] ] = list.add;
+
+ // Handle state
+ if ( stateString ) {
+ list.add(function() {
+ // state = [ resolved | rejected ]
+ state = stateString;
+
+ // [ reject_list | resolve_list ].disable; progress_list.lock
+ }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
+ }
+
+ // deferred[ resolve | reject | notify ] = list.fire
+ deferred[ tuple[0] ] = list.fire;
+ deferred[ tuple[0] + "With" ] = list.fireWith;
+ });
+
+ // Make the deferred a promise
+ promise.promise( deferred );
+
+ // Call given func if any
+ if ( func ) {
+ func.call( deferred, deferred );
+ }
+
+ // All done!
+ return deferred;
+ },
+
+ // Deferred helper
+ when: function( subordinate /* , ..., subordinateN */ ) {
+ var i = 0,
+ resolveValues = core_slice.call( arguments ),
+ length = resolveValues.length,
+
+ // the count of uncompleted subordinates
+ remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
+
+ // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
+ deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
+
+ // Update function for both resolve and progress values
+ updateFunc = function( i, contexts, values ) {
+ return function( value ) {
+ contexts[ i ] = this;
+ values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
+ if( values === progressValues ) {
+ deferred.notifyWith( contexts, values );
+ } else if ( !( --remaining ) ) {
+ deferred.resolveWith( contexts, values );
+ }
+ };
+ },
+
+ progressValues, progressContexts, resolveContexts;
+
+ // add listeners to Deferred subordinates; treat others as resolved
+ if ( length > 1 ) {
+ progressValues = new Array( length );
+ progressContexts = new Array( length );
+ resolveContexts = new Array( length );
+ for ( ; i < length; i++ ) {
+ if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
+ resolveValues[ i ].promise()
+ .done( updateFunc( i, resolveContexts, resolveValues ) )
+ .fail( deferred.reject )
+ .progress( updateFunc( i, progressContexts, progressValues ) );
+ } else {
+ --remaining;
+ }
+ }
+ }
+
+ // if we're not waiting on anything, resolve the master
+ if ( !remaining ) {
+ deferred.resolveWith( resolveContexts, resolveValues );
+ }
+
+ return deferred.promise();
+ }
+});
+jQuery.support = (function() {
+
+ var support,
+ all,
+ a,
+ select,
+ opt,
+ input,
+ fragment,
+ eventName,
+ i,
+ isSupported,
+ clickFn,
+ div = document.createElement("div");
+
+ // Setup
+ div.setAttribute( "className", "t" );
+ div.innerHTML = " a ";
+
+ // Support tests won't run in some limited or non-browser environments
+ all = div.getElementsByTagName("*");
+ a = div.getElementsByTagName("a")[ 0 ];
+ if ( !all || !a || !all.length ) {
+ return {};
+ }
+
+ // First batch of tests
+ select = document.createElement("select");
+ opt = select.appendChild( document.createElement("option") );
+ input = div.getElementsByTagName("input")[ 0 ];
+
+ a.style.cssText = "top:1px;float:left;opacity:.5";
+ support = {
+ // IE strips leading whitespace when .innerHTML is used
+ leadingWhitespace: ( div.firstChild.nodeType === 3 ),
+
+ // Make sure that tbody elements aren't automatically inserted
+ // IE will insert them into empty tables
+ tbody: !div.getElementsByTagName("tbody").length,
+
+ // Make sure that link elements get serialized correctly by innerHTML
+ // This requires a wrapper element in IE
+ htmlSerialize: !!div.getElementsByTagName("link").length,
+
+ // Get the style information from getAttribute
+ // (IE uses .cssText instead)
+ style: /top/.test( a.getAttribute("style") ),
+
+ // Make sure that URLs aren't manipulated
+ // (IE normalizes it by default)
+ hrefNormalized: ( a.getAttribute("href") === "/a" ),
+
+ // Make sure that element opacity exists
+ // (IE uses filter instead)
+ // Use a regex to work around a WebKit issue. See #5145
+ opacity: /^0.5/.test( a.style.opacity ),
+
+ // Verify style float existence
+ // (IE uses styleFloat instead of cssFloat)
+ cssFloat: !!a.style.cssFloat,
+
+ // Make sure that if no value is specified for a checkbox
+ // that it defaults to "on".
+ // (WebKit defaults to "" instead)
+ checkOn: ( input.value === "on" ),
+
+ // Make sure that a selected-by-default option has a working selected property.
+ // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+ optSelected: opt.selected,
+
+ // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+ getSetAttribute: div.className !== "t",
+
+ // Tests for enctype support on a form (#6743)
+ enctype: !!document.createElement("form").enctype,
+
+ // Makes sure cloning an html5 element does not cause problems
+ // Where outerHTML is undefined, this still works
+ html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>",
+
+ // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
+ boxModel: ( document.compatMode === "CSS1Compat" ),
+
+ // Will be defined later
+ submitBubbles: true,
+ changeBubbles: true,
+ focusinBubbles: false,
+ deleteExpando: true,
+ noCloneEvent: true,
+ inlineBlockNeedsLayout: false,
+ shrinkWrapBlocks: false,
+ reliableMarginRight: true,
+ boxSizingReliable: true,
+ pixelPosition: false
+ };
+
+ // Make sure checked status is properly cloned
+ input.checked = true;
+ support.noCloneChecked = input.cloneNode( true ).checked;
+
+ // Make sure that the options inside disabled selects aren't marked as disabled
+ // (WebKit marks them as disabled)
+ select.disabled = true;
+ support.optDisabled = !opt.disabled;
+
+ // Test to see if it's possible to delete an expando from an element
+ // Fails in Internet Explorer
+ try {
+ delete div.test;
+ } catch( e ) {
+ support.deleteExpando = false;
+ }
+
+ if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
+ div.attachEvent( "onclick", clickFn = function() {
+ // Cloning a node shouldn't copy over any
+ // bound event handlers (IE does this)
+ support.noCloneEvent = false;
+ });
+ div.cloneNode( true ).fireEvent("onclick");
+ div.detachEvent( "onclick", clickFn );
+ }
+
+ // Check if a radio maintains its value
+ // after being appended to the DOM
+ input = document.createElement("input");
+ input.value = "t";
+ input.setAttribute( "type", "radio" );
+ support.radioValue = input.value === "t";
+
+ input.setAttribute( "checked", "checked" );
+
+ // #11217 - WebKit loses check when the name is after the checked attribute
+ input.setAttribute( "name", "t" );
+
+ div.appendChild( input );
+ fragment = document.createDocumentFragment();
+ fragment.appendChild( div.lastChild );
+
+ // WebKit doesn't clone checked state correctly in fragments
+ support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+ // Check if a disconnected checkbox will retain its checked
+ // value of true after appended to the DOM (IE6/7)
+ support.appendChecked = input.checked;
+
+ fragment.removeChild( input );
+ fragment.appendChild( div );
+
+ // Technique from Juriy Zaytsev
+ // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
+ // We only care about the case where non-standard event systems
+ // are used, namely in IE. Short-circuiting here helps us to
+ // avoid an eval call (in setAttribute) which can cause CSP
+ // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
+ if ( div.attachEvent ) {
+ for ( i in {
+ submit: true,
+ change: true,
+ focusin: true
+ }) {
+ eventName = "on" + i;
+ isSupported = ( eventName in div );
+ if ( !isSupported ) {
+ div.setAttribute( eventName, "return;" );
+ isSupported = ( typeof div[ eventName ] === "function" );
+ }
+ support[ i + "Bubbles" ] = isSupported;
+ }
+ }
+
+ // Run tests that need a body at doc ready
+ jQuery(function() {
+ var container, div, tds, marginDiv,
+ divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;",
+ body = document.getElementsByTagName("body")[0];
+
+ if ( !body ) {
+ // Return for frameset docs that don't have a body
+ return;
+ }
+
+ container = document.createElement("div");
+ container.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px";
+ body.insertBefore( container, body.firstChild );
+
+ // Construct the test element
+ div = document.createElement("div");
+ container.appendChild( div );
+
+ // Check if table cells still have offsetWidth/Height when they are set
+ // to display:none and there are still other visible table cells in a
+ // table row; if so, offsetWidth/Height are not reliable for use when
+ // determining if an element has been hidden directly using
+ // display:none (it is still safe to use offsets if a parent element is
+ // hidden; don safety goggles and see bug #4512 for more information).
+ // (only IE 8 fails this test)
+ div.innerHTML = "";
+ tds = div.getElementsByTagName("td");
+ tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
+ isSupported = ( tds[ 0 ].offsetHeight === 0 );
+
+ tds[ 0 ].style.display = "";
+ tds[ 1 ].style.display = "none";
+
+ // Check if empty table cells still have offsetWidth/Height
+ // (IE <= 8 fail this test)
+ support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
+
+ // Check box-sizing and margin behavior
+ div.innerHTML = "";
+ div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
+ support.boxSizing = ( div.offsetWidth === 4 );
+ support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );
+
+ // NOTE: To any future maintainer, we've window.getComputedStyle
+ // because jsdom on node.js will break without it.
+ if ( window.getComputedStyle ) {
+ support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
+ support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
+
+ // Check if div with explicit width and no margin-right incorrectly
+ // gets computed margin-right based on width of container. For more
+ // info see bug #3333
+ // Fails in WebKit before Feb 2011 nightlies
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ marginDiv = document.createElement("div");
+ marginDiv.style.cssText = div.style.cssText = divReset;
+ marginDiv.style.marginRight = marginDiv.style.width = "0";
+ div.style.width = "1px";
+ div.appendChild( marginDiv );
+ support.reliableMarginRight =
+ !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
+ }
+
+ if ( typeof div.style.zoom !== "undefined" ) {
+ // Check if natively block-level elements act like inline-block
+ // elements when setting their display to 'inline' and giving
+ // them layout
+ // (IE < 8 does this)
+ div.innerHTML = "";
+ div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
+ support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
+
+ // Check if elements with layout shrink-wrap their children
+ // (IE 6 does this)
+ div.style.display = "block";
+ div.style.overflow = "visible";
+ div.innerHTML = "
";
+ div.firstChild.style.width = "5px";
+ support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
+
+ container.style.zoom = 1;
+ }
+
+ // Null elements to avoid leaks in IE
+ body.removeChild( container );
+ container = div = tds = marginDiv = null;
+ });
+
+ // Null elements to avoid leaks in IE
+ fragment.removeChild( div );
+ all = a = select = opt = input = fragment = div = null;
+
+ return support;
+})();
+var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
+ rmultiDash = /([A-Z])/g;
+
+jQuery.extend({
+ cache: {},
+
+ deletedIds: [],
+
+ // Remove at next major release (1.9/2.0)
+ uuid: 0,
+
+ // Unique for each copy of jQuery on the page
+ // Non-digits removed to match rinlinejQuery
+ expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
+
+ // The following elements throw uncatchable exceptions if you
+ // attempt to add expando properties to them.
+ noData: {
+ "embed": true,
+ // Ban all objects except for Flash (which handle expandos)
+ "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
+ "applet": true
+ },
+
+ hasData: function( elem ) {
+ elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
+ return !!elem && !isEmptyDataObject( elem );
+ },
+
+ data: function( elem, name, data, pvt /* Internal Use Only */ ) {
+ if ( !jQuery.acceptData( elem ) ) {
+ return;
+ }
+
+ var thisCache, ret,
+ internalKey = jQuery.expando,
+ getByName = typeof name === "string",
+
+ // We have to handle DOM nodes and JS objects differently because IE6-7
+ // can't GC object references properly across the DOM-JS boundary
+ isNode = elem.nodeType,
+
+ // Only DOM nodes need the global jQuery cache; JS object data is
+ // attached directly to the object so GC can occur automatically
+ cache = isNode ? jQuery.cache : elem,
+
+ // Only defining an ID for JS objects if its cache already exists allows
+ // the code to shortcut on the same path as a DOM node with no cache
+ id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
+
+ // Avoid doing any more work than we need to when trying to get data on an
+ // object that has no data at all
+ if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) {
+ return;
+ }
+
+ if ( !id ) {
+ // Only DOM nodes need a new unique ID for each element since their data
+ // ends up in the global cache
+ if ( isNode ) {
+ elem[ internalKey ] = id = jQuery.deletedIds.pop() || jQuery.guid++;
+ } else {
+ id = internalKey;
+ }
+ }
+
+ if ( !cache[ id ] ) {
+ cache[ id ] = {};
+
+ // Avoids exposing jQuery metadata on plain JS objects when the object
+ // is serialized using JSON.stringify
+ if ( !isNode ) {
+ cache[ id ].toJSON = jQuery.noop;
+ }
+ }
+
+ // An object can be passed to jQuery.data instead of a key/value pair; this gets
+ // shallow copied over onto the existing cache
+ if ( typeof name === "object" || typeof name === "function" ) {
+ if ( pvt ) {
+ cache[ id ] = jQuery.extend( cache[ id ], name );
+ } else {
+ cache[ id ].data = jQuery.extend( cache[ id ].data, name );
+ }
+ }
+
+ thisCache = cache[ id ];
+
+ // jQuery data() is stored in a separate object inside the object's internal data
+ // cache in order to avoid key collisions between internal data and user-defined
+ // data.
+ if ( !pvt ) {
+ if ( !thisCache.data ) {
+ thisCache.data = {};
+ }
+
+ thisCache = thisCache.data;
+ }
+
+ if ( data !== undefined ) {
+ thisCache[ jQuery.camelCase( name ) ] = data;
+ }
+
+ // Check for both converted-to-camel and non-converted data property names
+ // If a data property was specified
+ if ( getByName ) {
+
+ // First Try to find as-is property data
+ ret = thisCache[ name ];
+
+ // Test for null|undefined property data
+ if ( ret == null ) {
+
+ // Try to find the camelCased property
+ ret = thisCache[ jQuery.camelCase( name ) ];
+ }
+ } else {
+ ret = thisCache;
+ }
+
+ return ret;
+ },
+
+ removeData: function( elem, name, pvt /* Internal Use Only */ ) {
+ if ( !jQuery.acceptData( elem ) ) {
+ return;
+ }
+
+ var thisCache, i, l,
+
+ isNode = elem.nodeType,
+
+ // See jQuery.data for more information
+ cache = isNode ? jQuery.cache : elem,
+ id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
+
+ // If there is already no cache entry for this object, there is no
+ // purpose in continuing
+ if ( !cache[ id ] ) {
+ return;
+ }
+
+ if ( name ) {
+
+ thisCache = pvt ? cache[ id ] : cache[ id ].data;
+
+ if ( thisCache ) {
+
+ // Support array or space separated string names for data keys
+ if ( !jQuery.isArray( name ) ) {
+
+ // try the string as a key before any manipulation
+ if ( name in thisCache ) {
+ name = [ name ];
+ } else {
+
+ // split the camel cased version by spaces unless a key with the spaces exists
+ name = jQuery.camelCase( name );
+ if ( name in thisCache ) {
+ name = [ name ];
+ } else {
+ name = name.split(" ");
+ }
+ }
+ }
+
+ for ( i = 0, l = name.length; i < l; i++ ) {
+ delete thisCache[ name[i] ];
+ }
+
+ // If there is no data left in the cache, we want to continue
+ // and let the cache object itself get destroyed
+ if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
+ return;
+ }
+ }
+ }
+
+ // See jQuery.data for more information
+ if ( !pvt ) {
+ delete cache[ id ].data;
+
+ // Don't destroy the parent cache unless the internal data object
+ // had been the only thing left in it
+ if ( !isEmptyDataObject( cache[ id ] ) ) {
+ return;
+ }
+ }
+
+ // Destroy the cache
+ if ( isNode ) {
+ jQuery.cleanData( [ elem ], true );
+
+ // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
+ } else if ( jQuery.support.deleteExpando || cache != cache.window ) {
+ delete cache[ id ];
+
+ // When all else fails, null
+ } else {
+ cache[ id ] = null;
+ }
+ },
+
+ // For internal use only.
+ _data: function( elem, name, data ) {
+ return jQuery.data( elem, name, data, true );
+ },
+
+ // A method for determining if a DOM node can handle the data expando
+ acceptData: function( elem ) {
+ var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+ // nodes accept data unless otherwise specified; rejection can be conditional
+ return !noData || noData !== true && elem.getAttribute("classid") === noData;
+ }
+});
+
+jQuery.fn.extend({
+ data: function( key, value ) {
+ var parts, part, attr, name, l,
+ elem = this[0],
+ i = 0,
+ data = null;
+
+ // Gets all values
+ if ( key === undefined ) {
+ if ( this.length ) {
+ data = jQuery.data( elem );
+
+ if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
+ attr = elem.attributes;
+ for ( l = attr.length; i < l; i++ ) {
+ name = attr[i].name;
+
+ if ( !name.indexOf( "data-" ) ) {
+ name = jQuery.camelCase( name.substring(5) );
+
+ dataAttr( elem, name, data[ name ] );
+ }
+ }
+ jQuery._data( elem, "parsedAttrs", true );
+ }
+ }
+
+ return data;
+ }
+
+ // Sets multiple values
+ if ( typeof key === "object" ) {
+ return this.each(function() {
+ jQuery.data( this, key );
+ });
+ }
+
+ parts = key.split( ".", 2 );
+ parts[1] = parts[1] ? "." + parts[1] : "";
+ part = parts[1] + "!";
+
+ return jQuery.access( this, function( value ) {
+
+ if ( value === undefined ) {
+ data = this.triggerHandler( "getData" + part, [ parts[0] ] );
+
+ // Try to fetch any internally stored data first
+ if ( data === undefined && elem ) {
+ data = jQuery.data( elem, key );
+ data = dataAttr( elem, key, data );
+ }
+
+ return data === undefined && parts[1] ?
+ this.data( parts[0] ) :
+ data;
+ }
+
+ parts[1] = value;
+ this.each(function() {
+ var self = jQuery( this );
+
+ self.triggerHandler( "setData" + part, parts );
+ jQuery.data( this, key, value );
+ self.triggerHandler( "changeData" + part, parts );
+ });
+ }, null, value, arguments.length > 1, null, false );
+ },
+
+ removeData: function( key ) {
+ return this.each(function() {
+ jQuery.removeData( this, key );
+ });
+ }
+});
+
+function dataAttr( elem, key, data ) {
+ // If nothing was found internally, try to fetch any
+ // data from the HTML5 data-* attribute
+ if ( data === undefined && elem.nodeType === 1 ) {
+
+ var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
+
+ data = elem.getAttribute( name );
+
+ if ( typeof data === "string" ) {
+ try {
+ data = data === "true" ? true :
+ data === "false" ? false :
+ data === "null" ? null :
+ // Only convert to a number if it doesn't change the string
+ +data + "" === data ? +data :
+ rbrace.test( data ) ? jQuery.parseJSON( data ) :
+ data;
+ } catch( e ) {}
+
+ // Make sure we set the data so it isn't changed later
+ jQuery.data( elem, key, data );
+
+ } else {
+ data = undefined;
+ }
+ }
+
+ return data;
+}
+
+// checks a cache object for emptiness
+function isEmptyDataObject( obj ) {
+ var name;
+ for ( name in obj ) {
+
+ // if the public data object is empty, the private is still empty
+ if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
+ continue;
+ }
+ if ( name !== "toJSON" ) {
+ return false;
+ }
+ }
+
+ return true;
+}
+jQuery.extend({
+ queue: function( elem, type, data ) {
+ var queue;
+
+ if ( elem ) {
+ type = ( type || "fx" ) + "queue";
+ queue = jQuery._data( elem, type );
+
+ // Speed up dequeue by getting out quickly if this is just a lookup
+ if ( data ) {
+ if ( !queue || jQuery.isArray(data) ) {
+ queue = jQuery._data( elem, type, jQuery.makeArray(data) );
+ } else {
+ queue.push( data );
+ }
+ }
+ return queue || [];
+ }
+ },
+
+ dequeue: function( elem, type ) {
+ type = type || "fx";
+
+ var queue = jQuery.queue( elem, type ),
+ startLength = queue.length,
+ fn = queue.shift(),
+ hooks = jQuery._queueHooks( elem, type ),
+ next = function() {
+ jQuery.dequeue( elem, type );
+ };
+
+ // If the fx queue is dequeued, always remove the progress sentinel
+ if ( fn === "inprogress" ) {
+ fn = queue.shift();
+ startLength--;
+ }
+
+ if ( fn ) {
+
+ // Add a progress sentinel to prevent the fx queue from being
+ // automatically dequeued
+ if ( type === "fx" ) {
+ queue.unshift( "inprogress" );
+ }
+
+ // clear up the last queue stop function
+ delete hooks.stop;
+ fn.call( elem, next, hooks );
+ }
+
+ if ( !startLength && hooks ) {
+ hooks.empty.fire();
+ }
+ },
+
+ // not intended for public consumption - generates a queueHooks object, or returns the current one
+ _queueHooks: function( elem, type ) {
+ var key = type + "queueHooks";
+ return jQuery._data( elem, key ) || jQuery._data( elem, key, {
+ empty: jQuery.Callbacks("once memory").add(function() {
+ jQuery.removeData( elem, type + "queue", true );
+ jQuery.removeData( elem, key, true );
+ })
+ });
+ }
+});
+
+jQuery.fn.extend({
+ queue: function( type, data ) {
+ var setter = 2;
+
+ if ( typeof type !== "string" ) {
+ data = type;
+ type = "fx";
+ setter--;
+ }
+
+ if ( arguments.length < setter ) {
+ return jQuery.queue( this[0], type );
+ }
+
+ return data === undefined ?
+ this :
+ this.each(function() {
+ var queue = jQuery.queue( this, type, data );
+
+ // ensure a hooks for this queue
+ jQuery._queueHooks( this, type );
+
+ if ( type === "fx" && queue[0] !== "inprogress" ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ dequeue: function( type ) {
+ return this.each(function() {
+ jQuery.dequeue( this, type );
+ });
+ },
+ // Based off of the plugin by Clint Helfers, with permission.
+ // http://blindsignals.com/index.php/2009/07/jquery-delay/
+ delay: function( time, type ) {
+ time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+ type = type || "fx";
+
+ return this.queue( type, function( next, hooks ) {
+ var timeout = setTimeout( next, time );
+ hooks.stop = function() {
+ clearTimeout( timeout );
+ };
+ });
+ },
+ clearQueue: function( type ) {
+ return this.queue( type || "fx", [] );
+ },
+ // Get a promise resolved when queues of a certain type
+ // are emptied (fx is the type by default)
+ promise: function( type, obj ) {
+ var tmp,
+ count = 1,
+ defer = jQuery.Deferred(),
+ elements = this,
+ i = this.length,
+ resolve = function() {
+ if ( !( --count ) ) {
+ defer.resolveWith( elements, [ elements ] );
+ }
+ };
+
+ if ( typeof type !== "string" ) {
+ obj = type;
+ type = undefined;
+ }
+ type = type || "fx";
+
+ while( i-- ) {
+ tmp = jQuery._data( elements[ i ], type + "queueHooks" );
+ if ( tmp && tmp.empty ) {
+ count++;
+ tmp.empty.add( resolve );
+ }
+ }
+ resolve();
+ return defer.promise( obj );
+ }
+});
+var nodeHook, boolHook, fixSpecified,
+ rclass = /[\t\r\n]/g,
+ rreturn = /\r/g,
+ rtype = /^(?:button|input)$/i,
+ rfocusable = /^(?:button|input|object|select|textarea)$/i,
+ rclickable = /^a(?:rea|)$/i,
+ rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
+ getSetAttribute = jQuery.support.getSetAttribute;
+
+jQuery.fn.extend({
+ attr: function( name, value ) {
+ return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
+ },
+
+ removeAttr: function( name ) {
+ return this.each(function() {
+ jQuery.removeAttr( this, name );
+ });
+ },
+
+ prop: function( name, value ) {
+ return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
+ },
+
+ removeProp: function( name ) {
+ name = jQuery.propFix[ name ] || name;
+ return this.each(function() {
+ // try/catch handles cases where IE balks (such as removing a property on window)
+ try {
+ this[ name ] = undefined;
+ delete this[ name ];
+ } catch( e ) {}
+ });
+ },
+
+ addClass: function( value ) {
+ var classNames, i, l, elem,
+ setClass, c, cl;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).addClass( value.call(this, j, this.className) );
+ });
+ }
+
+ if ( value && typeof value === "string" ) {
+ classNames = value.split( core_rspace );
+
+ for ( i = 0, l = this.length; i < l; i++ ) {
+ elem = this[ i ];
+
+ if ( elem.nodeType === 1 ) {
+ if ( !elem.className && classNames.length === 1 ) {
+ elem.className = value;
+
+ } else {
+ setClass = " " + elem.className + " ";
+
+ for ( c = 0, cl = classNames.length; c < cl; c++ ) {
+ if ( setClass.indexOf( " " + classNames[ c ] + " " ) < 0 ) {
+ setClass += classNames[ c ] + " ";
+ }
+ }
+ elem.className = jQuery.trim( setClass );
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ removeClass: function( value ) {
+ var removes, className, elem, c, cl, i, l;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).removeClass( value.call(this, j, this.className) );
+ });
+ }
+ if ( (value && typeof value === "string") || value === undefined ) {
+ removes = ( value || "" ).split( core_rspace );
+
+ for ( i = 0, l = this.length; i < l; i++ ) {
+ elem = this[ i ];
+ if ( elem.nodeType === 1 && elem.className ) {
+
+ className = (" " + elem.className + " ").replace( rclass, " " );
+
+ // loop over each item in the removal list
+ for ( c = 0, cl = removes.length; c < cl; c++ ) {
+ // Remove until there is nothing to remove,
+ while ( className.indexOf(" " + removes[ c ] + " ") >= 0 ) {
+ className = className.replace( " " + removes[ c ] + " " , " " );
+ }
+ }
+ elem.className = value ? jQuery.trim( className ) : "";
+ }
+ }
+ }
+
+ return this;
+ },
+
+ toggleClass: function( value, stateVal ) {
+ var type = typeof value,
+ isBool = typeof stateVal === "boolean";
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+ });
+ }
+
+ return this.each(function() {
+ if ( type === "string" ) {
+ // toggle individual class names
+ var className,
+ i = 0,
+ self = jQuery( this ),
+ state = stateVal,
+ classNames = value.split( core_rspace );
+
+ while ( (className = classNames[ i++ ]) ) {
+ // check each className given, space separated list
+ state = isBool ? state : !self.hasClass( className );
+ self[ state ? "addClass" : "removeClass" ]( className );
+ }
+
+ } else if ( type === "undefined" || type === "boolean" ) {
+ if ( this.className ) {
+ // store className if set
+ jQuery._data( this, "__className__", this.className );
+ }
+
+ // toggle whole className
+ this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
+ }
+ });
+ },
+
+ hasClass: function( selector ) {
+ var className = " " + selector + " ",
+ i = 0,
+ l = this.length;
+ for ( ; i < l; i++ ) {
+ if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
+ return true;
+ }
+ }
+
+ return false;
+ },
+
+ val: function( value ) {
+ var hooks, ret, isFunction,
+ elem = this[0];
+
+ if ( !arguments.length ) {
+ if ( elem ) {
+ hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+ return ret;
+ }
+
+ ret = elem.value;
+
+ return typeof ret === "string" ?
+ // handle most common string cases
+ ret.replace(rreturn, "") :
+ // handle cases where value is null/undef or number
+ ret == null ? "" : ret;
+ }
+
+ return;
+ }
+
+ isFunction = jQuery.isFunction( value );
+
+ return this.each(function( i ) {
+ var val,
+ self = jQuery(this);
+
+ if ( this.nodeType !== 1 ) {
+ return;
+ }
+
+ if ( isFunction ) {
+ val = value.call( this, i, self.val() );
+ } else {
+ val = value;
+ }
+
+ // Treat null/undefined as ""; convert numbers to string
+ if ( val == null ) {
+ val = "";
+ } else if ( typeof val === "number" ) {
+ val += "";
+ } else if ( jQuery.isArray( val ) ) {
+ val = jQuery.map(val, function ( value ) {
+ return value == null ? "" : value + "";
+ });
+ }
+
+ hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+ // If set returns undefined, fall back to normal setting
+ if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
+ this.value = val;
+ }
+ });
+ }
+});
+
+jQuery.extend({
+ valHooks: {
+ option: {
+ get: function( elem ) {
+ // attributes.value is undefined in Blackberry 4.7 but
+ // uses .value. See #6932
+ var val = elem.attributes.value;
+ return !val || val.specified ? elem.value : elem.text;
+ }
+ },
+ select: {
+ get: function( elem ) {
+ var value, option,
+ options = elem.options,
+ index = elem.selectedIndex,
+ one = elem.type === "select-one" || index < 0,
+ values = one ? null : [],
+ max = one ? index + 1 : options.length,
+ i = index < 0 ?
+ max :
+ one ? index : 0;
+
+ // Loop through all the selected options
+ for ( ; i < max; i++ ) {
+ option = options[ i ];
+
+ // oldIE doesn't update selected after form reset (#2551)
+ if ( ( option.selected || i === index ) &&
+ // Don't return options that are disabled or in a disabled optgroup
+ ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
+ ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
+
+ // Get the specific value for the option
+ value = jQuery( option ).val();
+
+ // We don't need an array for one selects
+ if ( one ) {
+ return value;
+ }
+
+ // Multi-Selects return an array
+ values.push( value );
+ }
+ }
+
+ return values;
+ },
+
+ set: function( elem, value ) {
+ var values = jQuery.makeArray( value );
+
+ jQuery(elem).find("option").each(function() {
+ this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
+ });
+
+ if ( !values.length ) {
+ elem.selectedIndex = -1;
+ }
+ return values;
+ }
+ }
+ },
+
+ // Unused in 1.8, left in so attrFn-stabbers won't die; remove in 1.9
+ attrFn: {},
+
+ attr: function( elem, name, value, pass ) {
+ var ret, hooks, notxml,
+ nType = elem.nodeType;
+
+ // don't get/set attributes on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ if ( pass && jQuery.isFunction( jQuery.fn[ name ] ) ) {
+ return jQuery( elem )[ name ]( value );
+ }
+
+ // Fallback to prop when attributes are not supported
+ if ( typeof elem.getAttribute === "undefined" ) {
+ return jQuery.prop( elem, name, value );
+ }
+
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+ // All attributes are lowercase
+ // Grab necessary hook if one is defined
+ if ( notxml ) {
+ name = name.toLowerCase();
+ hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
+ }
+
+ if ( value !== undefined ) {
+
+ if ( value === null ) {
+ jQuery.removeAttr( elem, name );
+ return;
+
+ } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ elem.setAttribute( name, value + "" );
+ return value;
+ }
+
+ } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
+ return ret;
+
+ } else {
+
+ ret = elem.getAttribute( name );
+
+ // Non-existent attributes return null, we normalize to undefined
+ return ret === null ?
+ undefined :
+ ret;
+ }
+ },
+
+ removeAttr: function( elem, value ) {
+ var propName, attrNames, name, isBool,
+ i = 0;
+
+ if ( value && elem.nodeType === 1 ) {
+
+ attrNames = value.split( core_rspace );
+
+ for ( ; i < attrNames.length; i++ ) {
+ name = attrNames[ i ];
+
+ if ( name ) {
+ propName = jQuery.propFix[ name ] || name;
+ isBool = rboolean.test( name );
+
+ // See #9699 for explanation of this approach (setting first, then removal)
+ // Do not do this for boolean attributes (see #10870)
+ if ( !isBool ) {
+ jQuery.attr( elem, name, "" );
+ }
+ elem.removeAttribute( getSetAttribute ? name : propName );
+
+ // Set corresponding property to false for boolean attributes
+ if ( isBool && propName in elem ) {
+ elem[ propName ] = false;
+ }
+ }
+ }
+ }
+ },
+
+ attrHooks: {
+ type: {
+ set: function( elem, value ) {
+ // We can't allow the type property to be changed (since it causes problems in IE)
+ if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
+ jQuery.error( "type property can't be changed" );
+ } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
+ // Setting the type on a radio button after the value resets the value in IE6-9
+ // Reset value to it's default in case type is set after value
+ // This is for element creation
+ var val = elem.value;
+ elem.setAttribute( "type", value );
+ if ( val ) {
+ elem.value = val;
+ }
+ return value;
+ }
+ }
+ },
+ // Use the value property for back compat
+ // Use the nodeHook for button elements in IE6/7 (#1954)
+ value: {
+ get: function( elem, name ) {
+ if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+ return nodeHook.get( elem, name );
+ }
+ return name in elem ?
+ elem.value :
+ null;
+ },
+ set: function( elem, value, name ) {
+ if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+ return nodeHook.set( elem, value, name );
+ }
+ // Does not return so that setAttribute is also used
+ elem.value = value;
+ }
+ }
+ },
+
+ propFix: {
+ tabindex: "tabIndex",
+ readonly: "readOnly",
+ "for": "htmlFor",
+ "class": "className",
+ maxlength: "maxLength",
+ cellspacing: "cellSpacing",
+ cellpadding: "cellPadding",
+ rowspan: "rowSpan",
+ colspan: "colSpan",
+ usemap: "useMap",
+ frameborder: "frameBorder",
+ contenteditable: "contentEditable"
+ },
+
+ prop: function( elem, name, value ) {
+ var ret, hooks, notxml,
+ nType = elem.nodeType;
+
+ // don't get/set properties on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+ if ( notxml ) {
+ // Fix name and attach hooks
+ name = jQuery.propFix[ name ] || name;
+ hooks = jQuery.propHooks[ name ];
+ }
+
+ if ( value !== undefined ) {
+ if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ return ( elem[ name ] = value );
+ }
+
+ } else {
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+ return ret;
+
+ } else {
+ return elem[ name ];
+ }
+ }
+ },
+
+ propHooks: {
+ tabIndex: {
+ get: function( elem ) {
+ // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+ // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+ var attributeNode = elem.getAttributeNode("tabindex");
+
+ return attributeNode && attributeNode.specified ?
+ parseInt( attributeNode.value, 10 ) :
+ rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+ 0 :
+ undefined;
+ }
+ }
+ }
+});
+
+// Hook for boolean attributes
+boolHook = {
+ get: function( elem, name ) {
+ // Align boolean attributes with corresponding properties
+ // Fall back to attribute presence where some booleans are not supported
+ var attrNode,
+ property = jQuery.prop( elem, name );
+ return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
+ name.toLowerCase() :
+ undefined;
+ },
+ set: function( elem, value, name ) {
+ var propName;
+ if ( value === false ) {
+ // Remove boolean attributes when set to false
+ jQuery.removeAttr( elem, name );
+ } else {
+ // value is true since we know at this point it's type boolean and not false
+ // Set boolean attributes to the same name and set the DOM property
+ propName = jQuery.propFix[ name ] || name;
+ if ( propName in elem ) {
+ // Only set the IDL specifically if it already exists on the element
+ elem[ propName ] = true;
+ }
+
+ elem.setAttribute( name, name.toLowerCase() );
+ }
+ return name;
+ }
+};
+
+// IE6/7 do not support getting/setting some attributes with get/setAttribute
+if ( !getSetAttribute ) {
+
+ fixSpecified = {
+ name: true,
+ id: true,
+ coords: true
+ };
+
+ // Use this for any attribute in IE6/7
+ // This fixes almost every IE6/7 issue
+ nodeHook = jQuery.valHooks.button = {
+ get: function( elem, name ) {
+ var ret;
+ ret = elem.getAttributeNode( name );
+ return ret && ( fixSpecified[ name ] ? ret.value !== "" : ret.specified ) ?
+ ret.value :
+ undefined;
+ },
+ set: function( elem, value, name ) {
+ // Set the existing or create a new attribute node
+ var ret = elem.getAttributeNode( name );
+ if ( !ret ) {
+ ret = document.createAttribute( name );
+ elem.setAttributeNode( ret );
+ }
+ return ( ret.value = value + "" );
+ }
+ };
+
+ // Set width and height to auto instead of 0 on empty string( Bug #8150 )
+ // This is for removals
+ jQuery.each([ "width", "height" ], function( i, name ) {
+ jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+ set: function( elem, value ) {
+ if ( value === "" ) {
+ elem.setAttribute( name, "auto" );
+ return value;
+ }
+ }
+ });
+ });
+
+ // Set contenteditable to false on removals(#10429)
+ // Setting to empty string throws an error as an invalid value
+ jQuery.attrHooks.contenteditable = {
+ get: nodeHook.get,
+ set: function( elem, value, name ) {
+ if ( value === "" ) {
+ value = "false";
+ }
+ nodeHook.set( elem, value, name );
+ }
+ };
+}
+
+
+// Some attributes require a special call on IE
+if ( !jQuery.support.hrefNormalized ) {
+ jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
+ jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+ get: function( elem ) {
+ var ret = elem.getAttribute( name, 2 );
+ return ret === null ? undefined : ret;
+ }
+ });
+ });
+}
+
+if ( !jQuery.support.style ) {
+ jQuery.attrHooks.style = {
+ get: function( elem ) {
+ // Return undefined in the case of empty string
+ // Normalize to lowercase since IE uppercases css property names
+ return elem.style.cssText.toLowerCase() || undefined;
+ },
+ set: function( elem, value ) {
+ return ( elem.style.cssText = value + "" );
+ }
+ };
+}
+
+// Safari mis-reports the default selected property of an option
+// Accessing the parent's selectedIndex property fixes it
+if ( !jQuery.support.optSelected ) {
+ jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
+ get: function( elem ) {
+ var parent = elem.parentNode;
+
+ if ( parent ) {
+ parent.selectedIndex;
+
+ // Make sure that it also works with optgroups, see #5701
+ if ( parent.parentNode ) {
+ parent.parentNode.selectedIndex;
+ }
+ }
+ return null;
+ }
+ });
+}
+
+// IE6/7 call enctype encoding
+if ( !jQuery.support.enctype ) {
+ jQuery.propFix.enctype = "encoding";
+}
+
+// Radios and checkboxes getter/setter
+if ( !jQuery.support.checkOn ) {
+ jQuery.each([ "radio", "checkbox" ], function() {
+ jQuery.valHooks[ this ] = {
+ get: function( elem ) {
+ // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
+ return elem.getAttribute("value") === null ? "on" : elem.value;
+ }
+ };
+ });
+}
+jQuery.each([ "radio", "checkbox" ], function() {
+ jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
+ set: function( elem, value ) {
+ if ( jQuery.isArray( value ) ) {
+ return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
+ }
+ }
+ });
+});
+var rformElems = /^(?:textarea|input|select)$/i,
+ rtypenamespace = /^([^\.]*|)(?:\.(.+)|)$/,
+ rhoverHack = /(?:^|\s)hover(\.\S+|)\b/,
+ rkeyEvent = /^key/,
+ rmouseEvent = /^(?:mouse|contextmenu)|click/,
+ rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+ hoverHack = function( events ) {
+ return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
+ };
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+ add: function( elem, types, handler, data, selector ) {
+
+ var elemData, eventHandle, events,
+ t, tns, type, namespaces, handleObj,
+ handleObjIn, handlers, special;
+
+ // Don't attach events to noData or text/comment nodes (allow plain objects tho)
+ if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {
+ return;
+ }
+
+ // Caller can pass in an object of custom data in lieu of the handler
+ if ( handler.handler ) {
+ handleObjIn = handler;
+ handler = handleObjIn.handler;
+ selector = handleObjIn.selector;
+ }
+
+ // Make sure that the handler has a unique ID, used to find/remove it later
+ if ( !handler.guid ) {
+ handler.guid = jQuery.guid++;
+ }
+
+ // Init the element's event structure and main handler, if this is the first
+ events = elemData.events;
+ if ( !events ) {
+ elemData.events = events = {};
+ }
+ eventHandle = elemData.handle;
+ if ( !eventHandle ) {
+ elemData.handle = eventHandle = function( e ) {
+ // Discard the second event of a jQuery.event.trigger() and
+ // when an event is called after a page has unloaded
+ return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
+ jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
+ undefined;
+ };
+ // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
+ eventHandle.elem = elem;
+ }
+
+ // Handle multiple events separated by a space
+ // jQuery(...).bind("mouseover mouseout", fn);
+ types = jQuery.trim( hoverHack(types) ).split( " " );
+ for ( t = 0; t < types.length; t++ ) {
+
+ tns = rtypenamespace.exec( types[t] ) || [];
+ type = tns[1];
+ namespaces = ( tns[2] || "" ).split( "." ).sort();
+
+ // If event changes its type, use the special event handlers for the changed type
+ special = jQuery.event.special[ type ] || {};
+
+ // If selector defined, determine special event api type, otherwise given type
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+
+ // Update special based on newly reset type
+ special = jQuery.event.special[ type ] || {};
+
+ // handleObj is passed to all event handlers
+ handleObj = jQuery.extend({
+ type: type,
+ origType: tns[1],
+ data: data,
+ handler: handler,
+ guid: handler.guid,
+ selector: selector,
+ needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
+ namespace: namespaces.join(".")
+ }, handleObjIn );
+
+ // Init the event handler queue if we're the first
+ handlers = events[ type ];
+ if ( !handlers ) {
+ handlers = events[ type ] = [];
+ handlers.delegateCount = 0;
+
+ // Only use addEventListener/attachEvent if the special events handler returns false
+ if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+ // Bind the global event handler to the element
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, eventHandle, false );
+
+ } else if ( elem.attachEvent ) {
+ elem.attachEvent( "on" + type, eventHandle );
+ }
+ }
+ }
+
+ if ( special.add ) {
+ special.add.call( elem, handleObj );
+
+ if ( !handleObj.handler.guid ) {
+ handleObj.handler.guid = handler.guid;
+ }
+ }
+
+ // Add to the element's handler list, delegates in front
+ if ( selector ) {
+ handlers.splice( handlers.delegateCount++, 0, handleObj );
+ } else {
+ handlers.push( handleObj );
+ }
+
+ // Keep track of which events have ever been used, for event optimization
+ jQuery.event.global[ type ] = true;
+ }
+
+ // Nullify elem to prevent memory leaks in IE
+ elem = null;
+ },
+
+ global: {},
+
+ // Detach an event or set of events from an element
+ remove: function( elem, types, handler, selector, mappedTypes ) {
+
+ var t, tns, type, origType, namespaces, origCount,
+ j, events, special, eventType, handleObj,
+ elemData = jQuery.hasData( elem ) && jQuery._data( elem );
+
+ if ( !elemData || !(events = elemData.events) ) {
+ return;
+ }
+
+ // Once for each type.namespace in types; type may be omitted
+ types = jQuery.trim( hoverHack( types || "" ) ).split(" ");
+ for ( t = 0; t < types.length; t++ ) {
+ tns = rtypenamespace.exec( types[t] ) || [];
+ type = origType = tns[1];
+ namespaces = tns[2];
+
+ // Unbind all events (on this namespace, if provided) for the element
+ if ( !type ) {
+ for ( type in events ) {
+ jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+ }
+ continue;
+ }
+
+ special = jQuery.event.special[ type ] || {};
+ type = ( selector? special.delegateType : special.bindType ) || type;
+ eventType = events[ type ] || [];
+ origCount = eventType.length;
+ namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
+
+ // Remove matching events
+ for ( j = 0; j < eventType.length; j++ ) {
+ handleObj = eventType[ j ];
+
+ if ( ( mappedTypes || origType === handleObj.origType ) &&
+ ( !handler || handler.guid === handleObj.guid ) &&
+ ( !namespaces || namespaces.test( handleObj.namespace ) ) &&
+ ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+ eventType.splice( j--, 1 );
+
+ if ( handleObj.selector ) {
+ eventType.delegateCount--;
+ }
+ if ( special.remove ) {
+ special.remove.call( elem, handleObj );
+ }
+ }
+ }
+
+ // Remove generic event handler if we removed something and no more handlers exist
+ // (avoids potential for endless recursion during removal of special event handlers)
+ if ( eventType.length === 0 && origCount !== eventType.length ) {
+ if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+ jQuery.removeEvent( elem, type, elemData.handle );
+ }
+
+ delete events[ type ];
+ }
+ }
+
+ // Remove the expando if it's no longer used
+ if ( jQuery.isEmptyObject( events ) ) {
+ delete elemData.handle;
+
+ // removeData also checks for emptiness and clears the expando if empty
+ // so use it instead of delete
+ jQuery.removeData( elem, "events", true );
+ }
+ },
+
+ // Events that are safe to short-circuit if no handlers are attached.
+ // Native DOM events should not be added, they may have inline handlers.
+ customEvent: {
+ "getData": true,
+ "setData": true,
+ "changeData": true
+ },
+
+ trigger: function( event, data, elem, onlyHandlers ) {
+ // Don't do events on text and comment nodes
+ if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
+ return;
+ }
+
+ // Event object or event type
+ var cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType,
+ type = event.type || event,
+ namespaces = [];
+
+ // focus/blur morphs to focusin/out; ensure we're not firing them right now
+ if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+ return;
+ }
+
+ if ( type.indexOf( "!" ) >= 0 ) {
+ // Exclusive events trigger only for the exact event (no namespaces)
+ type = type.slice(0, -1);
+ exclusive = true;
+ }
+
+ if ( type.indexOf( "." ) >= 0 ) {
+ // Namespaced trigger; create a regexp to match event type in handle()
+ namespaces = type.split(".");
+ type = namespaces.shift();
+ namespaces.sort();
+ }
+
+ if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
+ // No jQuery handlers for this event type, and it can't have inline handlers
+ return;
+ }
+
+ // Caller can pass in an Event, Object, or just an event type string
+ event = typeof event === "object" ?
+ // jQuery.Event object
+ event[ jQuery.expando ] ? event :
+ // Object literal
+ new jQuery.Event( type, event ) :
+ // Just the event type (string)
+ new jQuery.Event( type );
+
+ event.type = type;
+ event.isTrigger = true;
+ event.exclusive = exclusive;
+ event.namespace = namespaces.join( "." );
+ event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
+ ontype = type.indexOf( ":" ) < 0 ? "on" + type : "";
+
+ // Handle a global trigger
+ if ( !elem ) {
+
+ // TODO: Stop taunting the data cache; remove global events and always attach to document
+ cache = jQuery.cache;
+ for ( i in cache ) {
+ if ( cache[ i ].events && cache[ i ].events[ type ] ) {
+ jQuery.event.trigger( event, data, cache[ i ].handle.elem, true );
+ }
+ }
+ return;
+ }
+
+ // Clean up the event in case it is being reused
+ event.result = undefined;
+ if ( !event.target ) {
+ event.target = elem;
+ }
+
+ // Clone any incoming data and prepend the event, creating the handler arg list
+ data = data != null ? jQuery.makeArray( data ) : [];
+ data.unshift( event );
+
+ // Allow special events to draw outside the lines
+ special = jQuery.event.special[ type ] || {};
+ if ( special.trigger && special.trigger.apply( elem, data ) === false ) {
+ return;
+ }
+
+ // Determine event propagation path in advance, per W3C events spec (#9951)
+ // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+ eventPath = [[ elem, special.bindType || type ]];
+ if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
+
+ bubbleType = special.delegateType || type;
+ cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode;
+ for ( old = elem; cur; cur = cur.parentNode ) {
+ eventPath.push([ cur, bubbleType ]);
+ old = cur;
+ }
+
+ // Only add window if we got to document (e.g., not plain obj or detached DOM)
+ if ( old === (elem.ownerDocument || document) ) {
+ eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]);
+ }
+ }
+
+ // Fire handlers on the event path
+ for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) {
+
+ cur = eventPath[i][0];
+ event.type = eventPath[i][1];
+
+ handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
+ if ( handle ) {
+ handle.apply( cur, data );
+ }
+ // Note that this is a bare JS function and not a jQuery handler
+ handle = ontype && cur[ ontype ];
+ if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
+ event.preventDefault();
+ }
+ }
+ event.type = type;
+
+ // If nobody prevented the default action, do it now
+ if ( !onlyHandlers && !event.isDefaultPrevented() ) {
+
+ if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
+ !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
+
+ // Call a native DOM method on the target with the same name name as the event.
+ // Can't use an .isFunction() check here because IE6/7 fails that test.
+ // Don't do default actions on window, that's where global variables be (#6170)
+ // IE<9 dies on focus/blur to hidden element (#1486)
+ if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) {
+
+ // Don't re-trigger an onFOO event when we call its FOO() method
+ old = elem[ ontype ];
+
+ if ( old ) {
+ elem[ ontype ] = null;
+ }
+
+ // Prevent re-triggering of the same event, since we already bubbled it above
+ jQuery.event.triggered = type;
+ elem[ type ]();
+ jQuery.event.triggered = undefined;
+
+ if ( old ) {
+ elem[ ontype ] = old;
+ }
+ }
+ }
+ }
+
+ return event.result;
+ },
+
+ dispatch: function( event ) {
+
+ // Make a writable jQuery.Event from the native event object
+ event = jQuery.event.fix( event || window.event );
+
+ var i, j, cur, ret, selMatch, matched, matches, handleObj, sel, related,
+ handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []),
+ delegateCount = handlers.delegateCount,
+ args = core_slice.call( arguments ),
+ run_all = !event.exclusive && !event.namespace,
+ special = jQuery.event.special[ event.type ] || {},
+ handlerQueue = [];
+
+ // Use the fix-ed jQuery.Event rather than the (read-only) native event
+ args[0] = event;
+ event.delegateTarget = this;
+
+ // Call the preDispatch hook for the mapped type, and let it bail if desired
+ if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+ return;
+ }
+
+ // Determine handlers that should run if there are delegated events
+ // Avoid non-left-click bubbling in Firefox (#3861)
+ if ( delegateCount && !(event.button && event.type === "click") ) {
+
+ for ( cur = event.target; cur != this; cur = cur.parentNode || this ) {
+
+ // Don't process clicks (ONLY) on disabled elements (#6911, #8165, #11382, #11764)
+ if ( cur.disabled !== true || event.type !== "click" ) {
+ selMatch = {};
+ matches = [];
+ for ( i = 0; i < delegateCount; i++ ) {
+ handleObj = handlers[ i ];
+ sel = handleObj.selector;
+
+ if ( selMatch[ sel ] === undefined ) {
+ selMatch[ sel ] = handleObj.needsContext ?
+ jQuery( sel, this ).index( cur ) >= 0 :
+ jQuery.find( sel, this, null, [ cur ] ).length;
+ }
+ if ( selMatch[ sel ] ) {
+ matches.push( handleObj );
+ }
+ }
+ if ( matches.length ) {
+ handlerQueue.push({ elem: cur, matches: matches });
+ }
+ }
+ }
+ }
+
+ // Add the remaining (directly-bound) handlers
+ if ( handlers.length > delegateCount ) {
+ handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) });
+ }
+
+ // Run delegates first; they may want to stop propagation beneath us
+ for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) {
+ matched = handlerQueue[ i ];
+ event.currentTarget = matched.elem;
+
+ for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) {
+ handleObj = matched.matches[ j ];
+
+ // Triggered event must either 1) be non-exclusive and have no namespace, or
+ // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
+ if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
+
+ event.data = handleObj.data;
+ event.handleObj = handleObj;
+
+ ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
+ .apply( matched.elem, args );
+
+ if ( ret !== undefined ) {
+ event.result = ret;
+ if ( ret === false ) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ }
+ }
+ }
+ }
+
+ // Call the postDispatch hook for the mapped type
+ if ( special.postDispatch ) {
+ special.postDispatch.call( this, event );
+ }
+
+ return event.result;
+ },
+
+ // Includes some event props shared by KeyEvent and MouseEvent
+ // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 ***
+ props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
+
+ fixHooks: {},
+
+ keyHooks: {
+ props: "char charCode key keyCode".split(" "),
+ filter: function( event, original ) {
+
+ // Add which for key events
+ if ( event.which == null ) {
+ event.which = original.charCode != null ? original.charCode : original.keyCode;
+ }
+
+ return event;
+ }
+ },
+
+ mouseHooks: {
+ props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
+ filter: function( event, original ) {
+ var eventDoc, doc, body,
+ button = original.button,
+ fromElement = original.fromElement;
+
+ // Calculate pageX/Y if missing and clientX/Y available
+ if ( event.pageX == null && original.clientX != null ) {
+ eventDoc = event.target.ownerDocument || document;
+ doc = eventDoc.documentElement;
+ body = eventDoc.body;
+
+ event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+ event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
+ }
+
+ // Add relatedTarget, if necessary
+ if ( !event.relatedTarget && fromElement ) {
+ event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
+ }
+
+ // Add which for click: 1 === left; 2 === middle; 3 === right
+ // Note: button is not normalized, so don't use it
+ if ( !event.which && button !== undefined ) {
+ event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+ }
+
+ return event;
+ }
+ },
+
+ fix: function( event ) {
+ if ( event[ jQuery.expando ] ) {
+ return event;
+ }
+
+ // Create a writable copy of the event object and normalize some properties
+ var i, prop,
+ originalEvent = event,
+ fixHook = jQuery.event.fixHooks[ event.type ] || {},
+ copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
+
+ event = jQuery.Event( originalEvent );
+
+ for ( i = copy.length; i; ) {
+ prop = copy[ --i ];
+ event[ prop ] = originalEvent[ prop ];
+ }
+
+ // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)
+ if ( !event.target ) {
+ event.target = originalEvent.srcElement || document;
+ }
+
+ // Target should not be a text node (#504, Safari)
+ if ( event.target.nodeType === 3 ) {
+ event.target = event.target.parentNode;
+ }
+
+ // For mouse/key events, metaKey==false if it's undefined (#3368, #11328; IE6/7/8)
+ event.metaKey = !!event.metaKey;
+
+ return fixHook.filter? fixHook.filter( event, originalEvent ) : event;
+ },
+
+ special: {
+ load: {
+ // Prevent triggered image.load events from bubbling to window.load
+ noBubble: true
+ },
+
+ focus: {
+ delegateType: "focusin"
+ },
+ blur: {
+ delegateType: "focusout"
+ },
+
+ beforeunload: {
+ setup: function( data, namespaces, eventHandle ) {
+ // We only want to do this special case on windows
+ if ( jQuery.isWindow( this ) ) {
+ this.onbeforeunload = eventHandle;
+ }
+ },
+
+ teardown: function( namespaces, eventHandle ) {
+ if ( this.onbeforeunload === eventHandle ) {
+ this.onbeforeunload = null;
+ }
+ }
+ }
+ },
+
+ simulate: function( type, elem, event, bubble ) {
+ // Piggyback on a donor event to simulate a different one.
+ // Fake originalEvent to avoid donor's stopPropagation, but if the
+ // simulated event prevents default then we do the same on the donor.
+ var e = jQuery.extend(
+ new jQuery.Event(),
+ event,
+ { type: type,
+ isSimulated: true,
+ originalEvent: {}
+ }
+ );
+ if ( bubble ) {
+ jQuery.event.trigger( e, null, elem );
+ } else {
+ jQuery.event.dispatch.call( elem, e );
+ }
+ if ( e.isDefaultPrevented() ) {
+ event.preventDefault();
+ }
+ }
+};
+
+// Some plugins are using, but it's undocumented/deprecated and will be removed.
+// The 1.7 special event interface should provide all the hooks needed now.
+jQuery.event.handle = jQuery.event.dispatch;
+
+jQuery.removeEvent = document.removeEventListener ?
+ function( elem, type, handle ) {
+ if ( elem.removeEventListener ) {
+ elem.removeEventListener( type, handle, false );
+ }
+ } :
+ function( elem, type, handle ) {
+ var name = "on" + type;
+
+ if ( elem.detachEvent ) {
+
+ // #8545, #7054, preventing memory leaks for custom events in IE6-8
+ // detachEvent needed property on element, by name of that event, to properly expose it to GC
+ if ( typeof elem[ name ] === "undefined" ) {
+ elem[ name ] = null;
+ }
+
+ elem.detachEvent( name, handle );
+ }
+ };
+
+jQuery.Event = function( src, props ) {
+ // Allow instantiation without the 'new' keyword
+ if ( !(this instanceof jQuery.Event) ) {
+ return new jQuery.Event( src, props );
+ }
+
+ // Event object
+ if ( src && src.type ) {
+ this.originalEvent = src;
+ this.type = src.type;
+
+ // Events bubbling up the document may have been marked as prevented
+ // by a handler lower down the tree; reflect the correct value.
+ this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
+ src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
+
+ // Event type
+ } else {
+ this.type = src;
+ }
+
+ // Put explicitly provided properties onto the event object
+ if ( props ) {
+ jQuery.extend( this, props );
+ }
+
+ // Create a timestamp if incoming event doesn't have one
+ this.timeStamp = src && src.timeStamp || jQuery.now();
+
+ // Mark it as fixed
+ this[ jQuery.expando ] = true;
+};
+
+function returnFalse() {
+ return false;
+}
+function returnTrue() {
+ return true;
+}
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+ preventDefault: function() {
+ this.isDefaultPrevented = returnTrue;
+
+ var e = this.originalEvent;
+ if ( !e ) {
+ return;
+ }
+
+ // if preventDefault exists run it on the original event
+ if ( e.preventDefault ) {
+ e.preventDefault();
+
+ // otherwise set the returnValue property of the original event to false (IE)
+ } else {
+ e.returnValue = false;
+ }
+ },
+ stopPropagation: function() {
+ this.isPropagationStopped = returnTrue;
+
+ var e = this.originalEvent;
+ if ( !e ) {
+ return;
+ }
+ // if stopPropagation exists run it on the original event
+ if ( e.stopPropagation ) {
+ e.stopPropagation();
+ }
+ // otherwise set the cancelBubble property of the original event to true (IE)
+ e.cancelBubble = true;
+ },
+ stopImmediatePropagation: function() {
+ this.isImmediatePropagationStopped = returnTrue;
+ this.stopPropagation();
+ },
+ isDefaultPrevented: returnFalse,
+ isPropagationStopped: returnFalse,
+ isImmediatePropagationStopped: returnFalse
+};
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+jQuery.each({
+ mouseenter: "mouseover",
+ mouseleave: "mouseout"
+}, function( orig, fix ) {
+ jQuery.event.special[ orig ] = {
+ delegateType: fix,
+ bindType: fix,
+
+ handle: function( event ) {
+ var ret,
+ target = this,
+ related = event.relatedTarget,
+ handleObj = event.handleObj,
+ selector = handleObj.selector;
+
+ // For mousenter/leave call the handler if related is outside the target.
+ // NB: No relatedTarget if the mouse left/entered the browser window
+ if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
+ event.type = handleObj.origType;
+ ret = handleObj.handler.apply( this, arguments );
+ event.type = fix;
+ }
+ return ret;
+ }
+ };
+});
+
+// IE submit delegation
+if ( !jQuery.support.submitBubbles ) {
+
+ jQuery.event.special.submit = {
+ setup: function() {
+ // Only need this for delegated form submit events
+ if ( jQuery.nodeName( this, "form" ) ) {
+ return false;
+ }
+
+ // Lazy-add a submit handler when a descendant form may potentially be submitted
+ jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
+ // Node name check avoids a VML-related crash in IE (#9807)
+ var elem = e.target,
+ form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
+ if ( form && !jQuery._data( form, "_submit_attached" ) ) {
+ jQuery.event.add( form, "submit._submit", function( event ) {
+ event._submit_bubble = true;
+ });
+ jQuery._data( form, "_submit_attached", true );
+ }
+ });
+ // return undefined since we don't need an event listener
+ },
+
+ postDispatch: function( event ) {
+ // If form was submitted by the user, bubble the event up the tree
+ if ( event._submit_bubble ) {
+ delete event._submit_bubble;
+ if ( this.parentNode && !event.isTrigger ) {
+ jQuery.event.simulate( "submit", this.parentNode, event, true );
+ }
+ }
+ },
+
+ teardown: function() {
+ // Only need this for delegated form submit events
+ if ( jQuery.nodeName( this, "form" ) ) {
+ return false;
+ }
+
+ // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
+ jQuery.event.remove( this, "._submit" );
+ }
+ };
+}
+
+// IE change delegation and checkbox/radio fix
+if ( !jQuery.support.changeBubbles ) {
+
+ jQuery.event.special.change = {
+
+ setup: function() {
+
+ if ( rformElems.test( this.nodeName ) ) {
+ // IE doesn't fire change on a check/radio until blur; trigger it on click
+ // after a propertychange. Eat the blur-change in special.change.handle.
+ // This still fires onchange a second time for check/radio after blur.
+ if ( this.type === "checkbox" || this.type === "radio" ) {
+ jQuery.event.add( this, "propertychange._change", function( event ) {
+ if ( event.originalEvent.propertyName === "checked" ) {
+ this._just_changed = true;
+ }
+ });
+ jQuery.event.add( this, "click._change", function( event ) {
+ if ( this._just_changed && !event.isTrigger ) {
+ this._just_changed = false;
+ }
+ // Allow triggered, simulated change events (#11500)
+ jQuery.event.simulate( "change", this, event, true );
+ });
+ }
+ return false;
+ }
+ // Delegated event; lazy-add a change handler on descendant inputs
+ jQuery.event.add( this, "beforeactivate._change", function( e ) {
+ var elem = e.target;
+
+ if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "_change_attached" ) ) {
+ jQuery.event.add( elem, "change._change", function( event ) {
+ if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
+ jQuery.event.simulate( "change", this.parentNode, event, true );
+ }
+ });
+ jQuery._data( elem, "_change_attached", true );
+ }
+ });
+ },
+
+ handle: function( event ) {
+ var elem = event.target;
+
+ // Swallow native change events from checkbox/radio, we already triggered them above
+ if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
+ return event.handleObj.handler.apply( this, arguments );
+ }
+ },
+
+ teardown: function() {
+ jQuery.event.remove( this, "._change" );
+
+ return !rformElems.test( this.nodeName );
+ }
+ };
+}
+
+// Create "bubbling" focus and blur events
+if ( !jQuery.support.focusinBubbles ) {
+ jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+ // Attach a single capturing handler while someone wants focusin/focusout
+ var attaches = 0,
+ handler = function( event ) {
+ jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
+ };
+
+ jQuery.event.special[ fix ] = {
+ setup: function() {
+ if ( attaches++ === 0 ) {
+ document.addEventListener( orig, handler, true );
+ }
+ },
+ teardown: function() {
+ if ( --attaches === 0 ) {
+ document.removeEventListener( orig, handler, true );
+ }
+ }
+ };
+ });
+}
+
+jQuery.fn.extend({
+
+ on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
+ var origFn, type;
+
+ // Types can be a map of types/handlers
+ if ( typeof types === "object" ) {
+ // ( types-Object, selector, data )
+ if ( typeof selector !== "string" ) { // && selector != null
+ // ( types-Object, data )
+ data = data || selector;
+ selector = undefined;
+ }
+ for ( type in types ) {
+ this.on( type, selector, data, types[ type ], one );
+ }
+ return this;
+ }
+
+ if ( data == null && fn == null ) {
+ // ( types, fn )
+ fn = selector;
+ data = selector = undefined;
+ } else if ( fn == null ) {
+ if ( typeof selector === "string" ) {
+ // ( types, selector, fn )
+ fn = data;
+ data = undefined;
+ } else {
+ // ( types, data, fn )
+ fn = data;
+ data = selector;
+ selector = undefined;
+ }
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ } else if ( !fn ) {
+ return this;
+ }
+
+ if ( one === 1 ) {
+ origFn = fn;
+ fn = function( event ) {
+ // Can use an empty set, since event contains the info
+ jQuery().off( event );
+ return origFn.apply( this, arguments );
+ };
+ // Use same guid so caller can remove using origFn
+ fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+ }
+ return this.each( function() {
+ jQuery.event.add( this, types, fn, data, selector );
+ });
+ },
+ one: function( types, selector, data, fn ) {
+ return this.on( types, selector, data, fn, 1 );
+ },
+ off: function( types, selector, fn ) {
+ var handleObj, type;
+ if ( types && types.preventDefault && types.handleObj ) {
+ // ( event ) dispatched jQuery.Event
+ handleObj = types.handleObj;
+ jQuery( types.delegateTarget ).off(
+ handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
+ handleObj.selector,
+ handleObj.handler
+ );
+ return this;
+ }
+ if ( typeof types === "object" ) {
+ // ( types-object [, selector] )
+ for ( type in types ) {
+ this.off( type, selector, types[ type ] );
+ }
+ return this;
+ }
+ if ( selector === false || typeof selector === "function" ) {
+ // ( types [, fn] )
+ fn = selector;
+ selector = undefined;
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ }
+ return this.each(function() {
+ jQuery.event.remove( this, types, fn, selector );
+ });
+ },
+
+ bind: function( types, data, fn ) {
+ return this.on( types, null, data, fn );
+ },
+ unbind: function( types, fn ) {
+ return this.off( types, null, fn );
+ },
+
+ live: function( types, data, fn ) {
+ jQuery( this.context ).on( types, this.selector, data, fn );
+ return this;
+ },
+ die: function( types, fn ) {
+ jQuery( this.context ).off( types, this.selector || "**", fn );
+ return this;
+ },
+
+ delegate: function( selector, types, data, fn ) {
+ return this.on( types, selector, data, fn );
+ },
+ undelegate: function( selector, types, fn ) {
+ // ( namespace ) or ( selector, types [, fn] )
+ return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
+ },
+
+ trigger: function( type, data ) {
+ return this.each(function() {
+ jQuery.event.trigger( type, data, this );
+ });
+ },
+ triggerHandler: function( type, data ) {
+ if ( this[0] ) {
+ return jQuery.event.trigger( type, data, this[0], true );
+ }
+ },
+
+ toggle: function( fn ) {
+ // Save reference to arguments for access in closure
+ var args = arguments,
+ guid = fn.guid || jQuery.guid++,
+ i = 0,
+ toggler = function( event ) {
+ // Figure out which function to execute
+ var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
+ jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
+
+ // Make sure that clicks stop
+ event.preventDefault();
+
+ // and execute the function
+ return args[ lastToggle ].apply( this, arguments ) || false;
+ };
+
+ // link all the functions, so any of them can unbind this click handler
+ toggler.guid = guid;
+ while ( i < args.length ) {
+ args[ i++ ].guid = guid;
+ }
+
+ return this.click( toggler );
+ },
+
+ hover: function( fnOver, fnOut ) {
+ return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+ }
+});
+
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+ "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+ "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
+
+ // Handle event binding
+ jQuery.fn[ name ] = function( data, fn ) {
+ if ( fn == null ) {
+ fn = data;
+ data = null;
+ }
+
+ return arguments.length > 0 ?
+ this.on( name, null, data, fn ) :
+ this.trigger( name );
+ };
+
+ if ( rkeyEvent.test( name ) ) {
+ jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks;
+ }
+
+ if ( rmouseEvent.test( name ) ) {
+ jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;
+ }
+});
+/*!
+ * Sizzle CSS Selector Engine
+ * Copyright 2012-2018 jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://sizzlejs.com/
+ */
+(function( window, undefined ) {
+
+var cachedruns,
+ assertGetIdNotName,
+ Expr,
+ getText,
+ isXML,
+ contains,
+ compile,
+ sortOrder,
+ hasDuplicate,
+ outermostContext,
+
+ baseHasDuplicate = true,
+ strundefined = "undefined",
+
+ expando = ( "sizcache" + Math.random() ).replace( ".", "" ),
+
+ Token = String,
+ document = window.document,
+ docElem = document.documentElement,
+ dirruns = 0,
+ done = 0,
+ pop = [].pop,
+ push = [].push,
+ slice = [].slice,
+ // Use a stripped-down indexOf if a native one is unavailable
+ indexOf = [].indexOf || function( elem ) {
+ var i = 0,
+ len = this.length;
+ for ( ; i < len; i++ ) {
+ if ( this[i] === elem ) {
+ return i;
+ }
+ }
+ return -1;
+ },
+
+ // Augment a function for special use by Sizzle
+ markFunction = function( fn, value ) {
+ fn[ expando ] = value == null || value;
+ return fn;
+ },
+
+ createCache = function() {
+ var cache = {},
+ keys = [];
+
+ return markFunction(function( key, value ) {
+ // Only keep the most recent entries
+ if ( keys.push( key ) > Expr.cacheLength ) {
+ delete cache[ keys.shift() ];
+ }
+
+ // Retrieve with (key + " ") to avoid collision with native Object.prototype properties (see Issue #157)
+ return (cache[ key + " " ] = value);
+ }, cache );
+ },
+
+ classCache = createCache(),
+ tokenCache = createCache(),
+ compilerCache = createCache(),
+
+ // Regex
+
+ // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
+ whitespace = "[\\x20\\t\\r\\n\\f]",
+ // http://www.w3.org/TR/css3-syntax/#characters
+ characterEncoding = "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",
+
+ // Loosely modeled on CSS identifier characters
+ // An unquoted value should be a CSS identifier (http://www.w3.org/TR/css3-selectors/#attribute-selectors)
+ // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+ identifier = characterEncoding.replace( "w", "w#" ),
+
+ // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
+ operators = "([*^$|!~]?=)",
+ attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
+ "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
+
+ // Prefer arguments not in parens/brackets,
+ // then attribute selectors and non-pseudos (denoted by :),
+ // then anything else
+ // These preferences are here to reduce the number of selectors
+ // needing tokenize in the PSEUDO preFilter
+ pseudos = ":(" + characterEncoding + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:" + attributes + ")|[^:]|\\\\.)*|.*))\\)|)",
+
+ // For matchExpr.POS and matchExpr.needsContext
+ pos = ":(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace +
+ "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)",
+
+ // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+ rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+
+ rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+ rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ),
+ rpseudo = new RegExp( pseudos ),
+
+ // Easily-parseable/retrievable ID or TAG or CLASS selectors
+ rquickExpr = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,
+
+ rnot = /^:not/,
+ rsibling = /[\x20\t\r\n\f]*[+~]/,
+ rendsWithNot = /:not\($/,
+
+ rheader = /h\d/i,
+ rinputs = /input|select|textarea|button/i,
+
+ rbackslash = /\\(?!\\)/g,
+
+ matchExpr = {
+ "ID": new RegExp( "^#(" + characterEncoding + ")" ),
+ "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
+ "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ),
+ "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
+ "ATTR": new RegExp( "^" + attributes ),
+ "PSEUDO": new RegExp( "^" + pseudos ),
+ "POS": new RegExp( pos, "i" ),
+ "CHILD": new RegExp( "^:(only|nth|first|last)-child(?:\\(" + whitespace +
+ "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
+ "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+ // For use in libraries implementing .is()
+ "needsContext": new RegExp( "^" + whitespace + "*[>+~]|" + pos, "i" )
+ },
+
+ // Support
+
+ // Used for testing something on an element
+ assert = function( fn ) {
+ var div = document.createElement("div");
+
+ try {
+ return fn( div );
+ } catch (e) {
+ return false;
+ } finally {
+ // release memory in IE
+ div = null;
+ }
+ },
+
+ // Check if getElementsByTagName("*") returns only elements
+ assertTagNameNoComments = assert(function( div ) {
+ div.appendChild( document.createComment("") );
+ return !div.getElementsByTagName("*").length;
+ }),
+
+ // Check if getAttribute returns normalized href attributes
+ assertHrefNotNormalized = assert(function( div ) {
+ div.innerHTML = " ";
+ return div.firstChild && typeof div.firstChild.getAttribute !== strundefined &&
+ div.firstChild.getAttribute("href") === "#";
+ }),
+
+ // Check if attributes should be retrieved by attribute nodes
+ assertAttributes = assert(function( div ) {
+ div.innerHTML = " ";
+ var type = typeof div.lastChild.getAttribute("multiple");
+ // IE8 returns a string for some attributes even when not present
+ return type !== "boolean" && type !== "string";
+ }),
+
+ // Check if getElementsByClassName can be trusted
+ assertUsableClassName = assert(function( div ) {
+ // Opera can't find a second classname (in 9.6)
+ div.innerHTML = "
";
+ if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) {
+ return false;
+ }
+
+ // Safari 3.2 caches class attributes and doesn't catch changes
+ div.lastChild.className = "e";
+ return div.getElementsByClassName("e").length === 2;
+ }),
+
+ // Check if getElementById returns elements by name
+ // Check if getElementsByName privileges form controls or returns elements by ID
+ assertUsableName = assert(function( div ) {
+ // Inject content
+ div.id = expando + 0;
+ div.innerHTML = "
";
+ docElem.insertBefore( div, docElem.firstChild );
+
+ // Test
+ var pass = document.getElementsByName &&
+ // buggy browsers will return fewer than the correct 2
+ document.getElementsByName( expando ).length === 2 +
+ // buggy browsers will return more than the correct 0
+ document.getElementsByName( expando + 0 ).length;
+ assertGetIdNotName = !document.getElementById( expando );
+
+ // Cleanup
+ docElem.removeChild( div );
+
+ return pass;
+ });
+
+// If slice is not available, provide a backup
+try {
+ slice.call( docElem.childNodes, 0 )[0].nodeType;
+} catch ( e ) {
+ slice = function( i ) {
+ var elem,
+ results = [];
+ for ( ; (elem = this[i]); i++ ) {
+ results.push( elem );
+ }
+ return results;
+ };
+}
+
+function Sizzle( selector, context, results, seed ) {
+ results = results || [];
+ context = context || document;
+ var match, elem, xml, m,
+ nodeType = context.nodeType;
+
+ if ( !selector || typeof selector !== "string" ) {
+ return results;
+ }
+
+ if ( nodeType !== 1 && nodeType !== 9 ) {
+ return [];
+ }
+
+ xml = isXML( context );
+
+ if ( !xml && !seed ) {
+ if ( (match = rquickExpr.exec( selector )) ) {
+ // Speed-up: Sizzle("#ID")
+ if ( (m = match[1]) ) {
+ if ( nodeType === 9 ) {
+ elem = context.getElementById( m );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE, Opera, and Webkit return items
+ // by name instead of ID
+ if ( elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ } else {
+ return results;
+ }
+ } else {
+ // Context is not a document
+ if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
+ contains( context, elem ) && elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ }
+
+ // Speed-up: Sizzle("TAG")
+ } else if ( match[2] ) {
+ push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) );
+ return results;
+
+ // Speed-up: Sizzle(".CLASS")
+ } else if ( (m = match[3]) && assertUsableClassName && context.getElementsByClassName ) {
+ push.apply( results, slice.call(context.getElementsByClassName( m ), 0) );
+ return results;
+ }
+ }
+ }
+
+ // All others
+ return select( selector.replace( rtrim, "$1" ), context, results, seed, xml );
+}
+
+Sizzle.matches = function( expr, elements ) {
+ return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+ return Sizzle( expr, null, null, [ elem ] ).length > 0;
+};
+
+// Returns a function to use in pseudos for input types
+function createInputPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === type;
+ };
+}
+
+// Returns a function to use in pseudos for buttons
+function createButtonPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return (name === "input" || name === "button") && elem.type === type;
+ };
+}
+
+// Returns a function to use in pseudos for positionals
+function createPositionalPseudo( fn ) {
+ return markFunction(function( argument ) {
+ argument = +argument;
+ return markFunction(function( seed, matches ) {
+ var j,
+ matchIndexes = fn( [], seed.length, argument ),
+ i = matchIndexes.length;
+
+ // Match elements found at the specified indexes
+ while ( i-- ) {
+ if ( seed[ (j = matchIndexes[i]) ] ) {
+ seed[j] = !(matches[j] = seed[j]);
+ }
+ }
+ });
+ });
+}
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+ var node,
+ ret = "",
+ i = 0,
+ nodeType = elem.nodeType;
+
+ if ( nodeType ) {
+ if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+ // Use textContent for elements
+ // innerText usage removed for consistency of new lines (see #11153)
+ if ( typeof elem.textContent === "string" ) {
+ return elem.textContent;
+ } else {
+ // Traverse its children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ ret += getText( elem );
+ }
+ }
+ } else if ( nodeType === 3 || nodeType === 4 ) {
+ return elem.nodeValue;
+ }
+ // Do not include comment or processing instruction nodes
+ } else {
+
+ // If no nodeType, this is expected to be an array
+ for ( ; (node = elem[i]); i++ ) {
+ // Do not traverse comment nodes
+ ret += getText( node );
+ }
+ }
+ return ret;
+};
+
+isXML = Sizzle.isXML = function( elem ) {
+ // documentElement is verified for cases where it doesn't yet exist
+ // (such as loading iframes in IE - #4833)
+ var documentElement = elem && (elem.ownerDocument || elem).documentElement;
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+// Element contains another
+contains = Sizzle.contains = docElem.contains ?
+ function( a, b ) {
+ var adown = a.nodeType === 9 ? a.documentElement : a,
+ bup = b && b.parentNode;
+ return a === bup || !!( bup && bup.nodeType === 1 && adown.contains && adown.contains(bup) );
+ } :
+ docElem.compareDocumentPosition ?
+ function( a, b ) {
+ return b && !!( a.compareDocumentPosition( b ) & 16 );
+ } :
+ function( a, b ) {
+ while ( (b = b.parentNode) ) {
+ if ( b === a ) {
+ return true;
+ }
+ }
+ return false;
+ };
+
+Sizzle.attr = function( elem, name ) {
+ var val,
+ xml = isXML( elem );
+
+ if ( !xml ) {
+ name = name.toLowerCase();
+ }
+ if ( (val = Expr.attrHandle[ name ]) ) {
+ return val( elem );
+ }
+ if ( xml || assertAttributes ) {
+ return elem.getAttribute( name );
+ }
+ val = elem.getAttributeNode( name );
+ return val ?
+ typeof elem[ name ] === "boolean" ?
+ elem[ name ] ? name : null :
+ val.specified ? val.value : null :
+ null;
+};
+
+Expr = Sizzle.selectors = {
+
+ // Can be adjusted by the user
+ cacheLength: 50,
+
+ createPseudo: markFunction,
+
+ match: matchExpr,
+
+ // IE6/7 return a modified href
+ attrHandle: assertHrefNotNormalized ?
+ {} :
+ {
+ "href": function( elem ) {
+ return elem.getAttribute( "href", 2 );
+ },
+ "type": function( elem ) {
+ return elem.getAttribute("type");
+ }
+ },
+
+ find: {
+ "ID": assertGetIdNotName ?
+ function( id, context, xml ) {
+ if ( typeof context.getElementById !== strundefined && !xml ) {
+ var m = context.getElementById( id );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ return m && m.parentNode ? [m] : [];
+ }
+ } :
+ function( id, context, xml ) {
+ if ( typeof context.getElementById !== strundefined && !xml ) {
+ var m = context.getElementById( id );
+
+ return m ?
+ m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ?
+ [m] :
+ undefined :
+ [];
+ }
+ },
+
+ "TAG": assertTagNameNoComments ?
+ function( tag, context ) {
+ if ( typeof context.getElementsByTagName !== strundefined ) {
+ return context.getElementsByTagName( tag );
+ }
+ } :
+ function( tag, context ) {
+ var results = context.getElementsByTagName( tag );
+
+ // Filter out possible comments
+ if ( tag === "*" ) {
+ var elem,
+ tmp = [],
+ i = 0;
+
+ for ( ; (elem = results[i]); i++ ) {
+ if ( elem.nodeType === 1 ) {
+ tmp.push( elem );
+ }
+ }
+
+ return tmp;
+ }
+ return results;
+ },
+
+ "NAME": assertUsableName && function( tag, context ) {
+ if ( typeof context.getElementsByName !== strundefined ) {
+ return context.getElementsByName( name );
+ }
+ },
+
+ "CLASS": assertUsableClassName && function( className, context, xml ) {
+ if ( typeof context.getElementsByClassName !== strundefined && !xml ) {
+ return context.getElementsByClassName( className );
+ }
+ }
+ },
+
+ relative: {
+ ">": { dir: "parentNode", first: true },
+ " ": { dir: "parentNode" },
+ "+": { dir: "previousSibling", first: true },
+ "~": { dir: "previousSibling" }
+ },
+
+ preFilter: {
+ "ATTR": function( match ) {
+ match[1] = match[1].replace( rbackslash, "" );
+
+ // Move the given value to match[3] whether quoted or unquoted
+ match[3] = ( match[4] || match[5] || "" ).replace( rbackslash, "" );
+
+ if ( match[2] === "~=" ) {
+ match[3] = " " + match[3] + " ";
+ }
+
+ return match.slice( 0, 4 );
+ },
+
+ "CHILD": function( match ) {
+ /* matches from matchExpr["CHILD"]
+ 1 type (only|nth|...)
+ 2 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+ 3 xn-component of xn+y argument ([+-]?\d*n|)
+ 4 sign of xn-component
+ 5 x of xn-component
+ 6 sign of y-component
+ 7 y of y-component
+ */
+ match[1] = match[1].toLowerCase();
+
+ if ( match[1] === "nth" ) {
+ // nth-child requires argument
+ if ( !match[2] ) {
+ Sizzle.error( match[0] );
+ }
+
+ // numeric x and y parameters for Expr.filter.CHILD
+ // remember that false/true cast respectively to 0/1
+ match[3] = +( match[3] ? match[4] + (match[5] || 1) : 2 * ( match[2] === "even" || match[2] === "odd" ) );
+ match[4] = +( ( match[6] + match[7] ) || match[2] === "odd" );
+
+ // other types prohibit arguments
+ } else if ( match[2] ) {
+ Sizzle.error( match[0] );
+ }
+
+ return match;
+ },
+
+ "PSEUDO": function( match ) {
+ var unquoted, excess;
+ if ( matchExpr["CHILD"].test( match[0] ) ) {
+ return null;
+ }
+
+ if ( match[3] ) {
+ match[2] = match[3];
+ } else if ( (unquoted = match[4]) ) {
+ // Only check arguments that contain a pseudo
+ if ( rpseudo.test(unquoted) &&
+ // Get excess from tokenize (recursively)
+ (excess = tokenize( unquoted, true )) &&
+ // advance to the next closing parenthesis
+ (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+
+ // excess is a negative index
+ unquoted = unquoted.slice( 0, excess );
+ match[0] = match[0].slice( 0, excess );
+ }
+ match[2] = unquoted;
+ }
+
+ // Return only captures needed by the pseudo filter method (type and argument)
+ return match.slice( 0, 3 );
+ }
+ },
+
+ filter: {
+ "ID": assertGetIdNotName ?
+ function( id ) {
+ id = id.replace( rbackslash, "" );
+ return function( elem ) {
+ return elem.getAttribute("id") === id;
+ };
+ } :
+ function( id ) {
+ id = id.replace( rbackslash, "" );
+ return function( elem ) {
+ var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
+ return node && node.value === id;
+ };
+ },
+
+ "TAG": function( nodeName ) {
+ if ( nodeName === "*" ) {
+ return function() { return true; };
+ }
+ nodeName = nodeName.replace( rbackslash, "" ).toLowerCase();
+
+ return function( elem ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+ };
+ },
+
+ "CLASS": function( className ) {
+ var pattern = classCache[ expando ][ className + " " ];
+
+ return pattern ||
+ (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
+ classCache( className, function( elem ) {
+ return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" );
+ });
+ },
+
+ "ATTR": function( name, operator, check ) {
+ return function( elem, context ) {
+ var result = Sizzle.attr( elem, name );
+
+ if ( result == null ) {
+ return operator === "!=";
+ }
+ if ( !operator ) {
+ return true;
+ }
+
+ result += "";
+
+ return operator === "=" ? result === check :
+ operator === "!=" ? result !== check :
+ operator === "^=" ? check && result.indexOf( check ) === 0 :
+ operator === "*=" ? check && result.indexOf( check ) > -1 :
+ operator === "$=" ? check && result.substr( result.length - check.length ) === check :
+ operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
+ operator === "|=" ? result === check || result.substr( 0, check.length + 1 ) === check + "-" :
+ false;
+ };
+ },
+
+ "CHILD": function( type, argument, first, last ) {
+
+ if ( type === "nth" ) {
+ return function( elem ) {
+ var node, diff,
+ parent = elem.parentNode;
+
+ if ( first === 1 && last === 0 ) {
+ return true;
+ }
+
+ if ( parent ) {
+ diff = 0;
+ for ( node = parent.firstChild; node; node = node.nextSibling ) {
+ if ( node.nodeType === 1 ) {
+ diff++;
+ if ( elem === node ) {
+ break;
+ }
+ }
+ }
+ }
+
+ // Incorporate the offset (or cast to NaN), then check against cycle size
+ diff -= last;
+ return diff === first || ( diff % first === 0 && diff / first >= 0 );
+ };
+ }
+
+ return function( elem ) {
+ var node = elem;
+
+ switch ( type ) {
+ case "only":
+ case "first":
+ while ( (node = node.previousSibling) ) {
+ if ( node.nodeType === 1 ) {
+ return false;
+ }
+ }
+
+ if ( type === "first" ) {
+ return true;
+ }
+
+ node = elem;
+
+ /* falls through */
+ case "last":
+ while ( (node = node.nextSibling) ) {
+ if ( node.nodeType === 1 ) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+ };
+ },
+
+ "PSEUDO": function( pseudo, argument ) {
+ // pseudo-class names are case-insensitive
+ // http://www.w3.org/TR/selectors/#pseudo-classes
+ // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+ // Remember that setFilters inherits from pseudos
+ var args,
+ fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+ Sizzle.error( "unsupported pseudo: " + pseudo );
+
+ // The user may use createPseudo to indicate that
+ // arguments are needed to create the filter function
+ // just as Sizzle does
+ if ( fn[ expando ] ) {
+ return fn( argument );
+ }
+
+ // But maintain support for old signatures
+ if ( fn.length > 1 ) {
+ args = [ pseudo, pseudo, "", argument ];
+ return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+ markFunction(function( seed, matches ) {
+ var idx,
+ matched = fn( seed, argument ),
+ i = matched.length;
+ while ( i-- ) {
+ idx = indexOf.call( seed, matched[i] );
+ seed[ idx ] = !( matches[ idx ] = matched[i] );
+ }
+ }) :
+ function( elem ) {
+ return fn( elem, 0, args );
+ };
+ }
+
+ return fn;
+ }
+ },
+
+ pseudos: {
+ "not": markFunction(function( selector ) {
+ // Trim the selector passed to compile
+ // to avoid treating leading and trailing
+ // spaces as combinators
+ var input = [],
+ results = [],
+ matcher = compile( selector.replace( rtrim, "$1" ) );
+
+ return matcher[ expando ] ?
+ markFunction(function( seed, matches, context, xml ) {
+ var elem,
+ unmatched = matcher( seed, null, xml, [] ),
+ i = seed.length;
+
+ // Match elements unmatched by `matcher`
+ while ( i-- ) {
+ if ( (elem = unmatched[i]) ) {
+ seed[i] = !(matches[i] = elem);
+ }
+ }
+ }) :
+ function( elem, context, xml ) {
+ input[0] = elem;
+ matcher( input, null, xml, results );
+ return !results.pop();
+ };
+ }),
+
+ "has": markFunction(function( selector ) {
+ return function( elem ) {
+ return Sizzle( selector, elem ).length > 0;
+ };
+ }),
+
+ "contains": markFunction(function( text ) {
+ return function( elem ) {
+ return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+ };
+ }),
+
+ "enabled": function( elem ) {
+ return elem.disabled === false;
+ },
+
+ "disabled": function( elem ) {
+ return elem.disabled === true;
+ },
+
+ "checked": function( elem ) {
+ // In CSS3, :checked should return both checked and selected elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ var nodeName = elem.nodeName.toLowerCase();
+ return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+ },
+
+ "selected": function( elem ) {
+ // Accessing this property makes selected-by-default
+ // options in Safari work properly
+ if ( elem.parentNode ) {
+ elem.parentNode.selectedIndex;
+ }
+
+ return elem.selected === true;
+ },
+
+ "parent": function( elem ) {
+ return !Expr.pseudos["empty"]( elem );
+ },
+
+ "empty": function( elem ) {
+ // http://www.w3.org/TR/selectors/#empty-pseudo
+ // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
+ // not comment, processing instructions, or others
+ // Thanks to Diego Perini for the nodeName shortcut
+ // Greater than "@" means alpha characters (specifically not starting with "#" or "?")
+ var nodeType;
+ elem = elem.firstChild;
+ while ( elem ) {
+ if ( elem.nodeName > "@" || (nodeType = elem.nodeType) === 3 || nodeType === 4 ) {
+ return false;
+ }
+ elem = elem.nextSibling;
+ }
+ return true;
+ },
+
+ "header": function( elem ) {
+ return rheader.test( elem.nodeName );
+ },
+
+ "text": function( elem ) {
+ var type, attr;
+ // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
+ // use getAttribute instead to test this case
+ return elem.nodeName.toLowerCase() === "input" &&
+ (type = elem.type) === "text" &&
+ ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === type );
+ },
+
+ // Input types
+ "radio": createInputPseudo("radio"),
+ "checkbox": createInputPseudo("checkbox"),
+ "file": createInputPseudo("file"),
+ "password": createInputPseudo("password"),
+ "image": createInputPseudo("image"),
+
+ "submit": createButtonPseudo("submit"),
+ "reset": createButtonPseudo("reset"),
+
+ "button": function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === "button" || name === "button";
+ },
+
+ "input": function( elem ) {
+ return rinputs.test( elem.nodeName );
+ },
+
+ "focus": function( elem ) {
+ var doc = elem.ownerDocument;
+ return elem === doc.activeElement && (!doc.hasFocus || doc.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+ },
+
+ "active": function( elem ) {
+ return elem === elem.ownerDocument.activeElement;
+ },
+
+ // Positional types
+ "first": createPositionalPseudo(function() {
+ return [ 0 ];
+ }),
+
+ "last": createPositionalPseudo(function( matchIndexes, length ) {
+ return [ length - 1 ];
+ }),
+
+ "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ return [ argument < 0 ? argument + length : argument ];
+ }),
+
+ "even": createPositionalPseudo(function( matchIndexes, length ) {
+ for ( var i = 0; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "odd": createPositionalPseudo(function( matchIndexes, length ) {
+ for ( var i = 1; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ for ( var i = argument < 0 ? argument + length : argument; --i >= 0; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ for ( var i = argument < 0 ? argument + length : argument; ++i < length; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ })
+ }
+};
+
+function siblingCheck( a, b, ret ) {
+ if ( a === b ) {
+ return ret;
+ }
+
+ var cur = a.nextSibling;
+
+ while ( cur ) {
+ if ( cur === b ) {
+ return -1;
+ }
+
+ cur = cur.nextSibling;
+ }
+
+ return 1;
+}
+
+sortOrder = docElem.compareDocumentPosition ?
+ function( a, b ) {
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ return ( !a.compareDocumentPosition || !b.compareDocumentPosition ?
+ a.compareDocumentPosition :
+ a.compareDocumentPosition(b) & 4
+ ) ? -1 : 1;
+ } :
+ function( a, b ) {
+ // The nodes are identical, we can exit early
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+
+ // Fallback to using sourceIndex (in IE) if it's available on both nodes
+ } else if ( a.sourceIndex && b.sourceIndex ) {
+ return a.sourceIndex - b.sourceIndex;
+ }
+
+ var al, bl,
+ ap = [],
+ bp = [],
+ aup = a.parentNode,
+ bup = b.parentNode,
+ cur = aup;
+
+ // If the nodes are siblings (or identical) we can do a quick check
+ if ( aup === bup ) {
+ return siblingCheck( a, b );
+
+ // If no parents were found then the nodes are disconnected
+ } else if ( !aup ) {
+ return -1;
+
+ } else if ( !bup ) {
+ return 1;
+ }
+
+ // Otherwise they're somewhere else in the tree so we need
+ // to build up a full list of the parentNodes for comparison
+ while ( cur ) {
+ ap.unshift( cur );
+ cur = cur.parentNode;
+ }
+
+ cur = bup;
+
+ while ( cur ) {
+ bp.unshift( cur );
+ cur = cur.parentNode;
+ }
+
+ al = ap.length;
+ bl = bp.length;
+
+ // Start walking down the tree looking for a discrepancy
+ for ( var i = 0; i < al && i < bl; i++ ) {
+ if ( ap[i] !== bp[i] ) {
+ return siblingCheck( ap[i], bp[i] );
+ }
+ }
+
+ // We ended someplace up the tree so do a sibling check
+ return i === al ?
+ siblingCheck( a, bp[i], -1 ) :
+ siblingCheck( ap[i], b, 1 );
+ };
+
+// Always assume the presence of duplicates if sort doesn't
+// pass them to our comparison function (as in Google Chrome).
+[0, 0].sort( sortOrder );
+baseHasDuplicate = !hasDuplicate;
+
+// Document sorting and removing duplicates
+Sizzle.uniqueSort = function( results ) {
+ var elem,
+ duplicates = [],
+ i = 1,
+ j = 0;
+
+ hasDuplicate = baseHasDuplicate;
+ results.sort( sortOrder );
+
+ if ( hasDuplicate ) {
+ for ( ; (elem = results[i]); i++ ) {
+ if ( elem === results[ i - 1 ] ) {
+ j = duplicates.push( i );
+ }
+ }
+ while ( j-- ) {
+ results.splice( duplicates[ j ], 1 );
+ }
+ }
+
+ return results;
+};
+
+Sizzle.error = function( msg ) {
+ throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+function tokenize( selector, parseOnly ) {
+ var matched, match, tokens, type,
+ soFar, groups, preFilters,
+ cached = tokenCache[ expando ][ selector + " " ];
+
+ if ( cached ) {
+ return parseOnly ? 0 : cached.slice( 0 );
+ }
+
+ soFar = selector;
+ groups = [];
+ preFilters = Expr.preFilter;
+
+ while ( soFar ) {
+
+ // Comma and first run
+ if ( !matched || (match = rcomma.exec( soFar )) ) {
+ if ( match ) {
+ // Don't consume trailing commas as valid
+ soFar = soFar.slice( match[0].length ) || soFar;
+ }
+ groups.push( tokens = [] );
+ }
+
+ matched = false;
+
+ // Combinators
+ if ( (match = rcombinators.exec( soFar )) ) {
+ tokens.push( matched = new Token( match.shift() ) );
+ soFar = soFar.slice( matched.length );
+
+ // Cast descendant combinators to space
+ matched.type = match[0].replace( rtrim, " " );
+ }
+
+ // Filters
+ for ( type in Expr.filter ) {
+ if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
+ (match = preFilters[ type ]( match ))) ) {
+
+ tokens.push( matched = new Token( match.shift() ) );
+ soFar = soFar.slice( matched.length );
+ matched.type = type;
+ matched.matches = match;
+ }
+ }
+
+ if ( !matched ) {
+ break;
+ }
+ }
+
+ // Return the length of the invalid excess
+ // if we're just parsing
+ // Otherwise, throw an error or return tokens
+ return parseOnly ?
+ soFar.length :
+ soFar ?
+ Sizzle.error( selector ) :
+ // Cache the tokens
+ tokenCache( selector, groups ).slice( 0 );
+}
+
+function addCombinator( matcher, combinator, base ) {
+ var dir = combinator.dir,
+ checkNonElements = base && combinator.dir === "parentNode",
+ doneName = done++;
+
+ return combinator.first ?
+ // Check against closest ancestor/preceding element
+ function( elem, context, xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( checkNonElements || elem.nodeType === 1 ) {
+ return matcher( elem, context, xml );
+ }
+ }
+ } :
+
+ // Check against all ancestor/preceding elements
+ function( elem, context, xml ) {
+ // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
+ if ( !xml ) {
+ var cache,
+ dirkey = dirruns + " " + doneName + " ",
+ cachedkey = dirkey + cachedruns;
+ while ( (elem = elem[ dir ]) ) {
+ if ( checkNonElements || elem.nodeType === 1 ) {
+ if ( (cache = elem[ expando ]) === cachedkey ) {
+ return elem.sizset;
+ } else if ( typeof cache === "string" && cache.indexOf(dirkey) === 0 ) {
+ if ( elem.sizset ) {
+ return elem;
+ }
+ } else {
+ elem[ expando ] = cachedkey;
+ if ( matcher( elem, context, xml ) ) {
+ elem.sizset = true;
+ return elem;
+ }
+ elem.sizset = false;
+ }
+ }
+ }
+ } else {
+ while ( (elem = elem[ dir ]) ) {
+ if ( checkNonElements || elem.nodeType === 1 ) {
+ if ( matcher( elem, context, xml ) ) {
+ return elem;
+ }
+ }
+ }
+ }
+ };
+}
+
+function elementMatcher( matchers ) {
+ return matchers.length > 1 ?
+ function( elem, context, xml ) {
+ var i = matchers.length;
+ while ( i-- ) {
+ if ( !matchers[i]( elem, context, xml ) ) {
+ return false;
+ }
+ }
+ return true;
+ } :
+ matchers[0];
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+ var elem,
+ newUnmatched = [],
+ i = 0,
+ len = unmatched.length,
+ mapped = map != null;
+
+ for ( ; i < len; i++ ) {
+ if ( (elem = unmatched[i]) ) {
+ if ( !filter || filter( elem, context, xml ) ) {
+ newUnmatched.push( elem );
+ if ( mapped ) {
+ map.push( i );
+ }
+ }
+ }
+ }
+
+ return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+ if ( postFilter && !postFilter[ expando ] ) {
+ postFilter = setMatcher( postFilter );
+ }
+ if ( postFinder && !postFinder[ expando ] ) {
+ postFinder = setMatcher( postFinder, postSelector );
+ }
+ return markFunction(function( seed, results, context, xml ) {
+ var temp, i, elem,
+ preMap = [],
+ postMap = [],
+ preexisting = results.length,
+
+ // Get initial elements from seed or context
+ elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
+
+ // Prefilter to get matcher input, preserving a map for seed-results synchronization
+ matcherIn = preFilter && ( seed || !selector ) ?
+ condense( elems, preMap, preFilter, context, xml ) :
+ elems,
+
+ matcherOut = matcher ?
+ // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+ postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+ // ...intermediate processing is necessary
+ [] :
+
+ // ...otherwise use results directly
+ results :
+ matcherIn;
+
+ // Find primary matches
+ if ( matcher ) {
+ matcher( matcherIn, matcherOut, context, xml );
+ }
+
+ // Apply postFilter
+ if ( postFilter ) {
+ temp = condense( matcherOut, postMap );
+ postFilter( temp, [], context, xml );
+
+ // Un-match failing elements by moving them back to matcherIn
+ i = temp.length;
+ while ( i-- ) {
+ if ( (elem = temp[i]) ) {
+ matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+ }
+ }
+ }
+
+ if ( seed ) {
+ if ( postFinder || preFilter ) {
+ if ( postFinder ) {
+ // Get the final matcherOut by condensing this intermediate into postFinder contexts
+ temp = [];
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) ) {
+ // Restore matcherIn since elem is not yet a final match
+ temp.push( (matcherIn[i] = elem) );
+ }
+ }
+ postFinder( null, (matcherOut = []), temp, xml );
+ }
+
+ // Move matched elements from seed to results to keep them synchronized
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) &&
+ (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
+
+ seed[temp] = !(results[temp] = elem);
+ }
+ }
+ }
+
+ // Add elements to results, through postFinder if defined
+ } else {
+ matcherOut = condense(
+ matcherOut === results ?
+ matcherOut.splice( preexisting, matcherOut.length ) :
+ matcherOut
+ );
+ if ( postFinder ) {
+ postFinder( null, results, matcherOut, xml );
+ } else {
+ push.apply( results, matcherOut );
+ }
+ }
+ });
+}
+
+function matcherFromTokens( tokens ) {
+ var checkContext, matcher, j,
+ len = tokens.length,
+ leadingRelative = Expr.relative[ tokens[0].type ],
+ implicitRelative = leadingRelative || Expr.relative[" "],
+ i = leadingRelative ? 1 : 0,
+
+ // The foundational matcher ensures that elements are reachable from top-level context(s)
+ matchContext = addCombinator( function( elem ) {
+ return elem === checkContext;
+ }, implicitRelative, true ),
+ matchAnyContext = addCombinator( function( elem ) {
+ return indexOf.call( checkContext, elem ) > -1;
+ }, implicitRelative, true ),
+ matchers = [ function( elem, context, xml ) {
+ return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+ (checkContext = context).nodeType ?
+ matchContext( elem, context, xml ) :
+ matchAnyContext( elem, context, xml ) );
+ } ];
+
+ for ( ; i < len; i++ ) {
+ if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+ matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];
+ } else {
+ matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+ // Return special upon seeing a positional matcher
+ if ( matcher[ expando ] ) {
+ // Find the next relative operator (if any) for proper handling
+ j = ++i;
+ for ( ; j < len; j++ ) {
+ if ( Expr.relative[ tokens[j].type ] ) {
+ break;
+ }
+ }
+ return setMatcher(
+ i > 1 && elementMatcher( matchers ),
+ i > 1 && tokens.slice( 0, i - 1 ).join("").replace( rtrim, "$1" ),
+ matcher,
+ i < j && matcherFromTokens( tokens.slice( i, j ) ),
+ j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+ j < len && tokens.join("")
+ );
+ }
+ matchers.push( matcher );
+ }
+ }
+
+ return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+ var bySet = setMatchers.length > 0,
+ byElement = elementMatchers.length > 0,
+ superMatcher = function( seed, context, xml, results, expandContext ) {
+ var elem, j, matcher,
+ setMatched = [],
+ matchedCount = 0,
+ i = "0",
+ unmatched = seed && [],
+ outermost = expandContext != null,
+ contextBackup = outermostContext,
+ // We must always have either seed elements or context
+ elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
+ // Nested matchers should use non-integer dirruns
+ dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.E);
+
+ if ( outermost ) {
+ outermostContext = context !== document && context;
+ cachedruns = superMatcher.el;
+ }
+
+ // Add elements passing elementMatchers directly to results
+ for ( ; (elem = elems[i]) != null; i++ ) {
+ if ( byElement && elem ) {
+ for ( j = 0; (matcher = elementMatchers[j]); j++ ) {
+ if ( matcher( elem, context, xml ) ) {
+ results.push( elem );
+ break;
+ }
+ }
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ cachedruns = ++superMatcher.el;
+ }
+ }
+
+ // Track unmatched elements for set filters
+ if ( bySet ) {
+ // They will have gone through all possible matchers
+ if ( (elem = !matcher && elem) ) {
+ matchedCount--;
+ }
+
+ // Lengthen the array for every element, matched or not
+ if ( seed ) {
+ unmatched.push( elem );
+ }
+ }
+ }
+
+ // Apply set filters to unmatched elements
+ matchedCount += i;
+ if ( bySet && i !== matchedCount ) {
+ for ( j = 0; (matcher = setMatchers[j]); j++ ) {
+ matcher( unmatched, setMatched, context, xml );
+ }
+
+ if ( seed ) {
+ // Reintegrate element matches to eliminate the need for sorting
+ if ( matchedCount > 0 ) {
+ while ( i-- ) {
+ if ( !(unmatched[i] || setMatched[i]) ) {
+ setMatched[i] = pop.call( results );
+ }
+ }
+ }
+
+ // Discard index placeholder values to get only actual matches
+ setMatched = condense( setMatched );
+ }
+
+ // Add matches to results
+ push.apply( results, setMatched );
+
+ // Seedless set matches succeeding multiple successful matchers stipulate sorting
+ if ( outermost && !seed && setMatched.length > 0 &&
+ ( matchedCount + setMatchers.length ) > 1 ) {
+
+ Sizzle.uniqueSort( results );
+ }
+ }
+
+ // Override manipulation of globals by nested matchers
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ outermostContext = contextBackup;
+ }
+
+ return unmatched;
+ };
+
+ superMatcher.el = 0;
+ return bySet ?
+ markFunction( superMatcher ) :
+ superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
+ var i,
+ setMatchers = [],
+ elementMatchers = [],
+ cached = compilerCache[ expando ][ selector + " " ];
+
+ if ( !cached ) {
+ // Generate a function of recursive functions that can be used to check each element
+ if ( !group ) {
+ group = tokenize( selector );
+ }
+ i = group.length;
+ while ( i-- ) {
+ cached = matcherFromTokens( group[i] );
+ if ( cached[ expando ] ) {
+ setMatchers.push( cached );
+ } else {
+ elementMatchers.push( cached );
+ }
+ }
+
+ // Cache the compiled function
+ cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+ }
+ return cached;
+};
+
+function multipleContexts( selector, contexts, results ) {
+ var i = 0,
+ len = contexts.length;
+ for ( ; i < len; i++ ) {
+ Sizzle( selector, contexts[i], results );
+ }
+ return results;
+}
+
+function select( selector, context, results, seed, xml ) {
+ var i, tokens, token, type, find,
+ match = tokenize( selector ),
+ j = match.length;
+
+ if ( !seed ) {
+ // Try to minimize operations if there is only one group
+ if ( match.length === 1 ) {
+
+ // Take a shortcut and set the context if the root selector is an ID
+ tokens = match[0] = match[0].slice( 0 );
+ if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+ context.nodeType === 9 && !xml &&
+ Expr.relative[ tokens[1].type ] ) {
+
+ context = Expr.find["ID"]( token.matches[0].replace( rbackslash, "" ), context, xml )[0];
+ if ( !context ) {
+ return results;
+ }
+
+ selector = selector.slice( tokens.shift().length );
+ }
+
+ // Fetch a seed set for right-to-left matching
+ for ( i = matchExpr["POS"].test( selector ) ? -1 : tokens.length - 1; i >= 0; i-- ) {
+ token = tokens[i];
+
+ // Abort if we hit a combinator
+ if ( Expr.relative[ (type = token.type) ] ) {
+ break;
+ }
+ if ( (find = Expr.find[ type ]) ) {
+ // Search, expanding context for leading sibling combinators
+ if ( (seed = find(
+ token.matches[0].replace( rbackslash, "" ),
+ rsibling.test( tokens[0].type ) && context.parentNode || context,
+ xml
+ )) ) {
+
+ // If seed is empty or no tokens remain, we can return early
+ tokens.splice( i, 1 );
+ selector = seed.length && tokens.join("");
+ if ( !selector ) {
+ push.apply( results, slice.call( seed, 0 ) );
+ return results;
+ }
+
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ // Compile and execute a filtering function
+ // Provide `match` to avoid retokenization if we modified the selector above
+ compile( selector, match )(
+ seed,
+ context,
+ xml,
+ results,
+ rsibling.test( selector )
+ );
+ return results;
+}
+
+if ( document.querySelectorAll ) {
+ (function() {
+ var disconnectedMatch,
+ oldSelect = select,
+ rescape = /'|\\/g,
+ rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,
+
+ // qSa(:focus) reports false when true (Chrome 21), no need to also add to buggyMatches since matches checks buggyQSA
+ // A support test would require too much code (would include document ready)
+ rbuggyQSA = [ ":focus" ],
+
+ // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+ // A support test would require too much code (would include document ready)
+ // just skip matchesSelector for :active
+ rbuggyMatches = [ ":active" ],
+ matches = docElem.matchesSelector ||
+ docElem.mozMatchesSelector ||
+ docElem.webkitMatchesSelector ||
+ docElem.oMatchesSelector ||
+ docElem.msMatchesSelector;
+
+ // Build QSA regex
+ // Regex strategy adopted from Diego Perini
+ assert(function( div ) {
+ // Select is set to empty string on purpose
+ // This is to test IE's treatment of not explictly
+ // setting a boolean content attribute,
+ // since its presence should be enough
+ // http://bugs.jquery.com/ticket/12359
+ div.innerHTML = " ";
+
+ // IE8 - Some boolean attributes are not treated correctly
+ if ( !div.querySelectorAll("[selected]").length ) {
+ rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" );
+ }
+
+ // Webkit/Opera - :checked should return selected option elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ // IE8 throws error here (do not put tests after this one)
+ if ( !div.querySelectorAll(":checked").length ) {
+ rbuggyQSA.push(":checked");
+ }
+ });
+
+ assert(function( div ) {
+
+ // Opera 10-12/IE9 - ^= $= *= and empty values
+ // Should not select anything
+ div.innerHTML = "
";
+ if ( div.querySelectorAll("[test^='']").length ) {
+ rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" );
+ }
+
+ // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+ // IE8 throws error here (do not put tests after this one)
+ div.innerHTML = " ";
+ if ( !div.querySelectorAll(":enabled").length ) {
+ rbuggyQSA.push(":enabled", ":disabled");
+ }
+ });
+
+ // rbuggyQSA always contains :focus, so no need for a length check
+ rbuggyQSA = /* rbuggyQSA.length && */ new RegExp( rbuggyQSA.join("|") );
+
+ select = function( selector, context, results, seed, xml ) {
+ // Only use querySelectorAll when not filtering,
+ // when this is not xml,
+ // and when no QSA bugs apply
+ if ( !seed && !xml && !rbuggyQSA.test( selector ) ) {
+ var groups, i,
+ old = true,
+ nid = expando,
+ newContext = context,
+ newSelector = context.nodeType === 9 && selector;
+
+ // qSA works strangely on Element-rooted queries
+ // We can work around this by specifying an extra ID on the root
+ // and working up from there (Thanks to Andrew Dupont for the technique)
+ // IE 8 doesn't work on object elements
+ if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+ groups = tokenize( selector );
+
+ if ( (old = context.getAttribute("id")) ) {
+ nid = old.replace( rescape, "\\$&" );
+ } else {
+ context.setAttribute( "id", nid );
+ }
+ nid = "[id='" + nid + "'] ";
+
+ i = groups.length;
+ while ( i-- ) {
+ groups[i] = nid + groups[i].join("");
+ }
+ newContext = rsibling.test( selector ) && context.parentNode || context;
+ newSelector = groups.join(",");
+ }
+
+ if ( newSelector ) {
+ try {
+ push.apply( results, slice.call( newContext.querySelectorAll(
+ newSelector
+ ), 0 ) );
+ return results;
+ } catch(qsaError) {
+ } finally {
+ if ( !old ) {
+ context.removeAttribute("id");
+ }
+ }
+ }
+ }
+
+ return oldSelect( selector, context, results, seed, xml );
+ };
+
+ if ( matches ) {
+ assert(function( div ) {
+ // Check to see if it's possible to do matchesSelector
+ // on a disconnected node (IE 9)
+ disconnectedMatch = matches.call( div, "div" );
+
+ // This should fail with an exception
+ // Gecko does not error, returns false instead
+ try {
+ matches.call( div, "[test!='']:sizzle" );
+ rbuggyMatches.push( "!=", pseudos );
+ } catch ( e ) {}
+ });
+
+ // rbuggyMatches always contains :active and :focus, so no need for a length check
+ rbuggyMatches = /* rbuggyMatches.length && */ new RegExp( rbuggyMatches.join("|") );
+
+ Sizzle.matchesSelector = function( elem, expr ) {
+ // Make sure that attribute selectors are quoted
+ expr = expr.replace( rattributeQuotes, "='$1']" );
+
+ // rbuggyMatches always contains :active, so no need for an existence check
+ if ( !isXML( elem ) && !rbuggyMatches.test( expr ) && !rbuggyQSA.test( expr ) ) {
+ try {
+ var ret = matches.call( elem, expr );
+
+ // IE 9's matchesSelector returns false on disconnected nodes
+ if ( ret || disconnectedMatch ||
+ // As well, disconnected nodes are said to be in a document
+ // fragment in IE 9
+ elem.document && elem.document.nodeType !== 11 ) {
+ return ret;
+ }
+ } catch(e) {}
+ }
+
+ return Sizzle( expr, null, null, [ elem ] ).length > 0;
+ };
+ }
+ })();
+}
+
+// Deprecated
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Back-compat
+function setFilters() {}
+Expr.filters = setFilters.prototype = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+// Override sizzle attribute retrieval
+Sizzle.attr = jQuery.attr;
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.pseudos;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})( window );
+var runtil = /Until$/,
+ rparentsprev = /^(?:parents|prev(?:Until|All))/,
+ isSimple = /^.[^:#\[\.,]*$/,
+ rneedsContext = jQuery.expr.match.needsContext,
+ // methods guaranteed to produce a unique set when starting from a unique set
+ guaranteedUnique = {
+ children: true,
+ contents: true,
+ next: true,
+ prev: true
+ };
+
+jQuery.fn.extend({
+ find: function( selector ) {
+ var i, l, length, n, r, ret,
+ self = this;
+
+ if ( typeof selector !== "string" ) {
+ return jQuery( selector ).filter(function() {
+ for ( i = 0, l = self.length; i < l; i++ ) {
+ if ( jQuery.contains( self[ i ], this ) ) {
+ return true;
+ }
+ }
+ });
+ }
+
+ ret = this.pushStack( "", "find", selector );
+
+ for ( i = 0, l = this.length; i < l; i++ ) {
+ length = ret.length;
+ jQuery.find( selector, this[i], ret );
+
+ if ( i > 0 ) {
+ // Make sure that the results are unique
+ for ( n = length; n < ret.length; n++ ) {
+ for ( r = 0; r < length; r++ ) {
+ if ( ret[r] === ret[n] ) {
+ ret.splice(n--, 1);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ return ret;
+ },
+
+ has: function( target ) {
+ var i,
+ targets = jQuery( target, this ),
+ len = targets.length;
+
+ return this.filter(function() {
+ for ( i = 0; i < len; i++ ) {
+ if ( jQuery.contains( this, targets[i] ) ) {
+ return true;
+ }
+ }
+ });
+ },
+
+ not: function( selector ) {
+ return this.pushStack( winnow(this, selector, false), "not", selector);
+ },
+
+ filter: function( selector ) {
+ return this.pushStack( winnow(this, selector, true), "filter", selector );
+ },
+
+ is: function( selector ) {
+ return !!selector && (
+ typeof selector === "string" ?
+ // If this is a positional/relative selector, check membership in the returned set
+ // so $("p:first").is("p:last") won't return true for a doc with two "p".
+ rneedsContext.test( selector ) ?
+ jQuery( selector, this.context ).index( this[0] ) >= 0 :
+ jQuery.filter( selector, this ).length > 0 :
+ this.filter( selector ).length > 0 );
+ },
+
+ closest: function( selectors, context ) {
+ var cur,
+ i = 0,
+ l = this.length,
+ ret = [],
+ pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
+ jQuery( selectors, context || this.context ) :
+ 0;
+
+ for ( ; i < l; i++ ) {
+ cur = this[i];
+
+ while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) {
+ if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
+ ret.push( cur );
+ break;
+ }
+ cur = cur.parentNode;
+ }
+ }
+
+ ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
+
+ return this.pushStack( ret, "closest", selectors );
+ },
+
+ // Determine the position of an element within
+ // the matched set of elements
+ index: function( elem ) {
+
+ // No argument, return index in parent
+ if ( !elem ) {
+ return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1;
+ }
+
+ // index in selector
+ if ( typeof elem === "string" ) {
+ return jQuery.inArray( this[0], jQuery( elem ) );
+ }
+
+ // Locate the position of the desired element
+ return jQuery.inArray(
+ // If it receives a jQuery object, the first element is used
+ elem.jquery ? elem[0] : elem, this );
+ },
+
+ add: function( selector, context ) {
+ var set = typeof selector === "string" ?
+ jQuery( selector, context ) :
+ jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
+ all = jQuery.merge( this.get(), set );
+
+ return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
+ all :
+ jQuery.unique( all ) );
+ },
+
+ addBack: function( selector ) {
+ return this.add( selector == null ?
+ this.prevObject : this.prevObject.filter(selector)
+ );
+ }
+});
+
+jQuery.fn.andSelf = jQuery.fn.addBack;
+
+// A painfully simple check to see if an element is disconnected
+// from a document (should be improved, where feasible).
+function isDisconnected( node ) {
+ return !node || !node.parentNode || node.parentNode.nodeType === 11;
+}
+
+function sibling( cur, dir ) {
+ do {
+ cur = cur[ dir ];
+ } while ( cur && cur.nodeType !== 1 );
+
+ return cur;
+}
+
+jQuery.each({
+ parent: function( elem ) {
+ var parent = elem.parentNode;
+ return parent && parent.nodeType !== 11 ? parent : null;
+ },
+ parents: function( elem ) {
+ return jQuery.dir( elem, "parentNode" );
+ },
+ parentsUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "parentNode", until );
+ },
+ next: function( elem ) {
+ return sibling( elem, "nextSibling" );
+ },
+ prev: function( elem ) {
+ return sibling( elem, "previousSibling" );
+ },
+ nextAll: function( elem ) {
+ return jQuery.dir( elem, "nextSibling" );
+ },
+ prevAll: function( elem ) {
+ return jQuery.dir( elem, "previousSibling" );
+ },
+ nextUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "nextSibling", until );
+ },
+ prevUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "previousSibling", until );
+ },
+ siblings: function( elem ) {
+ return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
+ },
+ children: function( elem ) {
+ return jQuery.sibling( elem.firstChild );
+ },
+ contents: function( elem ) {
+ return jQuery.nodeName( elem, "iframe" ) ?
+ elem.contentDocument || elem.contentWindow.document :
+ jQuery.merge( [], elem.childNodes );
+ }
+}, function( name, fn ) {
+ jQuery.fn[ name ] = function( until, selector ) {
+ var ret = jQuery.map( this, fn, until );
+
+ if ( !runtil.test( name ) ) {
+ selector = until;
+ }
+
+ if ( selector && typeof selector === "string" ) {
+ ret = jQuery.filter( selector, ret );
+ }
+
+ ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
+
+ if ( this.length > 1 && rparentsprev.test( name ) ) {
+ ret = ret.reverse();
+ }
+
+ return this.pushStack( ret, name, core_slice.call( arguments ).join(",") );
+ };
+});
+
+jQuery.extend({
+ filter: function( expr, elems, not ) {
+ if ( not ) {
+ expr = ":not(" + expr + ")";
+ }
+
+ return elems.length === 1 ?
+ jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
+ jQuery.find.matches(expr, elems);
+ },
+
+ dir: function( elem, dir, until ) {
+ var matched = [],
+ cur = elem[ dir ];
+
+ while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
+ if ( cur.nodeType === 1 ) {
+ matched.push( cur );
+ }
+ cur = cur[dir];
+ }
+ return matched;
+ },
+
+ sibling: function( n, elem ) {
+ var r = [];
+
+ for ( ; n; n = n.nextSibling ) {
+ if ( n.nodeType === 1 && n !== elem ) {
+ r.push( n );
+ }
+ }
+
+ return r;
+ }
+});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, keep ) {
+
+ // Can't pass null or undefined to indexOf in Firefox 4
+ // Set to 0 to skip string check
+ qualifier = qualifier || 0;
+
+ if ( jQuery.isFunction( qualifier ) ) {
+ return jQuery.grep(elements, function( elem, i ) {
+ var retVal = !!qualifier.call( elem, i, elem );
+ return retVal === keep;
+ });
+
+ } else if ( qualifier.nodeType ) {
+ return jQuery.grep(elements, function( elem, i ) {
+ return ( elem === qualifier ) === keep;
+ });
+
+ } else if ( typeof qualifier === "string" ) {
+ var filtered = jQuery.grep(elements, function( elem ) {
+ return elem.nodeType === 1;
+ });
+
+ if ( isSimple.test( qualifier ) ) {
+ return jQuery.filter(qualifier, filtered, !keep);
+ } else {
+ qualifier = jQuery.filter( qualifier, filtered );
+ }
+ }
+
+ return jQuery.grep(elements, function( elem, i ) {
+ return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
+ });
+}
+function createSafeFragment( document ) {
+ var list = nodeNames.split( "|" ),
+ safeFrag = document.createDocumentFragment();
+
+ if ( safeFrag.createElement ) {
+ while ( list.length ) {
+ safeFrag.createElement(
+ list.pop()
+ );
+ }
+ }
+ return safeFrag;
+}
+
+var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
+ "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
+ rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
+ rleadingWhitespace = /^\s+/,
+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
+ rtagName = /<([\w:]+)/,
+ rtbody = / ]", "i"),
+ rcheckableType = /^(?:checkbox|radio)$/,
+ // checked="checked" or checked
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+ rscriptType = /\/(java|ecma)script/i,
+ rcleanScript = /^\s*\s*$/g,
+ wrapMap = {
+ option: [ 1, "", " " ],
+ legend: [ 1, "", " " ],
+ thead: [ 1, "" ],
+ tr: [ 2, "" ],
+ td: [ 3, "" ],
+ col: [ 2, "" ],
+ area: [ 1, "", " " ],
+ _default: [ 0, "", "" ]
+ },
+ safeFragment = createSafeFragment( document ),
+ fragmentDiv = safeFragment.appendChild( document.createElement("div") );
+
+wrapMap.optgroup = wrapMap.option;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
+// unless wrapped in a div with non-breaking characters in front of it.
+if ( !jQuery.support.htmlSerialize ) {
+ wrapMap._default = [ 1, "X", "
" ];
+}
+
+jQuery.fn.extend({
+ text: function( value ) {
+ return jQuery.access( this, function( value ) {
+ return value === undefined ?
+ jQuery.text( this ) :
+ this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
+ }, null, value, arguments.length );
+ },
+
+ wrapAll: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function(i) {
+ jQuery(this).wrapAll( html.call(this, i) );
+ });
+ }
+
+ if ( this[0] ) {
+ // The elements to wrap the target around
+ var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
+
+ if ( this[0].parentNode ) {
+ wrap.insertBefore( this[0] );
+ }
+
+ wrap.map(function() {
+ var elem = this;
+
+ while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
+ elem = elem.firstChild;
+ }
+
+ return elem;
+ }).append( this );
+ }
+
+ return this;
+ },
+
+ wrapInner: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function(i) {
+ jQuery(this).wrapInner( html.call(this, i) );
+ });
+ }
+
+ return this.each(function() {
+ var self = jQuery( this ),
+ contents = self.contents();
+
+ if ( contents.length ) {
+ contents.wrapAll( html );
+
+ } else {
+ self.append( html );
+ }
+ });
+ },
+
+ wrap: function( html ) {
+ var isFunction = jQuery.isFunction( html );
+
+ return this.each(function(i) {
+ jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
+ });
+ },
+
+ unwrap: function() {
+ return this.parent().each(function() {
+ if ( !jQuery.nodeName( this, "body" ) ) {
+ jQuery( this ).replaceWith( this.childNodes );
+ }
+ }).end();
+ },
+
+ append: function() {
+ return this.domManip(arguments, true, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 ) {
+ this.appendChild( elem );
+ }
+ });
+ },
+
+ prepend: function() {
+ return this.domManip(arguments, true, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 ) {
+ this.insertBefore( elem, this.firstChild );
+ }
+ });
+ },
+
+ before: function() {
+ if ( !isDisconnected( this[0] ) ) {
+ return this.domManip(arguments, false, function( elem ) {
+ this.parentNode.insertBefore( elem, this );
+ });
+ }
+
+ if ( arguments.length ) {
+ var set = jQuery.clean( arguments );
+ return this.pushStack( jQuery.merge( set, this ), "before", this.selector );
+ }
+ },
+
+ after: function() {
+ if ( !isDisconnected( this[0] ) ) {
+ return this.domManip(arguments, false, function( elem ) {
+ this.parentNode.insertBefore( elem, this.nextSibling );
+ });
+ }
+
+ if ( arguments.length ) {
+ var set = jQuery.clean( arguments );
+ return this.pushStack( jQuery.merge( this, set ), "after", this.selector );
+ }
+ },
+
+ // keepData is for internal use only--do not document
+ remove: function( selector, keepData ) {
+ var elem,
+ i = 0;
+
+ for ( ; (elem = this[i]) != null; i++ ) {
+ if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
+ if ( !keepData && elem.nodeType === 1 ) {
+ jQuery.cleanData( elem.getElementsByTagName("*") );
+ jQuery.cleanData( [ elem ] );
+ }
+
+ if ( elem.parentNode ) {
+ elem.parentNode.removeChild( elem );
+ }
+ }
+ }
+
+ return this;
+ },
+
+ empty: function() {
+ var elem,
+ i = 0;
+
+ for ( ; (elem = this[i]) != null; i++ ) {
+ // Remove element nodes and prevent memory leaks
+ if ( elem.nodeType === 1 ) {
+ jQuery.cleanData( elem.getElementsByTagName("*") );
+ }
+
+ // Remove any remaining nodes
+ while ( elem.firstChild ) {
+ elem.removeChild( elem.firstChild );
+ }
+ }
+
+ return this;
+ },
+
+ clone: function( dataAndEvents, deepDataAndEvents ) {
+ dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+ deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+ return this.map( function () {
+ return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+ });
+ },
+
+ html: function( value ) {
+ return jQuery.access( this, function( value ) {
+ var elem = this[0] || {},
+ i = 0,
+ l = this.length;
+
+ if ( value === undefined ) {
+ return elem.nodeType === 1 ?
+ elem.innerHTML.replace( rinlinejQuery, "" ) :
+ undefined;
+ }
+
+ // See if we can take a shortcut and just use innerHTML
+ if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
+ ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) &&
+ ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
+ !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
+
+ value = value.replace( rxhtmlTag, "<$1>$2>" );
+
+ try {
+ for (; i < l; i++ ) {
+ // Remove element nodes and prevent memory leaks
+ elem = this[i] || {};
+ if ( elem.nodeType === 1 ) {
+ jQuery.cleanData( elem.getElementsByTagName( "*" ) );
+ elem.innerHTML = value;
+ }
+ }
+
+ elem = 0;
+
+ // If using innerHTML throws an exception, use the fallback method
+ } catch(e) {}
+ }
+
+ if ( elem ) {
+ this.empty().append( value );
+ }
+ }, null, value, arguments.length );
+ },
+
+ replaceWith: function( value ) {
+ if ( !isDisconnected( this[0] ) ) {
+ // Make sure that the elements are removed from the DOM before they are inserted
+ // this can help fix replacing a parent with child elements
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function(i) {
+ var self = jQuery(this), old = self.html();
+ self.replaceWith( value.call( this, i, old ) );
+ });
+ }
+
+ if ( typeof value !== "string" ) {
+ value = jQuery( value ).detach();
+ }
+
+ return this.each(function() {
+ var next = this.nextSibling,
+ parent = this.parentNode;
+
+ jQuery( this ).remove();
+
+ if ( next ) {
+ jQuery(next).before( value );
+ } else {
+ jQuery(parent).append( value );
+ }
+ });
+ }
+
+ return this.length ?
+ this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) :
+ this;
+ },
+
+ detach: function( selector ) {
+ return this.remove( selector, true );
+ },
+
+ domManip: function( args, table, callback ) {
+
+ // Flatten any nested arrays
+ args = [].concat.apply( [], args );
+
+ var results, first, fragment, iNoClone,
+ i = 0,
+ value = args[0],
+ scripts = [],
+ l = this.length;
+
+ // We can't cloneNode fragments that contain checked, in WebKit
+ if ( !jQuery.support.checkClone && l > 1 && typeof value === "string" && rchecked.test( value ) ) {
+ return this.each(function() {
+ jQuery(this).domManip( args, table, callback );
+ });
+ }
+
+ if ( jQuery.isFunction(value) ) {
+ return this.each(function(i) {
+ var self = jQuery(this);
+ args[0] = value.call( this, i, table ? self.html() : undefined );
+ self.domManip( args, table, callback );
+ });
+ }
+
+ if ( this[0] ) {
+ results = jQuery.buildFragment( args, this, scripts );
+ fragment = results.fragment;
+ first = fragment.firstChild;
+
+ if ( fragment.childNodes.length === 1 ) {
+ fragment = first;
+ }
+
+ if ( first ) {
+ table = table && jQuery.nodeName( first, "tr" );
+
+ // Use the original fragment for the last item instead of the first because it can end up
+ // being emptied incorrectly in certain situations (#8070).
+ // Fragments from the fragment cache must always be cloned and never used in place.
+ for ( iNoClone = results.cacheable || l - 1; i < l; i++ ) {
+ callback.call(
+ table && jQuery.nodeName( this[i], "table" ) ?
+ findOrAppend( this[i], "tbody" ) :
+ this[i],
+ i === iNoClone ?
+ fragment :
+ jQuery.clone( fragment, true, true )
+ );
+ }
+ }
+
+ // Fix #11809: Avoid leaking memory
+ fragment = first = null;
+
+ if ( scripts.length ) {
+ jQuery.each( scripts, function( i, elem ) {
+ if ( elem.src ) {
+ if ( jQuery.ajax ) {
+ jQuery.ajax({
+ url: elem.src,
+ type: "GET",
+ dataType: "script",
+ async: false,
+ global: false,
+ "throws": true
+ });
+ } else {
+ jQuery.error("no ajax");
+ }
+ } else {
+ jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "" ) );
+ }
+
+ if ( elem.parentNode ) {
+ elem.parentNode.removeChild( elem );
+ }
+ });
+ }
+ }
+
+ return this;
+ }
+});
+
+function findOrAppend( elem, tag ) {
+ return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) );
+}
+
+function cloneCopyEvent( src, dest ) {
+
+ if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
+ return;
+ }
+
+ var type, i, l,
+ oldData = jQuery._data( src ),
+ curData = jQuery._data( dest, oldData ),
+ events = oldData.events;
+
+ if ( events ) {
+ delete curData.handle;
+ curData.events = {};
+
+ for ( type in events ) {
+ for ( i = 0, l = events[ type ].length; i < l; i++ ) {
+ jQuery.event.add( dest, type, events[ type ][ i ] );
+ }
+ }
+ }
+
+ // make the cloned public data object a copy from the original
+ if ( curData.data ) {
+ curData.data = jQuery.extend( {}, curData.data );
+ }
+}
+
+function cloneFixAttributes( src, dest ) {
+ var nodeName;
+
+ // We do not need to do anything for non-Elements
+ if ( dest.nodeType !== 1 ) {
+ return;
+ }
+
+ // clearAttributes removes the attributes, which we don't want,
+ // but also removes the attachEvent events, which we *do* want
+ if ( dest.clearAttributes ) {
+ dest.clearAttributes();
+ }
+
+ // mergeAttributes, in contrast, only merges back on the
+ // original attributes, not the events
+ if ( dest.mergeAttributes ) {
+ dest.mergeAttributes( src );
+ }
+
+ nodeName = dest.nodeName.toLowerCase();
+
+ if ( nodeName === "object" ) {
+ // IE6-10 improperly clones children of object elements using classid.
+ // IE10 throws NoModificationAllowedError if parent is null, #12132.
+ if ( dest.parentNode ) {
+ dest.outerHTML = src.outerHTML;
+ }
+
+ // This path appears unavoidable for IE9. When cloning an object
+ // element in IE9, the outerHTML strategy above is not sufficient.
+ // If the src has innerHTML and the destination does not,
+ // copy the src.innerHTML into the dest.innerHTML. #10324
+ if ( jQuery.support.html5Clone && (src.innerHTML && !jQuery.trim(dest.innerHTML)) ) {
+ dest.innerHTML = src.innerHTML;
+ }
+
+ } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
+ // IE6-8 fails to persist the checked state of a cloned checkbox
+ // or radio button. Worse, IE6-7 fail to give the cloned element
+ // a checked appearance if the defaultChecked value isn't also set
+
+ dest.defaultChecked = dest.checked = src.checked;
+
+ // IE6-7 get confused and end up setting the value of a cloned
+ // checkbox/radio button to an empty string instead of "on"
+ if ( dest.value !== src.value ) {
+ dest.value = src.value;
+ }
+
+ // IE6-8 fails to return the selected option to the default selected
+ // state when cloning options
+ } else if ( nodeName === "option" ) {
+ dest.selected = src.defaultSelected;
+
+ // IE6-8 fails to set the defaultValue to the correct value when
+ // cloning other types of input fields
+ } else if ( nodeName === "input" || nodeName === "textarea" ) {
+ dest.defaultValue = src.defaultValue;
+
+ // IE blanks contents when cloning scripts
+ } else if ( nodeName === "script" && dest.text !== src.text ) {
+ dest.text = src.text;
+ }
+
+ // Event data gets referenced instead of copied if the expando
+ // gets copied too
+ dest.removeAttribute( jQuery.expando );
+}
+
+jQuery.buildFragment = function( args, context, scripts ) {
+ var fragment, cacheable, cachehit,
+ first = args[ 0 ];
+
+ // Set context from what may come in as undefined or a jQuery collection or a node
+ // Updated to fix #12266 where accessing context[0] could throw an exception in IE9/10 &
+ // also doubles as fix for #8950 where plain objects caused createDocumentFragment exception
+ context = context || document;
+ context = !context.nodeType && context[0] || context;
+ context = context.ownerDocument || context;
+
+ // Only cache "small" (1/2 KB) HTML strings that are associated with the main document
+ // Cloning options loses the selected state, so don't cache them
+ // IE 6 doesn't like it when you put or elements in a fragment
+ // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
+ // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501
+ if ( args.length === 1 && typeof first === "string" && first.length < 512 && context === document &&
+ first.charAt(0) === "<" && !rnocache.test( first ) &&
+ (jQuery.support.checkClone || !rchecked.test( first )) &&
+ (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
+
+ // Mark cacheable and look for a hit
+ cacheable = true;
+ fragment = jQuery.fragments[ first ];
+ cachehit = fragment !== undefined;
+ }
+
+ if ( !fragment ) {
+ fragment = context.createDocumentFragment();
+ jQuery.clean( args, context, fragment, scripts );
+
+ // Update the cache, but only store false
+ // unless this is a second parsing of the same content
+ if ( cacheable ) {
+ jQuery.fragments[ first ] = cachehit && fragment;
+ }
+ }
+
+ return { fragment: fragment, cacheable: cacheable };
+};
+
+jQuery.fragments = {};
+
+jQuery.each({
+ appendTo: "append",
+ prependTo: "prepend",
+ insertBefore: "before",
+ insertAfter: "after",
+ replaceAll: "replaceWith"
+}, function( name, original ) {
+ jQuery.fn[ name ] = function( selector ) {
+ var elems,
+ i = 0,
+ ret = [],
+ insert = jQuery( selector ),
+ l = insert.length,
+ parent = this.length === 1 && this[0].parentNode;
+
+ if ( (parent == null || parent && parent.nodeType === 11 && parent.childNodes.length === 1) && l === 1 ) {
+ insert[ original ]( this[0] );
+ return this;
+ } else {
+ for ( ; i < l; i++ ) {
+ elems = ( i > 0 ? this.clone(true) : this ).get();
+ jQuery( insert[i] )[ original ]( elems );
+ ret = ret.concat( elems );
+ }
+
+ return this.pushStack( ret, name, insert.selector );
+ }
+ };
+});
+
+function getAll( elem ) {
+ if ( typeof elem.getElementsByTagName !== "undefined" ) {
+ return elem.getElementsByTagName( "*" );
+
+ } else if ( typeof elem.querySelectorAll !== "undefined" ) {
+ return elem.querySelectorAll( "*" );
+
+ } else {
+ return [];
+ }
+}
+
+// Used in clean, fixes the defaultChecked property
+function fixDefaultChecked( elem ) {
+ if ( rcheckableType.test( elem.type ) ) {
+ elem.defaultChecked = elem.checked;
+ }
+}
+
+jQuery.extend({
+ clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+ var srcElements,
+ destElements,
+ i,
+ clone;
+
+ if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
+ clone = elem.cloneNode( true );
+
+ // IE<=8 does not properly clone detached, unknown element nodes
+ } else {
+ fragmentDiv.innerHTML = elem.outerHTML;
+ fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
+ }
+
+ if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
+ (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
+ // IE copies events bound via attachEvent when using cloneNode.
+ // Calling detachEvent on the clone will also remove the events
+ // from the original. In order to get around this, we use some
+ // proprietary methods to clear the events. Thanks to MooTools
+ // guys for this hotness.
+
+ cloneFixAttributes( elem, clone );
+
+ // Using Sizzle here is crazy slow, so we use getElementsByTagName instead
+ srcElements = getAll( elem );
+ destElements = getAll( clone );
+
+ // Weird iteration because IE will replace the length property
+ // with an element if you are cloning the body and one of the
+ // elements on the page has a name or id of "length"
+ for ( i = 0; srcElements[i]; ++i ) {
+ // Ensure that the destination node is not null; Fixes #9587
+ if ( destElements[i] ) {
+ cloneFixAttributes( srcElements[i], destElements[i] );
+ }
+ }
+ }
+
+ // Copy the events from the original to the clone
+ if ( dataAndEvents ) {
+ cloneCopyEvent( elem, clone );
+
+ if ( deepDataAndEvents ) {
+ srcElements = getAll( elem );
+ destElements = getAll( clone );
+
+ for ( i = 0; srcElements[i]; ++i ) {
+ cloneCopyEvent( srcElements[i], destElements[i] );
+ }
+ }
+ }
+
+ srcElements = destElements = null;
+
+ // Return the cloned set
+ return clone;
+ },
+
+ clean: function( elems, context, fragment, scripts ) {
+ var i, j, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags,
+ safe = context === document && safeFragment,
+ ret = [];
+
+ // Ensure that context is a document
+ if ( !context || typeof context.createDocumentFragment === "undefined" ) {
+ context = document;
+ }
+
+ // Use the already-created safe fragment if context permits
+ for ( i = 0; (elem = elems[i]) != null; i++ ) {
+ if ( typeof elem === "number" ) {
+ elem += "";
+ }
+
+ if ( !elem ) {
+ continue;
+ }
+
+ // Convert html string into DOM nodes
+ if ( typeof elem === "string" ) {
+ if ( !rhtml.test( elem ) ) {
+ elem = context.createTextNode( elem );
+ } else {
+ // Ensure a safe container in which to render the html
+ safe = safe || createSafeFragment( context );
+ div = context.createElement("div");
+ safe.appendChild( div );
+
+ // Fix "XHTML"-style tags in all browsers
+ elem = elem.replace(rxhtmlTag, "<$1>$2>");
+
+ // Go to html and back, then peel off extra wrappers
+ tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase();
+ wrap = wrapMap[ tag ] || wrapMap._default;
+ depth = wrap[0];
+ div.innerHTML = wrap[1] + elem + wrap[2];
+
+ // Move to the right depth
+ while ( depth-- ) {
+ div = div.lastChild;
+ }
+
+ // Remove IE's autoinserted from table fragments
+ if ( !jQuery.support.tbody ) {
+
+ // String was a , *may* have spurious
+ hasBody = rtbody.test(elem);
+ tbody = tag === "table" && !hasBody ?
+ div.firstChild && div.firstChild.childNodes :
+
+ // String was a bare or
+ wrap[1] === "" && !hasBody ?
+ div.childNodes :
+ [];
+
+ for ( j = tbody.length - 1; j >= 0 ; --j ) {
+ if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
+ tbody[ j ].parentNode.removeChild( tbody[ j ] );
+ }
+ }
+ }
+
+ // IE completely kills leading whitespace when innerHTML is used
+ if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
+ div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
+ }
+
+ elem = div.childNodes;
+
+ // Take out of fragment container (we need a fresh div each time)
+ div.parentNode.removeChild( div );
+ }
+ }
+
+ if ( elem.nodeType ) {
+ ret.push( elem );
+ } else {
+ jQuery.merge( ret, elem );
+ }
+ }
+
+ // Fix #11356: Clear elements from safeFragment
+ if ( div ) {
+ elem = div = safe = null;
+ }
+
+ // Reset defaultChecked for any radios and checkboxes
+ // about to be appended to the DOM in IE 6/7 (#8060)
+ if ( !jQuery.support.appendChecked ) {
+ for ( i = 0; (elem = ret[i]) != null; i++ ) {
+ if ( jQuery.nodeName( elem, "input" ) ) {
+ fixDefaultChecked( elem );
+ } else if ( typeof elem.getElementsByTagName !== "undefined" ) {
+ jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
+ }
+ }
+ }
+
+ // Append elements to a provided document fragment
+ if ( fragment ) {
+ // Special handling of each script element
+ handleScript = function( elem ) {
+ // Check if we consider it executable
+ if ( !elem.type || rscriptType.test( elem.type ) ) {
+ // Detach the script and store it in the scripts array (if provided) or the fragment
+ // Return truthy to indicate that it has been handled
+ return scripts ?
+ scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) :
+ fragment.appendChild( elem );
+ }
+ };
+
+ for ( i = 0; (elem = ret[i]) != null; i++ ) {
+ // Check if we're done after handling an executable script
+ if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) {
+ // Append to fragment and handle embedded scripts
+ fragment.appendChild( elem );
+ if ( typeof elem.getElementsByTagName !== "undefined" ) {
+ // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration
+ jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript );
+
+ // Splice the scripts into ret after their former ancestor and advance our index beyond them
+ ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
+ i += jsTags.length;
+ }
+ }
+ }
+ }
+
+ return ret;
+ },
+
+ cleanData: function( elems, /* internal */ acceptData ) {
+ var data, id, elem, type,
+ i = 0,
+ internalKey = jQuery.expando,
+ cache = jQuery.cache,
+ deleteExpando = jQuery.support.deleteExpando,
+ special = jQuery.event.special;
+
+ for ( ; (elem = elems[i]) != null; i++ ) {
+
+ if ( acceptData || jQuery.acceptData( elem ) ) {
+
+ id = elem[ internalKey ];
+ data = id && cache[ id ];
+
+ if ( data ) {
+ if ( data.events ) {
+ for ( type in data.events ) {
+ if ( special[ type ] ) {
+ jQuery.event.remove( elem, type );
+
+ // This is a shortcut to avoid jQuery.event.remove's overhead
+ } else {
+ jQuery.removeEvent( elem, type, data.handle );
+ }
+ }
+ }
+
+ // Remove cache only if it was not already removed by jQuery.event.remove
+ if ( cache[ id ] ) {
+
+ delete cache[ id ];
+
+ // IE does not allow us to delete expando properties from nodes,
+ // nor does it have a removeAttribute function on Document nodes;
+ // we must handle all of these cases
+ if ( deleteExpando ) {
+ delete elem[ internalKey ];
+
+ } else if ( elem.removeAttribute ) {
+ elem.removeAttribute( internalKey );
+
+ } else {
+ elem[ internalKey ] = null;
+ }
+
+ jQuery.deletedIds.push( id );
+ }
+ }
+ }
+ }
+ }
+});
+// Limit scope pollution from any deprecated API
+(function() {
+
+var matched, browser;
+
+// Use of jQuery.browser is frowned upon.
+// More details: http://api.jquery.com/jQuery.browser
+// jQuery.uaMatch maintained for back-compat
+jQuery.uaMatch = function( ua ) {
+ ua = ua.toLowerCase();
+
+ var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
+ /(webkit)[ \/]([\w.]+)/.exec( ua ) ||
+ /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
+ /(msie) ([\w.]+)/.exec( ua ) ||
+ ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
+ [];
+
+ return {
+ browser: match[ 1 ] || "",
+ version: match[ 2 ] || "0"
+ };
+};
+
+matched = jQuery.uaMatch( navigator.userAgent );
+browser = {};
+
+if ( matched.browser ) {
+ browser[ matched.browser ] = true;
+ browser.version = matched.version;
+}
+
+// Chrome is Webkit, but Webkit is also Safari.
+if ( browser.chrome ) {
+ browser.webkit = true;
+} else if ( browser.webkit ) {
+ browser.safari = true;
+}
+
+jQuery.browser = browser;
+
+jQuery.sub = function() {
+ function jQuerySub( selector, context ) {
+ return new jQuerySub.fn.init( selector, context );
+ }
+ jQuery.extend( true, jQuerySub, this );
+ jQuerySub.superclass = this;
+ jQuerySub.fn = jQuerySub.prototype = this();
+ jQuerySub.fn.constructor = jQuerySub;
+ jQuerySub.sub = this.sub;
+ jQuerySub.fn.init = function init( selector, context ) {
+ if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
+ context = jQuerySub( context );
+ }
+
+ return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
+ };
+ jQuerySub.fn.init.prototype = jQuerySub.fn;
+ var rootjQuerySub = jQuerySub(document);
+ return jQuerySub;
+};
+
+})();
+var curCSS, iframe, iframeDoc,
+ ralpha = /alpha\([^)]*\)/i,
+ ropacity = /opacity=([^)]*)/,
+ rposition = /^(top|right|bottom|left)$/,
+ // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
+ // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
+ rdisplayswap = /^(none|table(?!-c[ea]).+)/,
+ rmargin = /^margin/,
+ rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
+ rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
+ rrelNum = new RegExp( "^([-+])=(" + core_pnum + ")", "i" ),
+ elemdisplay = { BODY: "block" },
+
+ cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+ cssNormalTransform = {
+ letterSpacing: 0,
+ fontWeight: 400
+ },
+
+ cssExpand = [ "Top", "Right", "Bottom", "Left" ],
+ cssPrefixes = [ "Webkit", "O", "Moz", "ms" ],
+
+ eventsToggle = jQuery.fn.toggle;
+
+// return a css property mapped to a potentially vendor prefixed property
+function vendorPropName( style, name ) {
+
+ // shortcut for names that are not vendor prefixed
+ if ( name in style ) {
+ return name;
+ }
+
+ // check for vendor prefixed names
+ var capName = name.charAt(0).toUpperCase() + name.slice(1),
+ origName = name,
+ i = cssPrefixes.length;
+
+ while ( i-- ) {
+ name = cssPrefixes[ i ] + capName;
+ if ( name in style ) {
+ return name;
+ }
+ }
+
+ return origName;
+}
+
+function isHidden( elem, el ) {
+ elem = el || elem;
+ return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
+}
+
+function showHide( elements, show ) {
+ var elem, display,
+ values = [],
+ index = 0,
+ length = elements.length;
+
+ for ( ; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+ values[ index ] = jQuery._data( elem, "olddisplay" );
+ if ( show ) {
+ // Reset the inline display of this element to learn if it is
+ // being hidden by cascaded rules or not
+ if ( !values[ index ] && elem.style.display === "none" ) {
+ elem.style.display = "";
+ }
+
+ // Set elements which have been overridden with display: none
+ // in a stylesheet to whatever the default browser style is
+ // for such an element
+ if ( elem.style.display === "" && isHidden( elem ) ) {
+ values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );
+ }
+ } else {
+ display = curCSS( elem, "display" );
+
+ if ( !values[ index ] && display !== "none" ) {
+ jQuery._data( elem, "olddisplay", display );
+ }
+ }
+ }
+
+ // Set the display of most of the elements in a second loop
+ // to avoid the constant reflow
+ for ( index = 0; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+ if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
+ elem.style.display = show ? values[ index ] || "" : "none";
+ }
+ }
+
+ return elements;
+}
+
+jQuery.fn.extend({
+ css: function( name, value ) {
+ return jQuery.access( this, function( elem, name, value ) {
+ return value !== undefined ?
+ jQuery.style( elem, name, value ) :
+ jQuery.css( elem, name );
+ }, name, value, arguments.length > 1 );
+ },
+ show: function() {
+ return showHide( this, true );
+ },
+ hide: function() {
+ return showHide( this );
+ },
+ toggle: function( state, fn2 ) {
+ var bool = typeof state === "boolean";
+
+ if ( jQuery.isFunction( state ) && jQuery.isFunction( fn2 ) ) {
+ return eventsToggle.apply( this, arguments );
+ }
+
+ return this.each(function() {
+ if ( bool ? state : isHidden( this ) ) {
+ jQuery( this ).show();
+ } else {
+ jQuery( this ).hide();
+ }
+ });
+ }
+});
+
+jQuery.extend({
+ // Add in style property hooks for overriding the default
+ // behavior of getting and setting a style property
+ cssHooks: {
+ opacity: {
+ get: function( elem, computed ) {
+ if ( computed ) {
+ // We should always get a number back from opacity
+ var ret = curCSS( elem, "opacity" );
+ return ret === "" ? "1" : ret;
+
+ }
+ }
+ }
+ },
+
+ // Exclude the following css properties to add px
+ cssNumber: {
+ "fillOpacity": true,
+ "fontWeight": true,
+ "lineHeight": true,
+ "opacity": true,
+ "orphans": true,
+ "widows": true,
+ "zIndex": true,
+ "zoom": true
+ },
+
+ // Add in properties whose names you wish to fix before
+ // setting or getting the value
+ cssProps: {
+ // normalize float css property
+ "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
+ },
+
+ // Get and set the style property on a DOM Node
+ style: function( elem, name, value, extra ) {
+ // Don't set styles on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+ return;
+ }
+
+ // Make sure that we're working with the right name
+ var ret, type, hooks,
+ origName = jQuery.camelCase( name ),
+ style = elem.style;
+
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
+
+ // gets hook for the prefixed version
+ // followed by the unprefixed version
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // Check if we're setting a value
+ if ( value !== undefined ) {
+ type = typeof value;
+
+ // convert relative number strings (+= or -=) to relative numbers. #7345
+ if ( type === "string" && (ret = rrelNum.exec( value )) ) {
+ value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
+ // Fixes bug #9237
+ type = "number";
+ }
+
+ // Make sure that NaN and null values aren't set. See: #7116
+ if ( value == null || type === "number" && isNaN( value ) ) {
+ return;
+ }
+
+ // If a number was passed in, add 'px' to the (except for certain CSS properties)
+ if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
+ value += "px";
+ }
+
+ // If a hook was provided, use that value, otherwise just set the specified value
+ if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
+ // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
+ // Fixes bug #5509
+ try {
+ style[ name ] = value;
+ } catch(e) {}
+ }
+
+ } else {
+ // If a hook was provided get the non-computed value from there
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+ return ret;
+ }
+
+ // Otherwise just get the value from the style object
+ return style[ name ];
+ }
+ },
+
+ css: function( elem, name, numeric, extra ) {
+ var val, num, hooks,
+ origName = jQuery.camelCase( name );
+
+ // Make sure that we're working with the right name
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
+
+ // gets hook for the prefixed version
+ // followed by the unprefixed version
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // If a hook was provided get the computed value from there
+ if ( hooks && "get" in hooks ) {
+ val = hooks.get( elem, true, extra );
+ }
+
+ // Otherwise, if a way to get the computed value exists, use that
+ if ( val === undefined ) {
+ val = curCSS( elem, name );
+ }
+
+ //convert "normal" to computed value
+ if ( val === "normal" && name in cssNormalTransform ) {
+ val = cssNormalTransform[ name ];
+ }
+
+ // Return, converting to number if forced or a qualifier was provided and val looks numeric
+ if ( numeric || extra !== undefined ) {
+ num = parseFloat( val );
+ return numeric || jQuery.isNumeric( num ) ? num || 0 : val;
+ }
+ return val;
+ },
+
+ // A method for quickly swapping in/out CSS properties to get correct calculations
+ swap: function( elem, options, callback ) {
+ var ret, name,
+ old = {};
+
+ // Remember the old values, and insert the new ones
+ for ( name in options ) {
+ old[ name ] = elem.style[ name ];
+ elem.style[ name ] = options[ name ];
+ }
+
+ ret = callback.call( elem );
+
+ // Revert the old values
+ for ( name in options ) {
+ elem.style[ name ] = old[ name ];
+ }
+
+ return ret;
+ }
+});
+
+// NOTE: To any future maintainer, we've window.getComputedStyle
+// because jsdom on node.js will break without it.
+if ( window.getComputedStyle ) {
+ curCSS = function( elem, name ) {
+ var ret, width, minWidth, maxWidth,
+ computed = window.getComputedStyle( elem, null ),
+ style = elem.style;
+
+ if ( computed ) {
+
+ // getPropertyValue is only needed for .css('filter') in IE9, see #12537
+ ret = computed.getPropertyValue( name ) || computed[ name ];
+
+ if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
+ ret = jQuery.style( elem, name );
+ }
+
+ // A tribute to the "awesome hack by Dean Edwards"
+ // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
+ // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
+ // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
+ if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
+ width = style.width;
+ minWidth = style.minWidth;
+ maxWidth = style.maxWidth;
+
+ style.minWidth = style.maxWidth = style.width = ret;
+ ret = computed.width;
+
+ style.width = width;
+ style.minWidth = minWidth;
+ style.maxWidth = maxWidth;
+ }
+ }
+
+ return ret;
+ };
+} else if ( document.documentElement.currentStyle ) {
+ curCSS = function( elem, name ) {
+ var left, rsLeft,
+ ret = elem.currentStyle && elem.currentStyle[ name ],
+ style = elem.style;
+
+ // Avoid setting ret to empty string here
+ // so we don't default to auto
+ if ( ret == null && style && style[ name ] ) {
+ ret = style[ name ];
+ }
+
+ // From the awesome hack by Dean Edwards
+ // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+
+ // If we're not dealing with a regular pixel number
+ // but a number that has a weird ending, we need to convert it to pixels
+ // but not position css attributes, as those are proportional to the parent element instead
+ // and we can't measure the parent instead because it might trigger a "stacking dolls" problem
+ if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
+
+ // Remember the original values
+ left = style.left;
+ rsLeft = elem.runtimeStyle && elem.runtimeStyle.left;
+
+ // Put in the new values to get a computed value out
+ if ( rsLeft ) {
+ elem.runtimeStyle.left = elem.currentStyle.left;
+ }
+ style.left = name === "fontSize" ? "1em" : ret;
+ ret = style.pixelLeft + "px";
+
+ // Revert the changed values
+ style.left = left;
+ if ( rsLeft ) {
+ elem.runtimeStyle.left = rsLeft;
+ }
+ }
+
+ return ret === "" ? "auto" : ret;
+ };
+}
+
+function setPositiveNumber( elem, value, subtract ) {
+ var matches = rnumsplit.exec( value );
+ return matches ?
+ Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
+ value;
+}
+
+function augmentWidthOrHeight( elem, name, extra, isBorderBox ) {
+ var i = extra === ( isBorderBox ? "border" : "content" ) ?
+ // If we already have the right measurement, avoid augmentation
+ 4 :
+ // Otherwise initialize for horizontal or vertical properties
+ name === "width" ? 1 : 0,
+
+ val = 0;
+
+ for ( ; i < 4; i += 2 ) {
+ // both box models exclude margin, so add it if we want it
+ if ( extra === "margin" ) {
+ // we use jQuery.css instead of curCSS here
+ // because of the reliableMarginRight CSS hook!
+ val += jQuery.css( elem, extra + cssExpand[ i ], true );
+ }
+
+ // From this point on we use curCSS for maximum performance (relevant in animations)
+ if ( isBorderBox ) {
+ // border-box includes padding, so remove it if we want content
+ if ( extra === "content" ) {
+ val -= parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0;
+ }
+
+ // at this point, extra isn't border nor margin, so remove border
+ if ( extra !== "margin" ) {
+ val -= parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;
+ }
+ } else {
+ // at this point, extra isn't content, so add padding
+ val += parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0;
+
+ // at this point, extra isn't content nor padding, so add border
+ if ( extra !== "padding" ) {
+ val += parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;
+ }
+ }
+ }
+
+ return val;
+}
+
+function getWidthOrHeight( elem, name, extra ) {
+
+ // Start with offset property, which is equivalent to the border-box value
+ var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+ valueIsBorderBox = true,
+ isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box";
+
+ // some non-html elements return undefined for offsetWidth, so check for null/undefined
+ // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
+ // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
+ if ( val <= 0 || val == null ) {
+ // Fall back to computed then uncomputed css if necessary
+ val = curCSS( elem, name );
+ if ( val < 0 || val == null ) {
+ val = elem.style[ name ];
+ }
+
+ // Computed unit is not pixels. Stop here and return.
+ if ( rnumnonpx.test(val) ) {
+ return val;
+ }
+
+ // we need the check for style in case a browser which returns unreliable values
+ // for getComputedStyle silently falls back to the reliable elem.style
+ valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );
+
+ // Normalize "", auto, and prepare for extra
+ val = parseFloat( val ) || 0;
+ }
+
+ // use the active box-sizing model to add/subtract irrelevant styles
+ return ( val +
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra || ( isBorderBox ? "border" : "content" ),
+ valueIsBorderBox
+ )
+ ) + "px";
+}
+
+
+// Try to determine the default display value of an element
+function css_defaultDisplay( nodeName ) {
+ if ( elemdisplay[ nodeName ] ) {
+ return elemdisplay[ nodeName ];
+ }
+
+ var elem = jQuery( "<" + nodeName + ">" ).appendTo( document.body ),
+ display = elem.css("display");
+ elem.remove();
+
+ // If the simple way fails,
+ // get element's real default display by attaching it to a temp iframe
+ if ( display === "none" || display === "" ) {
+ // Use the already-created iframe if possible
+ iframe = document.body.appendChild(
+ iframe || jQuery.extend( document.createElement("iframe"), {
+ frameBorder: 0,
+ width: 0,
+ height: 0
+ })
+ );
+
+ // Create a cacheable copy of the iframe document on first call.
+ // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
+ // document to it; WebKit & Firefox won't allow reusing the iframe document.
+ if ( !iframeDoc || !iframe.createElement ) {
+ iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
+ iframeDoc.write("");
+ iframeDoc.close();
+ }
+
+ elem = iframeDoc.body.appendChild( iframeDoc.createElement(nodeName) );
+
+ display = curCSS( elem, "display" );
+ document.body.removeChild( iframe );
+ }
+
+ // Store the correct default display
+ elemdisplay[ nodeName ] = display;
+
+ return display;
+}
+
+jQuery.each([ "height", "width" ], function( i, name ) {
+ jQuery.cssHooks[ name ] = {
+ get: function( elem, computed, extra ) {
+ if ( computed ) {
+ // certain elements can have dimension info if we invisibly show them
+ // however, it must have a current display style that would benefit from this
+ if ( elem.offsetWidth === 0 && rdisplayswap.test( curCSS( elem, "display" ) ) ) {
+ return jQuery.swap( elem, cssShow, function() {
+ return getWidthOrHeight( elem, name, extra );
+ });
+ } else {
+ return getWidthOrHeight( elem, name, extra );
+ }
+ }
+ },
+
+ set: function( elem, value, extra ) {
+ return setPositiveNumber( elem, value, extra ?
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra,
+ jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box"
+ ) : 0
+ );
+ }
+ };
+});
+
+if ( !jQuery.support.opacity ) {
+ jQuery.cssHooks.opacity = {
+ get: function( elem, computed ) {
+ // IE uses filters for opacity
+ return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
+ ( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
+ computed ? "1" : "";
+ },
+
+ set: function( elem, value ) {
+ var style = elem.style,
+ currentStyle = elem.currentStyle,
+ opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
+ filter = currentStyle && currentStyle.filter || style.filter || "";
+
+ // IE has trouble with opacity if it does not have layout
+ // Force it by setting the zoom level
+ style.zoom = 1;
+
+ // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
+ if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
+ style.removeAttribute ) {
+
+ // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
+ // if "filter:" is present at all, clearType is disabled, we want to avoid this
+ // style.removeAttribute is IE Only, but so apparently is this code path...
+ style.removeAttribute( "filter" );
+
+ // if there there is no filter style applied in a css rule, we are done
+ if ( currentStyle && !currentStyle.filter ) {
+ return;
+ }
+ }
+
+ // otherwise, set new filter values
+ style.filter = ralpha.test( filter ) ?
+ filter.replace( ralpha, opacity ) :
+ filter + " " + opacity;
+ }
+ };
+}
+
+// These hooks cannot be added until DOM ready because the support test
+// for it is not run until after DOM ready
+jQuery(function() {
+ if ( !jQuery.support.reliableMarginRight ) {
+ jQuery.cssHooks.marginRight = {
+ get: function( elem, computed ) {
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ // Work around by temporarily setting element display to inline-block
+ return jQuery.swap( elem, { "display": "inline-block" }, function() {
+ if ( computed ) {
+ return curCSS( elem, "marginRight" );
+ }
+ });
+ }
+ };
+ }
+
+ // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
+ // getComputedStyle returns percent when specified for top/left/bottom/right
+ // rather than make the css module depend on the offset module, we just check for it here
+ if ( !jQuery.support.pixelPosition && jQuery.fn.position ) {
+ jQuery.each( [ "top", "left" ], function( i, prop ) {
+ jQuery.cssHooks[ prop ] = {
+ get: function( elem, computed ) {
+ if ( computed ) {
+ var ret = curCSS( elem, prop );
+ // if curCSS returns percentage, fallback to offset
+ return rnumnonpx.test( ret ) ? jQuery( elem ).position()[ prop ] + "px" : ret;
+ }
+ }
+ };
+ });
+ }
+
+});
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+ jQuery.expr.filters.hidden = function( elem ) {
+ return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || curCSS( elem, "display" )) === "none");
+ };
+
+ jQuery.expr.filters.visible = function( elem ) {
+ return !jQuery.expr.filters.hidden( elem );
+ };
+}
+
+// These hooks are used by animate to expand properties
+jQuery.each({
+ margin: "",
+ padding: "",
+ border: "Width"
+}, function( prefix, suffix ) {
+ jQuery.cssHooks[ prefix + suffix ] = {
+ expand: function( value ) {
+ var i,
+
+ // assumes a single number if not a string
+ parts = typeof value === "string" ? value.split(" ") : [ value ],
+ expanded = {};
+
+ for ( i = 0; i < 4; i++ ) {
+ expanded[ prefix + cssExpand[ i ] + suffix ] =
+ parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
+ }
+
+ return expanded;
+ }
+ };
+
+ if ( !rmargin.test( prefix ) ) {
+ jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
+ }
+});
+var r20 = /%20/g,
+ rbracket = /\[\]$/,
+ rCRLF = /\r?\n/g,
+ rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
+ rselectTextarea = /^(?:select|textarea)/i;
+
+jQuery.fn.extend({
+ serialize: function() {
+ return jQuery.param( this.serializeArray() );
+ },
+ serializeArray: function() {
+ return this.map(function(){
+ return this.elements ? jQuery.makeArray( this.elements ) : this;
+ })
+ .filter(function(){
+ return this.name && !this.disabled &&
+ ( this.checked || rselectTextarea.test( this.nodeName ) ||
+ rinput.test( this.type ) );
+ })
+ .map(function( i, elem ){
+ var val = jQuery( this ).val();
+
+ return val == null ?
+ null :
+ jQuery.isArray( val ) ?
+ jQuery.map( val, function( val, i ){
+ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }) :
+ { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }).get();
+ }
+});
+
+//Serialize an array of form elements or a set of
+//key/values into a query string
+jQuery.param = function( a, traditional ) {
+ var prefix,
+ s = [],
+ add = function( key, value ) {
+ // If value is a function, invoke it and return its value
+ value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
+ s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
+ };
+
+ // Set traditional to true for jQuery <= 1.3.2 behavior.
+ if ( traditional === undefined ) {
+ traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
+ }
+
+ // If an array was passed in, assume that it is an array of form elements.
+ if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+ // Serialize the form elements
+ jQuery.each( a, function() {
+ add( this.name, this.value );
+ });
+
+ } else {
+ // If traditional, encode the "old" way (the way 1.3.2 or older
+ // did it), otherwise encode params recursively.
+ for ( prefix in a ) {
+ buildParams( prefix, a[ prefix ], traditional, add );
+ }
+ }
+
+ // Return the resulting serialization
+ return s.join( "&" ).replace( r20, "+" );
+};
+
+function buildParams( prefix, obj, traditional, add ) {
+ var name;
+
+ if ( jQuery.isArray( obj ) ) {
+ // Serialize array item.
+ jQuery.each( obj, function( i, v ) {
+ if ( traditional || rbracket.test( prefix ) ) {
+ // Treat each array item as a scalar.
+ add( prefix, v );
+
+ } else {
+ // If array item is non-scalar (array or object), encode its
+ // numeric index to resolve deserialization ambiguity issues.
+ // Note that rack (as of 1.0.0) can't currently deserialize
+ // nested arrays properly, and attempting to do so may cause
+ // a server error. Possible fixes are to modify rack's
+ // deserialization algorithm or to provide an option or flag
+ // to force array serialization to be shallow.
+ buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
+ }
+ });
+
+ } else if ( !traditional && jQuery.type( obj ) === "object" ) {
+ // Serialize object item.
+ for ( name in obj ) {
+ buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+ }
+
+ } else {
+ // Serialize scalar item.
+ add( prefix, obj );
+ }
+}
+var
+ // Document location
+ ajaxLocParts,
+ ajaxLocation,
+
+ rhash = /#.*$/,
+ rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
+ // #7653, #8125, #8152: local protocol detection
+ rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
+ rnoContent = /^(?:GET|HEAD)$/,
+ rprotocol = /^\/\//,
+ rquery = /\?/,
+ rscript = /