From 846a96e76de5ceeb6ccdd760d52f50dd90ada9a5 Mon Sep 17 00:00:00 2001 From: Maxim Atanasov <32562426+maximAtanasov@users.noreply.github.com> Date: Fri, 18 May 2018 11:57:36 +0200 Subject: [PATCH 01/23] Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7b1380b9..03a0cf41 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Wicket 7.x --------- ```html repositories { - maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' } + jcenter() } dependencies { @@ -54,7 +54,7 @@ Wicket 6.x --------- ```html repositories { - maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' } + jcenter() } dependencies { @@ -66,7 +66,7 @@ Wicket 1.5.x --------- ```html repositories { - maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' } + jcenter() } dependencies { @@ -78,7 +78,7 @@ Wicket 1.4.x --------- ```html repositories { - maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' } + jcenter() } dependencies { @@ -90,7 +90,7 @@ JSF 2.1 --------- ```html repositories { - maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' } + jcenter() } dependencies { @@ -103,7 +103,7 @@ 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 repositories { - maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' } + jcenter() } dependencies { From 58fad37cd70de6d2b5ed24a22abd4ed1a4d4c8da Mon Sep 17 00:00:00 2001 From: maximAtanasov Date: Wed, 23 May 2018 09:31:14 +0200 Subject: [PATCH 02/23] Updated README.md with maven dependencies --- README.md | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 83 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 03a0cf41..16a78cf8 100644 --- a/README.md +++ b/README.md @@ -34,13 +34,14 @@ 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 7.x --------- -```html +Gradle: +```groovy repositories { jcenter() } @@ -50,9 +51,20 @@ dependencies { } ``` +Maven: +```xml + + de.adesso.wicked-charts + wicked-charts-wicket7 + 3.0.0 + pom + +``` + Wicket 6.x --------- -```html +Gradle: +```groovy repositories { jcenter() } @@ -62,9 +74,20 @@ dependencies { } ``` +Maven: +```xml + + de.adesso.wicked-charts + wicked-charts-wicket6 + 3.0.0 + pom + +``` + Wicket 1.5.x --------- -```html +Gradle: +```groovy repositories { jcenter() } @@ -74,9 +97,20 @@ dependencies { } ``` +Maven: +```xml + + de.adesso.wicked-charts + wicked-charts-wicket15 + 3.0.0 + pom + +``` + Wicket 1.4.x --------- -```html +Gradle: +```groovy repositories { jcenter() } @@ -86,9 +120,20 @@ dependencies { } ``` +Maven: +```xml + + de.adesso.wicked-charts + wicked-charts-wicket14 + 3.0.0 + pom + +``` + JSF 2.1 --------- -```html +Gradle: +```groovy repositories { jcenter() } @@ -98,10 +143,21 @@ dependencies { } ``` +Maven: +```xml + + de.adesso.wicked-charts + wicked-charts-jsf21 + 3.0.0 + pom + +``` + Java Wrappers ------------ +Gradle: 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 +```groovy repositories { jcenter() } @@ -111,3 +167,22 @@ dependencies { compile 'de.adesso.wicked-charts:highcharts-wrapper:3.0.0' } ``` + +Maven: +```xml + + + de.adesso.wicked-charts + chartjs-wrapper + 3.0.0 + pom + + + + de.adesso.wicked-charts + highcharts-wrapper + 3.0.0 + pom + + +``` From 50b9d4a2c8be3c07569d9c896963f853ef15d5df Mon Sep 17 00:00:00 2001 From: maximAtanasov Date: Wed, 23 May 2018 09:35:01 +0200 Subject: [PATCH 03/23] Fixed the build status indicator in the README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 16a78cf8..7a4e5db8 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,10 @@ 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/thombergs/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. From c46b817bd9c605dfd63da3b923d485f004349f57 Mon Sep 17 00:00:00 2001 From: Maxim Atanasov <32562426+maximAtanasov@users.noreply.github.com> Date: Wed, 23 May 2018 09:39:08 +0200 Subject: [PATCH 04/23] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7a4e5db8..7c53ed9d 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,10 @@ 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/adessoAG/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. From db7578ebfdaae2ccbccf8fe39bdcaf34b6303397 Mon Sep 17 00:00:00 2001 From: Maxim Atanasov <32562426+maximAtanasov@users.noreply.github.com> Date: Wed, 23 May 2018 09:47:57 +0200 Subject: [PATCH 05/23] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7c53ed9d..af8e01f9 100644 --- a/README.md +++ b/README.md @@ -155,8 +155,9 @@ Maven: Java Wrappers ------------ -Gradle: 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: + +Gradle: ```groovy repositories { jcenter() From 98bde57e67543978c2af9687ce5970e4ecc0b0fe Mon Sep 17 00:00:00 2001 From: max Date: Fri, 8 Jun 2018 19:21:07 +0200 Subject: [PATCH 06/23] added Chart.js support for Wicket6+Showcase --- .../chartjs/ChartConfiguration.java | 5 +- .../chartjs/chartoptions/AngleLines.java | 4 +- .../chartjs/chartoptions/Animation.java | 4 +- .../chartjs/chartoptions/AxesScale.java | 4 +- .../chartjs/chartoptions/Callback.java | 4 +- .../chartjs/chartoptions/Data.java | 7 +- .../chartjs/chartoptions/Dataset.java | 10 +- .../chartjs/chartoptions/Element.java | 4 +- .../chartjs/chartoptions/Filler.java | 4 +- .../chartjs/chartoptions/GridLines.java | 9 +- .../chartjs/chartoptions/Hover.java | 4 +- .../chartoptions/JavaScriptReference.java | 4 +- .../chartjs/chartoptions/Legend.java | 4 +- .../chartjs/chartoptions/LegendLabel.java | 4 +- .../chartjs/chartoptions/Line.java | 6 +- .../chartjs/chartoptions/Options.java | 4 +- .../chartjs/chartoptions/Plugins.java | 4 +- .../chartjs/chartoptions/Point.java | 4 +- .../chartjs/chartoptions/PointLabels.java | 4 +- .../chartoptions/SamplesFillerAnalyzer.java | 4 +- .../chartjs/chartoptions/Scale.java | 4 +- .../chartjs/chartoptions/ScaleLabel.java | 4 +- .../chartjs/chartoptions/Scales.java | 10 +- .../chartjs/chartoptions/TickStyle.java | 4 +- .../chartjs/chartoptions/Ticks.java | 4 +- .../chartjs/chartoptions/TimeFormat.java | 4 +- .../chartjs/chartoptions/Title.java | 15 +- .../chartoptions/TooltipCallbacks.java | 4 +- .../chartjs/chartoptions/Tooltips.java | 5 +- .../chartoptions/valueType/ConstValue.java | 6 +- .../chartoptions/valueType/DateTimeValue.java | 6 +- .../chartoptions/valueType/DoubleValue.java | 6 +- .../chartoptions/valueType/FloatValue.java | 6 +- .../chartoptions/valueType/IntegerValue.java | 6 +- .../chartoptions/valueType/StringValue.java | 6 +- .../chartjs/jackson/JsonRenderer.java | 15 +- .../CallbackFunctionSerializer.java | 5 +- .../serializer/ConstLabelSerializer.java | 5 +- .../serializer/ConstValueSerializer.java | 5 +- .../serializer/DateTimeLabelSerializer.java | 7 +- .../serializer/DateTimeValueSerializer.java | 7 +- .../serializer/DoubleValueSerializer.java | 5 +- .../serializer/FillingModeSerializer.java | 5 +- .../serializer/FloatValueSerializer.java | 5 +- .../serializer/HexColorSerializer.java | 7 +- .../serializer/IntegerValueSerializer.java | 5 +- .../JavaScriptReferenceSerializer.java | 5 +- .../serializer/JsonValueEnumSerializer.java | 5 +- .../serializer/LowercaseEnumSerializer.java | 7 +- .../serializer/RgbColorSerializer.java | 7 +- .../serializer/RgbaColorSerializer.java | 7 +- .../serializer/SimpleColorSerializer.java | 5 +- .../SingleElementListSerializer.java | 7 +- .../StringValueColorSerializer.java | 5 +- .../serializer/StringValueSerializer.java | 5 +- .../serializer/TextLabelSerializer.java | 5 +- .../serializer/TextListLabelSerializer.java | 5 +- .../chartjs/ChartConfigurationTest.java | 2 - .../chartjs/chartoptions/DataTest.java | 12 +- .../chartjs/chartoptions/DatasetTest.java | 16 +- .../chartjs/chartoptions/GridLinesTest.java | 11 +- .../CallbackFunctionSerializerTest.java | 7 +- .../serializer/ConstValueSerializerTest.java | 10 +- .../serializer/DatasetSerializerTest.java | 7 +- .../DateTimeValueSerializerTest.java | 11 +- .../serializer/DoubleValueSerializerTest.java | 14 +- .../serializer/FillingModeSerializerTest.java | 11 +- .../serializer/FloatValueSerializerTest.java | 14 +- .../IntegerValueSerializerTest.java | 8 +- .../JsonValueEnumSerializerTest.java | 9 +- .../serializer/LabelSerializerTest.java | 16 +- .../LowercaseEnumSerializerTest.java | 9 +- .../serializer/RgbColorSerializerTest.java | 7 +- .../serializer/RgbaColorSerializerTest.java | 7 +- .../serializer/SimpleColorSerializerTest.java | 7 +- .../SingleElementListSerializerTest.java | 15 +- .../StringValueColorSerializerTest.java | 11 +- .../serializer/StringValueSerializerTest.java | 16 +- .../jackson/BoxSeriesSerializer.java | 1 - .../highcharts/jackson/BubbleSerializer.java | 5 +- .../highcharts/jackson/CenterSerializer.java | 5 +- .../jackson/ColorReferenceSerializer.java | 2 +- .../jackson/CoordinateSerializer.java | 1 - .../jackson/CrosshairSerializer.java | 5 +- .../jackson/CssStyleSerializer.java | 7 +- .../DateTimeLabelFormatSerializer.java | 7 +- .../jackson/FunctionSerializer.java | 5 +- .../jackson/HexColorReferenceSerializer.java | 5 +- .../HighchartsColorReferenceSerializer.java | 7 +- .../highcharts/jackson/JsonRenderer.java | 5 +- .../jackson/JsonValueEnumSerializer.java | 5 +- .../jackson/LowercaseEnumSerializer.java | 7 +- .../jackson/MinorTickIntervalSerializer.java | 5 +- .../highcharts/jackson/NoopSerializer.java | 4 +- .../jackson/NullColorReferenceSerializer.java | 5 +- .../jackson/NullableSerializer.java | 5 +- .../jackson/PixelOrPercentSerializer.java | 5 +- .../jackson/RangeCoordinateSerializer.java | 5 +- .../jackson/RgbaColorReferenceSerializer.java | 7 +- .../SimpleColorReferenceSerializer.java | 5 +- .../highcharts/jackson/SymbolSerializer.java | 5 +- .../ThreeDimensionalCoordinateSerializer.java | 1 - .../wickedcharts/highcharts/options/Axis.java | 8 +- .../highcharts/options/Background.java | 4 +- .../highcharts/options/ButtonOptions.java | 6 +- .../highcharts/options/ChartOptions.java | 8 +- .../highcharts/options/Crosshair.java | 4 +- .../highcharts/options/DataLabels.java | 6 +- .../highcharts/options/Global.java | 4 +- .../highcharts/options/LanguageOptions.java | 6 +- .../highcharts/options/Legend.java | 6 +- .../highcharts/options/LegendNavigation.java | 4 +- .../highcharts/options/Marker.java | 6 +- .../highcharts/options/Options.java | 1 - .../highcharts/options/PlotBand.java | 7 +- .../highcharts/options/PlotLine.java | 7 +- .../highcharts/options/PlotOptions.java | 6 +- .../highcharts/options/PlotOptionsState.java | 6 +- .../highcharts/options/Tooltip.java | 4 +- .../options/button/ButtonTheme.java | 4 +- .../highcharts/options/button/Position.java | 4 +- .../options/color/ColorReference.java | 5 +- .../options/color/RadialGradient.java | 4 +- .../highcharts/options/color/SimpleColor.java | 2 +- .../options/drilldown/DrilldownPoint.java | 1 - .../interaction/SelectionFunction.java | 6 +- .../options/livedata/LiveDataSeries.java | 7 +- .../FeatureCheckingOptionsProcessor.java | 4 +- .../processing/OptionsProcessorContext.java | 8 +- .../highcharts/options/series/Point.java | 7 +- .../highcharts/options/theme/Theme.java | 4 +- .../highcharts/options/theme/ThemeState.java | 4 +- .../highcharts/theme/DarkBlueTheme.java | 18 +- .../highcharts/theme/GrayTheme.java | 18 +- .../highcharts/theme/GridTheme.java | 8 +- .../highcharts/theme/SkiesTheme.java | 7 +- .../jackson/AbstractSerializerTest.java | 4 +- .../jackson/BackgroundSerializerTest.java | 4 +- .../jackson/CenterSerializerTest.java | 4 +- .../jackson/CoordinateSerializerTest.java | 2 - .../jackson/CrosshairSerializerTest.java | 6 +- .../jackson/CssStyleSerializerTest.java | 5 +- .../jackson/CustomCoordinatesSeriesTest.java | 4 +- .../jackson/DateTimeLabelFormatTest.java | 6 +- .../jackson/FunctionSerializerTest.java | 4 +- .../HexColorReferenceSerializerTest.java | 6 +- ...ighchartsColorReferenceSerializerTest.java | 6 +- .../highcharts/jackson/JsonIgnoreTest.java | 8 +- .../jackson/JsonRendererLocaleTest.java | 1 - ...rGradientColorReferenceSerializerTest.java | 11 +- .../jackson/LowercaseEnumSerializerTest.java | 4 +- .../NullColorReferenceSerializerTest.java | 6 +- .../jackson/NullPointSerializerTest.java | 2 - .../jackson/NullSerializerTest.java | 7 +- .../jackson/PixelOrPercentSerializerTest.java | 4 +- .../RangeCoordinateSerializerTest.java | 4 +- .../RgbaColorReferenceSerializerTest.java | 6 +- .../SimpleColorReferenceSerializerTest.java | 8 +- .../jackson/SymbolSerializerTest.java | 6 +- .../ThreeDCoordinateSerializerTest.java | 2 - .../options/BuilderPatternTest.java | 6 +- .../options/CssPropertyNameSanitizerTest.java | 3 - .../de/adesso/wickedcharts/jsf21/UIChart.java | 15 +- .../showcase/jsf/bean/PropertiesLoader.java | 5 +- .../showcase/jsf/bean/Showcase.java | 12 +- .../src/main/webapp/WEB-INF/web.xml | 6 +- .../src/main/webapp/index.xhtml | 5 +- .../showcase/options/AngularGaugeOptions.java | 13 +- .../options/AreaInvertedAxisOptions.java | 18 +- .../showcase/options/AreaMissingOptions.java | 19 +- .../showcase/options/AreaRangeOptions.java | 10 +- .../showcase/options/AreaSplineOptions.java | 21 +- .../AreaWithNegativeValuesOptions.java | 12 +- .../options/BarWithNegativeStackOptions.java | 16 +- .../showcase/options/BasicAreaOptions.java | 4 +- .../showcase/options/BasicBarOptions.java | 18 +- .../showcase/options/BasicColumnOptions.java | 13 +- .../showcase/options/BasicLineOptions.java | 16 +- .../showcase/options/BasicPieOptions.java | 9 +- .../options/BubbleChart3DOptions.java | 7 +- .../options/ClickToAddAPointOptions.java | 16 +- .../showcase/options/ColumnRangeOptions.java | 11 +- .../options/ColumnWithDrilldownOptions.java | 14 +- .../ColumnWithNegativeValuesOptions.java | 7 +- .../ColumnWithRotatedLabelsOptions.java | 12 +- .../showcase/options/ComboOptions.java | 16 +- .../showcase/options/DonutOptions.java | 16 +- .../showcase/options/DualAxesOptions.java | 14 +- .../showcase/options/InteractionOptions.java | 20 +- .../options/LineWithDataLabelsOptions.java | 13 +- .../options/LogarithmicAxisOptions.java | 11 +- .../showcase/options/MultipleAxesOptions.java | 16 +- .../options/PercentageAreaOptions.java | 16 +- .../options/PieWithGradientOptions.java | 9 +- .../options/PieWithLegendOptions.java | 9 +- .../showcase/options/PolarOptions.java | 15 +- .../showcase/options/ScatterPlotOptions.java | 6 +- .../showcase/options/SpiderwebOptions.java | 15 +- .../options/SplineUpdatingOptions.java | 22 +- .../SplineWithInvertedAxisOptions.java | 13 +- .../options/SplineWithPlotBandsOptions.java | 10 +- .../options/SplineWithSymbolsOptions.java | 16 +- .../StackedAndGroupedColumnOptions.java | 17 +- .../showcase/options/StackedAreaOptions.java | 17 +- .../showcase/options/StackedBarOptions.java | 11 +- .../options/StackedColumnOptions.java | 15 +- .../options/StackedPercentageOptions.java | 9 +- ...TimeDataWithIrregularIntervalsOptions.java | 15 +- .../showcase/options/WindroseOptions.java | 19 +- .../options/ZoomableTimeSeriesOptions.java | 14 +- .../showcase/options/OptionsSmokeTest.java | 6 +- .../de/adesso/wickedcharts/showcase/Demo.java | 14 +- .../wickedcharts/showcase/Homepage.java | 48 +- .../showcase/ShowcaseApplication.java | 2 - .../showcase/ShowcaseSession.java | 3 +- .../showcase/StringFromResourceModel.java | 6 +- .../showcase/links/UpdateChartLink.java | 7 +- .../de/adesso/wickedcharts/showcase/Demo.java | 14 +- .../wickedcharts/showcase/Homepage.java | 48 +- .../showcase/ShowcaseApplication.java | 3 +- .../showcase/ShowcaseSession.java | 3 +- .../showcase/StringFromResourceModel.java | 6 +- .../showcase/links/UpdateChartLink.java | 10 +- .../wickedcharts/showcase/ChartComponent.html | 22 + .../wickedcharts/showcase/ChartComponent.java | 26 + .../wickedcharts/showcase/CodeComponent.html | 6 + .../wickedcharts/showcase/CodeComponent.java | 23 + .../de/adesso/wickedcharts/showcase/Demo.java | 14 +- .../wickedcharts/showcase/Homepage.java | 203 -------- .../showcase/HomepageChartJs.html | 291 +++++++++++ .../showcase/HomepageChartJs.java | 399 +++++++++++++++ .../showcase/HomepageHighcharts.html | 267 ++++++++++ .../showcase/HomepageHighcharts.java | 465 ++++++++++++++++++ .../wickedcharts/showcase/NoIDMount.java | 29 ++ .../showcase/ShowcaseApplication.java | 28 +- .../showcase/ShowcaseSession.java | 3 +- .../showcase/SmallChartComponent.html | 22 + .../showcase/SmallChartComponent.java | 14 + .../showcase/StringFromResourceModel.java | 6 +- .../showcase/boot/WebInitializer.java | 1 - ...eaLineBoundariesChartEndConfiguration.java | 65 +++ ...LineBoundariesChartFalseConfiguration.java | 63 +++ ...ineBoundariesChartOriginConfiguration.java | 65 +++ ...LineBoundariesChartStartConfiguration.java | 65 +++ .../BarChartHorizontalConfiguration.java | 65 +++ .../BarChartMultiAxisConfiguration.java | 80 +++ .../BarChartStackedConfiguration.java | 88 ++++ .../BarChartStackedGroupConfiguration.java | 86 ++++ .../BarChartVerticalConfiguration.java | 61 +++ .../BubbleChartConfiguration.java | 103 ++++ .../ComboBarLineChartConfiguration.java | 64 +++ .../DataLabellingChartConfiguration.java | 71 +++ .../DoughnutChartConfiguration.java | 50 ++ .../FilteringLabelsConfiguration.java | 68 +++ .../LegendPointStyleConfiguration.java | 71 +++ .../LineChartAreaDatasetConfiguration.java | 143 ++++++ .../LineChartBasicConfiguration.java | 72 +++ .../LineChartInterpolatedConfiguration.java | 84 ++++ .../LineChartMultiAxisConfiguration.java | 76 +++ .../LineChartProgressBarConfiguration.java | 95 ++++ .../LineChartStackedConfiguration.java | 77 +++ .../LineChartSteppedAfterConfiguration.java | 66 +++ .../LineChartSteppedBeforeConfiguration.java | 65 +++ ...tWithDifferentPointSizesConfiguration.java | 94 ++++ .../LineStylesConfiguration.java | 80 +++ .../LinearStepSizeConfiguration.java | 75 +++ .../LogarithmicLineChartConfiguration.java | 72 +++ .../LogarithmicScatterChartConfiguration.java | 85 ++++ .../configurations/MinMaxConfiguration.java | 60 +++ .../MinMaxSuggestedConfiguration.java | 60 +++ .../MultilineLabelsConfiguration.java | 69 +++ .../NonNumericConfiguration.java | 67 +++ .../OtherRadarChartConfiguration.java | 65 +++ .../configurations/PieChartConfiguration.java | 44 ++ .../PointStylesConfiguration.java | 182 +++++++ .../PolarAreaChartConfiguration.java | 55 +++ .../RadarChartConfiguration.java | 98 ++++ .../ScatterChartConfiguration.java | 79 +++ .../ScatterChartMultiAxisConfiguration.java | 91 ++++ .../TimeComboConfiguration.java | 87 ++++ .../configurations/TimeLineConfiguration.java | 126 +++++ .../TimePointConfiguration.java | 138 ++++++ .../TimeSeriesConfiguration.java | 94 ++++ .../TooltipAverageConfiguration.java | 68 +++ .../TooltipBorderConfiguration.java | 62 +++ .../TooltipCallbacksConfiguration.java | 81 +++ .../TooltipHtmlLineConfiguration.java | 64 +++ .../TooltipHtmlPieConfiguration.java | 59 +++ .../TooltipHtmlPointsConfiguration.java | 69 +++ .../TooltipNearestConfiguration.java | 69 +++ .../base/ShowcaseConfiguration.java | 59 +++ .../GridLineStylesConfiguration.java | 74 +++ .../GridLinesBasicConfiguration.java | 69 +++ .../GridLinesChartAreaConfiguration.java | 27 + .../GridLinesDisplayFalseConfiguration.java | 25 + ...inesDisplayFalseNoBorderConfiguration.java | 25 + .../GridLinesTicksConfiguration.java | 28 ++ .../DatasetIntersectFalseConfiguration.java | 67 +++ .../DatasetIntersectTrueConfiguration.java | 67 +++ .../IndexIntersectFalseConfiguration.java | 67 +++ .../IndexIntersectTrueConfiguration.java | 68 +++ .../NearestIntersectFalseConfiguration.java | 67 +++ .../NearestIntersectTrueConfiguration.java | 67 +++ .../PointIntersectFalseConfiguration.java | 68 +++ .../PointIntersectTrueConfiguration.java | 68 +++ .../xIntersectFalseConfiguration.java | 68 +++ .../xIntersectTrueConfiguration.java | 67 +++ .../yIntersectFalseConfiguration.java | 67 +++ .../yIntersectTrueConfiguration.java | 67 +++ .../LegendPositionBottomConfiguration.java | 27 + ...LegendPositionChartBasicConfiguration.java | 55 +++ .../LegendPositionLeftConfiguration.java | 28 ++ .../LegendPositionRightConfiguration.java | 29 ++ .../LegendPositionTopConfiguration.java | 29 ++ .../wickedcharts/showcase/ie/SimplePage.java | 59 +-- .../showcase/links/ChartjsShowcaseLink.java | 15 + .../links/HighchartsShowcaseLink.java | 17 + .../links/SplineUpdatingChartLink.java | 31 +- .../showcase/links/UpdateChartJsLink.java | 50 ++ .../showcase/links/UpdateChartLink.java | 90 ---- .../showcase/links/UpdateHighchartLink.java | 55 +++ .../showcase/links/UpdateThemeLink.java | 54 ++ .../showcase/modalwindow/ChartPanel.java | 6 +- .../options/WicketSplineUpdatingOptions.java | 30 +- .../showcase/customTooltip-Pie.js | 62 +++ .../showcase/customTooltip-Point.js | 28 ++ .../wickedcharts/showcase/customTooltip.js | 71 +++ .../showcase/dataLabellingPlugin.js | 33 ++ .../wickedcharts/showcase/progressBar.js | 3 + .../wickedcharts/showcase/CodeComponent.java | 4 - .../de/adesso/wickedcharts/showcase/Demo.java | 14 +- .../showcase/HomepageChartJs.java | 26 +- .../showcase/HomepageHighcharts.java | 12 +- .../showcase/ShowcaseApplication.java | 4 +- .../showcase/ShowcaseSession.java | 7 +- .../showcase/SmallChartComponent.java | 3 - .../showcase/StringFromResourceModel.java | 7 +- .../showcase/boot/ShowcaseBooter.java | 4 - ...eaLineBoundariesChartEndConfiguration.java | 18 +- ...LineBoundariesChartFalseConfiguration.java | 19 +- ...ineBoundariesChartOriginConfiguration.java | 18 +- ...LineBoundariesChartStartConfiguration.java | 18 +- .../BarChartHorizontalConfiguration.java | 21 +- .../BarChartMultiAxisConfiguration.java | 25 +- .../BarChartStackedConfiguration.java | 23 +- .../BarChartStackedGroupConfiguration.java | 23 +- .../BarChartVerticalConfiguration.java | 20 +- .../BubbleChartConfiguration.java | 12 +- .../ComboBarLineChartConfiguration.java | 12 +- .../DataLabellingChartConfiguration.java | 14 +- .../DoughnutChartConfiguration.java | 13 +- .../FilteringLabelsConfiguration.java | 15 +- .../LegendPointStyleConfiguration.java | 20 +- .../LineChartAreaDatasetConfiguration.java | 22 +- .../LineChartBasicConfiguration.java | 19 +- .../LineChartInterpolatedConfiguration.java | 20 +- .../LineChartMultiAxisConfiguration.java | 17 +- .../LineChartProgressBarConfiguration.java | 24 +- .../LineChartStackedConfiguration.java | 17 +- .../LineChartSteppedAfterConfiguration.java | 18 +- .../LineChartSteppedBeforeConfiguration.java | 18 +- ...tWithDifferentPointSizesConfiguration.java | 19 +- .../LineStylesConfiguration.java | 17 +- .../LinearStepSizeConfiguration.java | 18 +- .../LogarithmicLineChartConfiguration.java | 17 +- .../LogarithmicScatterChartConfiguration.java | 4 +- .../configurations/MinMaxConfiguration.java | 13 +- .../MinMaxSuggestedConfiguration.java | 13 +- .../MultilineLabelsConfiguration.java | 10 +- .../NonNumericConfiguration.java | 15 +- .../OtherRadarChartConfiguration.java | 14 +- .../configurations/PieChartConfiguration.java | 4 +- .../PointStylesConfiguration.java | 16 +- .../PolarAreaChartConfiguration.java | 15 +- .../RadarChartConfiguration.java | 17 +- .../ScatterChartConfiguration.java | 4 +- .../ScatterChartMultiAxisConfiguration.java | 15 +- .../TimeComboConfiguration.java | 21 +- .../configurations/TimeLineConfiguration.java | 24 +- .../TimePointConfiguration.java | 28 +- .../TimeSeriesConfiguration.java | 20 +- .../TooltipAverageConfiguration.java | 17 +- .../TooltipBorderConfiguration.java | 14 +- .../TooltipCallbacksConfiguration.java | 20 +- .../TooltipHtmlLineConfiguration.java | 17 +- .../TooltipHtmlPieConfiguration.java | 9 +- .../TooltipHtmlPointsConfiguration.java | 18 +- .../TooltipNearestConfiguration.java | 17 +- .../base/ShowcaseConfiguration.java | 7 +- .../GridLineStylesConfiguration.java | 14 +- .../GridLinesBasicConfiguration.java | 14 +- .../IndexIntersectTrueConfiguration.java | 16 +- ...LegendPositionChartBasicConfiguration.java | 13 +- .../wickedcharts/showcase/ie/SimplePage.java | 4 +- .../showcase/links/ChartjsShowcaseLink.java | 3 +- .../links/HighchartsShowcaseLink.java | 3 +- .../links/SplineUpdatingChartLink.java | 5 - .../showcase/links/UpdateHighchartLink.java | 7 - .../showcase/modalwindow/ChartPanel.java | 4 +- .../options/WicketSplineUpdatingOptions.java | 4 +- .../wicket14/highcharts/Chart.java | 5 +- .../features/basic/ChartBehavior.java | 1 - .../drilldown/DrilldownProcessor.java | 18 +- .../features/global/GlobalProcessor.java | 3 +- .../wicket15/highcharts/Chart.java | 5 +- .../features/basic/ChartBehavior.java | 1 - .../drilldown/DrilldownProcessor.java | 19 +- .../features/global/GlobalProcessor.java | 3 +- wicket/wicked-charts-wicket6/build.gradle | 1 + .../wicket6/JavaScriptResourceRegistry.java | 103 +++- .../wickedcharts/wicket6/chartjs/Chart.java | 63 +++ .../wicket6/chartjs/JsonRendererFactory.java | 48 ++ .../chartjs/features/basic/ChartBehavior.java | 111 +++++ .../wicket6/highcharts/Chart.java | 1 - .../features/basic/ChartBehavior.java | 1 - .../drilldown/DrilldownProcessor.java | 2 - .../features/global/GlobalProcessor.java | 1 - .../interaction/InteractionBehavior.java | 1 - .../interaction/InteractionProcessor.java | 1 - .../interaction/WicketInteractionEvent.java | 1 - .../livedata/LiveDataAjaxBehavior.java | 1 - .../features/livedata/LiveDataProcessor.java | 1 - .../livedata/WicketLiveDataUpdateEvent.java | 3 +- .../features/selection/SelectionBehavior.java | 1 - .../selection/SelectionProcessor.java | 1 - .../selection/WicketSelectionEvent.java | 3 +- .../wickedcharts/wicket7/chartjs/Chart.java | 2 +- .../chartjs/features/basic/ChartBehavior.java | 1 - .../wicket7/highcharts/Chart.java | 2 - .../features/basic/ChartBehavior.java | 2 - .../drilldown/DrilldownProcessor.java | 3 - .../features/global/GlobalProcessor.java | 2 - .../interaction/InteractionBehavior.java | 2 - .../interaction/InteractionProcessor.java | 2 - .../livedata/LiveDataAjaxBehavior.java | 2 - .../features/selection/SelectionBehavior.java | 2 - .../selection/SelectionProcessor.java | 2 - 437 files changed, 8325 insertions(+), 2546 deletions(-) create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.html create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.html create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.java delete mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/Homepage.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.html create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.html create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/NoIDMount.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.html create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartEndConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartOriginConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartStartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartHorizontalConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartMultiAxisConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedGroupConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartVerticalConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/BubbleChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/ComboBarLineChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/DataLabellingChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/DoughnutChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/FilteringLabelsConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LegendPointStyleConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartAreaDatasetConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartBasicConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartInterpolatedConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartMultiAxisConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartProgressBarConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartStackedConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedAfterConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedBeforeConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartWithDifferentPointSizesConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineStylesConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LinearStepSizeConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicLineChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicScatterChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxSuggestedConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/MultilineLabelsConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/NonNumericConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/OtherRadarChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/PieChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/PointStylesConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/PolarAreaChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/RadarChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartMultiAxisConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeComboConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeLineConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimePointConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeSeriesConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipAverageConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipBorderConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipCallbacksConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlLineConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPieConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPointsConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipNearestConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/base/ShowcaseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLineStylesConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesBasicConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesChartAreaConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseNoBorderConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesTicksConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectTrueConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectTrueConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectTrueConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectTrueConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectTrueConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectTrueConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionBottomConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionChartBasicConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionLeftConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionRightConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionTopConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/ChartjsShowcaseLink.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/HighchartsShowcaseLink.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartJsLink.java delete mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartLink.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateHighchartLink.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateThemeLink.java create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Pie.js create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Point.js create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip.js create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/resources/de/adesso/wickedcharts/showcase/dataLabellingPlugin.js create mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/resources/de/adesso/wickedcharts/showcase/progressBar.js create mode 100644 wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/chartjs/Chart.java create mode 100644 wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/chartjs/JsonRendererFactory.java create mode 100644 wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/chartjs/features/basic/ChartBehavior.java 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/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/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/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 * { private static final long serialVersionUID = 1L; 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 index e90dd4bb..51ded2d0 100644 --- 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 @@ -14,14 +14,13 @@ */ 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; +import org.apache.wicket.ajax.AjaxRequestTarget; +import org.apache.wicket.ajax.markup.html.AjaxLink; +import org.apache.wicket.markup.html.basic.Label; public class UpdateChartLink extends AjaxLink { diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/Demo.java b/showcase/wicked-charts-showcase-wicket15/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-wicket15/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-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 index 791d6bd1..a84e4472 100644 --- 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 @@ -14,52 +14,14 @@ */ package de.adesso.wickedcharts.showcase; +import de.adesso.wickedcharts.highcharts.options.Options; +import de.adesso.wickedcharts.highcharts.theme.*; +import de.adesso.wickedcharts.showcase.links.UpdateChartLink; +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 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 { 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..540b3128 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,11 @@ */ 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.springframework.stereotype.Component; @Component 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/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/links/UpdateChartLink.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartLink.java index a9782b52..1cf44146 100644 --- 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 @@ -14,15 +14,13 @@ */ 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; +import de.adesso.wickedcharts.wicket15.highcharts.Chart; +import org.apache.wicket.ajax.AjaxRequestTarget; +import org.apache.wicket.ajax.markup.html.AjaxLink; +import org.apache.wicket.markup.html.basic.Label; public class UpdateChartLink extends AjaxLink { diff --git a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.html b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.html new file mode 100644 index 00000000..a83567a0 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket6/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-wicket6/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.java new file mode 100644 index 00000000..f91c05be --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket6/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.wicket6.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-wicket6/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.html b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.html new file mode 100644 index 00000000..4b9db1dd --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket6/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-wicket6/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.java new file mode 100644 index 00000000..0e7f614e --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket6/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.wicket6.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-wicket6/src/main/java/de/adesso/wickedcharts/showcase/Demo.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/Demo.java index 01cf1948..e39275ee 100644 --- a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/Demo.java +++ b/showcase/wicked-charts-showcase-wicket6/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-wicket6/src/main/java/de/adesso/wickedcharts/showcase/Homepage.java b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/Homepage.java deleted file mode 100644 index b87f1fa7..00000000 --- a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/Homepage.java +++ /dev/null @@ -1,203 +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.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.PageParameters; - -import de.adesso.wickedcharts.wicket6.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.SplineUpdatingChartLink; -import de.adesso.wickedcharts.showcase.links.UpdateChartLink; -import de.adesso.wickedcharts.showcase.options.*; - -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(true))); - 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 SplineUpdatingChartLink("splineUpdating", chart, - codeContainer, new WicketSplineUpdatingOptions())); - this.add(new UpdateChartLink("bubble", chart, codeContainer, - new BubbleChartOptions())); - this.add(new UpdateChartLink("3dbubble", chart, codeContainer, - new BubbleChart3DOptions())); - this.add(new UpdateChartLink("boxplot", chart, codeContainer, new BoxplotChartOptions())); - this.add(new UpdateChartLink("interactive", chart, codeContainer, - new InteractionOptions())); - this.add(new UpdateChartLink("angularGauge", chart, codeContainer, - new AngularGaugeOptions())); - this.add(new UpdateChartLink("spiderweb", chart, codeContainer, - new SpiderwebOptions())); - this.add(new UpdateChartLink("windrose", chart, codeContainer, - new WindroseOptions())); - this.add(new UpdateChartLink("columnrange", chart, codeContainer, - new ColumnRangeOptions())); - this.add(new UpdateChartLink("arearange", chart, codeContainer, - new AreaRangeOptions())); - this.add(new UpdateChartLink("clicktoadd", chart, codeContainer, - new ClickToAddAPointOptions())); - this.add(new UpdateChartLink("dualAxes", chart, codeContainer, - new DualAxesOptions())); - this.add(new UpdateChartLink("scatterWithRegression", chart, - codeContainer, new ScatterWithRegressionLineOptions())); - this.add(new UpdateChartLink("multipleAxes", chart, codeContainer, - new MultipleAxesOptions())); - } - - 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.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/HomepageChartJs.html b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.html new file mode 100644 index 00000000..b1340860 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.html @@ -0,0 +1,291 @@ + + + + + + Wicked Charts :: Showcase :: Wicket 7.x + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ +
+
+
+
+
+ +
+ + + +
+ + + +
+ +

+ Show Java code + » +

+
+ + +
+

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));
+
+
+
+ +
+ +
+ +
+ +
+
+

© Wicked Charts 2012-2018

+
+
+ + + + + + + + + + + + + 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..d16d8dab --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket6/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.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.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-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..0cc9a20b --- /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 + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+
+
+
+ +
+ + + + + + + +
+
CHART
+
+ +

Show Java code »

+
+ + +
+

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));
+
+
+
+ +
+ +
+ +
+ + +
+ +
+

© Wicked Charts 2012-2018

+
+ +
+ + + + + + + + + + + + \ 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..e15303c2 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.java @@ -0,0 +1,465 @@ +/* + * 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){ + 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")); + add(new UpdateThemeLink("darkgreen", "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)); + add(new UpdateThemeLink("darkgreen", 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("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; + 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() < 2){ + PageParameters temp = new PageParameters(); + temp.add("theme", "default"); + temp.add("chart", "line"); + setResponsePage(HomepageHighcharts.class, temp); + config.add(new Chart("chart", new BasicLineOptions(), null)); + return config.get(0); + } + + themeString = params.getAllNamed().get(0).getValue(); + Theme theme = getThemeFromParams(themeString); + chartString = params.getAllNamed().get(1).getValue(); + + if(chartString == null) { + config.add(new Chart("chart", new BasicLineOptions(), theme)); + return config.get(0); + } + + switch(chartString) { + case "basicBar": + config.add(new Chart("chart", new BasicBarOptions(), theme)); + break; + + case "splineWithSymbols": + config.add(new Chart("chart", new SplineWithSymbolsOptions(), theme)); + break; + + case "irregularIntervals": + config.add(new Chart("chart", new TimeDataWithIrregularIntervalsOptions(), theme)); + break; + + case "logarithmicAxis": + config.add(new Chart("chart", new LogarithmicAxisOptions(), theme)); + break; + + case "scatter": + config.add(new Chart("chart", new ScatterPlotOptions(), theme)); + break; + + case "area": + config.add(new Chart("chart", new BasicAreaOptions(), theme)); + break; + + case "areaWithNegativeValues": + config.add(new Chart("chart", new AreaWithNegativeValuesOptions(), theme)); + break; + + case "stackedAndGroupedColumn": + config.add(new Chart("chart", new StackedAndGroupedColumnOptions(), theme)); + break; + + case "combo": + config.add(new Chart("chart", new ComboOptions(), theme)); + break; + + case "donut": + config.add(new Chart("chart", new DonutOptions(), theme)); + break; + + case "withDataLabels": + config.add(new Chart("chart", new LineWithDataLabelsOptions(), theme)); + break; + + case "zoomableTimeSeries": + config.add(new Chart("chart", new ZoomableTimeSeriesOptions(), theme)); + break; + + case "splineInverted": + config.add(new Chart("chart", new SplineWithInvertedAxisOptions(), theme)); + break; + + case "splineWithPlotBands": + config.add(new Chart("chart", new SplineWithPlotBandsOptions(), theme)); + break; + + case "polar": + config.add(new Chart("chart", new PolarOptions(), theme)); + break; + + case "stackedArea": + config.add(new Chart("chart", new StackedAreaOptions(), theme)); + break; + + case "percentageArea": + config.add(new Chart("chart", new PercentageAreaOptions(), theme)); + break; + + case "areaMissing": + config.add(new Chart("chart", new AreaMissingOptions(), theme)); + break; + + case "areaInverted": + config.add(new Chart("chart", new AreaInvertedAxisOptions(), theme)); + break; + + case "areaSpline": + config.add(new Chart("chart", new AreaSplineOptions(), theme)); + break; + + case "areaSplineRange": + config.add(new Chart("chart", new AreaSplineRangeOptions(), theme)); + break; + + case "columnWithDrilldown": + config.add(new Chart("chart", new ColumnWithDrilldownOptions(), theme)); + break; + + case "columnRotated": + config.add(new Chart("chart", new ColumnWithRotatedLabelsOptions(), theme)); + break; + + case "stackedBar": + config.add(new Chart("chart", new StackedBarOptions(), theme)); + break; + + case "barNegativeStack": + config.add(new Chart("chart", new StackedBarOptions(), theme)); + break; + + case "basicColumn": + config.add(new Chart("chart", new BasicColumnOptions(), theme)); + break; + + case "columnWithNegativeValues": + config.add(new Chart("chart", new ColumnWithNegativeValuesOptions(), theme)); + break; + + case "stackedColumn": + config.add(new Chart("chart", new StackedColumnOptions(), theme)); + break; + + case "stackedPercentage": + config.add(new Chart("chart", new StackedPercentageOptions(), theme)); + break; + + case "basicPie": + config.add(new Chart("chart", new BasicPieOptions(), theme)); + break; + + case "pieWithGradient": + config.add(new Chart("chart", new PieWithGradientOptions(), theme)); + break; + + case "pieWithLegend": + config.add(new Chart("chart", new PieWithLegendOptions(), theme)); + break; + + case "splineUpdating": + config.add(new Chart("chart", new WicketSplineUpdatingOptions(), theme)); + break; + + case "bubble": + config.add(new Chart("chart", new BubbleChartOptions(), theme)); + break; + + case "3dbubble": + config.add(new Chart("chart", new BubbleChart3DOptions(), theme)); + break; + + case "boxplot": + config.add(new Chart("chart", new BoxplotChartOptions(), theme)); + break; + + case "interactive": + config.add(new Chart("chart", new InteractionOptions(), theme)); + break; + + case "angularGauge": + config.add(new Chart("chart", new AngularGaugeOptions(), theme)); + break; + + case "spiderweb": + config.add(new Chart("chart", new SpiderwebOptions(), theme)); + break; + + case "windrose": + config.add(new Chart("chart", new WindroseOptions(), theme)); + break; + + case "columnrange": + config.add(new Chart("chart", new ColumnRangeOptions(), theme)); + break; + + case "arearange": + config.add(new Chart("chart", new AreaRangeOptions(), theme)); + break; + + case "clicktoadd": + config.add(new Chart("chart", new ClickToAddAPointOptions(), theme)); + break; + + case "dualAxes": + config.add(new Chart("chart", new DualAxesOptions(), theme)); + break; + + case "scatterWithRegression": + config.add(new Chart("chart", new ScatterWithRegressionLineOptions(), theme)); + break; + + case "multipleAxes": + config.add(new Chart("chart", new MultipleAxesOptions(), theme)); + break; + + case "errorBar": + config.add(new Chart("chart", new ErrorBarOptions(), theme)); + break; + + case "funnel": + config.add(new Chart("chart", new FunnelOptions(), theme)); + break; + + case "pyramid": + config.add(new Chart("chart", new PyramidOptions(), theme)); + break; + + case "heatmap": + config.add(new Chart("chart", new HeatmapOptions(), theme)); + break; + + default: + config.add(new Chart("chart", new BasicLineOptions(), theme)); + break; + } + return config.get(0); + } + + 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 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..d17c2d23 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 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/", HomepageChartJs.class)); + mount(new NoIDMount("/highcharts/", 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 index ba128b49..15de7c15 100644 --- 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 @@ -1,3 +1,4 @@ + /** * Copyright 2012-2018 Wicked Charts (http://github.com/adessoAG/wicked-charts) * @@ -14,29 +15,21 @@ */ 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 class SplineUpdatingChartLink { + + //public SplineUpdatingChartLink(String id, Chart chart, Label codeContainer, + // Options options) { + //super(id, chart, codeContainer, options); + //} - public SplineUpdatingChartLink(String id, Chart chart, Label codeContainer, - Options options) { - super(id, chart, codeContainer, options); - } + private static final long serialVersionUID = 1L; - private static final long serialVersionUID = 1L; + /** + * Always return a fresh {@link Options} object, so that the date ticks are + * current. + */ - /** - * 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..9a918981 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartJsLink.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.HomepageChartJs; +import org.apache.wicket.ajax.AjaxRequestTarget; +import org.apache.wicket.ajax.markup.html.AjaxLink; +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 AjaxLink { + + 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(final AjaxRequestTarget target) { + 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..0b788524 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateHighchartLink.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.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 AjaxLink { + + 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(final AjaxRequestTarget target) { + 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..a611b842 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateThemeLink.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.ajax.AjaxRequestTarget; +import org.apache.wicket.ajax.markup.html.AjaxLink; +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 AjaxLink { + + 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(final AjaxRequestTarget target) { + 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/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.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.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.java index 1b0553c4..f3a6fda7 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; 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..daef77a0 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; 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 index c449513a..15de7c15 100644 --- 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 @@ -16,11 +16,6 @@ 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 { 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..0b788524 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,9 @@ */ 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.request.mapper.parameter.PageParameters; /** 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/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/highcharts/Chart.java b/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/highcharts/Chart.java index 8302ea88..3c115cac 100644 --- a/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/highcharts/Chart.java +++ b/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/highcharts/Chart.java @@ -14,12 +14,11 @@ */ package de.adesso.wickedcharts.wicket14.highcharts; -import org.apache.wicket.markup.html.WebMarkupContainer; -import org.apache.wicket.markup.html.resources.JavascriptResourceReference; - import de.adesso.wickedcharts.highcharts.options.Options; import de.adesso.wickedcharts.highcharts.theme.Theme; import de.adesso.wickedcharts.wicket14.highcharts.features.basic.ChartBehavior; +import org.apache.wicket.markup.html.WebMarkupContainer; +import org.apache.wicket.markup.html.resources.JavascriptResourceReference; public class Chart extends WebMarkupContainer { private static final long serialVersionUID = 1L; diff --git a/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/highcharts/features/basic/ChartBehavior.java b/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/highcharts/features/basic/ChartBehavior.java index f986fa58..f17a2638 100644 --- a/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/highcharts/features/basic/ChartBehavior.java +++ b/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/highcharts/features/basic/ChartBehavior.java @@ -26,7 +26,6 @@ import de.adesso.wickedcharts.wicket14.highcharts.JsonRendererFactory; import de.adesso.wickedcharts.wicket14.highcharts.features.drilldown.DrilldownProcessor; import de.adesso.wickedcharts.wicket14.highcharts.features.global.GlobalProcessor; - import org.apache.wicket.behavior.AbstractBehavior; import org.apache.wicket.markup.html.IHeaderResponse; diff --git a/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/highcharts/features/drilldown/DrilldownProcessor.java b/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/highcharts/features/drilldown/DrilldownProcessor.java index d71c205c..d4e477e0 100644 --- a/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/highcharts/features/drilldown/DrilldownProcessor.java +++ b/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/highcharts/features/drilldown/DrilldownProcessor.java @@ -14,24 +14,18 @@ */ package de.adesso.wickedcharts.wicket14.highcharts.features.drilldown; -import java.text.MessageFormat; - -import org.apache.wicket.Component; -import org.apache.wicket.markup.html.IHeaderResponse; -import org.apache.wicket.markup.html.resources.JavascriptResourceReference; - import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer; -import de.adesso.wickedcharts.highcharts.options.Events; -import de.adesso.wickedcharts.highcharts.options.Options; -import de.adesso.wickedcharts.highcharts.options.PlotOptions; -import de.adesso.wickedcharts.highcharts.options.PlotOptionsChoice; -import de.adesso.wickedcharts.highcharts.options.PointOptions; -import de.adesso.wickedcharts.highcharts.options.SeriesType; +import de.adesso.wickedcharts.highcharts.options.*; import de.adesso.wickedcharts.highcharts.options.drilldown.DrilldownFunction; import de.adesso.wickedcharts.highcharts.options.processing.IOptionsProcessor; import de.adesso.wickedcharts.highcharts.options.processing.OptionsProcessorContext; import de.adesso.wickedcharts.highcharts.options.util.OptionsUtil; import de.adesso.wickedcharts.wicket14.highcharts.JsonRendererFactory; +import org.apache.wicket.Component; +import org.apache.wicket.markup.html.IHeaderResponse; +import org.apache.wicket.markup.html.resources.JavascriptResourceReference; + +import java.text.MessageFormat; public class DrilldownProcessor implements IOptionsProcessor { diff --git a/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/highcharts/features/global/GlobalProcessor.java b/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/highcharts/features/global/GlobalProcessor.java index d48c2ceb..40179c4a 100644 --- a/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/highcharts/features/global/GlobalProcessor.java +++ b/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/highcharts/features/global/GlobalProcessor.java @@ -14,14 +14,13 @@ */ package de.adesso.wickedcharts.wicket14.highcharts.features.global; -import org.apache.wicket.markup.html.IHeaderResponse; - import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer; import de.adesso.wickedcharts.highcharts.options.Global; import de.adesso.wickedcharts.highcharts.options.Options; import de.adesso.wickedcharts.highcharts.options.processing.IOptionsProcessor; import de.adesso.wickedcharts.highcharts.options.processing.OptionsProcessorContext; import de.adesso.wickedcharts.wicket14.highcharts.JsonRendererFactory; +import org.apache.wicket.markup.html.IHeaderResponse; public class GlobalProcessor implements IOptionsProcessor { private IHeaderResponse response; diff --git a/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/highcharts/Chart.java b/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/highcharts/Chart.java index 4159b6be..877af0f1 100644 --- a/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/highcharts/Chart.java +++ b/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/highcharts/Chart.java @@ -14,12 +14,11 @@ */ package de.adesso.wickedcharts.wicket15.highcharts; -import org.apache.wicket.markup.html.WebMarkupContainer; -import org.apache.wicket.request.resource.JavaScriptResourceReference; - import de.adesso.wickedcharts.highcharts.options.Options; import de.adesso.wickedcharts.highcharts.theme.Theme; import de.adesso.wickedcharts.wicket15.highcharts.features.basic.ChartBehavior; +import org.apache.wicket.markup.html.WebMarkupContainer; +import org.apache.wicket.request.resource.JavaScriptResourceReference; /** * A simple markup container to display a chart. A chart can be provided with diff --git a/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/highcharts/features/basic/ChartBehavior.java b/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/highcharts/features/basic/ChartBehavior.java index 78c679f2..569d6bc5 100644 --- a/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/highcharts/features/basic/ChartBehavior.java +++ b/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/highcharts/features/basic/ChartBehavior.java @@ -26,7 +26,6 @@ import de.adesso.wickedcharts.wicket15.highcharts.JsonRendererFactory; import de.adesso.wickedcharts.wicket15.highcharts.features.drilldown.DrilldownProcessor; import de.adesso.wickedcharts.wicket15.highcharts.features.global.GlobalProcessor; - import org.apache.wicket.Component; import org.apache.wicket.behavior.Behavior; import org.apache.wicket.markup.html.IHeaderResponse; diff --git a/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/highcharts/features/drilldown/DrilldownProcessor.java b/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/highcharts/features/drilldown/DrilldownProcessor.java index eb267a8b..ae094cb1 100644 --- a/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/highcharts/features/drilldown/DrilldownProcessor.java +++ b/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/highcharts/features/drilldown/DrilldownProcessor.java @@ -14,26 +14,19 @@ */ package de.adesso.wickedcharts.wicket15.highcharts.features.drilldown; -import java.text.MessageFormat; - -import org.apache.wicket.Component; -import org.apache.wicket.markup.html.IHeaderResponse; -import org.apache.wicket.request.resource.JavaScriptResourceReference; - import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer; -import de.adesso.wickedcharts.highcharts.options.Events; -import de.adesso.wickedcharts.highcharts.options.Options; -import de.adesso.wickedcharts.highcharts.options.PlotOptions; -import de.adesso.wickedcharts.highcharts.options.PlotOptionsChoice; -import de.adesso.wickedcharts.highcharts.options.PointOptions; -import de.adesso.wickedcharts.highcharts.options.SeriesType; +import de.adesso.wickedcharts.highcharts.options.*; import de.adesso.wickedcharts.highcharts.options.drilldown.DrilldownFunction; import de.adesso.wickedcharts.highcharts.options.drilldown.DrilldownPoint; import de.adesso.wickedcharts.highcharts.options.processing.IOptionsProcessor; import de.adesso.wickedcharts.highcharts.options.processing.OptionsProcessorContext; -import de.adesso.wickedcharts.highcharts.options.series.Point; import de.adesso.wickedcharts.highcharts.options.util.OptionsUtil; import de.adesso.wickedcharts.wicket15.highcharts.JsonRendererFactory; +import org.apache.wicket.Component; +import org.apache.wicket.markup.html.IHeaderResponse; +import org.apache.wicket.request.resource.JavaScriptResourceReference; + +import java.text.MessageFormat; /** * This processor adds drilldown functionality to a chart. It searches the given diff --git a/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/highcharts/features/global/GlobalProcessor.java b/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/highcharts/features/global/GlobalProcessor.java index afaeee29..826191e3 100644 --- a/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/highcharts/features/global/GlobalProcessor.java +++ b/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/highcharts/features/global/GlobalProcessor.java @@ -14,14 +14,13 @@ */ package de.adesso.wickedcharts.wicket15.highcharts.features.global; -import org.apache.wicket.markup.html.IHeaderResponse; - import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer; import de.adesso.wickedcharts.highcharts.options.Global; import de.adesso.wickedcharts.highcharts.options.Options; import de.adesso.wickedcharts.highcharts.options.processing.IOptionsProcessor; import de.adesso.wickedcharts.highcharts.options.processing.OptionsProcessorContext; import de.adesso.wickedcharts.wicket15.highcharts.JsonRendererFactory; +import org.apache.wicket.markup.html.IHeaderResponse; /** * This processor reads the global options from an {@link Options} object and diff --git a/wicket/wicked-charts-wicket6/build.gradle b/wicket/wicked-charts-wicket6/build.gradle index c94039f1..cf314b38 100644 --- a/wicket/wicked-charts-wicket6/build.gradle +++ b/wicket/wicked-charts-wicket6/build.gradle @@ -1,5 +1,6 @@ dependencies { compile project(':highcharts-wrapper') + compile project(':chartjs-wrapper') compile 'org.apache.wicket:wicket-core:6.21.0' testCompile 'junit:junit:4.12' compile 'javax.servlet:servlet-api:2.5' diff --git a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/JavaScriptResourceRegistry.java b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/JavaScriptResourceRegistry.java index 4ddc4aff..984f4a92 100644 --- a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/JavaScriptResourceRegistry.java +++ b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/JavaScriptResourceRegistry.java @@ -65,6 +65,12 @@ public void addToHeaderResponse(final IHeaderResponse response) { public static final String DEFAULT_HIGHCHARTS_EXPORTING_URL = "http://code.highcharts.com/4.1.10/modules/exporting.js"; + public static final String DEFAULT_CHARTJS_BUNDLE_URL = "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.bundle.min.js"; + + public static final String DEFAULT_CHARTJS_URL = "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js"; + + public static final String DEFAULT_MOMENTJS_URL = "https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.min.js"; + public static JavaScriptResourceRegistry getInstance() { if (INSTANCE == null) { INSTANCE = new JavaScriptResourceRegistry(); @@ -84,6 +90,12 @@ public static JavaScriptResourceRegistry getInstance() { private RegistryEntry highchartsMoreEntry = new RegistryEntry(DEFAULT_HIGHCHARTS_MORE_URL); + private RegistryEntry chartJsEntry = new RegistryEntry(DEFAULT_CHARTJS_URL); + + private RegistryEntry chartJsBundleEntry = new RegistryEntry(DEFAULT_CHARTJS_BUNDLE_URL); + + private RegistryEntry momentJsEntry = new RegistryEntry(DEFAULT_MOMENTJS_URL); + private static JavaScriptResourceRegistry INSTANCE; private JavaScriptResourceRegistry() { @@ -114,12 +126,26 @@ public RegistryEntry getHeatmapEntry() { return this.heatmapEntry; } + public RegistryEntry getChartJsEntry() { + return this.chartJsEntry; + } + + public RegistryEntry getChartJsBundle() { + return this.chartJsBundleEntry; + } + + public RegistryEntry getMomentJsentry() { + return this.momentJsEntry; + } + + + /** * Sets the {@link ResourceReference} to use to load the Highcharts exporting * javascript library (exporting.js). Use this method if you want to include * the javascript file in your web application. * - * @param reference reference a resource to be used + * @param reference reference a Resource to be used */ public void setHighchartsExportingReference(final ResourceReference reference) { this.highchartsExportingEntry = new RegistryEntry(reference); @@ -140,7 +166,7 @@ public void setHighchartsExportingReference(final String url) { * Sets the {@link ResourceReference} to use to load the Highcharts module "funnel.js". * Use this method if you want to include the javascript file in your web application. * - * @param reference reference a resource to be used + * @param reference reference a Resource to be used */ public void setFunnelReference(final ResourceReference reference) { this.funnelEntry = new RegistryEntry(reference); @@ -150,7 +176,7 @@ public void setFunnelReference(final ResourceReference reference) { * Sets the {@link ResourceReference} to use to load the Highcharts module "heatmap.js". * Use this method if you want to include the javascript file in your web application. * - * @param reference reference a resource to be used + * @param reference reference a Resource to be used */ public void setHeatmapReference(final ResourceReference reference) { this.heatmapEntry = new RegistryEntry(reference); @@ -161,7 +187,7 @@ public void setHeatmapReference(final ResourceReference reference) { * javascript library (highcharts-more.js). Use this method if you want to * include the javascript file in your web application. * - * @param reference reference a resource to be used + * @param reference reference a Resource to be used */ public void setHighchartsMoreReference(final ResourceReference reference) { this.highchartsMoreEntry = new RegistryEntry(reference); @@ -172,7 +198,7 @@ public void setHighchartsMoreReference(final ResourceReference reference) { * (highcharts-more.js). Use this method if you want to load the javascript * file from an external URL. * - * @param url String which specifies an url + * @param url String to specify an url */ public void setHighchartsMoreReference(final String url) { this.highchartsMoreEntry = new RegistryEntry(url); @@ -183,7 +209,7 @@ public void setHighchartsMoreReference(final String url) { * library (highcharts.js). Use this method if you want to include the * javascript file in your web application. * - * @param reference reference a resource to be used + * @param reference reference a Resource to be used */ public void setHighchartsReference(final ResourceReference reference) { this.highchartsEntry = new RegistryEntry(reference); @@ -205,7 +231,7 @@ public void setHighchartsReference(final String url) { * this method if you want to include the javascript file in your web * application. * - * @param reference reference a resource to be used + * @param reference reference a Resource to be used */ public void setJQueryReference(final ResourceReference reference) { this.jqueryEntry = new RegistryEntry(reference); @@ -221,4 +247,67 @@ public void setJQueryReference(final String url) { this.jqueryEntry = new RegistryEntry(url); } + /** + * Sets the {@link ResourceReference} to use to load Chart.js (chart.min.js).Use + * this method if you want to include the javascript file in your web + * application. + * + * @param reference reference a Resource to be used + */ + public void setChartJsReference(final ResourceReference reference) { + this.chartJsEntry = new RegistryEntry(reference); + } + + /** + * Sets the URL to use to load Chart.js (chart.min.js). Use this method if you want + * to load the javascript file from an external URL. + * + * @param url String which specifies an url + */ + public void setChartJsReference(final String url) { + this.chartJsEntry = new RegistryEntry(url); + } + + /** + * Sets the {@link ResourceReference} to use to load Chart.js bundled (chart.bundle.min.js).Use + * this method if you want to include the javascript file in your web + * application. + * + * @param reference reference a Resource to be used + */ + public void setChartJsBundleReference(final ResourceReference reference) { + this.chartJsBundleEntry= new RegistryEntry(reference); + } + + /** + * Sets the URL to use to load Chart.js bundled (chart.bundle.min.js). Use this method if you want + * to load the javascript file from an external URL. + * + * @param url String which specifies an url + */ + public void setChartJsBundleReference(final String url) { + this.chartJsBundleEntry= new RegistryEntry(url); + } + + /** + * Sets the {@link ResourceReference} to use to load Chart.js bundled (chart.bundle.min.js).Use + * this method if you want to include the javascript file in your web + * application. + * + * @param reference reference a Resource to be used + */ + public void setMomentJsReference(final ResourceReference reference) { + this.momentJsEntry= new RegistryEntry(reference); + } + + /** + * Sets the URL to use to load Chart.js bundled (chart.bundle.min.js). Use this method if you want + * to load the javascript file from an external URL. + * + * @param url String which specifies an url + */ + public void setMomentJsReference(final String url) { + this.momentJsEntry= new RegistryEntry(url); + } + } diff --git a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/chartjs/Chart.java b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/chartjs/Chart.java new file mode 100644 index 00000000..7ac5adce --- /dev/null +++ b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/chartjs/Chart.java @@ -0,0 +1,63 @@ +/** + * 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.wicket6.chartjs; + +import de.adesso.wickedcharts.chartjs.ChartConfiguration; +import de.adesso.wickedcharts.wicket6.chartjs.features.basic.ChartBehavior; +import org.apache.wicket.markup.html.WebMarkupContainer; + +/** + * A simple markup container to set up and display a chart. + * + * + * @author SvenWirz + */ +public class Chart extends WebMarkupContainer { + + private static final long serialVersionUID = 1L; + + private ChartConfiguration options; + + public Chart(final String id, final ChartConfiguration options) { + super(id); + this.options = options; + setOutputMarkupId(true); + add(createChartBehavior()); + } + + public ChartConfiguration getChartConfiguration() { + return this.options; + } + + + public void setChartConfiguration(final ChartConfiguration options) { + this.options = options; + } + + public String getJavaScriptVarName() { + return this.getMarkupId() + "Var"; + } + + /** + * Factory method for {@link ChartBehavior}s. May be overridden, if a custom + * implementation of {@link ChartBehavior} is needed. + * + * @return ChartBehavior object + */ + protected ChartBehavior createChartBehavior() { + return new ChartBehavior(this); + } + +} diff --git a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/chartjs/JsonRendererFactory.java b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/chartjs/JsonRendererFactory.java new file mode 100644 index 00000000..66b82113 --- /dev/null +++ b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/chartjs/JsonRendererFactory.java @@ -0,0 +1,48 @@ +/** + * 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.wicket6.chartjs; + +import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer; + +/** + * Factory class responsible for creating a {@link JsonRenderer} instance that + * matches the needs of wicked-charts-wicket6. + * + * @author Tom Hombergs (tom.hombergs@gmail.com) + */ +public class JsonRendererFactory { + + private static final JsonRendererFactory INSTANCE = new JsonRendererFactory(); + + private static final JsonRenderer RENDERER = new JsonRenderer(); + + public static JsonRendererFactory getInstance() { + return INSTANCE; + } + + private JsonRendererFactory() { + } + + /** + * Returns the singleton instance of the {@link JsonRenderer} that is + * configured for Wicket 6.x. + * + * @return the singleton {@link JsonRenderer} + */ + public JsonRenderer getRenderer() { + return RENDERER; + } + +} diff --git a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/chartjs/features/basic/ChartBehavior.java b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/chartjs/features/basic/ChartBehavior.java new file mode 100644 index 00000000..192548fa --- /dev/null +++ b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/chartjs/features/basic/ChartBehavior.java @@ -0,0 +1,111 @@ +/** + * 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.wicket6.chartjs.features.basic; + + +import de.adesso.wickedcharts.chartjs.ChartConfiguration; +import de.adesso.wickedcharts.chartjs.chartoptions.Options; +import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer; +import de.adesso.wickedcharts.wicket6.JavaScriptResourceRegistry; +import de.adesso.wickedcharts.wicket6.chartjs.Chart; +import de.adesso.wickedcharts.wicket6.chartjs.JsonRendererFactory; +import org.apache.wicket.Component; +import org.apache.wicket.behavior.Behavior; +import org.apache.wicket.markup.head.IHeaderResponse; +import org.apache.wicket.markup.head.OnDomReadyHeaderItem; + +import java.text.MessageFormat; + +/** + * This behavior takes in an {@link Options} object containing the configuration + * of a chart and calls the proper javascript to display the chart in the + * component to which this behavior is added. + * + * @author Tom Hombergs (tom.hombergs@gmail.com) + */ +public class ChartBehavior extends Behavior { + + private static final long serialVersionUID = 1L; + + private final Chart chart; + + /** + * Constructor. + * + * @param container The chart component + */ + public ChartBehavior(final Chart container) { + this.chart = container; + } + + /** + * Includes the javascript that calls the Highcharts library to visualize the + * chart. + * + * @param response the Wicket HeaderResponse + * @param options the options containing the data to display + * @param renderer the JsonRenderer responsible for rendering the options + * @param markupId the DOM ID of the chart component. + */ + protected void includeChartJavascript(final IHeaderResponse response, final ChartConfiguration options, + final JsonRenderer renderer, final String markupId) { + String chartVarname = this.chart.getJavaScriptVarName(); + String optionsVarname = markupId + "Options"; + String contextVarname = markupId + "ctx"; + String jsonOptions = renderer.toJson(options); + + if(options.getOptionalJavascript() == null) { + response.render(OnDomReadyHeaderItem.forScript(MessageFormat.format( + "var {0} = {1};" + + "var {3} = document.getElementById(\"{4}\").getContext(\"2d\");" + + " window.{2} = new Chart({3},{0});", + optionsVarname, jsonOptions,chartVarname,contextVarname,markupId))); + } + else { + String optionalJavascript = options.getOptionalJavascript(); + String replacedVariablesInOptionalJavascript = optionalJavascript.replace("{0}", contextVarname); + response.render(OnDomReadyHeaderItem.forScript(MessageFormat.format( + "{5} var {0} = {1};" + + "var {3} = document.getElementById(\"{4}\").getContext(\"2d\");" + + " window.{2} = new Chart({3},{0});", + optionsVarname, jsonOptions,chartVarname,contextVarname,markupId,replacedVariablesInOptionalJavascript))); + } + } + + private void includeJavascriptDependencies(final IHeaderResponse response, final ChartConfiguration options) { + JavaScriptResourceRegistry resourceRegistry = JavaScriptResourceRegistry.getInstance(); + resourceRegistry.getJQueryEntry().addToHeaderResponse(response); + resourceRegistry.getChartJsBundle().addToHeaderResponse(response); + resourceRegistry.getMomentJsentry().addToHeaderResponse(response); + } + + @Override + public void onConfigure(final Component component) { + super.onConfigure(component); + } + + @Override + public void renderHead(final Component component, final IHeaderResponse response) { + component.setOutputMarkupId(true); + final String id = component.getMarkupId(); + ChartConfiguration options = this.chart.getChartConfiguration(); + + JsonRenderer renderer = JsonRendererFactory.getInstance().getRenderer(); + includeJavascriptDependencies(response, options); + + includeChartJavascript(response, options, renderer, id); + } + +} diff --git a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/Chart.java b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/Chart.java index 08ddc4ca..86fd5834 100644 --- a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/Chart.java +++ b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/Chart.java @@ -17,7 +17,6 @@ import de.adesso.wickedcharts.highcharts.options.Options; import de.adesso.wickedcharts.highcharts.theme.Theme; import de.adesso.wickedcharts.wicket6.highcharts.features.basic.ChartBehavior; - import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.request.resource.JavaScriptResourceReference; diff --git a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/basic/ChartBehavior.java b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/basic/ChartBehavior.java index 009dc61b..c2655177 100644 --- a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/basic/ChartBehavior.java +++ b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/basic/ChartBehavior.java @@ -26,7 +26,6 @@ import de.adesso.wickedcharts.wicket6.highcharts.features.interaction.InteractionProcessor; import de.adesso.wickedcharts.wicket6.highcharts.features.livedata.LiveDataProcessor; import de.adesso.wickedcharts.wicket6.highcharts.features.selection.SelectionProcessor; - import org.apache.wicket.Component; import org.apache.wicket.behavior.Behavior; import org.apache.wicket.markup.head.IHeaderResponse; diff --git a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/drilldown/DrilldownProcessor.java b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/drilldown/DrilldownProcessor.java index df78e01d..3ba39d43 100644 --- a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/drilldown/DrilldownProcessor.java +++ b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/drilldown/DrilldownProcessor.java @@ -20,10 +20,8 @@ import de.adesso.wickedcharts.highcharts.options.drilldown.DrilldownPoint; import de.adesso.wickedcharts.highcharts.options.processing.IOptionsProcessor; import de.adesso.wickedcharts.highcharts.options.processing.OptionsProcessorContext; -import de.adesso.wickedcharts.highcharts.options.series.Point; import de.adesso.wickedcharts.highcharts.options.util.OptionsUtil; import de.adesso.wickedcharts.wicket6.highcharts.JsonRendererFactory; - import org.apache.wicket.Component; import org.apache.wicket.markup.head.IHeaderResponse; import org.apache.wicket.markup.head.JavaScriptHeaderItem; diff --git a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/global/GlobalProcessor.java b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/global/GlobalProcessor.java index 244c5e38..1005c23a 100644 --- a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/global/GlobalProcessor.java +++ b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/global/GlobalProcessor.java @@ -20,7 +20,6 @@ import de.adesso.wickedcharts.highcharts.options.processing.IOptionsProcessor; import de.adesso.wickedcharts.highcharts.options.processing.OptionsProcessorContext; import de.adesso.wickedcharts.wicket6.highcharts.JsonRendererFactory; - import org.apache.wicket.markup.head.IHeaderResponse; import org.apache.wicket.markup.head.JavaScriptHeaderItem; diff --git a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/interaction/InteractionBehavior.java b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/interaction/InteractionBehavior.java index 7c18e7ed..2cf2c92f 100644 --- a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/interaction/InteractionBehavior.java +++ b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/interaction/InteractionBehavior.java @@ -22,7 +22,6 @@ import de.adesso.wickedcharts.wicket6.JavaScriptExpressionSendingAjaxBehavior; import de.adesso.wickedcharts.wicket6.highcharts.Chart; import de.adesso.wickedcharts.wicket6.highcharts.features.livedata.LiveDataAjaxBehavior; - import org.apache.wicket.Component; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.markup.head.IHeaderResponse; diff --git a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/interaction/InteractionProcessor.java b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/interaction/InteractionProcessor.java index ea9142aa..f302191a 100644 --- a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/interaction/InteractionProcessor.java +++ b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/interaction/InteractionProcessor.java @@ -20,7 +20,6 @@ import de.adesso.wickedcharts.highcharts.options.processing.IOptionsProcessor; import de.adesso.wickedcharts.highcharts.options.processing.OptionsProcessorContext; import de.adesso.wickedcharts.wicket6.highcharts.Chart; - import org.apache.wicket.ajax.AjaxRequestTarget; import java.io.Serializable; diff --git a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/interaction/WicketInteractionEvent.java b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/interaction/WicketInteractionEvent.java index 1350e9e9..87a19775 100644 --- a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/interaction/WicketInteractionEvent.java +++ b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/interaction/WicketInteractionEvent.java @@ -18,7 +18,6 @@ import de.adesso.wickedcharts.highcharts.options.interaction.InteractionEvent; import de.adesso.wickedcharts.highcharts.options.series.Point; import de.adesso.wickedcharts.highcharts.options.series.Series; - import org.apache.wicket.ajax.AjaxRequestTarget; /** diff --git a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/livedata/LiveDataAjaxBehavior.java b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/livedata/LiveDataAjaxBehavior.java index 09d8f4ee..ac6a1a89 100644 --- a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/livedata/LiveDataAjaxBehavior.java +++ b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/livedata/LiveDataAjaxBehavior.java @@ -23,7 +23,6 @@ import de.adesso.wickedcharts.wicket6.JavaScriptExpressionSendingAjaxBehavior; import de.adesso.wickedcharts.wicket6.highcharts.Chart; import de.adesso.wickedcharts.wicket6.highcharts.JsonRendererFactory; - import org.apache.wicket.Component; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.markup.head.HeaderItem; diff --git a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/livedata/LiveDataProcessor.java b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/livedata/LiveDataProcessor.java index b439a867..a6a565b1 100644 --- a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/livedata/LiveDataProcessor.java +++ b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/livedata/LiveDataProcessor.java @@ -20,7 +20,6 @@ import de.adesso.wickedcharts.highcharts.options.processing.IOptionsProcessor; import de.adesso.wickedcharts.highcharts.options.processing.OptionsProcessorContext; import de.adesso.wickedcharts.highcharts.options.util.OptionsUtil; - import org.apache.wicket.Component; import java.util.List; diff --git a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/livedata/WicketLiveDataUpdateEvent.java b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/livedata/WicketLiveDataUpdateEvent.java index 50c586ed..69de8b3e 100644 --- a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/livedata/WicketLiveDataUpdateEvent.java +++ b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/livedata/WicketLiveDataUpdateEvent.java @@ -14,10 +14,9 @@ */ package de.adesso.wickedcharts.wicket6.highcharts.features.livedata; -import org.apache.wicket.ajax.AjaxRequestTarget; - import de.adesso.wickedcharts.highcharts.options.livedata.JavaScriptParameters; import de.adesso.wickedcharts.highcharts.options.livedata.LiveDataUpdateEvent; +import org.apache.wicket.ajax.AjaxRequestTarget; /** * Wicket-specific extension of {@link LiveDataUpdateEvent}. diff --git a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/selection/SelectionBehavior.java b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/selection/SelectionBehavior.java index 086ca304..4a14f694 100644 --- a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/selection/SelectionBehavior.java +++ b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/selection/SelectionBehavior.java @@ -23,7 +23,6 @@ import de.adesso.wickedcharts.wicket6.highcharts.Chart; import de.adesso.wickedcharts.wicket6.highcharts.JsonRendererFactory; import de.adesso.wickedcharts.wicket6.highcharts.features.livedata.LiveDataAjaxBehavior; - import org.apache.wicket.Component; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.markup.head.IHeaderResponse; diff --git a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/selection/SelectionProcessor.java b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/selection/SelectionProcessor.java index e07ec208..219ce3e5 100644 --- a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/selection/SelectionProcessor.java +++ b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/selection/SelectionProcessor.java @@ -20,7 +20,6 @@ import de.adesso.wickedcharts.highcharts.options.processing.IOptionsProcessor; import de.adesso.wickedcharts.highcharts.options.processing.OptionsProcessorContext; import de.adesso.wickedcharts.wicket6.highcharts.Chart; - import org.apache.wicket.ajax.AjaxRequestTarget; import java.io.Serializable; diff --git a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/selection/WicketSelectionEvent.java b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/selection/WicketSelectionEvent.java index 5f42fd40..5d1b3a73 100644 --- a/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/selection/WicketSelectionEvent.java +++ b/wicket/wicked-charts-wicket6/src/main/java/de/adesso/wickedcharts/wicket6/highcharts/features/selection/WicketSelectionEvent.java @@ -14,9 +14,8 @@ */ package de.adesso.wickedcharts.wicket6.highcharts.features.selection; -import org.apache.wicket.ajax.AjaxRequestTarget; - import de.adesso.wickedcharts.highcharts.options.interaction.SelectionEvent; +import org.apache.wicket.ajax.AjaxRequestTarget; /** * Wicket-specific extension of {@link SelectionEvent}. diff --git a/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/chartjs/Chart.java b/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/chartjs/Chart.java index 91731a32..b0d998b0 100644 --- a/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/chartjs/Chart.java +++ b/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/chartjs/Chart.java @@ -14,9 +14,9 @@ */ package de.adesso.wickedcharts.wicket7.chartjs; -import org.apache.wicket.markup.html.WebMarkupContainer; import de.adesso.wickedcharts.chartjs.ChartConfiguration; import de.adesso.wickedcharts.wicket7.chartjs.features.basic.ChartBehavior; +import org.apache.wicket.markup.html.WebMarkupContainer; /** * A simple markup container to set up and display a chart. diff --git a/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/chartjs/features/basic/ChartBehavior.java b/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/chartjs/features/basic/ChartBehavior.java index af1ff0d2..e9388193 100644 --- a/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/chartjs/features/basic/ChartBehavior.java +++ b/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/chartjs/features/basic/ChartBehavior.java @@ -21,7 +21,6 @@ import de.adesso.wickedcharts.wicket7.JavaScriptResourceRegistry; import de.adesso.wickedcharts.wicket7.chartjs.Chart; import de.adesso.wickedcharts.wicket7.chartjs.JsonRendererFactory; - import org.apache.wicket.Component; import org.apache.wicket.behavior.Behavior; import org.apache.wicket.markup.head.IHeaderResponse; diff --git a/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/Chart.java b/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/Chart.java index 94dbfb4e..473c8f02 100644 --- a/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/Chart.java +++ b/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/Chart.java @@ -16,9 +16,7 @@ import de.adesso.wickedcharts.highcharts.options.Options; import de.adesso.wickedcharts.highcharts.theme.Theme; - import de.adesso.wickedcharts.wicket7.highcharts.features.basic.ChartBehavior; - import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.request.resource.JavaScriptResourceReference; diff --git a/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/basic/ChartBehavior.java b/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/basic/ChartBehavior.java index 5b9c043d..491e882e 100644 --- a/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/basic/ChartBehavior.java +++ b/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/basic/ChartBehavior.java @@ -18,7 +18,6 @@ import de.adesso.wickedcharts.highcharts.options.Options; import de.adesso.wickedcharts.highcharts.options.processing.*; import de.adesso.wickedcharts.highcharts.options.util.OptionsUtil; - import de.adesso.wickedcharts.wicket7.JavaScriptResourceRegistry; import de.adesso.wickedcharts.wicket7.highcharts.Chart; import de.adesso.wickedcharts.wicket7.highcharts.JsonRendererFactory; @@ -27,7 +26,6 @@ import de.adesso.wickedcharts.wicket7.highcharts.features.interaction.InteractionProcessor; import de.adesso.wickedcharts.wicket7.highcharts.features.livedata.LiveDataProcessor; import de.adesso.wickedcharts.wicket7.highcharts.features.selection.SelectionProcessor; - import org.apache.wicket.Component; import org.apache.wicket.behavior.Behavior; import org.apache.wicket.markup.head.IHeaderResponse; diff --git a/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/drilldown/DrilldownProcessor.java b/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/drilldown/DrilldownProcessor.java index 20b504c7..c7dab5fb 100644 --- a/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/drilldown/DrilldownProcessor.java +++ b/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/drilldown/DrilldownProcessor.java @@ -20,11 +20,8 @@ import de.adesso.wickedcharts.highcharts.options.drilldown.DrilldownPoint; import de.adesso.wickedcharts.highcharts.options.processing.IOptionsProcessor; import de.adesso.wickedcharts.highcharts.options.processing.OptionsProcessorContext; -import de.adesso.wickedcharts.highcharts.options.series.Point; import de.adesso.wickedcharts.highcharts.options.util.OptionsUtil; - import de.adesso.wickedcharts.wicket7.highcharts.JsonRendererFactory; - import org.apache.wicket.Component; import org.apache.wicket.markup.head.IHeaderResponse; import org.apache.wicket.markup.head.JavaScriptHeaderItem; diff --git a/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/global/GlobalProcessor.java b/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/global/GlobalProcessor.java index a7a6bb69..4f8452de 100644 --- a/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/global/GlobalProcessor.java +++ b/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/global/GlobalProcessor.java @@ -19,9 +19,7 @@ import de.adesso.wickedcharts.highcharts.options.Options; import de.adesso.wickedcharts.highcharts.options.processing.IOptionsProcessor; import de.adesso.wickedcharts.highcharts.options.processing.OptionsProcessorContext; - import de.adesso.wickedcharts.wicket7.highcharts.JsonRendererFactory; - import org.apache.wicket.markup.head.IHeaderResponse; import org.apache.wicket.markup.head.JavaScriptHeaderItem; diff --git a/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/interaction/InteractionBehavior.java b/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/interaction/InteractionBehavior.java index f2eac98f..d48b6100 100644 --- a/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/interaction/InteractionBehavior.java +++ b/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/interaction/InteractionBehavior.java @@ -19,11 +19,9 @@ import de.adesso.wickedcharts.highcharts.options.series.Point; import de.adesso.wickedcharts.highcharts.options.series.Series; import de.adesso.wickedcharts.highcharts.options.util.OptionsUtil; - import de.adesso.wickedcharts.wicket7.JavaScriptExpressionSendingAjaxBehavior; import de.adesso.wickedcharts.wicket7.highcharts.Chart; import de.adesso.wickedcharts.wicket7.highcharts.features.livedata.LiveDataAjaxBehavior; - import org.apache.wicket.Component; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.markup.head.IHeaderResponse; diff --git a/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/interaction/InteractionProcessor.java b/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/interaction/InteractionProcessor.java index c22971d0..ff34ed53 100644 --- a/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/interaction/InteractionProcessor.java +++ b/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/interaction/InteractionProcessor.java @@ -19,9 +19,7 @@ import de.adesso.wickedcharts.highcharts.options.interaction.InteractionFunction; import de.adesso.wickedcharts.highcharts.options.processing.IOptionsProcessor; import de.adesso.wickedcharts.highcharts.options.processing.OptionsProcessorContext; - import de.adesso.wickedcharts.wicket7.highcharts.Chart; - import org.apache.wicket.ajax.AjaxRequestTarget; import java.io.Serializable; diff --git a/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/livedata/LiveDataAjaxBehavior.java b/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/livedata/LiveDataAjaxBehavior.java index f349d9d8..aa2402f1 100644 --- a/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/livedata/LiveDataAjaxBehavior.java +++ b/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/livedata/LiveDataAjaxBehavior.java @@ -20,11 +20,9 @@ import de.adesso.wickedcharts.highcharts.options.livedata.LiveDataUpdateEvent; import de.adesso.wickedcharts.highcharts.options.series.Point; import de.adesso.wickedcharts.highcharts.options.util.OptionsUtil; - import de.adesso.wickedcharts.wicket7.JavaScriptExpressionSendingAjaxBehavior; import de.adesso.wickedcharts.wicket7.highcharts.Chart; import de.adesso.wickedcharts.wicket7.highcharts.JsonRendererFactory; - import org.apache.wicket.Component; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.markup.head.HeaderItem; diff --git a/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/selection/SelectionBehavior.java b/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/selection/SelectionBehavior.java index a2f1f362..4a0b4be4 100644 --- a/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/selection/SelectionBehavior.java +++ b/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/selection/SelectionBehavior.java @@ -19,12 +19,10 @@ import de.adesso.wickedcharts.highcharts.options.interaction.Selection; import de.adesso.wickedcharts.highcharts.options.interaction.SelectionEvent; import de.adesso.wickedcharts.highcharts.options.util.OptionsUtil; - import de.adesso.wickedcharts.wicket7.JavaScriptExpressionSendingAjaxBehavior; import de.adesso.wickedcharts.wicket7.highcharts.Chart; import de.adesso.wickedcharts.wicket7.highcharts.JsonRendererFactory; import de.adesso.wickedcharts.wicket7.highcharts.features.livedata.LiveDataAjaxBehavior; - import org.apache.wicket.Component; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.markup.head.IHeaderResponse; diff --git a/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/selection/SelectionProcessor.java b/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/selection/SelectionProcessor.java index 87844d9f..fd2ad16e 100644 --- a/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/selection/SelectionProcessor.java +++ b/wicket/wicked-charts-wicket7/src/main/java/de/adesso/wickedcharts/wicket7/highcharts/features/selection/SelectionProcessor.java @@ -19,9 +19,7 @@ import de.adesso.wickedcharts.highcharts.options.interaction.SelectionFunction; import de.adesso.wickedcharts.highcharts.options.processing.IOptionsProcessor; import de.adesso.wickedcharts.highcharts.options.processing.OptionsProcessorContext; - import de.adesso.wickedcharts.wicket7.highcharts.Chart; - import org.apache.wicket.ajax.AjaxRequestTarget; import java.io.Serializable; From b7c26fa8623288a36d31b36bb5eb760bb98ff788 Mon Sep 17 00:00:00 2001 From: max Date: Sat, 9 Jun 2018 09:48:47 +0200 Subject: [PATCH 07/23] added Chart.js support for Wicket 1.5 + Showcase --- .../wickedcharts/showcase/ChartComponent.html | 22 + .../wickedcharts/showcase/ChartComponent.java | 26 + .../wickedcharts/showcase/CodeComponent.html | 6 + .../wickedcharts/showcase/CodeComponent.java | 23 + .../de/adesso/wickedcharts/showcase/Demo.java | 77 - .../wickedcharts/showcase/Homepage.html | 238 - .../wickedcharts/showcase/Homepage.java | 170 - .../showcase/HomepageChartJs.html | 291 + .../showcase/HomepageChartJs.java | 399 + .../showcase/HomepageHighcharts.html | 267 + .../showcase/HomepageHighcharts.java | 452 + .../wickedcharts/showcase/NoIDMount.java | 29 + .../showcase/ShowcaseApplication.java | 12 +- .../showcase/SmallChartComponent.html | 22 + .../showcase/SmallChartComponent.java | 14 + ...eaLineBoundariesChartEndConfiguration.java | 65 + ...LineBoundariesChartFalseConfiguration.java | 63 + ...ineBoundariesChartOriginConfiguration.java | 65 + ...LineBoundariesChartStartConfiguration.java | 65 + .../BarChartHorizontalConfiguration.java | 65 + .../BarChartMultiAxisConfiguration.java | 80 + .../BarChartStackedConfiguration.java | 88 + .../BarChartStackedGroupConfiguration.java | 86 + .../BarChartVerticalConfiguration.java | 61 + .../BubbleChartConfiguration.java | 103 + .../ComboBarLineChartConfiguration.java | 64 + .../DataLabellingChartConfiguration.java | 71 + .../DoughnutChartConfiguration.java | 50 + .../FilteringLabelsConfiguration.java | 68 + .../LegendPointStyleConfiguration.java | 71 + .../LineChartAreaDatasetConfiguration.java | 143 + .../LineChartBasicConfiguration.java | 72 + .../LineChartInterpolatedConfiguration.java | 84 + .../LineChartMultiAxisConfiguration.java | 76 + .../LineChartProgressBarConfiguration.java | 95 + .../LineChartStackedConfiguration.java | 77 + .../LineChartSteppedAfterConfiguration.java | 66 + .../LineChartSteppedBeforeConfiguration.java | 65 + ...tWithDifferentPointSizesConfiguration.java | 94 + .../LineStylesConfiguration.java | 80 + .../LinearStepSizeConfiguration.java | 75 + .../LogarithmicLineChartConfiguration.java | 72 + .../LogarithmicScatterChartConfiguration.java | 85 + .../configurations/MinMaxConfiguration.java | 60 + .../MinMaxSuggestedConfiguration.java | 60 + .../MultilineLabelsConfiguration.java | 69 + .../NonNumericConfiguration.java | 67 + .../OtherRadarChartConfiguration.java | 65 + .../configurations/PieChartConfiguration.java | 45 + .../PointStylesConfiguration.java | 182 + .../PolarAreaChartConfiguration.java | 55 + .../RadarChartConfiguration.java | 98 + .../ScatterChartConfiguration.java | 79 + .../ScatterChartMultiAxisConfiguration.java | 91 + .../TimeComboConfiguration.java | 87 + .../configurations/TimeLineConfiguration.java | 126 + .../TimePointConfiguration.java | 138 + .../TimeSeriesConfiguration.java | 94 + .../TooltipAverageConfiguration.java | 68 + .../TooltipBorderConfiguration.java | 62 + .../TooltipCallbacksConfiguration.java | 81 + .../TooltipHtmlLineConfiguration.java | 64 + .../TooltipHtmlPieConfiguration.java | 59 + .../TooltipHtmlPointsConfiguration.java | 69 + .../TooltipNearestConfiguration.java | 69 + .../base/ShowcaseConfiguration.java | 59 + .../GridLineStylesConfiguration.java | 74 + .../GridLinesBasicConfiguration.java | 69 + .../GridLinesChartAreaConfiguration.java | 27 + .../GridLinesDisplayFalseConfiguration.java | 25 + ...inesDisplayFalseNoBorderConfiguration.java | 25 + .../GridLinesTicksConfiguration.java | 28 + .../DatasetIntersectFalseConfiguration.java | 67 + .../DatasetIntersectTrueConfiguration.java | 67 + .../IndexIntersectFalseConfiguration.java | 67 + .../IndexIntersectTrueConfiguration.java | 67 + .../NearestIntersectFalseConfiguration.java | 67 + .../NearestIntersectTrueConfiguration.java | 67 + .../PointIntersectFalseConfiguration.java | 67 + .../PointIntersectTrueConfiguration.java | 67 + .../xIntersectFalseConfiguration.java | 67 + .../xIntersectTrueConfiguration.java | 67 + .../yIntersectFalseConfiguration.java | 67 + .../yIntersectTrueConfiguration.java | 67 + .../LegendPositionBottomConfiguration.java | 27 + ...LegendPositionChartBasicConfiguration.java | 55 + .../LegendPositionLeftConfiguration.java | 28 + .../LegendPositionRightConfiguration.java | 29 + .../LegendPositionTopConfiguration.java | 29 + .../showcase/links/ChartjsShowcaseLink.java | 15 + .../links/HighchartsShowcaseLink.java | 17 + .../links/SplineUpdatingChartLink.java | 35 + .../showcase/links/UpdateChartJsLink.java | 50 + .../showcase/links/UpdateHighchartLink.java | 55 + .../showcase/links/UpdateThemeLink.java | 54 + .../showcase/customTooltip-Pie.js | 62 + .../showcase/customTooltip-Point.js | 28 + .../wickedcharts/showcase/customTooltip.js | 71 + .../showcase/dataLabellingPlugin.js | 33 + .../showcase/jquery-1.8.3.min-IEfix.js | 9473 +++++++++++++++++ .../wickedcharts/showcase/progressBar.js | 3 + .../main/webapp/js/jquery-1.8.3.min-IEfix.js | 9473 +++++++++++++++++ wicket/wicked-charts-wicket15/build.gradle | 1 + .../wicket15/JavaScriptResourceRegistry.java | 142 +- .../wickedcharts/wicket15/chartjs/Chart.java | 63 + .../wicket15/chartjs/JsonRendererFactory.java | 48 + .../chartjs/features/basic/ChartBehavior.java | 110 + 107 files changed, 26480 insertions(+), 517 deletions(-) create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.html create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.html create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.java delete mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/Demo.java delete mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/Homepage.html delete mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/Homepage.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.html create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.html create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/NoIDMount.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.html create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartEndConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartOriginConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartStartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartHorizontalConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartMultiAxisConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedGroupConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartVerticalConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/BubbleChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/ComboBarLineChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/DataLabellingChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/DoughnutChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/FilteringLabelsConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LegendPointStyleConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartAreaDatasetConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartBasicConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartInterpolatedConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartMultiAxisConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartProgressBarConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartStackedConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedAfterConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedBeforeConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartWithDifferentPointSizesConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineStylesConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LinearStepSizeConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicLineChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicScatterChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxSuggestedConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/MultilineLabelsConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/NonNumericConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/OtherRadarChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/PieChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/PointStylesConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/PolarAreaChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/RadarChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartMultiAxisConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeComboConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeLineConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimePointConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeSeriesConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipAverageConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipBorderConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipCallbacksConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlLineConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPieConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPointsConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipNearestConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/base/ShowcaseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLineStylesConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesBasicConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesChartAreaConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseNoBorderConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesTicksConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectTrueConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectTrueConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectTrueConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectTrueConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectTrueConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectTrueConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionBottomConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionChartBasicConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionLeftConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionRightConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionTopConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/ChartjsShowcaseLink.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/HighchartsShowcaseLink.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartJsLink.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateHighchartLink.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateThemeLink.java create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Pie.js create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Point.js create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip.js create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/resources/de/adesso/wickedcharts/showcase/dataLabellingPlugin.js create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/resources/de/adesso/wickedcharts/showcase/jquery-1.8.3.min-IEfix.js create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/resources/de/adesso/wickedcharts/showcase/progressBar.js create mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/webapp/js/jquery-1.8.3.min-IEfix.js create mode 100644 wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/chartjs/Chart.java create mode 100644 wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/chartjs/JsonRendererFactory.java create mode 100644 wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/chartjs/features/basic/ChartBehavior.java diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.html b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.html new file mode 100644 index 00000000..a83567a0 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket15/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-wicket15/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.java new file mode 100644 index 00000000..0fda619a --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket15/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.wicket15.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-wicket15/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.html b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.html new file mode 100644 index 00000000..4b9db1dd --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket15/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-wicket15/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.java new file mode 100644 index 00000000..fa34196d --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket15/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.wicket15.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-wicket15/src/main/java/de/adesso/wickedcharts/showcase/Demo.java deleted file mode 100644 index e39275ee..00000000 --- a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/Demo.java +++ /dev/null @@ -1,77 +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 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/. - * - * @author Tom Hombergs (tom.hombergs@gmail.com) - * - */ -public class Demo { - - public void test() { - - Options options = new Options(); - - options - .setChartOptions(new ChartOptions() - .setType(SeriesType.LINE)); - - options - .setTitle(new Title("My very own chart.")); - - options - .setxAxis(new Axis() - .setCategories(Arrays - .asList(new String[] { "Jan", "Feb", "Mar", "Apr", "May", - "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }))); - - options - .setyAxis(new Axis() - .setTitle(new Title("Temperature (C)"))); - - options - .setLegend(new Legend() - .setLayout(LegendLayout.VERTICAL) - .setAlign(HorizontalAlignment.RIGHT) - .setVerticalAlign(VerticalAlignment.TOP) - .setX(-10) - .setY(100) - .setBorderWidth(0)); - - options - .addSeries(new SimpleSeries() - .setName("Tokyo") - .setData( - Arrays - .asList(new Number[] { 7.0, 6.9, 9.5, 14.5, 18.2, 21.5, - 25.2, 26.5, 23.3, 18.3, 13.9, 9.6 }))); - - options - .addSeries(new SimpleSeries() - .setName("New York") - .setData( - Arrays - .asList(new Number[] { -0.2, 0.8, 5.7, 11.3, 17.0, 22.0, - 24.8, 24.1, 20.1, 14.1, 8.6, 2.5 }))); - } -} diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/Homepage.html b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/Homepage.html deleted file mode 100644 index 893c25ae..00000000 --- a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/Homepage.html +++ /dev/null @@ -1,238 +0,0 @@ - - - - - Wicked Charts :: Showcase :: Wicket 1.5.x - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
-
-
-
-
- - - - -
-
CHART
-
-

Show Java code »

-
- -
-

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));
-
-
-
- - -
- -
-
- -
- -
-

© Wicked Charts 2012-2018

-
- -
- - - - - - - - - - - - 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 a84e4472..00000000 --- a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/Homepage.java +++ /dev/null @@ -1,170 +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 de.adesso.wickedcharts.highcharts.options.Options; -import de.adesso.wickedcharts.highcharts.theme.*; -import de.adesso.wickedcharts.showcase.links.UpdateChartLink; -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; - -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..4812c4d7 --- /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 + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+
+
+
+ +
+ + + +
+ + + +
+ +

+ Show Java code + » +

+
+ + +
+

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));
+
+
+
+ +
+ +
+ +
+ +
+
+

© Wicked Charts 2012-2018

+
+
+ + + + + + + + + + + + + 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..f60a9d08 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket15/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.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.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-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..9337fd75 --- /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 + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+
+
+
+ +
+ + + + + + + +
+
CHART
+
+ +

Show Java code »

+
+ + +
+

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));
+
+
+
+ +
+ +
+ +
+ + +
+ +
+

© Wicked Charts 2012-2018

+
+ +
+ + + + + + + + + + + + \ 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..9de810f7 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.java @@ -0,0 +1,452 @@ +/* + * 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.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){ + 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")); + add(new UpdateThemeLink("darkgreen", "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)); + add(new UpdateThemeLink("darkgreen", 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; + 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() < 2){ + PageParameters temp = new PageParameters(); + temp.add("theme", "default"); + temp.add("chart", "line"); + setResponsePage(HomepageHighcharts.class, temp); + config.add(new Chart("chart", new BasicLineOptions(), null)); + return config.get(0); + } + + themeString = params.getAllNamed().get(0).getValue(); + Theme theme = getThemeFromParams(themeString); + chartString = params.getAllNamed().get(1).getValue(); + + if(chartString == null) { + config.add(new Chart("chart", new BasicLineOptions(), theme)); + return config.get(0); + } + + switch(chartString) { + case "basicBar": + config.add(new Chart("chart", new BasicBarOptions(), theme)); + break; + + case "splineWithSymbols": + config.add(new Chart("chart", new SplineWithSymbolsOptions(), theme)); + break; + + case "irregularIntervals": + config.add(new Chart("chart", new TimeDataWithIrregularIntervalsOptions(), theme)); + break; + + case "logarithmicAxis": + config.add(new Chart("chart", new LogarithmicAxisOptions(), theme)); + break; + + case "scatter": + config.add(new Chart("chart", new ScatterPlotOptions(), theme)); + break; + + case "area": + config.add(new Chart("chart", new BasicAreaOptions(), theme)); + break; + + case "areaWithNegativeValues": + config.add(new Chart("chart", new AreaWithNegativeValuesOptions(), theme)); + break; + + case "stackedAndGroupedColumn": + config.add(new Chart("chart", new StackedAndGroupedColumnOptions(), theme)); + break; + + case "combo": + config.add(new Chart("chart", new ComboOptions(), theme)); + break; + + case "donut": + config.add(new Chart("chart", new DonutOptions(), theme)); + break; + + case "withDataLabels": + config.add(new Chart("chart", new LineWithDataLabelsOptions(), theme)); + break; + + /*case "zoomableTimeSeries": + config.add(new Chart("chart", new ZoomableTimeSeriesOptions(), theme)); + break;*/ + + case "splineInverted": + config.add(new Chart("chart", new SplineWithInvertedAxisOptions(), theme)); + break; + + case "splineWithPlotBands": + config.add(new Chart("chart", new SplineWithPlotBandsOptions(), theme)); + break; + + case "polar": + config.add(new Chart("chart", new PolarOptions(), theme)); + break; + + case "stackedArea": + config.add(new Chart("chart", new StackedAreaOptions(), theme)); + break; + + case "percentageArea": + config.add(new Chart("chart", new PercentageAreaOptions(), theme)); + break; + + case "areaMissing": + config.add(new Chart("chart", new AreaMissingOptions(), theme)); + break; + + case "areaInverted": + config.add(new Chart("chart", new AreaInvertedAxisOptions(), theme)); + break; + + case "areaSpline": + config.add(new Chart("chart", new AreaSplineOptions(), theme)); + break; + + case "areaSplineRange": + config.add(new Chart("chart", new AreaSplineRangeOptions(), theme)); + break; + + case "columnWithDrilldown": + config.add(new Chart("chart", new ColumnWithDrilldownOptions(), theme)); + break; + + case "columnRotated": + config.add(new Chart("chart", new ColumnWithRotatedLabelsOptions(), theme)); + break; + + case "stackedBar": + config.add(new Chart("chart", new StackedBarOptions(), theme)); + break; + + case "barNegativeStack": + config.add(new Chart("chart", new StackedBarOptions(), theme)); + break; + + case "basicColumn": + config.add(new Chart("chart", new BasicColumnOptions(), theme)); + break; + + case "columnWithNegativeValues": + config.add(new Chart("chart", new ColumnWithNegativeValuesOptions(), theme)); + break; + + case "stackedColumn": + config.add(new Chart("chart", new StackedColumnOptions(), theme)); + break; + + case "stackedPercentage": + config.add(new Chart("chart", new StackedPercentageOptions(), theme)); + break; + + case "basicPie": + config.add(new Chart("chart", new BasicPieOptions(), theme)); + break; + + case "pieWithGradient": + config.add(new Chart("chart", new PieWithGradientOptions(), theme)); + break; + + case "pieWithLegend": + config.add(new Chart("chart", new PieWithLegendOptions(), theme)); + break; + + case "bubble": + config.add(new Chart("chart", new BubbleChartOptions(), theme)); + break; + + case "3dbubble": + config.add(new Chart("chart", new BubbleChart3DOptions(), theme)); + break; + + case "boxplot": + config.add(new Chart("chart", new BoxplotChartOptions(), theme)); + break; + + case "angularGauge": + config.add(new Chart("chart", new AngularGaugeOptions(), theme)); + break; + + case "spiderweb": + config.add(new Chart("chart", new SpiderwebOptions(), theme)); + break; + + case "windrose": + config.add(new Chart("chart", new WindroseOptions(), theme)); + break; + + case "columnrange": + config.add(new Chart("chart", new ColumnRangeOptions(), theme)); + break; + + case "arearange": + config.add(new Chart("chart", new AreaRangeOptions(), theme)); + break; + + case "clicktoadd": + config.add(new Chart("chart", new ClickToAddAPointOptions(), theme)); + break; + + case "dualAxes": + config.add(new Chart("chart", new DualAxesOptions(), theme)); + break; + + case "scatterWithRegression": + config.add(new Chart("chart", new ScatterWithRegressionLineOptions(), theme)); + break; + + case "multipleAxes": + config.add(new Chart("chart", new MultipleAxesOptions(), theme)); + break; + + case "errorBar": + config.add(new Chart("chart", new ErrorBarOptions(), theme)); + break; + + case "funnel": + config.add(new Chart("chart", new FunnelOptions(), theme)); + break; + + case "pyramid": + config.add(new Chart("chart", new PyramidOptions(), theme)); + break; + + case "heatmap": + config.add(new Chart("chart", new HeatmapOptions(), theme)); + break; + + default: + config.add(new Chart("chart", new BasicLineOptions(), theme)); + break; + } + return config.get(0); + } + + 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 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 540b3128..06a2f895 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 @@ -19,6 +19,7 @@ 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; @Component @@ -27,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; } /** @@ -40,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/", HomepageChartJs.class)); + mount(new NoIDMount("/highcharts/", 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/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/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..ad5aabc1 --- /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/resources/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..f6159daa --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/PieChartConfiguration.java @@ -0,0 +1,45 @@ +package de.adesso.wickedcharts.showcase.configurations; + +import de.adesso.wickedcharts.chartjs.chartoptions.*; +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..5dee5bf9 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket15/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.chartoptions.*; +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..9965b20a --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket15/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-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java new file mode 100644 index 00000000..15de7c15 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java @@ -0,0 +1,35 @@ + +/** + * 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; + +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-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..9a918981 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartJsLink.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.HomepageChartJs; +import org.apache.wicket.ajax.AjaxRequestTarget; +import org.apache.wicket.ajax.markup.html.AjaxLink; +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 AjaxLink { + + 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(final AjaxRequestTarget target) { + 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/UpdateHighchartLink.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateHighchartLink.java new file mode 100644 index 00000000..0b788524 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateHighchartLink.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.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 AjaxLink { + + 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(final AjaxRequestTarget target) { + 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..a611b842 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateThemeLink.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.ajax.AjaxRequestTarget; +import org.apache.wicket.ajax.markup.html.AjaxLink; +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 AjaxLink { + + 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(final AjaxRequestTarget target) { + 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 = "
t
"; + 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>" ); + + 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>"); + + // 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 = /)<[^<]*)*<\/script>/gi, + rts = /([?&])_=[^&]*/, + rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, + + // Keep a copy of the old load method + _load = jQuery.fn.load, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + allTypes = ["*/"] + ["*"]; + +// #8138, IE may throw an exception when accessing +// a field from window.location if document.domain has been set +try { + ajaxLocation = location.href; +} catch( e ) { + // Use the href attribute of an A element + // since IE will modify it given document.location + ajaxLocation = document.createElement( "a" ); + ajaxLocation.href = ""; + ajaxLocation = ajaxLocation.href; +} + +// Segment location into parts +ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + var dataType, list, placeBefore, + dataTypes = dataTypeExpression.toLowerCase().split( core_rspace ), + i = 0, + length = dataTypes.length; + + if ( jQuery.isFunction( func ) ) { + // For each dataType in the dataTypeExpression + for ( ; i < length; i++ ) { + dataType = dataTypes[ i ]; + // We control if we're asked to add before + // any existing element + placeBefore = /^\+/.test( dataType ); + if ( placeBefore ) { + dataType = dataType.substr( 1 ) || "*"; + } + list = structure[ dataType ] = structure[ dataType ] || []; + // then we add to the structure accordingly + list[ placeBefore ? "unshift" : "push" ]( func ); + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, + dataType /* internal */, inspected /* internal */ ) { + + dataType = dataType || options.dataTypes[ 0 ]; + inspected = inspected || {}; + + inspected[ dataType ] = true; + + var selection, + list = structure[ dataType ], + i = 0, + length = list ? list.length : 0, + executeOnly = ( structure === prefilters ); + + for ( ; i < length && ( executeOnly || !selection ); i++ ) { + selection = list[ i ]( options, originalOptions, jqXHR ); + // If we got redirected to another dataType + // we try there if executing only and not done already + if ( typeof selection === "string" ) { + if ( !executeOnly || inspected[ selection ] ) { + selection = undefined; + } else { + options.dataTypes.unshift( selection ); + selection = inspectPrefiltersOrTransports( + structure, options, originalOptions, jqXHR, selection, inspected ); + } + } + } + // If we're only executing or nothing was selected + // we try the catchall dataType if not done already + if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) { + selection = inspectPrefiltersOrTransports( + structure, options, originalOptions, jqXHR, "*", inspected ); + } + // unnecessary when only executing (prefilters) + // but it'll be ignored by the caller in that case + return selection; +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes #9887 +function ajaxExtend( target, src ) { + var key, deep, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } +} + +jQuery.fn.load = function( url, params, callback ) { + if ( typeof url !== "string" && _load ) { + return _load.apply( this, arguments ); + } + + // Don't do a request if no elements are being requested + if ( !this.length ) { + return this; + } + + var selector, type, response, + self = this, + off = url.indexOf(" "); + + if ( off >= 0 ) { + selector = url.slice( off, url.length ); + url = url.slice( 0, off ); + } + + // If it's a function + if ( jQuery.isFunction( params ) ) { + + // We assume that it's the callback + callback = params; + params = undefined; + + // Otherwise, build a param string + } else if ( params && typeof params === "object" ) { + type = "POST"; + } + + // Request the remote document + jQuery.ajax({ + url: url, + + // if "type" variable is undefined, then "GET" method will be used + type: type, + dataType: "html", + data: params, + complete: function( jqXHR, status ) { + if ( callback ) { + self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); + } + } + }).done(function( responseText ) { + + // Save response for use in complete callback + response = arguments; + + // See if a selector was specified + self.html( selector ? + + // Create a dummy div to hold the results + jQuery("
") + + // inject the contents of the document in, removing the scripts + // to avoid any 'Permission Denied' errors in IE + .append( responseText.replace( rscript, "" ) ) + + // Locate the specified elements + .find( selector ) : + + // If not, just inject the full result + responseText ); + + }); + + return this; +}; + +// Attach a bunch of functions for handling common AJAX events +jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){ + jQuery.fn[ o ] = function( f ){ + return this.on( o, f ); + }; +}); + +jQuery.each( [ "get", "post" ], function( i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + // shift arguments if data argument was omitted + if ( jQuery.isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + return jQuery.ajax({ + type: method, + url: url, + data: data, + success: callback, + dataType: type + }); + }; +}); + +jQuery.extend({ + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + if ( settings ) { + // Building a settings object + ajaxExtend( target, jQuery.ajaxSettings ); + } else { + // Extending ajaxSettings + settings = target; + target = jQuery.ajaxSettings; + } + ajaxExtend( target, settings ); + return target; + }, + + ajaxSettings: { + url: ajaxLocation, + isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), + global: true, + type: "GET", + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + processData: true, + async: true, + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + throws: false, + traditional: false, + headers: {}, + */ + + accepts: { + xml: "application/xml, text/xml", + html: "text/html", + text: "text/plain", + json: "application/json, text/javascript", + "*": allTypes + }, + + contents: { + xml: /xml/, + html: /html/, + json: /json/ + }, + + responseFields: { + xml: "responseXML", + text: "responseText" + }, + + // List of data converters + // 1) key format is "source_type destination_type" (a single space in-between) + // 2) the catchall symbol "*" can be used for source_type + converters: { + + // Convert anything to text + "* text": window.String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": jQuery.parseJSON, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + context: true, + url: true + } + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var // ifModified key + ifModifiedKey, + // Response headers + responseHeadersString, + responseHeaders, + // transport + transport, + // timeout handle + timeoutTimer, + // Cross-domain detection vars + parts, + // To know if global events are to be dispatched + fireGlobals, + // Loop variable + i, + // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + // Callbacks context + callbackContext = s.context || s, + // Context for global events + // It's the callbackContext if one was provided in the options + // and if it's a DOM node or a jQuery collection + globalEventContext = callbackContext !== s && + ( callbackContext.nodeType || callbackContext instanceof jQuery ) ? + jQuery( callbackContext ) : jQuery.event, + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks( "once memory" ), + // Status-dependent callbacks + statusCode = s.statusCode || {}, + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + // The jqXHR state + state = 0, + // Default abort message + strAbort = "canceled", + // Fake xhr + jqXHR = { + + readyState: 0, + + // Caches the header + setRequestHeader: function( name, value ) { + if ( !state ) { + var lname = name.toLowerCase(); + name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Raw string + getAllResponseHeaders: function() { + return state === 2 ? responseHeadersString : null; + }, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( state === 2 ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while( ( match = rheaders.exec( responseHeadersString ) ) ) { + responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; + } + } + match = responseHeaders[ key.toLowerCase() ]; + } + return match === undefined ? null : match; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( !state ) { + s.mimeType = type; + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + statusText = statusText || strAbort; + if ( transport ) { + transport.abort( statusText ); + } + done( 0, statusText ); + return this; + } + }; + + // Callback for when everything is done + // It is defined here because jslint complains if it is declared + // at the end of the function (which would be more logical and readable) + function done( status, nativeStatusText, responses, headers ) { + var isSuccess, success, error, response, modified, + statusText = nativeStatusText; + + // Called once + if ( state === 2 ) { + return; + } + + // State is "done" now + state = 2; + + // Clear timeout if it exists + if ( timeoutTimer ) { + clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + // Get response data + if ( responses ) { + response = ajaxHandleResponses( s, jqXHR, responses ); + } + + // If successful, handle type chaining + if ( status >= 200 && status < 300 || status === 304 ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + + modified = jqXHR.getResponseHeader("Last-Modified"); + if ( modified ) { + jQuery.lastModified[ ifModifiedKey ] = modified; + } + modified = jqXHR.getResponseHeader("Etag"); + if ( modified ) { + jQuery.etag[ ifModifiedKey ] = modified; + } + } + + // If not modified + if ( status === 304 ) { + + statusText = "notmodified"; + isSuccess = true; + + // If we have data + } else { + + isSuccess = ajaxConvert( s, response ); + statusText = isSuccess.state; + success = isSuccess.data; + error = isSuccess.error; + isSuccess = !error; + } + } else { + // We extract error from statusText + // then normalize statusText and status for non-aborts + error = statusText; + if ( !statusText || status ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = ( nativeStatusText || statusText ) + ""; + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ), + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger( "ajaxStop" ); + } + } + } + + // Attach deferreds + deferred.promise( jqXHR ); + jqXHR.success = jqXHR.done; + jqXHR.error = jqXHR.fail; + jqXHR.complete = completeDeferred.add; + + // Status-dependent callbacks + jqXHR.statusCode = function( map ) { + if ( map ) { + var tmp; + if ( state < 2 ) { + for ( tmp in map ) { + statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ]; + } + } else { + tmp = map[ jqXHR.status ]; + jqXHR.always( tmp ); + } + } + return this; + }; + + // Remove hash character (#7531: and string promotion) + // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) + // We also use the url parameter if available + s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); + + // Extract dataTypes list + s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( core_rspace ); + + // A cross-domain request is in order when we have a protocol:host:port mismatch + if ( s.crossDomain == null ) { + parts = rurl.exec( s.url.toLowerCase() ); + s.crossDomain = !!( parts && + ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] || + ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != + ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) + ); + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefilter, stop there + if ( state === 2 ) { + return jqXHR; + } + + // We can fire global events as of now if asked to + fireGlobals = s.global; + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger( "ajaxStart" ); + } + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // If data is available, append data to url + if ( s.data ) { + s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data; + // #9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Get ifModifiedKey before adding the anti-cache parameter + ifModifiedKey = s.url; + + // Add anti-cache in url if needed + if ( s.cache === false ) { + + var ts = jQuery.now(), + // try replacing _= if it is there + ret = s.url.replace( rts, "$1_=" + ts ); + + // if nothing was replaced, add timestamp to the end + s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + ifModifiedKey = ifModifiedKey || s.url; + if ( jQuery.lastModified[ ifModifiedKey ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] ); + } + if ( jQuery.etag[ ifModifiedKey ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] ); + } + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? + s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { + // Abort if not done already and return + return jqXHR.abort(); + + } + + // aborting is no longer a cancellation + strAbort = "abort"; + + // Install callbacks on deferreds + for ( i in { success: 1, error: 1, complete: 1 } ) { + jqXHR[ i ]( s[ i ] ); + } + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = setTimeout( function(){ + jqXHR.abort( "timeout" ); + }, s.timeout ); + } + + try { + state = 1; + transport.send( requestHeaders, done ); + } catch (e) { + // Propagate exception as error if not done + if ( state < 2 ) { + done( -1, e ); + // Simply rethrow otherwise + } else { + throw e; + } + } + } + + return jqXHR; + }, + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {} + +}); + +/* Handles responses to an ajax request: + * - sets all responseXXX fields accordingly + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + + var ct, type, finalDataType, firstDataType, + contents = s.contents, + dataTypes = s.dataTypes, + responseFields = s.responseFields; + + // Fill responseXXX fields + for ( type in responseFields ) { + if ( type in responses ) { + jqXHR[ responseFields[type] ] = responses[ type ]; + } + } + + // Remove auto dataType and get content-type in the process + while( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader( "content-type" ); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +// Chain conversions given the request and the original response +function ajaxConvert( s, response ) { + + var conv, conv2, current, tmp, + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(), + prev = dataTypes[ 0 ], + converters = {}, + i = 0; + + // Apply the dataFilter if provided + if ( s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } + } + + // Convert to each sequential dataType, tolerating list modification + for ( ; (current = dataTypes[++i]); ) { + + // There's only work to do if current dataType is non-auto + if ( current !== "*" ) { + + // Convert response if prev dataType is non-auto and differs from current + if ( prev !== "*" && prev !== current ) { + + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split(" "); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.splice( i--, 0, current ); + } + + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s["throws"] ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; + } + } + } + } + + // Update prev for next iteration + prev = current; + } + } + + return { state: "success", data: response }; +} +var oldCallbacks = [], + rquestion = /\?/, + rjsonp = /(=)\?(?=&|$)|\?\?/, + nonce = jQuery.now(); + +// Default jsonp settings +jQuery.ajaxSetup({ + jsonp: "callback", + jsonpCallback: function() { + var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); + this[ callback ] = true; + return callback; + } +}); + +// Detect, normalize options and install callbacks for jsonp requests +jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { + + var callbackName, overwritten, responseContainer, + data = s.data, + url = s.url, + hasCallback = s.jsonp !== false, + replaceInUrl = hasCallback && rjsonp.test( url ), + replaceInData = hasCallback && !replaceInUrl && typeof data === "string" && + !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && + rjsonp.test( data ); + + // Handle iff the expected data type is "jsonp" or we have a parameter to set + if ( s.dataTypes[ 0 ] === "jsonp" || replaceInUrl || replaceInData ) { + + // Get callback name, remembering preexisting value associated with it + callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? + s.jsonpCallback() : + s.jsonpCallback; + overwritten = window[ callbackName ]; + + // Insert callback into url or form data + if ( replaceInUrl ) { + s.url = url.replace( rjsonp, "$1" + callbackName ); + } else if ( replaceInData ) { + s.data = data.replace( rjsonp, "$1" + callbackName ); + } else if ( hasCallback ) { + s.url += ( rquestion.test( url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; + } + + // Use data converter to retrieve json after script execution + s.converters["script json"] = function() { + if ( !responseContainer ) { + jQuery.error( callbackName + " was not called" ); + } + return responseContainer[ 0 ]; + }; + + // force json dataType + s.dataTypes[ 0 ] = "json"; + + // Install callback + window[ callbackName ] = function() { + responseContainer = arguments; + }; + + // Clean-up function (fires after converters) + jqXHR.always(function() { + // Restore preexisting value + window[ callbackName ] = overwritten; + + // Save back as free + if ( s[ callbackName ] ) { + // make sure that re-using the options doesn't screw things around + s.jsonpCallback = originalSettings.jsonpCallback; + + // save the callback name for future use + oldCallbacks.push( callbackName ); + } + + // Call if it was a function and we have a response + if ( responseContainer && jQuery.isFunction( overwritten ) ) { + overwritten( responseContainer[ 0 ] ); + } + + responseContainer = overwritten = undefined; + }); + + // Delegate to script + return "script"; + } +}); +// Install script dataType +jQuery.ajaxSetup({ + accepts: { + script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /javascript|ecmascript/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +}); + +// Handle cache's special case and global +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + s.global = false; + } +}); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function(s) { + + // This transport only deals with cross domain requests + if ( s.crossDomain ) { + + var script, + head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement; + + return { + + send: function( _, callback ) { + + script = document.createElement( "script" ); + + script.async = "async"; + + if ( s.scriptCharset ) { + script.charset = s.scriptCharset; + } + + script.src = s.url; + + // Attach handlers for all browsers + script.onload = script.onreadystatechange = function( _, isAbort ) { + + if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { + + // Handle memory leak in IE + script.onload = script.onreadystatechange = null; + + // Remove the script + if ( head && script.parentNode ) { + head.removeChild( script ); + } + + // Dereference the script + script = undefined; + + // Callback if not abort + if ( !isAbort ) { + callback( 200, "success" ); + } + } + }; + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709 and #4378). + head.insertBefore( script, head.firstChild ); + }, + + abort: function() { + if ( script ) { + script.onload( 0, 1 ); + } + } + }; + } +}); +var xhrCallbacks, + // #5280: Internet Explorer will keep connections alive if we don't abort on unload + xhrOnUnloadAbort = window.ActiveXObject ? function() { + // Abort all pending requests + for ( var key in xhrCallbacks ) { + xhrCallbacks[ key ]( 0, 1 ); + } + } : false, + xhrId = 0; + +// Functions to create xhrs +function createStandardXHR() { + try { + return new window.XMLHttpRequest(); + } catch( e ) {} +} + +function createActiveXHR() { + try { + return new window.ActiveXObject( "Microsoft.XMLHTTP" ); + } catch( e ) {} +} + +// Create the request object +// (This is still attached to ajaxSettings for backward compatibility) +jQuery.ajaxSettings.xhr = window.ActiveXObject ? + /* Microsoft failed to properly + * implement the XMLHttpRequest in IE7 (can't request local files), + * so we use the ActiveXObject when it is available + * Additionally XMLHttpRequest can be disabled in IE7/IE8 so + * we need a fallback. + */ + function() { + return !this.isLocal && createStandardXHR() || createActiveXHR(); + } : + // For all other browsers, use the standard XMLHttpRequest object + createStandardXHR; + +// Determine support properties +(function( xhr ) { + jQuery.extend( jQuery.support, { + ajax: !!xhr, + cors: !!xhr && ( "withCredentials" in xhr ) + }); +})( jQuery.ajaxSettings.xhr() ); + +// Create transport if the browser can provide an xhr +if ( jQuery.support.ajax ) { + + jQuery.ajaxTransport(function( s ) { + // Cross domain only allowed if supported through XMLHttpRequest + if ( !s.crossDomain || jQuery.support.cors ) { + + var callback; + + return { + send: function( headers, complete ) { + + // Get a new xhr + var handle, i, + xhr = s.xhr(); + + // Open the socket + // Passing null username, generates a login popup on Opera (#2865) + if ( s.username ) { + xhr.open( s.type, s.url, s.async, s.username, s.password ); + } else { + xhr.open( s.type, s.url, s.async ); + } + + // Apply custom fields if provided + if ( s.xhrFields ) { + for ( i in s.xhrFields ) { + xhr[ i ] = s.xhrFields[ i ]; + } + } + + // Override mime type if needed + if ( s.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( s.mimeType ); + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !s.crossDomain && !headers["X-Requested-With"] ) { + headers[ "X-Requested-With" ] = "XMLHttpRequest"; + } + + // Need an extra try/catch for cross domain requests in Firefox 3 + try { + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + } catch( _ ) {} + + // Do send the request + // This may raise an exception which is actually + // handled in jQuery.ajax (so no try/catch here) + xhr.send( ( s.hasContent && s.data ) || null ); + + // Listener + callback = function( _, isAbort ) { + + var status, + statusText, + responseHeaders, + responses, + xml; + + // Firefox throws exceptions when accessing properties + // of an xhr when a network error occurred + // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) + try { + + // Was never called and is aborted or complete + if ( callback && ( isAbort || xhr.readyState === 4 ) ) { + + // Only called once + callback = undefined; + + // Do not keep as active anymore + if ( handle ) { + xhr.onreadystatechange = jQuery.noop; + if ( xhrOnUnloadAbort ) { + delete xhrCallbacks[ handle ]; + } + } + + // If it's an abort + if ( isAbort ) { + // Abort it manually if needed + if ( xhr.readyState !== 4 ) { + xhr.abort(); + } + } else { + status = xhr.status; + responseHeaders = xhr.getAllResponseHeaders(); + responses = {}; + xml = xhr.responseXML; + + // Construct response list + if ( xml && xml.documentElement /* #4958 */ ) { + responses.xml = xml; + } + + // When requesting binary data, IE6-9 will throw an exception + // on any attempt to access responseText (#11426) + try { + responses.text = xhr.responseText; + } catch( e ) { + } + + // Firefox throws an exception when accessing + // statusText for faulty cross-domain requests + try { + statusText = xhr.statusText; + } catch( e ) { + // We normalize with Webkit giving an empty statusText + statusText = ""; + } + + // Filter status for non standard behaviors + + // If the request is local and we have data: assume a success + // (success with no data won't get notified, that's the best we + // can do given current implementations) + if ( !status && s.isLocal && !s.crossDomain ) { + status = responses.text ? 200 : 404; + // IE - #1450: sometimes returns 1223 when it should be 204 + } else if ( status === 1223 ) { + status = 204; + } + } + } + } catch( firefoxAccessException ) { + if ( !isAbort ) { + complete( -1, firefoxAccessException ); + } + } + + // Call complete if needed + if ( responses ) { + complete( status, statusText, responses, responseHeaders ); + } + }; + + if ( !s.async ) { + // if we're in sync mode we fire the callback + callback(); + } else if ( xhr.readyState === 4 ) { + // (IE6 & IE7) if it's in cache and has been + // retrieved directly we need to fire the callback + setTimeout( callback, 0 ); + } else { + handle = ++xhrId; + if ( xhrOnUnloadAbort ) { + // Create the active xhrs callbacks list if needed + // and attach the unload handler + if ( !xhrCallbacks ) { + xhrCallbacks = {}; + jQuery( window ).unload( xhrOnUnloadAbort ); + } + // Add to list of active xhrs callbacks + xhrCallbacks[ handle ] = callback; + } + xhr.onreadystatechange = callback; + } + }, + + abort: function() { + if ( callback ) { + callback(0,1); + } + } + }; + } + }); +} +var fxNow, timerId, + rfxtypes = /^(?:toggle|show|hide)$/, + rfxnum = new RegExp( "^(?:([-+])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), + rrun = /queueHooks$/, + animationPrefilters = [ defaultPrefilter ], + tweeners = { + "*": [function( prop, value ) { + var end, unit, + tween = this.createTween( prop, value ), + parts = rfxnum.exec( value.toString() ), + target = tween.cur(), + start = +target || 0, + scale = 1, + maxIterations = 20; + + if ( parts ) { + end = +parts[2]; + unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + + // We need to compute starting value + if ( unit !== "px" && start ) { + // Iteratively approximate from a nonzero starting point + // Prefer the current property, because this process will be trivial if it uses the same units + // Fallback to end or a simple constant + start = jQuery.css( tween.elem, prop, true ) || end || 1; + + do { + // If previous iteration zeroed out, double until we get *something* + // Use a string for doubling factor so we don't accidentally see scale as unchanged below + scale = scale || ".5"; + + // Adjust and apply + start = start / scale; + jQuery.style( tween.elem, prop, start + unit ); + + // Update scale, tolerating zero or NaN from tween.cur() + // And breaking the loop if scale is unchanged or perfect, or if we've just had enough + } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations ); + } + + tween.unit = unit; + tween.start = start; + // If a +=/-= token was provided, we're doing a relative animation + tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end; + } + return tween; + }] + }; + +// Animations created synchronously will run synchronously +function createFxNow() { + setTimeout(function() { + fxNow = undefined; + }, 0 ); + return ( fxNow = jQuery.now() ); +} + +function createTweens( animation, props ) { + jQuery.each( props, function( prop, value ) { + var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( collection[ index ].call( animation, prop, value ) ) { + + // we're done with this property + return; + } + } + }); +} + +function Animation( elem, properties, options ) { + var result, + index = 0, + tweenerIndex = 0, + length = animationPrefilters.length, + deferred = jQuery.Deferred().always( function() { + // don't match elem in the :animated selector + delete tick.elem; + }), + tick = function() { + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), + // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497) + temp = remaining / animation.duration || 0, + percent = 1 - temp, + index = 0, + length = animation.tweens.length; + + for ( ; index < length ; index++ ) { + animation.tweens[ index ].run( percent ); + } + + deferred.notifyWith( elem, [ animation, percent, remaining ]); + + if ( percent < 1 && length ) { + return remaining; + } else { + deferred.resolveWith( elem, [ animation ] ); + return false; + } + }, + animation = deferred.promise({ + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { specialEasing: {} }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end, easing ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, + // if we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + + for ( ; index < length ; index++ ) { + animation.tweens[ index ].run( 1 ); + } + + // resolve when we played the last frame + // otherwise, reject + if ( gotoEnd ) { + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); + } + return this; + } + }), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length ; index++ ) { + result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + return result; + } + } + + createTweens( animation, props ); + + if ( jQuery.isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } + + jQuery.fx.timer( + jQuery.extend( tick, { + anim: animation, + queue: animation.opts.queue, + elem: elem + }) + ); + + // attach callbacks from options + return animation.progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); +} + +function propFilter( props, specialEasing ) { + var index, name, easing, value, hooks; + + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = jQuery.camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( jQuery.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; + } + + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } + + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; + + // not quite $.extend, this wont overwrite keys already present. + // also - reusing 'index' from above because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } + } + } else { + specialEasing[ name ] = easing; + } + } +} + +jQuery.Animation = jQuery.extend( Animation, { + + tweener: function( props, callback ) { + if ( jQuery.isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.split(" "); + } + + var prop, + index = 0, + length = props.length; + + for ( ; index < length ; index++ ) { + prop = props[ index ]; + tweeners[ prop ] = tweeners[ prop ] || []; + tweeners[ prop ].unshift( callback ); + } + }, + + prefilter: function( callback, prepend ) { + if ( prepend ) { + animationPrefilters.unshift( callback ); + } else { + animationPrefilters.push( callback ); + } + } +}); + +function defaultPrefilter( elem, props, opts ) { + var index, prop, value, length, dataShow, toggle, tween, hooks, oldfire, + anim = this, + style = elem.style, + orig = {}, + handled = [], + hidden = elem.nodeType && isHidden( elem ); + + // handle queue: false promises + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; + } + hooks.unqueued++; + + anim.always(function() { + // doing this makes sure that the complete handler will be called + // before this completes + anim.always(function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + }); + }); + } + + // height/width overflow pass + if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { + // Make sure that nothing sneaks out + // Record all 3 overflow attributes because IE does not + // change the overflow attribute when overflowX and + // overflowY are set to the same value + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Set display property to inline-block for height/width + // animations on inline elements that are having width/height animated + if ( jQuery.css( elem, "display" ) === "inline" && + jQuery.css( elem, "float" ) === "none" ) { + + // inline-level elements accept inline-block; + // block-level elements need to be inline with layout + if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) { + style.display = "inline-block"; + + } else { + style.zoom = 1; + } + } + } + + if ( opts.overflow ) { + style.overflow = "hidden"; + if ( !jQuery.support.shrinkWrapBlocks ) { + anim.done(function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + }); + } + } + + + // show/hide pass + for ( index in props ) { + value = props[ index ]; + if ( rfxtypes.exec( value ) ) { + delete props[ index ]; + toggle = toggle || value === "toggle"; + if ( value === ( hidden ? "hide" : "show" ) ) { + continue; + } + handled.push( index ); + } + } + + length = handled.length; + if ( length ) { + dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} ); + if ( "hidden" in dataShow ) { + hidden = dataShow.hidden; + } + + // store state if its toggle - enables .stop().toggle() to "reverse" + if ( toggle ) { + dataShow.hidden = !hidden; + } + if ( hidden ) { + jQuery( elem ).show(); + } else { + anim.done(function() { + jQuery( elem ).hide(); + }); + } + anim.done(function() { + var prop; + jQuery.removeData( elem, "fxshow", true ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + }); + for ( index = 0 ; index < length ; index++ ) { + prop = handled[ index ]; + tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 ); + orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop ); + + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = tween.start; + if ( hidden ) { + tween.end = tween.start; + tween.start = prop === "width" || prop === "height" ? 1 : 0; + } + } + } + } +} + +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); +} +jQuery.Tween = Tween; + +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || "swing"; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; + + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + if ( this.options.duration ) { + this.pos = eased = jQuery.easing[ this.easing ]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ); + } else { + this.pos = eased = percent; + } + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; + } +}; + +Tween.prototype.init.prototype = Tween.prototype; + +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; + + if ( tween.elem[ tween.prop ] != null && + (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { + return tween.elem[ tween.prop ]; + } + + // passing any value as a 4th parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails + // so, simple values such as "10px" are parsed to Float. + // complex values such as "rotate(1rad)" are returned as is. + result = jQuery.css( tween.elem, tween.prop, false, "" ); + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { + // use step hook for back compat - use cssHook if its there - use .style if its + // available and use plain properties where available + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; + } + } + } +}; + +// Remove in 2.0 - this supports IE8's panic based approach +// to setting things on disconnected nodes + +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; + } + } +}; + +jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" || + // special check for .toggle( handler, handler, ... ) + ( !i && jQuery.isFunction( speed ) && jQuery.isFunction( easing ) ) ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +}); + +jQuery.fn.extend({ + fadeTo: function( speed, to, easing, callback ) { + + // show any hidden elements after setting opacity to 0 + return this.filter( isHidden ).css( "opacity", 0 ).show() + + // animate to the value specified + .end().animate({ opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); + + // Empty animations resolve immediately + if ( empty ) { + anim.stop( true ); + } + }; + + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; + + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue && type !== false ) { + this.queue( type || "fx", [] ); + } + + return this.each(function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = jQuery._data( this ); + + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); + } + } + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); + } + } + + // start the next in the queue if the last step wasn't forced + // timers currently will call their complete callbacks, which will dequeue + // but only if they were gotoEnd + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); + } + }); + } +}); + +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + attrs = { height: type }, + i = 0; + + // if we include width, step value is 1 to do all cssExpand values, + // if we don't include width, step value is 2 to skip over Left and Right + includeWidth = includeWidth? 1 : 0; + for( ; i < 4 ; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } + + if ( includeWidth ) { + attrs.opacity = attrs.width = type; + } + + return attrs; +} + +// Generate shortcuts for custom animations +jQuery.each({ + slideDown: genFx("show"), + slideUp: genFx("hide"), + slideToggle: genFx("toggle"), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +}); + +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + jQuery.isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing + }; + + opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : + opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; + + // normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function() { + if ( jQuery.isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; + + return opt; +}; + +jQuery.easing = { + linear: function( p ) { + return p; + }, + swing: function( p ) { + return 0.5 - Math.cos( p*Math.PI ) / 2; + } +}; + +jQuery.timers = []; +jQuery.fx = Tween.prototype.init; +jQuery.fx.tick = function() { + var timer, + timers = jQuery.timers, + i = 0; + + fxNow = jQuery.now(); + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + // Checks the timer has not already been removed + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } + fxNow = undefined; +}; + +jQuery.fx.timer = function( timer ) { + if ( timer() && jQuery.timers.push( timer ) && !timerId ) { + timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); + } +}; + +jQuery.fx.interval = 13; + +jQuery.fx.stop = function() { + clearInterval( timerId ); + timerId = null; +}; + +jQuery.fx.speeds = { + slow: 600, + fast: 200, + // Default speed + _default: 400 +}; + +// Back Compat <1.8 extension point +jQuery.fx.step = {}; + +if ( jQuery.expr && jQuery.expr.filters ) { + jQuery.expr.filters.animated = function( elem ) { + return jQuery.grep(jQuery.timers, function( fn ) { + return elem === fn.elem; + }).length; + }; +} +var rroot = /^(?:body|html)$/i; + +jQuery.fn.offset = function( options ) { + if ( arguments.length ) { + return options === undefined ? + this : + this.each(function( i ) { + jQuery.offset.setOffset( this, options, i ); + }); + } + + var docElem, body, win, clientTop, clientLeft, scrollTop, scrollLeft, + box = { top: 0, left: 0 }, + elem = this[ 0 ], + doc = elem && elem.ownerDocument; + + if ( !doc ) { + return; + } + + if ( (body = doc.body) === elem ) { + return jQuery.offset.bodyOffset( elem ); + } + + docElem = doc.documentElement; + + // Make sure it's not a disconnected DOM node + if ( !jQuery.contains( docElem, elem ) ) { + return box; + } + + // If we don't have gBCR, just use 0,0 rather than error + // BlackBerry 5, iOS 3 (original iPhone) + if ( typeof elem.getBoundingClientRect !== "undefined" ) { + box = elem.getBoundingClientRect(); + } + win = getWindow( doc ); + clientTop = docElem.clientTop || body.clientTop || 0; + clientLeft = docElem.clientLeft || body.clientLeft || 0; + scrollTop = win.pageYOffset || docElem.scrollTop; + scrollLeft = win.pageXOffset || docElem.scrollLeft; + return { + top: box.top + scrollTop - clientTop, + left: box.left + scrollLeft - clientLeft + }; +}; + +jQuery.offset = { + + bodyOffset: function( body ) { + var top = body.offsetTop, + left = body.offsetLeft; + + if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) { + top += parseFloat( jQuery.css(body, "marginTop") ) || 0; + left += parseFloat( jQuery.css(body, "marginLeft") ) || 0; + } + + return { top: top, left: left }; + }, + + setOffset: function( elem, options, i ) { + var position = jQuery.css( elem, "position" ); + + // set position first, in-case top/left are set even on static elem + if ( position === "static" ) { + elem.style.position = "relative"; + } + + var curElem = jQuery( elem ), + curOffset = curElem.offset(), + curCSSTop = jQuery.css( elem, "top" ), + curCSSLeft = jQuery.css( elem, "left" ), + calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, + props = {}, curPosition = {}, curTop, curLeft; + + // need to be able to calculate position if either top or left is auto and position is either absolute or fixed + if ( calculatePosition ) { + curPosition = curElem.position(); + curTop = curPosition.top; + curLeft = curPosition.left; + } else { + curTop = parseFloat( curCSSTop ) || 0; + curLeft = parseFloat( curCSSLeft ) || 0; + } + + if ( jQuery.isFunction( options ) ) { + options = options.call( elem, i, curOffset ); + } + + if ( options.top != null ) { + props.top = ( options.top - curOffset.top ) + curTop; + } + if ( options.left != null ) { + props.left = ( options.left - curOffset.left ) + curLeft; + } + + if ( "using" in options ) { + options.using.call( elem, props ); + } else { + curElem.css( props ); + } + } +}; + + +jQuery.fn.extend({ + + position: function() { + if ( !this[0] ) { + return; + } + + var elem = this[0], + + // Get *real* offsetParent + offsetParent = this.offsetParent(), + + // Get correct offsets + offset = this.offset(), + parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset(); + + // Subtract element margins + // note: when an element has margin: auto the offsetLeft and marginLeft + // are the same in Safari causing offset.left to incorrectly be 0 + offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0; + offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0; + + // Add offsetParent borders + parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0; + parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0; + + // Subtract the two offsets + return { + top: offset.top - parentOffset.top, + left: offset.left - parentOffset.left + }; + }, + + offsetParent: function() { + return this.map(function() { + var offsetParent = this.offsetParent || document.body; + while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) { + offsetParent = offsetParent.offsetParent; + } + return offsetParent || document.body; + }); + } +}); + + +// Create scrollLeft and scrollTop methods +jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { + var top = /Y/.test( prop ); + + jQuery.fn[ method ] = function( val ) { + return jQuery.access( this, function( elem, method, val ) { + var win = getWindow( elem ); + + if ( val === undefined ) { + return win ? (prop in win) ? win[ prop ] : + win.document.documentElement[ method ] : + elem[ method ]; + } + + if ( win ) { + win.scrollTo( + !top ? val : jQuery( win ).scrollLeft(), + top ? val : jQuery( win ).scrollTop() + ); + + } else { + elem[ method ] = val; + } + }, method, val, arguments.length, null ); + }; +}); + +function getWindow( elem ) { + return jQuery.isWindow( elem ) ? + elem : + elem.nodeType === 9 ? + elem.defaultView || elem.parentWindow : + false; +} +// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods +jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { + jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { + // margin is only for outerHeight, outerWidth + jQuery.fn[ funcName ] = function( margin, value ) { + var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), + extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); + + return jQuery.access( this, function( elem, type, value ) { + var doc; + + if ( jQuery.isWindow( elem ) ) { + // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there + // isn't a whole lot we can do. See pull request at this URL for discussion: + // https://github.com/jquery/jquery/pull/764 + return elem.document.documentElement[ "client" + name ]; + } + + // Get document width or height + if ( elem.nodeType === 9 ) { + doc = elem.documentElement; + + // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest + // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. + return Math.max( + elem.body[ "scroll" + name ], doc[ "scroll" + name ], + elem.body[ "offset" + name ], doc[ "offset" + name ], + doc[ "client" + name ] + ); + } + + return value === undefined ? + // Get width or height on the element, requesting but not forcing parseFloat + jQuery.css( elem, type, value, extra ) : + + // Set width or height on the element + jQuery.style( elem, type, value, extra ); + }, type, chainable ? margin : undefined, chainable, null ); + }; + }); +}); +// Expose jQuery to the global object +window.jQuery = window.$ = jQuery; + +// Expose jQuery as an AMD module, but only for AMD loaders that +// understand the issues with loading multiple versions of jQuery +// in a page that all might call define(). The loader will indicate +// they have special allowances for multiple jQuery versions by +// specifying define.amd.jQuery = true. Register as a named module, +// since jQuery can be concatenated with other files that may use define, +// but not use a proper concatenation script that understands anonymous +// AMD modules. A named AMD is safest and most robust way to register. +// Lowercase jquery is used because AMD module names are derived from +// file names, and jQuery is normally delivered in a lowercase file name. +// Do this after creating the global so that if an AMD module wants to call +// noConflict to hide this version of jQuery, it will work. +if ( typeof define === "function" && define.amd && define.amd.jQuery ) { + define( "jquery", [], function () { return jQuery; } ); +} + +})( window ); diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/resources/de/adesso/wickedcharts/showcase/progressBar.js b/showcase/wicked-charts-showcase-wicket15/src/main/resources/de/adesso/wickedcharts/showcase/progressBar.js new file mode 100644 index 00000000..d2a238ab --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket15/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-wicket15/src/main/webapp/js/jquery-1.8.3.min-IEfix.js b/showcase/wicked-charts-showcase-wicket15/src/main/webapp/js/jquery-1.8.3.min-IEfix.js new file mode 100644 index 00000000..012ab88e --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket15/src/main/webapp/js/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 = "
t
"; + 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>" ); + + 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>"); + + // 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 = /)<[^<]*)*<\/script>/gi, + rts = /([?&])_=[^&]*/, + rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, + + // Keep a copy of the old load method + _load = jQuery.fn.load, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + allTypes = ["*/"] + ["*"]; + +// #8138, IE may throw an exception when accessing +// a field from window.location if document.domain has been set +try { + ajaxLocation = location.href; +} catch( e ) { + // Use the href attribute of an A element + // since IE will modify it given document.location + ajaxLocation = document.createElement( "a" ); + ajaxLocation.href = ""; + ajaxLocation = ajaxLocation.href; +} + +// Segment location into parts +ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + var dataType, list, placeBefore, + dataTypes = dataTypeExpression.toLowerCase().split( core_rspace ), + i = 0, + length = dataTypes.length; + + if ( jQuery.isFunction( func ) ) { + // For each dataType in the dataTypeExpression + for ( ; i < length; i++ ) { + dataType = dataTypes[ i ]; + // We control if we're asked to add before + // any existing element + placeBefore = /^\+/.test( dataType ); + if ( placeBefore ) { + dataType = dataType.substr( 1 ) || "*"; + } + list = structure[ dataType ] = structure[ dataType ] || []; + // then we add to the structure accordingly + list[ placeBefore ? "unshift" : "push" ]( func ); + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, + dataType /* internal */, inspected /* internal */ ) { + + dataType = dataType || options.dataTypes[ 0 ]; + inspected = inspected || {}; + + inspected[ dataType ] = true; + + var selection, + list = structure[ dataType ], + i = 0, + length = list ? list.length : 0, + executeOnly = ( structure === prefilters ); + + for ( ; i < length && ( executeOnly || !selection ); i++ ) { + selection = list[ i ]( options, originalOptions, jqXHR ); + // If we got redirected to another dataType + // we try there if executing only and not done already + if ( typeof selection === "string" ) { + if ( !executeOnly || inspected[ selection ] ) { + selection = undefined; + } else { + options.dataTypes.unshift( selection ); + selection = inspectPrefiltersOrTransports( + structure, options, originalOptions, jqXHR, selection, inspected ); + } + } + } + // If we're only executing or nothing was selected + // we try the catchall dataType if not done already + if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) { + selection = inspectPrefiltersOrTransports( + structure, options, originalOptions, jqXHR, "*", inspected ); + } + // unnecessary when only executing (prefilters) + // but it'll be ignored by the caller in that case + return selection; +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes #9887 +function ajaxExtend( target, src ) { + var key, deep, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } +} + +jQuery.fn.load = function( url, params, callback ) { + if ( typeof url !== "string" && _load ) { + return _load.apply( this, arguments ); + } + + // Don't do a request if no elements are being requested + if ( !this.length ) { + return this; + } + + var selector, type, response, + self = this, + off = url.indexOf(" "); + + if ( off >= 0 ) { + selector = url.slice( off, url.length ); + url = url.slice( 0, off ); + } + + // If it's a function + if ( jQuery.isFunction( params ) ) { + + // We assume that it's the callback + callback = params; + params = undefined; + + // Otherwise, build a param string + } else if ( params && typeof params === "object" ) { + type = "POST"; + } + + // Request the remote document + jQuery.ajax({ + url: url, + + // if "type" variable is undefined, then "GET" method will be used + type: type, + dataType: "html", + data: params, + complete: function( jqXHR, status ) { + if ( callback ) { + self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); + } + } + }).done(function( responseText ) { + + // Save response for use in complete callback + response = arguments; + + // See if a selector was specified + self.html( selector ? + + // Create a dummy div to hold the results + jQuery("
") + + // inject the contents of the document in, removing the scripts + // to avoid any 'Permission Denied' errors in IE + .append( responseText.replace( rscript, "" ) ) + + // Locate the specified elements + .find( selector ) : + + // If not, just inject the full result + responseText ); + + }); + + return this; +}; + +// Attach a bunch of functions for handling common AJAX events +jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){ + jQuery.fn[ o ] = function( f ){ + return this.on( o, f ); + }; +}); + +jQuery.each( [ "get", "post" ], function( i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + // shift arguments if data argument was omitted + if ( jQuery.isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + return jQuery.ajax({ + type: method, + url: url, + data: data, + success: callback, + dataType: type + }); + }; +}); + +jQuery.extend({ + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + if ( settings ) { + // Building a settings object + ajaxExtend( target, jQuery.ajaxSettings ); + } else { + // Extending ajaxSettings + settings = target; + target = jQuery.ajaxSettings; + } + ajaxExtend( target, settings ); + return target; + }, + + ajaxSettings: { + url: ajaxLocation, + isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), + global: true, + type: "GET", + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + processData: true, + async: true, + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + throws: false, + traditional: false, + headers: {}, + */ + + accepts: { + xml: "application/xml, text/xml", + html: "text/html", + text: "text/plain", + json: "application/json, text/javascript", + "*": allTypes + }, + + contents: { + xml: /xml/, + html: /html/, + json: /json/ + }, + + responseFields: { + xml: "responseXML", + text: "responseText" + }, + + // List of data converters + // 1) key format is "source_type destination_type" (a single space in-between) + // 2) the catchall symbol "*" can be used for source_type + converters: { + + // Convert anything to text + "* text": window.String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": jQuery.parseJSON, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + context: true, + url: true + } + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var // ifModified key + ifModifiedKey, + // Response headers + responseHeadersString, + responseHeaders, + // transport + transport, + // timeout handle + timeoutTimer, + // Cross-domain detection vars + parts, + // To know if global events are to be dispatched + fireGlobals, + // Loop variable + i, + // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + // Callbacks context + callbackContext = s.context || s, + // Context for global events + // It's the callbackContext if one was provided in the options + // and if it's a DOM node or a jQuery collection + globalEventContext = callbackContext !== s && + ( callbackContext.nodeType || callbackContext instanceof jQuery ) ? + jQuery( callbackContext ) : jQuery.event, + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks( "once memory" ), + // Status-dependent callbacks + statusCode = s.statusCode || {}, + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + // The jqXHR state + state = 0, + // Default abort message + strAbort = "canceled", + // Fake xhr + jqXHR = { + + readyState: 0, + + // Caches the header + setRequestHeader: function( name, value ) { + if ( !state ) { + var lname = name.toLowerCase(); + name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Raw string + getAllResponseHeaders: function() { + return state === 2 ? responseHeadersString : null; + }, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( state === 2 ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while( ( match = rheaders.exec( responseHeadersString ) ) ) { + responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; + } + } + match = responseHeaders[ key.toLowerCase() ]; + } + return match === undefined ? null : match; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( !state ) { + s.mimeType = type; + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + statusText = statusText || strAbort; + if ( transport ) { + transport.abort( statusText ); + } + done( 0, statusText ); + return this; + } + }; + + // Callback for when everything is done + // It is defined here because jslint complains if it is declared + // at the end of the function (which would be more logical and readable) + function done( status, nativeStatusText, responses, headers ) { + var isSuccess, success, error, response, modified, + statusText = nativeStatusText; + + // Called once + if ( state === 2 ) { + return; + } + + // State is "done" now + state = 2; + + // Clear timeout if it exists + if ( timeoutTimer ) { + clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + // Get response data + if ( responses ) { + response = ajaxHandleResponses( s, jqXHR, responses ); + } + + // If successful, handle type chaining + if ( status >= 200 && status < 300 || status === 304 ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + + modified = jqXHR.getResponseHeader("Last-Modified"); + if ( modified ) { + jQuery.lastModified[ ifModifiedKey ] = modified; + } + modified = jqXHR.getResponseHeader("Etag"); + if ( modified ) { + jQuery.etag[ ifModifiedKey ] = modified; + } + } + + // If not modified + if ( status === 304 ) { + + statusText = "notmodified"; + isSuccess = true; + + // If we have data + } else { + + isSuccess = ajaxConvert( s, response ); + statusText = isSuccess.state; + success = isSuccess.data; + error = isSuccess.error; + isSuccess = !error; + } + } else { + // We extract error from statusText + // then normalize statusText and status for non-aborts + error = statusText; + if ( !statusText || status ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = ( nativeStatusText || statusText ) + ""; + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ), + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger( "ajaxStop" ); + } + } + } + + // Attach deferreds + deferred.promise( jqXHR ); + jqXHR.success = jqXHR.done; + jqXHR.error = jqXHR.fail; + jqXHR.complete = completeDeferred.add; + + // Status-dependent callbacks + jqXHR.statusCode = function( map ) { + if ( map ) { + var tmp; + if ( state < 2 ) { + for ( tmp in map ) { + statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ]; + } + } else { + tmp = map[ jqXHR.status ]; + jqXHR.always( tmp ); + } + } + return this; + }; + + // Remove hash character (#7531: and string promotion) + // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) + // We also use the url parameter if available + s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); + + // Extract dataTypes list + s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( core_rspace ); + + // A cross-domain request is in order when we have a protocol:host:port mismatch + if ( s.crossDomain == null ) { + parts = rurl.exec( s.url.toLowerCase() ); + s.crossDomain = !!( parts && + ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] || + ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != + ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) + ); + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefilter, stop there + if ( state === 2 ) { + return jqXHR; + } + + // We can fire global events as of now if asked to + fireGlobals = s.global; + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger( "ajaxStart" ); + } + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // If data is available, append data to url + if ( s.data ) { + s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data; + // #9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Get ifModifiedKey before adding the anti-cache parameter + ifModifiedKey = s.url; + + // Add anti-cache in url if needed + if ( s.cache === false ) { + + var ts = jQuery.now(), + // try replacing _= if it is there + ret = s.url.replace( rts, "$1_=" + ts ); + + // if nothing was replaced, add timestamp to the end + s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + ifModifiedKey = ifModifiedKey || s.url; + if ( jQuery.lastModified[ ifModifiedKey ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] ); + } + if ( jQuery.etag[ ifModifiedKey ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] ); + } + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? + s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { + // Abort if not done already and return + return jqXHR.abort(); + + } + + // aborting is no longer a cancellation + strAbort = "abort"; + + // Install callbacks on deferreds + for ( i in { success: 1, error: 1, complete: 1 } ) { + jqXHR[ i ]( s[ i ] ); + } + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = setTimeout( function(){ + jqXHR.abort( "timeout" ); + }, s.timeout ); + } + + try { + state = 1; + transport.send( requestHeaders, done ); + } catch (e) { + // Propagate exception as error if not done + if ( state < 2 ) { + done( -1, e ); + // Simply rethrow otherwise + } else { + throw e; + } + } + } + + return jqXHR; + }, + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {} + +}); + +/* Handles responses to an ajax request: + * - sets all responseXXX fields accordingly + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + + var ct, type, finalDataType, firstDataType, + contents = s.contents, + dataTypes = s.dataTypes, + responseFields = s.responseFields; + + // Fill responseXXX fields + for ( type in responseFields ) { + if ( type in responses ) { + jqXHR[ responseFields[type] ] = responses[ type ]; + } + } + + // Remove auto dataType and get content-type in the process + while( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader( "content-type" ); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +// Chain conversions given the request and the original response +function ajaxConvert( s, response ) { + + var conv, conv2, current, tmp, + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(), + prev = dataTypes[ 0 ], + converters = {}, + i = 0; + + // Apply the dataFilter if provided + if ( s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } + } + + // Convert to each sequential dataType, tolerating list modification + for ( ; (current = dataTypes[++i]); ) { + + // There's only work to do if current dataType is non-auto + if ( current !== "*" ) { + + // Convert response if prev dataType is non-auto and differs from current + if ( prev !== "*" && prev !== current ) { + + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split(" "); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.splice( i--, 0, current ); + } + + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s["throws"] ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; + } + } + } + } + + // Update prev for next iteration + prev = current; + } + } + + return { state: "success", data: response }; +} +var oldCallbacks = [], + rquestion = /\?/, + rjsonp = /(=)\?(?=&|$)|\?\?/, + nonce = jQuery.now(); + +// Default jsonp settings +jQuery.ajaxSetup({ + jsonp: "callback", + jsonpCallback: function() { + var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); + this[ callback ] = true; + return callback; + } +}); + +// Detect, normalize options and install callbacks for jsonp requests +jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { + + var callbackName, overwritten, responseContainer, + data = s.data, + url = s.url, + hasCallback = s.jsonp !== false, + replaceInUrl = hasCallback && rjsonp.test( url ), + replaceInData = hasCallback && !replaceInUrl && typeof data === "string" && + !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && + rjsonp.test( data ); + + // Handle iff the expected data type is "jsonp" or we have a parameter to set + if ( s.dataTypes[ 0 ] === "jsonp" || replaceInUrl || replaceInData ) { + + // Get callback name, remembering preexisting value associated with it + callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? + s.jsonpCallback() : + s.jsonpCallback; + overwritten = window[ callbackName ]; + + // Insert callback into url or form data + if ( replaceInUrl ) { + s.url = url.replace( rjsonp, "$1" + callbackName ); + } else if ( replaceInData ) { + s.data = data.replace( rjsonp, "$1" + callbackName ); + } else if ( hasCallback ) { + s.url += ( rquestion.test( url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; + } + + // Use data converter to retrieve json after script execution + s.converters["script json"] = function() { + if ( !responseContainer ) { + jQuery.error( callbackName + " was not called" ); + } + return responseContainer[ 0 ]; + }; + + // force json dataType + s.dataTypes[ 0 ] = "json"; + + // Install callback + window[ callbackName ] = function() { + responseContainer = arguments; + }; + + // Clean-up function (fires after converters) + jqXHR.always(function() { + // Restore preexisting value + window[ callbackName ] = overwritten; + + // Save back as free + if ( s[ callbackName ] ) { + // make sure that re-using the options doesn't screw things around + s.jsonpCallback = originalSettings.jsonpCallback; + + // save the callback name for future use + oldCallbacks.push( callbackName ); + } + + // Call if it was a function and we have a response + if ( responseContainer && jQuery.isFunction( overwritten ) ) { + overwritten( responseContainer[ 0 ] ); + } + + responseContainer = overwritten = undefined; + }); + + // Delegate to script + return "script"; + } +}); +// Install script dataType +jQuery.ajaxSetup({ + accepts: { + script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /javascript|ecmascript/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +}); + +// Handle cache's special case and global +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + s.global = false; + } +}); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function(s) { + + // This transport only deals with cross domain requests + if ( s.crossDomain ) { + + var script, + head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement; + + return { + + send: function( _, callback ) { + + script = document.createElement( "script" ); + + script.async = "async"; + + if ( s.scriptCharset ) { + script.charset = s.scriptCharset; + } + + script.src = s.url; + + // Attach handlers for all browsers + script.onload = script.onreadystatechange = function( _, isAbort ) { + + if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { + + // Handle memory leak in IE + script.onload = script.onreadystatechange = null; + + // Remove the script + if ( head && script.parentNode ) { + head.removeChild( script ); + } + + // Dereference the script + script = undefined; + + // Callback if not abort + if ( !isAbort ) { + callback( 200, "success" ); + } + } + }; + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709 and #4378). + head.insertBefore( script, head.firstChild ); + }, + + abort: function() { + if ( script ) { + script.onload( 0, 1 ); + } + } + }; + } +}); +var xhrCallbacks, + // #5280: Internet Explorer will keep connections alive if we don't abort on unload + xhrOnUnloadAbort = window.ActiveXObject ? function() { + // Abort all pending requests + for ( var key in xhrCallbacks ) { + xhrCallbacks[ key ]( 0, 1 ); + } + } : false, + xhrId = 0; + +// Functions to create xhrs +function createStandardXHR() { + try { + return new window.XMLHttpRequest(); + } catch( e ) {} +} + +function createActiveXHR() { + try { + return new window.ActiveXObject( "Microsoft.XMLHTTP" ); + } catch( e ) {} +} + +// Create the request object +// (This is still attached to ajaxSettings for backward compatibility) +jQuery.ajaxSettings.xhr = window.ActiveXObject ? + /* Microsoft failed to properly + * implement the XMLHttpRequest in IE7 (can't request local files), + * so we use the ActiveXObject when it is available + * Additionally XMLHttpRequest can be disabled in IE7/IE8 so + * we need a fallback. + */ + function() { + return !this.isLocal && createStandardXHR() || createActiveXHR(); + } : + // For all other browsers, use the standard XMLHttpRequest object + createStandardXHR; + +// Determine support properties +(function( xhr ) { + jQuery.extend( jQuery.support, { + ajax: !!xhr, + cors: !!xhr && ( "withCredentials" in xhr ) + }); +})( jQuery.ajaxSettings.xhr() ); + +// Create transport if the browser can provide an xhr +if ( jQuery.support.ajax ) { + + jQuery.ajaxTransport(function( s ) { + // Cross domain only allowed if supported through XMLHttpRequest + if ( !s.crossDomain || jQuery.support.cors ) { + + var callback; + + return { + send: function( headers, complete ) { + + // Get a new xhr + var handle, i, + xhr = s.xhr(); + + // Open the socket + // Passing null username, generates a login popup on Opera (#2865) + if ( s.username ) { + xhr.open( s.type, s.url, s.async, s.username, s.password ); + } else { + xhr.open( s.type, s.url, s.async ); + } + + // Apply custom fields if provided + if ( s.xhrFields ) { + for ( i in s.xhrFields ) { + xhr[ i ] = s.xhrFields[ i ]; + } + } + + // Override mime type if needed + if ( s.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( s.mimeType ); + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !s.crossDomain && !headers["X-Requested-With"] ) { + headers[ "X-Requested-With" ] = "XMLHttpRequest"; + } + + // Need an extra try/catch for cross domain requests in Firefox 3 + try { + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + } catch( _ ) {} + + // Do send the request + // This may raise an exception which is actually + // handled in jQuery.ajax (so no try/catch here) + xhr.send( ( s.hasContent && s.data ) || null ); + + // Listener + callback = function( _, isAbort ) { + + var status, + statusText, + responseHeaders, + responses, + xml; + + // Firefox throws exceptions when accessing properties + // of an xhr when a network error occurred + // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) + try { + + // Was never called and is aborted or complete + if ( callback && ( isAbort || xhr.readyState === 4 ) ) { + + // Only called once + callback = undefined; + + // Do not keep as active anymore + if ( handle ) { + xhr.onreadystatechange = jQuery.noop; + if ( xhrOnUnloadAbort ) { + delete xhrCallbacks[ handle ]; + } + } + + // If it's an abort + if ( isAbort ) { + // Abort it manually if needed + if ( xhr.readyState !== 4 ) { + xhr.abort(); + } + } else { + status = xhr.status; + responseHeaders = xhr.getAllResponseHeaders(); + responses = {}; + xml = xhr.responseXML; + + // Construct response list + if ( xml && xml.documentElement /* #4958 */ ) { + responses.xml = xml; + } + + // When requesting binary data, IE6-9 will throw an exception + // on any attempt to access responseText (#11426) + try { + responses.text = xhr.responseText; + } catch( e ) { + } + + // Firefox throws an exception when accessing + // statusText for faulty cross-domain requests + try { + statusText = xhr.statusText; + } catch( e ) { + // We normalize with Webkit giving an empty statusText + statusText = ""; + } + + // Filter status for non standard behaviors + + // If the request is local and we have data: assume a success + // (success with no data won't get notified, that's the best we + // can do given current implementations) + if ( !status && s.isLocal && !s.crossDomain ) { + status = responses.text ? 200 : 404; + // IE - #1450: sometimes returns 1223 when it should be 204 + } else if ( status === 1223 ) { + status = 204; + } + } + } + } catch( firefoxAccessException ) { + if ( !isAbort ) { + complete( -1, firefoxAccessException ); + } + } + + // Call complete if needed + if ( responses ) { + complete( status, statusText, responses, responseHeaders ); + } + }; + + if ( !s.async ) { + // if we're in sync mode we fire the callback + callback(); + } else if ( xhr.readyState === 4 ) { + // (IE6 & IE7) if it's in cache and has been + // retrieved directly we need to fire the callback + setTimeout( callback, 0 ); + } else { + handle = ++xhrId; + if ( xhrOnUnloadAbort ) { + // Create the active xhrs callbacks list if needed + // and attach the unload handler + if ( !xhrCallbacks ) { + xhrCallbacks = {}; + jQuery( window ).unload( xhrOnUnloadAbort ); + } + // Add to list of active xhrs callbacks + xhrCallbacks[ handle ] = callback; + } + xhr.onreadystatechange = callback; + } + }, + + abort: function() { + if ( callback ) { + callback(0,1); + } + } + }; + } + }); +} +var fxNow, timerId, + rfxtypes = /^(?:toggle|show|hide)$/, + rfxnum = new RegExp( "^(?:([-+])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), + rrun = /queueHooks$/, + animationPrefilters = [ defaultPrefilter ], + tweeners = { + "*": [function( prop, value ) { + var end, unit, + tween = this.createTween( prop, value ), + parts = rfxnum.exec( value.toString() ), + target = tween.cur(), + start = +target || 0, + scale = 1, + maxIterations = 20; + + if ( parts ) { + end = +parts[2]; + unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + + // We need to compute starting value + if ( unit !== "px" && start ) { + // Iteratively approximate from a nonzero starting point + // Prefer the current property, because this process will be trivial if it uses the same units + // Fallback to end or a simple constant + start = jQuery.css( tween.elem, prop, true ) || end || 1; + + do { + // If previous iteration zeroed out, double until we get *something* + // Use a string for doubling factor so we don't accidentally see scale as unchanged below + scale = scale || ".5"; + + // Adjust and apply + start = start / scale; + jQuery.style( tween.elem, prop, start + unit ); + + // Update scale, tolerating zero or NaN from tween.cur() + // And breaking the loop if scale is unchanged or perfect, or if we've just had enough + } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations ); + } + + tween.unit = unit; + tween.start = start; + // If a +=/-= token was provided, we're doing a relative animation + tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end; + } + return tween; + }] + }; + +// Animations created synchronously will run synchronously +function createFxNow() { + setTimeout(function() { + fxNow = undefined; + }, 0 ); + return ( fxNow = jQuery.now() ); +} + +function createTweens( animation, props ) { + jQuery.each( props, function( prop, value ) { + var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( collection[ index ].call( animation, prop, value ) ) { + + // we're done with this property + return; + } + } + }); +} + +function Animation( elem, properties, options ) { + var result, + index = 0, + tweenerIndex = 0, + length = animationPrefilters.length, + deferred = jQuery.Deferred().always( function() { + // don't match elem in the :animated selector + delete tick.elem; + }), + tick = function() { + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), + // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497) + temp = remaining / animation.duration || 0, + percent = 1 - temp, + index = 0, + length = animation.tweens.length; + + for ( ; index < length ; index++ ) { + animation.tweens[ index ].run( percent ); + } + + deferred.notifyWith( elem, [ animation, percent, remaining ]); + + if ( percent < 1 && length ) { + return remaining; + } else { + deferred.resolveWith( elem, [ animation ] ); + return false; + } + }, + animation = deferred.promise({ + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { specialEasing: {} }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end, easing ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, + // if we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + + for ( ; index < length ; index++ ) { + animation.tweens[ index ].run( 1 ); + } + + // resolve when we played the last frame + // otherwise, reject + if ( gotoEnd ) { + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); + } + return this; + } + }), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length ; index++ ) { + result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + return result; + } + } + + createTweens( animation, props ); + + if ( jQuery.isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } + + jQuery.fx.timer( + jQuery.extend( tick, { + anim: animation, + queue: animation.opts.queue, + elem: elem + }) + ); + + // attach callbacks from options + return animation.progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); +} + +function propFilter( props, specialEasing ) { + var index, name, easing, value, hooks; + + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = jQuery.camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( jQuery.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; + } + + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } + + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; + + // not quite $.extend, this wont overwrite keys already present. + // also - reusing 'index' from above because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } + } + } else { + specialEasing[ name ] = easing; + } + } +} + +jQuery.Animation = jQuery.extend( Animation, { + + tweener: function( props, callback ) { + if ( jQuery.isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.split(" "); + } + + var prop, + index = 0, + length = props.length; + + for ( ; index < length ; index++ ) { + prop = props[ index ]; + tweeners[ prop ] = tweeners[ prop ] || []; + tweeners[ prop ].unshift( callback ); + } + }, + + prefilter: function( callback, prepend ) { + if ( prepend ) { + animationPrefilters.unshift( callback ); + } else { + animationPrefilters.push( callback ); + } + } +}); + +function defaultPrefilter( elem, props, opts ) { + var index, prop, value, length, dataShow, toggle, tween, hooks, oldfire, + anim = this, + style = elem.style, + orig = {}, + handled = [], + hidden = elem.nodeType && isHidden( elem ); + + // handle queue: false promises + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; + } + hooks.unqueued++; + + anim.always(function() { + // doing this makes sure that the complete handler will be called + // before this completes + anim.always(function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + }); + }); + } + + // height/width overflow pass + if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { + // Make sure that nothing sneaks out + // Record all 3 overflow attributes because IE does not + // change the overflow attribute when overflowX and + // overflowY are set to the same value + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Set display property to inline-block for height/width + // animations on inline elements that are having width/height animated + if ( jQuery.css( elem, "display" ) === "inline" && + jQuery.css( elem, "float" ) === "none" ) { + + // inline-level elements accept inline-block; + // block-level elements need to be inline with layout + if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) { + style.display = "inline-block"; + + } else { + style.zoom = 1; + } + } + } + + if ( opts.overflow ) { + style.overflow = "hidden"; + if ( !jQuery.support.shrinkWrapBlocks ) { + anim.done(function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + }); + } + } + + + // show/hide pass + for ( index in props ) { + value = props[ index ]; + if ( rfxtypes.exec( value ) ) { + delete props[ index ]; + toggle = toggle || value === "toggle"; + if ( value === ( hidden ? "hide" : "show" ) ) { + continue; + } + handled.push( index ); + } + } + + length = handled.length; + if ( length ) { + dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} ); + if ( "hidden" in dataShow ) { + hidden = dataShow.hidden; + } + + // store state if its toggle - enables .stop().toggle() to "reverse" + if ( toggle ) { + dataShow.hidden = !hidden; + } + if ( hidden ) { + jQuery( elem ).show(); + } else { + anim.done(function() { + jQuery( elem ).hide(); + }); + } + anim.done(function() { + var prop; + jQuery.removeData( elem, "fxshow", true ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + }); + for ( index = 0 ; index < length ; index++ ) { + prop = handled[ index ]; + tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 ); + orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop ); + + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = tween.start; + if ( hidden ) { + tween.end = tween.start; + tween.start = prop === "width" || prop === "height" ? 1 : 0; + } + } + } + } +} + +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); +} +jQuery.Tween = Tween; + +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || "swing"; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; + + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + if ( this.options.duration ) { + this.pos = eased = jQuery.easing[ this.easing ]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ); + } else { + this.pos = eased = percent; + } + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; + } +}; + +Tween.prototype.init.prototype = Tween.prototype; + +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; + + if ( tween.elem[ tween.prop ] != null && + (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { + return tween.elem[ tween.prop ]; + } + + // passing any value as a 4th parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails + // so, simple values such as "10px" are parsed to Float. + // complex values such as "rotate(1rad)" are returned as is. + result = jQuery.css( tween.elem, tween.prop, false, "" ); + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { + // use step hook for back compat - use cssHook if its there - use .style if its + // available and use plain properties where available + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; + } + } + } +}; + +// Remove in 2.0 - this supports IE8's panic based approach +// to setting things on disconnected nodes + +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; + } + } +}; + +jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" || + // special check for .toggle( handler, handler, ... ) + ( !i && jQuery.isFunction( speed ) && jQuery.isFunction( easing ) ) ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +}); + +jQuery.fn.extend({ + fadeTo: function( speed, to, easing, callback ) { + + // show any hidden elements after setting opacity to 0 + return this.filter( isHidden ).css( "opacity", 0 ).show() + + // animate to the value specified + .end().animate({ opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); + + // Empty animations resolve immediately + if ( empty ) { + anim.stop( true ); + } + }; + + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; + + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue && type !== false ) { + this.queue( type || "fx", [] ); + } + + return this.each(function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = jQuery._data( this ); + + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); + } + } + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); + } + } + + // start the next in the queue if the last step wasn't forced + // timers currently will call their complete callbacks, which will dequeue + // but only if they were gotoEnd + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); + } + }); + } +}); + +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + attrs = { height: type }, + i = 0; + + // if we include width, step value is 1 to do all cssExpand values, + // if we don't include width, step value is 2 to skip over Left and Right + includeWidth = includeWidth? 1 : 0; + for( ; i < 4 ; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } + + if ( includeWidth ) { + attrs.opacity = attrs.width = type; + } + + return attrs; +} + +// Generate shortcuts for custom animations +jQuery.each({ + slideDown: genFx("show"), + slideUp: genFx("hide"), + slideToggle: genFx("toggle"), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +}); + +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + jQuery.isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing + }; + + opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : + opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; + + // normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function() { + if ( jQuery.isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; + + return opt; +}; + +jQuery.easing = { + linear: function( p ) { + return p; + }, + swing: function( p ) { + return 0.5 - Math.cos( p*Math.PI ) / 2; + } +}; + +jQuery.timers = []; +jQuery.fx = Tween.prototype.init; +jQuery.fx.tick = function() { + var timer, + timers = jQuery.timers, + i = 0; + + fxNow = jQuery.now(); + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + // Checks the timer has not already been removed + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } + fxNow = undefined; +}; + +jQuery.fx.timer = function( timer ) { + if ( timer() && jQuery.timers.push( timer ) && !timerId ) { + timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); + } +}; + +jQuery.fx.interval = 13; + +jQuery.fx.stop = function() { + clearInterval( timerId ); + timerId = null; +}; + +jQuery.fx.speeds = { + slow: 600, + fast: 200, + // Default speed + _default: 400 +}; + +// Back Compat <1.8 extension point +jQuery.fx.step = {}; + +if ( jQuery.expr && jQuery.expr.filters ) { + jQuery.expr.filters.animated = function( elem ) { + return jQuery.grep(jQuery.timers, function( fn ) { + return elem === fn.elem; + }).length; + }; +} +var rroot = /^(?:body|html)$/i; + +jQuery.fn.offset = function( options ) { + if ( arguments.length ) { + return options === undefined ? + this : + this.each(function( i ) { + jQuery.offset.setOffset( this, options, i ); + }); + } + + var docElem, body, win, clientTop, clientLeft, scrollTop, scrollLeft, + box = { top: 0, left: 0 }, + elem = this[ 0 ], + doc = elem && elem.ownerDocument; + + if ( !doc ) { + return; + } + + if ( (body = doc.body) === elem ) { + return jQuery.offset.bodyOffset( elem ); + } + + docElem = doc.documentElement; + + // Make sure it's not a disconnected DOM node + if ( !jQuery.contains( docElem, elem ) ) { + return box; + } + + // If we don't have gBCR, just use 0,0 rather than error + // BlackBerry 5, iOS 3 (original iPhone) + if ( typeof elem.getBoundingClientRect !== "undefined" ) { + box = elem.getBoundingClientRect(); + } + win = getWindow( doc ); + clientTop = docElem.clientTop || body.clientTop || 0; + clientLeft = docElem.clientLeft || body.clientLeft || 0; + scrollTop = win.pageYOffset || docElem.scrollTop; + scrollLeft = win.pageXOffset || docElem.scrollLeft; + return { + top: box.top + scrollTop - clientTop, + left: box.left + scrollLeft - clientLeft + }; +}; + +jQuery.offset = { + + bodyOffset: function( body ) { + var top = body.offsetTop, + left = body.offsetLeft; + + if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) { + top += parseFloat( jQuery.css(body, "marginTop") ) || 0; + left += parseFloat( jQuery.css(body, "marginLeft") ) || 0; + } + + return { top: top, left: left }; + }, + + setOffset: function( elem, options, i ) { + var position = jQuery.css( elem, "position" ); + + // set position first, in-case top/left are set even on static elem + if ( position === "static" ) { + elem.style.position = "relative"; + } + + var curElem = jQuery( elem ), + curOffset = curElem.offset(), + curCSSTop = jQuery.css( elem, "top" ), + curCSSLeft = jQuery.css( elem, "left" ), + calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, + props = {}, curPosition = {}, curTop, curLeft; + + // need to be able to calculate position if either top or left is auto and position is either absolute or fixed + if ( calculatePosition ) { + curPosition = curElem.position(); + curTop = curPosition.top; + curLeft = curPosition.left; + } else { + curTop = parseFloat( curCSSTop ) || 0; + curLeft = parseFloat( curCSSLeft ) || 0; + } + + if ( jQuery.isFunction( options ) ) { + options = options.call( elem, i, curOffset ); + } + + if ( options.top != null ) { + props.top = ( options.top - curOffset.top ) + curTop; + } + if ( options.left != null ) { + props.left = ( options.left - curOffset.left ) + curLeft; + } + + if ( "using" in options ) { + options.using.call( elem, props ); + } else { + curElem.css( props ); + } + } +}; + + +jQuery.fn.extend({ + + position: function() { + if ( !this[0] ) { + return; + } + + var elem = this[0], + + // Get *real* offsetParent + offsetParent = this.offsetParent(), + + // Get correct offsets + offset = this.offset(), + parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset(); + + // Subtract element margins + // note: when an element has margin: auto the offsetLeft and marginLeft + // are the same in Safari causing offset.left to incorrectly be 0 + offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0; + offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0; + + // Add offsetParent borders + parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0; + parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0; + + // Subtract the two offsets + return { + top: offset.top - parentOffset.top, + left: offset.left - parentOffset.left + }; + }, + + offsetParent: function() { + return this.map(function() { + var offsetParent = this.offsetParent || document.body; + while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) { + offsetParent = offsetParent.offsetParent; + } + return offsetParent || document.body; + }); + } +}); + + +// Create scrollLeft and scrollTop methods +jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { + var top = /Y/.test( prop ); + + jQuery.fn[ method ] = function( val ) { + return jQuery.access( this, function( elem, method, val ) { + var win = getWindow( elem ); + + if ( val === undefined ) { + return win ? (prop in win) ? win[ prop ] : + win.document.documentElement[ method ] : + elem[ method ]; + } + + if ( win ) { + win.scrollTo( + !top ? val : jQuery( win ).scrollLeft(), + top ? val : jQuery( win ).scrollTop() + ); + + } else { + elem[ method ] = val; + } + }, method, val, arguments.length, null ); + }; +}); + +function getWindow( elem ) { + return jQuery.isWindow( elem ) ? + elem : + elem.nodeType === 9 ? + elem.defaultView || elem.parentWindow : + false; +} +// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods +jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { + jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { + // margin is only for outerHeight, outerWidth + jQuery.fn[ funcName ] = function( margin, value ) { + var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), + extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); + + return jQuery.access( this, function( elem, type, value ) { + var doc; + + if ( jQuery.isWindow( elem ) ) { + // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there + // isn't a whole lot we can do. See pull request at this URL for discussion: + // https://github.com/jquery/jquery/pull/764 + return elem.document.documentElement[ "client" + name ]; + } + + // Get document width or height + if ( elem.nodeType === 9 ) { + doc = elem.documentElement; + + // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest + // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. + return Math.max( + elem.body[ "scroll" + name ], doc[ "scroll" + name ], + elem.body[ "offset" + name ], doc[ "offset" + name ], + doc[ "client" + name ] + ); + } + + return value === undefined ? + // Get width or height on the element, requesting but not forcing parseFloat + jQuery.css( elem, type, value, extra ) : + + // Set width or height on the element + jQuery.style( elem, type, value, extra ); + }, type, chainable ? margin : undefined, chainable, null ); + }; + }); +}); +// Expose jQuery to the global object +window.jQuery = window.$ = jQuery; + +// Expose jQuery as an AMD module, but only for AMD loaders that +// understand the issues with loading multiple versions of jQuery +// in a page that all might call define(). The loader will indicate +// they have special allowances for multiple jQuery versions by +// specifying define.amd.jQuery = true. Register as a named module, +// since jQuery can be concatenated with other files that may use define, +// but not use a proper concatenation script that understands anonymous +// AMD modules. A named AMD is safest and most robust way to register. +// Lowercase jquery is used because AMD module names are derived from +// file names, and jQuery is normally delivered in a lowercase file name. +// Do this after creating the global so that if an AMD module wants to call +// noConflict to hide this version of jQuery, it will work. +if ( typeof define === "function" && define.amd && define.amd.jQuery ) { + define( "jquery", [], function () { return jQuery; } ); +} + +})( window ); diff --git a/wicket/wicked-charts-wicket15/build.gradle b/wicket/wicked-charts-wicket15/build.gradle index a4492d6b..edd36237 100644 --- a/wicket/wicked-charts-wicket15/build.gradle +++ b/wicket/wicked-charts-wicket15/build.gradle @@ -1,5 +1,6 @@ dependencies { compile project(':highcharts-wrapper') + compile project(':chartjs-wrapper') compile 'org.apache.wicket:wicket-core:1.5.13' testCompile 'junit:junit:4.12' } \ No newline at end of file diff --git a/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/JavaScriptResourceRegistry.java b/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/JavaScriptResourceRegistry.java index 97f48870..8c910b6f 100644 --- a/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/JavaScriptResourceRegistry.java +++ b/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/JavaScriptResourceRegistry.java @@ -47,15 +47,12 @@ public void addToHeaderResponse(final IHeaderResponse response) { } else if (this.reference != null) { response.renderJavaScriptReference(this.reference); } else { - throw new IllegalStateException( - "A RegistryEntry must have at least a non-null url or a non-null reference!"); + throw new IllegalStateException("A RegistryEntry must have at least a non-null url or a non-null reference!"); } } } - public static final String DEFAULT_JQUERY_URL = "https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"; - public static final String DEFAULT_HIGHCHARTS_URL = "http://code.highcharts.com/4.1.10/highcharts.js"; public static final String DEFAULT_FUNNEL_URL = "http://code.highcharts.com/4.1.10/modules/funnel.js"; @@ -66,6 +63,14 @@ public void addToHeaderResponse(final IHeaderResponse response) { public static final String DEFAULT_HIGHCHARTS_EXPORTING_URL = "http://code.highcharts.com/4.1.10/modules/exporting.js"; + public static final String DEFAULT_CHARTJS_BUNDLE_URL = "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.bundle.min.js"; + + public static final String DEFAULT_CHARTJS_URL = "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js"; + + public static final String DEFAULT_MOMENTJS_URL = "https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.min.js"; + + public static final String DEFAULT_JQUERY_URL = "https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"; + public static JavaScriptResourceRegistry getInstance() { if (INSTANCE == null) { INSTANCE = new JavaScriptResourceRegistry(); @@ -77,13 +82,19 @@ public static JavaScriptResourceRegistry getInstance() { private RegistryEntry highchartsEntry = new RegistryEntry(DEFAULT_HIGHCHARTS_URL); + private RegistryEntry funnelEntry = new RegistryEntry(DEFAULT_FUNNEL_URL); + + private RegistryEntry heatmapEntry = new RegistryEntry(DEFAULT_HEATMAP_URL); + private RegistryEntry highchartsExportingEntry = new RegistryEntry(DEFAULT_HIGHCHARTS_EXPORTING_URL); private RegistryEntry highchartsMoreEntry = new RegistryEntry(DEFAULT_HIGHCHARTS_MORE_URL); - private RegistryEntry funnelEntry = new RegistryEntry(DEFAULT_FUNNEL_URL); + private RegistryEntry chartJsEntry = new RegistryEntry(DEFAULT_CHARTJS_URL); - private RegistryEntry heatmapEntry = new RegistryEntry(DEFAULT_HEATMAP_URL); + private RegistryEntry chartJsBundleEntry = new RegistryEntry(DEFAULT_CHARTJS_BUNDLE_URL); + + private RegistryEntry momentJsEntry = new RegistryEntry(DEFAULT_MOMENTJS_URL); private static JavaScriptResourceRegistry INSTANCE; @@ -115,32 +126,26 @@ public RegistryEntry getHeatmapEntry() { return this.heatmapEntry; } - /** - * Sets the {@link ResourceReference} to use to load the Highcharts module "funnel.js". - * Use this method if you want to include the javascript file in your web application. - * - * @param reference reference a resource to be used - */ - public void setFunnelReference(final ResourceReference reference) { - this.funnelEntry = new RegistryEntry(reference); + public RegistryEntry getChartJsEntry() { + return this.chartJsEntry; } - /** - * Sets the {@link ResourceReference} to use to load the Highcharts module "heatmap.js". - * Use this method if you want to include the javascript file in your web application. - * - * @param reference reference a resource to be used - */ - public void setHeatmapReference(final ResourceReference reference) { - this.heatmapEntry = new RegistryEntry(reference); + public RegistryEntry getChartJsBundle() { + return this.chartJsBundleEntry; + } + + public RegistryEntry getMomentJsentry() { + return this.momentJsEntry; } + + /** * Sets the {@link ResourceReference} to use to load the Highcharts exporting * javascript library (exporting.js). Use this method if you want to include * the javascript file in your web application. * - * @param reference reference a resource to be used + * @param reference reference a Resource to be used */ public void setHighchartsExportingReference(final ResourceReference reference) { this.highchartsExportingEntry = new RegistryEntry(reference); @@ -157,12 +162,32 @@ public void setHighchartsExportingReference(final String url) { this.highchartsExportingEntry = new RegistryEntry(url); } + /** + * Sets the {@link ResourceReference} to use to load the Highcharts module "funnel.js". + * Use this method if you want to include the javascript file in your web application. + * + * @param reference reference a Resource to be used + */ + public void setFunnelReference(final ResourceReference reference) { + this.funnelEntry = new RegistryEntry(reference); + } + + /** + * Sets the {@link ResourceReference} to use to load the Highcharts module "heatmap.js". + * Use this method if you want to include the javascript file in your web application. + * + * @param reference reference a Resource to be used + */ + public void setHeatmapReference(final ResourceReference reference) { + this.heatmapEntry = new RegistryEntry(reference); + } + /** * Sets the {@link ResourceReference} to use to load the Highcharts "more" * javascript library (highcharts-more.js). Use this method if you want to * include the javascript file in your web application. * - * @param reference reference a resource to be used + * @param reference reference a Resource to be used */ public void setHighchartsMoreReference(final ResourceReference reference) { this.highchartsMoreEntry = new RegistryEntry(reference); @@ -173,7 +198,7 @@ public void setHighchartsMoreReference(final ResourceReference reference) { * (highcharts-more.js). Use this method if you want to load the javascript * file from an external URL. * - * @param url String which specifies an url + * @param url String to specify an url */ public void setHighchartsMoreReference(final String url) { this.highchartsMoreEntry = new RegistryEntry(url); @@ -184,7 +209,7 @@ public void setHighchartsMoreReference(final String url) { * library (highcharts.js). Use this method if you want to include the * javascript file in your web application. * - * @param reference reference a resource to be used + * @param reference reference a Resource to be used */ public void setHighchartsReference(final ResourceReference reference) { this.highchartsEntry = new RegistryEntry(reference); @@ -206,7 +231,7 @@ public void setHighchartsReference(final String url) { * this method if you want to include the javascript file in your web * application. * - * @param reference reference a resource to be used + * @param reference reference a Resource to be used */ public void setJQueryReference(final ResourceReference reference) { this.jqueryEntry = new RegistryEntry(reference); @@ -222,4 +247,67 @@ public void setJQueryReference(final String url) { this.jqueryEntry = new RegistryEntry(url); } + /** + * Sets the {@link ResourceReference} to use to load Chart.js (chart.min.js).Use + * this method if you want to include the javascript file in your web + * application. + * + * @param reference reference a Resource to be used + */ + public void setChartJsReference(final ResourceReference reference) { + this.chartJsEntry = new RegistryEntry(reference); + } + + /** + * Sets the URL to use to load Chart.js (chart.min.js). Use this method if you want + * to load the javascript file from an external URL. + * + * @param url String which specifies an url + */ + public void setChartJsReference(final String url) { + this.chartJsEntry = new RegistryEntry(url); + } + + /** + * Sets the {@link ResourceReference} to use to load Chart.js bundled (chart.bundle.min.js).Use + * this method if you want to include the javascript file in your web + * application. + * + * @param reference reference a Resource to be used + */ + public void setChartJsBundleReference(final ResourceReference reference) { + this.chartJsBundleEntry= new RegistryEntry(reference); + } + + /** + * Sets the URL to use to load Chart.js bundled (chart.bundle.min.js). Use this method if you want + * to load the javascript file from an external URL. + * + * @param url String which specifies an url + */ + public void setChartJsBundleReference(final String url) { + this.chartJsBundleEntry= new RegistryEntry(url); + } + + /** + * Sets the {@link ResourceReference} to use to load Chart.js bundled (chart.bundle.min.js).Use + * this method if you want to include the javascript file in your web + * application. + * + * @param reference reference a Resource to be used + */ + public void setMomentJsReference(final ResourceReference reference) { + this.momentJsEntry= new RegistryEntry(reference); + } + + /** + * Sets the URL to use to load Chart.js bundled (chart.bundle.min.js). Use this method if you want + * to load the javascript file from an external URL. + * + * @param url String which specifies an url + */ + public void setMomentJsReference(final String url) { + this.momentJsEntry= new RegistryEntry(url); + } + } diff --git a/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/chartjs/Chart.java b/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/chartjs/Chart.java new file mode 100644 index 00000000..5e653bf6 --- /dev/null +++ b/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/chartjs/Chart.java @@ -0,0 +1,63 @@ +/** + * 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.wicket15.chartjs; + +import de.adesso.wickedcharts.chartjs.ChartConfiguration; +import de.adesso.wickedcharts.wicket15.chartjs.features.basic.ChartBehavior; +import org.apache.wicket.markup.html.WebMarkupContainer; + +/** + * A simple markup container to set up and display a chart. + * + * + * @author SvenWirz + */ +public class Chart extends WebMarkupContainer { + + private static final long serialVersionUID = 1L; + + private ChartConfiguration options; + + public Chart(final String id, final ChartConfiguration options) { + super(id); + this.options = options; + setOutputMarkupId(true); + add(createChartBehavior()); + } + + public ChartConfiguration getChartConfiguration() { + return this.options; + } + + + public void setChartConfiguration(final ChartConfiguration options) { + this.options = options; + } + + public String getJavaScriptVarName() { + return this.getMarkupId() + "Var"; + } + + /** + * Factory method for {@link ChartBehavior}s. May be overridden, if a custom + * implementation of {@link ChartBehavior} is needed. + * + * @return ChartBehavior object + */ + protected ChartBehavior createChartBehavior() { + return new ChartBehavior(this); + } + +} diff --git a/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/chartjs/JsonRendererFactory.java b/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/chartjs/JsonRendererFactory.java new file mode 100644 index 00000000..8c1e1333 --- /dev/null +++ b/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/chartjs/JsonRendererFactory.java @@ -0,0 +1,48 @@ +/** + * 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.wicket15.chartjs; + +import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer; + +/** + * Factory class responsible for creating a {@link JsonRenderer} instance that + * matches the needs of wicked-charts-wicket6. + * + * @author Tom Hombergs (tom.hombergs@gmail.com) + */ +public class JsonRendererFactory { + + private static final JsonRendererFactory INSTANCE = new JsonRendererFactory(); + + private static final JsonRenderer RENDERER = new JsonRenderer(); + + public static JsonRendererFactory getInstance() { + return INSTANCE; + } + + private JsonRendererFactory() { + } + + /** + * Returns the singleton instance of the {@link JsonRenderer} that is + * configured for Wicket 6.x. + * + * @return the singleton {@link JsonRenderer} + */ + public JsonRenderer getRenderer() { + return RENDERER; + } + +} diff --git a/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/chartjs/features/basic/ChartBehavior.java b/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/chartjs/features/basic/ChartBehavior.java new file mode 100644 index 00000000..e3349362 --- /dev/null +++ b/wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/chartjs/features/basic/ChartBehavior.java @@ -0,0 +1,110 @@ +/** + * 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.wicket15.chartjs.features.basic; + + +import de.adesso.wickedcharts.chartjs.ChartConfiguration; +import de.adesso.wickedcharts.chartjs.chartoptions.Options; +import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer; +import de.adesso.wickedcharts.wicket15.JavaScriptResourceRegistry; +import de.adesso.wickedcharts.wicket15.chartjs.Chart; +import de.adesso.wickedcharts.wicket15.chartjs.JsonRendererFactory; +import org.apache.wicket.Component; +import org.apache.wicket.behavior.Behavior; +import org.apache.wicket.markup.html.IHeaderResponse; + +import java.text.MessageFormat; + +/** + * This behavior takes in an {@link Options} object containing the configuration + * of a chart and calls the proper javascript to display the chart in the + * component to which this behavior is added. + * + * @author Tom Hombergs (tom.hombergs@gmail.com) + */ +public class ChartBehavior extends Behavior { + + private static final long serialVersionUID = 1L; + + private final Chart chart; + + /** + * Constructor. + * + * @param container The chart component + */ + public ChartBehavior(final Chart container) { + this.chart = container; + } + + /** + * Includes the javascript that calls the Highcharts library to visualize the + * chart. + * + * @param response the Wicket HeaderResponse + * @param options the options containing the data to display + * @param renderer the JsonRenderer responsible for rendering the options + * @param markupId the DOM ID of the chart component. + */ + protected void includeChartJavascript(final IHeaderResponse response, final ChartConfiguration options, + final JsonRenderer renderer, final String markupId) { + String chartVarname = this.chart.getJavaScriptVarName(); + String optionsVarname = markupId + "Options"; + String contextVarname = markupId + "ctx"; + String jsonOptions = renderer.toJson(options); + + if(options.getOptionalJavascript() == null) { + response.renderOnDomReadyJavaScript(MessageFormat.format( + "var {0} = {1};" + + "var {3} = document.getElementById(\"{4}\").getContext(\"2d\");" + + " window.{2} = new Chart({3},{0});", + optionsVarname, jsonOptions,chartVarname,contextVarname,markupId)); + } + else { + String optionalJavascript = options.getOptionalJavascript(); + String replacedVariablesInOptionalJavascript = optionalJavascript.replace("{0}", contextVarname); + response.renderOnDomReadyJavaScript(MessageFormat.format( + "{5} var {0} = {1};" + + "var {3} = document.getElementById(\"{4}\").getContext(\"2d\");" + + " window.{2} = new Chart({3},{0});", + optionsVarname, jsonOptions,chartVarname,contextVarname,markupId,replacedVariablesInOptionalJavascript)); + } + } + + private void includeJavascriptDependencies(final IHeaderResponse response, final ChartConfiguration options) { + JavaScriptResourceRegistry resourceRegistry = JavaScriptResourceRegistry.getInstance(); + resourceRegistry.getJQueryEntry().addToHeaderResponse(response); + resourceRegistry.getChartJsBundle().addToHeaderResponse(response); + resourceRegistry.getMomentJsentry().addToHeaderResponse(response); + } + + @Override + public void onConfigure(final Component component) { + super.onConfigure(component); + } + + @Override + public void renderHead(final Component component, final IHeaderResponse response) { + component.setOutputMarkupId(true); + final String id = component.getMarkupId(); + ChartConfiguration options = this.chart.getChartConfiguration(); + + JsonRenderer renderer = JsonRendererFactory.getInstance().getRenderer(); + includeJavascriptDependencies(response, options); + + includeChartJavascript(response, options, renderer, id); + } + +} From cb17570ebf22ea98d25830bcd842128095d57de0 Mon Sep 17 00:00:00 2001 From: max Date: Sat, 9 Jun 2018 15:39:22 +0200 Subject: [PATCH 08/23] added Chart.js support for Wicket 1.4 + Showcase --- .../build.gradle | 4 +- .../wickedcharts/showcase/ChartComponent.html | 22 + .../wickedcharts/showcase/ChartComponent.java | 26 ++ .../wickedcharts/showcase/CodeComponent.html | 6 + .../wickedcharts/showcase/CodeComponent.java | 23 + .../wickedcharts/showcase/Homepage.java | 183 -------- .../showcase/HomepageChartJs.html | 291 +++++++++++++ .../showcase/HomepageChartJs.java | 400 ++++++++++++++++++ ...{Homepage.html => HomepageHighcharts.html} | 5 +- .../showcase/HomepageHighcharts.java | 170 ++++++++ .../showcase/ShowcaseApplication.java | 9 +- .../showcase/SmallChartComponent.html | 22 + .../showcase/SmallChartComponent.java | 14 + ...eaLineBoundariesChartEndConfiguration.java | 64 +++ ...LineBoundariesChartFalseConfiguration.java | 62 +++ ...ineBoundariesChartOriginConfiguration.java | 64 +++ ...LineBoundariesChartStartConfiguration.java | 64 +++ .../BarChartHorizontalConfiguration.java | 65 +++ .../BarChartMultiAxisConfiguration.java | 79 ++++ .../BarChartStackedConfiguration.java | 87 ++++ .../BarChartStackedGroupConfiguration.java | 85 ++++ .../BarChartVerticalConfiguration.java | 60 +++ .../BubbleChartConfiguration.java | 102 +++++ .../ComboBarLineChartConfiguration.java | 63 +++ .../DataLabellingChartConfiguration.java | 71 ++++ .../DoughnutChartConfiguration.java | 49 +++ .../FilteringLabelsConfiguration.java | 67 +++ .../LegendPointStyleConfiguration.java | 70 +++ .../LineChartAreaDatasetConfiguration.java | 142 +++++++ .../LineChartBasicConfiguration.java | 71 ++++ .../LineChartInterpolatedConfiguration.java | 83 ++++ .../LineChartMultiAxisConfiguration.java | 75 ++++ .../LineChartProgressBarConfiguration.java | 94 ++++ .../LineChartStackedConfiguration.java | 76 ++++ .../LineChartSteppedAfterConfiguration.java | 65 +++ .../LineChartSteppedBeforeConfiguration.java | 64 +++ ...tWithDifferentPointSizesConfiguration.java | 93 ++++ .../LineStylesConfiguration.java | 79 ++++ .../LinearStepSizeConfiguration.java | 74 ++++ .../LogarithmicLineChartConfiguration.java | 71 ++++ .../LogarithmicScatterChartConfiguration.java | 84 ++++ .../configurations/MinMaxConfiguration.java | 59 +++ .../MinMaxSuggestedConfiguration.java | 59 +++ .../MultilineLabelsConfiguration.java | 68 +++ .../NonNumericConfiguration.java | 66 +++ .../OtherRadarChartConfiguration.java | 64 +++ .../configurations/PieChartConfiguration.java | 44 ++ .../PointStylesConfiguration.java | 181 ++++++++ .../PolarAreaChartConfiguration.java | 54 +++ .../RadarChartConfiguration.java | 97 +++++ .../ScatterChartConfiguration.java | 78 ++++ .../ScatterChartMultiAxisConfiguration.java | 90 ++++ .../TimeComboConfiguration.java | 86 ++++ .../configurations/TimeLineConfiguration.java | 125 ++++++ .../TimePointConfiguration.java | 137 ++++++ .../TimeSeriesConfiguration.java | 93 ++++ .../TooltipAverageConfiguration.java | 67 +++ .../TooltipBorderConfiguration.java | 61 +++ .../TooltipCallbacksConfiguration.java | 80 ++++ .../TooltipHtmlLineConfiguration.java | 63 +++ .../TooltipHtmlPieConfiguration.java | 58 +++ .../TooltipHtmlPointsConfiguration.java | 68 +++ .../TooltipNearestConfiguration.java | 68 +++ .../base/ShowcaseConfiguration.java | 59 +++ .../GridLineStylesConfiguration.java | 74 ++++ .../GridLinesBasicConfiguration.java | 69 +++ .../GridLinesChartAreaConfiguration.java | 27 ++ .../GridLinesDisplayFalseConfiguration.java | 25 ++ ...inesDisplayFalseNoBorderConfiguration.java | 25 ++ .../GridLinesTicksConfiguration.java | 28 ++ .../DatasetIntersectFalseConfiguration.java | 66 +++ .../DatasetIntersectTrueConfiguration.java | 66 +++ .../IndexIntersectFalseConfiguration.java | 66 +++ .../IndexIntersectTrueConfiguration.java | 66 +++ .../NearestIntersectFalseConfiguration.java | 66 +++ .../NearestIntersectTrueConfiguration.java | 66 +++ .../PointIntersectFalseConfiguration.java | 66 +++ .../PointIntersectTrueConfiguration.java | 66 +++ .../xIntersectFalseConfiguration.java | 66 +++ .../xIntersectTrueConfiguration.java | 66 +++ .../yIntersectFalseConfiguration.java | 66 +++ .../yIntersectTrueConfiguration.java | 66 +++ .../LegendPositionBottomConfiguration.java | 27 ++ ...LegendPositionChartBasicConfiguration.java | 54 +++ .../LegendPositionLeftConfiguration.java | 28 ++ .../LegendPositionRightConfiguration.java | 29 ++ .../LegendPositionTopConfiguration.java | 29 ++ .../showcase/links/ChartjsShowcaseLink.java | 15 + .../links/HighchartsShowcaseLink.java | 17 + .../links/SplineUpdatingChartLink.java | 35 ++ .../showcase/links/UpdateChartJsLink.java | 50 +++ .../showcase/links/UpdateChartLink.java | 81 ---- .../showcase/links/UpdateHighchartLink.java | 82 ++++ .../showcase/links/UpdateThemeLink.java | 54 +++ .../DataLabellingChartConfiguration.java | 4 +- wicket/wicked-charts-wicket14/build.gradle | 1 + .../wicket14/JavaScriptResourceRegistry.java | 188 +++++--- .../wickedcharts/wicket14/chartjs/Chart.java | 63 +++ .../wicket14/chartjs/JsonRendererFactory.java | 48 +++ .../chartjs/features/basic/ChartBehavior.java | 111 +++++ 100 files changed, 6756 insertions(+), 323 deletions(-) create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.html create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.html create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.java delete mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/Homepage.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.html create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.java rename showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/{Homepage.html => HomepageHighcharts.html} (98%) create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.html create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartEndConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartOriginConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartStartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartHorizontalConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartMultiAxisConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedGroupConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartVerticalConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/BubbleChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/ComboBarLineChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/DataLabellingChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/DoughnutChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/FilteringLabelsConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LegendPointStyleConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartAreaDatasetConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartBasicConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartInterpolatedConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartMultiAxisConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartProgressBarConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartStackedConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedAfterConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedBeforeConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartWithDifferentPointSizesConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineStylesConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LinearStepSizeConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicLineChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicScatterChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxSuggestedConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/MultilineLabelsConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/NonNumericConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/OtherRadarChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/PieChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/PointStylesConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/PolarAreaChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/RadarChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartMultiAxisConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeComboConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeLineConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimePointConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeSeriesConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipAverageConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipBorderConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipCallbacksConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlLineConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPieConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPointsConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipNearestConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/base/ShowcaseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLineStylesConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesBasicConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesChartAreaConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseNoBorderConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesTicksConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectTrueConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectTrueConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectTrueConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectTrueConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectTrueConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectTrueConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionBottomConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionChartBasicConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionLeftConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionRightConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionTopConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/ChartjsShowcaseLink.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/HighchartsShowcaseLink.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartJsLink.java delete mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartLink.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateHighchartLink.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateThemeLink.java create mode 100644 wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/chartjs/Chart.java create mode 100644 wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/chartjs/JsonRendererFactory.java create mode 100644 wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/chartjs/features/basic/ChartBehavior.java diff --git a/showcase/wicked-charts-showcase-wicket14/build.gradle b/showcase/wicked-charts-showcase-wicket14/build.gradle index a00959c1..2abaac70 100644 --- a/showcase/wicked-charts-showcase-wicket14/build.gradle +++ b/showcase/wicked-charts-showcase-wicket14/build.gradle @@ -46,7 +46,9 @@ bootRun { jvmArgs '-Xdebug', '-Dserver.port=8080', '-Dwicket.configurationType=DEVELOPMENT', - '-Dspring.jpa.hibernate.ddl-auto=update' + '-Dspring.jpa.hibernate.ddl-auto=update', + '-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009' + } diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.html b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.html new file mode 100644 index 00000000..a83567a0 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket14/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-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..24ade6a7 --- /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")); + ((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-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/Homepage.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/Homepage.java deleted file mode 100644 index c60258e2..00000000 --- a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/Homepage.java +++ /dev/null @@ -1,183 +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 de.adesso.wickedcharts.highcharts.options.Options; -import de.adesso.wickedcharts.highcharts.theme.*; -import de.adesso.wickedcharts.showcase.links.UpdateChartLink; -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; - -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..b3bb9a74 --- /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 + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+
+
+
+ +
+ + + +
+ + + +
+ +

+ Show Java code + » +

+
+ + +
+

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));
+
+
+
+ +
+ +
+ +
+ +
+
+

© Wicked Charts 2012-2018

+
+
+ + + + + + + + + + + + + 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..c72c9e8b --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.java @@ -0,0 +1,400 @@ +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.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.AbstractMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +/** + * 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/Homepage.html b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.html similarity index 98% rename from showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/Homepage.html rename to showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.html index c74bff1e..600b57d0 100644 --- 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/HomepageHighcharts.html @@ -67,10 +67,11 @@ WickedCharts + 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..b6f5380a --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.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; + +import de.adesso.wickedcharts.showcase.links.ChartjsShowcaseLink; +import de.adesso.wickedcharts.showcase.links.HighchartsShowcaseLink; +import de.adesso.wickedcharts.showcase.links.UpdateHighchartLink; +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.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 HomepageHighcharts extends WebPage { + + private static final long serialVersionUID = 1L; + + public HomepageHighcharts(final PageParameters parameters) { + Options options = this.getOptionsToDisplay(); + final Chart chart = new Chart("chart", options, new Theme()); + this.add(chart); + Label codeContainer = this.addCodeContainer(); + this.addChartLinks(chart, codeContainer); + this.add(new ChartjsShowcaseLink()); + this.add(new HighchartsShowcaseLink()); + } + + private void addChartLinks(final Chart chart, final Label codeContainer) { + this.add(new UpdateHighchartLink("line", chart, codeContainer, + new BasicLineOptions())); + this.add(new UpdateHighchartLink("splineWithSymbols", chart, codeContainer, + new SplineWithSymbolsOptions())); + this.add(new UpdateHighchartLink("irregularIntervals", chart, + codeContainer, new TimeDataWithIrregularIntervalsOptions())); + this.add(new UpdateHighchartLink("logarithmicAxis", chart, codeContainer, + new LogarithmicAxisOptions())); + this.add(new UpdateHighchartLink("scatter", chart, codeContainer, + new ScatterPlotOptions())); + + this.add(new UpdateHighchartLink("area", chart, codeContainer, + new BasicAreaOptions())); + this.add(new UpdateHighchartLink("areaWithNegativeValues", chart, + codeContainer, new AreaWithNegativeValuesOptions())); + + this.add(new UpdateHighchartLink("stackedAndGroupedColumn", chart, + codeContainer, new StackedAndGroupedColumnOptions())); + this.add(new UpdateHighchartLink("combo", chart, codeContainer, + new ComboOptions())); + this.add(new UpdateHighchartLink("donut", chart, codeContainer, + new DonutOptions())); + this.add(new UpdateHighchartLink("withDataLabels", chart, codeContainer, + new LineWithDataLabelsOptions())); + this.add(new UpdateHighchartLink("zoomableTimeSeries", chart, + codeContainer, new ZoomableTimeSeriesOptions(false))); + this.add(new UpdateHighchartLink("splineInverted", chart, codeContainer, + new SplineWithInvertedAxisOptions())); + this.add(new UpdateHighchartLink("splineWithPlotBands", chart, + codeContainer, new SplineWithPlotBandsOptions())); + this.add(new UpdateHighchartLink("polar", chart, codeContainer, + new PolarOptions())); + this.add(new UpdateHighchartLink("stackedArea", chart, codeContainer, + new StackedAreaOptions())); + this.add(new UpdateHighchartLink("percentageArea", chart, codeContainer, + new PercentageAreaOptions())); + this.add(new UpdateHighchartLink("areaMissing", chart, codeContainer, + new AreaMissingOptions())); + this.add(new UpdateHighchartLink("areaInverted", chart, codeContainer, + new AreaInvertedAxisOptions())); + + this.add(new UpdateHighchartLink("areaSpline", chart, codeContainer, + new AreaSplineOptions())); + this.add(new UpdateHighchartLink("basicBar", chart, codeContainer, + new BasicBarOptions())); + this.add(new UpdateHighchartLink("columnWithDrilldown", chart, + codeContainer, new ColumnWithDrilldownOptions())); + this.add(new UpdateHighchartLink("columnRotated", chart, codeContainer, + new ColumnWithRotatedLabelsOptions())); + this.add(new UpdateHighchartLink("stackedBar", chart, codeContainer, + new StackedBarOptions())); + this.add(new UpdateHighchartLink("barNegativeStack", chart, codeContainer, + new BarWithNegativeStackOptions())); + this.add(new UpdateHighchartLink("basicColumn", chart, codeContainer, + new BasicColumnOptions())); + this.add(new UpdateHighchartLink("columnWithNegativeValues", chart, + codeContainer, new ColumnWithNegativeValuesOptions())); + this.add(new UpdateHighchartLink("stackedColumn", chart, codeContainer, + new StackedColumnOptions())); + this.add(new UpdateHighchartLink("stackedPercentage", chart, codeContainer, + new StackedPercentageOptions())); + this.add(new UpdateHighchartLink("basicPie", chart, codeContainer, + new BasicPieOptions())); + this.add(new UpdateHighchartLink("pieWithGradient", chart, codeContainer, + new PieWithGradientOptions())); + this.add(new UpdateHighchartLink("pieWithLegend", chart, codeContainer, + new PieWithLegendOptions())); + this.add(new UpdateHighchartLink("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; + } +} 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 53ec4e35..e0c5648d 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 @@ -20,6 +20,7 @@ import org.apache.wicket.Response; 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.IndexedParamUrlCodingStrategy; import org.springframework.stereotype.Component; @@ -29,8 +30,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; } /** @@ -43,7 +44,9 @@ public void init() { JavaScriptResourceRegistry .getInstance() .setJQueryReference("js/jquery-1.8.1.min.js"); - mount(new IndexedParamUrlCodingStrategy("/start", Homepage.class)); + + mount(new HybridUrlCodingStrategy("/chartjs", HomepageChartJs.class)); + mount(new HybridUrlCodingStrategy("/highcharts", HomepageHighcharts.class)); } @Override 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/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..547beb6a --- /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.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; +import de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * + * 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..a2c63ad7 --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * + * 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..3c0baa8a --- /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.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; +import de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * + * 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..ccc16070 --- /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.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; +import de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * + * 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..78fc9874 --- /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 de.adesso.wickedcharts.chartjs.chartoptions.*; +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..65252988 --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..3aee22c5 --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..6d9f4cc8 --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..c443a754 --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..a9f8f048 --- /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.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; +import de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * + * 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..9d54a0d2 --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; + +/** + * + * 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..ad5aabc1 --- /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/resources/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..acc014ed --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/DoughnutChartConfiguration.java @@ -0,0 +1,49 @@ +package de.adesso.wickedcharts.showcase.configurations; + +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 de.adesso.wickedcharts.chartjs.chartoptions.*; +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..60c952dd --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * + * 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..248318ed --- /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.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; +import de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * + * 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..6d60fbf7 --- /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.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; +import de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * + * 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..040a2b08 --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * + * 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..23ed769f --- /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.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; +import de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * + * 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..012a83b5 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartMultiAxisConfiguration.java @@ -0,0 +1,75 @@ +package de.adesso.wickedcharts.showcase.configurations; + +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 de.adesso.wickedcharts.chartjs.chartoptions.*; +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..4d32a521 --- /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.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; +import de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * + * 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..c5345e01 --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * + * 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..2850418e --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * + * 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..e6794a83 --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * + * 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..5ee99675 --- /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.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; +import de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * + * 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..8e0f4864 --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * + * 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..abb82c0e --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * + * 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..d54c4330 --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * + * 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..7a5e8279 --- /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.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; +import de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..617cf9be --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; + +/** + * + * 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..594002b6 --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; + +/** + * + * 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..4947f5fd --- /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.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; +import de.adesso.wickedcharts.chartjs.chartoptions.*; + +/** + * + * 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..5801b65f --- /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.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; +import de.adesso.wickedcharts.chartjs.chartoptions.*; + +/** + * + * 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..49eb9a5e --- /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.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; +import de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..16fbdfab --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..f29ac554 --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..88eb8fde --- /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.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; +import de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..9d987384 --- /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.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; +import de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..fa7fd2cb --- /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.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; +import de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..1358b08c --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..3c3cc4eb --- /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.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; +import de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..2e2c0814 --- /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.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; +import de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..6b8b284a --- /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.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.*; +/** + * 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..3a261bdc --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..b9a1ceca --- /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.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; +import de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..06a6db8d --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..c4b6fa84 --- /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.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; +import de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..25a7ca27 --- /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.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; +import de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..57598d4e --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPointsConfiguration.java @@ -0,0 +1,68 @@ +package de.adesso.wickedcharts.showcase.configurations; + +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 de.adesso.wickedcharts.chartjs.chartoptions.*; +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..36ef78a2 --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; + +/** + * 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..5dee5bf9 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket14/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.chartoptions.*; +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..8a545834 --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..223d60f6 --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..bd515c00 --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..f13bc3d8 --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..323d745e --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..e0b5bac8 --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..76acb7b9 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectFalseConfiguration.java @@ -0,0 +1,66 @@ +package de.adesso.wickedcharts.showcase.configurations.interactions; + +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 de.adesso.wickedcharts.chartjs.chartoptions.*; +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..afef0bdc --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..6107a3d7 --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..6b0a4125 --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..079fda99 --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..e06d9307 --- /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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..14637492 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket14/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; +import de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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..5641cbdf --- /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.label.TextLabel; +import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue; +import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; + +import java.util.Arrays; +import de.adesso.wickedcharts.chartjs.chartoptions.*; +/** + * 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/SplineUpdatingChartLink.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java new file mode 100644 index 00000000..15de7c15 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java @@ -0,0 +1,35 @@ + +/** + * 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; + +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-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..4019fcb9 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartJsLink.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.HomepageChartJs; +import org.apache.wicket.PageParameters; +import org.apache.wicket.ajax.AjaxRequestTarget; +import org.apache.wicket.ajax.markup.html.AjaxLink; + +/** + * 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 AjaxLink { + + 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(final AjaxRequestTarget target) { + PageParameters params = new PageParameters(); + params.add("chart", chartVal); + setResponsePage(new HomepageChartJs(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 51ded2d0..00000000 --- a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartLink.java +++ /dev/null @@ -1,81 +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.showcase.ShowcaseSession; -import de.adesso.wickedcharts.showcase.StringFromResourceModel; -import de.adesso.wickedcharts.wicket14.highcharts.Chart; -import org.apache.wicket.ajax.AjaxRequestTarget; -import org.apache.wicket.ajax.markup.html.AjaxLink; -import org.apache.wicket.markup.html.basic.Label; - -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..dd491d09 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateHighchartLink.java @@ -0,0 +1,82 @@ +/** + * 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 UpdateHighchartLink 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 UpdateHighchartLink(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/UpdateThemeLink.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateThemeLink.java new file mode 100644 index 00000000..a338bb22 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateThemeLink.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.PageParameters; +import org.apache.wicket.ajax.AjaxRequestTarget; +import org.apache.wicket.ajax.markup.html.AjaxLink; + +/** + * 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 AjaxLink { + + 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(final AjaxRequestTarget target) { + 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/configurations/DataLabellingChartConfiguration.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/configurations/DataLabellingChartConfiguration.java index ad5aabc1..9e2d6573 100644 --- 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 @@ -24,9 +24,9 @@ public class DataLabellingChartConfiguration extends ShowcaseConfiguration { public DataLabellingChartConfiguration() { super(); setType(ChartType.BAR); - String optionalJavascript=readFile("de/adesso/wickedcharts/showcase/resources/dataLabellingPlugin.js"); + String optionalJavascript=readFile("de/adesso/wickedcharts/showcase/dataLabellingPlugin.js"); - setOptionalJavascript(new ArrayList()); + setOptionalJavascript(new ArrayList<>()); addOptionalJavascript(optionalJavascript); Data data = new Data(); diff --git a/wicket/wicked-charts-wicket14/build.gradle b/wicket/wicked-charts-wicket14/build.gradle index d4ee4db2..43b48954 100644 --- a/wicket/wicked-charts-wicket14/build.gradle +++ b/wicket/wicked-charts-wicket14/build.gradle @@ -1,5 +1,6 @@ dependencies { compile project(':highcharts-wrapper') + compile project(':chartjs-wrapper') compile 'org.apache.wicket:wicket:1.4.22' testCompile 'junit:junit:4.12' //we had a mistake here too } \ No newline at end of file diff --git a/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/JavaScriptResourceRegistry.java b/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/JavaScriptResourceRegistry.java index 6fc54716..8f7f5c42 100644 --- a/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/JavaScriptResourceRegistry.java +++ b/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/JavaScriptResourceRegistry.java @@ -17,15 +17,13 @@ import org.apache.wicket.ResourceReference; import org.apache.wicket.markup.html.IHeaderResponse; - /** * A registry for the JavaScript dependencies used by wicked-charts. By default, * all JavaScript references will be loaded from the web. If you want to package * your own JavaScript files or change the URLs, you can do so by calling the * setter methods from the init() method of your wicket application. - * + * * @author Tom Hombergs (tom.hombergs@gmail.com) - * */ public class JavaScriptResourceRegistry { @@ -49,24 +47,29 @@ public void addToHeaderResponse(final IHeaderResponse response) { } else if (this.reference != null) { response.renderJavascriptReference(this.reference); } else { - throw new IllegalStateException( - "A RegistryEntry must have at least a non-null url or a non-null reference!"); + throw new IllegalStateException("A RegistryEntry must have at least a non-null url or a non-null reference!"); } } } - public static final String DEFAULT_JQUERY_URL = "https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"; + public static final String DEFAULT_HIGHCHARTS_URL = "http://code.highcharts.com/4.1.10/highcharts.js"; + + public static final String DEFAULT_FUNNEL_URL = "http://code.highcharts.com/4.1.10/modules/funnel.js"; + + public static final String DEFAULT_HEATMAP_URL = "http://code.highcharts.com/4.1.10/modules/heatmap.js"; - public static final String DEFAULT_HIGHCHARTS_URL = "http://code.highcharts.com/4.1.10/highcharts.js"; + public static final String DEFAULT_HIGHCHARTS_MORE_URL = "http://code.highcharts.com/4.1.10/highcharts-more.js"; - public static final String DEFAULT_FUNNEL_URL = "http://code.highcharts.com/4.1.10/modules/funnel.js"; + public static final String DEFAULT_HIGHCHARTS_EXPORTING_URL = "http://code.highcharts.com/4.1.10/modules/exporting.js"; - public static final String DEFAULT_HEATMAP_URL = "http://code.highcharts.com/4.1.10/modules/heatmap.js"; + public static final String DEFAULT_CHARTJS_BUNDLE_URL = "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.bundle.min.js"; - public static final String DEFAULT_HIGHCHARTS_MORE_URL = "http://code.highcharts.com/4.1.10/highcharts-more.js"; + public static final String DEFAULT_CHARTJS_URL = "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js"; - public static final String DEFAULT_HIGHCHARTS_EXPORTING_URL = "http://code.highcharts.com/4.1.10/modules/exporting.js"; + public static final String DEFAULT_MOMENTJS_URL = "https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.min.js"; + + public static final String DEFAULT_JQUERY_URL = "https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"; public static JavaScriptResourceRegistry getInstance() { if (INSTANCE == null) { @@ -79,13 +82,19 @@ public static JavaScriptResourceRegistry getInstance() { private RegistryEntry highchartsEntry = new RegistryEntry(DEFAULT_HIGHCHARTS_URL); + private RegistryEntry funnelEntry = new RegistryEntry(DEFAULT_FUNNEL_URL); + + private RegistryEntry heatmapEntry = new RegistryEntry(DEFAULT_HEATMAP_URL); + private RegistryEntry highchartsExportingEntry = new RegistryEntry(DEFAULT_HIGHCHARTS_EXPORTING_URL); private RegistryEntry highchartsMoreEntry = new RegistryEntry(DEFAULT_HIGHCHARTS_MORE_URL); - private RegistryEntry funnelEntry = new RegistryEntry(DEFAULT_FUNNEL_URL); + private RegistryEntry chartJsEntry = new RegistryEntry(DEFAULT_CHARTJS_URL); + + private RegistryEntry chartJsBundleEntry = new RegistryEntry(DEFAULT_CHARTJS_BUNDLE_URL); - private RegistryEntry heatmapEntry = new RegistryEntry(DEFAULT_HEATMAP_URL); + private RegistryEntry momentJsEntry = new RegistryEntry(DEFAULT_MOMENTJS_URL); private static JavaScriptResourceRegistry INSTANCE; @@ -109,40 +118,34 @@ public RegistryEntry getJQueryEntry() { return this.jqueryEntry; } - public RegistryEntry getFunnelEntry() { - return this.funnelEntry; - } + public RegistryEntry getFunnelEntry() { + return this.funnelEntry; + } + + public RegistryEntry getHeatmapEntry() { + return this.heatmapEntry; + } + + public RegistryEntry getChartJsEntry() { + return this.chartJsEntry; + } - public RegistryEntry getHeatmapEntry() { - return this.heatmapEntry; - } + public RegistryEntry getChartJsBundle() { + return this.chartJsBundleEntry; + } + + public RegistryEntry getMomentJsentry() { + return this.momentJsEntry; + } - /** - * Sets the {@link ResourceReference} to use to load the Highcharts module "funnel.js". - * Use this method if you want to include the javascript file in your web application. - * - * @param reference reference a resource to be used - */ - public void setFunnelReference(final ResourceReference reference) { - this.funnelEntry = new RegistryEntry(reference); - } - /** - * Sets the {@link ResourceReference} to use to load the Highcharts module "heatmap.js". - * Use this method if you want to include the javascript file in your web application. - * - * @param reference reference a resource to be used - */ - public void setHeatmapReference(final ResourceReference reference) { - this.heatmapEntry = new RegistryEntry(reference); - } /** * Sets the {@link ResourceReference} to use to load the Highcharts exporting * javascript library (exporting.js). Use this method if you want to include * the javascript file in your web application. - * - * @param reference reference a resource to be used + * + * @param reference reference a Resource to be used */ public void setHighchartsExportingReference(final ResourceReference reference) { this.highchartsExportingEntry = new RegistryEntry(reference); @@ -152,19 +155,39 @@ public void setHighchartsExportingReference(final ResourceReference reference) { * Sets the URL to use to load the Highcharts exporting javascript library * (exporting.js). Use this method if you want to load the javascript file * from an external URL. - * - * @param url String which specifies an url + * + * @param url String which specifies an url */ public void setHighchartsExportingReference(final String url) { this.highchartsExportingEntry = new RegistryEntry(url); } + /** + * Sets the {@link ResourceReference} to use to load the Highcharts module "funnel.js". + * Use this method if you want to include the javascript file in your web application. + * + * @param reference reference a Resource to be used + */ + public void setFunnelReference(final ResourceReference reference) { + this.funnelEntry = new RegistryEntry(reference); + } + + /** + * Sets the {@link ResourceReference} to use to load the Highcharts module "heatmap.js". + * Use this method if you want to include the javascript file in your web application. + * + * @param reference reference a Resource to be used + */ + public void setHeatmapReference(final ResourceReference reference) { + this.heatmapEntry = new RegistryEntry(reference); + } + /** * Sets the {@link ResourceReference} to use to load the Highcharts "more" * javascript library (highcharts-more.js). Use this method if you want to * include the javascript file in your web application. - * - * @param reference reference a resource to be used + * + * @param reference reference a Resource to be used */ public void setHighchartsMoreReference(final ResourceReference reference) { this.highchartsMoreEntry = new RegistryEntry(reference); @@ -174,8 +197,8 @@ public void setHighchartsMoreReference(final ResourceReference reference) { * Sets the URL to use to load the Highcharts "more" javascript library * (highcharts-more.js). Use this method if you want to load the javascript * file from an external URL. - * - * @param url String which specifies an url + * + * @param url String to specify an url */ public void setHighchartsMoreReference(final String url) { this.highchartsMoreEntry = new RegistryEntry(url); @@ -185,8 +208,8 @@ public void setHighchartsMoreReference(final String url) { * Sets the {@link ResourceReference} to use to load the Highcharts javascript * library (highcharts.js). Use this method if you want to include the * javascript file in your web application. - * - * @param reference reference a resource to be used + * + * @param reference reference a Resource to be used */ public void setHighchartsReference(final ResourceReference reference) { this.highchartsEntry = new RegistryEntry(reference); @@ -196,8 +219,8 @@ public void setHighchartsReference(final ResourceReference reference) { * Sets the URL to use to load the Highcharts javascript library * (highcharts.js). Use this method if you want to load the javascript file * from an external URL. - * - * @param url String which specifies an url + * + * @param url String which specifies an url */ public void setHighchartsReference(final String url) { this.highchartsEntry = new RegistryEntry(url); @@ -207,8 +230,8 @@ public void setHighchartsReference(final String url) { * Sets the {@link ResourceReference} to use to load JQuery (jquery.js).Use * this method if you want to include the javascript file in your web * application. - * - * @param reference reference a resource to be used + * + * @param reference reference a Resource to be used */ public void setJQueryReference(final ResourceReference reference) { this.jqueryEntry = new RegistryEntry(reference); @@ -224,4 +247,67 @@ public void setJQueryReference(final String url) { this.jqueryEntry = new RegistryEntry(url); } + /** + * Sets the {@link ResourceReference} to use to load Chart.js (chart.min.js).Use + * this method if you want to include the javascript file in your web + * application. + * + * @param reference reference a Resource to be used + */ + public void setChartJsReference(final ResourceReference reference) { + this.chartJsEntry = new RegistryEntry(reference); + } + + /** + * Sets the URL to use to load Chart.js (chart.min.js). Use this method if you want + * to load the javascript file from an external URL. + * + * @param url String which specifies an url + */ + public void setChartJsReference(final String url) { + this.chartJsEntry = new RegistryEntry(url); + } + + /** + * Sets the {@link ResourceReference} to use to load Chart.js bundled (chart.bundle.min.js).Use + * this method if you want to include the javascript file in your web + * application. + * + * @param reference reference a Resource to be used + */ + public void setChartJsBundleReference(final ResourceReference reference) { + this.chartJsBundleEntry= new RegistryEntry(reference); + } + + /** + * Sets the URL to use to load Chart.js bundled (chart.bundle.min.js). Use this method if you want + * to load the javascript file from an external URL. + * + * @param url String which specifies an url + */ + public void setChartJsBundleReference(final String url) { + this.chartJsBundleEntry= new RegistryEntry(url); + } + + /** + * Sets the {@link ResourceReference} to use to load Chart.js bundled (chart.bundle.min.js).Use + * this method if you want to include the javascript file in your web + * application. + * + * @param reference reference a Resource to be used + */ + public void setMomentJsReference(final ResourceReference reference) { + this.momentJsEntry= new RegistryEntry(reference); + } + + /** + * Sets the URL to use to load Chart.js bundled (chart.bundle.min.js). Use this method if you want + * to load the javascript file from an external URL. + * + * @param url String which specifies an url + */ + public void setMomentJsReference(final String url) { + this.momentJsEntry= new RegistryEntry(url); + } + } diff --git a/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/chartjs/Chart.java b/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/chartjs/Chart.java new file mode 100644 index 00000000..858320ac --- /dev/null +++ b/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/chartjs/Chart.java @@ -0,0 +1,63 @@ +/** + * 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.wicket14.chartjs; + +import de.adesso.wickedcharts.chartjs.ChartConfiguration; +import de.adesso.wickedcharts.wicket14.chartjs.features.basic.ChartBehavior; +import org.apache.wicket.markup.html.WebMarkupContainer; + +/** + * A simple markup container to set up and display a chart. + * + * + * @author SvenWirz + */ +public class Chart extends WebMarkupContainer { + + private static final long serialVersionUID = 1L; + + private ChartConfiguration options; + + public Chart(final String id, final ChartConfiguration options) { + super(id); + this.options = options; + setOutputMarkupId(true); + add(createChartBehavior()); + } + + public ChartConfiguration getChartConfiguration() { + return this.options; + } + + + public void setChartConfiguration(final ChartConfiguration options) { + this.options = options; + } + + public String getJavaScriptVarName() { + return this.getMarkupId() + "Var"; + } + + /** + * Factory method for {@link ChartBehavior}s. May be overridden, if a custom + * implementation of {@link ChartBehavior} is needed. + * + * @return ChartBehavior object + */ + protected ChartBehavior createChartBehavior() { + return new ChartBehavior(this); + } + +} diff --git a/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/chartjs/JsonRendererFactory.java b/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/chartjs/JsonRendererFactory.java new file mode 100644 index 00000000..809be993 --- /dev/null +++ b/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/chartjs/JsonRendererFactory.java @@ -0,0 +1,48 @@ +/** + * 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.wicket14.chartjs; + +import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer; + +/** + * Factory class responsible for creating a {@link JsonRenderer} instance that + * matches the needs of wicked-charts-wicket6. + * + * @author Tom Hombergs (tom.hombergs@gmail.com) + */ +public class JsonRendererFactory { + + private static final JsonRendererFactory INSTANCE = new JsonRendererFactory(); + + private static final JsonRenderer RENDERER = new JsonRenderer(); + + public static JsonRendererFactory getInstance() { + return INSTANCE; + } + + private JsonRendererFactory() { + } + + /** + * Returns the singleton instance of the {@link JsonRenderer} that is + * configured for Wicket 6.x. + * + * @return the singleton {@link JsonRenderer} + */ + public JsonRenderer getRenderer() { + return RENDERER; + } + +} diff --git a/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/chartjs/features/basic/ChartBehavior.java b/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/chartjs/features/basic/ChartBehavior.java new file mode 100644 index 00000000..d1cc1c91 --- /dev/null +++ b/wicket/wicked-charts-wicket14/src/main/java/de/adesso/wickedcharts/wicket14/chartjs/features/basic/ChartBehavior.java @@ -0,0 +1,111 @@ +/** + * 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.wicket14.chartjs.features.basic; + + +import de.adesso.wickedcharts.chartjs.ChartConfiguration; +import de.adesso.wickedcharts.chartjs.chartoptions.Options; +import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer; +import de.adesso.wickedcharts.wicket14.JavaScriptResourceRegistry; +import de.adesso.wickedcharts.wicket14.chartjs.Chart; +import de.adesso.wickedcharts.wicket14.chartjs.JsonRendererFactory; +import org.apache.wicket.Component; +import org.apache.wicket.behavior.AbstractBehavior; +import org.apache.wicket.markup.html.IHeaderResponse; + +import java.text.MessageFormat; + +/** + * This behavior takes in an {@link Options} object containing the configuration + * of a chart and calls the proper javascript to display the chart in the + * component to which this behavior is added. + * + * @author Tom Hombergs (tom.hombergs@gmail.com) + */ +public class ChartBehavior extends AbstractBehavior { + + private static final long serialVersionUID = 1L; + + private final Chart chart; + + /** + * Constructor. + * + * @param container The chart component + */ + public ChartBehavior(final Chart container) { + this.chart = container; + } + + /** + * Includes the javascript that calls the Highcharts library to visualize the + * chart. + * + * @param response the Wicket HeaderResponse + * @param options the options containing the data to display + * @param renderer the JsonRenderer responsible for rendering the options + * @param markupId the DOM ID of the chart component. + */ + protected void includeChartJavascript(final IHeaderResponse response, final ChartConfiguration options, + final JsonRenderer renderer, final String markupId) { + String chartVarname = this.chart.getJavaScriptVarName(); + String optionsVarname = markupId + "Options"; + String contextVarname = markupId + "ctx"; + String jsonOptions = renderer.toJson(options); + + if(options.getOptionalJavascript() == null) { + response.renderOnDomReadyJavascript(MessageFormat.format( + "var {0} = {1};" + + "var {3} = document.getElementById(\"{4}\").getContext(\"2d\");" + + " window.{2} = new Chart({3},{0});", + optionsVarname, jsonOptions,chartVarname,contextVarname,markupId)); + } + else { + String optionalJavascript = options.getOptionalJavascript(); + String replacedVariablesInOptionalJavascript = optionalJavascript.replace("{0}", contextVarname); + response.renderOnDomReadyJavascript(MessageFormat.format( + "{5} var {0} = {1};" + + "var {3} = document.getElementById(\"{4}\").getContext(\"2d\");" + + " window.{2} = new Chart({3},{0});", + optionsVarname, jsonOptions,chartVarname,contextVarname,markupId,replacedVariablesInOptionalJavascript)); + } + } + + private void includeJavascriptDependencies(final IHeaderResponse response, final ChartConfiguration options) { + JavaScriptResourceRegistry resourceRegistry = JavaScriptResourceRegistry.getInstance(); + resourceRegistry.getJQueryEntry().addToHeaderResponse(response); + resourceRegistry.getChartJsBundle().addToHeaderResponse(response); + resourceRegistry.getMomentJsentry().addToHeaderResponse(response); + } + + @Override + public void onConfigure(final Component component) { + super.onConfigure(component); + } + + + @Override + public void renderHead(IHeaderResponse response) { + this.chart.setOutputMarkupId(true); + final String id = this.chart.getMarkupId(); + ChartConfiguration options = this.chart.getChartConfiguration(); + + JsonRenderer renderer = JsonRendererFactory.getInstance().getRenderer(); + includeJavascriptDependencies(response, options); + + includeChartJavascript(response, options, renderer, id); + } + +} From 00a96dc2453e740082a095e87dab398db67811f6 Mon Sep 17 00:00:00 2001 From: max Date: Sat, 9 Jun 2018 16:01:44 +0200 Subject: [PATCH 09/23] updated gradlew to 4.8 --- gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../showcase/customTooltip-Pie.js | 62 + .../showcase/customTooltip-Point.js | 28 + .../wickedcharts/showcase/customTooltip.js | 71 + .../showcase/dataLabellingPlugin.js | 33 + .../showcase/jquery-1.8.3.min-IEfix.js | 9473 +++++++++++++++++ .../wickedcharts/showcase/progressBar.js | 3 + 8 files changed, 9672 insertions(+), 2 deletions(-) create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Pie.js create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Point.js create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip.js create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/resources/de/adesso/wickedcharts/showcase/dataLabellingPlugin.js create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/resources/de/adesso/wickedcharts/showcase/jquery-1.8.3.min-IEfix.js create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/resources/de/adesso/wickedcharts/showcase/progressBar.js diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 568c50bf..9ec837b2 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.8-all.zip diff --git a/showcase/gradle/wrapper/gradle-wrapper.properties b/showcase/gradle/wrapper/gradle-wrapper.properties index ca004e74..238101c8 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.8-all.zip \ 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 = "
t
"; + 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>" ); + + 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>"); + + // 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 = /)<[^<]*)*<\/script>/gi, + rts = /([?&])_=[^&]*/, + rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, + + // Keep a copy of the old load method + _load = jQuery.fn.load, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + allTypes = ["*/"] + ["*"]; + +// #8138, IE may throw an exception when accessing +// a field from window.location if document.domain has been set +try { + ajaxLocation = location.href; +} catch( e ) { + // Use the href attribute of an A element + // since IE will modify it given document.location + ajaxLocation = document.createElement( "a" ); + ajaxLocation.href = ""; + ajaxLocation = ajaxLocation.href; +} + +// Segment location into parts +ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + var dataType, list, placeBefore, + dataTypes = dataTypeExpression.toLowerCase().split( core_rspace ), + i = 0, + length = dataTypes.length; + + if ( jQuery.isFunction( func ) ) { + // For each dataType in the dataTypeExpression + for ( ; i < length; i++ ) { + dataType = dataTypes[ i ]; + // We control if we're asked to add before + // any existing element + placeBefore = /^\+/.test( dataType ); + if ( placeBefore ) { + dataType = dataType.substr( 1 ) || "*"; + } + list = structure[ dataType ] = structure[ dataType ] || []; + // then we add to the structure accordingly + list[ placeBefore ? "unshift" : "push" ]( func ); + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, + dataType /* internal */, inspected /* internal */ ) { + + dataType = dataType || options.dataTypes[ 0 ]; + inspected = inspected || {}; + + inspected[ dataType ] = true; + + var selection, + list = structure[ dataType ], + i = 0, + length = list ? list.length : 0, + executeOnly = ( structure === prefilters ); + + for ( ; i < length && ( executeOnly || !selection ); i++ ) { + selection = list[ i ]( options, originalOptions, jqXHR ); + // If we got redirected to another dataType + // we try there if executing only and not done already + if ( typeof selection === "string" ) { + if ( !executeOnly || inspected[ selection ] ) { + selection = undefined; + } else { + options.dataTypes.unshift( selection ); + selection = inspectPrefiltersOrTransports( + structure, options, originalOptions, jqXHR, selection, inspected ); + } + } + } + // If we're only executing or nothing was selected + // we try the catchall dataType if not done already + if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) { + selection = inspectPrefiltersOrTransports( + structure, options, originalOptions, jqXHR, "*", inspected ); + } + // unnecessary when only executing (prefilters) + // but it'll be ignored by the caller in that case + return selection; +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes #9887 +function ajaxExtend( target, src ) { + var key, deep, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } +} + +jQuery.fn.load = function( url, params, callback ) { + if ( typeof url !== "string" && _load ) { + return _load.apply( this, arguments ); + } + + // Don't do a request if no elements are being requested + if ( !this.length ) { + return this; + } + + var selector, type, response, + self = this, + off = url.indexOf(" "); + + if ( off >= 0 ) { + selector = url.slice( off, url.length ); + url = url.slice( 0, off ); + } + + // If it's a function + if ( jQuery.isFunction( params ) ) { + + // We assume that it's the callback + callback = params; + params = undefined; + + // Otherwise, build a param string + } else if ( params && typeof params === "object" ) { + type = "POST"; + } + + // Request the remote document + jQuery.ajax({ + url: url, + + // if "type" variable is undefined, then "GET" method will be used + type: type, + dataType: "html", + data: params, + complete: function( jqXHR, status ) { + if ( callback ) { + self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); + } + } + }).done(function( responseText ) { + + // Save response for use in complete callback + response = arguments; + + // See if a selector was specified + self.html( selector ? + + // Create a dummy div to hold the results + jQuery("
") + + // inject the contents of the document in, removing the scripts + // to avoid any 'Permission Denied' errors in IE + .append( responseText.replace( rscript, "" ) ) + + // Locate the specified elements + .find( selector ) : + + // If not, just inject the full result + responseText ); + + }); + + return this; +}; + +// Attach a bunch of functions for handling common AJAX events +jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){ + jQuery.fn[ o ] = function( f ){ + return this.on( o, f ); + }; +}); + +jQuery.each( [ "get", "post" ], function( i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + // shift arguments if data argument was omitted + if ( jQuery.isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + return jQuery.ajax({ + type: method, + url: url, + data: data, + success: callback, + dataType: type + }); + }; +}); + +jQuery.extend({ + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + if ( settings ) { + // Building a settings object + ajaxExtend( target, jQuery.ajaxSettings ); + } else { + // Extending ajaxSettings + settings = target; + target = jQuery.ajaxSettings; + } + ajaxExtend( target, settings ); + return target; + }, + + ajaxSettings: { + url: ajaxLocation, + isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), + global: true, + type: "GET", + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + processData: true, + async: true, + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + throws: false, + traditional: false, + headers: {}, + */ + + accepts: { + xml: "application/xml, text/xml", + html: "text/html", + text: "text/plain", + json: "application/json, text/javascript", + "*": allTypes + }, + + contents: { + xml: /xml/, + html: /html/, + json: /json/ + }, + + responseFields: { + xml: "responseXML", + text: "responseText" + }, + + // List of data converters + // 1) key format is "source_type destination_type" (a single space in-between) + // 2) the catchall symbol "*" can be used for source_type + converters: { + + // Convert anything to text + "* text": window.String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": jQuery.parseJSON, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + context: true, + url: true + } + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var // ifModified key + ifModifiedKey, + // Response headers + responseHeadersString, + responseHeaders, + // transport + transport, + // timeout handle + timeoutTimer, + // Cross-domain detection vars + parts, + // To know if global events are to be dispatched + fireGlobals, + // Loop variable + i, + // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + // Callbacks context + callbackContext = s.context || s, + // Context for global events + // It's the callbackContext if one was provided in the options + // and if it's a DOM node or a jQuery collection + globalEventContext = callbackContext !== s && + ( callbackContext.nodeType || callbackContext instanceof jQuery ) ? + jQuery( callbackContext ) : jQuery.event, + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks( "once memory" ), + // Status-dependent callbacks + statusCode = s.statusCode || {}, + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + // The jqXHR state + state = 0, + // Default abort message + strAbort = "canceled", + // Fake xhr + jqXHR = { + + readyState: 0, + + // Caches the header + setRequestHeader: function( name, value ) { + if ( !state ) { + var lname = name.toLowerCase(); + name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Raw string + getAllResponseHeaders: function() { + return state === 2 ? responseHeadersString : null; + }, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( state === 2 ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while( ( match = rheaders.exec( responseHeadersString ) ) ) { + responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; + } + } + match = responseHeaders[ key.toLowerCase() ]; + } + return match === undefined ? null : match; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( !state ) { + s.mimeType = type; + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + statusText = statusText || strAbort; + if ( transport ) { + transport.abort( statusText ); + } + done( 0, statusText ); + return this; + } + }; + + // Callback for when everything is done + // It is defined here because jslint complains if it is declared + // at the end of the function (which would be more logical and readable) + function done( status, nativeStatusText, responses, headers ) { + var isSuccess, success, error, response, modified, + statusText = nativeStatusText; + + // Called once + if ( state === 2 ) { + return; + } + + // State is "done" now + state = 2; + + // Clear timeout if it exists + if ( timeoutTimer ) { + clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + // Get response data + if ( responses ) { + response = ajaxHandleResponses( s, jqXHR, responses ); + } + + // If successful, handle type chaining + if ( status >= 200 && status < 300 || status === 304 ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + + modified = jqXHR.getResponseHeader("Last-Modified"); + if ( modified ) { + jQuery.lastModified[ ifModifiedKey ] = modified; + } + modified = jqXHR.getResponseHeader("Etag"); + if ( modified ) { + jQuery.etag[ ifModifiedKey ] = modified; + } + } + + // If not modified + if ( status === 304 ) { + + statusText = "notmodified"; + isSuccess = true; + + // If we have data + } else { + + isSuccess = ajaxConvert( s, response ); + statusText = isSuccess.state; + success = isSuccess.data; + error = isSuccess.error; + isSuccess = !error; + } + } else { + // We extract error from statusText + // then normalize statusText and status for non-aborts + error = statusText; + if ( !statusText || status ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = ( nativeStatusText || statusText ) + ""; + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ), + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger( "ajaxStop" ); + } + } + } + + // Attach deferreds + deferred.promise( jqXHR ); + jqXHR.success = jqXHR.done; + jqXHR.error = jqXHR.fail; + jqXHR.complete = completeDeferred.add; + + // Status-dependent callbacks + jqXHR.statusCode = function( map ) { + if ( map ) { + var tmp; + if ( state < 2 ) { + for ( tmp in map ) { + statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ]; + } + } else { + tmp = map[ jqXHR.status ]; + jqXHR.always( tmp ); + } + } + return this; + }; + + // Remove hash character (#7531: and string promotion) + // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) + // We also use the url parameter if available + s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); + + // Extract dataTypes list + s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( core_rspace ); + + // A cross-domain request is in order when we have a protocol:host:port mismatch + if ( s.crossDomain == null ) { + parts = rurl.exec( s.url.toLowerCase() ); + s.crossDomain = !!( parts && + ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] || + ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != + ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) + ); + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefilter, stop there + if ( state === 2 ) { + return jqXHR; + } + + // We can fire global events as of now if asked to + fireGlobals = s.global; + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger( "ajaxStart" ); + } + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // If data is available, append data to url + if ( s.data ) { + s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data; + // #9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Get ifModifiedKey before adding the anti-cache parameter + ifModifiedKey = s.url; + + // Add anti-cache in url if needed + if ( s.cache === false ) { + + var ts = jQuery.now(), + // try replacing _= if it is there + ret = s.url.replace( rts, "$1_=" + ts ); + + // if nothing was replaced, add timestamp to the end + s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + ifModifiedKey = ifModifiedKey || s.url; + if ( jQuery.lastModified[ ifModifiedKey ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] ); + } + if ( jQuery.etag[ ifModifiedKey ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] ); + } + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? + s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { + // Abort if not done already and return + return jqXHR.abort(); + + } + + // aborting is no longer a cancellation + strAbort = "abort"; + + // Install callbacks on deferreds + for ( i in { success: 1, error: 1, complete: 1 } ) { + jqXHR[ i ]( s[ i ] ); + } + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = setTimeout( function(){ + jqXHR.abort( "timeout" ); + }, s.timeout ); + } + + try { + state = 1; + transport.send( requestHeaders, done ); + } catch (e) { + // Propagate exception as error if not done + if ( state < 2 ) { + done( -1, e ); + // Simply rethrow otherwise + } else { + throw e; + } + } + } + + return jqXHR; + }, + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {} + +}); + +/* Handles responses to an ajax request: + * - sets all responseXXX fields accordingly + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + + var ct, type, finalDataType, firstDataType, + contents = s.contents, + dataTypes = s.dataTypes, + responseFields = s.responseFields; + + // Fill responseXXX fields + for ( type in responseFields ) { + if ( type in responses ) { + jqXHR[ responseFields[type] ] = responses[ type ]; + } + } + + // Remove auto dataType and get content-type in the process + while( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader( "content-type" ); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +// Chain conversions given the request and the original response +function ajaxConvert( s, response ) { + + var conv, conv2, current, tmp, + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(), + prev = dataTypes[ 0 ], + converters = {}, + i = 0; + + // Apply the dataFilter if provided + if ( s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } + } + + // Convert to each sequential dataType, tolerating list modification + for ( ; (current = dataTypes[++i]); ) { + + // There's only work to do if current dataType is non-auto + if ( current !== "*" ) { + + // Convert response if prev dataType is non-auto and differs from current + if ( prev !== "*" && prev !== current ) { + + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split(" "); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.splice( i--, 0, current ); + } + + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s["throws"] ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; + } + } + } + } + + // Update prev for next iteration + prev = current; + } + } + + return { state: "success", data: response }; +} +var oldCallbacks = [], + rquestion = /\?/, + rjsonp = /(=)\?(?=&|$)|\?\?/, + nonce = jQuery.now(); + +// Default jsonp settings +jQuery.ajaxSetup({ + jsonp: "callback", + jsonpCallback: function() { + var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); + this[ callback ] = true; + return callback; + } +}); + +// Detect, normalize options and install callbacks for jsonp requests +jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { + + var callbackName, overwritten, responseContainer, + data = s.data, + url = s.url, + hasCallback = s.jsonp !== false, + replaceInUrl = hasCallback && rjsonp.test( url ), + replaceInData = hasCallback && !replaceInUrl && typeof data === "string" && + !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && + rjsonp.test( data ); + + // Handle iff the expected data type is "jsonp" or we have a parameter to set + if ( s.dataTypes[ 0 ] === "jsonp" || replaceInUrl || replaceInData ) { + + // Get callback name, remembering preexisting value associated with it + callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? + s.jsonpCallback() : + s.jsonpCallback; + overwritten = window[ callbackName ]; + + // Insert callback into url or form data + if ( replaceInUrl ) { + s.url = url.replace( rjsonp, "$1" + callbackName ); + } else if ( replaceInData ) { + s.data = data.replace( rjsonp, "$1" + callbackName ); + } else if ( hasCallback ) { + s.url += ( rquestion.test( url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; + } + + // Use data converter to retrieve json after script execution + s.converters["script json"] = function() { + if ( !responseContainer ) { + jQuery.error( callbackName + " was not called" ); + } + return responseContainer[ 0 ]; + }; + + // force json dataType + s.dataTypes[ 0 ] = "json"; + + // Install callback + window[ callbackName ] = function() { + responseContainer = arguments; + }; + + // Clean-up function (fires after converters) + jqXHR.always(function() { + // Restore preexisting value + window[ callbackName ] = overwritten; + + // Save back as free + if ( s[ callbackName ] ) { + // make sure that re-using the options doesn't screw things around + s.jsonpCallback = originalSettings.jsonpCallback; + + // save the callback name for future use + oldCallbacks.push( callbackName ); + } + + // Call if it was a function and we have a response + if ( responseContainer && jQuery.isFunction( overwritten ) ) { + overwritten( responseContainer[ 0 ] ); + } + + responseContainer = overwritten = undefined; + }); + + // Delegate to script + return "script"; + } +}); +// Install script dataType +jQuery.ajaxSetup({ + accepts: { + script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /javascript|ecmascript/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +}); + +// Handle cache's special case and global +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + s.global = false; + } +}); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function(s) { + + // This transport only deals with cross domain requests + if ( s.crossDomain ) { + + var script, + head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement; + + return { + + send: function( _, callback ) { + + script = document.createElement( "script" ); + + script.async = "async"; + + if ( s.scriptCharset ) { + script.charset = s.scriptCharset; + } + + script.src = s.url; + + // Attach handlers for all browsers + script.onload = script.onreadystatechange = function( _, isAbort ) { + + if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { + + // Handle memory leak in IE + script.onload = script.onreadystatechange = null; + + // Remove the script + if ( head && script.parentNode ) { + head.removeChild( script ); + } + + // Dereference the script + script = undefined; + + // Callback if not abort + if ( !isAbort ) { + callback( 200, "success" ); + } + } + }; + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709 and #4378). + head.insertBefore( script, head.firstChild ); + }, + + abort: function() { + if ( script ) { + script.onload( 0, 1 ); + } + } + }; + } +}); +var xhrCallbacks, + // #5280: Internet Explorer will keep connections alive if we don't abort on unload + xhrOnUnloadAbort = window.ActiveXObject ? function() { + // Abort all pending requests + for ( var key in xhrCallbacks ) { + xhrCallbacks[ key ]( 0, 1 ); + } + } : false, + xhrId = 0; + +// Functions to create xhrs +function createStandardXHR() { + try { + return new window.XMLHttpRequest(); + } catch( e ) {} +} + +function createActiveXHR() { + try { + return new window.ActiveXObject( "Microsoft.XMLHTTP" ); + } catch( e ) {} +} + +// Create the request object +// (This is still attached to ajaxSettings for backward compatibility) +jQuery.ajaxSettings.xhr = window.ActiveXObject ? + /* Microsoft failed to properly + * implement the XMLHttpRequest in IE7 (can't request local files), + * so we use the ActiveXObject when it is available + * Additionally XMLHttpRequest can be disabled in IE7/IE8 so + * we need a fallback. + */ + function() { + return !this.isLocal && createStandardXHR() || createActiveXHR(); + } : + // For all other browsers, use the standard XMLHttpRequest object + createStandardXHR; + +// Determine support properties +(function( xhr ) { + jQuery.extend( jQuery.support, { + ajax: !!xhr, + cors: !!xhr && ( "withCredentials" in xhr ) + }); +})( jQuery.ajaxSettings.xhr() ); + +// Create transport if the browser can provide an xhr +if ( jQuery.support.ajax ) { + + jQuery.ajaxTransport(function( s ) { + // Cross domain only allowed if supported through XMLHttpRequest + if ( !s.crossDomain || jQuery.support.cors ) { + + var callback; + + return { + send: function( headers, complete ) { + + // Get a new xhr + var handle, i, + xhr = s.xhr(); + + // Open the socket + // Passing null username, generates a login popup on Opera (#2865) + if ( s.username ) { + xhr.open( s.type, s.url, s.async, s.username, s.password ); + } else { + xhr.open( s.type, s.url, s.async ); + } + + // Apply custom fields if provided + if ( s.xhrFields ) { + for ( i in s.xhrFields ) { + xhr[ i ] = s.xhrFields[ i ]; + } + } + + // Override mime type if needed + if ( s.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( s.mimeType ); + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !s.crossDomain && !headers["X-Requested-With"] ) { + headers[ "X-Requested-With" ] = "XMLHttpRequest"; + } + + // Need an extra try/catch for cross domain requests in Firefox 3 + try { + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + } catch( _ ) {} + + // Do send the request + // This may raise an exception which is actually + // handled in jQuery.ajax (so no try/catch here) + xhr.send( ( s.hasContent && s.data ) || null ); + + // Listener + callback = function( _, isAbort ) { + + var status, + statusText, + responseHeaders, + responses, + xml; + + // Firefox throws exceptions when accessing properties + // of an xhr when a network error occurred + // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) + try { + + // Was never called and is aborted or complete + if ( callback && ( isAbort || xhr.readyState === 4 ) ) { + + // Only called once + callback = undefined; + + // Do not keep as active anymore + if ( handle ) { + xhr.onreadystatechange = jQuery.noop; + if ( xhrOnUnloadAbort ) { + delete xhrCallbacks[ handle ]; + } + } + + // If it's an abort + if ( isAbort ) { + // Abort it manually if needed + if ( xhr.readyState !== 4 ) { + xhr.abort(); + } + } else { + status = xhr.status; + responseHeaders = xhr.getAllResponseHeaders(); + responses = {}; + xml = xhr.responseXML; + + // Construct response list + if ( xml && xml.documentElement /* #4958 */ ) { + responses.xml = xml; + } + + // When requesting binary data, IE6-9 will throw an exception + // on any attempt to access responseText (#11426) + try { + responses.text = xhr.responseText; + } catch( e ) { + } + + // Firefox throws an exception when accessing + // statusText for faulty cross-domain requests + try { + statusText = xhr.statusText; + } catch( e ) { + // We normalize with Webkit giving an empty statusText + statusText = ""; + } + + // Filter status for non standard behaviors + + // If the request is local and we have data: assume a success + // (success with no data won't get notified, that's the best we + // can do given current implementations) + if ( !status && s.isLocal && !s.crossDomain ) { + status = responses.text ? 200 : 404; + // IE - #1450: sometimes returns 1223 when it should be 204 + } else if ( status === 1223 ) { + status = 204; + } + } + } + } catch( firefoxAccessException ) { + if ( !isAbort ) { + complete( -1, firefoxAccessException ); + } + } + + // Call complete if needed + if ( responses ) { + complete( status, statusText, responses, responseHeaders ); + } + }; + + if ( !s.async ) { + // if we're in sync mode we fire the callback + callback(); + } else if ( xhr.readyState === 4 ) { + // (IE6 & IE7) if it's in cache and has been + // retrieved directly we need to fire the callback + setTimeout( callback, 0 ); + } else { + handle = ++xhrId; + if ( xhrOnUnloadAbort ) { + // Create the active xhrs callbacks list if needed + // and attach the unload handler + if ( !xhrCallbacks ) { + xhrCallbacks = {}; + jQuery( window ).unload( xhrOnUnloadAbort ); + } + // Add to list of active xhrs callbacks + xhrCallbacks[ handle ] = callback; + } + xhr.onreadystatechange = callback; + } + }, + + abort: function() { + if ( callback ) { + callback(0,1); + } + } + }; + } + }); +} +var fxNow, timerId, + rfxtypes = /^(?:toggle|show|hide)$/, + rfxnum = new RegExp( "^(?:([-+])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), + rrun = /queueHooks$/, + animationPrefilters = [ defaultPrefilter ], + tweeners = { + "*": [function( prop, value ) { + var end, unit, + tween = this.createTween( prop, value ), + parts = rfxnum.exec( value.toString() ), + target = tween.cur(), + start = +target || 0, + scale = 1, + maxIterations = 20; + + if ( parts ) { + end = +parts[2]; + unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + + // We need to compute starting value + if ( unit !== "px" && start ) { + // Iteratively approximate from a nonzero starting point + // Prefer the current property, because this process will be trivial if it uses the same units + // Fallback to end or a simple constant + start = jQuery.css( tween.elem, prop, true ) || end || 1; + + do { + // If previous iteration zeroed out, double until we get *something* + // Use a string for doubling factor so we don't accidentally see scale as unchanged below + scale = scale || ".5"; + + // Adjust and apply + start = start / scale; + jQuery.style( tween.elem, prop, start + unit ); + + // Update scale, tolerating zero or NaN from tween.cur() + // And breaking the loop if scale is unchanged or perfect, or if we've just had enough + } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations ); + } + + tween.unit = unit; + tween.start = start; + // If a +=/-= token was provided, we're doing a relative animation + tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end; + } + return tween; + }] + }; + +// Animations created synchronously will run synchronously +function createFxNow() { + setTimeout(function() { + fxNow = undefined; + }, 0 ); + return ( fxNow = jQuery.now() ); +} + +function createTweens( animation, props ) { + jQuery.each( props, function( prop, value ) { + var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( collection[ index ].call( animation, prop, value ) ) { + + // we're done with this property + return; + } + } + }); +} + +function Animation( elem, properties, options ) { + var result, + index = 0, + tweenerIndex = 0, + length = animationPrefilters.length, + deferred = jQuery.Deferred().always( function() { + // don't match elem in the :animated selector + delete tick.elem; + }), + tick = function() { + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), + // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497) + temp = remaining / animation.duration || 0, + percent = 1 - temp, + index = 0, + length = animation.tweens.length; + + for ( ; index < length ; index++ ) { + animation.tweens[ index ].run( percent ); + } + + deferred.notifyWith( elem, [ animation, percent, remaining ]); + + if ( percent < 1 && length ) { + return remaining; + } else { + deferred.resolveWith( elem, [ animation ] ); + return false; + } + }, + animation = deferred.promise({ + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { specialEasing: {} }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end, easing ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, + // if we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + + for ( ; index < length ; index++ ) { + animation.tweens[ index ].run( 1 ); + } + + // resolve when we played the last frame + // otherwise, reject + if ( gotoEnd ) { + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); + } + return this; + } + }), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length ; index++ ) { + result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + return result; + } + } + + createTweens( animation, props ); + + if ( jQuery.isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } + + jQuery.fx.timer( + jQuery.extend( tick, { + anim: animation, + queue: animation.opts.queue, + elem: elem + }) + ); + + // attach callbacks from options + return animation.progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); +} + +function propFilter( props, specialEasing ) { + var index, name, easing, value, hooks; + + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = jQuery.camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( jQuery.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; + } + + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } + + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; + + // not quite $.extend, this wont overwrite keys already present. + // also - reusing 'index' from above because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } + } + } else { + specialEasing[ name ] = easing; + } + } +} + +jQuery.Animation = jQuery.extend( Animation, { + + tweener: function( props, callback ) { + if ( jQuery.isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.split(" "); + } + + var prop, + index = 0, + length = props.length; + + for ( ; index < length ; index++ ) { + prop = props[ index ]; + tweeners[ prop ] = tweeners[ prop ] || []; + tweeners[ prop ].unshift( callback ); + } + }, + + prefilter: function( callback, prepend ) { + if ( prepend ) { + animationPrefilters.unshift( callback ); + } else { + animationPrefilters.push( callback ); + } + } +}); + +function defaultPrefilter( elem, props, opts ) { + var index, prop, value, length, dataShow, toggle, tween, hooks, oldfire, + anim = this, + style = elem.style, + orig = {}, + handled = [], + hidden = elem.nodeType && isHidden( elem ); + + // handle queue: false promises + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; + } + hooks.unqueued++; + + anim.always(function() { + // doing this makes sure that the complete handler will be called + // before this completes + anim.always(function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + }); + }); + } + + // height/width overflow pass + if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { + // Make sure that nothing sneaks out + // Record all 3 overflow attributes because IE does not + // change the overflow attribute when overflowX and + // overflowY are set to the same value + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Set display property to inline-block for height/width + // animations on inline elements that are having width/height animated + if ( jQuery.css( elem, "display" ) === "inline" && + jQuery.css( elem, "float" ) === "none" ) { + + // inline-level elements accept inline-block; + // block-level elements need to be inline with layout + if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) { + style.display = "inline-block"; + + } else { + style.zoom = 1; + } + } + } + + if ( opts.overflow ) { + style.overflow = "hidden"; + if ( !jQuery.support.shrinkWrapBlocks ) { + anim.done(function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + }); + } + } + + + // show/hide pass + for ( index in props ) { + value = props[ index ]; + if ( rfxtypes.exec( value ) ) { + delete props[ index ]; + toggle = toggle || value === "toggle"; + if ( value === ( hidden ? "hide" : "show" ) ) { + continue; + } + handled.push( index ); + } + } + + length = handled.length; + if ( length ) { + dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} ); + if ( "hidden" in dataShow ) { + hidden = dataShow.hidden; + } + + // store state if its toggle - enables .stop().toggle() to "reverse" + if ( toggle ) { + dataShow.hidden = !hidden; + } + if ( hidden ) { + jQuery( elem ).show(); + } else { + anim.done(function() { + jQuery( elem ).hide(); + }); + } + anim.done(function() { + var prop; + jQuery.removeData( elem, "fxshow", true ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + }); + for ( index = 0 ; index < length ; index++ ) { + prop = handled[ index ]; + tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 ); + orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop ); + + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = tween.start; + if ( hidden ) { + tween.end = tween.start; + tween.start = prop === "width" || prop === "height" ? 1 : 0; + } + } + } + } +} + +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); +} +jQuery.Tween = Tween; + +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || "swing"; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; + + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + if ( this.options.duration ) { + this.pos = eased = jQuery.easing[ this.easing ]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ); + } else { + this.pos = eased = percent; + } + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; + } +}; + +Tween.prototype.init.prototype = Tween.prototype; + +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; + + if ( tween.elem[ tween.prop ] != null && + (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { + return tween.elem[ tween.prop ]; + } + + // passing any value as a 4th parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails + // so, simple values such as "10px" are parsed to Float. + // complex values such as "rotate(1rad)" are returned as is. + result = jQuery.css( tween.elem, tween.prop, false, "" ); + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { + // use step hook for back compat - use cssHook if its there - use .style if its + // available and use plain properties where available + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; + } + } + } +}; + +// Remove in 2.0 - this supports IE8's panic based approach +// to setting things on disconnected nodes + +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; + } + } +}; + +jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" || + // special check for .toggle( handler, handler, ... ) + ( !i && jQuery.isFunction( speed ) && jQuery.isFunction( easing ) ) ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +}); + +jQuery.fn.extend({ + fadeTo: function( speed, to, easing, callback ) { + + // show any hidden elements after setting opacity to 0 + return this.filter( isHidden ).css( "opacity", 0 ).show() + + // animate to the value specified + .end().animate({ opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); + + // Empty animations resolve immediately + if ( empty ) { + anim.stop( true ); + } + }; + + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; + + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue && type !== false ) { + this.queue( type || "fx", [] ); + } + + return this.each(function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = jQuery._data( this ); + + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); + } + } + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); + } + } + + // start the next in the queue if the last step wasn't forced + // timers currently will call their complete callbacks, which will dequeue + // but only if they were gotoEnd + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); + } + }); + } +}); + +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + attrs = { height: type }, + i = 0; + + // if we include width, step value is 1 to do all cssExpand values, + // if we don't include width, step value is 2 to skip over Left and Right + includeWidth = includeWidth? 1 : 0; + for( ; i < 4 ; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } + + if ( includeWidth ) { + attrs.opacity = attrs.width = type; + } + + return attrs; +} + +// Generate shortcuts for custom animations +jQuery.each({ + slideDown: genFx("show"), + slideUp: genFx("hide"), + slideToggle: genFx("toggle"), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +}); + +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + jQuery.isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing + }; + + opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : + opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; + + // normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function() { + if ( jQuery.isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; + + return opt; +}; + +jQuery.easing = { + linear: function( p ) { + return p; + }, + swing: function( p ) { + return 0.5 - Math.cos( p*Math.PI ) / 2; + } +}; + +jQuery.timers = []; +jQuery.fx = Tween.prototype.init; +jQuery.fx.tick = function() { + var timer, + timers = jQuery.timers, + i = 0; + + fxNow = jQuery.now(); + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + // Checks the timer has not already been removed + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } + fxNow = undefined; +}; + +jQuery.fx.timer = function( timer ) { + if ( timer() && jQuery.timers.push( timer ) && !timerId ) { + timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); + } +}; + +jQuery.fx.interval = 13; + +jQuery.fx.stop = function() { + clearInterval( timerId ); + timerId = null; +}; + +jQuery.fx.speeds = { + slow: 600, + fast: 200, + // Default speed + _default: 400 +}; + +// Back Compat <1.8 extension point +jQuery.fx.step = {}; + +if ( jQuery.expr && jQuery.expr.filters ) { + jQuery.expr.filters.animated = function( elem ) { + return jQuery.grep(jQuery.timers, function( fn ) { + return elem === fn.elem; + }).length; + }; +} +var rroot = /^(?:body|html)$/i; + +jQuery.fn.offset = function( options ) { + if ( arguments.length ) { + return options === undefined ? + this : + this.each(function( i ) { + jQuery.offset.setOffset( this, options, i ); + }); + } + + var docElem, body, win, clientTop, clientLeft, scrollTop, scrollLeft, + box = { top: 0, left: 0 }, + elem = this[ 0 ], + doc = elem && elem.ownerDocument; + + if ( !doc ) { + return; + } + + if ( (body = doc.body) === elem ) { + return jQuery.offset.bodyOffset( elem ); + } + + docElem = doc.documentElement; + + // Make sure it's not a disconnected DOM node + if ( !jQuery.contains( docElem, elem ) ) { + return box; + } + + // If we don't have gBCR, just use 0,0 rather than error + // BlackBerry 5, iOS 3 (original iPhone) + if ( typeof elem.getBoundingClientRect !== "undefined" ) { + box = elem.getBoundingClientRect(); + } + win = getWindow( doc ); + clientTop = docElem.clientTop || body.clientTop || 0; + clientLeft = docElem.clientLeft || body.clientLeft || 0; + scrollTop = win.pageYOffset || docElem.scrollTop; + scrollLeft = win.pageXOffset || docElem.scrollLeft; + return { + top: box.top + scrollTop - clientTop, + left: box.left + scrollLeft - clientLeft + }; +}; + +jQuery.offset = { + + bodyOffset: function( body ) { + var top = body.offsetTop, + left = body.offsetLeft; + + if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) { + top += parseFloat( jQuery.css(body, "marginTop") ) || 0; + left += parseFloat( jQuery.css(body, "marginLeft") ) || 0; + } + + return { top: top, left: left }; + }, + + setOffset: function( elem, options, i ) { + var position = jQuery.css( elem, "position" ); + + // set position first, in-case top/left are set even on static elem + if ( position === "static" ) { + elem.style.position = "relative"; + } + + var curElem = jQuery( elem ), + curOffset = curElem.offset(), + curCSSTop = jQuery.css( elem, "top" ), + curCSSLeft = jQuery.css( elem, "left" ), + calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, + props = {}, curPosition = {}, curTop, curLeft; + + // need to be able to calculate position if either top or left is auto and position is either absolute or fixed + if ( calculatePosition ) { + curPosition = curElem.position(); + curTop = curPosition.top; + curLeft = curPosition.left; + } else { + curTop = parseFloat( curCSSTop ) || 0; + curLeft = parseFloat( curCSSLeft ) || 0; + } + + if ( jQuery.isFunction( options ) ) { + options = options.call( elem, i, curOffset ); + } + + if ( options.top != null ) { + props.top = ( options.top - curOffset.top ) + curTop; + } + if ( options.left != null ) { + props.left = ( options.left - curOffset.left ) + curLeft; + } + + if ( "using" in options ) { + options.using.call( elem, props ); + } else { + curElem.css( props ); + } + } +}; + + +jQuery.fn.extend({ + + position: function() { + if ( !this[0] ) { + return; + } + + var elem = this[0], + + // Get *real* offsetParent + offsetParent = this.offsetParent(), + + // Get correct offsets + offset = this.offset(), + parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset(); + + // Subtract element margins + // note: when an element has margin: auto the offsetLeft and marginLeft + // are the same in Safari causing offset.left to incorrectly be 0 + offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0; + offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0; + + // Add offsetParent borders + parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0; + parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0; + + // Subtract the two offsets + return { + top: offset.top - parentOffset.top, + left: offset.left - parentOffset.left + }; + }, + + offsetParent: function() { + return this.map(function() { + var offsetParent = this.offsetParent || document.body; + while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) { + offsetParent = offsetParent.offsetParent; + } + return offsetParent || document.body; + }); + } +}); + + +// Create scrollLeft and scrollTop methods +jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { + var top = /Y/.test( prop ); + + jQuery.fn[ method ] = function( val ) { + return jQuery.access( this, function( elem, method, val ) { + var win = getWindow( elem ); + + if ( val === undefined ) { + return win ? (prop in win) ? win[ prop ] : + win.document.documentElement[ method ] : + elem[ method ]; + } + + if ( win ) { + win.scrollTo( + !top ? val : jQuery( win ).scrollLeft(), + top ? val : jQuery( win ).scrollTop() + ); + + } else { + elem[ method ] = val; + } + }, method, val, arguments.length, null ); + }; +}); + +function getWindow( elem ) { + return jQuery.isWindow( elem ) ? + elem : + elem.nodeType === 9 ? + elem.defaultView || elem.parentWindow : + false; +} +// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods +jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { + jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { + // margin is only for outerHeight, outerWidth + jQuery.fn[ funcName ] = function( margin, value ) { + var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), + extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); + + return jQuery.access( this, function( elem, type, value ) { + var doc; + + if ( jQuery.isWindow( elem ) ) { + // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there + // isn't a whole lot we can do. See pull request at this URL for discussion: + // https://github.com/jquery/jquery/pull/764 + return elem.document.documentElement[ "client" + name ]; + } + + // Get document width or height + if ( elem.nodeType === 9 ) { + doc = elem.documentElement; + + // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest + // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. + return Math.max( + elem.body[ "scroll" + name ], doc[ "scroll" + name ], + elem.body[ "offset" + name ], doc[ "offset" + name ], + doc[ "client" + name ] + ); + } + + return value === undefined ? + // Get width or height on the element, requesting but not forcing parseFloat + jQuery.css( elem, type, value, extra ) : + + // Set width or height on the element + jQuery.style( elem, type, value, extra ); + }, type, chainable ? margin : undefined, chainable, null ); + }; + }); +}); +// Expose jQuery to the global object +window.jQuery = window.$ = jQuery; + +// Expose jQuery as an AMD module, but only for AMD loaders that +// understand the issues with loading multiple versions of jQuery +// in a page that all might call define(). The loader will indicate +// they have special allowances for multiple jQuery versions by +// specifying define.amd.jQuery = true. Register as a named module, +// since jQuery can be concatenated with other files that may use define, +// but not use a proper concatenation script that understands anonymous +// AMD modules. A named AMD is safest and most robust way to register. +// Lowercase jquery is used because AMD module names are derived from +// file names, and jQuery is normally delivered in a lowercase file name. +// Do this after creating the global so that if an AMD module wants to call +// noConflict to hide this version of jQuery, it will work. +if ( typeof define === "function" && define.amd && define.amd.jQuery ) { + define( "jquery", [], function () { return jQuery; } ); +} + +})( window ); diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/resources/de/adesso/wickedcharts/showcase/progressBar.js b/showcase/wicked-charts-showcase-wicket14/src/main/resources/de/adesso/wickedcharts/showcase/progressBar.js new file mode 100644 index 00000000..d2a238ab --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket14/src/main/resources/de/adesso/wickedcharts/showcase/progressBar.js @@ -0,0 +1,3 @@ +var progress = document.getElementById('animationProgress'); + + \ No newline at end of file From 85a2a23eba3a70726c0e3ce93ebe2547925f1d8e Mon Sep 17 00:00:00 2001 From: max Date: Sat, 9 Jun 2018 19:53:40 +0200 Subject: [PATCH 10/23] optimized imports --- .../showcase/HomepageChartJs.java | 2 - .../showcase/HomepageHighcharts.java | 46 ++----------------- .../showcase/ShowcaseApplication.java | 1 - ...eaLineBoundariesChartEndConfiguration.java | 2 +- ...LineBoundariesChartFalseConfiguration.java | 2 +- ...ineBoundariesChartOriginConfiguration.java | 2 +- ...LineBoundariesChartStartConfiguration.java | 2 +- .../BarChartHorizontalConfiguration.java | 2 +- .../BarChartMultiAxisConfiguration.java | 2 +- .../BarChartStackedConfiguration.java | 2 +- .../BarChartStackedGroupConfiguration.java | 2 +- .../BarChartVerticalConfiguration.java | 2 +- .../BubbleChartConfiguration.java | 2 +- .../ComboBarLineChartConfiguration.java | 2 +- .../DataLabellingChartConfiguration.java | 2 +- .../DoughnutChartConfiguration.java | 3 +- .../FilteringLabelsConfiguration.java | 2 +- .../LegendPointStyleConfiguration.java | 2 +- .../LineChartAreaDatasetConfiguration.java | 2 +- .../LineChartBasicConfiguration.java | 2 +- .../LineChartInterpolatedConfiguration.java | 2 +- .../LineChartMultiAxisConfiguration.java | 3 +- .../LineChartProgressBarConfiguration.java | 2 +- .../LineChartStackedConfiguration.java | 2 +- .../LineChartSteppedAfterConfiguration.java | 2 +- .../LineChartSteppedBeforeConfiguration.java | 2 +- ...tWithDifferentPointSizesConfiguration.java | 2 +- .../LineStylesConfiguration.java | 2 +- .../LinearStepSizeConfiguration.java | 2 +- .../LogarithmicLineChartConfiguration.java | 2 +- .../LogarithmicScatterChartConfiguration.java | 2 +- .../configurations/MinMaxConfiguration.java | 2 +- .../MinMaxSuggestedConfiguration.java | 2 +- .../MultilineLabelsConfiguration.java | 2 +- .../NonNumericConfiguration.java | 2 +- .../OtherRadarChartConfiguration.java | 2 +- .../PointStylesConfiguration.java | 2 +- .../PolarAreaChartConfiguration.java | 2 +- .../RadarChartConfiguration.java | 2 +- .../ScatterChartConfiguration.java | 2 +- .../ScatterChartMultiAxisConfiguration.java | 2 +- .../TimeComboConfiguration.java | 2 +- .../configurations/TimeLineConfiguration.java | 2 +- .../TimePointConfiguration.java | 2 +- .../TimeSeriesConfiguration.java | 2 +- .../TooltipAverageConfiguration.java | 2 +- .../TooltipBorderConfiguration.java | 2 +- .../TooltipCallbacksConfiguration.java | 2 +- .../TooltipHtmlLineConfiguration.java | 2 +- .../TooltipHtmlPieConfiguration.java | 2 +- .../TooltipHtmlPointsConfiguration.java | 3 +- .../TooltipNearestConfiguration.java | 2 +- .../base/ShowcaseConfiguration.java | 1 - .../DatasetIntersectFalseConfiguration.java | 2 +- .../DatasetIntersectTrueConfiguration.java | 2 +- .../IndexIntersectFalseConfiguration.java | 2 +- .../IndexIntersectTrueConfiguration.java | 2 +- .../NearestIntersectFalseConfiguration.java | 2 +- .../NearestIntersectTrueConfiguration.java | 2 +- .../PointIntersectFalseConfiguration.java | 3 +- .../PointIntersectTrueConfiguration.java | 2 +- .../xIntersectFalseConfiguration.java | 2 +- .../xIntersectTrueConfiguration.java | 2 +- .../yIntersectFalseConfiguration.java | 2 +- .../yIntersectTrueConfiguration.java | 2 +- .../LegendPositionBottomConfiguration.java | 1 - ...LegendPositionChartBasicConfiguration.java | 2 +- .../showcase/links/UpdateHighchartLink.java | 7 ++- .../showcase/HomepageChartJs.java | 1 - .../showcase/HomepageHighcharts.java | 1 - .../showcase/ShowcaseApplication.java | 1 - .../configurations/PieChartConfiguration.java | 1 - .../base/ShowcaseConfiguration.java | 1 - .../showcase/HomepageChartJs.java | 3 -- 74 files changed, 73 insertions(+), 121 deletions(-) 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 index c72c9e8b..d13121ed 100644 --- 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 @@ -32,10 +32,8 @@ import org.apache.wicket.markup.html.list.ListView; import java.io.Serializable; -import java.util.AbstractMap; import java.util.ArrayList; import java.util.List; -import java.util.Set; /** * This page takes care of the Chart.js showcase logic. 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 index b6f5380a..114d89fb 100644 --- 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 @@ -14,54 +14,16 @@ */ package de.adesso.wickedcharts.showcase; +import de.adesso.wickedcharts.highcharts.options.Options; +import de.adesso.wickedcharts.highcharts.theme.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.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; -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.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 HomepageHighcharts extends WebPage { 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 e0c5648d..84a4fa4c 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,7 +21,6 @@ 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.IndexedParamUrlCodingStrategy; import org.springframework.stereotype.Component; @Component 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 index 547beb6a..62047c4e 100644 --- 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 @@ -1,5 +1,6 @@ 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; @@ -7,7 +8,6 @@ import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * * A sample that shows how the 'end' fill option works 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 index a2c63ad7..208d3b5c 100644 --- 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 @@ -1,12 +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.label.TextLabel; import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue; import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * * A sample that shows how the 'false' fill option works 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 index 3c0baa8a..25263e27 100644 --- 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 @@ -1,5 +1,6 @@ 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; @@ -7,7 +8,6 @@ import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * * A sample that shows how the 'origin' fill option works 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 index ccc16070..353e5dab 100644 --- 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 @@ -1,5 +1,6 @@ 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; @@ -7,7 +8,6 @@ import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * * A sample that shows how the 'start' fill option works 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 index 78fc9874..7178325e 100644 --- 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 @@ -5,7 +5,7 @@ import de.adesso.wickedcharts.chartjs.chartoptions.label.TextLabel; import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue; import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; -import de.adesso.wickedcharts.chartjs.chartoptions.*; + import java.util.Arrays; /** 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 index 65252988..bfd43c26 100644 --- 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 @@ -1,12 +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.label.TextLabel; import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue; import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * A sample that shows how a multi-axis bar chart configuration looks. */ 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 index 3aee22c5..8cd45a6d 100644 --- 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 @@ -1,12 +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.label.TextLabel; import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue; import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * A sample that shows how a stacked bar chart configuration looks. */ 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 index 6d9f4cc8..8e0bff32 100644 --- 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 @@ -1,12 +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.label.TextLabel; import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue; import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * A sample that shows how a stacked group bar chart configuration looks. */ 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 index c443a754..0e5c7ee6 100644 --- 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 @@ -1,12 +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.label.TextLabel; import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue; import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * A sample that shows how a vertical bar chart configuration looks. */ 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 index a9f8f048..fc5d735b 100644 --- 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 @@ -1,5 +1,6 @@ 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; @@ -7,7 +8,6 @@ import java.util.Arrays; import java.util.Random; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * * A sample that shows how a bubble chart configuration looks. 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 index 9d54a0d2..5ec762e4 100644 --- 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 @@ -1,12 +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.label.TextLabel; import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue; import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * 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 index ad5aabc1..999a7bd3 100644 --- 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 @@ -24,7 +24,7 @@ public class DataLabellingChartConfiguration extends ShowcaseConfiguration { public DataLabellingChartConfiguration() { super(); setType(ChartType.BAR); - String optionalJavascript=readFile("de/adesso/wickedcharts/showcase/resources/dataLabellingPlugin.js"); + String optionalJavascript=readFile("de/adesso/wickedcharts/showcase/dataLabellingPlugin.js"); setOptionalJavascript(new ArrayList()); addOptionalJavascript(optionalJavascript); 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 index acc014ed..71103554 100644 --- 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 @@ -1,10 +1,11 @@ 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 de.adesso.wickedcharts.chartjs.chartoptions.*; + import java.util.Arrays; /** 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 index 60c952dd..8441defc 100644 --- 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 @@ -1,12 +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.label.TextLabel; import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue; import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * * A sample that shows how a chart with label filtering is configured. 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 index 248318ed..a9f6bee7 100644 --- 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 @@ -1,5 +1,6 @@ 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; @@ -7,7 +8,6 @@ import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * * A sample that shows how different point style configurations look. 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 index 6d60fbf7..402b1ab3 100644 --- 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 @@ -1,5 +1,6 @@ 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; @@ -9,7 +10,6 @@ import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * * A sample that shows how a chart with different datasets can be configured. 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 index 040a2b08..86c1e218 100644 --- 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 @@ -1,12 +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.label.TextLabel; import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue; import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * * A sample of a basic line chart configuration. 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 index 23ed769f..43e1dcfb 100644 --- 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 @@ -1,5 +1,6 @@ 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; @@ -7,7 +8,6 @@ import java.util.Arrays; import java.util.List; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * * A sample that shows how configuring interpolation of lines in a line chart is configured. 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 index 012a83b5..fe82651a 100644 --- 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 @@ -1,10 +1,11 @@ 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 de.adesso.wickedcharts.chartjs.chartoptions.*; + import java.util.Arrays; /** 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 index 4d32a521..e16366cb 100644 --- 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 @@ -1,5 +1,6 @@ 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; @@ -8,7 +9,6 @@ import java.util.ArrayList; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * * A sample that shows how a line chart with a progress bar is configured. 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 index c5345e01..2b5c19c3 100644 --- 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 @@ -1,12 +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.label.TextLabel; import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue; import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * * A sample that shows how a stacked line chart is configured. 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 index 2850418e..1ee820b3 100644 --- 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 @@ -1,12 +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.label.TextLabel; import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue; import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * * A sample that shows how a stepped line chart configuration looks with stepped = after. 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 index e6794a83..a994ff1b 100644 --- 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 @@ -1,12 +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.label.TextLabel; import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue; import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * * A sample that shows how a stepped line chart configuration looks with stepped = before. 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 index 5ee99675..21b5a14b 100644 --- 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 @@ -1,5 +1,6 @@ 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; @@ -7,7 +8,6 @@ import java.util.Arrays; import java.util.Collections; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * * A sample that shows how a line chart can be configured to have different point sizes. 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 index 8e0f4864..37049124 100644 --- 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 @@ -1,12 +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.label.TextLabel; import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue; import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * * A sample that shows how different line styles can be configured. 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 index abb82c0e..5ae5ee58 100644 --- 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 @@ -1,12 +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.label.TextLabel; import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue; import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * * A sample that shows how a line chart with linear step size is configured. 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 index d54c4330..0868a4b1 100644 --- 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 @@ -1,12 +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.label.TextLabel; import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue; import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * * A sample that shows how a logarithmic line chart configuration looks. 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 index 7a5e8279..65e7c8c0 100644 --- 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 @@ -1,12 +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.label.TextLabel; import de.adesso.wickedcharts.chartjs.chartoptions.valueType.PointValue; import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * A sample that shows how a logarithmic scatter chart configuration looks. * 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 index 617cf9be..f1a74136 100644 --- 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 @@ -1,12 +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.label.TextLabel; import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue; import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * 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 index 594002b6..7f02e1be 100644 --- 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 @@ -1,12 +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.label.TextLabel; import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue; import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * 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 index 4947f5fd..f20c6e25 100644 --- 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 @@ -1,5 +1,6 @@ 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; @@ -7,7 +8,6 @@ import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * 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 index 5801b65f..6f8a6672 100644 --- 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 @@ -1,5 +1,6 @@ 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; @@ -7,7 +8,6 @@ import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * 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 index 49eb9a5e..908964a7 100644 --- 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 @@ -1,5 +1,6 @@ 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; @@ -7,7 +8,6 @@ import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * Sample that displays different datasets on a radar. * 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 index 16fbdfab..a61d0dc1 100644 --- 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 @@ -1,12 +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.label.TextLabel; import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue; import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * Sample that supports different point styles: * 'circle', 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 index f29ac554..c90785d3 100644 --- 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 @@ -1,12 +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.label.TextLabel; import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue; import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * Sample that distributes data in a polar area chart. * 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 index 88eb8fde..0f5af3a3 100644 --- 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 @@ -1,5 +1,6 @@ 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; @@ -9,7 +10,6 @@ import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * Sample that displays different datasets on a radar. * 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 index 9d987384..476958d6 100644 --- 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 @@ -1,12 +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.label.TextLabel; import de.adesso.wickedcharts.chartjs.chartoptions.valueType.PointValue; import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * Sample which displays data as scattered points in the coordinate system. * 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 index fa7fd2cb..46b4e604 100644 --- 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 @@ -1,5 +1,6 @@ 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; @@ -7,7 +8,6 @@ import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * Sample that displays a scatter chart with two y-axes. * 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 index 1358b08c..ef00d8aa 100644 --- 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 @@ -1,5 +1,6 @@ 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; @@ -12,7 +13,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * 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-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 index 3c3cc4eb..b625b6ef 100644 --- 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 @@ -1,5 +1,6 @@ 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; @@ -14,7 +15,6 @@ import java.util.Arrays; import java.util.List; import java.util.Random; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * Sample which displays a time progression line for datasets. * 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 index 2e2c0814..a5001616 100644 --- 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 @@ -1,5 +1,6 @@ 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; @@ -12,7 +13,6 @@ import java.util.Arrays; import java.util.List; import java.util.Random; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * Sample which highlights the important points of the x-axis. * 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 index 6b8b284a..230710e2 100644 --- 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 @@ -1,5 +1,6 @@ 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; @@ -9,7 +10,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * Sample that displays a progression of a dataset. * 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 index 3a261bdc..866b6ca1 100644 --- 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 @@ -1,12 +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.label.TextLabel; import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue; import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * Sample that enables tooltips to be at a average position to the data points. * 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 index b9a1ceca..0ecd5c28 100644 --- 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 @@ -1,5 +1,6 @@ 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; @@ -8,7 +9,6 @@ import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * Sample which adds a border to the tooltips. * 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 index 06a6db8d..6021061c 100644 --- 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 @@ -1,12 +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.label.TextLabel; import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue; import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * Sample that enables the use of callback functions for tooltips. * 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 index c4b6fa84..5f2c32e0 100644 --- 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 @@ -1,5 +1,6 @@ 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; @@ -7,7 +8,6 @@ import java.util.ArrayList; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * Sample that enables the use of custom html markup for tooltips in a line chart. * 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 index 25a7ca27..0fd8d84d 100644 --- 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 @@ -1,5 +1,6 @@ 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; @@ -8,7 +9,6 @@ import java.util.ArrayList; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * Sample that enables the use of custom html markup for tooltips in a pie chart. * 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 index 57598d4e..247c5dbd 100644 --- 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 @@ -1,11 +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.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 de.adesso.wickedcharts.chartjs.chartoptions.*; + import java.util.ArrayList; import java.util.Arrays; 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 index 36ef78a2..cef3a5a1 100644 --- 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 @@ -1,12 +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.label.TextLabel; import de.adesso.wickedcharts.chartjs.chartoptions.valueType.IntegerValue; import de.adesso.wickedcharts.showcase.configurations.base.ShowcaseConfiguration; import java.util.Arrays; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * Sample that enables tooltips to be at the nearest possible position to the data points. 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 index 5dee5bf9..b15b4d9f 100644 --- 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 @@ -1,6 +1,5 @@ package de.adesso.wickedcharts.showcase.configurations.base; -import de.adesso.wickedcharts.chartjs.chartoptions.*; import de.adesso.wickedcharts.chartjs.ChartConfiguration; import org.apache.wicket.markup.html.panel.Fragment; 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 index 8a545834..14418fb1 100644 --- 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 @@ -1,12 +1,12 @@ 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; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * If intersect false the nearest item is used to determine the index. * 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 index 223d60f6..1aee3937 100644 --- 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 @@ -1,12 +1,12 @@ 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; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * 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-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 index bd515c00..7c5c0df2 100644 --- 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 @@ -1,12 +1,12 @@ 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; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * If intersect false the nearest item, in the x direction, is used to determine the index. * 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 index f13bc3d8..b3a53259 100644 --- 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 @@ -1,12 +1,12 @@ 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; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * 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-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 index 323d745e..8cb3e319 100644 --- 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 @@ -1,12 +1,12 @@ 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; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * If intersect is false, this is not triggered when the mouse position intersects an item in the graph. * 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 index e0b5bac8..929eea10 100644 --- 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 @@ -1,12 +1,12 @@ 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; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * If intersect is true, this is only triggered when the mouse position intersects an item in the graph. * 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 index 76acb7b9..d0dabfa2 100644 --- 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 @@ -1,10 +1,11 @@ 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 de.adesso.wickedcharts.chartjs.chartoptions.*; + import java.util.Arrays; /** 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 index afef0bdc..900b8523 100644 --- 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 @@ -1,12 +1,12 @@ 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; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * Finds all of the items that intersect the point. * 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 index 6107a3d7..bab11b18 100644 --- 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 @@ -1,12 +1,12 @@ 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; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * Does not return all items that would intersect based on the X coordinate of the position only. * 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 index 6b0a4125..e7b6b0c9 100644 --- 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 @@ -1,12 +1,12 @@ 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; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * Returns all items that would intersect based on the X coordinate of the position only. * 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 index 079fda99..d251ddbd 100644 --- 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 @@ -1,12 +1,12 @@ 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; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * Does not return all items that would intersect based on the Y coordinate of the position. * 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 index e06d9307..e64893c6 100644 --- 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 @@ -1,12 +1,12 @@ 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; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * Returns all items that would intersect based on the Y coordinate of the position. * 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 index 14637492..838e8af0 100644 --- 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 @@ -4,7 +4,6 @@ import de.adesso.wickedcharts.chartjs.chartoptions.Legend; import de.adesso.wickedcharts.chartjs.chartoptions.Position; import de.adesso.wickedcharts.chartjs.chartoptions.colors.SimpleColor; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * Shows how to configure a chart with the legend position at the bottom * @see http://www.chartjs.org/samples/latest/legend/positioning.html 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 index 5641cbdf..7f90d7e8 100644 --- 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 @@ -1,12 +1,12 @@ 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; -import de.adesso.wickedcharts.chartjs.chartoptions.*; /** * Base class for the other configurations for the legend position * 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 index dd491d09..ab22bc8e 100644 --- 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 @@ -14,14 +14,13 @@ */ 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; +import org.apache.wicket.ajax.AjaxRequestTarget; +import org.apache.wicket.ajax.markup.html.AjaxLink; +import org.apache.wicket.markup.html.basic.Label; public class UpdateHighchartLink extends AjaxLink { 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 index f60a9d08..affd70f9 100644 --- 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 @@ -29,7 +29,6 @@ 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; 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 index 9de810f7..e93ae9cb 100644 --- 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 @@ -24,7 +24,6 @@ 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.INamedParameters; import org.apache.wicket.request.mapper.parameter.PageParameters; import java.util.ArrayList; 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 06a2f895..8f4fc73d 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 @@ -19,7 +19,6 @@ 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; @Component 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 index f6159daa..9301accc 100644 --- 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 @@ -1,6 +1,5 @@ package de.adesso.wickedcharts.showcase.configurations; -import de.adesso.wickedcharts.chartjs.chartoptions.*; import de.adesso.wickedcharts.chartjs.chartoptions.ChartType; import de.adesso.wickedcharts.chartjs.chartoptions.Data; import de.adesso.wickedcharts.chartjs.chartoptions.Dataset; 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 index 5dee5bf9..b15b4d9f 100644 --- 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 @@ -1,6 +1,5 @@ package de.adesso.wickedcharts.showcase.configurations.base; -import de.adesso.wickedcharts.chartjs.chartoptions.*; import de.adesso.wickedcharts.chartjs.ChartConfiguration; import org.apache.wicket.markup.html.panel.Fragment; 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 index d16d8dab..9391f4b8 100644 --- 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 @@ -29,7 +29,6 @@ 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; @@ -168,8 +167,6 @@ 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 From b01a3e940bbf5887f1eee3d27d1122d7471b8a98 Mon Sep 17 00:00:00 2001 From: max Date: Sat, 9 Jun 2018 20:13:00 +0200 Subject: [PATCH 11/23] added support for Wicket 8 + Showcase --- settings.gradle | 3 +- showcase/settings.gradle | 1 + .../wicked-charts-showcase-wicket8/.gitignore | 1 + .../build.gradle | 67 + .../eclipse/code-formatter.xml | 295 + ...ket-charts-showcase package release.launch | 14 + .../wickedcharts/showcase/ChartComponent.html | 22 + .../wickedcharts/showcase/ChartComponent.java | 26 + .../wickedcharts/showcase/CodeComponent.html | 6 + .../wickedcharts/showcase/CodeComponent.java | 23 + .../de/adesso/wickedcharts/showcase/Demo.java | 77 + .../showcase/HomepageChartJs.html | 291 + .../showcase/HomepageChartJs.java | 399 + .../showcase/HomepageHighcharts.html | 267 + .../showcase/HomepageHighcharts.java | 465 + .../wickedcharts/showcase/NoIDMount.java | 29 + .../showcase/ShowcaseApplication.java | 68 + .../showcase/ShowcaseSession.java | 50 + .../showcase/SmallChartComponent.html | 22 + .../showcase/SmallChartComponent.java | 14 + .../showcase/StringFromResourceModel.java | 70 + .../showcase/boot/ShowcaseBooter.java | 16 + .../showcase/boot/WarInitializer.java | 19 + .../showcase/boot/WebInitializer.java | 26 + ...eaLineBoundariesChartEndConfiguration.java | 65 + ...LineBoundariesChartFalseConfiguration.java | 63 + ...ineBoundariesChartOriginConfiguration.java | 65 + ...LineBoundariesChartStartConfiguration.java | 65 + .../BarChartHorizontalConfiguration.java | 65 + .../BarChartMultiAxisConfiguration.java | 80 + .../BarChartStackedConfiguration.java | 88 + .../BarChartStackedGroupConfiguration.java | 86 + .../BarChartVerticalConfiguration.java | 61 + .../BubbleChartConfiguration.java | 103 + .../ComboBarLineChartConfiguration.java | 64 + .../DataLabellingChartConfiguration.java | 71 + .../DoughnutChartConfiguration.java | 50 + .../FilteringLabelsConfiguration.java | 68 + .../LegendPointStyleConfiguration.java | 71 + .../LineChartAreaDatasetConfiguration.java | 143 + .../LineChartBasicConfiguration.java | 72 + .../LineChartInterpolatedConfiguration.java | 84 + .../LineChartMultiAxisConfiguration.java | 76 + .../LineChartProgressBarConfiguration.java | 95 + .../LineChartStackedConfiguration.java | 77 + .../LineChartSteppedAfterConfiguration.java | 66 + .../LineChartSteppedBeforeConfiguration.java | 65 + ...tWithDifferentPointSizesConfiguration.java | 94 + .../LineStylesConfiguration.java | 80 + .../LinearStepSizeConfiguration.java | 75 + .../LogarithmicLineChartConfiguration.java | 72 + .../LogarithmicScatterChartConfiguration.java | 85 + .../configurations/MinMaxConfiguration.java | 60 + .../MinMaxSuggestedConfiguration.java | 60 + .../MultilineLabelsConfiguration.java | 69 + .../NonNumericConfiguration.java | 67 + .../OtherRadarChartConfiguration.java | 65 + .../configurations/PieChartConfiguration.java | 44 + .../PointStylesConfiguration.java | 182 + .../PolarAreaChartConfiguration.java | 55 + .../RadarChartConfiguration.java | 98 + .../ScatterChartConfiguration.java | 79 + .../ScatterChartMultiAxisConfiguration.java | 91 + .../TimeComboConfiguration.java | 87 + .../configurations/TimeLineConfiguration.java | 126 + .../TimePointConfiguration.java | 138 + .../TimeSeriesConfiguration.java | 94 + .../TooltipAverageConfiguration.java | 68 + .../TooltipBorderConfiguration.java | 62 + .../TooltipCallbacksConfiguration.java | 81 + .../TooltipHtmlLineConfiguration.java | 64 + .../TooltipHtmlPieConfiguration.java | 59 + .../TooltipHtmlPointsConfiguration.java | 69 + .../TooltipNearestConfiguration.java | 69 + .../base/ShowcaseConfiguration.java | 58 + .../GridLineStylesConfiguration.java | 74 + .../GridLinesBasicConfiguration.java | 69 + .../GridLinesChartAreaConfiguration.java | 27 + .../GridLinesDisplayFalseConfiguration.java | 25 + ...inesDisplayFalseNoBorderConfiguration.java | 25 + .../GridLinesTicksConfiguration.java | 28 + .../DatasetIntersectFalseConfiguration.java | 68 + .../DatasetIntersectTrueConfiguration.java | 68 + .../IndexIntersectFalseConfiguration.java | 68 + .../IndexIntersectTrueConfiguration.java | 68 + .../NearestIntersectFalseConfiguration.java | 68 + .../NearestIntersectTrueConfiguration.java | 68 + .../PointIntersectFalseConfiguration.java | 68 + .../PointIntersectTrueConfiguration.java | 68 + .../xIntersectFalseConfiguration.java | 68 + .../xIntersectTrueConfiguration.java | 68 + .../yIntersectFalseConfiguration.java | 68 + .../yIntersectTrueConfiguration.java | 68 + .../LegendPositionBottomConfiguration.java | 27 + ...LegendPositionChartBasicConfiguration.java | 55 + .../LegendPositionLeftConfiguration.java | 28 + .../LegendPositionRightConfiguration.java | 29 + .../LegendPositionTopConfiguration.java | 29 + .../wickedcharts/showcase/ie/SimplePage.html | 14 + .../wickedcharts/showcase/ie/SimplePage.java | 113 + .../showcase/links/ChartjsShowcaseLink.java | 15 + .../links/HighchartsShowcaseLink.java | 17 + .../links/SplineUpdatingChartLink.java | 35 + .../showcase/links/UpdateChartJsLink.java | 50 + .../showcase/links/UpdateHighchartLink.java | 55 + .../showcase/links/UpdateThemeLink.java | 54 + .../showcase/modalwindow/ChartPanel.html | 3 + .../showcase/modalwindow/ChartPanel.java | 16 + .../showcase/modalwindow/ModalWindowPage.html | 7 + .../showcase/modalwindow/ModalWindowPage.java | 38 + .../options/WicketSplineUpdatingOptions.java | 170 + .../src/main/resources/LICENSE | 202 + .../showcase/customTooltip-Pie.js | 62 + .../showcase/customTooltip-Point.js | 28 + .../wickedcharts/showcase/customTooltip.js | 71 + .../showcase/dataLabellingPlugin.js | 33 + .../showcase/jquery-1.8.3.min-IEfix.js | 9473 +++++++++++++++++ .../wickedcharts/showcase/progressBar.js | 3 + .../src/main/resources/log4j.properties | 12 + .../src/main/webapp/WEB-INF/appengine-web.xml | 14 + .../src/main/webapp/WEB-INF/web.xml | 32 + .../webapp/css/bootstrap-responsive.min.css | 9 + .../src/main/webapp/css/bootstrap.min.css | 9 + .../ui-bg_diagonals-thick_90_eeeeee_40x40.png | Bin 0 -> 251 bytes .../images/ui-bg_flat_15_cd0a0a_40x100.png | Bin 0 -> 181 bytes .../images/ui-bg_glass_100_e4f1fb_1x400.png | Bin 0 -> 119 bytes .../images/ui-bg_glass_50_3baae3_1x400.png | Bin 0 -> 131 bytes .../images/ui-bg_glass_80_d7ebf9_1x400.png | Bin 0 -> 124 bytes .../ui-bg_highlight-hard_100_f2f5f7_1x100.png | Bin 0 -> 103 bytes .../ui-bg_highlight-hard_70_000000_1x100.png | Bin 0 -> 118 bytes .../ui-bg_highlight-soft_100_deedf7_1x100.png | Bin 0 -> 104 bytes .../ui-bg_highlight-soft_25_ffef8f_1x100.png | Bin 0 -> 119 bytes .../images/ui-icons_2694e8_256x240.png | Bin 0 -> 4369 bytes .../images/ui-icons_2e83ff_256x240.png | Bin 0 -> 4369 bytes .../images/ui-icons_3d80b3_256x240.png | Bin 0 -> 4369 bytes .../images/ui-icons_72a7cf_256x240.png | Bin 0 -> 4369 bytes .../images/ui-icons_ffffff_256x240.png | Bin 0 -> 4369 bytes .../css/cupertino/jquery-ui-1.8.23.custom.css | 563 + .../css/syntaxhighlighter/shCoreEclipse.css | 339 + .../css/syntaxhighlighter/shThemeEclipse.css | 128 + .../src/main/webapp/css/wickedcharts.css | 118 + .../src/main/webapp/img/grid.png | Bin 0 -> 1077 bytes .../src/main/webapp/img/skies.jpg | Bin 0 -> 43395 bytes .../src/main/webapp/js/bootstrap-button.js | 96 + .../src/main/webapp/js/bootstrap-tab.js | 135 + .../src/main/webapp/js/bootstrap.min.js | 6 + .../src/main/webapp/js/customTooltip.js | 71 + .../webapp/js/jquery-ui-1.8.23.custom.min.js | 125 + .../js/syntaxhighlighter/shAutoloader.js | 17 + .../js/syntaxhighlighter/shBrushJava.js | 57 + .../webapp/js/syntaxhighlighter/shBrushXml.js | 69 + .../webapp/js/syntaxhighlighter/shCore.js | 17 + .../webapp/js/syntaxhighlighter/shLegacy.js | 17 + .../src/main/webapp/js/wickedcharts.js | 11 + .../src/main/webapp/logo.png | Bin 0 -> 6184 bytes .../src/test/resources/keystore | Bin 0 -> 1481 bytes wicket/wicked-charts-wicket8/.checkstyle | 7 + wicket/wicked-charts-wicket8/build.gradle | 8 + .../eclipse/code-formatter.xml | 279 + .../wicket-charts package distribution.launch | 14 + ...vaScriptExpressionSendingAjaxBehavior.java | 102 + .../wicket8/JavaScriptResourceRegistry.java | 313 + .../wickedcharts/wicket8/chartjs/Chart.java | 63 + .../wicket8/chartjs/JsonRendererFactory.java | 48 + .../chartjs/features/basic/ChartBehavior.java | 111 + .../wicket8/highcharts/Chart.java | 179 + .../highcharts/JsonRendererFactory.java | 48 + .../features/basic/ChartBehavior.java | 165 + .../drilldown/DrilldownProcessor.java | 124 + .../features/global/GlobalProcessor.java | 55 + .../interaction/InteractionBehavior.java | 88 + .../interaction/InteractionBehavior.js | 59 + .../interaction/InteractionProcessor.java | 64 + .../interaction/WicketInteractionEvent.java | 90 + .../livedata/LiveDataAjaxBehavior.java | 127 + .../features/livedata/LiveDataFunction.java | 52 + .../features/livedata/LiveDataProcessor.java | 75 + .../livedata/WicketLiveDataUpdateEvent.java | 66 + .../features/selection/JsonSelection.java | 48 + .../selection/JsonSelectionEvent.java | 38 + .../features/selection/SelectionBehavior.java | 94 + .../features/selection/SelectionBehavior.js | 40 + .../selection/SelectionProcessor.java | 58 + .../selection/WicketSelectionEvent.java | 49 + .../src/main/resources/LICENSE | 202 + .../src/main/resources/NOTICE | 12 + .../options/LanguageOptions_de.properties | 29 + 187 files changed, 22507 insertions(+), 1 deletion(-) create mode 100644 showcase/wicked-charts-showcase-wicket8/.gitignore create mode 100644 showcase/wicked-charts-showcase-wicket8/build.gradle create mode 100644 showcase/wicked-charts-showcase-wicket8/eclipse/code-formatter.xml create mode 100644 showcase/wicked-charts-showcase-wicket8/eclipse/wicket-charts-showcase package release.launch create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.html create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/ChartComponent.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.html create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/CodeComponent.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/Demo.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.html create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/HomepageChartJs.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.html create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/NoIDMount.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseApplication.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseSession.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.html create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/SmallChartComponent.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/StringFromResourceModel.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/boot/ShowcaseBooter.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/boot/WarInitializer.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/boot/WebInitializer.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartEndConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartOriginConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/AreaLineBoundariesChartStartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartHorizontalConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartMultiAxisConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartStackedGroupConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/BarChartVerticalConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/BubbleChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/ComboBarLineChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/DataLabellingChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/DoughnutChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/FilteringLabelsConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LegendPointStyleConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartAreaDatasetConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartBasicConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartInterpolatedConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartMultiAxisConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartProgressBarConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartStackedConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedAfterConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartSteppedBeforeConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineChartWithDifferentPointSizesConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LineStylesConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LinearStepSizeConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicLineChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/LogarithmicScatterChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/MinMaxSuggestedConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/MultilineLabelsConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/NonNumericConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/OtherRadarChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/PieChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/PointStylesConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/PolarAreaChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/RadarChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/ScatterChartMultiAxisConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeComboConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeLineConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimePointConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TimeSeriesConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipAverageConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipBorderConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipCallbacksConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlLineConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPieConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipHtmlPointsConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/TooltipNearestConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/base/ShowcaseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLineStylesConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesBasicConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesChartAreaConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesDisplayFalseNoBorderConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/gridlines/GridLinesTicksConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/DatasetIntersectTrueConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/IndexIntersectTrueConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/NearestIntersectTrueConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/PointIntersectTrueConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/xIntersectTrueConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectFalseConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/interactions/yIntersectTrueConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionBottomConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionChartBasicConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionLeftConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionRightConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/configurations/legendposition/LegendPositionTopConfiguration.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/ie/SimplePage.html create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/ie/SimplePage.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/ChartjsShowcaseLink.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/HighchartsShowcaseLink.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartJsLink.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateHighchartLink.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateThemeLink.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/modalwindow/ChartPanel.html create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/modalwindow/ChartPanel.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/modalwindow/ModalWindowPage.html create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/modalwindow/ModalWindowPage.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/options/WicketSplineUpdatingOptions.java create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/resources/LICENSE create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Pie.js create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip-Point.js create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/resources/de/adesso/wickedcharts/showcase/customTooltip.js create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/resources/de/adesso/wickedcharts/showcase/dataLabellingPlugin.js create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/resources/de/adesso/wickedcharts/showcase/jquery-1.8.3.min-IEfix.js create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/resources/de/adesso/wickedcharts/showcase/progressBar.js create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/resources/log4j.properties create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/WEB-INF/appengine-web.xml create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/WEB-INF/web.xml create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/bootstrap-responsive.min.css create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/bootstrap.min.css create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-bg_flat_15_cd0a0a_40x100.png create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-bg_glass_100_e4f1fb_1x400.png create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-bg_glass_50_3baae3_1x400.png create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-bg_glass_80_d7ebf9_1x400.png create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-bg_highlight-soft_100_deedf7_1x100.png create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-bg_highlight-soft_25_ffef8f_1x100.png create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-icons_2694e8_256x240.png create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-icons_2e83ff_256x240.png create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-icons_3d80b3_256x240.png create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-icons_72a7cf_256x240.png create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-icons_ffffff_256x240.png create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/jquery-ui-1.8.23.custom.css create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/syntaxhighlighter/shCoreEclipse.css create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/syntaxhighlighter/shThemeEclipse.css create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/wickedcharts.css create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/img/grid.png create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/img/skies.jpg create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/bootstrap-button.js create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/bootstrap-tab.js create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/bootstrap.min.js create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/customTooltip.js create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/jquery-ui-1.8.23.custom.min.js create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/syntaxhighlighter/shAutoloader.js create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/syntaxhighlighter/shBrushJava.js create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/syntaxhighlighter/shBrushXml.js create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/syntaxhighlighter/shCore.js create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/syntaxhighlighter/shLegacy.js create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/wickedcharts.js create mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/webapp/logo.png create mode 100644 showcase/wicked-charts-showcase-wicket8/src/test/resources/keystore create mode 100644 wicket/wicked-charts-wicket8/.checkstyle create mode 100644 wicket/wicked-charts-wicket8/build.gradle create mode 100644 wicket/wicked-charts-wicket8/eclipse/code-formatter.xml create mode 100644 wicket/wicked-charts-wicket8/eclipse/wicket-charts package distribution.launch create mode 100644 wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/JavaScriptExpressionSendingAjaxBehavior.java create mode 100644 wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/JavaScriptResourceRegistry.java create mode 100644 wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/chartjs/Chart.java create mode 100644 wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/chartjs/JsonRendererFactory.java create mode 100644 wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/chartjs/features/basic/ChartBehavior.java create mode 100644 wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/Chart.java create mode 100644 wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/JsonRendererFactory.java create mode 100644 wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/basic/ChartBehavior.java create mode 100644 wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/drilldown/DrilldownProcessor.java create mode 100644 wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/global/GlobalProcessor.java create mode 100644 wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/interaction/InteractionBehavior.java create mode 100644 wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/interaction/InteractionBehavior.js create mode 100644 wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/interaction/InteractionProcessor.java create mode 100644 wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/interaction/WicketInteractionEvent.java create mode 100644 wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/livedata/LiveDataAjaxBehavior.java create mode 100644 wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/livedata/LiveDataFunction.java create mode 100644 wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/livedata/LiveDataProcessor.java create mode 100644 wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/livedata/WicketLiveDataUpdateEvent.java create mode 100644 wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/selection/JsonSelection.java create mode 100644 wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/selection/JsonSelectionEvent.java create mode 100644 wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/selection/SelectionBehavior.java create mode 100644 wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/selection/SelectionBehavior.js create mode 100644 wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/selection/SelectionProcessor.java create mode 100644 wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/selection/WicketSelectionEvent.java create mode 100644 wicket/wicked-charts-wicket8/src/main/resources/LICENSE create mode 100644 wicket/wicked-charts-wicket8/src/main/resources/NOTICE create mode 100644 wicket/wicked-charts-wicket8/src/main/resources/de/adesso/wickedcharts/highcharts/options/LanguageOptions_de.properties 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/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-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..ee04641d --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/build.gradle @@ -0,0 +1,67 @@ +import org.apache.tools.ant.filters.ReplaceTokens + +dependencies { + compile 'org.apache.wicket:wicket-core:8.0.0' + compile 'de.adesso.wicked-charts:wicked-charts-wicket8:3.0.0' + compile 'org.apache.wicket:wicket-extensions:8.0.0' + compile project(':wicked-charts-showcase-options') + testCompile 'junit:junit:4.12' + compile 'commons-io:commons-io:2.4' + compile( + [group: 'org.apache.wicket', name: 'wicket-spring', version: "8.0.0"], + [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}"], + ) +} + +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}" + } +} + +apply plugin: 'war' +apply plugin: 'org.springframework.boot' + +processResources { + from 'src/main/java' + from 'src/main/resources' + filter(ReplaceTokens, tokens: [projectVersion : wicketcharts_version]) + filter(ReplaceTokens, tokens: [wicketVersion : "8.0.0"]) +} + +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' +} + + + + + + + + + + + + + + + + + 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/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-wicket8/src/main/java/de/adesso/wickedcharts/showcase/Demo.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/Demo.java new file mode 100644 index 00000000..e39275ee --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/Demo.java @@ -0,0 +1,77 @@ +/** + * 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.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/. + * + * @author Tom Hombergs (tom.hombergs@gmail.com) + * + */ +public class Demo { + + public void test() { + + Options options = new Options(); + + options + .setChartOptions(new ChartOptions() + .setType(SeriesType.LINE)); + + options + .setTitle(new Title("My very own chart.")); + + options + .setxAxis(new Axis() + .setCategories(Arrays + .asList(new String[] { "Jan", "Feb", "Mar", "Apr", "May", + "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }))); + + options + .setyAxis(new Axis() + .setTitle(new Title("Temperature (C)"))); + + options + .setLegend(new Legend() + .setLayout(LegendLayout.VERTICAL) + .setAlign(HorizontalAlignment.RIGHT) + .setVerticalAlign(VerticalAlignment.TOP) + .setX(-10) + .setY(100) + .setBorderWidth(0)); + + options + .addSeries(new SimpleSeries() + .setName("Tokyo") + .setData( + Arrays + .asList(new Number[] { 7.0, 6.9, 9.5, 14.5, 18.2, 21.5, + 25.2, 26.5, 23.3, 18.3, 13.9, 9.6 }))); + + options + .addSeries(new SimpleSeries() + .setName("New York") + .setData( + Arrays + .asList(new Number[] { -0.2, 0.8, 5.7, 11.3, 17.0, 22.0, + 24.8, 24.1, 20.1, 14.1, 8.6, 2.5 }))); + } +} 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..cdc515a0 --- /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 + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+
+
+
+ +
+ + + +
+ + + +
+ +

+ Show Java code + » +

+
+ + +
+

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));
+
+
+
+ +
+ +
+ +
+ +
+
+

© Wicked Charts 2012-2018

+
+
+ + + + + + + + + + + + + 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..f14b1f82 --- /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 + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+
+
+
+ +
+ + + + + + + +
+
CHART
+
+ +

Show Java code »

+
+ + +
+

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));
+
+
+
+ +
+ +
+ +
+ + +
+ +
+

© Wicked Charts 2012-2018

+
+ +
+ + + + + + + + + + + + \ 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..814bee06 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.java @@ -0,0 +1,465 @@ +/* + * 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){ + 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")); + add(new UpdateThemeLink("darkgreen", "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)); + add(new UpdateThemeLink("darkgreen", 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("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; + 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() < 2){ + PageParameters temp = new PageParameters(); + temp.add("theme", "default"); + temp.add("chart", "line"); + setResponsePage(HomepageHighcharts.class, temp); + config.add(new Chart("chart", new BasicLineOptions(), null)); + return config.get(0); + } + + themeString = params.getAllNamed().get(0).getValue(); + Theme theme = getThemeFromParams(themeString); + chartString = params.getAllNamed().get(1).getValue(); + + if(chartString == null) { + config.add(new Chart("chart", new BasicLineOptions(), theme)); + return config.get(0); + } + + switch(chartString) { + case "basicBar": + config.add(new Chart("chart", new BasicBarOptions(), theme)); + break; + + case "splineWithSymbols": + config.add(new Chart("chart", new SplineWithSymbolsOptions(), theme)); + break; + + case "irregularIntervals": + config.add(new Chart("chart", new TimeDataWithIrregularIntervalsOptions(), theme)); + break; + + case "logarithmicAxis": + config.add(new Chart("chart", new LogarithmicAxisOptions(), theme)); + break; + + case "scatter": + config.add(new Chart("chart", new ScatterPlotOptions(), theme)); + break; + + case "area": + config.add(new Chart("chart", new BasicAreaOptions(), theme)); + break; + + case "areaWithNegativeValues": + config.add(new Chart("chart", new AreaWithNegativeValuesOptions(), theme)); + break; + + case "stackedAndGroupedColumn": + config.add(new Chart("chart", new StackedAndGroupedColumnOptions(), theme)); + break; + + case "combo": + config.add(new Chart("chart", new ComboOptions(), theme)); + break; + + case "donut": + config.add(new Chart("chart", new DonutOptions(), theme)); + break; + + case "withDataLabels": + config.add(new Chart("chart", new LineWithDataLabelsOptions(), theme)); + break; + + case "zoomableTimeSeries": + config.add(new Chart("chart", new ZoomableTimeSeriesOptions(), theme)); + break; + + case "splineInverted": + config.add(new Chart("chart", new SplineWithInvertedAxisOptions(), theme)); + break; + + case "splineWithPlotBands": + config.add(new Chart("chart", new SplineWithPlotBandsOptions(), theme)); + break; + + case "polar": + config.add(new Chart("chart", new PolarOptions(), theme)); + break; + + case "stackedArea": + config.add(new Chart("chart", new StackedAreaOptions(), theme)); + break; + + case "percentageArea": + config.add(new Chart("chart", new PercentageAreaOptions(), theme)); + break; + + case "areaMissing": + config.add(new Chart("chart", new AreaMissingOptions(), theme)); + break; + + case "areaInverted": + config.add(new Chart("chart", new AreaInvertedAxisOptions(), theme)); + break; + + case "areaSpline": + config.add(new Chart("chart", new AreaSplineOptions(), theme)); + break; + + case "areaSplineRange": + config.add(new Chart("chart", new AreaSplineRangeOptions(), theme)); + break; + + case "columnWithDrilldown": + config.add(new Chart("chart", new ColumnWithDrilldownOptions(), theme)); + break; + + case "columnRotated": + config.add(new Chart("chart", new ColumnWithRotatedLabelsOptions(), theme)); + break; + + case "stackedBar": + config.add(new Chart("chart", new StackedBarOptions(), theme)); + break; + + case "barNegativeStack": + config.add(new Chart("chart", new StackedBarOptions(), theme)); + break; + + case "basicColumn": + config.add(new Chart("chart", new BasicColumnOptions(), theme)); + break; + + case "columnWithNegativeValues": + config.add(new Chart("chart", new ColumnWithNegativeValuesOptions(), theme)); + break; + + case "stackedColumn": + config.add(new Chart("chart", new StackedColumnOptions(), theme)); + break; + + case "stackedPercentage": + config.add(new Chart("chart", new StackedPercentageOptions(), theme)); + break; + + case "basicPie": + config.add(new Chart("chart", new BasicPieOptions(), theme)); + break; + + case "pieWithGradient": + config.add(new Chart("chart", new PieWithGradientOptions(), theme)); + break; + + case "pieWithLegend": + config.add(new Chart("chart", new PieWithLegendOptions(), theme)); + break; + + case "splineUpdating": + config.add(new Chart("chart", new WicketSplineUpdatingOptions(), theme)); + break; + + case "bubble": + config.add(new Chart("chart", new BubbleChartOptions(), theme)); + break; + + case "3dbubble": + config.add(new Chart("chart", new BubbleChart3DOptions(), theme)); + break; + + case "boxplot": + config.add(new Chart("chart", new BoxplotChartOptions(), theme)); + break; + + case "interactive": + config.add(new Chart("chart", new InteractionOptions(), theme)); + break; + + case "angularGauge": + config.add(new Chart("chart", new AngularGaugeOptions(), theme)); + break; + + case "spiderweb": + config.add(new Chart("chart", new SpiderwebOptions(), theme)); + break; + + case "windrose": + config.add(new Chart("chart", new WindroseOptions(), theme)); + break; + + case "columnrange": + config.add(new Chart("chart", new ColumnRangeOptions(), theme)); + break; + + case "arearange": + config.add(new Chart("chart", new AreaRangeOptions(), theme)); + break; + + case "clicktoadd": + config.add(new Chart("chart", new ClickToAddAPointOptions(), theme)); + break; + + case "dualAxes": + config.add(new Chart("chart", new DualAxesOptions(), theme)); + break; + + case "scatterWithRegression": + config.add(new Chart("chart", new ScatterWithRegressionLineOptions(), theme)); + break; + + case "multipleAxes": + config.add(new Chart("chart", new MultipleAxesOptions(), theme)); + break; + + case "errorBar": + config.add(new Chart("chart", new ErrorBarOptions(), theme)); + break; + + case "funnel": + config.add(new Chart("chart", new FunnelOptions(), theme)); + break; + + case "pyramid": + config.add(new Chart("chart", new PyramidOptions(), theme)); + break; + + case "heatmap": + config.add(new Chart("chart", new HeatmapOptions(), theme)); + break; + + default: + config.add(new Chart("chart", new BasicLineOptions(), theme)); + break; + } + return config.get(0); + } + + 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 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..15249a11 --- /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 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/", HomepageChartJs.class)); + mount(new NoIDMount("/highcharts/", 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/SplineUpdatingChartLink.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java new file mode 100644 index 00000000..15de7c15 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java @@ -0,0 +1,35 @@ + +/** + * 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; + +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-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..9a918981 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartJsLink.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.HomepageChartJs; +import org.apache.wicket.ajax.AjaxRequestTarget; +import org.apache.wicket.ajax.markup.html.AjaxLink; +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 AjaxLink { + + 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(final AjaxRequestTarget target) { + 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..0b788524 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateHighchartLink.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.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 AjaxLink { + + 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(final AjaxRequestTarget target) { + 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..a611b842 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateThemeLink.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.ajax.AjaxRequestTarget; +import org.apache.wicket.ajax.markup.html.AjaxLink; +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 AjaxLink { + + 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(final AjaxRequestTarget target) { + 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 = "
t
"; + 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>" ); + + 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>"); + + // 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 = /)<[^<]*)*<\/script>/gi, + rts = /([?&])_=[^&]*/, + rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, + + // Keep a copy of the old load method + _load = jQuery.fn.load, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + allTypes = ["*/"] + ["*"]; + +// #8138, IE may throw an exception when accessing +// a field from window.location if document.domain has been set +try { + ajaxLocation = location.href; +} catch( e ) { + // Use the href attribute of an A element + // since IE will modify it given document.location + ajaxLocation = document.createElement( "a" ); + ajaxLocation.href = ""; + ajaxLocation = ajaxLocation.href; +} + +// Segment location into parts +ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + var dataType, list, placeBefore, + dataTypes = dataTypeExpression.toLowerCase().split( core_rspace ), + i = 0, + length = dataTypes.length; + + if ( jQuery.isFunction( func ) ) { + // For each dataType in the dataTypeExpression + for ( ; i < length; i++ ) { + dataType = dataTypes[ i ]; + // We control if we're asked to add before + // any existing element + placeBefore = /^\+/.test( dataType ); + if ( placeBefore ) { + dataType = dataType.substr( 1 ) || "*"; + } + list = structure[ dataType ] = structure[ dataType ] || []; + // then we add to the structure accordingly + list[ placeBefore ? "unshift" : "push" ]( func ); + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, + dataType /* internal */, inspected /* internal */ ) { + + dataType = dataType || options.dataTypes[ 0 ]; + inspected = inspected || {}; + + inspected[ dataType ] = true; + + var selection, + list = structure[ dataType ], + i = 0, + length = list ? list.length : 0, + executeOnly = ( structure === prefilters ); + + for ( ; i < length && ( executeOnly || !selection ); i++ ) { + selection = list[ i ]( options, originalOptions, jqXHR ); + // If we got redirected to another dataType + // we try there if executing only and not done already + if ( typeof selection === "string" ) { + if ( !executeOnly || inspected[ selection ] ) { + selection = undefined; + } else { + options.dataTypes.unshift( selection ); + selection = inspectPrefiltersOrTransports( + structure, options, originalOptions, jqXHR, selection, inspected ); + } + } + } + // If we're only executing or nothing was selected + // we try the catchall dataType if not done already + if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) { + selection = inspectPrefiltersOrTransports( + structure, options, originalOptions, jqXHR, "*", inspected ); + } + // unnecessary when only executing (prefilters) + // but it'll be ignored by the caller in that case + return selection; +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes #9887 +function ajaxExtend( target, src ) { + var key, deep, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } +} + +jQuery.fn.load = function( url, params, callback ) { + if ( typeof url !== "string" && _load ) { + return _load.apply( this, arguments ); + } + + // Don't do a request if no elements are being requested + if ( !this.length ) { + return this; + } + + var selector, type, response, + self = this, + off = url.indexOf(" "); + + if ( off >= 0 ) { + selector = url.slice( off, url.length ); + url = url.slice( 0, off ); + } + + // If it's a function + if ( jQuery.isFunction( params ) ) { + + // We assume that it's the callback + callback = params; + params = undefined; + + // Otherwise, build a param string + } else if ( params && typeof params === "object" ) { + type = "POST"; + } + + // Request the remote document + jQuery.ajax({ + url: url, + + // if "type" variable is undefined, then "GET" method will be used + type: type, + dataType: "html", + data: params, + complete: function( jqXHR, status ) { + if ( callback ) { + self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); + } + } + }).done(function( responseText ) { + + // Save response for use in complete callback + response = arguments; + + // See if a selector was specified + self.html( selector ? + + // Create a dummy div to hold the results + jQuery("
") + + // inject the contents of the document in, removing the scripts + // to avoid any 'Permission Denied' errors in IE + .append( responseText.replace( rscript, "" ) ) + + // Locate the specified elements + .find( selector ) : + + // If not, just inject the full result + responseText ); + + }); + + return this; +}; + +// Attach a bunch of functions for handling common AJAX events +jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){ + jQuery.fn[ o ] = function( f ){ + return this.on( o, f ); + }; +}); + +jQuery.each( [ "get", "post" ], function( i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + // shift arguments if data argument was omitted + if ( jQuery.isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + return jQuery.ajax({ + type: method, + url: url, + data: data, + success: callback, + dataType: type + }); + }; +}); + +jQuery.extend({ + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + if ( settings ) { + // Building a settings object + ajaxExtend( target, jQuery.ajaxSettings ); + } else { + // Extending ajaxSettings + settings = target; + target = jQuery.ajaxSettings; + } + ajaxExtend( target, settings ); + return target; + }, + + ajaxSettings: { + url: ajaxLocation, + isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), + global: true, + type: "GET", + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + processData: true, + async: true, + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + throws: false, + traditional: false, + headers: {}, + */ + + accepts: { + xml: "application/xml, text/xml", + html: "text/html", + text: "text/plain", + json: "application/json, text/javascript", + "*": allTypes + }, + + contents: { + xml: /xml/, + html: /html/, + json: /json/ + }, + + responseFields: { + xml: "responseXML", + text: "responseText" + }, + + // List of data converters + // 1) key format is "source_type destination_type" (a single space in-between) + // 2) the catchall symbol "*" can be used for source_type + converters: { + + // Convert anything to text + "* text": window.String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": jQuery.parseJSON, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + context: true, + url: true + } + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var // ifModified key + ifModifiedKey, + // Response headers + responseHeadersString, + responseHeaders, + // transport + transport, + // timeout handle + timeoutTimer, + // Cross-domain detection vars + parts, + // To know if global events are to be dispatched + fireGlobals, + // Loop variable + i, + // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + // Callbacks context + callbackContext = s.context || s, + // Context for global events + // It's the callbackContext if one was provided in the options + // and if it's a DOM node or a jQuery collection + globalEventContext = callbackContext !== s && + ( callbackContext.nodeType || callbackContext instanceof jQuery ) ? + jQuery( callbackContext ) : jQuery.event, + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks( "once memory" ), + // Status-dependent callbacks + statusCode = s.statusCode || {}, + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + // The jqXHR state + state = 0, + // Default abort message + strAbort = "canceled", + // Fake xhr + jqXHR = { + + readyState: 0, + + // Caches the header + setRequestHeader: function( name, value ) { + if ( !state ) { + var lname = name.toLowerCase(); + name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Raw string + getAllResponseHeaders: function() { + return state === 2 ? responseHeadersString : null; + }, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( state === 2 ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while( ( match = rheaders.exec( responseHeadersString ) ) ) { + responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; + } + } + match = responseHeaders[ key.toLowerCase() ]; + } + return match === undefined ? null : match; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( !state ) { + s.mimeType = type; + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + statusText = statusText || strAbort; + if ( transport ) { + transport.abort( statusText ); + } + done( 0, statusText ); + return this; + } + }; + + // Callback for when everything is done + // It is defined here because jslint complains if it is declared + // at the end of the function (which would be more logical and readable) + function done( status, nativeStatusText, responses, headers ) { + var isSuccess, success, error, response, modified, + statusText = nativeStatusText; + + // Called once + if ( state === 2 ) { + return; + } + + // State is "done" now + state = 2; + + // Clear timeout if it exists + if ( timeoutTimer ) { + clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + // Get response data + if ( responses ) { + response = ajaxHandleResponses( s, jqXHR, responses ); + } + + // If successful, handle type chaining + if ( status >= 200 && status < 300 || status === 304 ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + + modified = jqXHR.getResponseHeader("Last-Modified"); + if ( modified ) { + jQuery.lastModified[ ifModifiedKey ] = modified; + } + modified = jqXHR.getResponseHeader("Etag"); + if ( modified ) { + jQuery.etag[ ifModifiedKey ] = modified; + } + } + + // If not modified + if ( status === 304 ) { + + statusText = "notmodified"; + isSuccess = true; + + // If we have data + } else { + + isSuccess = ajaxConvert( s, response ); + statusText = isSuccess.state; + success = isSuccess.data; + error = isSuccess.error; + isSuccess = !error; + } + } else { + // We extract error from statusText + // then normalize statusText and status for non-aborts + error = statusText; + if ( !statusText || status ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = ( nativeStatusText || statusText ) + ""; + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ), + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger( "ajaxStop" ); + } + } + } + + // Attach deferreds + deferred.promise( jqXHR ); + jqXHR.success = jqXHR.done; + jqXHR.error = jqXHR.fail; + jqXHR.complete = completeDeferred.add; + + // Status-dependent callbacks + jqXHR.statusCode = function( map ) { + if ( map ) { + var tmp; + if ( state < 2 ) { + for ( tmp in map ) { + statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ]; + } + } else { + tmp = map[ jqXHR.status ]; + jqXHR.always( tmp ); + } + } + return this; + }; + + // Remove hash character (#7531: and string promotion) + // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) + // We also use the url parameter if available + s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); + + // Extract dataTypes list + s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( core_rspace ); + + // A cross-domain request is in order when we have a protocol:host:port mismatch + if ( s.crossDomain == null ) { + parts = rurl.exec( s.url.toLowerCase() ); + s.crossDomain = !!( parts && + ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] || + ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != + ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) + ); + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefilter, stop there + if ( state === 2 ) { + return jqXHR; + } + + // We can fire global events as of now if asked to + fireGlobals = s.global; + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger( "ajaxStart" ); + } + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // If data is available, append data to url + if ( s.data ) { + s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data; + // #9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Get ifModifiedKey before adding the anti-cache parameter + ifModifiedKey = s.url; + + // Add anti-cache in url if needed + if ( s.cache === false ) { + + var ts = jQuery.now(), + // try replacing _= if it is there + ret = s.url.replace( rts, "$1_=" + ts ); + + // if nothing was replaced, add timestamp to the end + s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + ifModifiedKey = ifModifiedKey || s.url; + if ( jQuery.lastModified[ ifModifiedKey ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] ); + } + if ( jQuery.etag[ ifModifiedKey ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] ); + } + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? + s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { + // Abort if not done already and return + return jqXHR.abort(); + + } + + // aborting is no longer a cancellation + strAbort = "abort"; + + // Install callbacks on deferreds + for ( i in { success: 1, error: 1, complete: 1 } ) { + jqXHR[ i ]( s[ i ] ); + } + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = setTimeout( function(){ + jqXHR.abort( "timeout" ); + }, s.timeout ); + } + + try { + state = 1; + transport.send( requestHeaders, done ); + } catch (e) { + // Propagate exception as error if not done + if ( state < 2 ) { + done( -1, e ); + // Simply rethrow otherwise + } else { + throw e; + } + } + } + + return jqXHR; + }, + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {} + +}); + +/* Handles responses to an ajax request: + * - sets all responseXXX fields accordingly + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + + var ct, type, finalDataType, firstDataType, + contents = s.contents, + dataTypes = s.dataTypes, + responseFields = s.responseFields; + + // Fill responseXXX fields + for ( type in responseFields ) { + if ( type in responses ) { + jqXHR[ responseFields[type] ] = responses[ type ]; + } + } + + // Remove auto dataType and get content-type in the process + while( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader( "content-type" ); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +// Chain conversions given the request and the original response +function ajaxConvert( s, response ) { + + var conv, conv2, current, tmp, + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(), + prev = dataTypes[ 0 ], + converters = {}, + i = 0; + + // Apply the dataFilter if provided + if ( s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } + } + + // Convert to each sequential dataType, tolerating list modification + for ( ; (current = dataTypes[++i]); ) { + + // There's only work to do if current dataType is non-auto + if ( current !== "*" ) { + + // Convert response if prev dataType is non-auto and differs from current + if ( prev !== "*" && prev !== current ) { + + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split(" "); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.splice( i--, 0, current ); + } + + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s["throws"] ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; + } + } + } + } + + // Update prev for next iteration + prev = current; + } + } + + return { state: "success", data: response }; +} +var oldCallbacks = [], + rquestion = /\?/, + rjsonp = /(=)\?(?=&|$)|\?\?/, + nonce = jQuery.now(); + +// Default jsonp settings +jQuery.ajaxSetup({ + jsonp: "callback", + jsonpCallback: function() { + var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); + this[ callback ] = true; + return callback; + } +}); + +// Detect, normalize options and install callbacks for jsonp requests +jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { + + var callbackName, overwritten, responseContainer, + data = s.data, + url = s.url, + hasCallback = s.jsonp !== false, + replaceInUrl = hasCallback && rjsonp.test( url ), + replaceInData = hasCallback && !replaceInUrl && typeof data === "string" && + !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && + rjsonp.test( data ); + + // Handle iff the expected data type is "jsonp" or we have a parameter to set + if ( s.dataTypes[ 0 ] === "jsonp" || replaceInUrl || replaceInData ) { + + // Get callback name, remembering preexisting value associated with it + callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? + s.jsonpCallback() : + s.jsonpCallback; + overwritten = window[ callbackName ]; + + // Insert callback into url or form data + if ( replaceInUrl ) { + s.url = url.replace( rjsonp, "$1" + callbackName ); + } else if ( replaceInData ) { + s.data = data.replace( rjsonp, "$1" + callbackName ); + } else if ( hasCallback ) { + s.url += ( rquestion.test( url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; + } + + // Use data converter to retrieve json after script execution + s.converters["script json"] = function() { + if ( !responseContainer ) { + jQuery.error( callbackName + " was not called" ); + } + return responseContainer[ 0 ]; + }; + + // force json dataType + s.dataTypes[ 0 ] = "json"; + + // Install callback + window[ callbackName ] = function() { + responseContainer = arguments; + }; + + // Clean-up function (fires after converters) + jqXHR.always(function() { + // Restore preexisting value + window[ callbackName ] = overwritten; + + // Save back as free + if ( s[ callbackName ] ) { + // make sure that re-using the options doesn't screw things around + s.jsonpCallback = originalSettings.jsonpCallback; + + // save the callback name for future use + oldCallbacks.push( callbackName ); + } + + // Call if it was a function and we have a response + if ( responseContainer && jQuery.isFunction( overwritten ) ) { + overwritten( responseContainer[ 0 ] ); + } + + responseContainer = overwritten = undefined; + }); + + // Delegate to script + return "script"; + } +}); +// Install script dataType +jQuery.ajaxSetup({ + accepts: { + script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /javascript|ecmascript/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +}); + +// Handle cache's special case and global +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + s.global = false; + } +}); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function(s) { + + // This transport only deals with cross domain requests + if ( s.crossDomain ) { + + var script, + head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement; + + return { + + send: function( _, callback ) { + + script = document.createElement( "script" ); + + script.async = "async"; + + if ( s.scriptCharset ) { + script.charset = s.scriptCharset; + } + + script.src = s.url; + + // Attach handlers for all browsers + script.onload = script.onreadystatechange = function( _, isAbort ) { + + if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { + + // Handle memory leak in IE + script.onload = script.onreadystatechange = null; + + // Remove the script + if ( head && script.parentNode ) { + head.removeChild( script ); + } + + // Dereference the script + script = undefined; + + // Callback if not abort + if ( !isAbort ) { + callback( 200, "success" ); + } + } + }; + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709 and #4378). + head.insertBefore( script, head.firstChild ); + }, + + abort: function() { + if ( script ) { + script.onload( 0, 1 ); + } + } + }; + } +}); +var xhrCallbacks, + // #5280: Internet Explorer will keep connections alive if we don't abort on unload + xhrOnUnloadAbort = window.ActiveXObject ? function() { + // Abort all pending requests + for ( var key in xhrCallbacks ) { + xhrCallbacks[ key ]( 0, 1 ); + } + } : false, + xhrId = 0; + +// Functions to create xhrs +function createStandardXHR() { + try { + return new window.XMLHttpRequest(); + } catch( e ) {} +} + +function createActiveXHR() { + try { + return new window.ActiveXObject( "Microsoft.XMLHTTP" ); + } catch( e ) {} +} + +// Create the request object +// (This is still attached to ajaxSettings for backward compatibility) +jQuery.ajaxSettings.xhr = window.ActiveXObject ? + /* Microsoft failed to properly + * implement the XMLHttpRequest in IE7 (can't request local files), + * so we use the ActiveXObject when it is available + * Additionally XMLHttpRequest can be disabled in IE7/IE8 so + * we need a fallback. + */ + function() { + return !this.isLocal && createStandardXHR() || createActiveXHR(); + } : + // For all other browsers, use the standard XMLHttpRequest object + createStandardXHR; + +// Determine support properties +(function( xhr ) { + jQuery.extend( jQuery.support, { + ajax: !!xhr, + cors: !!xhr && ( "withCredentials" in xhr ) + }); +})( jQuery.ajaxSettings.xhr() ); + +// Create transport if the browser can provide an xhr +if ( jQuery.support.ajax ) { + + jQuery.ajaxTransport(function( s ) { + // Cross domain only allowed if supported through XMLHttpRequest + if ( !s.crossDomain || jQuery.support.cors ) { + + var callback; + + return { + send: function( headers, complete ) { + + // Get a new xhr + var handle, i, + xhr = s.xhr(); + + // Open the socket + // Passing null username, generates a login popup on Opera (#2865) + if ( s.username ) { + xhr.open( s.type, s.url, s.async, s.username, s.password ); + } else { + xhr.open( s.type, s.url, s.async ); + } + + // Apply custom fields if provided + if ( s.xhrFields ) { + for ( i in s.xhrFields ) { + xhr[ i ] = s.xhrFields[ i ]; + } + } + + // Override mime type if needed + if ( s.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( s.mimeType ); + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !s.crossDomain && !headers["X-Requested-With"] ) { + headers[ "X-Requested-With" ] = "XMLHttpRequest"; + } + + // Need an extra try/catch for cross domain requests in Firefox 3 + try { + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + } catch( _ ) {} + + // Do send the request + // This may raise an exception which is actually + // handled in jQuery.ajax (so no try/catch here) + xhr.send( ( s.hasContent && s.data ) || null ); + + // Listener + callback = function( _, isAbort ) { + + var status, + statusText, + responseHeaders, + responses, + xml; + + // Firefox throws exceptions when accessing properties + // of an xhr when a network error occurred + // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) + try { + + // Was never called and is aborted or complete + if ( callback && ( isAbort || xhr.readyState === 4 ) ) { + + // Only called once + callback = undefined; + + // Do not keep as active anymore + if ( handle ) { + xhr.onreadystatechange = jQuery.noop; + if ( xhrOnUnloadAbort ) { + delete xhrCallbacks[ handle ]; + } + } + + // If it's an abort + if ( isAbort ) { + // Abort it manually if needed + if ( xhr.readyState !== 4 ) { + xhr.abort(); + } + } else { + status = xhr.status; + responseHeaders = xhr.getAllResponseHeaders(); + responses = {}; + xml = xhr.responseXML; + + // Construct response list + if ( xml && xml.documentElement /* #4958 */ ) { + responses.xml = xml; + } + + // When requesting binary data, IE6-9 will throw an exception + // on any attempt to access responseText (#11426) + try { + responses.text = xhr.responseText; + } catch( e ) { + } + + // Firefox throws an exception when accessing + // statusText for faulty cross-domain requests + try { + statusText = xhr.statusText; + } catch( e ) { + // We normalize with Webkit giving an empty statusText + statusText = ""; + } + + // Filter status for non standard behaviors + + // If the request is local and we have data: assume a success + // (success with no data won't get notified, that's the best we + // can do given current implementations) + if ( !status && s.isLocal && !s.crossDomain ) { + status = responses.text ? 200 : 404; + // IE - #1450: sometimes returns 1223 when it should be 204 + } else if ( status === 1223 ) { + status = 204; + } + } + } + } catch( firefoxAccessException ) { + if ( !isAbort ) { + complete( -1, firefoxAccessException ); + } + } + + // Call complete if needed + if ( responses ) { + complete( status, statusText, responses, responseHeaders ); + } + }; + + if ( !s.async ) { + // if we're in sync mode we fire the callback + callback(); + } else if ( xhr.readyState === 4 ) { + // (IE6 & IE7) if it's in cache and has been + // retrieved directly we need to fire the callback + setTimeout( callback, 0 ); + } else { + handle = ++xhrId; + if ( xhrOnUnloadAbort ) { + // Create the active xhrs callbacks list if needed + // and attach the unload handler + if ( !xhrCallbacks ) { + xhrCallbacks = {}; + jQuery( window ).unload( xhrOnUnloadAbort ); + } + // Add to list of active xhrs callbacks + xhrCallbacks[ handle ] = callback; + } + xhr.onreadystatechange = callback; + } + }, + + abort: function() { + if ( callback ) { + callback(0,1); + } + } + }; + } + }); +} +var fxNow, timerId, + rfxtypes = /^(?:toggle|show|hide)$/, + rfxnum = new RegExp( "^(?:([-+])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), + rrun = /queueHooks$/, + animationPrefilters = [ defaultPrefilter ], + tweeners = { + "*": [function( prop, value ) { + var end, unit, + tween = this.createTween( prop, value ), + parts = rfxnum.exec( value.toString() ), + target = tween.cur(), + start = +target || 0, + scale = 1, + maxIterations = 20; + + if ( parts ) { + end = +parts[2]; + unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + + // We need to compute starting value + if ( unit !== "px" && start ) { + // Iteratively approximate from a nonzero starting point + // Prefer the current property, because this process will be trivial if it uses the same units + // Fallback to end or a simple constant + start = jQuery.css( tween.elem, prop, true ) || end || 1; + + do { + // If previous iteration zeroed out, double until we get *something* + // Use a string for doubling factor so we don't accidentally see scale as unchanged below + scale = scale || ".5"; + + // Adjust and apply + start = start / scale; + jQuery.style( tween.elem, prop, start + unit ); + + // Update scale, tolerating zero or NaN from tween.cur() + // And breaking the loop if scale is unchanged or perfect, or if we've just had enough + } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations ); + } + + tween.unit = unit; + tween.start = start; + // If a +=/-= token was provided, we're doing a relative animation + tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end; + } + return tween; + }] + }; + +// Animations created synchronously will run synchronously +function createFxNow() { + setTimeout(function() { + fxNow = undefined; + }, 0 ); + return ( fxNow = jQuery.now() ); +} + +function createTweens( animation, props ) { + jQuery.each( props, function( prop, value ) { + var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( collection[ index ].call( animation, prop, value ) ) { + + // we're done with this property + return; + } + } + }); +} + +function Animation( elem, properties, options ) { + var result, + index = 0, + tweenerIndex = 0, + length = animationPrefilters.length, + deferred = jQuery.Deferred().always( function() { + // don't match elem in the :animated selector + delete tick.elem; + }), + tick = function() { + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), + // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497) + temp = remaining / animation.duration || 0, + percent = 1 - temp, + index = 0, + length = animation.tweens.length; + + for ( ; index < length ; index++ ) { + animation.tweens[ index ].run( percent ); + } + + deferred.notifyWith( elem, [ animation, percent, remaining ]); + + if ( percent < 1 && length ) { + return remaining; + } else { + deferred.resolveWith( elem, [ animation ] ); + return false; + } + }, + animation = deferred.promise({ + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { specialEasing: {} }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end, easing ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, + // if we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + + for ( ; index < length ; index++ ) { + animation.tweens[ index ].run( 1 ); + } + + // resolve when we played the last frame + // otherwise, reject + if ( gotoEnd ) { + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); + } + return this; + } + }), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length ; index++ ) { + result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + return result; + } + } + + createTweens( animation, props ); + + if ( jQuery.isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } + + jQuery.fx.timer( + jQuery.extend( tick, { + anim: animation, + queue: animation.opts.queue, + elem: elem + }) + ); + + // attach callbacks from options + return animation.progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); +} + +function propFilter( props, specialEasing ) { + var index, name, easing, value, hooks; + + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = jQuery.camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( jQuery.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; + } + + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } + + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; + + // not quite $.extend, this wont overwrite keys already present. + // also - reusing 'index' from above because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } + } + } else { + specialEasing[ name ] = easing; + } + } +} + +jQuery.Animation = jQuery.extend( Animation, { + + tweener: function( props, callback ) { + if ( jQuery.isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.split(" "); + } + + var prop, + index = 0, + length = props.length; + + for ( ; index < length ; index++ ) { + prop = props[ index ]; + tweeners[ prop ] = tweeners[ prop ] || []; + tweeners[ prop ].unshift( callback ); + } + }, + + prefilter: function( callback, prepend ) { + if ( prepend ) { + animationPrefilters.unshift( callback ); + } else { + animationPrefilters.push( callback ); + } + } +}); + +function defaultPrefilter( elem, props, opts ) { + var index, prop, value, length, dataShow, toggle, tween, hooks, oldfire, + anim = this, + style = elem.style, + orig = {}, + handled = [], + hidden = elem.nodeType && isHidden( elem ); + + // handle queue: false promises + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; + } + hooks.unqueued++; + + anim.always(function() { + // doing this makes sure that the complete handler will be called + // before this completes + anim.always(function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + }); + }); + } + + // height/width overflow pass + if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { + // Make sure that nothing sneaks out + // Record all 3 overflow attributes because IE does not + // change the overflow attribute when overflowX and + // overflowY are set to the same value + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Set display property to inline-block for height/width + // animations on inline elements that are having width/height animated + if ( jQuery.css( elem, "display" ) === "inline" && + jQuery.css( elem, "float" ) === "none" ) { + + // inline-level elements accept inline-block; + // block-level elements need to be inline with layout + if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) { + style.display = "inline-block"; + + } else { + style.zoom = 1; + } + } + } + + if ( opts.overflow ) { + style.overflow = "hidden"; + if ( !jQuery.support.shrinkWrapBlocks ) { + anim.done(function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + }); + } + } + + + // show/hide pass + for ( index in props ) { + value = props[ index ]; + if ( rfxtypes.exec( value ) ) { + delete props[ index ]; + toggle = toggle || value === "toggle"; + if ( value === ( hidden ? "hide" : "show" ) ) { + continue; + } + handled.push( index ); + } + } + + length = handled.length; + if ( length ) { + dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} ); + if ( "hidden" in dataShow ) { + hidden = dataShow.hidden; + } + + // store state if its toggle - enables .stop().toggle() to "reverse" + if ( toggle ) { + dataShow.hidden = !hidden; + } + if ( hidden ) { + jQuery( elem ).show(); + } else { + anim.done(function() { + jQuery( elem ).hide(); + }); + } + anim.done(function() { + var prop; + jQuery.removeData( elem, "fxshow", true ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + }); + for ( index = 0 ; index < length ; index++ ) { + prop = handled[ index ]; + tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 ); + orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop ); + + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = tween.start; + if ( hidden ) { + tween.end = tween.start; + tween.start = prop === "width" || prop === "height" ? 1 : 0; + } + } + } + } +} + +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); +} +jQuery.Tween = Tween; + +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || "swing"; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; + + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + if ( this.options.duration ) { + this.pos = eased = jQuery.easing[ this.easing ]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ); + } else { + this.pos = eased = percent; + } + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; + } +}; + +Tween.prototype.init.prototype = Tween.prototype; + +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; + + if ( tween.elem[ tween.prop ] != null && + (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { + return tween.elem[ tween.prop ]; + } + + // passing any value as a 4th parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails + // so, simple values such as "10px" are parsed to Float. + // complex values such as "rotate(1rad)" are returned as is. + result = jQuery.css( tween.elem, tween.prop, false, "" ); + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { + // use step hook for back compat - use cssHook if its there - use .style if its + // available and use plain properties where available + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; + } + } + } +}; + +// Remove in 2.0 - this supports IE8's panic based approach +// to setting things on disconnected nodes + +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; + } + } +}; + +jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" || + // special check for .toggle( handler, handler, ... ) + ( !i && jQuery.isFunction( speed ) && jQuery.isFunction( easing ) ) ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +}); + +jQuery.fn.extend({ + fadeTo: function( speed, to, easing, callback ) { + + // show any hidden elements after setting opacity to 0 + return this.filter( isHidden ).css( "opacity", 0 ).show() + + // animate to the value specified + .end().animate({ opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); + + // Empty animations resolve immediately + if ( empty ) { + anim.stop( true ); + } + }; + + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; + + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue && type !== false ) { + this.queue( type || "fx", [] ); + } + + return this.each(function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = jQuery._data( this ); + + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); + } + } + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); + } + } + + // start the next in the queue if the last step wasn't forced + // timers currently will call their complete callbacks, which will dequeue + // but only if they were gotoEnd + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); + } + }); + } +}); + +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + attrs = { height: type }, + i = 0; + + // if we include width, step value is 1 to do all cssExpand values, + // if we don't include width, step value is 2 to skip over Left and Right + includeWidth = includeWidth? 1 : 0; + for( ; i < 4 ; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } + + if ( includeWidth ) { + attrs.opacity = attrs.width = type; + } + + return attrs; +} + +// Generate shortcuts for custom animations +jQuery.each({ + slideDown: genFx("show"), + slideUp: genFx("hide"), + slideToggle: genFx("toggle"), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +}); + +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + jQuery.isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing + }; + + opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : + opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; + + // normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function() { + if ( jQuery.isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; + + return opt; +}; + +jQuery.easing = { + linear: function( p ) { + return p; + }, + swing: function( p ) { + return 0.5 - Math.cos( p*Math.PI ) / 2; + } +}; + +jQuery.timers = []; +jQuery.fx = Tween.prototype.init; +jQuery.fx.tick = function() { + var timer, + timers = jQuery.timers, + i = 0; + + fxNow = jQuery.now(); + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + // Checks the timer has not already been removed + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } + fxNow = undefined; +}; + +jQuery.fx.timer = function( timer ) { + if ( timer() && jQuery.timers.push( timer ) && !timerId ) { + timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); + } +}; + +jQuery.fx.interval = 13; + +jQuery.fx.stop = function() { + clearInterval( timerId ); + timerId = null; +}; + +jQuery.fx.speeds = { + slow: 600, + fast: 200, + // Default speed + _default: 400 +}; + +// Back Compat <1.8 extension point +jQuery.fx.step = {}; + +if ( jQuery.expr && jQuery.expr.filters ) { + jQuery.expr.filters.animated = function( elem ) { + return jQuery.grep(jQuery.timers, function( fn ) { + return elem === fn.elem; + }).length; + }; +} +var rroot = /^(?:body|html)$/i; + +jQuery.fn.offset = function( options ) { + if ( arguments.length ) { + return options === undefined ? + this : + this.each(function( i ) { + jQuery.offset.setOffset( this, options, i ); + }); + } + + var docElem, body, win, clientTop, clientLeft, scrollTop, scrollLeft, + box = { top: 0, left: 0 }, + elem = this[ 0 ], + doc = elem && elem.ownerDocument; + + if ( !doc ) { + return; + } + + if ( (body = doc.body) === elem ) { + return jQuery.offset.bodyOffset( elem ); + } + + docElem = doc.documentElement; + + // Make sure it's not a disconnected DOM node + if ( !jQuery.contains( docElem, elem ) ) { + return box; + } + + // If we don't have gBCR, just use 0,0 rather than error + // BlackBerry 5, iOS 3 (original iPhone) + if ( typeof elem.getBoundingClientRect !== "undefined" ) { + box = elem.getBoundingClientRect(); + } + win = getWindow( doc ); + clientTop = docElem.clientTop || body.clientTop || 0; + clientLeft = docElem.clientLeft || body.clientLeft || 0; + scrollTop = win.pageYOffset || docElem.scrollTop; + scrollLeft = win.pageXOffset || docElem.scrollLeft; + return { + top: box.top + scrollTop - clientTop, + left: box.left + scrollLeft - clientLeft + }; +}; + +jQuery.offset = { + + bodyOffset: function( body ) { + var top = body.offsetTop, + left = body.offsetLeft; + + if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) { + top += parseFloat( jQuery.css(body, "marginTop") ) || 0; + left += parseFloat( jQuery.css(body, "marginLeft") ) || 0; + } + + return { top: top, left: left }; + }, + + setOffset: function( elem, options, i ) { + var position = jQuery.css( elem, "position" ); + + // set position first, in-case top/left are set even on static elem + if ( position === "static" ) { + elem.style.position = "relative"; + } + + var curElem = jQuery( elem ), + curOffset = curElem.offset(), + curCSSTop = jQuery.css( elem, "top" ), + curCSSLeft = jQuery.css( elem, "left" ), + calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, + props = {}, curPosition = {}, curTop, curLeft; + + // need to be able to calculate position if either top or left is auto and position is either absolute or fixed + if ( calculatePosition ) { + curPosition = curElem.position(); + curTop = curPosition.top; + curLeft = curPosition.left; + } else { + curTop = parseFloat( curCSSTop ) || 0; + curLeft = parseFloat( curCSSLeft ) || 0; + } + + if ( jQuery.isFunction( options ) ) { + options = options.call( elem, i, curOffset ); + } + + if ( options.top != null ) { + props.top = ( options.top - curOffset.top ) + curTop; + } + if ( options.left != null ) { + props.left = ( options.left - curOffset.left ) + curLeft; + } + + if ( "using" in options ) { + options.using.call( elem, props ); + } else { + curElem.css( props ); + } + } +}; + + +jQuery.fn.extend({ + + position: function() { + if ( !this[0] ) { + return; + } + + var elem = this[0], + + // Get *real* offsetParent + offsetParent = this.offsetParent(), + + // Get correct offsets + offset = this.offset(), + parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset(); + + // Subtract element margins + // note: when an element has margin: auto the offsetLeft and marginLeft + // are the same in Safari causing offset.left to incorrectly be 0 + offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0; + offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0; + + // Add offsetParent borders + parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0; + parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0; + + // Subtract the two offsets + return { + top: offset.top - parentOffset.top, + left: offset.left - parentOffset.left + }; + }, + + offsetParent: function() { + return this.map(function() { + var offsetParent = this.offsetParent || document.body; + while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) { + offsetParent = offsetParent.offsetParent; + } + return offsetParent || document.body; + }); + } +}); + + +// Create scrollLeft and scrollTop methods +jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { + var top = /Y/.test( prop ); + + jQuery.fn[ method ] = function( val ) { + return jQuery.access( this, function( elem, method, val ) { + var win = getWindow( elem ); + + if ( val === undefined ) { + return win ? (prop in win) ? win[ prop ] : + win.document.documentElement[ method ] : + elem[ method ]; + } + + if ( win ) { + win.scrollTo( + !top ? val : jQuery( win ).scrollLeft(), + top ? val : jQuery( win ).scrollTop() + ); + + } else { + elem[ method ] = val; + } + }, method, val, arguments.length, null ); + }; +}); + +function getWindow( elem ) { + return jQuery.isWindow( elem ) ? + elem : + elem.nodeType === 9 ? + elem.defaultView || elem.parentWindow : + false; +} +// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods +jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { + jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { + // margin is only for outerHeight, outerWidth + jQuery.fn[ funcName ] = function( margin, value ) { + var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), + extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); + + return jQuery.access( this, function( elem, type, value ) { + var doc; + + if ( jQuery.isWindow( elem ) ) { + // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there + // isn't a whole lot we can do. See pull request at this URL for discussion: + // https://github.com/jquery/jquery/pull/764 + return elem.document.documentElement[ "client" + name ]; + } + + // Get document width or height + if ( elem.nodeType === 9 ) { + doc = elem.documentElement; + + // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest + // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. + return Math.max( + elem.body[ "scroll" + name ], doc[ "scroll" + name ], + elem.body[ "offset" + name ], doc[ "offset" + name ], + doc[ "client" + name ] + ); + } + + return value === undefined ? + // Get width or height on the element, requesting but not forcing parseFloat + jQuery.css( elem, type, value, extra ) : + + // Set width or height on the element + jQuery.style( elem, type, value, extra ); + }, type, chainable ? margin : undefined, chainable, null ); + }; + }); +}); +// Expose jQuery to the global object +window.jQuery = window.$ = jQuery; + +// Expose jQuery as an AMD module, but only for AMD loaders that +// understand the issues with loading multiple versions of jQuery +// in a page that all might call define(). The loader will indicate +// they have special allowances for multiple jQuery versions by +// specifying define.amd.jQuery = true. Register as a named module, +// since jQuery can be concatenated with other files that may use define, +// but not use a proper concatenation script that understands anonymous +// AMD modules. A named AMD is safest and most robust way to register. +// Lowercase jquery is used because AMD module names are derived from +// file names, and jQuery is normally delivered in a lowercase file name. +// Do this after creating the global so that if an AMD module wants to call +// noConflict to hide this version of jQuery, it will work. +if ( typeof define === "function" && define.amd && define.amd.jQuery ) { + define( "jquery", [], function () { return jQuery; } ); +} + +})( window ); diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/resources/de/adesso/wickedcharts/showcase/progressBar.js b/showcase/wicked-charts-showcase-wicket8/src/main/resources/de/adesso/wickedcharts/showcase/progressBar.js new file mode 100644 index 00000000..d2a238ab --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/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-wicket8/src/main/resources/log4j.properties b/showcase/wicked-charts-showcase-wicket8/src/main/resources/log4j.properties new file mode 100644 index 00000000..05cd58a3 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/src/main/resources/log4j.properties @@ -0,0 +1,12 @@ +log4j.appender.Stdout=org.apache.log4j.ConsoleAppender +log4j.appender.Stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.Stdout.layout.conversionPattern=%-5p - %-26.26c{1} - %m\n + +log4j.rootLogger=INFO,Stdout + +log4j.logger.org.apache.wicket=INFO +log4j.logger.org.apache.wicket.protocol.http.HttpSessionStore=INFO +log4j.logger.org.apache.wicket.version=INFO +log4j.logger.org.apache.wicket.RequestCycle=INFO + + diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/WEB-INF/appengine-web.xml b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/WEB-INF/appengine-web.xml new file mode 100644 index 00000000..0c49ebf1 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/WEB-INF/appengine-web.xml @@ -0,0 +1,14 @@ + + + wicked-charts + + + 1-4-1-snapshot + + false + + true + + + diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/WEB-INF/web.xml b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 00000000..229126e4 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,32 @@ + + + + wicked-charts-showcase + + + + + wicked-charts-showcase + org.apache.wicket.protocol.http.WicketFilter + + applicationClassName + de.adesso.wickedcharts.showcase.ShowcaseApplication + + + + + wicked-charts-showcase + /* + + diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/bootstrap-responsive.min.css b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/bootstrap-responsive.min.css new file mode 100644 index 00000000..91cbf906 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/bootstrap-responsive.min.css @@ -0,0 +1,9 @@ +/*! + * Bootstrap Responsive v2.1.1 + * + * Copyright 2012-2018 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.hidden{display:none;visibility:hidden}.visible-phone{display:none!important}.visible-tablet{display:none!important}.hidden-desktop{display:none!important}.visible-desktop{display:inherit!important}@media(min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}}@media(max-width:767px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-phone{display:inherit!important}.hidden-phone{display:none!important}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:30px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%}.row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%}.row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%}.row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%}.row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%}.row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%}.row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%}.row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%}.row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%}.row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%}.row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%}.row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%}.row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%}.row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%}.row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%}.row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%}.row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%}.row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%}.row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%}.row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%}.row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%}.row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%}.row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%}.row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%}.row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%}.row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%}.row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%}.row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%}.row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%}.row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%}.row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%}.row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%}.row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%}.row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%}.row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:30px}input.span12,textarea.span12,.uneditable-input.span12{width:1156px}input.span11,textarea.span11,.uneditable-input.span11{width:1056px}input.span10,textarea.span10,.uneditable-input.span10{width:956px}input.span9,textarea.span9,.uneditable-input.span9{width:856px}input.span8,textarea.span8,.uneditable-input.span8{width:756px}input.span7,textarea.span7,.uneditable-input.span7{width:656px}input.span6,textarea.span6,.uneditable-input.span6{width:556px}input.span5,textarea.span5,.uneditable-input.span5{width:456px}input.span4,textarea.span4,.uneditable-input.span4{width:356px}input.span3,textarea.span3,.uneditable-input.span3{width:256px}input.span2,textarea.span2,.uneditable-input.span2{width:156px}input.span1,textarea.span1,.uneditable-input.span1{width:56px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%}.row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%}.row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%}.row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%}.row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%}.row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%}.row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%}.row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%}.row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%}.row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%}.row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%}.row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%}.row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%}.row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%}.row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%}.row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%}.row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%}.row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%}.row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%}.row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%}.row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%}.row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%}.row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%}.row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%}.row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%}.row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%}.row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%}.row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%}.row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%}.row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%}.row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%}.row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%}.row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%}.row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%}.row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:710px}input.span11,textarea.span11,.uneditable-input.span11{width:648px}input.span10,textarea.span10,.uneditable-input.span10{width:586px}input.span9,textarea.span9,.uneditable-input.span9{width:524px}input.span8,textarea.span8,.uneditable-input.span8{width:462px}input.span7,textarea.span7,.uneditable-input.span7{width:400px}input.span6,textarea.span6,.uneditable-input.span6{width:338px}input.span5,textarea.span5,.uneditable-input.span5{width:276px}input.span4,textarea.span4,.uneditable-input.span4{width:214px}input.span3,textarea.span3,.uneditable-input.span3{width:152px}input.span2,textarea.span2,.uneditable-input.span2{width:90px}input.span1,textarea.span1,.uneditable-input.span1{width:28px}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails>li{float:none;margin-left:0}[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}.controls-row [class*="span"]+[class*="span"]{margin-left:0}.modal{position:fixed;top:20px;right:20px;left:20px;width:auto;margin:0}.modal.fade.in{top:auto}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:20px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.modal{top:10px;right:10px;left:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:20px}.navbar-fixed-bottom{margin-top:20px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 10px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#777;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#777;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .dropdown-menu a:hover{background-color:#f2f2f2}.navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:hover{background-color:#111}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:block;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .nav>li>.dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111;border-bottom-color:#111}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}} diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/bootstrap.min.css b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/bootstrap.min.css new file mode 100644 index 00000000..ea422c2a --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/bootstrap.min.css @@ -0,0 +1,9 @@ +/*! + * Bootstrap v2.1.1 + * + * Copyright 2012-2018 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + */article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{width:auto\9;height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}a{color:#08c;text-decoration:none}a:hover{color:#005580;text-decoration:underline}.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.1);box-shadow:0 1px 3px rgba(0,0,0,0.1)}.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%}.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%}.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%}.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%}.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%}.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%}.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%}.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%}.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%}.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%}.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%}.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%}.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}[class*="span"].hide,.row-fluid [class*="span"].hide{display:none}[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;line-height:0;content:""}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;line-height:0;content:""}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}small{font-size:85%}strong{font-weight:bold}em{font-style:italic}cite{font-style:normal}.muted{color:#999}.text-warning{color:#c09853}.text-error{color:#b94a48}.text-info{color:#3a87ad}.text-success{color:#468847}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:1;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999}h1{font-size:36px;line-height:40px}h2{font-size:30px;line-height:40px}h3{font-size:24px;line-height:40px}h4{font-size:18px;line-height:20px}h5{font-size:14px;line-height:20px}h6{font-size:12px;line-height:20px}h1 small{font-size:24px}h2 small{font-size:18px}h3 small{font-size:14px}h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}ul,ol{padding:0;margin:0 0 10px 25px}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}li{line-height:20px}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}dl{margin-bottom:20px}dt,dd{line-height:20px}dt{font-weight:bold}dd{margin-left:10px}.dl-horizontal{*zoom:1}.dl-horizontal:before,.dl-horizontal:after{display:table;line-height:0;content:""}.dl-horizontal:after{clear:both}.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:25px}blockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border:0;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}label,input,button,select,textarea{font-size:14px;font-weight:normal;line-height:20px}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:9px;font-size:14px;line-height:20px;color:#555;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}input,textarea,.uneditable-input{width:206px}textarea{height:auto}textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#fff;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82,168,236,0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;*margin-top:0;line-height:normal;cursor:pointer}input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto}select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px}select{width:220px;background-color:#fff;border:1px solid #ccc}select[multiple],select[size]{height:auto}select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;cursor:not-allowed;background-color:#fcfcfc;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);box-shadow:inset 0 1px 2px rgba(0,0,0,0.025)}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.radio,.checkbox{min-height:18px;padding-left:18px}.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-18px}.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0}.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:926px}input.span11,textarea.span11,.uneditable-input.span11{width:846px}input.span10,textarea.span10,.uneditable-input.span10{width:766px}input.span9,textarea.span9,.uneditable-input.span9{width:686px}input.span8,textarea.span8,.uneditable-input.span8{width:606px}input.span7,textarea.span7,.uneditable-input.span7{width:526px}input.span6,textarea.span6,.uneditable-input.span6{width:446px}input.span5,textarea.span5,.uneditable-input.span5{width:366px}input.span4,textarea.span4,.uneditable-input.span4{width:286px}input.span3,textarea.span3,.uneditable-input.span3{width:206px}input.span2,textarea.span2,.uneditable-input.span2{width:126px}input.span1,textarea.span1,.uneditable-input.span1{width:46px}.controls-row{*zoom:1}.controls-row:before,.controls-row:after{display:table;line-height:0;content:""}.controls-row:after{clear:both}.controls-row [class*="span"]{float:left}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent}.control-group.warning>label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error>label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success>label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847}.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info>label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad}.control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3}.control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:required:invalid,textarea:focus:required:invalid,select:focus:required:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:required:invalid:focus,textarea:focus:required:invalid:focus,select:focus:required:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:before,.form-actions:after{display:table;line-height:0;content:""}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;*display:inline;padding-left:5px;vertical-align:middle;*zoom:1}.input-append,.input-prepend{margin-bottom:5px;font-size:0;white-space:nowrap}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;font-size:14px;vertical-align:top;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-append .add-on,.input-append .btn{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn:last-child{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;margin-bottom:0;vertical-align:middle;*zoom:1}.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none}.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block}.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0}.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle}.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px;*zoom:1}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;line-height:0;content:""}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:20px}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:bold}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table-condensed th,.table-condensed td{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.table-bordered th,.table-bordered td{border-left:1px solid #ddd}.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0}.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child,.table-bordered tfoot:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child,.table-bordered tfoot:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topleft:4px}.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9}.table-hover tbody tr:hover td,.table-hover tbody tr:hover th{background-color:#f5f5f5}table [class*=span],.row-fluid table [class*=span]{display:table-cell;float:none;margin-left:0}.table .span1{float:none;width:44px;margin-left:0}.table .span2{float:none;width:124px;margin-left:0}.table .span3{float:none;width:204px;margin-left:0}.table .span4{float:none;width:284px;margin-left:0}.table .span5{float:none;width:364px;margin-left:0}.table .span6{float:none;width:444px;margin-left:0}.table .span7{float:none;width:524px;margin-left:0}.table .span8{float:none;width:604px;margin-left:0}.table .span9{float:none;width:684px;margin-left:0}.table .span10{float:none;width:764px;margin-left:0}.table .span11{float:none;width:844px;margin-left:0}.table .span12{float:none;width:924px;margin-left:0}.table .span13{float:none;width:1004px;margin-left:0}.table .span14{float:none;width:1084px;margin-left:0}.table .span15{float:none;width:1164px;margin-left:0}.table .span16{float:none;width:1244px;margin-left:0}.table .span17{float:none;width:1324px;margin-left:0}.table .span18{float:none;width:1404px;margin-left:0}.table .span19{float:none;width:1484px;margin-left:0}.table .span20{float:none;width:1564px;margin-left:0}.table .span21{float:none;width:1644px;margin-left:0}.table .span22{float:none;width:1724px;margin-left:0}.table .span23{float:none;width:1804px;margin-left:0}.table .span24{float:none;width:1884px;margin-left:0}.table tbody tr.success td{background-color:#dff0d8}.table tbody tr.error td{background-color:#f2dede}.table tbody tr.warning td{background-color:#fcf8e3}.table tbody tr.info td{background-color:#d9edf7}.table-hover tbody tr.success:hover td{background-color:#d0e9c6}.table-hover tbody tr.error:hover td{background-color:#ebcccc}.table-hover tbody tr.warning:hover td{background-color:#faf2cc}.table-hover tbody tr.info:hover td{background-color:#c4e3f3}[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;margin-top:1px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat}.icon-white,.nav-tabs>.active>a>[class^="icon-"],.nav-tabs>.active>a>[class*=" icon-"],.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png")}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{width:16px;background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{background-position:-384px -120px}.icon-folder-open{width:16px;background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropup,.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap}.dropdown-menu li>a:hover,.dropdown-menu li>a:focus,.dropdown-submenu:hover>a{color:#fff;text-decoration:none;background-color:#08c;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu .active>a,.dropdown-menu .active>a:hover{color:#fff;text-decoration:none;background-color:#08c;background-color:#0081c2;background-image:linear-gradient(to bottom,#08c,#0077b3);background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-repeat:repeat-x;outline:0;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu .disabled>a,.dropdown-menu .disabled>a:hover{color:#999}.dropdown-menu .disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent}.open{*z-index:1000}.open>.dropdown-menu{display:block}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#ccc;border-style:solid;border-width:5px 0 5px 5px;content:" "}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.typeahead{margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;padding:4px 14px;margin-bottom:0;*margin-left:.3em;font-size:14px;line-height:20px;*line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;*background-color:#e6e6e6;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #bbb;*border:0;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-bottom-color:#a2a2a2;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false);*zoom:1;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn:hover,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:hover{color:#333;text-decoration:none;background-color:#e6e6e6;*background-color:#d9d9d9;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-color:#e6e6e6;background-color:#d9d9d9 \9;background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn.disabled,.btn[disabled]{cursor:default;background-color:#e6e6e6;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:9px 14px;font-size:16px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.btn-large [class^="icon-"]{margin-top:2px}.btn-small{padding:3px 9px;font-size:12px;line-height:18px}.btn-small [class^="icon-"]{margin-top:0}.btn-mini{padding:2px 6px;font-size:11px;line-height:17px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn{border-color:#c5c5c5;border-color:rgba(0,0,0,0.15) rgba(0,0,0,0.15) rgba(0,0,0,0.25)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#006dcc;*background-color:#04c;background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-image:-moz-linear-gradient(top,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary:active,.btn-primary.active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#faa732;*background-color:#f89406;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-warning:hover,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning:active,.btn-warning.active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#da4f49;*background-color:#bd362f;background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffbd362f',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-danger:hover,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#5bb75b;*background-color:#51a351;background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);background-image:-moz-linear-gradient(top,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff51a351',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-success:hover,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#49afcd;*background-color:#2f96b4;background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff2f96b4',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-info:hover,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#363636;*background-color:#222;background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);background-image:-moz-linear-gradient(top,#444,#222);background-repeat:repeat-x;border-color:#222 #222 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff444444',endColorstr='#ff222222',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-inverse:hover,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{color:#08c;cursor:pointer;border-color:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-link:hover{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover{color:#333;text-decoration:none}.btn-group{position:relative;*margin-left:.3em;font-size:0;white-space:nowrap;vertical-align:middle}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{margin-top:10px;margin-bottom:10px;font-size:0}.btn-toolbar .btn-group{display:inline-block;*display:inline;*zoom:1}.btn-toolbar .btn+.btn,.btn-toolbar .btn-group+.btn,.btn-toolbar .btn+.btn-group{margin-left:5px}.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu{font-size:14px}.btn-group>.btn-mini{font-size:11px}.btn-group>.btn-small{font-size:12px}.btn-group>.btn-large{font-size:16px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{*padding-top:5px;padding-right:8px;*padding-bottom:5px;padding-left:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn-group>.btn-mini+.dropdown-toggle{*padding-top:2px;padding-right:5px;*padding-bottom:2px;padding-left:5px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn-large+.dropdown-toggle{*padding-top:7px;padding-right:12px;*padding-bottom:7px;padding-left:12px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#04c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-mini .caret,.btn-small .caret,.btn-large .caret{margin-top:6px}.btn-large .caret{border-top-width:5px;border-right-width:5px;border-left-width:5px}.dropup .btn-large .caret{border-top:0;border-bottom:5px solid #000}.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical .btn{display:block;float:none;width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical .btn+.btn{margin-top:-1px;margin-left:0}.btn-group-vertical .btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.btn-group-vertical .btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.btn-group-vertical .btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0}.btn-group-vertical .btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;color:#c09853;text-shadow:0 1px 0 rgba(255,255,255,0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-bottom:20px;margin-left:0;list-style:none}.nav>li>a{display:block}.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999;text-shadow:0 1px 0 rgba(255,255,255,0.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}.nav-list>li>a,.nav-list .nav-header{margin-right:-15px;margin-left:-15px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:hover{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.2);background-color:#08c}.nav-list [class^="icon-"]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;line-height:0;content:""}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs>li,.nav-pills>li{float:left}.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover{color:#fff;background-color:#08c}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px}.nav-tabs.nav-stacked>li>a:hover{z-index:2;border-color:#ddd}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.nav .dropdown-toggle .caret{margin-top:6px;border-top-color:#08c;border-bottom-color:#08c}.nav .dropdown-toggle:hover .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:hover{cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover{border-color:#999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;line-height:0;content:""}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover{border-color:transparent #ddd #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.nav>.disabled>a{color:#999}.nav>.disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent}.navbar{*position:relative;*z-index:2;margin-bottom:20px;overflow:visible;color:#777}.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff',endColorstr='#fff2f2f2',GradientType=0);*zoom:1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,0.065);box-shadow:0 1px 4px rgba(0,0,0,0.065)}.navbar-inner:before,.navbar-inner:after{display:table;line-height:0;content:""}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto}.navbar .brand{display:block;float:left;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.navbar .brand:hover{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px}.navbar-link{color:#777}.navbar-link:hover{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-right:1px solid #fff;border-left:1px solid #f2f2f2}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn{margin-top:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;line-height:0;content:""}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0}.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:6px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{padding:4px 14px;margin-bottom:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;width:100%;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-right:0;padding-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1),0 1px 10px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1),0 1px 10px rgba(0,0,0,0.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1),0 1px 10px rgba(0,0,0,0.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,0.1),0 -1px 10px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 0 rgba(0,0,0,0.1),0 -1px 10px rgba(0,0,0,0.1);box-shadow:inset 0 1px 0 rgba(0,0,0,0.1),0 -1px 10px rgba(0,0,0,0.1)}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#777;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{color:#333;text-decoration:none;background-color:transparent}.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);box-shadow:inset 0 3px 8px rgba(0,0,0,0.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#ededed;*background-color:#e5e5e5;background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#e5e5e5));background-image:-webkit-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-o-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:linear-gradient(to bottom,#f2f2f2,#e5e5e5);background-image:-moz-linear-gradient(top,#f2f2f2,#e5e5e5);background-repeat:repeat-x;border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffe5e5e5',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075)}.navbar .btn-navbar:hover,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#ccc \9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,0.25);box-shadow:0 1px 0 rgba(0,0,0,0.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.navbar .nav>li>.dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,0.2)}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{top:auto;bottom:-6px;border-top:6px solid #fff;border-bottom:0}.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{color:#555;background-color:#e5e5e5}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{right:12px;left:auto}.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{right:13px;left:auto}.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{right:100%;left:auto;margin-right:-1px;margin-left:0;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.navbar-inverse{color:#999}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top,#222,#111);background-image:-webkit-gradient(linear,0 0,0 100%,from(#222),to(#111));background-image:-webkit-linear-gradient(top,#222,#111);background-image:-o-linear-gradient(top,#222,#111);background-image:linear-gradient(to bottom,#222,#111);background-repeat:repeat-x;border-color:#252525;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff222222',endColorstr='#ff111111',GradientType=0)}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover{color:#fff}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .divider-vertical{border-right-color:#222;border-left-color:#111}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{color:#fff;background-color:#111}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;outline:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.15);-moz-box-shadow:0 0 3px rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.15)}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e0e0e;*background-color:#040404;background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-webkit-linear-gradient(top,#151515,#040404);background-image:-o-linear-gradient(top,#151515,#040404);background-image:linear-gradient(to bottom,#151515,#040404);background-image:-moz-linear-gradient(top,#151515,#040404);background-repeat:repeat-x;border-color:#040404 #040404 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff151515',endColorstr='#ff040404',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.breadcrumb li{display:inline-block;*display:inline;text-shadow:0 1px 0 #fff;*zoom:1}.breadcrumb .divider{padding:0 5px;color:#ccc}.breadcrumb .active{color:#999}.pagination{height:40px;margin:20px 0}.pagination ul{display:inline-block;*display:inline;margin-bottom:0;margin-left:0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;*zoom:1;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:0 14px;line-height:38px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination ul>li>a:hover,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover{color:#999;cursor:default;background-color:transparent}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pager{margin:20px 0;text-align:center;list-style:none;*zoom:1}.pager:before,.pager:after{display:table;line-height:0;content:""}.pager:after{clear:both}.pager li{display:inline}.pager a,.pager span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager a:hover{text-decoration:none;background-color:#f5f5f5}.pager .next a,.pager .next span{float:right}.pager .previous a{float:left}.pager .disabled a,.pager .disabled a:hover,.pager .disabled span{color:#999;cursor:default;background-color:#fff}.modal-open .modal .dropdown-menu{z-index:2050}.modal-open .modal .dropdown.open{*z-index:2050}.modal-open .modal .popover{z-index:2060}.modal-open .modal .tooltip{z-index:2080}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:50%;left:50%;z-index:1050;width:560px;margin:-250px 0 0 -280px;overflow:auto;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.modal.fade{top:-25%;-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out}.modal.fade.in{top:50%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{max-height:400px;padding:15px;overflow-y:auto}.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;*zoom:1;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.modal-footer:before,.modal-footer:after{display:table;line-height:0;content:""}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.tooltip{position:absolute;z-index:1030;display:block;padding:5px;font-size:11px;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{margin-top:-3px}.tooltip.right{margin-left:3px}.tooltip.bottom{margin-top:3px}.tooltip.left{margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;width:236px;padding:1px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.popover.top{margin-bottom:10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-right:10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover-content p,.popover-content ul,.popover-content ol{margin-bottom:0}.popover .arrow,.popover .arrow:after{position:absolute;display:inline-block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow:after{z-index:-1;content:""}.popover.top .arrow{bottom:-10px;left:50%;margin-left:-10px;border-top-color:#fff;border-width:10px 10px 0}.popover.top .arrow:after{bottom:-1px;left:-11px;border-top-color:rgba(0,0,0,0.25);border-width:11px 11px 0}.popover.right .arrow{top:50%;left:-10px;margin-top:-10px;border-right-color:#fff;border-width:10px 10px 10px 0}.popover.right .arrow:after{bottom:-11px;left:-1px;border-right-color:rgba(0,0,0,0.25);border-width:11px 11px 11px 0}.popover.bottom .arrow{top:-10px;left:50%;margin-left:-10px;border-bottom-color:#fff;border-width:0 10px 10px}.popover.bottom .arrow:after{top:-1px;left:-11px;border-bottom-color:rgba(0,0,0,0.25);border-width:0 11px 11px}.popover.left .arrow{top:50%;right:-10px;margin-top:-10px;border-left-color:#fff;border-width:10px 0 10px 10px}.popover.left .arrow:after{right:-1px;bottom:-11px;border-left-color:rgba(0,0,0,0.25);border-width:11px 0 11px 11px}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:before,.thumbnails:after{display:table;line-height:0;content:""}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.055);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.055);box-shadow:0 1px 3px rgba(0,0,0,0.055);-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}a.thumbnail:hover{border-color:#08c;-webkit-box-shadow:0 1px 4px rgba(0,105,214,0.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,0.25);box-shadow:0 1px 4px rgba(0,105,214,0.25)}.thumbnail>img{display:block;max-width:100%;margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#555}.label,.badge{font-size:11.844px;font-weight:bold;line-height:14px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);white-space:nowrap;vertical-align:baseline;background-color:#999}.label{padding:1px 4px 2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding:1px 9px 2px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}a.label:hover,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.label-important,.badge-important{background-color:#b94a48}.label-important[href],.badge-important[href]{background-color:#953b39}.label-warning,.badge-warning{background-color:#f89406}.label-warning[href],.badge-warning[href]{background-color:#c67605}.label-success,.badge-success{background-color:#468847}.label-success[href],.badge-success[href]{background-color:#356635}.label-info,.badge-info{background-color:#3a87ad}.label-info[href],.badge-info[href]{background-color:#2d6987}.label-inverse,.badge-inverse{background-color:#333}.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a}.btn .label,.btn .badge{position:relative;top:-1px}.btn-mini .label,.btn-mini .badge{top:0}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(to bottom,#f5f5f5,#f9f9f9);background-repeat:repeat-x;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#fff5f5f5',endColorstr='#fff9f9f9',GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress .bar{float:left;width:0;height:100%;font-size:12px;color:#fff;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(to bottom,#149bdf,#0480be);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff149bdf',endColorstr='#ff0480be',GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15)}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(to bottom,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffc43c35',GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(to bottom,#62c462,#57a957);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff57a957',GradientType=0)}.progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top,#5bc0de,#339bb9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:-o-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(to bottom,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff339bb9',GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0)}.progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#fbb450;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.accordion{margin-bottom:20px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel .item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-moz-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel .item>img{display:block;line-height:1}.carousel .active,.carousel .next,.carousel .prev{display:block}.carousel .active{left:0}.carousel .next,.carousel .prev{position:absolute;top:0;width:100%}.carousel .next{left:100%}.carousel .prev{left:-100%}.carousel .next.left,.carousel .prev.right{left:0}.carousel .active.left{left:-100%}.carousel .active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{right:15px;left:auto}.carousel-control:hover{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-caption{position:absolute;right:0;bottom:0;left:0;padding:15px;background:#333;background:rgba(0,0,0,0.75)}.carousel-caption h4,.carousel-caption p{line-height:20px;color:#fff}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;background-color:#eee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;color:inherit}.hero-unit p{font-size:18px;font-weight:200;line-height:30px;color:inherit}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed} diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png new file mode 100644 index 0000000000000000000000000000000000000000..6348115e6be09c044cd20ead0202c3ab5b2f9c19 GIT binary patch literal 251 zcmVaF75Mac}}vaR5#k2ZfJhrR<4^Z31`Wpz#J3a8LoN;Gh6h!a)X9!$AU6#K8$v z#Q`{F91Q%ZXUd*<*dgG~N1x91EQ4=6AkFgVs( zAAQ+GrQnN%`yz$&yRVt+nf>RR!x7drH9<9kle(1jzSB%AGQwhbfbL-MboFyt=akR{ E099={B>(^b literal 0 HcmV?d00001 diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-bg_glass_100_e4f1fb_1x400.png b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-bg_glass_100_e4f1fb_1x400.png new file mode 100644 index 0000000000000000000000000000000000000000..705a32ea35d4d0012bfd3b6a3ffe17a2aaf21bb5 GIT binary patch literal 119 zcmeAS@N?(olHy`uVBq!ia0vp^j6gJjgAK^akKnour0hIh978O6-<~(*Vo>05zNqru zes!`qYix+t4(>@$KQ4S5FeM|FA))8zv=y~toE^Ja);%%|y_LML;(w3fvtta7-CP_U Ta$7zCO=9qL^>bP0l+XkKumdMp literal 0 HcmV?d00001 diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-bg_glass_50_3baae3_1x400.png b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-bg_glass_50_3baae3_1x400.png new file mode 100644 index 0000000000000000000000000000000000000000..baabca6baaff94ade4ecd5ddad28e35f52ea3af7 GIT binary patch literal 131 zcmeAS@N?(olHy`uVBq!ia0vp^j6gJjgAK^akKnouq`W*`978O6-=1H{+u$H^^ufM+ zvdx>+CU0QuV-!dbkTBu=d3O3OBmLW&4uK;3Q}6PdBzSM&77W)>Ku`PSi#4qjXP8{lS YyPtFZh>C0s1RBTS>FVdQ&MBb@0KGXW`v3p{ literal 0 HcmV?d00001 diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png new file mode 100644 index 0000000000000000000000000000000000000000..28b566c2c29cc0f849995be62c10d7c292697803 GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0vp^j6j^i!3HGVb)pi0l%A)HV~E7myQentGAQsIIS~9U zUP5CYm&Of+-c)b1XI_rZEUK1mr%ne<%>I8zSo#mI$dWz<>o-8144$rjF6*2UngI7o B9l-zq literal 0 HcmV?d00001 diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png new file mode 100644 index 0000000000000000000000000000000000000000..d58829780430e138704e956a850c2913039fd4d9 GIT binary patch literal 118 zcmeAS@N?(olHy`uVBq!ia0vp^j6j^i!3HGVb)pi0l&z)bCBa S8D#`Ch{4m<&t;ucLK6U&At$5& literal 0 HcmV?d00001 diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-bg_highlight-soft_100_deedf7_1x100.png b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-bg_highlight-soft_100_deedf7_1x100.png new file mode 100644 index 0000000000000000000000000000000000000000..2289d3c7d7b8e0892f5921de1af87a44b7059eb2 GIT binary patch literal 104 zcmeAS@N?(olHy`uVBq!ia0vp^j6j^i!3HGVb)pi0l)k5nV~E7m+!V`FPm zbot}H;osq%|NlEjau{m7wqGXUWVoyE{|q&Lb0!9pSk(^U8R0L0S{XcD{an^LB{Ts5 DibWrf literal 0 HcmV?d00001 diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-bg_highlight-soft_25_ffef8f_1x100.png b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-bg_highlight-soft_25_ffef8f_1x100.png new file mode 100644 index 0000000000000000000000000000000000000000..0de3275beabe5ac461e277724f9821c0e2ce084b GIT binary patch literal 119 zcmeAS@N?(olHy`uVBq!ia0vp^j6j^i!3HGVb)pi0l%1!GV~E7mtNo5#3Ic~SGF#2(;hg6(iIV-sGZbkhsIkkPOWu2dS S1f&8@V(@hJb6Mw<&;$V9Mw z<@?HsG!Qg3zaV+-xQ3ldtad!U<6iGz_enGH*2akP_r)o1D&8p^5M)_c8IIj6Wy*7HJo&CBLuo~nj>(63pZzO(Vv^ZuB3 zMYigjkwA;FEy|G}1jpiMj6|NTm7Uyiw=@FDE*nX<>jR!W@9XIyf%$Fd*J5*D0Z0Lm z9}ZQxyT|x5ftNy?V>EbJz-K>bV9gs9RaXUP<^=;e?&Fqxj;6{ieR-a-@HycA1KMKhql8GOmcxwZ?_-(3hMK^^a*(gaFvBH ziIC!fgH4$W*NbKIaY&T?%&13``KbD@S-0`xQ%v3TV+B!;RC7O!+1a9QCA$H@3tR;k z)SSoR7(s4)f{zM}eWgFN{(ZH5d1O}l)f$ruT!)Q&NImXyZsTzOf9TwctcSfr+M)aJ z5otO+$jvm-P4)ykH)x|cO5xeb>?!`qGw$(>&axqLL6yoB${vsMXgL_-bz@2J_tS92 zdvZG-+vKl@K4Vr(EL{WQt@Z+Ea-hxX0}nTSZxnpi^#Kn8Ox8FgIS|hc}KJQ4tm*HO16ui{(O9} z1YN)GjiQt6fGq`Cj+^`zUf?8hk^(T{{cOQGWFP98am}is28A!5%{R#ENv8fCN!j69 zlMEK(2z?|BY=Je$XD9mB-Kkem*(d-j^9j$2#6r$Dz?s)-TCDCGCs z8>6Pvj{Y+YIeFA@qY22V$)awy@q!9A4rgk5b9TcC;s9Ig^G|6nDP+5=Fzg&?(L=vc zCbGd>fSu~@6!94td+o#d@sid!EIX$rx7*cawe6 z`dScJ+$HssdOjE)O#Ybs56vm-FQ$7yuJJD^Zqk%hMaIgAJ<2yb_MFQte_i;62ScT$ zpjifYyR_E=rQ+>H)pmlr-Udzg*-!|ssw(D7wJvC+Sf8bb9;;q8#z?0p!!bsd{wy|5 zpBaMHE-Ve>i#LLjHRaMLtp%9&(HCng7Sw96jVv!#0k%?F^K7&=T)mnYn)D9(i;4x5 z^NJTJwq~pv;kH@#ejTd*48~(J(r6j34|m`h9fEDj0im)~+%I5XphWymhT;_Zty|Q& zzjPg#-ufAHZ1M*Gccw?Kf|8Pnhtb0`!{N`Bqsa37J+>wC$!e z00k+2Egzz;rbcWoUB%Jvp8W1}$XD%e3>4y;;OZ1ccT-O#uW6Ys@C}Pa`nZrNKzR(2 z4e%3)@QI4SE&E!lW`5y14QhbepBG%_XBV-O(%5tj)@9#|;sC-MNev!zGDHk}JdpGC`iJF#8=8-P$Xoku_=Dw%Cv3{U7L>gf zRQ?<$t`cZ*MP5GQmbmx#!+*!zu>0MewRO9GFGS{b^m_fJ-N0?j@EqoFf>$khj+E|@ z7r3We&^tR^YZrxKe*d22agXqCO0l44&kqCv{u)T|(lv`~PK@DvE z{QI_TlCH5z*gR!>LO)k67{^R+vWx24U2^2ODXpwT;6y+6+$5m)_*w4WY&#do9dCeE z)>p+Ykdhq($DhmMiaYXey!@N%L26uz($aJ!QT{B^Wu}U$^9e#5)=c+XF9@Ill?ZmM zlNgHiz*9!vDc&uxOo;ZVxb`Q!Sk0*gnfxWzmbZh4(=%CD%qP?0=);n$&zaW_$UKV9 z8axdcN#AyZ{P)wj?V{P}vM)YY!>6@}^>U+iv$`9>nMTCPjN>z%yF&3yf%>+T@0vh4 zlC8Xa6zeo?%=o3}M8{aebLHcO{^1Ar8qiM=Gquf?Jo)q5`-+?sUpg?QXyEUpWSm+n z$K-UyqkIwHLquru~o(OF)hhz$Y*|X>ZIbswnxRvr~ z2=rdOGVuD|xRlpAZE<0!X1F(%Anpl^@V^D3vbM}qxe|NI;TTiZy7(IM;R69RkA>a& z6gwYE2sREzQ_LHmWqB+ogMk(fMaSFeoDq-!HkFB_nXt5+2ncFuk9BQL1I&oB1zZi) zYW{6_&-Ip1l*OVRA##1ILQS;5R{-K^0wGTiJbVSi@LA^$D$;@J>^G{6@&+%4{b3(s zC~LEHiTv(0b#zxt?YJ0r_~pUZM~mQ(??(n#>&tD%+@nq=Abj5*8R!~Ul1`G~=qFJ4 zfl|m8ZDCYgtr`4LcOpgiJYX9qRY5;DcWti~PmS$VB$E-Zt^f4)vLDOe_3XTq5^ylW zJ9PKm!V-8sAOJXnUfuFNIf0R9tK-pNs2hO04zr620}5B(Ok>yB)Of-3sP59qfQNbm zA4{w!2@cB;GbR(~szVrbO%(w=5S!X`o@o@x++wbN_tMPT0Vc)*I;Fgsbf^*g0 z2Di?HTApwKq3+YwfNsqd3iP%{hyK1iyuVZc@*0tO_3+N0#GFsz>8MjeJ2UJ%L!%hi zGYYAthH`E+ywA*u{(eJ=ia3h*%k?779rk-K<0VZAPkl;TFUbmei|$fqWO8!_zIvqt z$ly$VrlH46nnpX~X5Yk0iBJl;=WuA4>~X4-f&K0yWf42h&0b30t@NYX$7egQ1Fp!a zbui-D6cWCWV&|R1CY@G8(qOmWjWeX3eX7UggZPGimA}soOuQdXe4uZ#2>5zN>qlI0 z9xk}lE=tNpX1m6*nFr2EQ3xs79!^sCldDJYE$m(qYv3q7>}1R7?iZW7>$~*%zKaC| z=$N?ME$>#+%T&MZC`dW1wUl6Z)JgyCn~V%K&i0H|iwE%$>xsZW3tTfZxIUePci@p;cRu|d=ItIwF z1clVHy{hH?@SD|(Zfqi^0DQ1hczHN7xq85h)rzQqLHMX2^IkuK7FB!kI40s$|CY7~ zNX^{_UjN8}L%Med;|+=4RNTMozn8KT;2tb77bUPCmioh+rZBfIiM6f_P34cQ__o1G zWqQp3VL~~pE5?qODf%iiQQ3f42YF@09tQ*$4v_EKUx;t1KCPCBtgqg z@+Tn;O)a0uky_%jm+WjNB?=~VyH>V#L!*=l*@OS6SVyt_UEH&NA=?V2stHPyKkVNy z&jg<#cjros){#ji)dK z%)We0L_478=HZ8-@xnwsKrWs8)x`MB;(Y`Cmu2c-&SH(vN-F(*e`l?c%+l$|y_AJJ zhcDGnwLvN+bu;_sX|1AiePhx@u&%P$hf*xE+O=~D?_(_KGWQ!158YL-y9$*6mmPo;Rp*Dl5lm-mVM2i`h- zM@nxv590_tvMwPD_{l=b$iOm|+|S{D9&P%zeT$GgX6Akl-tfUF>tL@Ld!B&{pN39t zH>3Vhqkr}2Yul+jb7UiouWVGPNsxX7Ueba+9|~dz?d*QM$ng0DZfO0`7fAy?2yMm| zcnRzUhZ&IcwgjH9cuU!w+VStYa{p*)4IgBf|E8)sqMYtB2KH_}SfsFq(c9i(Q6S3U oBo%DI*Kv;w;*%(i9W@e;D**k^lez literal 0 HcmV?d00001 diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-icons_2e83ff_256x240.png b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-icons_2e83ff_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..09d1cdc856c292c4ab6dd818c7543ac0828bd616 GIT binary patch literal 4369 zcmd^?`8O2)_s3@pGmLE*`#M>&Z`mr_kcu#tBo!IbqU=l7VaSrbQrTh%5m}S08Obh0 zGL{*mi8RK}U~J#s@6Y%1S9~7lb?$xLU+y{go_o*h`AW1wUF3v{Kmh;%r@5J_9RL9Q zdj+hqg8o{9`K7(TZrR4t{=9O`!T-(~c=yEWZ{eswJJe->5bP8)t4;f(Y*i_HU*sLM z2=7-8guZ}@*(HhVC)Mqgr$3T8?#a(hu& z?Kzuw!O%PM>AicSW`_U(cbvJYv3{HfpIP~Q>@$^c588E$vv)V2c|Mr% zuFO$+I~Hg@u}wPm17n%}j1Y+Pbu!bt?iPkjGAo7>9eRN0FZz3X2_QZj+V!}+*8oBQ z_=iI^_TCA;Ea2tPmRNOeX3+VM>KL;o1(h`c@`6Ah`vdH<&+$yTg)jGWW72T}6J`kUAv?2CgyV zrs0y@Fpvpj@kWVE0TzL@Cy#qHn~kgensb{hIm6J&I8hkoNHOz6o1QQ3QM4NZyu?;= zLd>`wPT*uGr+6vAxYv3k8{gMDR>tO}UavDKzzyi6hvbuP=XQ4Y|A)r4#B$U(q7{1Z z0iLeSjo3;T*diS*me%4|!s23l@>R}rn@#Zc{<%CFt;?gd5S<)b=8Yz32U zBBLprntW3RE3f|uNX5Aw|I(IlJjW-Byd?QFFRk%hLU}O*YyYQel}WcXilLMJp9cB4 z)E?D+*Y4zai&XY!>niMfTW-2pp-^KFT93%Leig@uoQGPYRCva-`w#orm`is`p8b4s zxD462;f*^XO$=3by=VzN9i@xxr<1w=pcxl!$!fjWt|fYmq1@@badT?v`d zIi$|e$Ji}FXsiVYf)?pN1R0LBw;+)B5aUJj2fP+=m;=_Eho84g%Jq#@MLPSQEX*@T z6sZb)m?)zby>{j1)(;rRML|gKSs+9jorf-XhQJ2Jyt5Cqc*`S3iX@A5C3jvgAns|4 z*|)YQ%Kmsj+YZ53;nMqh|AFvehUV-9R;1ZZ;w5r9l}8hjSw@#k;>)$P*r%)=Extyu zB!$Kd-F?*50aJ2;TNTR-fc8B{KAq3!vW{g$LlGPfGW+%#CXU zJDcMsvyT2`x~v>>w8@yssoA`KuIZ98CLU{Ia%*nW3G4t}@ApsbC@o^WCqL>OXx>Y^ zSuVWEQ;3=A=@RxCnt0>G@#(VWBQ`0$qTwA#e>SX{_N~JWGsBxFHCw|5|?CzDi>92F-^=b*8sMXnhUJdb!>yGD2nhN@{582 zRPcxuDzs&;8De)>_J19z{0xppXQop#T_5ejGCKv@l>$O#DA-@X{y_1B-AsiU)H}DR z3xDZ8G`amV_WmA&8!W=@jgm|%bnwH%qkg(@J$hLaSV zC-rXIFMM%y<|Gb)o?j zpe-`dJ*N5tC-iH)d0CgLdBsw*C!ST9hY1EkI|Y(&=p&dH&q;a&7HXa5#_wtMsenQL zcpyhwx)Ppw@XmVz?P)DI#^ee1oC!i`>>Jq1ESk-OuQ(Pbv=s{A0AjM@rw#FaU;RUh z*At0{U*NtGVY_-JcuG$?zuuf%ZBTWxKU2yf?iN#-MRWs>A*2;p0G1Tp3d29u5RbnY zDOON-G|PidOOGeybnbzu7UVv71l!b=w7eU5l*{EdKuoKu`#LZ}|fnUr-+lSST9(MTT`0tqOG z#+Q_=lXe-=;rE4u8s~;%i~~ z8v&&+VPeXG=2zw9B5sR$e?R(n%nf?p-(BCZ8}x!_-9T+LT;2=Zu?Wv)j3#>35$6dR z4*7xmI)#06qjh#sXvX(%`#D1mD8fn1G~I;l%Dk{pw)}>_{+3^Fv_q)>2#de5qGCId zPz?ix-3954nM&u@vaw{o%-#HU%_bLJMO#@enR^&B{3ihWdoU6%pBJ`o>im+b-c6r-;c{vd0Z_)`75$jApy2?!9G4_FGa)iZ~9`6VELiYM+n!-mUfvfm{jt zC?!1=%pxJhF>vyQ47Q}R;O48pxgMs)rz$SbM&jkp<6X$r4DHWg>ZnGB-$r2o1*nL# zW0^*itcRY_^Uv^XgQP>W#>KQgM~l{;S(GkVW@&vld^AhWzG^m|9#0#USbM>^en{k2 za8~DTL`(Q~=ofsL&Fc`!L6r~qTnnGo8r98<(aG*<0%aNEr!!BIyY>VV82kxhR%d>V(lN&#BId#urK_i~Pe6?>C~J!pU_lRon#&S_cXoQv;poG8FK4atc

N)npz1~X%p6x{M(Gw!!H=!}lmO0Xr*8ewyH(Q+>oy`fxQkxJ zzzB$)%*xM4s_2(O>)T-QXhwP|&DZam#{O+47q|WKfz_ZL-MypRN~o{fE*I#6@eM?I zs%f-6{Lz6j7rB#U$%O$~TIT!j?|Ip1CpSmb=JA9qCY3-mQf|fVCxswPjok|VofUEP zW5^pTd5B;wRkyW%1a;nYHB$ef6Pv8^);`m0jv6p72iNJl+sVBqZugsq6cq_pyNREi z>GN!h6ZQ6`aOMr_2KI@j=XR@$aJj(2jcpY?>f=2kMV@di5W7Swj?ug10zRe}F1nR* ztMm6+T^)LJe^SzGgSxahQajq0h7#|8oMV0>D~*N}jl?9_X`ka42R4@rryDc3o(c$R?1*!1O9zleSOczw zYPS3~xbJ$~C(3+D7Zkrfjs_lneY^zv^kHmxt)aqZ!aeGABHZ`gvA&K`72z}ihI$Ht z9V&)wQy0g@R9irwbf!{uE&_J2l9jXz^Vj#=qA77*3Pd9OjrE_tKDHADd!AjFQv(ji zct-BMUt9()1Ox!dsI_h1(^F_U)_QJrx|%+y`zWWlD4=Nd?JQ=URh0*{fb1!o4tS(H z^r_T(8t1SAHf1oduG+X^*EC_kL(!QnXL6Hp);449yO&1xE>MXGqT)t10lzvALllX;;Q)RiJX$dm zlR8ep5-GdHmRm9?N#QCjNUA);vC03Gw6yds6^?c4;(MH>;O5xmQ2nGK3Dmk8i*v5t z-{jJsQq30%z}0`g7SN-yN`l-`@6rkJ|V|>18`MV zwUeH}DxWw&h+A+Dn|4|YNr&EfKS`Hz_NkeW3*sI5Rq-J&FzG=!{-K`n65#7O%^&f> z`PkqxyC_K)>781~7H${^Nj{`>XEa&OPqqQhySR5%w2{5+sEakXXHazJp6~LP2QKDx zpkvZrkDOa+A4BbqqX6ls&O)5-Q7`qkZ_?6~c-wQ9tseNtET;nhEOL^`*naKwcMX;R zbto&a;oTR0s;vjfj3wigUg)Sj)!OHQfZoJwAsWYI1A4ntz>X=W4s|y?tUk1r=>#Ct zf+?hq^>rQ3$KNboG$UhCdEmp{qAR13DK$f0ES7kAG~7q+g!jfVq`1b5+c62N^0%~o zKw91o@Wv;0EW*7fINAX3O~L-V{`;xB0q()#^HKZOlLrXVL*Dtw-$SUp8*_J{r( zW`6r`cz0yZQ#f0#*y+m64{bs7GP|2V$phf42rswJB?s@9qf;Bfc^pm-ZS#^5dkG{u zzv;l&B$NYcegSqAnjnPN1?17VUQbPummcWry((85IFB(pFQNGN{hhN$Fv?~l_fr?| z9=%dK(+;kZ(8=mwptjwC-ikBD$Z{l2++~*8wq5ynF<+PNlZI7ba5V#fg~L}kE;UH5 zJ;{P(`G{tNl&z5rUiH~e{I>GT8~9&*(J;Myx9z5P!db!F8RTII^I7c)HU=ss*bYB` zgwiIMZ_q>KEC$4lFm+Afvu6^$X1jm1rB*4H)-EIO5Rvz_p24?OkJ zovD4{-1KA6*oL?a;3qR7GZRB!cE5oAdA#M@{w+fGgsJ-lSmQ^-?8E&Q%tbmjd=@gZ z(}Mg*jsDf6Z)|7s%@9pc-tuw5W&zqUXjv2bVkC%-X?O3F72W4EsIl#1e>Mdz=X4k*_>VxCu_2?jjg16N*5fwC-36OW&;Sz}@jMn}hgJdEd pO;bST+>R{W-aENZYk%(=^(_R5N$LmL{Qc?!%+I4tt4z=_{|902Wu5>4 literal 0 HcmV?d00001 diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-icons_3d80b3_256x240.png b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-icons_3d80b3_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..52c3cc6b744776e9d66ea4e845f7a57c070aa851 GIT binary patch literal 4369 zcmd^?`8O2)_s3^phOrG}UnfiUEn8(9QW1?MNkxXVDEpFin2{xWrLx5kBC;k~Gmw z<@?HsG!Qg3zaV+-xQ3ldtad!U<6iGz_enGH*2akP_r)o1D&8p^5M)_c8IIj6Wy*7HJo&CBLuo~nj>(63pZzO(Vv^ZuB3 zMYigjkwA;FEy|G}1jpiMj6|NTm7Uyiw=@FDE*nX<>jR!W@9XIyf%$Fd*J5*D0Z0Lm z9}ZQxyT|x5ftNy?V>EbJz-K>bV9gs9RaXUP<^=;e?&Fqxj;6{ieR-a-@HycA1KMKhql8GOmcxwZ?_-(3hMK^^a*(gaFvBH ziIC!fgH4$W*NbKIaY&T?%&13``KbD@S-0`xQ%v3TV+B!;RC7O!+1a9QCA$H@3tR;k z)SSoR7(s4)f{zM}eWgFN{(ZH5d1O}l)f$ruT!)Q&NImXyZsTzOf9TwctcSfr+M)aJ z5otO+$jvm-P4)ykH)x|cO5xeb>?!`qGw$(>&axqLL6yoB${vsMXgL_-bz@2J_tS92 zdvZG-+vKl@K4Vr(EL{WQt@Z+Ea-hxX0}nTSZxnpi^#Kn8Ox8FgIS|hc}KJQ4tm*HO16ui{(O9} z1YN)GjiQt6fGq`Cj+^`zUf?8hk^(T{{cOQGWFP98am}is28A!5%{R#ENv8fCN!j69 zlMEK(2z?|BY=Je$XD9mB-Kkem*(d-j^9j$2#6r$Dz?s)-TCDCGCs z8>6Pvj{Y+YIeFA@qY22V$)awy@q!9A4rgk5b9TcC;s9Ig^G|6nDP+5=Fzg&?(L=vc zCbGd>fSu~@6!94td+o#d@sid!EIX$rx7*cawe6 z`dScJ+$HssdOjE)O#Ybs56vm-FQ$7yuJJD^Zqk%hMaIgAJ<2yb_MFQte_i;62ScT$ zpjifYyR_E=rQ+>H)pmlr-Udzg*-!|ssw(D7wJvC+Sf8bb9;;q8#z?0p!!bsd{wy|5 zpBaMHE-Ve>i#LLjHRaMLtp%9&(HCng7Sw96jVv!#0k%?F^K7&=T)mnYn)D9(i;4x5 z^NJTJwq~pv;kH@#ejTd*48~(J(r6j34|m`h9fEDj0im)~+%I5XphWymhT;_Zty|Q& zzjPg#-ufAHZ1M*Gccw?Kf|8Pnhtb0`!{N`Bqsa37J+>wC$!e z00k+2Egzz;rbcWoUB%Jvp8W1}$XD%e3>4y;;OZ1ccT-O#uW6Ys@C}Pa`nZrNKzR(2 z4e%3)@QI4SE&E!lW`5y14QhbepBG%_XBV-O(%5tj)@9#|;sC-MNev!zGDHk}JdpGC`iJF#8=8-P$Xoku_=Dw%Cv3{U7L>gf zRQ?<$t`cZ*MP5GQmbmx#!+*!zu>0MewRO9GFGS{b^m_fJ-N0?j@EqoFf>$khj+E|@ z7r3We&^tR^YZrxKe*d22agXqCO0l44&kqCv{u)T|(lv`~PK@DvE z{QI_TlCH5z*gR!>LO)k67{^R+vWx24U2^2ODXpwT;6y+6+$5m)_*w4WY&#do9dCeE z)>p+Ykdhq($DhmMiaYXey!@N%L26uz($aJ!QT{B^Wu}U$^9e#5)=c+XF9@Ill?ZmM zlNgHiz*9!vDc&uxOo;ZVxb`Q!Sk0*gnfxWzmbZh4(=%CD%qP?0=);n$&zaW_$UKV9 z8axdcN#AyZ{P)wj?V{P}vM)YY!>6@}^>U+iv$`9>nMTCPjN>z%yF&3yf%>+T@0vh4 zlC8Xa6zeo?%=o3}M8{aebLHcO{^1Ar8qiM=Gquf?Jo)q5`-+?sUpg?QXyEUpWSm+n z$K-UyqkIwHLquru~o(OF)hhz$Y*|X>ZIbswnxRvr~ z2=rdOGVuD|xRlpAZE<0!X1F(%Anpl^@V^D3vbM}qxe|NI;TTiZy7(IM;R69RkA>a& z6gwYE2sREzQ_LHmWqB+ogMk(fMaSFeoDq-!HkFB_nXt5+2ncFuk9BQL1I&oB1zZi) zYW{6_&-Ip1l*OVRA##1ILQS;5R{-K^0wGTiJbVSi@LA^$D$;@J>^G{6@&+%4{b3(s zC~LEHiTv(0b#zxt?YJ0r_~pUZM~mQ(??(n#>&tD%+@nq=Abj5*8R!~Ul1`G~=qFJ4 zfl|m8ZDCYgtr`4LcOpgiJYX9qRY5;DcWti~PmS$VB$E-Zt^f4)vLDOe_3XTq5^ylW zJ9PKm!V-8sAOJXnUfuFNIf0R9tK-pNs2hO04zr620}5B(Ok>yB)Of-3sP59qfQNbm zA4{w!2@cB;GbR(~szVrbO%(w=5S!X`o@o@x++wbN_tMPT0Vc)*I;Fgsbf^*g0 z2Di?HTApwKq3+YwfNsqd3iP%{hyK1iyuVZc@*0tO_3+N0#GFsz>8MjeJ2UJ%L!%hi zGYYAthH`E+ywA*u{(eJ=ia3h*%k?779rk-K<0VZAPkl;TFUbmei|$fqWO8!_zIvqt z$ly$VrlH46nnpX~X5Yk0iBJl;=WuA4>~X4-f&K0yWf42h&0b30t@NYX$7egQ1Fp!a zbui-D6cWCWV&|R1CY@G8(qOmWjWeX3eX7UggZPGimA}soOuQdXe4uZ#2>5zN>qlI0 z9xk}lE=tNpX1m6*nFr2EQ3xs79!^sCldDJYE$m(qYv3q7>}1R7?iZW7>$~*%zKaC| z=$N?ME$>#+%T&MZC`dW1wUl6Z)JgyCn~V%K&i0H|iwE%$>xsZW3tTfZxIUePci@p;cRu|d=ItIwF z1clVHy{hH?@SD|(Zfqi^0DQ1hczHN7xq85h)rzQqLHMX2^IkuK7FB!kI40s$|CY7~ zNX^{_UjN8}L%Med;|+=4RNTMozn8KT;2tb77bUPCmioh+rZBfIiM6f_P34cQ__o1G zWqQp3VL~~pE5?qODf%iiQQ3f42YF@09tQ*$4v_EKUx;t1KCPCBtgqg z@+Tn;O)a0uky_%jm+WjNB?=~VyH>V#L!*=l*@OS6SVyt_UEH&NA=?V2stHPyKkVNy z&jg<#cjros){#ji)dK z%)We0L_478=HZ8-@xnwsKrWs8)x`MB;(Y`Cmu2c-&SH(vN-F(*e`l?c%+l$|y_AJJ zhcDGnwLvN+bu;_sX|1AiePhx@u&%P$hf*xE+O=~D?_(_KGWQ!158YL-y9$*6mmPo;Rp*Dl5lm-mVM2i`h- zM@nxv590_tvMwPD_{l=b$iOm|+|S{D9&P%zeT$GgX6Akl-tfUF>tL@Ld!B&{pN39t zH>3Vhqkr}2Yul+jb7UiouWVGPNsxX7Ueba+9|~dz?d*QM$ng0DZfO0`7fAy?2yMm| zcnRzUhZ&IcwgjH9cuU!w+VStYa{p*)4IgBf|E8)sqMYtB2KH_}SfsFq(c9i(Q6S3U oBo%DI*Kv;w;*%(i9W@e^(7u_y7O^ literal 0 HcmV?d00001 diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-icons_72a7cf_256x240.png b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/images/ui-icons_72a7cf_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..0d20b7308331069ee2950fa64cb15f4a29ca55f3 GIT binary patch literal 4369 zcmd^?`8O2)_s3^p#%>tku}Mhk*o=k zjAaH*q%n2|WBYo)Ki|(^@p+urx%YK{x#!$_?me&PE8ZG)k&{h?4FCXenwy#00sz3{ zD`1rcd~Av4mv)cclC`DX`GDg7|DBU+te<{dI4Zyvbp;>c^56h z`;7ykFJNMJN#e#ybz9{atvFoAgWkdJ)23prjp5}Vijv<}yq7<~%dD_LK&b_;FY~KB zrgJVBdPO|De}CBQ007{QF*h}~3x2)ilyJ2zm-o|r}hhtt9 zSt@Tw0?fy@$Va{qER(Mh0&%`pW^%{P!Vo00Y$(yL2YB(aucwCy=Ch{Vh{<^aAo@do z+E-!kpWw>?UI}TAR_A5{pZ}6#%SrwR>7YJZ~h+XnNnkuvK;eNry=O}4AFqntH zuBeK_UY<|XWyx=2%YrGSb12&DMQmE%A^+ku39jZ*NY}xM92*&=y@EDM&oC9EN!D>|biS8`jKxx_x2SkYCoNPRT)lt4#Pw zxFk0WY{FQ$StOH(MIh~FM%|mtM%8}Lx{eo}Vd$it$d7cOnE9ej&lh$p+719-VJkSH zX598C@Ur6*ycA%}8@-|RAFJ)lBePO())*AvI@`FroFhsL$YeAqjr6|(;U zo~q4_*i04KWR16Vg*J*I*BP5mMh;iL`zs9n|5`@x2|{h10x9Xk?kTjf(f^f zILd}5--N;Po4*25F|J3ywIv+R@rfcYNj}R-X*d^GR>;8G{jFR9>9#~NbTa?bAYbR2 z!`dI(9UO0w%6_b!`Mqz;OgG9Es_npQ;kj0?WB8DBY*r{0p3%&{gI-pqlI^1Bzn&f} zLDz43A!$TgU`u|c!zQ1(CpeLmC=ZPPFq?k?(T99tRI_TJPUg*H@d>nimZ5h~LS}dt zsWb2~dQ*@s+5!wki}W3U4TsvA5y<<9(So^sUJE$P9_z)!&)X^GQY=-T%DyWL^N12f zssbOy%c$X2uio1H3FEjZ2<R;IXOZUX*S~oiEK{g;kZQR;YE|!GA%9k2`dMSZ{f@d zAyEVO9yhkbl$_z03*`mCdmcld&gXJjMKf@02o8IhJv$8(hpjE(bD--Rm4t93B;v>2 zjZu?n2frD*tQ>N<(HP{|WL`Jhcu5%(i#0L1J-guuv1eQB^Gj|oDPXxTKkO7>-b1@p zCcMFukD2Q36!sn%EB5C2bVc(qtCU{B;5M``6V^og-tLN-;?0qou4aXCr;jUyxyn3i zEfxS4bxHoBTnvH*kv=8;Lv!-_tLYw)OWbR+s}y-vfxa?ghxEycx!`=qPX~7C(NJkA zXqL{^F6FsEu6TD@r5*34yFt}?F%*ogs*3(vtpge<(qrnO#i&({(bH&2FtnkCACtA? z7rH>TGgHI(;;q0W4cW9wD}IJu)aBZW1=Si%Bh#x@fQ_W)JPUOVTdyjLBEEe~1hP`y1F7ARf1qt}umq=Nft8 zn63kpJHMhI>@v6^BHUgm$%K4+FRi4}9c7-zc4N5WR;I(+FU5gwur@@f99n2NPO(mm zE4w%!Lv>-Vf2_$WF}ej~4x@XUJmE|{sn56h!ty42$rm!}wrXN#MMwRVyMabATs zAmiPlsy=YCeTy|O?Nl`{Uu^Oqun6;jU|_Ukz|2j31k=JfN%w$!t<&6uU9Daf2-uGR z$pvAXjWM&pGxLjW8=Oh)XaA))u1UvS}C zJn7&I+$TJAN6&;n=}zU>n{}-TtV;9)B^}^zgGw!M^>~JmRzMy^Qgkzv@JvHI_F{xs zUhUyD4>~0^mYCJC3#MAk^uohg`(GF`Gg>F}Ypbke2*jgR+C~J3t=`yMA)x?Nr0x?M z%GQbjh`B@R4l)3HBRpt5V^c!o_}>1M=V`CA?YHl8O&Iec{dJq#c~_Yw@EMkp)a|BJ z02v{6BM+jcs!C`sUBy!GpZ?)}$Xo4a1Qg_);OrDabyLnHt!bJp@D7VccsmoxKshvl z1@H?9_l}IlF8f%iWPIg33u=JcT@+a6V->cP)Z6UV6-n+UIiYD2l5kM9$#d)vS?t$r z!|G+lASS!I)@7f|VgUSG33YBW5=0bpGJvCa{p0e$EsZBX<*a-+{J?UAQ`Y6*^2>?^ zl)i+DDF>KelamX-Bj)wv@ZT{v=zf21ZQZut6P|GswO)T^H(=W$ESoVL?^#QlBc|Es z2JGqN_s$O2+D4)oKfdo}4b-EECoz+B6V|J9!a|wy>wfy1zCAem5WgX2KVwD3HWIN4 z1`fRk))_IC&aPo)PJflX@%_4WHoB6wyi_#%C~EMpKlV?51YABRbnmhU`A%DSU;|4( z-@Z+ogiDMfCRfQ0-_KbK#xl~HY$LmNmmJt{ODQShIZ#hMHu0!EKBoJ(+b#rf#p$Dz z^i(hl#3YA+@s~2#qK>>2)mcuvnf!?OjJ4%QkK)B21PtvRzGowvl?@^0{OdM5Ll*<@-gZCGOUCF8~ciCe)* zox1@o;nS|4_hCAxT_g)t_SO4(*tFKLZcda=W_Kev!;mnUesZRBS1^vjU*DGeLjx#F zw2_mGWS*vu8NK$H=oo8wsdTcyFYMq!1L_%krnb3~J8xcVUx8!dYX`a%1^knkgjH>2 zpPa6ElE;MD-Cyi3=sw!7e3?2m%axv1vPo0$Wvx3UfH&H%T|4k<(KN%l4vF^fpjR+3 zB4Rte;`5;@`jyby7DOD!NG+lH_+Ho8y907|-5dS761c6qdw53)^=-@f0$nh+o+M8- z#o56h?<;f7bdW8%Fknl|T)(|tPiyVOrtq2^p5TRqBB(~v?U=oUV1%i$Yu>-JB949n zExs%d6|AA^w$u%w&YP}8=s$8~l~vx{15IbC0b{c89X>l9+^gcYe|X4|5fHUogz>3f zkJcDbFCPkLPQPwIuV`v^m%0d-GaS;;TF#?B+AUJx0oMYvOC;kNJ&VqeBYOUVYbm!n zfA8gM1H})o0WKH^t(U)Y^b zw)G|lV`AB;3c2I6OiyK{(a?gSs5o2gbNu4KrZVAFW2Tl<{(%kcF)ppCfEf`M|LY-| z&3_CYxZLrMG+)%kN33sEsEXwK@IyR|A*AVn$8XrsyjD4b3N&CE>#Zuo+`-GCe_4m< zN?J@^!hd>A9Nbh>IxdGEetq=q$s+jEhmpb6`f}?rx5(4+aG!Ta`Z`9H#M49=>KPPv zpcuSGT^JQpZ3chRnMl^T2-wC-R?sfY-PmizQDQn3NF;c%)!*J;))RTV9-UW`{SQWX zhVH*#SOU-c`vYfCt6M&&C(v>%b=>N7HGOc`VOC**f5FPzY0MgnDi3%b*n_U-MAqc+_DmlcdFXk z;L@H@%@y*;*L}Y3->tDihTc{0(A$@T^_TKPis2d85AXd=$o?FbhCCyUdP zC!bPkAnQuSdC#2c?>7*yh$VZyUN6+xVSVsAPQnEL+`F{(ij07l$S!3@Iwyz!n`at; z1kT`N7`VTts<*>$_f4#n2qu$y4u^(G?q@pbm>=Gf<}u@3tfi#gN?(dyT$a;1;F_#z z2R)8OKK?5)X5J}u(s4C7mF@2Pak`X~clDTDAn(xc@((!y2@k^vkMxWe0pHGP{)`RE z#RiqyMoKzMZ`U|9bHg~u^1&tB!-;CXvh{G@h23kS4eX_doh;ei{i0L%eU`pFbT+30 z9TIlCZwQ(n#F{ho<3mLYfT6sSd&>MRrMB^B*M{jiq*n+ZZQTM_^>q1&UCjjXd zpx|1TH?=$;|1f*fjEqI)fsb|yt`0{eRS$SFTN32aaBsB}Uh7BD!fH=$hXkz3acO&i zl$>qg%}?xDgj;tI&Vb-W!T!7cd&xWgZb9O6k^K9iDL=ia@^kAF7^}*V6uyXx?;9Kx zhUW~BO)z_P#mM0*SxDO-wD0|f0JnS$ePKclj$f0q)nHZm0e5kMYx=iisd5qC{3B}|0ch(BQD4mYjOJ2Bl z_*(5u8>CV~C!=qk+IpAmc8n=TmLp;89+S+L&GN^Kxw>@k6s!V+s|f(iAH2$Osa|sR zX$CaITQn1_Y=va-s!xC7w~=33C;aBa!Sr%nw;JCGX9R7f%?v`B&T5abGEhlDwuHGu zls3_PogN}*@m1UiQ`-nRdnVp4Jz*C3o zNbU{erXPVv*2QH2znF;W=@|Nw+Xd{eqfMW-@8Pm1Ox-TP8a^6k9_%$^F4D1K)6l8y zX5>F=^jMD;+f3z}AsX3u%SHv81ZYR#B~7-MLxHTIo!w8D>E55g4Xq#hBB;PeAtoqJ#RmwV2==ic*rz7lOw=eaq=H~;_ux21)-Jpcgw zdj+hrf&W^f<%Qk9Zpqf#;q3n5{{POY;f!wmTR1An9(4&I0z1LNX50QSTV2M%4|y9c z#{ZQIVJKu~aY5?ZaZP*GIGqGs=e@q6o|EPhZB3CC?@LnORK8O@z{{<0KtSn5?#~OW zy=L;x8T&*%xqElS;s5~Pjk7d2bqIaA)xZbovnZd7eX17WNxx=w`p(8vulwUZ zl{so}MuRNJx5!8S5G;$o2?BApPHt+)!^#*Ww`?rcVE}mcyuY`X2o|uVUyI9o1t11O zemGWR?;aD#0$vJhiPhv~0iXS#iLq!>Qd$` zU{}<|Vb9Md>$4TMbL7C3GP#r;4Wc$}Z;^j;n}yc!E3d;`wry$!JkmJP0%(tIh!!TET8=+{rhUi^60G0t2HJSxXv-*DgC(HrJd8`|Dp3NvL5yg>xAvU zho|fEA~w^-HrW&H-JwkqNX2I-bEXBR&Uhp+y2^)1h1IIlNCzC!v-Mz@&z&VPz+cl1 z=f&f6Y*U~C`ixm4Sy1hl$hg(4%Dy;bq~k7d1<@K&%%NLT`L+A)-QXyKVswX?op90( zB#yeFEih@c{OXU8Oq~1CFI_38GXmns3(`;W(i+bslovCx4u7gvK>DrGOug*?G|1nz z_OR}|ZYS3pq-p?rS7G0qa`TM}r5XqDT4cV>%Qyk#9ES}`jc+Ww|DcbZrF6UG>CeXp zOVIV}K1e#z9@tu#?X)Ri=?zXMB`X3G-_I7FL-Zq`nbfWtX_EO1*!+U6pJW-_k&+vk zMd}THh}{(Ch_wPk(PI4vVB_KT76kGxVytLxpWg}&bHw`a3G#QzxV@ICNax&@hk3<_ zBh`Tq66G{-tCw$V{(y0v7l!tp20~@gdFXjzFbF#bJE7i>T4ux zQdrF3org^wFcnw$#bQMv@SfN3$Fuo7HnB_`2ZGB{ZqGr>%xP;2_!Q{=N-ZhU1c~^5 zdt=OO#wmcpkXJyCG?{{&n=R{Sn=Ytg;<09CH)l7TA&wkt{Q;>RrA2Ia6-QixEPLrU z%0)N$3Nh0?U825&v($Sz}0G_(!v&xSSAzje4{rup+^W@^}ByqOb95$E0sbwK*%#GP}!6`%*Z@L;&C z3^dE&>5%bWAXmP*X1 z_m}Pivs*u7@9i>qA!58fDCwj^M<1P(u^m;urVdlM@>aIf+E3-d9ZW>fc4cS7w5O3sCmKKn z+94A?VyfSBb9{}rEbCIYtXORJBCv__fnZ>?a}edaA%bP$jI?J^q0UKO!mduA8U!3b z0CJ_Js}NWQZoebapVUHP%pPOUm?1<)zd%`hzUM-Y6g1z|@@3G_kio?S0bcbjQuxJd>vU$Uyz(4*peEDSVc-G;O;% z9Y97%Tq}TRsH+oN%2u(oyC=W<9`e@&m;i;jC%L;sP(9RBDQnth3;ZMEQNFH3GEf0c zU<3RF!hNG-vCDooYFS^nPlFnv4(ElI1=vNcr42TF^uq67f{MoN>{f&>xA91r4pz5Zc&@P^i-9||`98v$Si!U@}ouZ88W zg;YL=OQ;4}UQtkpyd~lD{qWy0H|lwJXKmenz#E=*9kt$YX*X!wDk7ITlIUGWnj>a7 z<_GQR752@J)Y(U)ncu(dIit7P}oBq8x$FP85)&Nsw<#rOW z8U_x(1J)Zgm(8tZXU%+(yYcO+Z7#ZszPwa2`ygiMPayX9KondtFMRK!7x`9uWN;(f zfWW?8yOdj;GA3We0YAW92gWipn(d>zcbA+vZ_21BxF?-pfcW` zbqY??6ie(6M)p@6@WQ?Tl7 zoKrKEj|x~2yZehhMLkFRRnOC>XL&L+N;m0B{_OQ9gzzTYb!!Jct=bk?_hIpY9rOwY zMnr69R(?8EN52qR+k!~qnCYc-KmV&*d$&NY?t5cjR)V+ncMor=puTRoo?{5dH;@!* z<~RrV!+ljAN+;Qx2LraY&JWnz^|sYbZjP+Y;|pC#DuHUH+>F~x3PqTkx)=OAE0X9( z(AO6gp~AH^{nq+n)LHYDD8mQN?DDFcd!U&d4PaajzSD1~lXq3p{x=^vItrq3gD^4O z=hYS`?&C-0&KuAV>Jv}T?ba0IafL$~+bZ}p$9lwyyx=-uPN`Hpvv<)Ia>OWHa4+N4 z6zscrW$^XA32EJw^7hYtkRJr{Q8 zQ|*1pp_q6Mno|D6EX!kgSv0h0I3~ef_l%$DTFjL`0y16n%^dGNQn;2V82mqoIi9i{15vu zLq&(BTl9CInUjZlTIa>^!!HlMK3W8Sd_Ow0+E8IT?h$=55$^Z)$WYIuig=O;Lp_1Q z4wOT;XbWQ!>Mh`pdXuSo=KBba;wT!wK`Hf1Ueh04*%D7Kfj*#b~BNfvz zsbf?uiMm5-xhaQ|7Om2OrYbU>ngUM9%F5nU<65IFyu(`yZ;Vb1)=wCd!L2K?c$ezE z4IbS|^?Z>)eEp}ZfjwF)Waw?pPJ?{~*g%;efxO~Nx7dQGLWZ)cPQ*T!((W- zGm2?tM)K}7oG<0Xz<`ltWjxvE<$AH!4*R{A2~uYGr@m!vm*j+e#CE9^*}Oc#uihB| z5;#kMY2^8mrr80%*+02bDx6B{Jsch(d7kQGV7~iGTgFZBu$Pf`tNf`B2{|t7fGhIq zos0xF#l$bfxOtcGDd*MDbdKBaCKxgCEbr8JTNd_1bjWC{Ubgk z9~)9;A1&=FyIt$l!VBXfD~6VCk0fjO%QwLJ7k00RH*%I8cCqF542VzP^;`OU-_?=< zbV}OoQE)HqV`|)X5+WbgSxGWH>t+7-O;(l~Z+FJJ)sygu^+eF01#Suj+pnAcw!s>p z$-xF}c>7t9X6H$^V9hvT5H{jKv+=zzWHA0pgw8e5fZpm9vIphVq3%S4*N3%&jsY^Q zK%sSPuj=?d{ATs0o0y6#0w3%YT^@-_sTuTUwI(Q{;l3KjeAbVk#Wmi%PDxm`zoqQ~ z((<-}*FSP%5gt7uI3t1&75ne{@1^bpdW1;MMGNkSr~UAuDbB4+VQi|x(gdO^zin_) zncfs2hj8xdiiy)@vVkfkItLKvsGtJhrTb0T~tFl4Q3J!flauS==b& z6Bm!g%dDvlCf(St$kVofvH90|9yl-gmvRvcKS&Ye9DdoTK@2m}iSvC{3m%4E0 z@TJD7c1V?!URM7+t?f3)%{X(6JXg~A9TvGQyX6n(^Yt0NX;>vDPcr~mICPooLWA_` z<1A>FuXr|C)dtDr*PQt%Xs5WePWUB&gBj$zZ#BIY%?jDdpbSA-PV0`dGf^oa_Jp}Z zlrGV7oe`#B^+nPIQ`ZDJeJas=ru#=*YL#+n?Go}f33>1GsZ{TTy2bdBihj}mz*mp! zOzn%{WgLM=*CpiuKUs*GnHa{B$2siJqfNi|Z;|rH%stM*8b26kAMCYY&NHwPGtlYn z7UVx_^sgR$Z8x27foS63FCPt|gtcG_ zy#@C|!VQV~TY}G5e57qp?F4jRxqq~@h6^?-cvD>ySwVLl2m7=gERtEn>Fw_@ND%pO oiVC*mbz<%I+0K1Z`+LWvZ$3~$+A!Gm?^hpSc@||}WrmLVKLvuzv;Y7A literal 0 HcmV?d00001 diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/jquery-ui-1.8.23.custom.css b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/jquery-ui-1.8.23.custom.css new file mode 100644 index 00000000..8b438d68 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/cupertino/jquery-ui-1.8.23.custom.css @@ -0,0 +1,563 @@ +/*! + * jQuery UI CSS Framework 1.8.23 + * + * Copyright 2012-2018, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 12pt; list-style: none; } +.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; } +.ui-helper-clearfix:after { clear: both; } +.ui-helper-clearfix { zoom: 1; } +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +/*.ui-state-disabled { cursor: default !important; }*/ + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } + + +/*! + * jQuery UI CSS Framework 1.8.23 + * + * Copyright 2012-2018, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + * + * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=deedf7&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=100&borderColorHeader=aed0ea&fcHeader=222222&iconColorHeader=72a7cf&bgColorContent=f2f5f7&bgTextureContent=04_highlight_hard.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=362b36&iconColorContent=72a7cf&bgColorDefault=d7ebf9&bgTextureDefault=02_glass.png&bgImgOpacityDefault=80&borderColorDefault=aed0ea&fcDefault=2779aa&iconColorDefault=3d80b3&bgColorHover=e4f1fb&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=74b2e2&fcHover=0070a3&iconColorHover=2694e8&bgColorActive=3baae3&bgTextureActive=02_glass.png&bgImgOpacityActive=50&borderColorActive=2694e8&fcActive=ffffff&iconColorActive=ffffff&bgColorHighlight=ffef8f&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=25&borderColorHighlight=f9dd34&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=cd0a0a&bgTextureError=01_flat.png&bgImgOpacityError=15&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffffff&bgColorOverlay=eeeeee&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=90&opacityOverlay=80&bgColorShadow=000000&bgTextureShadow=04_highlight_hard.png&bgImgOpacityShadow=70&opacityShadow=30&thicknessShadow=7px&offsetTopShadow=-7px&offsetLeftShadow=-7px&cornerRadiusShadow=8px + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 12pt; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1em; } +.ui-widget-content { border: 1px solid #dddddd; background: #f2f5f7 url(images/ui-bg_highlight-hard_100_f2f5f7_1x100.png) 50% top repeat-x; color: #362b36; } +.ui-widget-content a { color: #362b36; } +.ui-widget-header { border: 1px solid #aed0ea; background: #deedf7 url(images/ui-bg_highlight-soft_100_deedf7_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; } +.ui-widget-header a { color: #222222; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #aed0ea; background: #d7ebf9 url(images/ui-bg_glass_80_d7ebf9_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #2779aa; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #2779aa; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #74b2e2; background: #e4f1fb url(images/ui-bg_glass_100_e4f1fb_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #0070a3; } +.ui-state-hover a, .ui-state-hover a:hover { color: #0070a3; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #2694e8; background: #3baae3 url(images/ui-bg_glass_50_3baae3_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #ffffff; text-decoration: none; } +.ui-widget :active { outline: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #f9dd34; background: #ffef8f url(images/ui-bg_highlight-soft_25_ffef8f_1x100.png) 50% top repeat-x; color: #363636; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #cd0a0a url(images/ui-bg_flat_15_cd0a0a_40x100.png) 50% 50% repeat-x; color: #ffffff; } +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +/*.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }*/ + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_72a7cf_256x240.png); } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_72a7cf_256x240.png); } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_72a7cf_256x240.png); } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_3d80b3_256x240.png); } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_2694e8_256x240.png); } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; -khtml-border-top-left-radius: 6px; border-top-left-radius: 6px; } +.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; -khtml-border-top-right-radius: 6px; border-top-right-radius: 6px; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; -khtml-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; -khtml-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; } + +/* Overlays */ +.ui-widget-overlay { background: #eeeeee url(images/ui-bg_diagonals-thick_90_eeeeee_40x40.png) 50% 50% repeat; opacity: .80;filter:Alpha(Opacity=80); } +.ui-widget-shadow { margin: -7px 0 0 -7px; padding: 7px; background: #000000 url(images/ui-bg_highlight-hard_70_000000_1x100.png) 50% top repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*! + * jQuery UI Resizable 1.8.23 + * + * Copyright 2012-2018, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Resizable#theming + */ +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; } +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*! + * jQuery UI Selectable 1.8.23 + * + * Copyright 2012-2018, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Selectable#theming + */ +.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } +/*! + * jQuery UI Accordion 1.8.23 + * + * Copyright 2012-2018, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Accordion#theming + */ +/* IE/Win - Fix animation bug - #4615 */ +.ui-accordion { width: 100%; } +.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } +.ui-accordion .ui-accordion-li-fix { display: inline; } +.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } +.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } +.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } +.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } +.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } +.ui-accordion .ui-accordion-content-active { display: block; } +/*! + * jQuery UI Autocomplete 1.8.23 + * + * Copyright 2012-2018, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Autocomplete#theming + */ +.ui-autocomplete { position: absolute; cursor: default; } + +/* workarounds */ +* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ + +/* + * jQuery UI Menu 1.8.23 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Menu#theming + */ +.ui-menu { + list-style:none; + padding: 2px; + margin: 0; + display:block; + float: left; +} +.ui-menu .ui-menu { + margin-top: -3px; +} +.ui-menu .ui-menu-item { + margin:0; + padding: 0; + zoom: 1; + float: left; + clear: left; + width: 100%; +} +.ui-menu .ui-menu-item a { + text-decoration:none; + display:block; + padding:.2em .4em; + line-height:1.5; + zoom:1; +} +.ui-menu .ui-menu-item a.ui-state-hover, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; +} +/*! + * jQuery UI Button 1.8.23 + * + * Copyright 2012-2018, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Button#theming + */ +.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ +.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ +button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ +.ui-button-icons-only { width: 3.4em; } +button.ui-button-icons-only { width: 3.7em; } + +/*button text element */ +.ui-button .ui-button-text { display: block; line-height: 1.4; } +.ui-button-text-only .ui-button-text { padding: .4em 1em; } +.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } +.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } +.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } +.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } +/* no icon support for input elements, provide padding by default */ +input.ui-button { padding: .4em 1em; } + +/*button icon element(s) */ +.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } +.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } +.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } +.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } +.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } + +/*button sets*/ +.ui-buttonset { margin-right: 7px; } +.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } + +/* workarounds */ +button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ +/*! + * jQuery UI Dialog 1.8.23 + * + * Copyright 2012-2018, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Dialog#theming + */ +.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; border-width: 10px; border-color: #362b36;} +.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } +.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } +/*! + * jQuery UI Slider 1.8.23 + * + * Copyright 2012-2018, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Slider#theming + */ +.ui-slider { position: relative; text-align: left; } +.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } +.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } + +.ui-slider-horizontal { height: .8em; } +.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: .8em; height: 100px; } +.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } +.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { top: 0; }/*! + * jQuery UI Tabs 1.8.23 + * + * Copyright 2012-2018, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Tabs#theming + */ +.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ +.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } +.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } +.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } +.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } +.ui-tabs .ui-tabs-hide { display: none !important; } +/*! + * jQuery UI Datepicker 1.8.23 + * + * Copyright 2012-2018, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Datepicker#theming + */ +.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +}/*! + * jQuery UI Progressbar 1.8.23 + * + * Copyright 2012-2018, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Progressbar#theming + */ +.ui-progressbar { height:2em; text-align: left; overflow: hidden; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/syntaxhighlighter/shCoreEclipse.css b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/syntaxhighlighter/shCoreEclipse.css new file mode 100644 index 00000000..a45de9fd --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/syntaxhighlighter/shCoreEclipse.css @@ -0,0 +1,339 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/SyntaxHighlighter + * + * SyntaxHighlighter is donationware. If you are using it, please donate. + * http://alexgorbatchev.com/SyntaxHighlighter/donate.html + * + * @version + * 3.0.83 (July 02 2010) + * + * @copyright + * Copyright (C) 2004-2010 Alex Gorbatchev. + * + * @license + * Dual licensed under the MIT and GPL licenses. + */ +.syntaxhighlighter a, +.syntaxhighlighter div, +.syntaxhighlighter code, +.syntaxhighlighter table, +.syntaxhighlighter table td, +.syntaxhighlighter table tr, +.syntaxhighlighter table tbody, +.syntaxhighlighter table thead, +.syntaxhighlighter table caption, +.syntaxhighlighter textarea { + -moz-border-radius: 0 0 0 0 !important; + -webkit-border-radius: 0 0 0 0 !important; + background: none !important; + border: 0 !important; + bottom: auto !important; + float: none !important; + height: auto !important; + left: auto !important; + line-height: 1.1em !important; + margin: 0 !important; + outline: 0 !important; + overflow: visible !important; + padding: 0 !important; + position: static !important; + right: auto !important; + text-align: left !important; + top: auto !important; + vertical-align: baseline !important; + width: auto !important; + box-sizing: content-box !important; + font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; + font-weight: normal !important; + font-style: normal !important; + font-size: 1em !important; + min-height: inherit !important; + min-height: auto !important; +} + +.syntaxhighlighter { + width: 100% !important; + margin: 1em 0 1em 0 !important; + position: relative !important; + overflow: auto !important; + font-size: 1em !important; +} +.syntaxhighlighter.source { + overflow: hidden !important; +} +.syntaxhighlighter .bold { + font-weight: bold !important; +} +.syntaxhighlighter .italic { + font-style: italic !important; +} +.syntaxhighlighter .line { + white-space: pre !important; +} +.syntaxhighlighter table { + width: 100% !important; +} +.syntaxhighlighter table caption { + text-align: left !important; + padding: .5em 0 0.5em 1em !important; +} +.syntaxhighlighter table td.code { + width: 100% !important; +} +.syntaxhighlighter table td.code .container { + position: relative !important; +} +.syntaxhighlighter table td.code .container textarea { + box-sizing: border-box !important; + position: absolute !important; + left: 0 !important; + top: 0 !important; + width: 100% !important; + height: 100% !important; + border: none !important; + background: white !important; + padding-left: 1em !important; + overflow: hidden !important; + white-space: pre !important; +} +.syntaxhighlighter table td.gutter .line { + text-align: right !important; + padding: 0 0.5em 0 1em !important; +} +.syntaxhighlighter table td.code .line { + padding: 0 1em !important; +} +.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line { + padding-left: 0em !important; +} +.syntaxhighlighter.show { + display: block !important; +} +.syntaxhighlighter.collapsed table { + display: none !important; +} +.syntaxhighlighter.collapsed .toolbar { + padding: 0.1em 0.8em 0em 0.8em !important; + font-size: 1em !important; + position: static !important; + width: auto !important; + height: auto !important; +} +.syntaxhighlighter.collapsed .toolbar span { + display: inline !important; + margin-right: 1em !important; +} +.syntaxhighlighter.collapsed .toolbar span a { + padding: 0 !important; + display: none !important; +} +.syntaxhighlighter.collapsed .toolbar span a.expandSource { + display: inline !important; +} +.syntaxhighlighter .toolbar { + position: absolute !important; + right: 1px !important; + top: 1px !important; + width: 11px !important; + height: 11px !important; + font-size: 10px !important; + z-index: 10 !important; +} +.syntaxhighlighter .toolbar span.title { + display: inline !important; +} +.syntaxhighlighter .toolbar a { + display: block !important; + text-align: center !important; + text-decoration: none !important; + padding-top: 1px !important; +} +.syntaxhighlighter .toolbar a.expandSource { + display: none !important; +} +.syntaxhighlighter.ie { + font-size: .9em !important; + padding: 1px 0 1px 0 !important; +} +.syntaxhighlighter.ie .toolbar { + line-height: 8px !important; +} +.syntaxhighlighter.ie .toolbar a { + padding-top: 0px !important; +} +.syntaxhighlighter.printing .line.alt1 .content, +.syntaxhighlighter.printing .line.alt2 .content, +.syntaxhighlighter.printing .line.highlighted .number, +.syntaxhighlighter.printing .line.highlighted.alt1 .content, +.syntaxhighlighter.printing .line.highlighted.alt2 .content { + background: none !important; +} +.syntaxhighlighter.printing .line .number { + color: #bbbbbb !important; +} +.syntaxhighlighter.printing .line .content { + color: black !important; +} +.syntaxhighlighter.printing .toolbar { + display: none !important; +} +.syntaxhighlighter.printing a { + text-decoration: none !important; +} +.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a { + color: black !important; +} +.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a { + color: #008200 !important; +} +.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a { + color: blue !important; +} +.syntaxhighlighter.printing .keyword { + color: #006699 !important; + font-weight: bold !important; +} +.syntaxhighlighter.printing .preprocessor { + color: gray !important; +} +.syntaxhighlighter.printing .variable { + color: #aa7700 !important; +} +.syntaxhighlighter.printing .value { + color: #009900 !important; +} +.syntaxhighlighter.printing .functions { + color: #ff1493 !important; +} +.syntaxhighlighter.printing .constants { + color: #0066cc !important; +} +.syntaxhighlighter.printing .script { + font-weight: bold !important; +} +.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a { + color: gray !important; +} +.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a { + color: #ff1493 !important; +} +.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a { + color: red !important; +} +.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a { + color: black !important; +} + +.syntaxhighlighter { + background-color: white !important; +} +.syntaxhighlighter .line.alt1 { + background-color: white !important; +} +.syntaxhighlighter .line.alt2 { + background-color: white !important; +} +.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 { + background-color: #c3defe !important; +} +.syntaxhighlighter .line.highlighted.number { + color: white !important; +} +.syntaxhighlighter table caption { + color: black !important; +} +.syntaxhighlighter .gutter { + color: #787878 !important; +} +.syntaxhighlighter .gutter .line { + border-right: 3px solid #d4d0c8 !important; +} +.syntaxhighlighter .gutter .line.highlighted { + background-color: #d4d0c8 !important; + color: white !important; +} +.syntaxhighlighter.printing .line .content { + border: none !important; +} +.syntaxhighlighter.collapsed { + overflow: visible !important; +} +.syntaxhighlighter.collapsed .toolbar { + color: #3f5fbf !important; + background: white !important; + border: 1px solid #d4d0c8 !important; +} +.syntaxhighlighter.collapsed .toolbar a { + color: #3f5fbf !important; +} +.syntaxhighlighter.collapsed .toolbar a:hover { + color: #aa7700 !important; +} +.syntaxhighlighter .toolbar { + color: #a0a0a0 !important; + background: #d4d0c8 !important; + border: none !important; +} +.syntaxhighlighter .toolbar a { + color: #a0a0a0 !important; +} +.syntaxhighlighter .toolbar a:hover { + color: red !important; +} +.syntaxhighlighter .plain, .syntaxhighlighter .plain a { + color: black !important; +} +.syntaxhighlighter .comments, .syntaxhighlighter .comments a { + color: #3f5fbf !important; +} +.syntaxhighlighter .string, .syntaxhighlighter .string a { + color: #2a00ff !important; +} +.syntaxhighlighter .keyword { + color: #7f0055 !important; +} +.syntaxhighlighter .preprocessor { + color: #646464 !important; +} +.syntaxhighlighter .variable { + color: #aa7700 !important; +} +.syntaxhighlighter .value { + color: #009900 !important; +} +.syntaxhighlighter .functions { + color: #ff1493 !important; +} +.syntaxhighlighter .constants { + color: #0066cc !important; +} +.syntaxhighlighter .script { + font-weight: bold !important; + color: #7f0055 !important; + background-color: none !important; +} +.syntaxhighlighter .color1, .syntaxhighlighter .color1 a { + color: gray !important; +} +.syntaxhighlighter .color2, .syntaxhighlighter .color2 a { + color: #ff1493 !important; +} +.syntaxhighlighter .color3, .syntaxhighlighter .color3 a { + color: red !important; +} + +.syntaxhighlighter .keyword { + font-weight: bold !important; +} +.syntaxhighlighter .xml .keyword { + color: #3f7f7f !important; + font-weight: normal !important; +} +.syntaxhighlighter .xml .color1, .syntaxhighlighter .xml .color1 a { + color: #7f007f !important; +} +.syntaxhighlighter .xml .string { + font-style: italic !important; + color: #2a00ff !important; +} diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/syntaxhighlighter/shThemeEclipse.css b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/syntaxhighlighter/shThemeEclipse.css new file mode 100644 index 00000000..77377d95 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/syntaxhighlighter/shThemeEclipse.css @@ -0,0 +1,128 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/SyntaxHighlighter + * + * SyntaxHighlighter is donationware. If you are using it, please donate. + * http://alexgorbatchev.com/SyntaxHighlighter/donate.html + * + * @version + * 3.0.83 (July 02 2010) + * + * @copyright + * Copyright (C) 2004-2010 Alex Gorbatchev. + * + * @license + * Dual licensed under the MIT and GPL licenses. + */ +.syntaxhighlighter { + background-color: white !important; +} +.syntaxhighlighter .line.alt1 { + background-color: white !important; +} +.syntaxhighlighter .line.alt2 { + background-color: white !important; +} +.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 { + background-color: #c3defe !important; +} +.syntaxhighlighter .line.highlighted.number { + color: white !important; +} +.syntaxhighlighter table caption { + color: black !important; +} +.syntaxhighlighter .gutter { + color: #787878 !important; +} +.syntaxhighlighter .gutter .line { + border-right: 3px solid #d4d0c8 !important; +} +.syntaxhighlighter .gutter .line.highlighted { + background-color: #d4d0c8 !important; + color: white !important; +} +.syntaxhighlighter.printing .line .content { + border: none !important; +} +.syntaxhighlighter.collapsed { + overflow: visible !important; +} +.syntaxhighlighter.collapsed .toolbar { + color: #3f5fbf !important; + background: white !important; + border: 1px solid #d4d0c8 !important; +} +.syntaxhighlighter.collapsed .toolbar a { + color: #3f5fbf !important; +} +.syntaxhighlighter.collapsed .toolbar a:hover { + color: #aa7700 !important; +} +.syntaxhighlighter .toolbar { + color: #a0a0a0 !important; + background: #d4d0c8 !important; + border: none !important; +} +.syntaxhighlighter .toolbar a { + color: #a0a0a0 !important; +} +.syntaxhighlighter .toolbar a:hover { + color: red !important; +} +.syntaxhighlighter .plain, .syntaxhighlighter .plain a { + color: black !important; +} +.syntaxhighlighter .comments, .syntaxhighlighter .comments a { + color: #3f5fbf !important; +} +.syntaxhighlighter .string, .syntaxhighlighter .string a { + color: #2a00ff !important; +} +.syntaxhighlighter .keyword { + color: #7f0055 !important; +} +.syntaxhighlighter .preprocessor { + color: #646464 !important; +} +.syntaxhighlighter .variable { + color: #aa7700 !important; +} +.syntaxhighlighter .value { + color: #009900 !important; +} +.syntaxhighlighter .functions { + color: #ff1493 !important; +} +.syntaxhighlighter .constants { + color: #0066cc !important; +} +.syntaxhighlighter .script { + font-weight: bold !important; + color: #7f0055 !important; + background-color: none !important; +} +.syntaxhighlighter .color1, .syntaxhighlighter .color1 a { + color: gray !important; +} +.syntaxhighlighter .color2, .syntaxhighlighter .color2 a { + color: #ff1493 !important; +} +.syntaxhighlighter .color3, .syntaxhighlighter .color3 a { + color: red !important; +} + +.syntaxhighlighter .keyword { + font-weight: bold !important; +} +.syntaxhighlighter .xml .keyword { + color: #3f7f7f !important; + font-weight: normal !important; +} +.syntaxhighlighter .xml .color1, .syntaxhighlighter .xml .color1 a { + color: #7f007f !important; +} +.syntaxhighlighter .xml .string { + font-style: italic !important; + color: #2a00ff !important; +} diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/wickedcharts.css b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/wickedcharts.css new file mode 100644 index 00000000..2ec8b218 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/css/wickedcharts.css @@ -0,0 +1,118 @@ +/** + * Copyright 2012-2018 Matthias Balke (matthias.balke@gmail.com) + * + * 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. + */ + + .highcharts-container{ + min-height: 400px; + } + +#bannerContainer { + /* http://www.colorzilla.com/gradient-editor/ */ + background: #006ec7; /* Old browsers */ + /* IE9 SVG, needs conditional override of 'filter' to 'none' */ + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIxMDAlIiB5Mj0iMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwNmVjNyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDg4Y2MiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(left, #006ec7 0%, #0088cc 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, right top, color-stop(0%,#006ec7), color-stop(100%,#0088cc)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(left, #006ec7 0%,#0088cc 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(left, #006ec7 0%,#0088cc 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(left, #006ec7 0%,#0088cc 100%); /* IE10+ */ + background: linear-gradient(to right, #006ec7 0%,#0088cc 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#006ec7', endColorstr='#0088cc',GradientType=1 ); /* IE6-8 */ + + -webkit-box-shadow: inset 0 3px 7px rgba(0, 0, 0, .2), inset 0 -3px 7px rgba(0, 0, 0, .2); + -moz-box-shadow: inset 0 3px 7px rgba(0,0,0,.2), inset 0 -3px 7px rgba(0,0,0,.2); + box-shadow: inset 0 3px 7px rgba(0, 0, 0, .2), inset 0 -3px 7px rgba(0, 0, 0, .2); + + text-shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 0 30px rgba(0, 0, 0, .075); + margin: 0px; + padding: 0px; +} + +#banner { + color: #ffffff; + height: 150px; + /* top right bottom left */ + margin: 20px 20px 10px 20px; +} + +/* Pattern overlay +------------------------- */ +.grid { + position: relative; + z-index: 2; +} +.grid:after { + content: ''; + display: block; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + background: url(../img/grid.png) repeat center center; + opacity: .4; +} + +#banner h1 { + font-size: 60px; + padding-top: 30px; + padding-bottom: 20px; +} + +#banner p { + font-size: 24px; + line-height: 24px; +} + +.corner-usage p { + font-size: 18px; + font-weight: 200; + line-height: 27px; +} + +.corner-chart,.corner-usage,.corner-theme { + position: relative; + margin: 15px 0; + padding: 39px 19px 14px; + background-color: white; + border: 1px solid #DDD; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.corner-chart::after,.corner-usage::after, .corner-theme::after { + content: "Chart"; + position: absolute; + top: -1px; + left: -1px; + padding: 3px 7px; + font-size: 12px; + font-weight: bold; + background-color: whiteSmoke; + border: 1px solid #DDD; + color: #9DA0A4; + -webkit-border-radius: 4px 0 4px 0; + -moz-border-radius: 4px 0 4px 0; + border-radius: 4px 0 4px 0; +} +.corner-usage::after { + content: "Usage"; +} + +.corner-theme::after { + content: "Theme"; +} + +} \ No newline at end of file diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/img/grid.png b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/img/grid.png new file mode 100644 index 0000000000000000000000000000000000000000..428d4b4670bc9926f6fb889a860e59a6fbf09898 GIT binary patch literal 1077 zcmaJ=PiWIn7*E%-mSM-llas+C^Ppgxq<_*itgcn4B@aApcP!y)uArnEo3chr0=V3D>dGCGi_xpX{`@ZkpEacAx z`v&_6f(Yg&g(4mc?ic9A|COV^p5Wm)nkb_wV+PeE3lbT{n1&#yNwcsBC1vr-dpJrE z-jiynjLPD9PByf#ZT;Nv_Y!NrfCc3q~Cd3uq8Yz|j_Tn{!fROP9lQ*G!S11wr#EaxbW|SOC0XK@bl| zLo&@UfMvr>EY7mb84#hF2u0(U4KXn;&T^3iXg?(OW+^jVQOLG^;Z=&PAY^hBRjbv) zwP@I|W+^6_Ou8D8NC+cB_M(m?C#2iM9R&f}vZb0xHFV%AO4CLarAQp<-VrpjE34b> zG~t9%j$~3yn0AlU0gB@Pp_i;q=;Wb#ZLV@aENyP)P%edoq1@8`Q|gWh_m4a6HZERtTOaDU-!0tO{M_~X_)@Ip zgiOi#vitE_kN`)#nRiROV=JGDhnt0a7dMXGdcFEs`m;^Edhl(H`pqsAo*rN2$DRJI z2DcgXRq%4F@yJ_ko(OCbJ-&6X=>MKh3^YByK*4`^VYl*&iEP^KPe?dj~*z zsKVv_8x6uUm|o@z{`w~ugm;=)^sB4n($}$OZD^+#dm}tcFG6pL=c{v4x> L$O})$FW>kJh$m6S literal 0 HcmV?d00001 diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/img/skies.jpg b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/img/skies.jpg new file mode 100644 index 0000000000000000000000000000000000000000..259f46a2cb74299aafcc105bce0b8f98b696ce89 GIT binary patch literal 43395 zcmeFZcUV(Pw=lkw5K1Ug5=4rIDuf~l5SoS1q?bSdDM|v77J5}t0Rbf<0s^9-(yJgK z1jL3&5Y*$LDJUXEJc^2f74>-dCP9z--uK@3KHvBJ{`#Hp%K!b?`#5ewQ7@eMu+ z@`#kJ$iM>lRo~z%02VD<$;)B6`X?AF=i|x`NFZ3n3Jm}u_)jq6Cz$sqm_x@I8+$?U z1OWvC=muRQ&;i&%X9uneC#T{n$5N!DsB*J}z{F6ADm&c)0NQj@GUw~goKtM=L z5G5#vStTU23L_;Ufsv4q5)^x zxeF5GhsaO~0;T}L#b5|A*zyFJ<*4Nz*cKoq62|=jfjK`g?%_O0UOs*SlpyS16JZb> z@jX!#g7Lr*a2`04kCz{b5YhpOVhA32aXgabOqEcGOeXN6b4r^{6_qgLYcw6*sFXo7 zKIL4Oh3Q4VXg$fYmIEs0$6Wm_y31pTtA{8v^f%{IuMfvQervftuOh8Azh`9jU1b~l z?vwX!JLA#|s#v}E{`jE3)jc5o;PLAA8>3G@ih(`@((-U+;^Rf?aYc~Fi}L^pA{8W% zgybAFM}lkQ!37;9+H_P(u9*wQFIsm|nU^B~pNd}h5D=n#wZ8?07(<`=TZI2!g7rT{ zSbhKrA-H9VL0h1S)Y6U0s9~Q#M}aPLI&ssrl3*vYw!nbElA@3?D?H-CaL?P1nj3}I z*@eYb)ZeKQEevQp++%#{Y1!h!AFli?L0NpxTcOz31#Wpr%|n{ ze$qPv2lk51IBoyql(c9Y*}zd?TGhhVG{Ky%m5|eId0yPW=C0%Nz%zMOmk@yn{+GQX zSW!RrHkFf8ni*Ly*2=9NXq_uPOMvoG(7>$7UOmhURWON`z5Sb+M4RSXQ0m6Y#8cm3V91*S^(m-3Fhk;VFOYwv&!J zLWybGuUhLl?l~l-`-W0_N9W=nXF7k&&wcYW$>Bg!iupp8N5Aw!p{wB$RKy^U!u_hs zwZ;1PMN*{pd~`XhEoHQ%DHMO?m# z<6jdVt0G1!lFu&>zEmsYo!Qj)8zb;&s~kEl*hR(2x3_CFFHTogy8n&2AHQ@}UIh=& zW#{{(uIy9!AJvo#o9(tCg^~tp#|u2Z>IuLCRZj7FroVV#e0DTITrnl-#iM6X*P?@{ zs*cE!6AjYs+f4TDTx?8prw$puwQiMo`pKok#3Ju@=MCY8ltgqdmhdcNR>7Gmb^nlx zvS%o5(}SuLaaM8smucNuB6K}m~%EUS1z0lm)wJ?*IDQy3z z?z{5BxAQuFkBvxAzA+?{v`=+}-1}jajk!H+A^a-nkWD{@9I-03c7BlGOZHhg{jWf0 z`%1l6POR!Ta!{P}IVJNY`B}PEazz=eRa{N5p-J3e0Y#BKwWAhy@yx6281u>pXEx8x z1~$q0@EVrH@i#;$&eZ75iyZ52ddM_8U_DYLbq={a{LD$@e`nSZh%9?E^gZ`4^hy?j>Y9zu0pWCSYOGsi7%d`#G8Hd*QJa;y0c9*~3-k z{W=HPdzbXvGaSM~EHBmRQI1p3lx*}a4`J{s)uNBQwxb3-B?vvW; z19wVICDNCaNp59)%(&ZgA9;fD*NgQRztnvRsV(76+L%p1*bgb#p7aVDIkfbw@Gsmw zGm$wlM5lo7`mMsdtT3X>(DKOZm$M7?rybYny*+8;+q0wWce%W0fBn8`^p2WBoXNyz z`om=?s>tB4_iv?b2z_5oMdv?nDSA7d*po|g9A2Nk4C%iy+j4)0o>H;o@n?(gCf;oh ztbVpHyg%_?ZlveB@}q;FKKzA4%wCDHHqhKKm@$6yQ@@haSH&H}>ui_Gm%i$~HL|XZ z*q6Is?$fK1D-qVBtyh=tFV71H{xC;%w6q}uQ)_!3j_CqSJz20m!!KW5!6|cbqVpk{ zkI%#IkV2u8Y50T^0+)URH_e6!gK^hg&f5F^Hvo8;aM$@2j1*Y={WuP z^)N^a3Wg$}fN$A2ToLo!7g3JY4~XF3pWG5vxM?Ea$iZVv60{+dHVhYyF}ufLxN{!aKNFy}oimcalI&T!(Tg~x{ZM?2Dj{lMF|d}O~EJb2?)!xike z7~x^xM;K&B-x>4syJ<{#=*s(w803J!Z|U4B@90We@ zi?#Vry!is6!eb+TLGgx11qB3!(ZgaxK^`Fs7Y=tvE)Kj4Q)6Sox6;GtQPdc^KR`gP zyCUe{h*2xV91JJLIy3+a9{*q09}yeHaJBGo1x0;pTu$Tvim{Ilp#Os5r7~h%sR6&> zMEvL=A3Y()I@-$B-i{U?&fqZQ|Bn8JSRgPwYBz}y6!5*JR;^Ut>N^_b5zmf~m0?fi0;ZZ*|uGk8H)2)9efGm(hco?Ux1!BS@9Ajgm=|2w~ z6ax&T|AG~wg~xya^7Jls`O9;}-X z#Ia|=o&}sVLnO!_3WsPA9l}CRP#}O~K#1l-z&wW}{sRRTGJ{+o9S*~lb$i85=7W$c zWh_rioC%DHi7?u*AuL*p%5el}`GtpWNT5b+z-wu5fHrPPh@kp~&||PPIMZZ9EKZUzx@04-<;`NAz28L!N zGf)X`M(eQX7;2aw{qKwx+W#pdr^SrGJ_Zy=<#g>P1-t^5i`-^LGmCNxj}GFXgTexS zq6EY_Fo+1>GTKu^=$jO{F1qiSaDO`E8w&fc z{DSjXH9Z)RwS*S92?n(1g8 z5b>ZN3`u~g0l^%vXU^>sBl~dwpq;zS!KM(%1^k7Yc)X^zuIqPyp}ID3AA&{$y=P<= zMW@Dqtqs^-eV_P04tjp_JN`sX|6eh-2TH}C8bke$#GHX{#BtSv-B&bsC~*9f3Ro`Q zl0l6Qj0j5jkp?>aTN-!k-QP4QCfbP}Zql}&l63LklQ^|-1$kDs-c-Pm;{epeYinv7x_);6s%sOt?aGz> zdk!!@z);>z2MYQ>WwA(z2#=19;uZv|v;j}h``!!=v7t12)FuT(&WQhpbP0@&iJ?ci zfE~ZT8v2^)02 z<+rCM{0j>(nsxESUs!<7rbmIv3I-mK;%}+L{iqB(dRRbAAm{{P=c6KmJZNKoS0LJ4$xJc z7~};pH!sjsx_DiX%87xrAYQ@fb72EcYzX88F_*?r55W2a4qhKcr;9fPJUKBZ zub}}aFIXkGF^9&`kV|8T=fWIrhForjhMW=&xjYRyk`T1OSP$rBpjLqf28z|#oJcY?*C$!( zniDMvhB~?gk^xDF1Qe>Cfi_Ve4^)P~pV7|ns8A|U@Ij%}0Q!dD2zr15_U{GMh^vHF zMg$l?Kk(LOW=>JzJHhbUq!3NsYKpbCFeBm(i9}6;7U27X&?*Rwwy0geqTyI+D+@80 zOL266%c$^BEZ1T&3i{U-77Tx2iRtNR;{6QtfqM5h)TB`j{4@;>{QT)e13w*_zM;am z%>F;E>nk=Nz<}lbhYa7i;r~Z&8-RS=sbuZq$kjPyu>OSwM1QmNTEEU$nGPlsFciK|v0ta5Wo($=ie>O? z9)F8n^cBh#Jf{|1$$qjczoUS$$^rj2l{bI4X8(Eq(*pmrz&|bUPYe9h0{^tY|BqVW z$6*`T4Qx_~2S;hkGeRD~xZB}GcC@s%v*4Z!3R&3&g@wa`$2l}CCW>S2d2I8<^4$R* zX93^{2fk&hUvz}MizUY`3IR(H%P|Q#@Q>ezdn*ppVNEM1EcOTfe+7y8MMMF|Cd>&? z>-d8cGXSRom=PZn!NGGJg=ks`2L|6k0yqi?2w*7=9IygwaA{Ux6AtVj8U}pIaE{Co z{-ORHxCg+8;$k_zW`rGp)8m5Z@czBy@Doh?3623yUqB0)g-7h-xEMUQ9DV`4O&zzHZd z${(ChhDK1sc7abtxOL{_g2exexy?ndME_&rPjvqi$m!da^taC3K7&c#{(<|E^9L@x z4168|J_|u)|G?2sKu~)c1W7&kfm130N6e`Z#QOcG`bcud%TEWVL3BSYPJ{ma`;P>F zQ~vkBPvvQG%KLk(f;C_9nqxVm+7EcaW23OqoHG}!=D!Z&|LcrDiS?5l8sO{|Y{0>` z8tVo|8Q5xo?hf&cs^G&I0{AG#7&3t@AREXLa)q`*+aW*TZ3u;;pm-<|N(Q$X4nx^c zK6DZ~164q^P$Sd=wL_PnYfvwA3mSm#LgUaB^aOeVEkGZjFW_@vKA12}0=5RW4yFuK zhY?@~u+1rA^+XnN61;D~!v9Ltg0oY+!F6<<%6jlpshFySNgZ0A(VfSIvusPTp z*k?EbE(Axz<=`st4R8ZE32qB_h5Nt*;F0j%@KksfybxXnKMQBUufcD@@4~0xFW~PH z5JC_kiI7KVA`B2_2uFk`VkaUBu@AvS6d=kFjfhUf4a6{F3h@&0iHDa*f(Of^$z#l8 z#Y5ro_c8B#K0dxReCm9g_#FADd@+3K zd?)zM@?GT{;(Nlk#4pIdj-SA9$?wS@#-GApz+cCIg@1_uDgPG%Q2}KEBLPPNe}P>B zM+GVbIt6|gcp~rxC5Bp$+JtgN1*4Ktg{Vdp8}$(NR!~q-LC{dpSujX2Nw83`Nw80F zTJV#QxDZarOvqa(RwzrTTBu9tzR+7?VPO?v6Jbx`7~w48TH))$kA#;*Bt*1CtVR4q z_KOsWutbJLUab;XrM!x?YWu3)s|r?~U-kQ{m!blqDxzkhRMCB+MWPo(M@8R@Nr>Ua z9K}M#GR5k|`o*4!^NFj7TZsFMr;3-0Ul)HYfsjy?Fq80;I3Q6W!IpS}=0&eZTcd-~ zhtUn_JLm5)BoUG-lGc(8$)l1jlJ_J(ua;X)T1{V_vAS{f(CUv; zGEyc|bSb9PIjOr+pVwg5SgZ+Ile4CM&4e_MG)~%CI$rv;G+X+m3|hum#!rSR(<1Xg z7A}jECCl!SEtkD5`(AFX+*Y{=xf62NEQx#MY!M9;p#;7AoWw~gBnP1$P}hgrZK81q)F0@)2!E=){@k+(@N25 z*Lt-sadS*Xht%)K%A| z>z>vf)05D%*E^`!t@o9vPmCfq66f@l^nLY<^+yfR22KW<27QJ|LsP^3hL;RK84-7u%DzGj=$;D7#L3xV?@2G5d!O$_`-; z?T(P6wc|0z38(c=kxmz#d7Yh{i=6);iXjy)3-)y`FgMd8d2d^I7kc;M2cd zdOKtL6H*y*^sPxf;#s|+F;yDy_=uU=C#)*u-nEuS0hqVtE z9R4%YFZ1RR{E@;V%UL_K?i?i^J)O;)9hQABXG=~^u2}Bw+{ef4kFoNwdCa_b`8)Fa z3v>(497i3GJw8=vSJ-hv=|uL4KTigpyjx^ibgo#oIHUOEDgRSLr%g^bo{>9q_{`^$ zppvoDt);9om9m0z-txHeKPucRZd4jn)>cVZ9j^LX9acS6L$2wm)vv9sldU^i53i4{ zpF8V)cA&w$p`%f=vGknexx-CRQ*6`oX5Z#}Ew(M)=MBy`wko$4w@I`ySuoZv)8y7rHx*JKHX5U97$&f2rs)=JL@is4J;gmap!<`o1fo>*ck8Ymd8kbdO*6 zxIWV3+;fL*%kJy7?7e=2bmMB@roK!4M*SCV8r*EZMZCqjt#`ZaH@)B5?hx;=e%JrK zW595rb8zF}m7y&|*M`l9dq=ECZrydbJ9v+BZ*0_ibZX3h?Ad+B{ly1y559~iJw!fa zPKZtvJd%A>HmNpwZi+Z{dD?vX_KeHS_+!7vFJ_}>|9q1AhwvW-PuD%IeMWe8Y0h$P z;JMfHCodvie0iBZFE(HNO7&IiYm?Wv7d#f8EJiIZzsY>N=56&m-FMyZo!&qC5c=WE zN9NL+rJ7F$pKg41|NQhz{GWV(7JgOx+WD95Uk{fE??b(wi|qu-f$)xPB$IMuli0z1}~D zqW`A+{B>2e;m2=N^D0_@71{Eq%TYhyjrv9A|3Tzm?=U?-px>CMmv%^VX{IRdy;R<| z@G4$=s#mQ32exq5GIS0Te+%7NSlYBP(s8S=TP;g8MMiG-l$GXdrf1cd2TL1+9G|w= z_be8OLm%I3AXPB8eW|KgeOPd9BSO-C%D#hk&|TV*_&KrJFVr2?c_vFeOb&0+Znw?r z60e4Bf?>`5>yb>`+9j%$h|EmV)JA+O?;LX%pPzNavydyi@)PlLk(I(T$M;>LG!LUZ zt5oCAE-_t=rLQ9L!&$rzaeIDD(VOX#BY{V|UYTDDhLLwFkU64_@Gtv{V| zf{#`?=F!gdVag4)vc2Z6AmguKVmJRuxq(u)3{a`dV)%+gg$x z<;wdi^zoR_+VT^NUK70?weg8glkJbwg2(5Rk6mtdPndT1HQB#B@ci;`Mms+Zxzu_K zx=l}xqb4r?*^BdhohIk?=Vp&JtA#w$do>>NeVC~%O*<5JV6m&R)Ag^j0Nr=`eVY#*l2gX%`r_LvvUIFS$R49(Yv6<$APN^b_;xy6l_bp0t) zruwM2jgS4J^KX|>FID5cgEWT)wXzyf)c&)SPIs2F@=QIqDyD$#=pw4$)0&|x%d zzZ+8Pt4HYw`&hyQX~hdY*mj#toLMIW@3v^$%pbqV_8G^7<+HV8j=TSy{DFDe(Q{%W3o2loj?a9 zJ*RqxU%i49js+d;@DvkvW}jN%Uwr7*p-h4B$=7VH>Io(b@AQ)V9E={%@IUXU&fe2t zwC|W_XYXGgd_GyP-Pq zH1hSA{&?N?ZhUBydb91-JB7_6Q>%J^Ee?&E`u)dw`^Y%695j!WJ z?eBYZlqZbdb$h%CyEx@l9otiJv8hL4GG-lb~RR^lfV_Hq32&* z^zY=Cl9=sni5ny8EsNsV8MBj~K<>SZ&x*n!(!{y_LaLfewCv|D==NmqL|)a6#ZdJv zRD1h}DSM;Bs^Y*^js^0vr(T2J$332jBt^(I5yIb7NwJ&S*~e;0uMbPkjbdWelXF|$ zepgl{_MISz*)_CgC{vwTZaW`gi%6xGXJk`aZ{EITByyUc%A-1$s=YCL>jAg211w3N z+Iu30uh<+GY~6S$Gj4oRDeI79{dql;y4i*V3VAFgP}>Wu9yh_?B`98{YE*m@-ftD! z49jqOebw${dTl#P1E{6HE|Fh`5~nu5v}vD2$;~Hw&8K-*;?4FpsV8;k^mn;ns^g_f zSni1~4xq|!Sa)ey4vs!l;FXG48g(4b12y@ zZg6p#Pkz=~-RXUkn95r+c(jy&P?EdtR;=WhzrhK9)&Q=J_c4F&(69iaiddnRr#pAW zW^8DPpN(wj>rNYCEADJ2MM~9%1C2qMtjEOfXHYJYUl*vxyS!zGUb!5hT(>_At4^SsJGv zo%sV#_Nt8Beq_lVo$~6`qDy~WXmUn;I76-Bc#IULyRdSsY@D6XN9*aJ70iuGY7WG* zk8gFk&^u!Ml<5VXx;PW(>Ck$M?4INE`}5noB$q6YeX&Ju*nZ#jaDqUqTWJt!R9!hY z0NKI}&Cktqtb)4o)%*wj%qMk1psFW2Y=$P`O9 z3;xmS>E515vbKGa3Fl)pX`5~|&)qY7&DU)E;Z?`8h)mBhQ^{eBrmSlCds@jwOf24= z2Gjs$1OwJ#ZzEcISFKdN|G+!8))oy@f$($o%}#gq***_|sWCmZdnRd2ZX@1iA-^l% z37W(N&S2;Q&o(ucQm{Mqo^6a$v8(m4uo;+Y9csnLZ*sKD(8${ft=*Dkg;$NYam~!u zu(>`gDDK%^*$oVzDrCG*Q|Xm6!-)0!Pes%xtggTKWe;_$TN9Si@s6#3ek-bA(S6U% zjq-z6aAQ&})lSmIuI)_Cs|@nWCsP^nx!HYPqHFsrZPk#l zLYwh}+lyu@F9|$*=`^98*Jes$AJKnM*s?yrorSV!_xy8lwxVOE;R~(*+*<<=$whzt zaCp#I2@&rOYqt{+ICbib-ZuW5l`0EskeM6_F* zW=JM~uE(7=W8^ngXbg^4SxG9xGzF>?TlFyFf-%?o(E~@0lCH>jx=Ox^uO7^qaYV^$ z_~flUeSa;HCQmqj-lO+%mAhhSiHh@hO50+ec)z#jIWg8J8C%+2>xJHdgB__2ChHum zur+7HN}QaEbJZA01L@sjR?hr;=Z-Z0(bf<@StVnyX1}frvxmxi@}|rn*6F>WvFTci znZV6|W@~sWD#i5PD@YBVZi~#Uo#a=2&N^kO8kSm2zAuI8J+n6*MqT!Pa!LTZf zNENO_d8wqSwhs-CZucm`=~#v3&2vR{iNAz1Nc%!6t0m zgcPa+(yq9OCgLqRFRx;_gv|{Do9?thMeE*XQuriBco~x2wmPv%q1ebBU9f1o zZ_JfdHxV={S0GO|Sknjj3sjjBGe0NSZP=U97pWuWFIkYP>L^rE@Y#X!vW7H2i6byz z#!Ll>52u`~WiU4mqr|R3pL@(wt4vcrQfk*LB12JAs1mKQ7IjgP!d7Nd`EjypZ@QV} zK(;`?!hpW$`IiKfvTVnlvqMEfr^>R2f=ta`k18qK8JG@M)a_ZK`MY#u%9@?O=otv* zS$G7o+bLtS3CFrG1vPG#AHKd;#ap!yi%ZCFG|#VyGP9^%r*Wi`9URE#P)IVZ>y8_T zsoU;kJ(*9rm;HM%CegtTO&0gK_F`Bi)zGATTBBEO^&5H!JT3M14fCcSZua}bBYD>GkE<)6)H1jfrN*D;jjCDAAa`it zX38-hx2BU(;+iD6Hza-mS7vdcDK9y`(LULXPic6eo9&#mFn$AWlcRPS>43SMT~(QN zpNQL+T3vEIsM5cgX1K*AhhQb6zP0+ys%qFVd2~!%sbb}(_M7vXpK-)0w3Y{ruM%(H zt`ruhzc)3Nw-4f^%m!k&Dd*5rfMx| zx_XW_I%c3NK1^H6n4WwfskbFS#-2C;#q|!DN_yOx-D`;T5Ix?)djF;6R&eEdnlP^w z4@SX0zB|3E`=FQ^Q*u5{Gm{F7)lXEbo_b8K(C+g}MD7ZK{gd6Sah48p9bKB0t& zj388#3!VGBXr-~lDjrN1?KcVJdF$cQJ_&31U_Z^(->xXZU9&+tuWwPI;J0uE5wj{W zWxSc|u|@x}#!UF5v3ytJ^9f$dVH?7O=`%K&~8U5A3bO1TCh-Eb+UJrAsO#vyhHtArc~^|{R}Va32ovfV6*0t; zm^Cty3sAdO6PiBf`&kjx+y|8#axDmVkI^3qkl)sXoR6`LWL=#@8+@*x}_Pn1<8S3y#3XZ_#EvBgDB9ACX^;(as^cH1}9r;om zx)C>zAHP*i<2U3PwVnnxVx+4K$vz&M z37cdrF)q*Oagj+-%`=2=6V8czkVJZBJR7QYssP{4kQcyA3}~2aaqy99%`LF`;zUnA zTO(bZEB$9A2@D(qQd5JvdeW86pTxz{PqM{WRy^X#+056+gz3wJFVas87@59i@C(m>q#c*u zJ0|*ENaOIqNTzH=Z8!@ViD*>Q8b=}gqIU=h$h4D^uy5ngWtubM?YGo(s`{#$ADq^! zqJ&;jJ=DvS{^>B1f-ie{0(9j;3-PwYelWa^7>$*BCu#&O{ zU9b9qO&RdDal9mbr}6JUl)8ltGj!S@e0 zVjFaG+}f@Onk#KIX|%jg{!4f55~htjvcPsPytKJEG$^VICvYvOl5$vv(u<#FO16v) z(CRi|A|90f*1SG4{jPIpccx^6t{zbCWUmw>zu@$cV0Q+QNhVgXz7pKBFqBrQ2X$Y4 zOy+X@4;I|@xOW2EQ@Z`P-7d6R+mU0n>#TuvGRw|7nJH z&-c*9HOtgyEcqLB*40Nudmb3BvO*8}#M3J770o_Y;lZ9BslKHlPBWD|c1Y!-e<5~k z=;C~VUJYL5ih;)~&H>Ad);aHIa%bTjSVJ-fBGh_0i#An<2II{bi|=CjHqhFVVBc2=!t@~DEX62qxx zjW}hs?4H?eLwF+OZ&R<@l~0kGvQf|*huL&MzNS-=HZLh-mE}yyVyAW#dOVRr^(MCu zHI9XPzDt@vQg@GenHQrjDIFHsN^WUzK<;?*=Ueijb_-r&gpC<3A;E}d&w$;26YV?-`1hbfn&pwk8@kaLd|wsqbx!u`NVmgBj={Qj#G1H0=nT^g1B}C;u>)m zt0ye%lF&g3+>SXY#7?rZmX5jf8VahB|akac69v6%DDtE?QwWr)?s;M-6)%aYuXn{AcO5V7pFkP#|gfP%kIi#sx zke*wzZ|!A*Rr~Vri|Y$_k_QbE7bHm&i~L%T4zO?&8zUNw5%TuK45xdz36U{Mld(HP zK=7ikTTOhGx=pjC$I(Qd7MSty4FBeRhFSI(!~`Zf#bH(Voi$4(YrUCuJc>2rXtILx z`X@OWNtO!I{%h)0OD1dBHf16n81ciTWZbg|+~?6MB*T@K-!)CS+tnb!%s+_MFbEa2 zVymZoq1C5+G^p>$qy%|Wf^1MC9St}I7_)AH58dc7mrQ}r)OXC}wlE`dNR~D8TmS4;O&gi zQ(9tMY<$})A7#izwpHE5JKZ58O45fo=R^~4OJc&RmM{_BITv@- zV_1KA)F1rfQ4>B!YkbXo6FG_8uvN%yG_jMGA4m;QR97xG4G=y-Qya&zrqOS1{(cB- z_nkFMR2EIpFkn&VcAE2k5_hpZLHdkG)k;;VnX6c+cb)U*ryMcqX))Kbpg;z7W$)SQ zP3p1i(7SBmX`5lDoE@d9qi(9BK4r@7=CsXFM}vV14uerkra)}>G`4$Uv;9T1rb0*E zkUra!?P*Z=&}p!{UIq++by9+PDKp{@RA^sp(LxLaUzt@H)*Y zcjQRceQa0BX@Y~DByOi3qQDxbRBIgD%|5@-5TVTb^7csMbq%4_=O&XXLtq0!B=XQX z$?n#}87ZjK7kJ9$BdquoOr16LMFV&H!a_ypJHr{eX+u}K5W}Lm2lAI*8P6U-BX6Z+ zUJ?4zFQ8kfeIqfq%(gl0++t~+p?(~mc3EU1;vDf4ajE33kIj_-p!2(#M%St(x6U#Q zI_u0vrn|gsXUrVawB*BlPDQIVG>WQSBP{TlU?-WO-qc-FukNCAr2cjOP1pPU)vK!O zBFAUeI7$TZ*Lz_d6$s+Tuo6-u=el{_`Z2OGlUI02>-bA*Z{AXVB`BP}F*k2QQG6?- zNm5)O+LKq$FkHgNFtk{jd|<8e^!67wrlrzMCQ2E_9_T8MKBc%@Bwwej*0H^YzQG%o z@4iInKN;*Gw{@Q?-qh?a>oobCtvpuWY!>t4F|*w!iA}VgWb4 z;3@VsyA|Wyicy1XK?n3%hEv5@-7#5Jvbr~}M*KjcKwu+Ut!18BTEVwp zwn#iRMz7JD-(C2M=rvM5@2NLb6hZjP-iQYIgu!~B7CSdG*cf@ zC1|fHuwJXs73pZ5CeT%XbnQf>&HFe{iDW_LPF;lySW&O`4yEu6LGiks=!df|fk7&K z(>(rjM=FP3?%VSuIWdF~6lvz28maD_=qwACH1bkRXR^1j^dG!mS$=)q4Rnn#{c*bER(^+!k z0S09oFOuRd;K~PQ;eji$VSsiV#$1hL120Q`FA}&pI3Dd0wokGK#;F7`O^Y2CizXw6U=M@N15bD{vTH(}|kRJ{VhD&B#S>Uj<9Q zmo4tqOf%_+k6OhaDJa)K@*65DfkUffk_FPC%(Aj}vkP71M#W5#19N>UBeVQQ;GZTt zMfK_P4EP@qbQUi=)#7?1!zRdHSY*tE?37~TdiuUmNZX)y@R}PltN=djq}?q2BhiqlkHWcuKa139A3>8URZZ8n3g7>^dM=v0(+{i_kth1 zJ@)|E3-w-b5|Q=`+}CrZ$VyS^|YLe%cC#1e;P2_ zx=P5^_zIG>=xQFA;4aVjtm~&V-By_}T{fy1o{iljsgwdatqJgS z*f#^8h+9sYuo$xz#4%m@74E3o>`2q14c?RhgwH~0Su5ME>O4H{CD$?_-CvoZ_T`Q1;b^?#BvRR$g;}p8m0x$uGhwFpF4AG* z3$1U1NB?||a<*U(eRrnhN$2BxYmW(`#%2t1TkGfKUJSE<%E2$aXPdaZI}+u_b}~19 z-?eRnSk`?Ro5eNZ1w>}(ObxmbTTy2&oxEEJDZfV6H-}}?qFP~E;$B6{RWQ=(a)CPw zs38!Vx<;(1xm5-(3{%Uy8%`=kM(a_;6%bgFBkBPb|NHP0x&M(C>S&+aQV9-H?iI?s9E*Z)vcL?ho?_8eSI;z^W;RMyHnUV2wEA@Lal#|jIE|F)G@l%^m~OCC zB~*6$+SW1!Ynh#elrlW!ES_9ti33(-JIYf%SukP#b())YwH>ZC#Zr~LuaHvd$UxOz z$AB*beDD-~1B&o^*=(9qBdoz_Hak5+-R>A#xKY{1Z2ApbctI%)-F5ifvppeKmqyFcvZK{zR~*KM9x2Mus>bzM81)gCYO`eB zx|Fi=EAV`iBIzl2TpC-i1vfVGXN$7x(o%l;-Zi|`+c${_4C`^J;@&27>dm`dB{EOw z*>+|74&XEoWtkR=xAyxqQ;55%rpF8vqtgophD6nm(a0}ytyC@(`r7hN@7zh-FMCPP z5R*|!T35Z0mFV0bB1>u9u}@7fx2=}#EY`dRok}id zQiiG#N;b3PnvS}%OiIFBvb&I)w+PZ3Pq~g^aK2Dsi?G#`*AM%b>O=hJ*hz%Pz#%~~q8%cO+MQi7b~y3=kJivO`ziei66pN-O3 zhA`SglFjS+U3K&OdC)q-FNT$_QM0bDcAmsMJD8C5g=)%cOXw}vVCh!Ar%9($Tghu@ zCfb!kk0E)Kb4}f&3sUZx&bpZSG@-Rn7ZYacdt!|f7rby$J!at#GNk!BW`DP4$&7_RZwu-Xge=QH{g!{A3r?&BYgL z-H*yL^8?HN(C^DV9dcUVWg&*0kK4M&_;iPW6@MOIxKM^a=d5CWc4S!pPGN0x^({e6 z>z8I%bFpj!56fJ|$;^UJO}SM#-vBktLRL~z-C95SvRoUpUk@WIMRSse6>PC*%T9>b zF-3SDOj)W5a*nkq=yMZ?l}9#3nz`0iCz3BKKBz{%D#7v0+X=W@-BGtn_0I6mI1+*D z%tY0c!zp}UJV0N&0|$wa08j`A?I@Qhozw2_@Xn5Ua2^3vMcq`STQ3+TR^i~&3E&H5 z7|qmMv)yD>JtIv|bT@>1qaI-bzt9Q}u~BwG%!U_f!fy~5kKbKbxYqx}(YePn-M@dF zF)@eGCg+@{ZLAPd)YlF{tbBqhiB9%J5M#J)f$p%3!rv4)@6!+AcleN&PhIpsf`Z!I|I^E1Y2<-SqS5ei>1 z%u_(BHrm5a-&rQsn$*PHY>oE zG!E)ltdM%)2+di>_sI|WwTJU78{t63OWA8~QYl*}+yCZGox1Iq2Q%v=yoMdBqak=M zWM?>|t@|1>sG&@=civB+QM!Z&B{PUIOst6!o|%df>`umkfk(!u>*PF?&qc&yF@kS& zk}okACJ>%2k^LcA1z9?8SRlbyQ-Xh7TNTV3baa>SqC`c6h%CX(*e{SDuCtqgwjjd1 zX0Z3lY4T$25Eo+`qPx&opi6N3C5$Liu#JRV#G;BYABYm_A2br^Bz0hLe>Fcg?DZ3L z6!z#+leQA3eMAn98n^flM21%fbZbvX6*z1B1janJ+AHa4QyED8dm@tsdz$9<1ym__ zvzC#zDDE*!50q!=iIkm{R64=FXO|=G!lP8vMqoDlGk!>stCbf^WvDia|Gl(=b+FAW z+r6dOv|%Bhx-Hh=E^&Nme|gn0KkG_A>=2&f>J-AW`v1;nXt~*<`jUZfX{Iw^cR_!Ow!(h6pis23Cn#YY?EJzQ{6Gqxd z?!U#Q8elN%Y}#_ff_$BQq4&pdl*eJ~HI5Q~!nNy&#b9R2Ql$4rDYzCPl|J{ z(o}EgQolzR4$UAEKzn#Gj=ak57)K-?YbD*=bnUWLPfr!A7U=r_Mobwx^B=C>4k{4xi+JSxyvyc5kFF~!g z6E%8QNS@KuO*%B*5nJ8c`hdo@?8v-m(>UPXama#a$!pi0Bz{}zqvKTE8s{2Ui|CzG zik->UgXQGT?&f}PD-#osv(J4uDN*pzkkc86VU}#8%|h_sYn(+V&eDkn;+9<#&uc<o=jh3u!gL_{cEZdh8OBiQg=Vcmo8&)22RDufqN z_yi(fT zyi7UIzKua-?3@t`Z@(m9n}M2Qff0z%L>Wjk_@EJb;0Ja^5njhp;x&b|REhFOxP+K{ zQxo4=#z)6Sk$inH54e`(fgs%brKV|^NCb^3!OT05l9;XJFLdG0bfM>xAnMyvW_K`! zg76Pi6$ZRxYaGhOJd49E2~1CeQNVwKIjv2=-+AH)_y8FQp8l_sN#!j?ebd<;cT~N| z0cGVhdI3N2z~P1^@=m;ztbW%7v*XrHaQM3=Dt3L_$TX?W$onLGkm;?FcJti9jWw@Q zCEW9}p?_L=@>ATg5AjgWOA`}aJg&&yd8(3A`&a2$x*@hK-@U$LcY&Drw%u6l;K5sh z>3s#7Bf9u0OUqy|Ly=P-Ck8w1k@uIF9M>jY_m!i;u0lgud?+C=)8Lza8JOm?RaN#! z=;qzweR>hZF8s09mY-^oO{jRVY9(k_>o&_dktLgii^S8P(}ieqLrNaJkbfiDQmdkYhUYhSf*g2e1cGXVr{aJI~wlWKMZ0|#Go>g?PdVhPM4TqTNd zAhNZ;DYKzZI2}c}XNy_*Z%0tmvR+79m_|gmgU?7#k0ZccmJ~rR`4U9V2_~^xor{iH zRKI#}>FN5XC28O71K$?;w$lQYl|^2M!cU6x$_8BH3+QQOqp7?J%K1s8S5h(cU(Yx_ zi;dds-RI**ckk(Sca^PsA~|)Y{(zEv;A&g6iuFSe(Z1`0k(@eV(_>1=q!C?M+YRZk zU-p1TUDthYc9jM5zqM zUi%#j(H~d7$e4v1UCTaPA9cG;o_p%A5niP8?kIBcidcW28*VB?No>AS&MZ<7a;={C zsA{^B>k!$WZmaI*ZkqG?ZKan|VA|_JuEFN!;Ej?Ze^qGHVPK5P%byXi0A}!!Y;r90 zOvT%TCxrz=Xlf|Vxsz|dfGe(2NtY*NoCkXsFH2%>y!{GJVC@)$yH*u&mznvZFfQ=v zg*hlM@TnB&CX{s6Cy|jjAq;eu!uuBX^d{L=0A|8%`hrP^ec9EwLcG9eN7+TU3eI-C zcjDI7ccW>2Iph;d?dz!wAH3VZyCVh-CmnoVUtXEf=(a`u{sURr8k^lbb|`Fckzi;z zTc%EghT&jASW1paEOJcT~8mI|+7V3V`ZF*sWt{#E)^(&$I6!auTSC^l zv`Dfo`XGV1;bSMT&BWA9&ef9Nxrk9e2>yZp&exSjjr$@g9bGAGb?B|@enrxG4Wma{ zCR?LYX@u#X+r@fTPc%Bl5B!^Gr>?^}byc*JQsHz*d%9tCQkB1T%u)$gNG-ql1xeM! zI`*ebTlvf|sOFdGY2BebK$lv@_~v0n+X;N@&S(`6shC2Z&+QPwdhtkSN-0z-EUHjV z;=2Z93p4XzTM3EKE^;+|v?F->d>#hpg-}yjP_H6fVJ`|F1a?t31g1L29f@J*yaq|f z>m_1MyQ2R5d?Ts3KMIfq@?FdO5?nETQkI_CeJoqu7C}Z~bM$>HCuJl2G=d_f%O(*l zry;)XDM2JjB%8b;QD#YKKQsW6S0(0I(5_zV42QN<4pEl_+y3#=e6)$=D3PnEF&T9S z7OHgRUG8Suht4#9mD*m-d{I*BxRyD!>-*E~pq#m=C$VFj`m&wx*2E}&MpBb4IjvZN z>+5LPSYs(>kRCFmld_Zu4^lTI2KJdy-V`5t@#rF{Vv*icB1c|E%At^i!xBT)<~gHs z3c+Vb3xn=sEi7^SmYNnwtj0_(?&PSf;W&P3u@3R-{w68+lrIa~VW*B@q+(MpB}hmR zfPLUi!Oy=|kD%@SG4*2EjeF;nEn|xl?Lo0vHCRpK+#5r$r(%=}qzYBcn8_y4fMX_32}#)RH`l|R%A+I}8OoHKzaICnfW7HQLo z`@0GE{3oMIl{_4?uNwMvhgqthsQuhz1t0O~Ec~tiXpjP?a7dH%K-a^&k!DmS$TiG% zbZDO&z)IgP;R^FmSRyCfR#Px>Dqq9)naQt8XiV1a@L`~J9p!f+tS8sH^G`Nem1#WP zQ~I>VuWIbB7{-y}@Oy>x9(8ZC|Q-$m0X z$#rC_bj?nB{6vw>YXyhYRtAa(U@xM7Nry3n1d(Rz@Km7T;;8{#XTdrvaDNnx2Wm5s z)c8&;D>MlifRMNhwm`WBvk2DrTVTON-qVZnJ2!_Q{3HcL;}WV&?~J1p%C_K63^>4b z@P$|NcN~N8&HJgkEwYG>k-#Wf6#1M9J~Y6bcmGb7$)7QHuQ?bBe)3-onr1q;4^Wxp9ZYV18Q$Op^I$fnS zQ_Rh7jbM#hgKDBmDGv_=-XCB9`3tC--{`8uzyTBWnt^q&U$mf7z+A*jy4EWT_0@Az zJmtD{G|2k^iI0M%C=p&;lC$c;j3Xf*`elc~R`*D{*&Tw|cN=hHg%LUN_4K&9wBNfv z50$*oNx8i2F3uhI&ewKr+FtEQ94dMGw|6J4KprV=^42@D#1Fza;d3M!R20gzuixpr z3w5)w-`89(SGHLOg=QQ!nQR%|XlZxgsL$QV2ZT&Z{QfA1LiYxl#Cb#0U`v)1BKXV~ zUnXO9Jo@T@>QH%QvRtWiapUB9TDPcD3XigMH41SIId?4H#x`Yb&;0+P_bYrg} zV=sK4)YzlWC|K*ee;zYB68p{-!r#w650S|l^Ed~&)2QRemkL1mt4b4&E+Cx^U{O|R z3Jdc~n@O8|8z^Sx75>Dhg{h=tHhQhNq9KogaQ+L!c_=S{7)09QBPr6U2lgYv*V#?~ zTU&JQw(C4-3tPTmWbV=azx}{pdyfQu*3N?Qe zA7oQ}Xw*RG;%JJ*wX|)rS5EW;m$;2hnzoc0oWQU3^BfZF`Ff%zIt@f(J80&x=o^eZbT zGU8jS^NU?{OMF90IlcUZz|WXLR7|DF_BUk#=`3yz5m785-`EgT1UqYxA>9@d^Si~O zFF_hFaB`kiwnvTzM`~=zOz(zmM%{159N*ImJA>T+0Cw2A-zbgDTQDeyEp0ISug9l; z7i`n;kNY+T7ej8Z27(|GT&@a?+Iv4s?HFG&-ePv1ehJMSQl%D zM6i!UU%t>c#x<7x<%s(D1)^K=h(@sLIVpVN2w`@mVBf7MMp0cze^*Mz9`q49Y(VXp zoQ|tmy$w4h^iq97f$g@YpdquS9$IINH8v-m^2*@Iy?c94ZIfp^rWi|>M>O2GLX);! zF0SS^*&58Kq(keV5@pAI=1j((sEp`%aD%i+e+do1NXbE(z!8jQ(KJdCvB33q{~Nt2 zo{xDQM+Q0skOV}0O#3w@RQS~HWWwFU^=G=^X1nxS2m(2{1p84!xs(#*Jc*3uRqae@ z+)*Mam@mc$85HYYH*5>CKsx0m_DkH`ip01=CSD)7Km1GCTR$)>9Benx)$isKfh^oU zZ_EH4`XqnHxk~$a>D1@(r1E#)C%0dO+1)?Q?z$+k?oyfI#h%qAiWETa5VxNBR7Wut zJNZj1>0zu{avUYDzbQ@6@0x|r7%W{vFAUij8~7J}?36oKQ2v0s#yS6Jc2_YLwoqhZt7oB%ZO zkq=e-uHnz+-&UR{+R8M6Mz@+*+-h^gLVJ{HifJDzVrF|ZOVWxpgyW48+u0F#hsZ$sGhrAma=Vc7C@vaV5$Z~;SuVY)sqoE2qXQI3kFFLN~ zJ8d-Tw|4M12=U*eV#En^9DHYm6pMT62S51rzH72YASUpg?LtiEGxu>j{n{vzYk@*r zHI>=DS}Z15*=0)=cJ+B$=$H*|^}z+0kNbwD-C;uISgNytX8{*9@WDE02OiM>>&0M1$Lh`321ufd)CD|eFCiV;U#Pe|VOskmIQ9m8BN5Vr7GG%`+EG(J< z>SbZ%iS1(v1MV@;A9{%I2Z6UcwqZ2(@H{v-9UmX|qox;0r=qTem<+v|ltN#FVR5!A z-$L27!5M|*b2U%tNgV&;@Ah3B+hC?@jhZ#xcyI#vEk zy6a(h{r9Qu$LFy_^%v%0T^IWV4GtDm5-AozlY?SY*&;qVQI`ZhdI34D$Wq?q%U+ij zqheS-m~KD7pF+UBJEJMQU?*(+{Np};2F~IxQdL@)pz2hV0+GbW+yjdXOV1=>E9}`j zHr(WrZh>p{8>eZcd%MZR;azvWy~xm&b6Z#@#lN`pa_2@ zNeg-rU@oDaL1#zOy%b1Iu2Sfxq-RO)<756JwJ_Ls0Z=jnKJaxP3KEkZCx%kV^$7mZ3@Ir{#f*6; z9nJhZXJ!6i+17nj>-<#-bPS~6b25uxLOsIB z>w-IKa{xIBz;^q#yc4^7$f4-+*6SRGaYEm*&Cuue37|NcGwueFk_h$l#zrqyv;FV6 zIlr7hVr5ck+2-%mOTyFRs4G}5;cqFP7>7--qoN7ghAIh za=$cNq(c|>?T0ikvzv^QNj35kGAE7_L&LPWII&?0zgP49WfW<-fyq$g3tm4lKOzfg zkL0Yy)h6vax&=xKE;<4mGtOej;O}?ef~M(uHqPxBKnQswb4x_HvqxvXt3ji6P0!6z z$H2tfb(8@xz3(s86LP@H)$P{$s8s(8vyv#x5nzq=PZ_#kQdQR`O$@ zhl*S|TRKaEcYw74wNqj?MJFX`0u%jTgc;2rAcYs$N@8xMR}x`=`8V zY%cXt!L-kIR}r6lDU>opjbRAs2mT=QYJ3DQ_}Vu)iGyQ6n;`=t7;Sf)lxhM znG75GTZXT1vnXHJSpx$X_`sGVGOy;kO|#8hbF$RL1jPGT4(W1OT9gvmrjcZj_fKrL zF$)$HpWx?pC(B|Xv1+?ou4~i8>F4%>golIa&?Li%EpP|T7`IuOM0_y&{}FLATT4B_ zs0?E}g7luqSzpXBsIIe?OHVGKSL@wrZPYS0Ny)Q)#qeS^MdgSy(iF64ITm{~Yh=u@ zDMkbXE0a328YMRADV|Pfus{wjHC+IEMd1Y-K1Qhh84O`pp7)h>t+RD0u-l8v?Az6v zf{JEyOh%H^et<4hT-9Xe#3l`}SGZh-I_pRM?W37UsBz0KQ|&ReBiE0u7MU{wPD%h6 zerA2*ev1@`IJ>A(6`J8+gp=F3#k!QVxDY%zi}Rnl(aLvhVq}>d&<1rmAtJvX>7}O| zwX!GMye8Lu=WSG9U1;3R`;kBX!=**PW+k^lIVfpdXn@%e_tgTjfL#ANm2$qiPmnSV z0h{&%Z&?&!kUK3=0t>TWYW_aGEl_%N00o%xW?vRY*hzy6DqGBwGoc->Q3QbsRIwG1 zSir*!%xkEKF5yW;Y(xwT=;ncMQ)%8RKg6$If5Adzp4r9q)IbS^Ub4y-E5}jxu(eI- z+`|PbUrY@C=vq?wVxXyBOnYP0XtI9Y&2}ox!}@d2Uzgu5VNX=uT&#;o-+J3V^y09@ z@e*CN?)L}sqp})lYH2U74^_@(zncg1o@F-5E|sg%m!CP)^6D3@fFeM={M8NfGYB2K z{$HNSj#5&w8;pEz^ zUC4x?8`~)VzpAe3Cb1chgYuq&ub-HI_UEqt!^3%u{t|05IaP{swFcTuLdaq{1@Vtk<@kolOb${%D?tC8U97E{f}yoQ@3EJ4zQm zk445+y<<0Fdol0R+0DMGB*f(iV6Fm~JYvB!EE5$M0orIyA!(!k2M25g+(-j# zy70aigZh@nIQ^tz8F%{qg&}T$b`4nG=)zt`kzO^j1C?p=F&X}bmS7s`4`yyle5dLNw7gn9j_hYJgEw_>M ztZGd!H0#3G(k5|lvOm~9jA$?#nGLjL`@tGUwPfU-A!o1tQ6kq?({kv>(6DlYe4SXD z;dOP-(I`iX*tWf++F)zwMWxXyjR~)H_(|-pVPY`5R}>J%*du!kRHRaJA^MY#E3OP0 zDTbR9Jl?V7v+|%ma!%@C*XB&}V{TZ%-p3;GF@@wE_T@!VZU%rH1*$Xn+Zs1wkpXVd z(_ZXAFp4aa8+>e=Hu^KWV$vq&wUzKQGy>@267^aHMFw^R{o@;6ao^xW)rB8+6 zJ~-;aZs*&Fc))5LEeLaNPRm)a&M9y^uY>1nQnwRC)svS*@92Pcp? zO+uR0cIZN2qu*H)`d_BA_MdTqRfmdKB8%DyHGwQGbwcC26bsA?DqRpNGl%dGx2X1N zh)zd_|6cd>vtI1%#O6N0<`I4o_e+A`eqOq2;uXkE7+};9PRP$2cw$Hkax-b%v3hAV znqD!_Wsl^Q%DZfKt`bwsoy1fmGWqjU3d zo}GNwis(e9lV9oASi+p^CNFRthCp=oIg<)o4na@TRCdrzQrKLStQ9oTK{1kgDjC&r zvul^Ot7wl*9=7QaQ5Upm#*0oam)=s-O^pV!eZw06iMQs)8PwAh&c0Wfnc(olZ02FY zlSnz&0!*3{`}Ctv62(Fxb;11lbQEm89le-=$r<{~Rc?j}&+?=@&KVE33(Wi8R8(q| z6PR{~h`HC*?MMrg%egN~m9pLCtL63NT+LWrt7*?4xC3tmBTIiq==}Q9GK2L0)`lSR z&X4hHUYFF;M5Manxwm_iVBPEWK}u+otB_ zqJA~_etbApUWDo(@=o?bDkw6{HuLMbuzR|M`-xwINZzfuw|1%m%TQ25yKFIFws`?? z=rdg;MnMR!^95oxvoQLQOh+8AWAWb&%y#q)FCZ3~)F-kNys-Zv`vA4sv?!}7;m4pO z`27m0dfYJrd4O?RIg-{cS5v($-oK=E93DU@ces=u{<)00c#tb;%pUdO9Hi}??g{f-RyROF1+IG zqXfG>kO{r$7d}v%Urj<9RY^XA^o?$fghPpN2?r&0` z%r$K3uUa65URp3T5DEcx%xN1@f#C$BY23B}ZK6XFOjSiy72k%F^C^9eynbCa>S$Oi zFv|H)WWKxZM^VpU2ll#K;yI=|H_Ht0c+L^IvLNNqPDPeOcAqorSK|M+9}>r2Jxb7I zMH_xQDUGu-@<5D@qiT(9Ml>X^vS%y6FQ{G%VFWwxrWw>!NZn|4HFHa<%s!{~Oy)&d zpheELsMK@4+~YIq4Tbq#Sj@OSW}a_h22>EWAp3JqZv4_7@mvNG*q5Fsj6eaQX1q{r z7QK6Y8ga&CP6P{#yLCy4!F*F68*VAhjIG>R_GEtDLfE01uD>_(aRt*&K06c45Zb5F z*j91Iu-LlkD;GqTg}2uKrcGK56wB6BH{&jhXgH~3dMcYMknZL6>IJ#@$U^h}uQGr4 z36ig1TV~ZZOa}}CYPePy0owu@;A$aELfj3e1d&@QdssBUEiXevaKIi0DzZC=L4=5B zBO7FjBrp5_d9z-`=|Mk4cyk>4HkyX=vs}*;^cN3=^E6zj zD+TT8Y`Dkr-=mgP6XRcXt#gQbw87;9jB^xrz_{X~`(&ig&wKGfYE^Uuyd z8-8Yyt8k#o2A)3+u>>HB-Up)I6I>}Lvt&VS9gM3Szw>b;<+n=CYIfkSZ)T!C+GaFjy$z0T(4_JvMdYbNw=he}M9Blh^KL)KdvI%QGvG^j_z(StQL590Ums zI>xw$Ht0}MgwW{bRVcQ3#o0?J9?`yqh=v8qGU>h4W(p)H;BnS~KpbhG|T1GQ)uzidZZhq}$D^PhZ3Hq3Sr&w4q&t0 zJ9J9}LMR<<2di-b2)$WlH-n201eQp62U~lcEdr8quck0)378pZmbmxy_8+MS65xqb zrVD*A?OPJ^c7GF|E_BzdcF+5Wdu~b2o zljh1{?i~64Oi6;xJP<#Qu8;zL)*F(;)l>!Ho&-+AF}J5y^Gu%~3%aBW7q^f4PA4(1yMQ<&Y`tOr7X>-T z+7r)L3-}4OCJRik6r4@}%~$NnN<}3W6jE1GLL#hi=xLyNI=SPw#$^Kh>#(QhIVVla zPqC}kfF3sM{eFf))bD5jgYT*H-S&%h2X;GK@;ctnT~ktwNM-%fWw>7=~w z+Lc7K+Zow2 zJqv0c9G$IfQ|{=7#qtT4%V+A1=#M-!uN!kG9{@l$W}cpVHf{UZ(Xk(KYHE$f z@E|Y}fTSDvp3!kjHtXcF+^S+FoDVYT23~MTJQ%W;yQT5^oUB05ol2ROeixj z$a#sYJlY&pgt$FrR~=(?X_0rPEygJi+cl0`;1Pb3{gLCKadJMnMGk}AWU|=VE>rqt z_932yJ^Eepfv)|pF8%TnoS9#nK3xWFUsECLFd(E6K3w2r>p;OeM26W;W8eJDrBj_g ze((wK(zsUvC}$16=3*T--hb`$O2KpG#8q}v_39j~M?52R{8w{Ql?1PZk3Ea~G&XLa zmgNXqiN1!%;+Lu;w^wnYrQC(Wc?gXr6$$$Px=9MqrYXZV-pN)bC{*itN#aPXIF6uy zIWt)7<(i5j7vz5d3#^)+(D!kc9qM&sZ`Mm+y;aYN`T;CYZ%rHjb3SU7?7(dntEz>c zEBG|G-%EjDrOUNIKKwkdZ2Fw+f=iz^_G;osEJ1F(h~4Moq3G|Y%DR_j4elRO-h26x zl86S3tCfO0H)l}6t1hAl>!-1j24(hcAyAu&$Xn)14M|qNvZ>&vL=4E64sys zKzGbN&_KqT3E4d*m>w`C-`)|F#j#*aQ*Cm$F1S~OVJ%2TaGn`S1jo+Mo9Kcl1`BuN zXW%tDvnwA8c3b}L>n!5@`3ys6S3N7IY^p%IpM_88tDwpEmE2%iDuxG`$b_wxNWH-6 z)tS42GV!;8OftM894EIuQ~-NXaM;T_jen*mnAf2}U8iwi6&7b}kzP!Xw*=Jg$qYH$ zDn%LU%2ReeW%fp!tW`U%+vvd+r&8wp^|Llr7x*%PKaV`B2?}h76 zv?EW=6tdFV4=Y`5{!KRB;OzIOTcvT6hppeQdA}mE*ExLKs>c9{$u>K>=;GE@C03B4 zi|36Jhsvl6!%)M)PwQ#Lx5JK@s0uYV*QbpFGKgsMC#`^U5DQqS78EDFPRl{M!s3X| zQf^=1HR_n{)gMq3jWHaRgCV}lLsn1z!4}kKLIh(sKH73moQ;BF-a{=go2h2pRvZub z*cN{vJtCmTlIj*+fKjO{2ta1SREgO`2}Oq8NrScAKitpCq%LvuOlKG{H!tg)z(+-1 znETW+ZO?OfWs3>yP;egh_O?Y+&kKD!H2G`Q=YH`_0X;J}UE9O#XMjXlN#`LM*XOle z8_T3e30QtIgXvUyv0syOXG&_Nk#ebhsF0a$`_MB|+XZ}gXNOyRd;R;kmG2%bW)@#} zsJyG|NZL)f@sT))c!v@};2NW%Wj@+3!9d;0%fs3J$g0?16IC+zHnX5R!uv8kB_}h5 z)CO%q{B|_|sy>{0O?2u~a9!XPFv);nup&CHE-;&HS`WoGSs2=^aoV_A1|+a3(2zxI zeqQB>t=svA?$ij2YDS}$iOo>E1pfM{%8vS8ACV3kz}oFSN2KnInS# z9D!RS#KU{jS=*!SLXJOj{z_?qc+x#i9{H2;GK;cH6HR4YTF)%Nuc7UWfMC*oN3GRv zVlL*`(H}1MX>8G=YxADZBDa#c?Z-!#J;W~vmw&Xzb58;H@vj%W!ha$vHYLZG@sElp zOSb8-UUt7xj$dR7G?Jqh5*~7%4Ccd))+JiB;srZ9O7@u}*Y@QYxfoDO77q3rp{!i2 z7r$N{xAWhmYIt(^H?=G^OqwDKC?S6j^ym0(j{--W_#~SXfxc;hAt}bgk2_ zS{?qh@=l{W=~~CM2y)f>eT8&}Yf|y!0X00s3w&2U^&)T~1(eQJ)$bEqb>w2*io*^*4JX5X+qbW4)H3pX1+ z0At%c1NL@KW_V|(Ws`N(yl%AcTdFUurL?Vd9Xwwc3TZ#NK2j2_qnlQ&<*U?$zpr8~ zQkU+v9(%r2Dl={1%v41-$v^by2rWpZT~#z7z3`g{;vnLo4G5&Af_aG zL@j)+Sf5rl{0*g3$;hjIb9%K%TDI#{p3&=V_RX%1`s|LoV87`**t2TfU}xtyxOo0e z*G5z4c1nV1W}{g>XM8%DYfx<737-i|u|&#$Hov?wNX;#N{7_~d*?-SlVSZRuEn+o! z?C44o!DKm!76YIYyYlUSEbC@pTnW;3=G+-BL4-euvL1RKa=kMO%n@fkQo;tIrZ0+y z8zsb-qw~GE!e}d9hU{%~ACJ7-z(L6DMNmAv(O=u(BN~Gh|7_OHek50HgI6{qbrJ@< zMdLsO$Br)W&d>_%Lm7vobz*>w9ph}46-pHLe!-**Z)1OYQBz4sDK^);K0-+fKQC;5B>!Yy~K{z3SugW|b&rF`(52P7{v+WBnT& zDdHM$P>rU3=o{O#LN;DGlPS||rZHdk641-4;y-IIep$gHc9c*0%O;RktAIW}Tc8H7EebWHjSgv1Ys+{K7SJg~z9*3uO&!~AxnNDR@ zeI5-|*JD9nyISI3fIugv7h!&N6n*;4OZXgEjgEhiQ0GOcgl!S(>^Kt`_h-P`Vsv#< z+qFIMe-2<{dO%Znc>z~bEAAs+4r;kECU}VE!KYS|(vn~p?6H~TfPj&gnnrHr#h*u# zSl1y{E!nRAlsV%e&*Q2ZEt$u&j$=ct%2}BNi7=s#kS2C+ng+mX^gT@VRpfgp~Ck zRbRPJ^heZn7&i8O2 zIGD)Y^ZWa!BdNCBLWuhY_InX2SvKn&m$Kq=pcrSC_>HAkji&T9?%fZNSljNOXO|XB1=UR@!%#r^Pw@~ZdCa{t*$-8z>etr zp%iV{OIpptcD%WN&!XmYMCp$Z?|j3gOBdHS^z}e zVF^6_ehrAXevFn$edNt1Gw?dDs$~}7Dqc-S6|n7!e>s1q8xsn3td|_MvI-SMjb=kbjme!bR z+cTwWfI*ag9F@afh0i09{30NO`Ta51s~sHa8RN&{MLsv`nwY)qr@dZiXoOoeY&v=7 zrFJNygqq*8!Z4$f1^_BmluXnLQc^0>^3VycqZT6bK)Ig**7SzVTgO4a`us|zg82RJ zZVATq0f?H&TJ4>|Keuc@%of`xEr3D)sx&K5>eq7^y*UW_F7v9u{pE}>DP!*J@0RqQ zS3#ja+u#;mF7Q!_nV6TWY)>K|rP%m+!Q-NR{toH21uE)_T|=x+4C~U-bi`>d`Pf%W z+;HYB0YLuQT&rBBeal3jR7>LrANna{uF{1Y13&481bbDLd_8d~NTp0C%v*k##$-J3 z>5*nnENjXnYY40wjEaHdxz`0A%0XH6DMTQl$Hvx&52!_0dDa!QifA%kIozzFV!NAX z9mrEVPgiEd{po!{FrvF?d(;w(0x4?WUwpc%dic?Gty=L8zH>_I;s6e(9?DW@<$UCsm-8A@cAic4=dfZq;j$G_D9PcxHFe?HTf09{~qfe(| zr!T<{NjwqE)He@)fdlIlU0;?I`-!gTG6bH=!5 zoBfCwqocpf;2UaAzI1BNRFpPQ&q??0E@82xH&?m3DYm&k2}1OXhJRKW5EJ8VWBmvc z-9S`*ufg0N_xS46Ia5tp-Dd?u=^)Y=rowX+d0Cpt$h59zmZnYG;<&*k?BEb4vlm6{ z;sww`(WM8r-DkjkGx6UJWAELP9nZa&7xC}uO>5KYqCW9_FCyk`DusN@f!K81jxVA!8tTChqFU)4n|XWEI4F(5IM-Tm%C{Jo@LF>s zMinMC<{9gHVA&vm_4y`x;E{LRf^fn5qb=?#p}feDrk-&%bG< ztRJ;HZxAYDsE&*Isk*0pbP`qalabwIxOLL9L2B2SirX`((x$sL6J@9G)akukLe-jT zuN1wC4!`oxNY070tTPL1ENPD&X}{@ScSSl*ov?e{98_xO*HEc-5b}u)PeC+4uTCw7S>c4?>fhseW)19SI&R!pFQ1cIjDadP*0`KmujJ z-Q;rNTdQY-CHc=daQh%=@CDpLW;=g|!*-)qyHLXjwsWfGLkapv@@Xl#xxah?+?{2) zpV5d>L2l|fgp3m5gNwGSSl(_=bQK@NGir9?$UBZ}zPXy)Vd-)& z>J(0?MMKuQpu|3}6)9!*4@_!f$Lp)4>r_HkaucgnfD++h!EM zKm8P<|D|LZClwa0XaN2d2j;*z0^d5}vP>6XY> z_4U?tpWm&H?mr5vWEvbPda#&<=HLHc6f@7-*yJzUL9X-zuhg@;P6S>2Qu{*JtiY{; zy<(eH#gh)su2y(@ic%C z6P>=DG$Q=I3WABMjA0Y$56`57-=V!jsfSGuEkx{X$-9PI+!ONfZqYlmq3-oyjuuFp z@xoe<1R)e3^szFpO1ezU^F;ry>X(JzvF~)ba9~N!SP9uN5aMYayH^-nZC)yZ(c>N zI!P-{h`Uwd`SX8|l2^`k4y8`k5e zZi#INS;sOxa)|SDKW@V$@Pr}A9Kh46B&Sb(+N36+Vi4kY^WafCZ0y}DcIsURU$cDU zj5a@yWk<BK6%RE zK0oTzQaotvx6Dy8sWCn{71{)EtvWrNY|vU~UI2;j^Dn4*D%u)NW8*Dhe_4_HSW6i8 zWU@v%_36#@^I0gvd2-b}cvUCm?fs%`?_s|h>$uvyYj(=x)w5C>`%Tg`+zeT7R4D@>F_p=fL=FzKnuR5BJCF_i zi__s_PxNgp{XcokMHQ4QQ8mJMd1tDaNL9zl^Q5Xr2U`pw^x(g>E_P^k(?cA0(UOW~ zasHemSF~hopX|lv|5G78ZnR<6RA^d<*MF&E>nzW`0|yzhn|Br!OP-iO{x9tU68)WW zJWIk9WVfr3qMrFNCL}4ktRR88Kd&S=V0J6xF9$!Tj7eWrYJ6_Y$`(Tyh2 zFwVe=oPmodnn%ZU0IpJE-NdQ&!MzR+1c@#B_^#(31>;^W!S9a>@i+CL2FC{qc$B2P z_vw=mVq~J%K!a2A!Xm)QL|l{CCBlv-nqW6mzlISMaUo=t5^bn$Iz0NpJ-dG#C5oE$ z?ULxd6-Q3l6s=ypu~p5}0#<$4SgE#5Fe_8-595hSCSSALrbII+Z@cKpHLU%v*(CKv zL)3kothOdG^c_BoptDw9ov<jub24 zWKl8n$P}xN*cqx0*%ee?{V`SJr}V&<`+XRzldck|h3S!2k9;by;8mvxRfp)pt3K>P z7Pr|yX9}-ggQwAfTR%nwtZ$pizg4K6otRF-wG8|uY8G0^Yq|VDL$T=Af;gYKi3KaSfH(MrzV21^~52r W`6N3Pb_5=7@xsa7@k6j6KmXaKzWcZU literal 0 HcmV?d00001 diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/bootstrap-button.js b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/bootstrap-button.js new file mode 100644 index 00000000..92aafe25 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/bootstrap-button.js @@ -0,0 +1,96 @@ +/* ============================================================ + * bootstrap-button.js v2.1.1 + * http://twitter.github.com/bootstrap/javascript.html#buttons + * ============================================================ + * Copyright 2012-2018 Twitter, Inc. + * + * 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. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* BUTTON PUBLIC CLASS DEFINITION + * ============================== */ + + var Button = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, $.fn.button.defaults, options) + } + + Button.prototype.setState = function (state) { + var d = 'disabled' + , $el = this.$element + , data = $el.data() + , val = $el.is('input') ? 'val' : 'html' + + state = state + 'Text' + data.resetText || $el.data('resetText', $el[val]()) + + $el[val](data[state] || this.options[state]) + + // push to event loop to allow forms to submit + setTimeout(function () { + state == 'loadingText' ? + $el.addClass(d).attr(d, d) : + $el.removeClass(d).removeAttr(d) + }, 0) + } + + Button.prototype.toggle = function () { + var $parent = this.$element.closest('[data-toggle="buttons-radio"]') + + $parent && $parent + .find('.active') + .removeClass('active') + + this.$element.toggleClass('active') + } + + + /* BUTTON PLUGIN DEFINITION + * ======================== */ + + $.fn.button = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('button') + , options = typeof option == 'object' && option + if (!data) $this.data('button', (data = new Button(this, options))) + if (option == 'toggle') data.toggle() + else if (option) data.setState(option) + }) + } + + $.fn.button.defaults = { + loadingText: 'loading...' + } + + $.fn.button.Constructor = Button + + + /* BUTTON DATA-API + * =============== */ + + $(function () { + $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) { + var $btn = $(e.target) + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') + $btn.button('toggle') + }) + }) + +}(window.jQuery); \ No newline at end of file diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/bootstrap-tab.js b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/bootstrap-tab.js new file mode 100644 index 00000000..338de668 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/bootstrap-tab.js @@ -0,0 +1,135 @@ +/* ======================================================== + * bootstrap-tab.js v2.1.1 + * http://twitter.github.com/bootstrap/javascript.html#tabs + * ======================================================== + * Copyright 2012-2018 Twitter, Inc. + * + * 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. + * ======================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* TAB CLASS DEFINITION + * ==================== */ + + var Tab = function (element) { + this.element = $(element) + } + + Tab.prototype = { + + constructor: Tab + + , show: function () { + var $this = this.element + , $ul = $this.closest('ul:not(.dropdown-menu)') + , selector = $this.attr('data-target') + , previous + , $target + , e + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + } + + if ( $this.parent('li').hasClass('active') ) return + + previous = $ul.find('.active a').last()[0] + + e = $.Event('show', { + relatedTarget: previous + }) + + $this.trigger(e) + + if (e.isDefaultPrevented()) return + + $target = $(selector) + + this.activate($this.parent('li'), $ul) + this.activate($target, $target.parent(), function () { + $this.trigger({ + type: 'shown' + , relatedTarget: previous + }) + }) + } + + , activate: function ( element, container, callback) { + var $active = container.find('> .active') + , transition = callback + && $.support.transition + && $active.hasClass('fade') + + function next() { + $active + .removeClass('active') + .find('> .dropdown-menu > .active') + .removeClass('active') + + element.addClass('active') + + if (transition) { + element[0].offsetWidth // reflow for transition + element.addClass('in') + } else { + element.removeClass('fade') + } + + if ( element.parent('.dropdown-menu') ) { + element.closest('li.dropdown').addClass('active') + } + + callback && callback() + } + + transition ? + $active.one($.support.transition.end, next) : + next() + + $active.removeClass('in') + } + } + + + /* TAB PLUGIN DEFINITION + * ===================== */ + + $.fn.tab = function ( option ) { + return this.each(function () { + var $this = $(this) + , data = $this.data('tab') + if (!data) $this.data('tab', (data = new Tab(this))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.tab.Constructor = Tab + + + /* TAB DATA-API + * ============ */ + + $(function () { + $('body').on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) { + e.preventDefault() + $(this).tab('show') + }) + }) + +}(window.jQuery); \ No newline at end of file diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/bootstrap.min.js b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/bootstrap.min.js new file mode 100644 index 00000000..53e3fad0 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/bootstrap.min.js @@ -0,0 +1,6 @@ +/*! +* Bootstrap.js by @fat & @mdo +* Copyright 2012-2018 Twitter, Inc. +* http://www.apache.org/licenses/LICENSE-2.0.txt +*/ +!function(e){e(function(){"use strict";e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()},e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e(function(){e("body").on("click.alert.data-api",t,n.prototype.close)})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")},e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e(function(){e("body").on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=n,this.options.slide&&this.slide(this.options.slide),this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},to:function(t){var n=this.$element.find(".item.active"),r=n.parent().children(),i=r.index(n),s=this;if(t>r.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){s.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",e(r[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle()),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f=e.Event("slide",{relatedTarget:i[0]});this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u]();if(i.hasClass("active"))return;if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}},e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e(function(){e("body").on("click.carousel.data-api","[data-slide]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=!i.data("modal")&&e.extend({},i.data(),n.data());i.carousel(s),t.preventDefault()})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning)return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning)return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=typeof n=="object"&&n;i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e(function(){e("body").on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})})}(window.jQuery),!function(e){"use strict";function r(){i(e(t)).removeClass("open")}function i(t){var n=t.attr("data-target"),r;return n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=e(n),r.length||(r=t.parent()),r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||(s.toggleClass("open"),n.focus()),!1},keydown:function(t){var n,r,s,o,u,a;if(!/(38|40|27)/.test(t.keyCode))return;n=e(this),t.preventDefault(),t.stopPropagation();if(n.is(".disabled, :disabled"))return;o=i(n),u=o.hasClass("open");if(!u||u&&t.keyCode==27)return n.click();r=e("[role=menu] li:not(.divider) a",o);if(!r.length)return;a=r.index(r.filter(":focus")),t.keyCode==38&&a>0&&a--,t.keyCode==40&&a').appendTo(document.body),this.options.backdrop!="static"&&this.$backdrop.click(e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,e.proxy(this.removeBackdrop,this)):this.removeBackdrop()):t&&t()}},e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e(function(){e("body").on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,this.options.trigger=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):this.options.trigger!="manual"&&(i=this.options.trigger=="hover"?"mouseenter":"focus",s=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this))),this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,t,this.$element.data()),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);if(!n.options.delay||!n.options.delay.show)return n.show();clearTimeout(this.timeout),n.hoverState="in",this.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var e,t,n,r,i,s,o;if(this.hasContent()&&this.enabled){e=this.tip(),this.setContent(),this.options.animation&&e.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,t=/in/.test(s),e.remove().css({top:0,left:0,display:"block"}).appendTo(t?this.$element:document.body),n=this.getPosition(t),r=e[0].offsetWidth,i=e[0].offsetHeight;switch(t?s.split(" ")[1]:s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}e.css(o).addClass(s).addClass("in")}},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function r(){var t=setTimeout(function(){n.off(e.support.transition.end).remove()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.remove()})}var t=this,n=this.tip();return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?r():n.remove(),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(t){return e.extend({},t?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}},e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'

',trigger:"hover",title:"",delay:0,html:!0}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content > *")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-content")||(typeof n.content=="function"?n.content.call(t[0]):n.content),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}}),e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'

'})}(window.jQuery),!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var t=e(this),n=t.data("target")||t.attr("href"),r=/^#\w/.test(n)&&e(n);return r&&r.length&&[[r.position().top,n]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}},e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active a").last()[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}},e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e(function(){e("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.$menu=e(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:t.top+t.height,left:t.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length"+t+""})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),(e.browser.chrome||e.browser.webkit||e.browser.msie)&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this))},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=!~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},blur:function(e){var t=this;setTimeout(function(){t.hide()},150)},click:function(e){e.stopPropagation(),e.preventDefault(),this.select()},mouseenter:function(t){this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")}},e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'',item:'
  • ',minLength:1},e.fn.typeahead.Constructor=t,e(function(){e("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;t.preventDefault(),n.typeahead(n.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))},e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery); \ No newline at end of file diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/customTooltip.js b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/customTooltip.js new file mode 100644 index 00000000..cb39657a --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/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/webapp/js/jquery-ui-1.8.23.custom.min.js b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/jquery-ui-1.8.23.custom.min.js new file mode 100644 index 00000000..78354540 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/jquery-ui-1.8.23.custom.min.js @@ -0,0 +1,125 @@ +/*! jQuery UI - v1.8.23 - 2012-08-15 +* https://github.com/jquery/jquery-ui +* Includes: jquery.ui.core.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +(function(a,b){function c(b,c){var e=b.nodeName.toLowerCase();if("area"===e){var f=b.parentNode,g=f.name,h;return!b.href||!g||f.nodeName.toLowerCase()!=="map"?!1:(h=a("img[usemap=#"+g+"]")[0],!!h&&d(h))}return(/input|select|textarea|button|object/.test(e)?!b.disabled:"a"==e?b.href||c:c)&&d(b)}function d(b){return!a(b).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.ui=a.ui||{};if(a.ui.version)return;a.extend(a.ui,{version:"1.8.23",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(b,c){return typeof b=="number"?this.each(function(){var d=this;setTimeout(function(){a(d).focus(),c&&c.call(d)},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;return a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?b=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):b=this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0),/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(c){if(c!==b)return this.css("zIndex",c);if(this.length){var d=a(this[0]),e,f;while(d.length&&d[0]!==document){e=d.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){f=parseInt(d.css("zIndex"),10);if(!isNaN(f)&&f!==0)return f}d=d.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a("").outerWidth(1).jquery||a.each(["Width","Height"],function(c,d){function h(b,c,d,f){return a.each(e,function(){c-=parseFloat(a.curCSS(b,"padding"+this,!0))||0,d&&(c-=parseFloat(a.curCSS(b,"border"+this+"Width",!0))||0),f&&(c-=parseFloat(a.curCSS(b,"margin"+this,!0))||0)}),c}var e=d==="Width"?["Left","Right"]:["Top","Bottom"],f=d.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(c){return c===b?g["inner"+d].call(this):this.each(function(){a(this).css(f,h(this,c)+"px")})},a.fn["outer"+d]=function(b,c){return typeof b!="number"?g["outer"+d].call(this,b):this.each(function(){a(this).css(f,h(this,b,!0,c)+"px")})}}),a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(b){return function(c){return!!a.data(c,b)}}):function(b,c,d){return!!a.data(b,d[3])},focusable:function(b){return c(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var d=a.attr(b,"tabindex"),e=isNaN(d);return(e||d>=0)&&c(b,!e)}}),a(function(){var b=document.body,c=b.appendChild(c=document.createElement("div"));c.offsetHeight,a.extend(c.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),a.support.minHeight=c.offsetHeight===100,a.support.selectstart="onselectstart"in c,b.removeChild(c).style.display="none"}),a.curCSS||(a.curCSS=a.css),a.extend(a.ui,{plugin:{add:function(b,c,d){var e=a.ui[b].prototype;for(var f in d)e.plugins[f]=e.plugins[f]||[],e.plugins[f].push([c,d[f]])},call:function(a,b,c){var d=a.plugins[b];if(!d||!a.element[0].parentNode)return;for(var e=0;e0?!0:(b[d]=1,e=b[d]>0,b[d]=0,e)},isOverAxis:function(a,b,c){return a>b&&a=9||!!b.button?this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted):this._mouseUp(b)},_mouseUp:function(b){return a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,b.target==this._mouseDownEvent.target&&a.data(b.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(b)),!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(a){return this.mouseDelayMet},_mouseStart:function(a){},_mouseDrag:function(a){},_mouseStop:function(a){},_mouseCapture:function(a){return!0}})})(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15 +* https://github.com/jquery/jquery-ui +* Includes: jquery.ui.position.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +(function(a,b){a.ui=a.ui||{};var c=/left|center|right/,d=/top|center|bottom/,e="center",f={},g=a.fn.position,h=a.fn.offset;a.fn.position=function(b){if(!b||!b.of)return g.apply(this,arguments);b=a.extend({},b);var h=a(b.of),i=h[0],j=(b.collision||"flip").split(" "),k=b.offset?b.offset.split(" "):[0,0],l,m,n;return i.nodeType===9?(l=h.width(),m=h.height(),n={top:0,left:0}):i.setTimeout?(l=h.width(),m=h.height(),n={top:h.scrollTop(),left:h.scrollLeft()}):i.preventDefault?(b.at="left top",l=m=0,n={top:b.of.pageY,left:b.of.pageX}):(l=h.outerWidth(),m=h.outerHeight(),n=h.offset()),a.each(["my","at"],function(){var a=(b[this]||"").split(" ");a.length===1&&(a=c.test(a[0])?a.concat([e]):d.test(a[0])?[e].concat(a):[e,e]),a[0]=c.test(a[0])?a[0]:e,a[1]=d.test(a[1])?a[1]:e,b[this]=a}),j.length===1&&(j[1]=j[0]),k[0]=parseInt(k[0],10)||0,k.length===1&&(k[1]=k[0]),k[1]=parseInt(k[1],10)||0,b.at[0]==="right"?n.left+=l:b.at[0]===e&&(n.left+=l/2),b.at[1]==="bottom"?n.top+=m:b.at[1]===e&&(n.top+=m/2),n.left+=k[0],n.top+=k[1],this.each(function(){var c=a(this),d=c.outerWidth(),g=c.outerHeight(),h=parseInt(a.curCSS(this,"marginLeft",!0))||0,i=parseInt(a.curCSS(this,"marginTop",!0))||0,o=d+h+(parseInt(a.curCSS(this,"marginRight",!0))||0),p=g+i+(parseInt(a.curCSS(this,"marginBottom",!0))||0),q=a.extend({},n),r;b.my[0]==="right"?q.left-=d:b.my[0]===e&&(q.left-=d/2),b.my[1]==="bottom"?q.top-=g:b.my[1]===e&&(q.top-=g/2),f.fractions||(q.left=Math.round(q.left),q.top=Math.round(q.top)),r={left:q.left-h,top:q.top-i},a.each(["left","top"],function(c,e){a.ui.position[j[c]]&&a.ui.position[j[c]][e](q,{targetWidth:l,targetHeight:m,elemWidth:d,elemHeight:g,collisionPosition:r,collisionWidth:o,collisionHeight:p,offset:k,my:b.my,at:b.at})}),a.fn.bgiframe&&c.bgiframe(),c.offset(a.extend(q,{using:b.using}))})},a.ui.position={fit:{left:function(b,c){var d=a(window),e=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft();b.left=e>0?b.left-e:Math.max(b.left-c.collisionPosition.left,b.left)},top:function(b,c){var d=a(window),e=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop();b.top=e>0?b.top-e:Math.max(b.top-c.collisionPosition.top,b.top)}},flip:{left:function(b,c){if(c.at[0]===e)return;var d=a(window),f=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft(),g=c.my[0]==="left"?-c.elemWidth:c.my[0]==="right"?c.elemWidth:0,h=c.at[0]==="left"?c.targetWidth:-c.targetWidth,i=-2*c.offset[0];b.left+=c.collisionPosition.left<0?g+h+i:f>0?g+h+i:0},top:function(b,c){if(c.at[1]===e)return;var d=a(window),f=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop(),g=c.my[1]==="top"?-c.elemHeight:c.my[1]==="bottom"?c.elemHeight:0,h=c.at[1]==="top"?c.targetHeight:-c.targetHeight,i=-2*c.offset[1];b.top+=c.collisionPosition.top<0?g+h+i:f>0?g+h+i:0}}},a.offset.setOffset||(a.offset.setOffset=function(b,c){/static/.test(a.curCSS(b,"position"))&&(b.style.position="relative");var d=a(b),e=d.offset(),f=parseInt(a.curCSS(b,"top",!0),10)||0,g=parseInt(a.curCSS(b,"left",!0),10)||0,h={top:c.top-e.top+f,left:c.left-e.left+g};"using"in c?c.using.call(b,h):d.css(h)},a.fn.offset=function(b){var c=this[0];return!c||!c.ownerDocument?null:b?a.isFunction(b)?this.each(function(c){a(this).offset(b.call(this,c,a(this).offset()))}):this.each(function(){a.offset.setOffset(this,b)}):h.call(this)}),a.curCSS||(a.curCSS=a.css),function(){var b=document.getElementsByTagName("body")[0],c=document.createElement("div"),d,e,g,h,i;d=document.createElement(b?"div":"body"),g={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},b&&a.extend(g,{position:"absolute",left:"-1000px",top:"-1000px"});for(var j in g)d.style[j]=g[j];d.appendChild(c),e=b||document.documentElement,e.insertBefore(d,e.firstChild),c.style.cssText="position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;",h=a(c).offset(function(a,b){return b}).offset(),d.innerHTML="",e.removeChild(d),i=h.top+h.left+(b?2e3:0),f.fractions=i>21&&i<22}()})(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15 +* https://github.com/jquery/jquery-ui +* Includes: jquery.ui.draggable.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +(function(a,b){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position"))&&(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},destroy:function(){if(!this.element.data("draggable"))return;return this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy(),this},_mouseCapture:function(b){var c=this.options;return this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")?!1:(this.handle=this._getHandle(b),this.handle?(c.iframeFix&&a(c.iframeFix===!0?"iframe":c.iframeFix).each(function(){a('
    ').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(a(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(b){var c=this.options;return this.helper=this._createHelper(b),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),a.ui.ddmanager&&(a.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt),c.containment&&this._setContainment(),this._trigger("start",b)===!1?(this._clear(),!1):(this._cacheHelperProportions(),a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this._mouseDrag(b,!0),a.ui.ddmanager&&a.ui.ddmanager.dragStart(this,b),!0)},_mouseDrag:function(b,c){this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute");if(!c){var d=this._uiHash();if(this._trigger("drag",b,d)===!1)return this._mouseUp({}),!1;this.position=d.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";return a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),!1},_mouseStop:function(b){var c=!1;a.ui.ddmanager&&!this.options.dropBehaviour&&(c=a.ui.ddmanager.drop(this,b)),this.dropped&&(c=this.dropped,this.dropped=!1);var d=this.element[0],e=!1;while(d&&(d=d.parentNode))d==document&&(e=!0);if(!e&&this.options.helper==="original")return!1;if(this.options.revert=="invalid"&&!c||this.options.revert=="valid"&&c||this.options.revert===!0||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,c)){var f=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){f._trigger("stop",b)!==!1&&f._clear()})}else this._trigger("stop",b)!==!1&&this._clear();return!1},_mouseUp:function(b){return this.options.iframeFix===!0&&a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),a.ui.ddmanager&&a.ui.ddmanager.dragStop(this,b),a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?!0:!1;return a(this.options.handle,this.element).find("*").andSelf().each(function(){this==b.target&&(c=!0)}),c},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b])):c.helper=="clone"?this.element.clone().removeAttr("id"):this.element;return d.parents("body").length||d.appendTo(c.appendTo=="parent"?this.element[0].parentNode:c.appendTo),d[0]!=this.element[0]&&!/(fixed|absolute)/.test(d.css("position"))&&d.css("position","absolute"),d},_adjustOffsetFromHelper:function(b){typeof b=="string"&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;b.containment=="parent"&&(b.containment=this.helper[0].parentNode);if(b.containment=="document"||b.containment=="window")this.containment=[b.containment=="document"?0:a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,b.containment=="document"?0:a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(b.containment=="document"?0:a(window).scrollLeft())+a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(b.containment=="document"?0:a(window).scrollTop())+(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)&&b.containment.constructor!=Array){var c=a(b.containment),d=c[0];if(!d)return;var e=c.offset(),f=a(d).css("overflow")!="hidden";this.containment=[(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0),(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0),(f?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(f?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=c}else b.containment.constructor==Array&&(this.containment=b.containment)},_convertPositionTo:function(b,c){c||(c=this.position);var d=b=="absolute"?1:-1,e=this.options,f=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:f.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*d)}},_generatePosition:function(b){var c=this.options,d=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName),f=b.pageX,g=b.pageY;if(this.originalPosition){var h;if(this.containment){if(this.relative_container){var i=this.relative_container.offset();h=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]}else h=this.containment;b.pageX-this.offset.click.lefth[2]&&(f=h[2]+this.offset.click.left),b.pageY-this.offset.click.top>h[3]&&(g=h[3]+this.offset.click.top)}if(c.grid){var j=c.grid[1]?this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1]:this.originalPageY;g=h?j-this.offset.click.toph[3]?j-this.offset.click.toph[2]?k-this.offset.click.left=0;k--){var l=d.snapElements[k].left,m=l+d.snapElements[k].width,n=d.snapElements[k].top,o=n+d.snapElements[k].height;if(!(l-f=k&&g<=l||h>=k&&h<=l||gl)&&(e>=i&&e<=j||f>=i&&f<=j||ej);default:return!1}},a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(b,c){var d=a.ui.ddmanager.droppables[b.options.scope]||[],e=c?c.type:null,f=(b.currentItem||b.element).find(":data(droppable)").andSelf();g:for(var h=0;h').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("resizable",this.element.data("resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=c.handles||(a(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se");if(this.handles.constructor==String){this.handles=="all"&&(this.handles="n,e,s,w,se,sw,ne,nw");var d=this.handles.split(",");this.handles={};for(var e=0;e');h.css({zIndex:c.zIndex}),"se"==f&&h.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[f]=".ui-resizable-"+f,this.element.append(h)}}this._renderAxis=function(b){b=b||this.element;for(var c in this.handles){this.handles[c].constructor==String&&(this.handles[c]=a(this.handles[c],this.element).show());if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var d=a(this.handles[c],this.element),e=0;e=/sw|ne|nw|se|n|s/.test(c)?d.outerHeight():d.outerWidth();var f=["padding",/ne|nw|n/.test(c)?"Top":/se|sw|s/.test(c)?"Bottom":/^e$/.test(c)?"Right":"Left"].join("");b.css(f,e),this._proportionallyResize()}if(!a(this.handles[c]).length)continue}},this._renderAxis(this.element),this._handles=a(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){if(!b.resizing){if(this.className)var a=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=a&&a[1]?a[1]:"se"}}),c.autoHide&&(this._handles.hide(),a(this.element).addClass("ui-resizable-autohide").hover(function(){if(c.disabled)return;a(this).removeClass("ui-resizable-autohide"),b._handles.show()},function(){if(c.disabled)return;b.resizing||(a(this).addClass("ui-resizable-autohide"),b._handles.hide())})),this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(b){a(b).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){b(this.element);var c=this.element;c.after(this.originalElement.css({position:c.css("position"),width:c.outerWidth(),height:c.outerHeight(),top:c.css("top"),left:c.css("left")})).remove()}return this.originalElement.css("resize",this.originalResizeStyle),b(this.originalElement),this},_mouseCapture:function(b){var c=!1;for(var d in this.handles)a(this.handles[d])[0]==b.target&&(c=!0);return!this.options.disabled&&c},_mouseStart:function(b){var d=this.options,e=this.element.position(),f=this.element;this.resizing=!0,this.documentScroll={top:a(document).scrollTop(),left:a(document).scrollLeft()},(f.is(".ui-draggable")||/absolute/.test(f.css("position")))&&f.css({position:"absolute",top:e.top,left:e.left}),this._renderProxy();var g=c(this.helper.css("left")),h=c(this.helper.css("top"));d.containment&&(g+=a(d.containment).scrollLeft()||0,h+=a(d.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:g,top:h},this.size=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()},this.originalSize=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()},this.originalPosition={left:g,top:h},this.sizeDiff={width:f.outerWidth()-f.width(),height:f.outerHeight()-f.height()},this.originalMousePosition={left:b.pageX,top:b.pageY},this.aspectRatio=typeof d.aspectRatio=="number"?d.aspectRatio:this.originalSize.width/this.originalSize.height||1;var i=a(".ui-resizable-"+this.axis).css("cursor");return a("body").css("cursor",i=="auto"?this.axis+"-resize":i),f.addClass("ui-resizable-resizing"),this._propagate("start",b),!0},_mouseDrag:function(b){var c=this.helper,d=this.options,e={},f=this,g=this.originalMousePosition,h=this.axis,i=b.pageX-g.left||0,j=b.pageY-g.top||0,k=this._change[h];if(!k)return!1;var l=k.apply(this,[b,i,j]),m=a.browser.msie&&a.browser.version<7,n=this.sizeDiff;this._updateVirtualBoundaries(b.shiftKey);if(this._aspectRatio||b.shiftKey)l=this._updateRatio(l,b);return l=this._respectSize(l,b),this._propagate("resize",b),c.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"}),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),this._updateCache(l),this._trigger("resize",b,this.ui()),!1},_mouseStop:function(b){this.resizing=!1;var c=this.options,d=this;if(this._helper){var e=this._proportionallyResizeElements,f=e.length&&/textarea/i.test(e[0].nodeName),g=f&&a.ui.hasScroll(e[0],"left")?0:d.sizeDiff.height,h=f?0:d.sizeDiff.width,i={width:d.helper.width()-h,height:d.helper.height()-g},j=parseInt(d.element.css("left"),10)+(d.position.left-d.originalPosition.left)||null,k=parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top)||null;c.animate||this.element.css(a.extend(i,{top:k,left:j})),d.helper.height(d.size.height),d.helper.width(d.size.width),this._helper&&!c.animate&&this._proportionallyResize()}return a("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",b),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(a){var b=this.options,c,e,f,g,h;h={minWidth:d(b.minWidth)?b.minWidth:0,maxWidth:d(b.maxWidth)?b.maxWidth:Infinity,minHeight:d(b.minHeight)?b.minHeight:0,maxHeight:d(b.maxHeight)?b.maxHeight:Infinity};if(this._aspectRatio||a)c=h.minHeight*this.aspectRatio,f=h.minWidth/this.aspectRatio,e=h.maxHeight*this.aspectRatio,g=h.maxWidth/this.aspectRatio,c>h.minWidth&&(h.minWidth=c),f>h.minHeight&&(h.minHeight=f),ea.width,k=d(a.height)&&e.minHeight&&e.minHeight>a.height;j&&(a.width=e.minWidth),k&&(a.height=e.minHeight),h&&(a.width=e.maxWidth),i&&(a.height=e.maxHeight);var l=this.originalPosition.left+this.originalSize.width,m=this.position.top+this.size.height,n=/sw|nw|w/.test(g),o=/nw|ne|n/.test(g);j&&n&&(a.left=l-e.minWidth),h&&n&&(a.left=l-e.maxWidth),k&&o&&(a.top=m-e.minHeight),i&&o&&(a.top=m-e.maxHeight);var p=!a.width&&!a.height;return p&&!a.left&&a.top?a.top=null:p&&!a.top&&a.left&&(a.left=null),a},_proportionallyResize:function(){var b=this.options;if(!this._proportionallyResizeElements.length)return;var c=this.helper||this.element;for(var d=0;d');var d=a.browser.msie&&a.browser.version<7,e=d?1:0,f=d?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+f,height:this.element.outerHeight()+f,position:"absolute",left:this.elementOffset.left-e+"px",top:this.elementOffset.top-e+"px",zIndex:++c.zIndex}),this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(a,b,c){return{width:this.originalSize.width+b}},w:function(a,b,c){var d=this.options,e=this.originalSize,f=this.originalPosition;return{left:f.left+b,width:e.width-b}},n:function(a,b,c){var d=this.options,e=this.originalSize,f=this.originalPosition;return{top:f.top+c,height:e.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},sw:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,d]))},ne:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},nw:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,d]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]),b!="resize"&&this._trigger(b,c,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),a.extend(a.ui.resizable,{version:"1.8.23"}),a.ui.plugin.add("resizable","alsoResize",{start:function(b,c){var d=a(this).data("resizable"),e=d.options,f=function(b){a(b).each(function(){var b=a(this);b.data("resizable-alsoresize",{width:parseInt(b.width(),10),height:parseInt(b.height(),10),left:parseInt(b.css("left"),10),top:parseInt(b.css("top"),10)})})};typeof e.alsoResize=="object"&&!e.alsoResize.parentNode?e.alsoResize.length?(e.alsoResize=e.alsoResize[0],f(e.alsoResize)):a.each(e.alsoResize,function(a){f(a)}):f(e.alsoResize)},resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.originalSize,g=d.originalPosition,h={height:d.size.height-f.height||0,width:d.size.width-f.width||0,top:d.position.top-g.top||0,left:d.position.left-g.left||0},i=function(b,d){a(b).each(function(){var b=a(this),e=a(this).data("resizable-alsoresize"),f={},g=d&&d.length?d:b.parents(c.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(g,function(a,b){var c=(e[b]||0)+(h[b]||0);c&&c>=0&&(f[b]=c||null)}),b.css(f)})};typeof e.alsoResize=="object"&&!e.alsoResize.nodeType?a.each(e.alsoResize,function(a,b){i(a,b)}):i(e.alsoResize)},stop:function(b,c){a(this).removeData("resizable-alsoresize")}}),a.ui.plugin.add("resizable","animate",{stop:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d._proportionallyResizeElements,g=f.length&&/textarea/i.test(f[0].nodeName),h=g&&a.ui.hasScroll(f[0],"left")?0:d.sizeDiff.height,i=g?0:d.sizeDiff.width,j={width:d.size.width-i,height:d.size.height-h},k=parseInt(d.element.css("left"),10)+(d.position.left-d.originalPosition.left)||null,l=parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top)||null;d.element.animate(a.extend(j,l&&k?{top:l,left:k}:{}),{duration:e.animateDuration,easing:e.animateEasing,step:function(){var c={width:parseInt(d.element.css("width"),10),height:parseInt(d.element.css("height"),10),top:parseInt(d.element.css("top"),10),left:parseInt(d.element.css("left"),10)};f&&f.length&&a(f[0]).css({width:c.width,height:c.height}),d._updateCache(c),d._propagate("resize",b)}})}}),a.ui.plugin.add("resizable","containment",{start:function(b,d){var e=a(this).data("resizable"),f=e.options,g=e.element,h=f.containment,i=h instanceof a?h.get(0):/parent/.test(h)?g.parent().get(0):h;if(!i)return;e.containerElement=a(i);if(/document/.test(h)||h==document)e.containerOffset={left:0,top:0},e.containerPosition={left:0,top:0},e.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight};else{var j=a(i),k=[];a(["Top","Right","Left","Bottom"]).each(function(a,b){k[a]=c(j.css("padding"+b))}),e.containerOffset=j.offset(),e.containerPosition=j.position(),e.containerSize={height:j.innerHeight()-k[3],width:j.innerWidth()-k[1]};var l=e.containerOffset,m=e.containerSize.height,n=e.containerSize.width,o=a.ui.hasScroll(i,"left")?i.scrollWidth:n,p=a.ui.hasScroll(i)?i.scrollHeight:m;e.parentData={element:i,left:l.left,top:l.top,width:o,height:p}}},resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.containerSize,g=d.containerOffset,h=d.size,i=d.position,j=d._aspectRatio||b.shiftKey,k={top:0,left:0},l=d.containerElement;l[0]!=document&&/static/.test(l.css("position"))&&(k=g),i.left<(d._helper?g.left:0)&&(d.size.width=d.size.width+(d._helper?d.position.left-g.left:d.position.left-k.left),j&&(d.size.height=d.size.width/d.aspectRatio),d.position.left=e.helper?g.left:0),i.top<(d._helper?g.top:0)&&(d.size.height=d.size.height+(d._helper?d.position.top-g.top:d.position.top),j&&(d.size.width=d.size.height*d.aspectRatio),d.position.top=d._helper?g.top:0),d.offset.left=d.parentData.left+d.position.left,d.offset.top=d.parentData.top+d.position.top;var m=Math.abs((d._helper?d.offset.left-k.left:d.offset.left-k.left)+d.sizeDiff.width),n=Math.abs((d._helper?d.offset.top-k.top:d.offset.top-g.top)+d.sizeDiff.height),o=d.containerElement.get(0)==d.element.parent().get(0),p=/relative|absolute/.test(d.containerElement.css("position"));o&&p&&(m-=d.parentData.left),m+d.size.width>=d.parentData.width&&(d.size.width=d.parentData.width-m,j&&(d.size.height=d.size.width/d.aspectRatio)),n+d.size.height>=d.parentData.height&&(d.size.height=d.parentData.height-n,j&&(d.size.width=d.size.height*d.aspectRatio))},stop:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.position,g=d.containerOffset,h=d.containerPosition,i=d.containerElement,j=a(d.helper),k=j.offset(),l=j.outerWidth()-d.sizeDiff.width,m=j.outerHeight()-d.sizeDiff.height;d._helper&&!e.animate&&/relative/.test(i.css("position"))&&a(this).css({left:k.left-h.left-g.left,width:l,height:m}),d._helper&&!e.animate&&/static/.test(i.css("position"))&&a(this).css({left:k.left-h.left-g.left,width:l,height:m})}}),a.ui.plugin.add("resizable","ghost",{start:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.size;d.ghost=d.originalElement.clone(),d.ghost.css({opacity:.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof e.ghost=="string"?e.ghost:""),d.ghost.appendTo(d.helper)},resize:function(b,c){var d=a(this).data("resizable"),e=d.options;d.ghost&&d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})},stop:function(b,c){var d=a(this).data("resizable"),e=d.options;d.ghost&&d.helper&&d.helper.get(0).removeChild(d.ghost.get(0))}}),a.ui.plugin.add("resizable","grid",{resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.size,g=d.originalSize,h=d.originalPosition,i=d.axis,j=e._aspectRatio||b.shiftKey;e.grid=typeof e.grid=="number"?[e.grid,e.grid]:e.grid;var k=Math.round((f.width-g.width)/(e.grid[0]||1))*(e.grid[0]||1),l=Math.round((f.height-g.height)/(e.grid[1]||1))*(e.grid[1]||1);/^(se|s|e)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l):/^(ne)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l,d.position.top=h.top-l):/^(sw)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l,d.position.left=h.left-k):(d.size.width=g.width+k,d.size.height=g.height+l,d.position.top=h.top-l,d.position.left=h.left-k)}});var c=function(a){return parseInt(a,10)||0},d=function(a){return!isNaN(parseInt(a,10))}})(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15 +* https://github.com/jquery/jquery-ui +* Includes: jquery.ui.selectable.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +(function(a,b){a.widget("ui.selectable",a.ui.mouse,{options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var b=this;this.element.addClass("ui-selectable"),this.dragged=!1;var c;this.refresh=function(){c=a(b.options.filter,b.element[0]),c.addClass("ui-selectee"),c.each(function(){var b=a(this),c=b.offset();a.data(this,"selectable-item",{element:this,$element:b,left:c.left,top:c.top,right:c.left+b.outerWidth(),bottom:c.top+b.outerHeight(),startselected:!1,selected:b.hasClass("ui-selected"),selecting:b.hasClass("ui-selecting"),unselecting:b.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=c.addClass("ui-selectee"),this._mouseInit(),this.helper=a("
    ")},destroy:function(){return this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable"),this._mouseDestroy(),this},_mouseStart:function(b){var c=this;this.opos=[b.pageX,b.pageY];if(this.options.disabled)return;var d=this.options;this.selectees=a(d.filter,this.element[0]),this._trigger("start",b),a(d.appendTo).append(this.helper),this.helper.css({left:b.clientX,top:b.clientY,width:0,height:0}),d.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var d=a.data(this,"selectable-item");d.startselected=!0,!b.metaKey&&!b.ctrlKey&&(d.$element.removeClass("ui-selected"),d.selected=!1,d.$element.addClass("ui-unselecting"),d.unselecting=!0,c._trigger("unselecting",b,{unselecting:d.element}))}),a(b.target).parents().andSelf().each(function(){var d=a.data(this,"selectable-item");if(d){var e=!b.metaKey&&!b.ctrlKey||!d.$element.hasClass("ui-selected");return d.$element.removeClass(e?"ui-unselecting":"ui-selected").addClass(e?"ui-selecting":"ui-unselecting"),d.unselecting=!e,d.selecting=e,d.selected=e,e?c._trigger("selecting",b,{selecting:d.element}):c._trigger("unselecting",b,{unselecting:d.element}),!1}})},_mouseDrag:function(b){var c=this;this.dragged=!0;if(this.options.disabled)return;var d=this.options,e=this.opos[0],f=this.opos[1],g=b.pageX,h=b.pageY;if(e>g){var i=g;g=e,e=i}if(f>h){var i=h;h=f,f=i}return this.helper.css({left:e,top:f,width:g-e,height:h-f}),this.selectees.each(function(){var i=a.data(this,"selectable-item");if(!i||i.element==c.element[0])return;var j=!1;d.tolerance=="touch"?j=!(i.left>g||i.righth||i.bottome&&i.rightf&&i.bottom *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var a=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?a.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},destroy:function(){a.Widget.prototype.destroy.call(this),this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var b=this.items.length-1;b>=0;b--)this.items[b].item.removeData(this.widgetName+"-item");return this},_setOption:function(b,c){b==="disabled"?(this.options[b]=c,this.widget()[c?"addClass":"removeClass"]("ui-sortable-disabled")):a.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(b,c){var d=this;if(this.reverting)return!1;if(this.options.disabled||this.options.type=="static")return!1;this._refreshItems(b);var e=null,f=this,g=a(b.target).parents().each(function(){if(a.data(this,d.widgetName+"-item")==f)return e=a(this),!1});a.data(b.target,d.widgetName+"-item")==f&&(e=a(b.target));if(!e)return!1;if(this.options.handle&&!c){var h=!1;a(this.options.handle,e).find("*").andSelf().each(function(){this==b.target&&(h=!0)});if(!h)return!1}return this.currentItem=e,this._removeCurrentsFromItems(),!0},_mouseStart:function(b,c,d){var e=this.options,f=this;this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(b),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),e.containment&&this._setContainment(),e.cursor&&(a("body").css("cursor")&&(this._storedCursor=a("body").css("cursor")),a("body").css("cursor",e.cursor)),e.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",e.opacity)),e.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",e.zIndex)),this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",b,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions();if(!d)for(var g=this.containers.length-1;g>=0;g--)this.containers[g]._trigger("activate",b,f._uiHash(this));return a.ui.ddmanager&&(a.ui.ddmanager.current=this),a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(b),!0},_mouseDrag:function(b){this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){var c=this.options,d=!1;this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-b.pageY=0;e--){var f=this.items[e],g=f.item[0],h=this._intersectsWithPointer(f);if(!h)continue;if(g!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=g&&!a.ui.contains(this.placeholder[0],g)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],g):!0)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(f))this._rearrange(b,f);else break;this._trigger("change",b,this._uiHash());break}}return this._contactContainers(b),a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),this._trigger("sort",b,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(b,c){if(!b)return;a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,b);if(this.options.revert){var d=this,e=d.placeholder.offset();d.reverting=!0,a(this.helper).animate({left:e.left-this.offset.parent.left-d.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-d.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){d._clear(b)})}else this._clear(b,c);return!1},cancel:function(){var b=this;if(this.dragging){this._mouseUp({target:null}),this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("deactivate",null,b._uiHash(this)),this.containers[c].containerCache.over&&(this.containers[c]._trigger("out",null,b._uiHash(this)),this.containers[c].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),a.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];return b=b||{},a(c).each(function(){var c=(a(b.item||this).attr(b.attribute||"id")||"").match(b.expression||/(.+)[-=_](.+)/);c&&d.push((b.key||c[1]+"[]")+"="+(b.key&&b.expression?c[1]:c[2]))}),!d.length&&b.key&&d.push(b.key+"="),d.join("&")},toArray:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];return b=b||{},c.each(function(){d.push(a(b.item||this).attr(b.attribute||"id")||"")}),d},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,d=this.positionAbs.top,e=d+this.helperProportions.height,f=a.left,g=f+a.width,h=a.top,i=h+a.height,j=this.offset.click.top,k=this.offset.click.left,l=d+j>h&&d+jf&&b+ka[this.floating?"width":"height"]?l:f0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){return this._refreshItems(a),this.refreshPositions(),this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(b){var c=this,d=[],e=[],f=this._connectWith();if(f&&b)for(var g=f.length-1;g>=0;g--){var h=a(f[g]);for(var i=h.length-1;i>=0;i--){var j=a.data(h[i],this.widgetName);j&&j!=this&&!j.options.disabled&&e.push([a.isFunction(j.options.items)?j.options.items.call(j.element):a(j.options.items,j.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),j])}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var g=e.length-1;g>=0;g--)e[g][0].each(function(){d.push(this)});return a(d)},_removeCurrentsFromItems:function(){var a=this.currentItem.find(":data("+this.widgetName+"-item)");for(var b=0;b=0;g--){var h=a(f[g]);for(var i=h.length-1;i>=0;i--){var j=a.data(h[i],this.widgetName);j&&j!=this&&!j.options.disabled&&(e.push([a.isFunction(j.options.items)?j.options.items.call(j.element[0],b,{item:this.currentItem}):a(j.options.items,j.element),j]),this.containers.push(j))}}for(var g=e.length-1;g>=0;g--){var k=e[g][1],l=e[g][0];for(var i=0,m=l.length;i=0;c--){var d=this.items[c];if(d.instance!=this.currentContainer&&this.currentContainer&&d.item[0]!=this.currentItem[0])continue;var e=this.options.toleranceElement?a(this.options.toleranceElement,d.item):d.item;b||(d.width=e.outerWidth(),d.height=e.outerHeight());var f=e.offset();d.left=f.left,d.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var c=this.containers.length-1;c>=0;c--){var f=this.containers[c].element.offset();this.containers[c].containerCache.left=f.left,this.containers[c].containerCache.top=f.top,this.containers[c].containerCache.width=this.containers[c].element.outerWidth(),this.containers[c].containerCache.height=this.containers[c].element.outerHeight()}return this},_createPlaceholder:function(b){var c=b||this,d=c.options;if(!d.placeholder||d.placeholder.constructor==String){var e=d.placeholder;d.placeholder={element:function(){var b=a(document.createElement(c.currentItem[0].nodeName)).addClass(e||c.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return e||(b.style.visibility="hidden"),b},update:function(a,b){if(e&&!d.forcePlaceholderSize)return;b.height()||b.height(c.currentItem.innerHeight()-parseInt(c.currentItem.css("paddingTop")||0,10)-parseInt(c.currentItem.css("paddingBottom")||0,10)),b.width()||b.width(c.currentItem.innerWidth()-parseInt(c.currentItem.css("paddingLeft")||0,10)-parseInt(c.currentItem.css("paddingRight")||0,10))}}}c.placeholder=a(d.placeholder.element.call(c.element,c.currentItem)),c.currentItem.after(c.placeholder),d.placeholder.update(c,c.placeholder)},_contactContainers:function(b){var c=null,d=null;for(var e=this.containers.length-1;e>=0;e--){if(a.ui.contains(this.currentItem[0],this.containers[e].element[0]))continue;if(this._intersectsWith(this.containers[e].containerCache)){if(c&&a.ui.contains(this.containers[e].element[0],c.element[0]))continue;c=this.containers[e],d=e}else this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",b,this._uiHash(this)),this.containers[e].containerCache.over=0)}if(!c)return;if(this.containers.length===1)this.containers[d]._trigger("over",b,this._uiHash(this)),this.containers[d].containerCache.over=1;else if(this.currentContainer!=this.containers[d]){var f=1e4,g=null,h=this.positionAbs[this.containers[d].floating?"left":"top"];for(var i=this.items.length-1;i>=0;i--){if(!a.ui.contains(this.containers[d].element[0],this.items[i].item[0]))continue;var j=this.containers[d].floating?this.items[i].item.offset().left:this.items[i].item.offset().top;Math.abs(j-h)0?"down":"up")}if(!g&&!this.options.dropOnEmpty)return;this.currentContainer=this.containers[d],g?this._rearrange(b,g,null,!0):this._rearrange(b,null,this.containers[d].element,!0),this._trigger("change",b,this._uiHash()),this.containers[d]._trigger("change",b,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[d]._trigger("over",b,this._uiHash(this)),this.containers[d].containerCache.over=1}},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b,this.currentItem])):c.helper=="clone"?this.currentItem.clone():this.currentItem;return d.parents("body").length||a(c.appendTo!="parent"?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0]),d[0]==this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(d[0].style.width==""||c.forceHelperSize)&&d.width(this.currentItem.width()),(d[0].style.height==""||c.forceHelperSize)&&d.height(this.currentItem.height()),d},_adjustOffsetFromHelper:function(b){typeof b=="string"&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;b.containment=="parent"&&(b.containment=this.helper[0].parentNode);if(b.containment=="document"||b.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)){var c=a(b.containment)[0],d=a(b.containment).offset(),e=a(c).css("overflow")!="hidden";this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(e?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(e?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(b,c){c||(c=this.position);var d=b=="absolute"?1:-1,e=this.options,f=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:f.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*d)}},_generatePosition:function(b){var c=this.options,d=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName);this.cssPosition=="relative"&&(this.scrollParent[0]==document||this.scrollParent[0]==this.offsetParent[0])&&(this.offset.relative=this._getRelativeOffset());var f=b.pageX,g=b.pageY;if(this.originalPosition){this.containment&&(b.pageX-this.offset.click.leftthis.containment[2]&&(f=this.containment[2]+this.offset.click.left),b.pageY-this.offset.click.top>this.containment[3]&&(g=this.containment[3]+this.offset.click.top));if(c.grid){var h=this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1];g=this.containment?h-this.offset.click.topthis.containment[3]?h-this.offset.click.topthis.containment[2]?i-this.offset.click.left=0;f--)a.ui.contains(this.containers[f].element[0],this.currentItem[0])&&!c&&(d.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(this))}}.call(this,this.containers[f])),d.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.containers[f])))}for(var f=this.containers.length-1;f>=0;f--)c||d.push(function(a){return function(b){a._trigger("deactivate",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over&&(d.push(function(a){return function(b){a._trigger("out",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over=0);this._storedCursor&&a("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex),this.dragging=!1;if(this.cancelHelperRemoval){if(!c){this._trigger("beforeStop",b,this._uiHash());for(var f=0;f li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:!1,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var b=this,c=b.options;b.running=0,b.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix"),b.headers=b.element.find(c.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){if(c.disabled)return;a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){if(c.disabled)return;a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){if(c.disabled)return;a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){if(c.disabled)return;a(this).removeClass("ui-state-focus")}),b.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");if(c.navigation){var d=b.element.find("a").filter(c.navigationFilter).eq(0);if(d.length){var e=d.closest(".ui-accordion-header");e.length?b.active=e:b.active=d.closest(".ui-accordion-content").prev()}}b.active=b._findActive(b.active||c.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top"),b.active.next().addClass("ui-accordion-content-active"),b._createIcons(),b.resize(),b.element.attr("role","tablist"),b.headers.attr("role","tab").bind("keydown.accordion",function(a){return b._keydown(a)}).next().attr("role","tabpanel"),b.headers.not(b.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide(),b.active.length?b.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):b.headers.eq(0).attr("tabIndex",0),a.browser.safari||b.headers.find("a").attr("tabIndex",-1),c.event&&b.headers.bind(c.event.split(" ").join(".accordion ")+".accordion",function(a){b._clickHandler.call(b,a,this),a.preventDefault()})},_createIcons:function(){var b=this.options;b.icons&&(a("").addClass("ui-icon "+b.icons.header).prependTo(this.headers),this.active.children(".ui-icon").toggleClass(b.icons.header).toggleClass(b.icons.headerSelected),this.element.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.children(".ui-icon").remove(),this.element.removeClass("ui-accordion-icons")},destroy:function(){var b=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex"),this.headers.find("a").removeAttr("tabIndex"),this._destroyIcons();var c=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");return(b.autoHeight||b.fillHeight)&&c.css("height",""),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments),b=="active"&&this.activate(c),b=="icons"&&(this._destroyIcons(),c&&this._createIcons()),b=="disabled"&&this.headers.add(this.headers.next())[c?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(b){if(this.options.disabled||b.altKey||b.ctrlKey)return;var c=a.ui.keyCode,d=this.headers.length,e=this.headers.index(b.target),f=!1;switch(b.keyCode){case c.RIGHT:case c.DOWN:f=this.headers[(e+1)%d];break;case c.LEFT:case c.UP:f=this.headers[(e-1+d)%d];break;case c.SPACE:case c.ENTER:this._clickHandler({target:b.target},b.target),b.preventDefault()}return f?(a(b.target).attr("tabIndex",-1),a(f).attr("tabIndex",0),f.focus(),!1):!0},resize:function(){var b=this.options,c;if(b.fillSpace){if(a.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}c=this.element.parent().height(),a.browser.msie&&this.element.parent().css("overflow",d),this.headers.each(function(){c-=a(this).outerHeight(!0)}),this.headers.next().each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")}else b.autoHeight&&(c=0,this.headers.next().each(function(){c=Math.max(c,a(this).height("").height())}).height(c));return this},activate:function(a){this.options.active=a;var b=this._findActive(a)[0];return this._clickHandler({target:b},b),this},_findActive:function(b){return b?typeof b=="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===!1?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(b,c){var d=this.options;if(d.disabled)return;if(!b.target){if(!d.collapsible)return;this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header),this.active.next().addClass("ui-accordion-content-active");var e=this.active.next(),f={options:d,newHeader:a([]),oldHeader:d.active,newContent:a([]),oldContent:e},g=this.active=a([]);this._toggle(g,e,f);return}var h=a(b.currentTarget||c),i=h[0]===this.active[0];d.active=d.collapsible&&i?!1:this.headers.index(h);if(this.running||!d.collapsible&&i)return;var j=this.active,g=h.next(),e=this.active.next(),f={options:d,newHeader:i&&d.collapsible?a([]):h,oldHeader:this.active,newContent:i&&d.collapsible?a([]):g,oldContent:e},k=this.headers.index(this.active[0])>this.headers.index(h[0]);this.active=i?a([]):h,this._toggle(g,e,f,i,k),j.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header),i||(h.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected),h.next().addClass("ui-accordion-content-active"));return},_toggle:function(b,c,d,e,f){var g=this,h=g.options;g.toShow=b,g.toHide=c,g.data=d;var i=function(){if(!g)return;return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data),g.running=c.size()===0?b.size():c.size();if(h.animated){var j={};h.collapsible&&e?j={toShow:a([]),toHide:c,complete:i,down:f,autoHeight:h.autoHeight||h.fillSpace}:j={toShow:b,toHide:c,complete:i,down:f,autoHeight:h.autoHeight||h.fillSpace},h.proxied||(h.proxied=h.animated),h.proxiedDuration||(h.proxiedDuration=h.duration),h.animated=a.isFunction(h.proxied)?h.proxied(j):h.proxied,h.duration=a.isFunction(h.proxiedDuration)?h.proxiedDuration(j):h.proxiedDuration;var k=a.ui.accordion.animations,l=h.duration,m=h.animated;m&&!k[m]&&!a.easing[m]&&(m="slide"),k[m]||(k[m]=function(a){this.slide(a,{easing:m,duration:l||700})}),k[m](j)}else h.collapsible&&e?b.toggle():(c.hide(),b.show()),i(!0);c.prev().attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).blur(),b.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(this.running)return;this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""}),this.toHide.removeClass("ui-accordion-content-active"),this.toHide.length&&(this.toHide.parent()[0].className=this.toHide.parent()[0].className),this._trigger("change",null,this.data)}}),a.extend(a.ui.accordion,{version:"1.8.23",animations:{slide:function(b,c){b=a.extend({easing:"swing",duration:300},b,c);if(!b.toHide.size()){b.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},b);return}if(!b.toShow.size()){b.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},b);return}var d=b.toShow.css("overflow"),e=0,f={},g={},h=["height","paddingTop","paddingBottom"],i,j=b.toShow;i=j[0].style.width,j.width(j.parent().width()-parseFloat(j.css("paddingLeft"))-parseFloat(j.css("paddingRight"))-(parseFloat(j.css("borderLeftWidth"))||0)-(parseFloat(j.css("borderRightWidth"))||0)),a.each(h,function(c,d){g[d]="hide";var e=(""+a.css(b.toShow[0],d)).match(/^([\d+-.]+)(.*)$/);f[d]={value:e[1],unit:e[2]||"px"}}),b.toShow.css({height:0,overflow:"hidden"}).show(),b.toHide.filter(":hidden").each(b.complete).end().filter(":visible").animate(g,{step:function(a,c){c.prop=="height"&&(e=c.end-c.start===0?0:(c.now-c.start)/(c.end-c.start)),b.toShow[0].style[c.prop]=e*f[c.prop].value+f[c.prop].unit},duration:b.duration,easing:b.easing,complete:function(){b.autoHeight||b.toShow.css("height",""),b.toShow.css({width:i,overflow:d}),b.complete()}})},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1e3:200})}}})})(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15 +* https://github.com/jquery/jquery-ui +* Includes: jquery.ui.autocomplete.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +(function(a,b){var c=0;a.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var b=this,c=this.element[0].ownerDocument,d;this.isMultiLine=this.element.is("textarea"),this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(b.options.disabled||b.element.propAttr("readOnly"))return;d=!1;var e=a.ui.keyCode;switch(c.keyCode){case e.PAGE_UP:b._move("previousPage",c);break;case e.PAGE_DOWN:b._move("nextPage",c);break;case e.UP:b._keyEvent("previous",c);break;case e.DOWN:b._keyEvent("next",c);break;case e.ENTER:case e.NUMPAD_ENTER:b.menu.active&&(d=!0,c.preventDefault());case e.TAB:if(!b.menu.active)return;b.menu.select(c);break;case e.ESCAPE:b.element.val(b.term),b.close(c);break;default:clearTimeout(b.searching),b.searching=setTimeout(function(){b.term!=b.element.val()&&(b.selectedItem=null,b.search(null,c))},b.options.delay)}}).bind("keypress.autocomplete",function(a){d&&(d=!1,a.preventDefault())}).bind("focus.autocomplete",function(){if(b.options.disabled)return;b.selectedItem=null,b.previous=b.element.val()}).bind("blur.autocomplete",function(a){if(b.options.disabled)return;clearTimeout(b.searching),b.closing=setTimeout(function(){b.close(a),b._change(a)},150)}),this._initSource(),this.menu=a("
      ").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||"body",c)[0]).mousedown(function(c){var d=b.menu.element[0];a(c.target).closest(".ui-menu-item").length||setTimeout(function(){a(document).one("mousedown",function(c){c.target!==b.element[0]&&c.target!==d&&!a.ui.contains(d,c.target)&&b.close()})},1),setTimeout(function(){clearTimeout(b.closing)},13)}).menu({focus:function(a,c){var d=c.item.data("item.autocomplete");!1!==b._trigger("focus",a,{item:d})&&/^key/.test(a.originalEvent.type)&&b.element.val(d.value)},selected:function(a,d){var e=d.item.data("item.autocomplete"),f=b.previous;b.element[0]!==c.activeElement&&(b.element.focus(),b.previous=f,setTimeout(function(){b.previous=f,b.selectedItem=e},1)),!1!==b._trigger("select",a,{item:e})&&b.element.val(e.value),b.term=b.element.val(),b.close(a),b.selectedItem=e},blur:function(a,c){b.menu.element.is(":visible")&&b.element.val()!==b.term&&b.element.val(b.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"),a.fn.bgiframe&&this.menu.element.bgiframe(),b.beforeunloadHandler=function(){b.element.removeAttr("autocomplete")},a(window).bind("beforeunload",b.beforeunloadHandler)},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"),this.menu.element.remove(),a(window).unbind("beforeunload",this.beforeunloadHandler),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments),b==="source"&&this._initSource(),b==="appendTo"&&this.menu.element.appendTo(a(c||"body",this.element[0].ownerDocument)[0]),b==="disabled"&&c&&this.xhr&&this.xhr.abort()},_initSource:function(){var b=this,c,d;a.isArray(this.options.source)?(c=this.options.source,this.source=function(b,d){d(a.ui.autocomplete.filter(c,b.term))}):typeof this.options.source=="string"?(d=this.options.source,this.source=function(c,e){b.xhr&&b.xhr.abort(),b.xhr=a.ajax({url:d,data:c,dataType:"json",success:function(a,b){e(a)},error:function(){e([])}})}):this.source=this.options.source},search:function(a,b){a=a!=null?a:this.element.val(),this.term=this.element.val();if(a.length").data("item.autocomplete",c).append(a("
      ").text(c.label)).appendTo(b)},_move:function(a,b){if(!this.menu.element.is(":visible")){this.search(null,b);return}if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term),this.menu.deactivate();return}this.menu[a](b)},widget:function(){return this.menu.element},_keyEvent:function(a,b){if(!this.isMultiLine||this.menu.element.is(":visible"))this._move(a,b),b.preventDefault()}}),a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(b,c){var d=new RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(b,function(a){return d.test(a.label||a.value||a)})}})})(jQuery),function(a){a.widget("ui.menu",{_create:function(){var b=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(!a(c.target).closest(".ui-menu-item a").length)return;c.preventDefault(),b.select(c)}),this.refresh()},refresh:function(){var b=this,c=this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem");c.children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(c){b.activate(c,a(this).parent())}).mouseleave(function(){b.deactivate()})},activate:function(a,b){this.deactivate();if(this.hasScroll()){var c=b.offset().top-this.element.offset().top,d=this.element.scrollTop(),e=this.element.height();c<0?this.element.scrollTop(d+c):c>=e&&this.element.scrollTop(d+c-e+b.height())}this.active=b.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end(),this._trigger("focus",a,{item:b})},deactivate:function(){if(!this.active)return;this.active.children("a").removeClass("ui-state-hover").removeAttr("id"),this._trigger("blur"),this.active=null},next:function(a){this.move("next",".ui-menu-item:first",a)},previous:function(a){this.move("prev",".ui-menu-item:last",a)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(a,b,c){if(!this.active){this.activate(c,this.element.children(b));return}var d=this.active[a+"All"](".ui-menu-item").eq(0);d.length?this.activate(c,d):this.activate(c,this.element.children(b))},nextPage:function(b){if(this.hasScroll()){if(!this.active||this.last()){this.activate(b,this.element.children(".ui-menu-item:first"));return}var c=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c-d+a(this).height();return b<10&&b>-10});e.length||(e=this.element.children(".ui-menu-item:last")),this.activate(b,e)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(b){if(this.hasScroll()){if(!this.active||this.first()){this.activate(b,this.element.children(".ui-menu-item:last"));return}var c=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c+d-a(this).height();return b<10&&b>-10});e.length||(e=this.element.children(".ui-menu-item:first")),this.activate(b,e)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()",this.element[0].ownerDocument).addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,e=d.primary&&d.secondary,f=[];d.primary||d.secondary?(this.options.text&&f.push("ui-button-text-icon"+(e?"s":d.primary?"-primary":"-secondary")),d.primary&&b.prepend(""),d.secondary&&b.append(""),this.options.text||(f.push(e?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||b.attr("title",c))):f.push("ui-button-text-only"),b.addClass(f.join(" "))}}),a.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(b,c){b==="disabled"&&this.buttons.button("option",b,c),a.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var b=this.element.css("direction")==="rtl";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(b?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(b?"ui-corner-left":"ui-corner-right").end().end()},destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy"),a.Widget.prototype.destroy.call(this)}})})(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15 +* https://github.com/jquery/jquery-ui +* Includes: jquery.ui.dialog.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +(function(a,b){var c="ui-dialog ui-widget ui-widget-content ui-corner-all ",d={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},e={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};a.widget("ui.dialog",{options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",collision:"fit",using:function(b){var c=a(this).css(b).offset().top;c<0&&a(this).css("top",b.top-c)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1e3},_create:function(){this.originalTitle=this.element.attr("title"),typeof this.originalTitle!="string"&&(this.originalTitle=""),this.options.title=this.options.title||this.originalTitle;var b=this,d=b.options,e=d.title||" ",f=a.ui.dialog.getTitleId(b.element),g=(b.uiDialog=a("
      ")).appendTo(document.body).hide().addClass(c+d.dialogClass).css({zIndex:d.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(c){d.closeOnEscape&&!c.isDefaultPrevented()&&c.keyCode&&c.keyCode===a.ui.keyCode.ESCAPE&&(b.close(c),c.preventDefault())}).attr({role:"dialog","aria-labelledby":f}).mousedown(function(a){b.moveToTop(!1,a)}),h=b.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g),i=(b.uiDialogTitlebar=a("
      ")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),j=a('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){j.addClass("ui-state-hover")},function(){j.removeClass("ui-state-hover")}).focus(function(){j.addClass("ui-state-focus")}).blur(function(){j.removeClass("ui-state-focus")}).click(function(a){return b.close(a),!1}).appendTo(i),k=(b.uiDialogTitlebarCloseText=a("")).addClass("ui-icon ui-icon-closethick").text(d.closeText).appendTo(j),l=a("").addClass("ui-dialog-title").attr("id",f).html(e).prependTo(i);a.isFunction(d.beforeclose)&&!a.isFunction(d.beforeClose)&&(d.beforeClose=d.beforeclose),i.find("*").add(i).disableSelection(),d.draggable&&a.fn.draggable&&b._makeDraggable(),d.resizable&&a.fn.resizable&&b._makeResizable(),b._createButtons(d.buttons),b._isOpen=!1,a.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;return a.overlay&&a.overlay.destroy(),a.uiDialog.hide(),a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),a.uiDialog.remove(),a.originalTitle&&a.element.attr("title",a.originalTitle),a},widget:function(){return this.uiDialog},close:function(b){var c=this,d,e;if(!1===c._trigger("beforeClose",b))return;return c.overlay&&c.overlay.destroy(),c.uiDialog.unbind("keypress.ui-dialog"),c._isOpen=!1,c.options.hide?c.uiDialog.hide(c.options.hide,function(){c._trigger("close",b)}):(c.uiDialog.hide(),c._trigger("close",b)),a.ui.dialog.overlay.resize(),c.options.modal&&(d=0,a(".ui-dialog").each(function(){this!==c.uiDialog[0]&&(e=a(this).css("z-index"),isNaN(e)||(d=Math.max(d,e)))}),a.ui.dialog.maxZ=d),c},isOpen:function(){return this._isOpen},moveToTop:function(b,c){var d=this,e=d.options,f;return e.modal&&!b||!e.stack&&!e.modal?d._trigger("focus",c):(e.zIndex>a.ui.dialog.maxZ&&(a.ui.dialog.maxZ=e.zIndex),d.overlay&&(a.ui.dialog.maxZ+=1,d.overlay.$el.css("z-index",a.ui.dialog.overlay.maxZ=a.ui.dialog.maxZ)),f={scrollTop:d.element.scrollTop(),scrollLeft:d.element.scrollLeft()},a.ui.dialog.maxZ+=1,d.uiDialog.css("z-index",a.ui.dialog.maxZ),d.element.attr(f),d._trigger("focus",c),d)},open:function(){if(this._isOpen)return;var b=this,c=b.options,d=b.uiDialog;return b.overlay=c.modal?new a.ui.dialog.overlay(b):null,b._size(),b._position(c.position),d.show(c.show),b.moveToTop(!0),c.modal&&d.bind("keydown.ui-dialog",function(b){if(b.keyCode!==a.ui.keyCode.TAB)return;var c=a(":tabbable",this),d=c.filter(":first"),e=c.filter(":last");if(b.target===e[0]&&!b.shiftKey)return d.focus(1),!1;if(b.target===d[0]&&b.shiftKey)return e.focus(1),!1}),a(b.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus(),b._isOpen=!0,b._trigger("open"),b},_createButtons:function(b){var c=this,d=!1,e=a("
      ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),f=a("
      ").addClass("ui-dialog-buttonset").appendTo(e);c.uiDialog.find(".ui-dialog-buttonpane").remove(),typeof b=="object"&&b!==null&&a.each(b,function(){return!(d=!0)}),d&&(a.each(b,function(b,d){d=a.isFunction(d)?{click:d,text:b}:d;var e=a('').click(function(){d.click.apply(c.element[0],arguments)}).appendTo(f);a.each(d,function(a,b){if(a==="click")return;a in e?e[a](b):e.attr(a,b)}),a.fn.button&&e.button()}),e.appendTo(c.uiDialog))},_makeDraggable:function(){function f(a){return{position:a.position,offset:a.offset}}var b=this,c=b.options,d=a(document),e;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(d,g){e=c.height==="auto"?"auto":a(this).height(),a(this).height(a(this).height()).addClass("ui-dialog-dragging"),b._trigger("dragStart",d,f(g))},drag:function(a,c){b._trigger("drag",a,f(c))},stop:function(g,h){c.position=[h.position.left-d.scrollLeft(),h.position.top-d.scrollTop()],a(this).removeClass("ui-dialog-dragging").height(e),b._trigger("dragStop",g,f(h)),a.ui.dialog.overlay.resize()}})},_makeResizable:function(c){function h(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}c=c===b?this.options.resizable:c;var d=this,e=d.options,f=d.uiDialog.css("position"),g=typeof c=="string"?c:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:g,start:function(b,c){a(this).addClass("ui-dialog-resizing"),d._trigger("resizeStart",b,h(c))},resize:function(a,b){d._trigger("resize",a,h(b))},stop:function(b,c){a(this).removeClass("ui-dialog-resizing"),e.height=a(this).height(),e.width=a(this).width(),d._trigger("resizeStop",b,h(c)),a.ui.dialog.overlay.resize()}}).css("position",f).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(b){var c=[],d=[0,0],e;if(b){if(typeof b=="string"||typeof b=="object"&&"0"in b)c=b.split?b.split(" "):[b[0],b[1]],c.length===1&&(c[1]=c[0]),a.each(["left","top"],function(a,b){+c[a]===c[a]&&(d[a]=c[a],c[a]=b)}),b={my:c.join(" "),at:c.join(" "),offset:d.join(" ")};b=a.extend({},a.ui.dialog.prototype.options.position,b)}else b=a.ui.dialog.prototype.options.position;e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.css({top:0,left:0}).position(a.extend({of:window},b)),e||this.uiDialog.hide()},_setOptions:function(b){var c=this,f={},g=!1;a.each(b,function(a,b){c._setOption(a,b),a in d&&(g=!0),a in e&&(f[a]=b)}),g&&this._size(),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",f)},_setOption:function(b,d){var e=this,f=e.uiDialog;switch(b){case"beforeclose":b="beforeClose";break;case"buttons":e._createButtons(d);break;case"closeText":e.uiDialogTitlebarCloseText.text(""+d);break;case"dialogClass":f.removeClass(e.options.dialogClass).addClass(c+d);break;case"disabled":d?f.addClass("ui-dialog-disabled"):f.removeClass("ui-dialog-disabled");break;case"draggable":var g=f.is(":data(draggable)");g&&!d&&f.draggable("destroy"),!g&&d&&e._makeDraggable();break;case"position":e._position(d);break;case"resizable":var h=f.is(":data(resizable)");h&&!d&&f.resizable("destroy"),h&&typeof d=="string"&&f.resizable("option","handles",d),!h&&d!==!1&&e._makeResizable(d);break;case"title":a(".ui-dialog-title",e.uiDialogTitlebar).html(""+(d||" "))}a.Widget.prototype._setOption.apply(e,arguments)},_size:function(){var b=this.options,c,d,e=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0}),b.minWidth>b.width&&(b.width=b.minWidth),c=this.uiDialog.css({height:"auto",width:b.width}).height(),d=Math.max(0,b.minHeight-c);if(b.height==="auto")if(a.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();var f=this.element.css("height","auto").height();e||this.uiDialog.hide(),this.element.height(Math.max(f,d))}else this.element.height(Math.max(b.height-c,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}}),a.extend(a.ui.dialog,{version:"1.8.23",uuid:0,maxZ:0,getTitleId:function(a){var b=a.attr("id");return b||(this.uuid+=1,b=this.uuid),"ui-dialog-title-"+b},overlay:function(b){this.$el=a.ui.dialog.overlay.create(b)}}),a.extend(a.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:a.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),create:function(b){this.instances.length===0&&(setTimeout(function(){a.ui.dialog.overlay.instances.length&&a(document).bind(a.ui.dialog.overlay.events,function(b){if(a(b.target).zIndex()").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});return a.fn.bgiframe&&c.bgiframe(),this.instances.push(c),c},destroy:function(b){var c=a.inArray(b,this.instances);c!=-1&&this.oldInstances.push(this.instances.splice(c,1)[0]),this.instances.length===0&&a([document,window]).unbind(".dialog-overlay"),b.remove();var d=0;a.each(this.instances,function(){d=Math.max(d,this.css("z-index"))}),this.maxZ=d},height:function(){var b,c;return a.browser.msie&&a.browser.version<7?(b=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),c=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),b").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(d.range==="min"||d.range==="max"?" ui-slider-range-"+d.range:"")));for(var i=e.length;ic&&(f=c,g=a(this),i=b)}),c.range===!0&&this.values(1)===c.min&&(i+=1,g=a(this.handles[i])),j=this._start(b,i),j===!1?!1:(this._mouseSliding=!0,h._handleIndex=i,g.addClass("ui-state-active").focus(),k=g.offset(),l=!a(b.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:b.pageX-k.left-g.width()/2,top:b.pageY-k.top-g.height()/2-(parseInt(g.css("borderTopWidth"),10)||0)-(parseInt(g.css("borderBottomWidth"),10)||0)+(parseInt(g.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,i,e),this._animateOff=!0,!0))},_mouseStart:function(a){return!0},_mouseDrag:function(a){var b={x:a.pageX,y:a.pageY},c=this._normValueFromMouse(b);return this._slide(a,this._handleIndex,c),!1},_mouseStop:function(a){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b,c,d,e,f;return this.orientation==="horizontal"?(b=this.elementSize.width,c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),d=c/b,d>1&&(d=1),d<0&&(d=0),this.orientation==="vertical"&&(d=1-d),e=this._valueMax()-this._valueMin(),f=this._valueMin()+d*e,this._trimAlignValue(f)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};return this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("start",a,c)},_slide:function(a,b,c){var d,e,f;this.options.values&&this.options.values.length?(d=this.values(b?0:1),this.options.values.length===2&&this.options.range===!0&&(b===0&&c>d||b===1&&c1){this.options.values[b]=this._trimAlignValue(c),this._refreshValue(),this._change(null,b);return}if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(b):this.value();d=this.options.values,e=arguments[0];for(f=0;f=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b,d=a-c;return Math.abs(c)*2>=b&&(d+=c>0?b:-b),parseFloat(d.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var b=this.options.range,c=this.options,d=this,e=this._animateOff?!1:c.animate,f,g={},h,i,j,k;this.options.values&&this.options.values.length?this.handles.each(function(b,i){f=(d.values(b)-d._valueMin())/(d._valueMax()-d._valueMin())*100,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",a(this).stop(1,1)[e?"animate":"css"](g,c.animate),d.options.range===!0&&(d.orientation==="horizontal"?(b===0&&d.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({width:f-h+"%"},{queue:!1,duration:c.animate})):(b===0&&d.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({height:f-h+"%"},{queue:!1,duration:c.animate}))),h=f}):(i=this.value(),j=this._valueMin(),k=this._valueMax(),f=k!==j?(i-j)/(k-j)*100:0,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",this.handle.stop(1,1)[e?"animate":"css"](g,c.animate),b==="min"&&this.orientation==="horizontal"&&this.range.stop(1,1)[e?"animate":"css"]({width:f+"%"},c.animate),b==="max"&&this.orientation==="horizontal"&&this.range[e?"animate":"css"]({width:100-f+"%"},{queue:!1,duration:c.animate}),b==="min"&&this.orientation==="vertical"&&this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},c.animate),b==="max"&&this.orientation==="vertical"&&this.range[e?"animate":"css"]({height:100-f+"%"},{queue:!1,duration:c.animate}))}}),a.extend(a.ui.slider,{version:"1.8.23"})})(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15 +* https://github.com/jquery/jquery-ui +* Includes: jquery.ui.tabs.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +(function(a,b){function e(){return++c}function f(){return++d}var c=0,d=0;a.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:!1,cookie:null,collapsible:!1,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"
      ",remove:null,select:null,show:null,spinner:"Loading…",tabTemplate:"
    • #{label}
    • "},_create:function(){this._tabify(!0)},_setOption:function(a,b){if(a=="selected"){if(this.options.collapsible&&b==this.options.selected)return;this.select(b)}else this.options[a]=b,this._tabify()},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+e()},_sanitizeSelector:function(a){return a.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+f());return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(a,b){return{tab:a,panel:b,index:this.anchors.index(a)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(c){function m(b,c){b.css("display",""),!a.support.opacity&&c.opacity&&b[0].style.removeAttribute("filter")}var d=this,e=this.options,f=/^#.+/;this.list=this.element.find("ol,ul").eq(0),this.lis=a(" > li:has(a[href])",this.list),this.anchors=this.lis.map(function(){return a("a",this)[0]}),this.panels=a([]),this.anchors.each(function(b,c){var g=a(c).attr("href"),h=g.split("#")[0],i;h&&(h===location.toString().split("#")[0]||(i=a("base")[0])&&h===i.href)&&(g=c.hash,c.href=g);if(f.test(g))d.panels=d.panels.add(d.element.find(d._sanitizeSelector(g)));else if(g&&g!=="#"){a.data(c,"href.tabs",g),a.data(c,"load.tabs",g.replace(/#.*$/,""));var j=d._tabId(c);c.href="#"+j;var k=d.element.find("#"+j);k.length||(k=a(e.panelTemplate).attr("id",j).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(d.panels[b-1]||d.list),k.data("destroy.tabs",!0)),d.panels=d.panels.add(k)}else e.disabled.push(b)}),c?(this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"),this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.lis.addClass("ui-state-default ui-corner-top"),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom"),e.selected===b?(location.hash&&this.anchors.each(function(a,b){if(b.hash==location.hash)return e.selected=a,!1}),typeof e.selected!="number"&&e.cookie&&(e.selected=parseInt(d._cookie(),10)),typeof e.selected!="number"&&this.lis.filter(".ui-tabs-selected").length&&(e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))),e.selected=e.selected||(this.lis.length?0:-1)):e.selected===null&&(e.selected=-1),e.selected=e.selected>=0&&this.anchors[e.selected]||e.selected<0?e.selected:0,e.disabled=a.unique(e.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(a,b){return d.lis.index(a)}))).sort(),a.inArray(e.selected,e.disabled)!=-1&&e.disabled.splice(a.inArray(e.selected,e.disabled),1),this.panels.addClass("ui-tabs-hide"),this.lis.removeClass("ui-tabs-selected ui-state-active"),e.selected>=0&&this.anchors.length&&(d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash)).removeClass("ui-tabs-hide"),this.lis.eq(e.selected).addClass("ui-tabs-selected ui-state-active"),d.element.queue("tabs",function(){d._trigger("show",null,d._ui(d.anchors[e.selected],d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash))[0]))}),this.load(e.selected)),a(window).bind("unload",function(){d.lis.add(d.anchors).unbind(".tabs"),d.lis=d.anchors=d.panels=null})):e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")),this.element[e.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible"),e.cookie&&this._cookie(e.selected,e.cookie);for(var g=0,h;h=this.lis[g];g++)a(h)[a.inArray(g,e.disabled)!=-1&&!a(h).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");e.cache===!1&&this.anchors.removeData("cache.tabs"),this.lis.add(this.anchors).unbind(".tabs");if(e.event!=="mouseover"){var i=function(a,b){b.is(":not(.ui-state-disabled)")&&b.addClass("ui-state-"+a)},j=function(a,b){b.removeClass("ui-state-"+a)};this.lis.bind("mouseover.tabs",function(){i("hover",a(this))}),this.lis.bind("mouseout.tabs",function(){j("hover",a(this))}),this.anchors.bind("focus.tabs",function(){i("focus",a(this).closest("li"))}),this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var k,l;e.fx&&(a.isArray(e.fx)?(k=e.fx[0],l=e.fx[1]):k=l=e.fx);var n=l?function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.hide().removeClass("ui-tabs-hide").animate(l,l.duration||"normal",function(){m(c,l),d._trigger("show",null,d._ui(b,c[0]))})}:function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.removeClass("ui-tabs-hide"),d._trigger("show",null,d._ui(b,c[0]))},o=k?function(a,b){b.animate(k,k.duration||"normal",function(){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),m(b,k),d.element.dequeue("tabs")})}:function(a,b,c){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),d.element.dequeue("tabs")};this.anchors.bind(e.event+".tabs",function(){var b=this,c=a(b).closest("li"),f=d.panels.filter(":not(.ui-tabs-hide)"),g=d.element.find(d._sanitizeSelector(b.hash));if(c.hasClass("ui-tabs-selected")&&!e.collapsible||c.hasClass("ui-state-disabled")||c.hasClass("ui-state-processing")||d.panels.filter(":animated").length||d._trigger("select",null,d._ui(this,g[0]))===!1)return this.blur(),!1;e.selected=d.anchors.index(this),d.abort();if(e.collapsible){if(c.hasClass("ui-tabs-selected"))return e.selected=-1,e.cookie&&d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){o(b,f)}).dequeue("tabs"),this.blur(),!1;if(!f.length)return e.cookie&&d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this)),this.blur(),!1}e.cookie&&d._cookie(e.selected,e.cookie);if(g.length)f.length&&d.element.queue("tabs",function(){o(b,f)}),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this));else throw"jQuery UI Tabs: Mismatching fragment identifier.";a.browser.msie&&this.blur()}),this.anchors.bind("click.tabs",function(){return!1})},_getIndex:function(a){return typeof a=="string"&&(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']"))),a},destroy:function(){var b=this.options;return this.abort(),this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs"),this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.anchors.each(function(){var b=a.data(this,"href.tabs");b&&(this.href=b);var c=a(this).unbind(".tabs");a.each(["href","load","cache"],function(a,b){c.removeData(b+".tabs")})}),this.lis.unbind(".tabs").add(this.panels).each(function(){a.data(this,"destroy.tabs")?a(this).remove():a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}),b.cookie&&this._cookie(null,b.cookie),this},add:function(c,d,e){e===b&&(e=this.anchors.length);var f=this,g=this.options,h=a(g.tabTemplate.replace(/#\{href\}/g,c).replace(/#\{label\}/g,d)),i=c.indexOf("#")?this._tabId(a("a",h)[0]):c.replace("#","");h.addClass("ui-state-default ui-corner-top").data("destroy.tabs",!0);var j=f.element.find("#"+i);return j.length||(j=a(g.panelTemplate).attr("id",i).data("destroy.tabs",!0)),j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"),e>=this.lis.length?(h.appendTo(this.list),j.appendTo(this.list[0].parentNode)):(h.insertBefore(this.lis[e]),j.insertBefore(this.panels[e])),g.disabled=a.map(g.disabled,function(a,b){return a>=e?++a:a}),this._tabify(),this.anchors.length==1&&(g.selected=0,h.addClass("ui-tabs-selected ui-state-active"),j.removeClass("ui-tabs-hide"),this.element.queue("tabs",function(){f._trigger("show",null,f._ui(f.anchors[0],f.panels[0]))}),this.load(0)),this._trigger("add",null,this._ui(this.anchors[e],this.panels[e])),this},remove:function(b){b=this._getIndex(b);var c=this.options,d=this.lis.eq(b).remove(),e=this.panels.eq(b).remove();return d.hasClass("ui-tabs-selected")&&this.anchors.length>1&&this.select(b+(b+1=b?--a:a}),this._tabify(),this._trigger("remove",null,this._ui(d.find("a")[0],e[0])),this},enable:function(b){b=this._getIndex(b);var c=this.options;if(a.inArray(b,c.disabled)==-1)return;return this.lis.eq(b).removeClass("ui-state-disabled"),c.disabled=a.grep(c.disabled,function(a,c){return a!=b}),this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b])),this},disable:function(a){a=this._getIndex(a);var b=this,c=this.options;return a!=c.selected&&(this.lis.eq(a).addClass("ui-state-disabled"),c.disabled.push(a),c.disabled.sort(),this._trigger("disable",null,this._ui(this.anchors[a],this.panels[a]))),this},select:function(a){a=this._getIndex(a);if(a==-1)if(this.options.collapsible&&this.options.selected!=-1)a=this.options.selected;else return this;return this.anchors.eq(a).trigger(this.options.event+".tabs"),this},load:function(b){b=this._getIndex(b);var c=this,d=this.options,e=this.anchors.eq(b)[0],f=a.data(e,"load.tabs");this.abort();if(!f||this.element.queue("tabs").length!==0&&a.data(e,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(b).addClass("ui-state-processing");if(d.spinner){var g=a("span",e);g.data("label.tabs",g.html()).html(d.spinner)}return this.xhr=a.ajax(a.extend({},d.ajaxOptions,{url:f,success:function(f,g){c.element.find(c._sanitizeSelector(e.hash)).html(f),c._cleanup(),d.cache&&a.data(e,"cache.tabs",!0),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.success(f,g)}catch(h){}},error:function(a,f,g){c._cleanup(),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.error(a,f,b,e)}catch(g){}}})),c.element.dequeue("tabs"),this},abort:function(){return this.element.queue([]),this.panels.stop(!1,!0),this.element.queue("tabs",this.element.queue("tabs").splice(-2,2)),this.xhr&&(this.xhr.abort(),delete this.xhr),this._cleanup(),this},url:function(a,b){return this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",b),this},length:function(){return this.anchors.length}}),a.extend(a.ui.tabs,{version:"1.8.23"}),a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(a,b){var c=this,d=this.options,e=c._rotate||(c._rotate=function(b){clearTimeout(c.rotation),c.rotation=setTimeout(function(){var a=d.selected;c.select(++a'))}function bindHover(a){var b="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return a.bind("mouseout",function(a){var c=$(a.target).closest(b);if(!c.length)return;c.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(c){var d=$(c.target).closest(b);if($.datepicker._isDisabledDatepicker(instActive.inline?a.parent()[0]:instActive.input[0])||!d.length)return;d.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),d.addClass("ui-state-hover"),d.hasClass("ui-datepicker-prev")&&d.addClass("ui-datepicker-prev-hover"),d.hasClass("ui-datepicker-next")&&d.addClass("ui-datepicker-next-hover")})}function extendRemove(a,b){$.extend(a,b);for(var c in b)if(b[c]==null||b[c]==undefined)a[c]=b[c];return a}function isArray(a){return a&&($.browser.safari&&typeof a=="object"&&a.length||a.constructor&&a.constructor.toString().match(/\Array\(\)/))}$.extend($.ui,{datepicker:{version:"1.8.23"}});var PROP_NAME="datepicker",dpuuid=(new Date).getTime(),instActive;$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){return extendRemove(this._defaults,a||{}),this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase(),inline=nodeName=="div"||nodeName=="span";target.id||(this.uuid+=1,target.id="dp"+this.uuid);var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{}),nodeName=="input"?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)},_newInst:function(a,b){var c=a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:c,input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:b?bindHover($('
      ')):this.dpDiv}},_connectDatepicker:function(a,b){var c=$(a);b.append=$([]),b.trigger=$([]);if(c.hasClass(this.markerClassName))return;this._attachments(c,b),c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),this._autoSize(b),$.data(a,PROP_NAME,b),b.settings.disabled&&this._disableDatepicker(a)},_attachments:function(a,b){var c=this._get(b,"appendText"),d=this._get(b,"isRTL");b.append&&b.append.remove(),c&&(b.append=$(''+c+""),a[d?"before":"after"](b.append)),a.unbind("focus",this._showDatepicker),b.trigger&&b.trigger.remove();var e=this._get(b,"showOn");(e=="focus"||e=="both")&&a.focus(this._showDatepicker);if(e=="button"||e=="both"){var f=this._get(b,"buttonText"),g=this._get(b,"buttonImage");b.trigger=$(this._get(b,"buttonImageOnly")?$("").addClass(this._triggerClass).attr({src:g,alt:f,title:f}):$('').addClass(this._triggerClass).html(g==""?f:$("").attr({src:g,alt:f,title:f}))),a[d?"before":"after"](b.trigger),b.trigger.click(function(){return $.datepicker._datepickerShowing&&$.datepicker._lastInput==a[0]?$.datepicker._hideDatepicker():$.datepicker._datepickerShowing&&$.datepicker._lastInput!=a[0]?($.datepicker._hideDatepicker(),$.datepicker._showDatepicker(a[0])):$.datepicker._showDatepicker(a[0]),!1})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var d=function(a){var b=0,c=0;for(var d=0;db&&(b=a[d].length,c=d);return c};b.setMonth(d(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort"))),b.setDate(d(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=$(a);if(c.hasClass(this.markerClassName))return;c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),$.data(a,PROP_NAME,b),this._setDate(b,this._getDefaultDate(b),!0),this._updateDatepicker(b),this._updateAlternate(b),b.settings.disabled&&this._disableDatepicker(a),b.dpDiv.css("display","block")},_dialogDatepicker:function(a,b,c,d,e){var f=this._dialogInst;if(!f){this.uuid+=1;var g="dp"+this.uuid;this._dialogInput=$(''),this._dialogInput.keydown(this._doKeyDown),$("body").append(this._dialogInput),f=this._dialogInst=this._newInst(this._dialogInput,!1),f.settings={},$.data(this._dialogInput[0],PROP_NAME,f)}extendRemove(f.settings,d||{}),b=b&&b.constructor==Date?this._formatDate(f,b):b,this._dialogInput.val(b),this._pos=e?e.length?e:[e.pageX,e.pageY]:null;if(!this._pos){var h=document.documentElement.clientWidth,i=document.documentElement.clientHeight,j=document.documentElement.scrollLeft||document.body.scrollLeft,k=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[h/2-100+j,i/2-150+k]}return this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),f.settings.onSelect=c,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],PROP_NAME,f),this},_destroyDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();$.removeData(a,PROP_NAME),d=="input"?(c.append.remove(),c.trigger.remove(),b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):(d=="div"||d=="span")&&b.removeClass(this.markerClassName).empty()},_enableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!1,c.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().removeClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b})},_disableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!0,c.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().addClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b}),this._disabledInputs[this._disabledInputs.length]=a},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;b-1}},_doKeyUp:function(a){var b=$.datepicker._getInst(a.target);if(b.input.val()!=b.lastVal)try{var c=$.datepicker.parseDate($.datepicker._get(b,"dateFormat"),b.input?b.input.val():null,$.datepicker._getFormatConfig(b));c&&($.datepicker._setDateFromField(b),$.datepicker._updateAlternate(b),$.datepicker._updateDatepicker(b))}catch(d){$.datepicker.log(d)}return!0},_showDatepicker:function(a){a=a.target||a,a.nodeName.toLowerCase()!="input"&&(a=$("input",a.parentNode)[0]);if($.datepicker._isDisabledDatepicker(a)||$.datepicker._lastInput==a)return;var b=$.datepicker._getInst(a);$.datepicker._curInst&&$.datepicker._curInst!=b&&($.datepicker._curInst.dpDiv.stop(!0,!0),b&&$.datepicker._datepickerShowing&&$.datepicker._hideDatepicker($.datepicker._curInst.input[0]));var c=$.datepicker._get(b,"beforeShow"),d=c?c.apply(a,[a,b]):{};if(d===!1)return;extendRemove(b.settings,d),b.lastVal=null,$.datepicker._lastInput=a,$.datepicker._setDateFromField(b),$.datepicker._inDialog&&(a.value=""),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(a),$.datepicker._pos[1]+=a.offsetHeight);var e=!1;$(a).parents().each(function(){return e|=$(this).css("position")=="fixed",!e}),e&&$.browser.opera&&($.datepicker._pos[0]-=document.documentElement.scrollLeft,$.datepicker._pos[1]-=document.documentElement.scrollTop);var f={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null,b.dpDiv.empty(),b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(b),f=$.datepicker._checkOffset(b,f,e),b.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":e?"fixed":"absolute",display:"none",left:f.left+"px",top:f.top+"px"});if(!b.inline){var g=$.datepicker._get(b,"showAnim"),h=$.datepicker._get(b,"duration"),i=function(){var a=b.dpDiv.find("iframe.ui-datepicker-cover");if(!!a.length){var c=$.datepicker._getBorders(b.dpDiv);a.css({left:-c[0],top:-c[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex($(a).zIndex()+1),$.datepicker._datepickerShowing=!0,$.effects&&$.effects[g]?b.dpDiv.show(g,$.datepicker._get(b,"showOptions"),h,i):b.dpDiv[g||"show"](g?h:null,i),(!g||!h)&&i(),b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus(),$.datepicker._curInst=b}},_updateDatepicker:function(a){var b=this;b.maxRows=4;var c=$.datepicker._getBorders(a.dpDiv);instActive=a,a.dpDiv.empty().append(this._generateHTML(a)),this._attachHandlers(a);var d=a.dpDiv.find("iframe.ui-datepicker-cover");!d.length||d.css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}),a.dpDiv.find("."+this._dayOverClass+" a").mouseover();var e=this._getNumberOfMonths(a),f=e[1],g=17;a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),f>1&&a.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",g*f+"em"),a.dpDiv[(e[0]!=1||e[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi"),a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),a==$.datepicker._curInst&&$.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var h=a.yearshtml;setTimeout(function(){h===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml),h=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(a){return{thin:1,medium:2,thick:3}[a]||a};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var d=a.dpDiv.outerWidth(),e=a.dpDiv.outerHeight(),f=a.input?a.input.outerWidth():0,g=a.input?a.input.outerHeight():0,h=document.documentElement.clientWidth+(c?0:$(document).scrollLeft()),i=document.documentElement.clientHeight+(c?0:$(document).scrollTop());return b.left-=this._get(a,"isRTL")?d-f:0,b.left-=c&&b.left==a.input.offset().left?$(document).scrollLeft():0,b.top-=c&&b.top==a.input.offset().top+g?$(document).scrollTop():0,b.left-=Math.min(b.left,b.left+d>h&&h>d?Math.abs(b.left+d-h):0),b.top-=Math.min(b.top,b.top+e>i&&i>e?Math.abs(e+g):0),b},_findPos:function(a){var b=this._getInst(a),c=this._get(b,"isRTL");while(a&&(a.type=="hidden"||a.nodeType!=1||$.expr.filters.hidden(a)))a=a[c?"previousSibling":"nextSibling"];var d=$(a).offset();return[d.left,d.top]},_hideDatepicker:function(a){var b=this._curInst;if(!b||a&&b!=$.data(a,PROP_NAME))return;if(this._datepickerShowing){var c=this._get(b,"showAnim"),d=this._get(b,"duration"),e=function(){$.datepicker._tidyDialog(b)};$.effects&&$.effects[c]?b.dpDiv.hide(c,$.datepicker._get(b,"showOptions"),d,e):b.dpDiv[c=="slideDown"?"slideUp":c=="fadeIn"?"fadeOut":"hide"](c?d:null,e),c||e(),this._datepickerShowing=!1;var f=this._get(b,"onClose");f&&f.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&&($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(!$.datepicker._curInst)return;var b=$(a.target),c=$.datepicker._getInst(b[0]);(b[0].id!=$.datepicker._mainDivId&&b.parents("#"+$.datepicker._mainDivId).length==0&&!b.hasClass($.datepicker.markerClassName)&&!b.closest("."+$.datepicker._triggerClass).length&&$.datepicker._datepickerShowing&&(!$.datepicker._inDialog||!$.blockUI)||b.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!=c)&&$.datepicker._hideDatepicker()},_adjustDate:function(a,b,c){var d=$(a),e=this._getInst(d[0]);if(this._isDisabledDatepicker(d[0]))return;this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c),this._updateDatepicker(e)},_gotoToday:function(a){var b=$(a),c=this._getInst(b[0]);if(this._get(c,"gotoCurrent")&&c.currentDay)c.selectedDay=c.currentDay,c.drawMonth=c.selectedMonth=c.currentMonth,c.drawYear=c.selectedYear=c.currentYear;else{var d=new Date;c.selectedDay=d.getDate(),c.drawMonth=c.selectedMonth=d.getMonth(),c.drawYear=c.selectedYear=d.getFullYear()}this._notifyChange(c),this._adjustDate(b)},_selectMonthYear:function(a,b,c){var d=$(a),e=this._getInst(d[0]);e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10),this._notifyChange(e),this._adjustDate(d)},_selectDay:function(a,b,c,d){var e=$(a);if($(d).hasClass(this._unselectableClass)||this._isDisabledDatepicker(e[0]))return;var f=this._getInst(e[0]);f.selectedDay=f.currentDay=$("a",d).html(),f.selectedMonth=f.currentMonth=b,f.selectedYear=f.currentYear=c,this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))},_clearDate:function(a){var b=$(a),c=this._getInst(b[0]);this._selectDate(b,"")},_selectDate:function(a,b){var c=$(a),d=this._getInst(c[0]);b=b!=null?b:this._formatDate(d),d.input&&d.input.val(b),this._updateAlternate(d);var e=this._get(d,"onSelect");e?e.apply(d.input?d.input[0]:null,[b,d]):d.input&&d.input.trigger("change"),d.inline?this._updateDatepicker(d):(this._hideDatepicker(),this._lastInput=d.input[0],typeof d.input[0]!="object"&&d.input.focus(),this._lastInput=null)},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),d=this._getDate(a),e=this.formatDate(c,d,this._getFormatConfig(a));$(b).each(function(){$(this).val(e)})}},noWeekends:function(a){var b=a.getDay();return[b>0&&b<6,""]},iso8601Week:function(a){var b=new Date(a.getTime());b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var d=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;d=typeof d!="string"?d:(new Date).getFullYear()%100+parseInt(d,10);var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,h=(c?c.monthNames:null)||this._defaults.monthNames,i=-1,j=-1,k=-1,l=-1,m=!1,n=function(b){var c=s+1-1){j=1,k=l;do{var u=this._getDaysInMonth(i,j-1);if(k<=u)break;j++,k-=u}while(!0)}var t=this._daylightSavingAdjust(new Date(i,j-1,k));if(t.getFullYear()!=i||t.getMonth()+1!=j||t.getDate()!=k)throw"Invalid date";return t},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1e7,formatDate:function(a,b,c){if(!b)return"";var d=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,e=(c?c.dayNames:null)||this._defaults.dayNames,f=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,h=function(b){var c=m+112?a.getHours()+2:0),a):null},_setDate:function(a,b,c){var d=!b,e=a.selectedMonth,f=a.selectedYear,g=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=g.getDate(),a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth(),a.drawYear=a.selectedYear=a.currentYear=g.getFullYear(),(e!=a.selectedMonth||f!=a.selectedYear)&&!c&&this._notifyChange(a),this._adjustInstDate(a),a.input&&a.input.val(d?"":this._formatDate(a))},_getDate:function(a){var b=!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return b},_attachHandlers:function(a){var b=this._get(a,"stepMonths"),c="#"+a.id.replace(/\\\\/g,"\\");a.dpDiv.find("[data-handler]").map(function(){var a={prev:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(c,-b,"M")},next:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(c,+b,"M")},hide:function(){window["DP_jQuery_"+dpuuid].datepicker._hideDatepicker()},today:function(){window["DP_jQuery_"+dpuuid].datepicker._gotoToday(c)},selectDay:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectDay(c,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(c,this,"M"),!1},selectYear:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(c,this,"Y"),!1}};$(this).bind(this.getAttribute("data-event"),a[this.getAttribute("data-handler")])})},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),d=this._get(a,"showButtonPanel"),e=this._get(a,"hideIfNoPrevNext"),f=this._get(a,"navigationAsDateFormat"),g=this._getNumberOfMonths(a),h=this._get(a,"showCurrentAtPos"),i=this._get(a,"stepMonths"),j=g[0]!=1||g[1]!=1,k=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),l=this._getMinMaxDate(a,"min"),m=this._getMinMaxDate(a,"max"),n=a.drawMonth-h,o=a.drawYear;n<0&&(n+=12,o--);if(m){var p=this._daylightSavingAdjust(new Date(m.getFullYear(),m.getMonth()-g[0]*g[1]+1,m.getDate()));p=l&&pp)n--,n<0&&(n=11,o--)}a.drawMonth=n,a.drawYear=o;var q=this._get(a,"prevText");q=f?this.formatDate(q,this._daylightSavingAdjust(new Date(o,n-i,1)),this._getFormatConfig(a)):q;var r=this._canAdjustMonth(a,-1,o,n)?''+q+"":e?"":''+q+"",s=this._get(a,"nextText");s=f?this.formatDate(s,this._daylightSavingAdjust(new Date(o,n+i,1)),this._getFormatConfig(a)):s;var t=this._canAdjustMonth(a,1,o,n)?''+s+"":e?"":''+s+"",u=this._get(a,"currentText"),v=this._get(a,"gotoCurrent")&&a.currentDay?k:b;u=f?this.formatDate(u,v,this._getFormatConfig(a)):u;var w=a.inline?"":'",x=d?'
      '+(c?w:"")+(this._isInRange(a,v)?'":"")+(c?"":w)+"
      ":"",y=parseInt(this._get(a,"firstDay"),10);y=isNaN(y)?0:y;var z=this._get(a,"showWeek"),A=this._get(a,"dayNames"),B=this._get(a,"dayNamesShort"),C=this._get(a,"dayNamesMin"),D=this._get(a,"monthNames"),E=this._get(a,"monthNamesShort"),F=this._get(a,"beforeShowDay"),G=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths"),I=this._get(a,"calculateWeek")||this.iso8601Week,J=this._getDefaultDate(a),K="";for(var L=0;L1)switch(N){case 0:Q+=" ui-datepicker-group-first",P=" ui-corner-"+(c?"right":"left");break;case g[1]-1:Q+=" ui-datepicker-group-last",P=" ui-corner-"+(c?"left":"right");break;default:Q+=" ui-datepicker-group-middle",P=""}Q+='">'}Q+='
      '+(/all|left/.test(P)&&L==0?c?t:r:"")+(/all|right/.test(P)&&L==0?c?r:t:"")+this._generateMonthYearHeader(a,n,o,l,m,L>0||N>0,D,E)+'
      '+"";var R=z?'":"";for(var S=0;S<7;S++){var T=(S+y)%7;R+="=5?' class="ui-datepicker-week-end"':"")+">"+''+C[T]+""}Q+=R+"";var U=this._getDaysInMonth(o,n);o==a.selectedYear&&n==a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,U));var V=(this._getFirstDayOfMonth(o,n)-y+7)%7,W=Math.ceil((V+U)/7),X=j?this.maxRows>W?this.maxRows:W:W;this.maxRows=X;var Y=this._daylightSavingAdjust(new Date(o,n,1-V));for(var Z=0;Z";var _=z?'":"";for(var S=0;S<7;S++){var ba=F?F.apply(a.input?a.input[0]:null,[Y]):[!0,""],bb=Y.getMonth()!=n,bc=bb&&!H||!ba[0]||l&&Ym;_+='",Y.setDate(Y.getDate()+1),Y=this._daylightSavingAdjust(Y)}Q+=_+""}n++,n>11&&(n=0,o++),Q+="
      '+this._get(a,"weekHeader")+"
      '+this._get(a,"calculateWeek")(Y)+""+(bb&&!G?" ":bc?''+Y.getDate()+"":''+Y.getDate()+"")+"
      "+(j?""+(g[0]>0&&N==g[1]-1?'
      ':""):""),M+=Q}K+=M}return K+=x+($.browser.msie&&parseInt($.browser.version,10)<7&&!a.inline?'':""),a._keyEvent=!1,K},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i=this._get(a,"changeMonth"),j=this._get(a,"changeYear"),k=this._get(a,"showMonthAfterYear"),l='
      ',m="";if(f||!i)m+=''+g[b]+"";else{var n=d&&d.getFullYear()==c,o=e&&e.getFullYear()==c;m+='"}k||(l+=m+(f||!i||!j?" ":""));if(!a.yearshtml){a.yearshtml="";if(f||!j)l+=''+c+"";else{var q=this._get(a,"yearRange").split(":"),r=(new Date).getFullYear(),s=function(a){var b=a.match(/c[+-].*/)?c+parseInt(a.substring(1),10):a.match(/[+-].*/)?r+parseInt(a,10):parseInt(a,10);return isNaN(b)?r:b},t=s(q[0]),u=Math.max(t,s(q[1]||""));t=d?Math.max(t,d.getFullYear()):t,u=e?Math.min(u,e.getFullYear()):u,a.yearshtml+='",l+=a.yearshtml,a.yearshtml=null}}return l+=this._get(a,"yearSuffix"),k&&(l+=(f||!i||!j?" ":"")+m),l+="
      ",l},_adjustInstDate:function(a,b,c){var d=a.drawYear+(c=="Y"?b:0),e=a.drawMonth+(c=="M"?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+(c=="D"?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),(c=="M"||c=="Y")&&this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&&bd?d:e,e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return b==null?[1,1]:typeof b=="number"?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(b<0?b:e[0]*e[1]),1));return b<0&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth())),this._isInRange(a,f)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!d||b.getTime()<=d.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);var e=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),$.fn.datepicker=function(a){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv),$.datepicker.initialized=!0);var b=Array.prototype.slice.call(arguments,1);return typeof a!="string"||a!="isDisabled"&&a!="getDate"&&a!="widget"?a=="option"&&arguments.length==2&&typeof arguments[1]=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b)):this.each(function(){typeof a=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this].concat(b)):$.datepicker._attachDatepicker(this,a)}):$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.8.23",window["DP_jQuery_"+dpuuid]=$})(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15 +* https://github.com/jquery/jquery-ui +* Includes: jquery.ui.progressbar.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +(function(a,b){a.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()}),this.valueDiv=a("
      ").appendTo(this.element),this.oldValue=this._value(),this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove(),a.Widget.prototype.destroy.apply(this,arguments)},value:function(a){return a===b?this._value():(this._setOption("value",a),this)},_setOption:function(b,c){b==="value"&&(this.options.value=c,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete")),a.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;return typeof a!="number"&&(a=0),Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var a=this.value(),b=this._percentage();this.oldValue!==a&&(this.oldValue=a,this._trigger("change")),this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(b.toFixed(0)+"%"),this.element.attr("aria-valuenow",a)}}),a.extend(a.ui.progressbar,{version:"1.8.23"})})(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15 +* https://github.com/jquery/jquery-ui +* Includes: jquery.effects.core.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +jQuery.effects||function(a,b){function c(b){var c;return b&&b.constructor==Array&&b.length==3?b:(c=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b))?[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],10)]:(c=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(b))?[parseFloat(c[1])*2.55,parseFloat(c[2])*2.55,parseFloat(c[3])*2.55]:(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(b))?[parseInt(c[1],16),parseInt(c[2],16),parseInt(c[3],16)]:(c=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(b))?[parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16),parseInt(c[3]+c[3],16)]:(c=/rgba\(0, 0, 0, 0\)/.exec(b))?e.transparent:e[a.trim(b).toLowerCase()]}function d(b,d){var e;do{e=(a.curCSS||a.css)(b,d);if(e!=""&&e!="transparent"||a.nodeName(b,"body"))break;d="backgroundColor"}while(b=b.parentNode);return c(e)}function h(){var a=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,b={},c,d;if(a&&a.length&&a[0]&&a[a[0]]){var e=a.length;while(e--)c=a[e],typeof a[c]=="string"&&(d=c.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),b[d]=a[c])}else for(c in a)typeof a[c]=="string"&&(b[c]=a[c]);return b}function i(b){var c,d;for(c in b)d=b[c],(d==null||a.isFunction(d)||c in g||/scrollbar/.test(c)||!/color/i.test(c)&&isNaN(parseFloat(d)))&&delete b[c];return b}function j(a,b){var c={_:0},d;for(d in b)a[d]!=b[d]&&(c[d]=b[d]);return c}function k(b,c,d,e){typeof b=="object"&&(e=c,d=null,c=b,b=c.effect),a.isFunction(c)&&(e=c,d=null,c={});if(typeof c=="number"||a.fx.speeds[c])e=d,d=c,c={};return a.isFunction(d)&&(e=d,d=null),c=c||{},d=d||c.duration,d=a.fx.off?0:typeof d=="number"?d:d in a.fx.speeds?a.fx.speeds[d]:a.fx.speeds._default,e=e||c.complete,[b,c,d,e]}function l(b){return!b||typeof b=="number"||a.fx.speeds[b]?!0:typeof b=="string"&&!a.effects[b]?!0:!1}a.effects={},a.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(b,e){a.fx.step[e]=function(a){a.colorInit||(a.start=d(a.elem,e),a.end=c(a.end),a.colorInit=!0),a.elem.style[e]="rgb("+Math.max(Math.min(parseInt(a.pos*(a.end[0]-a.start[0])+a.start[0],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[1]-a.start[1])+a.start[1],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[2]-a.start[2])+a.start[2],10),255),0)+")"}});var e={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},f=["add","remove","toggle"],g={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.effects.animateClass=function(b,c,d,e){return a.isFunction(d)&&(e=d,d=null),this.queue(function(){var g=a(this),k=g.attr("style")||" ",l=i(h.call(this)),m,n=g.attr("class")||"";a.each(f,function(a,c){b[c]&&g[c+"Class"](b[c])}),m=i(h.call(this)),g.attr("class",n),g.animate(j(l,m),{queue:!1,duration:c,easing:d,complete:function(){a.each(f,function(a,c){b[c]&&g[c+"Class"](b[c])}),typeof g.attr("style")=="object"?(g.attr("style").cssText="",g.attr("style").cssText=k):g.attr("style",k),e&&e.apply(this,arguments),a.dequeue(this)}})})},a.fn.extend({_addClass:a.fn.addClass,addClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{add:b},c,d,e]):this._addClass(b)},_removeClass:a.fn.removeClass,removeClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{remove:b},c,d,e]):this._removeClass(b)},_toggleClass:a.fn.toggleClass,toggleClass:function(c,d,e,f,g){return typeof d=="boolean"||d===b?e?a.effects.animateClass.apply(this,[d?{add:c}:{remove:c},e,f,g]):this._toggleClass(c,d):a.effects.animateClass.apply(this,[{toggle:c},d,e,f])},switchClass:function(b,c,d,e,f){return a.effects.animateClass.apply(this,[{add:c,remove:b},d,e,f])}}),a.extend(a.effects,{version:"1.8.23",save:function(a,b){for(var c=0;c").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e=document.activeElement;try{e.id}catch(f){e=document.body}return b.wrap(d),(b[0]===e||a.contains(b[0],e))&&a(e).focus(),d=b.parent(),b.css("position")=="static"?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),d.css(c).show()},removeWrapper:function(b){var c,d=document.activeElement;return b.parent().is(".ui-effects-wrapper")?(c=b.parent().replaceWith(b),(b[0]===d||a.contains(b[0],d))&&a(d).focus(),c):b},setTransition:function(b,c,d,e){return e=e||{},a.each(c,function(a,c){var f=b.cssUnit(c);f[0]>0&&(e[c]=f[0]*d+f[1])}),e}}),a.fn.extend({effect:function(b,c,d,e){var f=k.apply(this,arguments),g={options:f[1],duration:f[2],callback:f[3]},h=g.options.mode,i=a.effects[b];return a.fx.off||!i?h?this[h](g.duration,g.callback):this.each(function(){g.callback&&g.callback.call(this)}):i.call(this,g)},_show:a.fn.show,show:function(a){if(l(a))return this._show.apply(this,arguments);var b=k.apply(this,arguments);return b[1].mode="show",this.effect.apply(this,b)},_hide:a.fn.hide,hide:function(a){if(l(a))return this._hide.apply(this,arguments);var b=k.apply(this,arguments);return b[1].mode="hide",this.effect.apply(this,b)},__toggle:a.fn.toggle,toggle:function(b){if(l(b)||typeof b=="boolean"||a.isFunction(b))return this.__toggle.apply(this,arguments);var c=k.apply(this,arguments);return c[1].mode="toggle",this.effect.apply(this,c)},cssUnit:function(b){var c=this.css(b),d=[];return a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)>0&&(d=[parseFloat(c),b])}),d}});var m={};a.each(["Quad","Cubic","Quart","Quint","Expo"],function(a,b){m[b]=function(b){return Math.pow(b,a+2)}}),a.extend(m,{Sine:function(a){return 1-Math.cos(a*Math.PI/2)},Circ:function(a){return 1-Math.sqrt(1-a*a)},Elastic:function(a){return a===0||a===1?a:-Math.pow(2,8*(a-1))*Math.sin(((a-1)*80-7.5)*Math.PI/15)},Back:function(a){return a*a*(3*a-2)},Bounce:function(a){var b,c=4;while(a<((b=Math.pow(2,--c))-1)/11);return 1/Math.pow(4,3-c)-7.5625*Math.pow((b*3-2)/22-a,2)}}),a.each(m,function(b,c){a.easing["easeIn"+b]=c,a.easing["easeOut"+b]=function(a){return 1-c(1-a)},a.easing["easeInOut"+b]=function(a){return a<.5?c(a*2)/2:c(a*-2+2)/-2+1}})}(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15 +* https://github.com/jquery/jquery-ui +* Includes: jquery.effects.blind.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +(function(a,b){a.effects.blind=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.direction||"vertical";a.effects.save(c,d),c.show();var g=a.effects.createWrapper(c).css({overflow:"hidden"}),h=f=="vertical"?"height":"width",i=f=="vertical"?g.height():g.width();e=="show"&&g.css(h,0);var j={};j[h]=e=="show"?i:0,g.animate(j,b.duration,b.options.easing,function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()})})}})(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15 +* https://github.com/jquery/jquery-ui +* Includes: jquery.effects.bounce.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +(function(a,b){a.effects.bounce=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"effect"),f=b.options.direction||"up",g=b.options.distance||20,h=b.options.times||5,i=b.duration||250;/show|hide/.test(e)&&d.push("opacity"),a.effects.save(c,d),c.show(),a.effects.createWrapper(c);var j=f=="up"||f=="down"?"top":"left",k=f=="up"||f=="left"?"pos":"neg",g=b.options.distance||(j=="top"?c.outerHeight(!0)/3:c.outerWidth(!0)/3);e=="show"&&c.css("opacity",0).css(j,k=="pos"?-g:g),e=="hide"&&(g=g/(h*2)),e!="hide"&&h--;if(e=="show"){var l={opacity:1};l[j]=(k=="pos"?"+=":"-=")+g,c.animate(l,i/2,b.options.easing),g=g/2,h--}for(var m=0;m").css({position:"absolute",visibility:"visible",left:-j*(g/d),top:-i*(h/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/d,height:h/c,left:f.left+j*(g/d)+(b.options.mode=="show"?(j-Math.floor(d/2))*(g/d):0),top:f.top+i*(h/c)+(b.options.mode=="show"?(i-Math.floor(c/2))*(h/c):0),opacity:b.options.mode=="show"?0:1}).animate({left:f.left+j*(g/d)+(b.options.mode=="show"?0:(j-Math.floor(d/2))*(g/d)),top:f.top+i*(h/c)+(b.options.mode=="show"?0:(i-Math.floor(c/2))*(h/c)),opacity:b.options.mode=="show"?1:0},b.duration||500);setTimeout(function(){b.options.mode=="show"?e.css({visibility:"visible"}):e.css({visibility:"visible"}).hide(),b.callback&&b.callback.apply(e[0]),e.dequeue(),a("div.ui-effects-explode").remove()},b.duration||500)})}})(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15 +* https://github.com/jquery/jquery-ui +* Includes: jquery.effects.fade.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +(function(a,b){a.effects.fade=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"hide");c.animate({opacity:d},{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15 +* https://github.com/jquery/jquery-ui +* Includes: jquery.effects.fold.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +(function(a,b){a.effects.fold=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.size||15,g=!!b.options.horizFirst,h=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(c,d),c.show();var i=a.effects.createWrapper(c).css({overflow:"hidden"}),j=e=="show"!=g,k=j?["width","height"]:["height","width"],l=j?[i.width(),i.height()]:[i.height(),i.width()],m=/([0-9]+)%/.exec(f);m&&(f=parseInt(m[1],10)/100*l[e=="hide"?0:1]),e=="show"&&i.css(g?{height:0,width:f}:{height:f,width:0});var n={},p={};n[k[0]]=e=="show"?l[0]:f,p[k[1]]=e=="show"?l[1]:0,i.animate(n,h,b.options.easing).animate(p,h,b.options.easing,function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()})})}})(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15 +* https://github.com/jquery/jquery-ui +* Includes: jquery.effects.highlight.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +(function(a,b){a.effects.highlight=function(b){return this.queue(function(){var c=a(this),d=["backgroundImage","backgroundColor","opacity"],e=a.effects.setMode(c,b.options.mode||"show"),f={backgroundColor:c.css("backgroundColor")};e=="hide"&&(f.opacity=0),a.effects.save(c,d),c.show().css({backgroundImage:"none",backgroundColor:b.options.color||"#ffff99"}).animate(f,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&&c.hide(),a.effects.restore(c,d),e=="show"&&!a.support.opacity&&this.style.removeAttribute("filter"),b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15 +* https://github.com/jquery/jquery-ui +* Includes: jquery.effects.pulsate.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +(function(a,b){a.effects.pulsate=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"show"),e=(b.options.times||5)*2-1,f=b.duration?b.duration/2:a.fx.speeds._default/2,g=c.is(":visible"),h=0;g||(c.css("opacity",0).show(),h=1),(d=="hide"&&g||d=="show"&&!g)&&e--;for(var i=0;i').appendTo(document.body).addClass(b.options.className).css({top:g.top,left:g.left,height:c.innerHeight(),width:c.innerWidth(),position:"absolute"}).animate(f,b.duration,b.options.easing,function(){h.remove(),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()})})}})(jQuery);; \ No newline at end of file diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/syntaxhighlighter/shAutoloader.js b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/syntaxhighlighter/shAutoloader.js new file mode 100644 index 00000000..4e29bdde --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/syntaxhighlighter/shAutoloader.js @@ -0,0 +1,17 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/SyntaxHighlighter + * + * SyntaxHighlighter is donationware. If you are using it, please donate. + * http://alexgorbatchev.com/SyntaxHighlighter/donate.html + * + * @version + * 3.0.83 (July 02 2010) + * + * @copyright + * Copyright (C) 2004-2010 Alex Gorbatchev. + * + * @license + * Dual licensed under the MIT and GPL licenses. + */ +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(2(){1 h=5;h.I=2(){2 n(c,a){4(1 d=0;d)/g + }); + }; + + Brush.prototype = new SyntaxHighlighter.Highlighter(); + Brush.aliases = ['java']; + + SyntaxHighlighter.brushes.Java = Brush; + + // CommonJS + typeof(exports) != 'undefined' ? exports.Brush = Brush : null; +})(); diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/syntaxhighlighter/shBrushXml.js b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/syntaxhighlighter/shBrushXml.js new file mode 100644 index 00000000..69d9fd0b --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/syntaxhighlighter/shBrushXml.js @@ -0,0 +1,69 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/SyntaxHighlighter + * + * SyntaxHighlighter is donationware. If you are using it, please donate. + * http://alexgorbatchev.com/SyntaxHighlighter/donate.html + * + * @version + * 3.0.83 (July 02 2010) + * + * @copyright + * Copyright (C) 2004-2010 Alex Gorbatchev. + * + * @license + * Dual licensed under the MIT and GPL licenses. + */ +;(function() +{ + // CommonJS + typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; + + function Brush() + { + function process(match, regexInfo) + { + var constructor = SyntaxHighlighter.Match, + code = match[0], + tag = new XRegExp('(<|<)[\\s\\/\\?]*(?[:\\w-\\.]+)', 'xg').exec(code), + result = [] + ; + + if (match.attributes != null) + { + var attributes, + regex = new XRegExp('(? [\\w:\\-\\.]+)' + + '\\s*=\\s*' + + '(? ".*?"|\'.*?\'|\\w+)', + 'xg'); + + while ((attributes = regex.exec(code)) != null) + { + result.push(new constructor(attributes.name, match.index + attributes.index, 'color1')); + result.push(new constructor(attributes.value, match.index + attributes.index + attributes[0].indexOf(attributes.value), 'string')); + } + } + + if (tag != null) + result.push( + new constructor(tag.name, match.index + tag[0].indexOf(tag.name), 'keyword') + ); + + return result; + } + + this.regexList = [ + { regex: new XRegExp('(\\<|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](\\>|>)', 'gm'), css: 'color2' }, // + { regex: SyntaxHighlighter.regexLib.xmlComments, css: 'comments' }, // + { regex: new XRegExp('(<|<)[\\s\\/\\?]*(\\w+)(?.*?)[\\s\\/\\?]*(>|>)', 'sg'), func: process } + ]; + }; + + Brush.prototype = new SyntaxHighlighter.Highlighter(); + Brush.aliases = ['xml', 'xhtml', 'xslt', 'html']; + + SyntaxHighlighter.brushes.Xml = Brush; + + // CommonJS + typeof(exports) != 'undefined' ? exports.Brush = Brush : null; +})(); diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/syntaxhighlighter/shCore.js b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/syntaxhighlighter/shCore.js new file mode 100644 index 00000000..b47b6454 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/syntaxhighlighter/shCore.js @@ -0,0 +1,17 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/SyntaxHighlighter + * + * SyntaxHighlighter is donationware. If you are using it, please donate. + * http://alexgorbatchev.com/SyntaxHighlighter/donate.html + * + * @version + * 3.0.83 (July 02 2010) + * + * @copyright + * Copyright (C) 2004-2010 Alex Gorbatchev. + * + * @license + * Dual licensed under the MIT and GPL licenses. + */ +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('K M;I(M)1S 2U("2a\'t 4k M 4K 2g 3l 4G 4H");(6(){6 r(f,e){I(!M.1R(f))1S 3m("3s 15 4R");K a=f.1w;f=M(f.1m,t(f)+(e||""));I(a)f.1w={1m:a.1m,19:a.19?a.19.1a(0):N};H f}6 t(f){H(f.1J?"g":"")+(f.4s?"i":"")+(f.4p?"m":"")+(f.4v?"x":"")+(f.3n?"y":"")}6 B(f,e,a,b){K c=u.L,d,h,g;v=R;5K{O(;c--;){g=u[c];I(a&g.3r&&(!g.2p||g.2p.W(b))){g.2q.12=e;I((h=g.2q.X(f))&&h.P===e){d={3k:g.2b.W(b,h,a),1C:h};1N}}}}5v(i){1S i}5q{v=11}H d}6 p(f,e,a){I(3b.Z.1i)H f.1i(e,a);O(a=a||0;a-1},3d:6(g){e+=g}};c1&&p(e,"")>-1){a=15(J.1m,n.Q.W(t(J),"g",""));n.Q.W(f.1a(e.P),a,6(){O(K c=1;c<14.L-2;c++)I(14[c]===1d)e[c]=1d})}I(J.1w&&J.1w.19)O(K b=1;be.P&&J.12--}H e};I(!D)15.Z.1A=6(f){(f=n.X.W(J,f))&&J.1J&&!f[0].L&&J.12>f.P&&J.12--;H!!f};1r.Z.1C=6(f){M.1R(f)||(f=15(f));I(f.1J){K e=n.1C.1p(J,14);f.12=0;H e}H f.X(J)};1r.Z.Q=6(f,e){K a=M.1R(f),b,c;I(a&&1j e.58()==="3f"&&e.1i("${")===-1&&y)H n.Q.1p(J,14);I(a){I(f.1w)b=f.1w.19}Y f+="";I(1j e==="6")c=n.Q.W(J,f,6(){I(b){14[0]=1f 1r(14[0]);O(K d=0;dd.L-3;){i=1r.Z.1a.W(g,-1)+i;g=1Q.3i(g/10)}H(g?d[g]||"":"$")+i}Y{g=+i;I(g<=d.L-3)H d[g];g=b?p(b,i):-1;H g>-1?d[g+1]:h}})})}I(a&&f.1J)f.12=0;H c};1r.Z.1e=6(f,e){I(!M.1R(f))H n.1e.1p(J,14);K a=J+"",b=[],c=0,d,h;I(e===1d||+e<0)e=5D;Y{e=1Q.3i(+e);I(!e)H[]}O(f=M.3c(f);d=f.X(a);){I(f.12>c){b.U(a.1a(c,d.P));d.L>1&&d.P=e)1N}f.12===d.P&&f.12++}I(c===a.L){I(!n.1A.W(f,"")||h)b.U("")}Y b.U(a.1a(c));H b.L>e?b.1a(0,e):b};M.1h(/\\(\\?#[^)]*\\)/,6(f){H n.1A.W(A,f.2S.1a(f.P+f[0].L))?"":"(?:)"});M.1h(/\\((?!\\?)/,6(){J.19.U(N);H"("});M.1h(/\\(\\?<([$\\w]+)>/,6(f){J.19.U(f[1]);J.2N=R;H"("});M.1h(/\\\\k<([\\w$]+)>/,6(f){K e=p(J.19,f[1]);H e>-1?"\\\\"+(e+1)+(3R(f.2S.3a(f.P+f[0].L))?"":"(?:)"):f[0]});M.1h(/\\[\\^?]/,6(f){H f[0]==="[]"?"\\\\b\\\\B":"[\\\\s\\\\S]"});M.1h(/^\\(\\?([5A]+)\\)/,6(f){J.3d(f[1]);H""});M.1h(/(?:\\s+|#.*)+/,6(f){H n.1A.W(A,f.2S.1a(f.P+f[0].L))?"":"(?:)"},M.1B,6(){H J.2K("x")});M.1h(/\\./,6(){H"[\\\\s\\\\S]"},M.1B,6(){H J.2K("s")})})();1j 2e!="1d"&&(2e.M=M);K 1v=6(){6 r(a,b){a.1l.1i(b)!=-1||(a.1l+=" "+b)}6 t(a){H a.1i("3e")==0?a:"3e"+a}6 B(a){H e.1Y.2A[t(a)]}6 p(a,b,c){I(a==N)H N;K d=c!=R?a.3G:[a.2G],h={"#":"1c",".":"1l"}[b.1o(0,1)]||"3h",g,i;g=h!="3h"?b.1o(1):b.5u();I((a[h]||"").1i(g)!=-1)H a;O(a=0;d&&a\'+c+""});H a}6 n(a,b){a.1e("\\n");O(K c="",d=0;d<50;d++)c+=" ";H a=v(a,6(h){I(h.1i("\\t")==-1)H h;O(K g=0;(g=h.1i("\\t"))!=-1;)h=h.1o(0,g)+c.1o(0,b-g%b)+h.1o(g+1,h.L);H h})}6 x(a){H a.Q(/^\\s+|\\s+$/g,"")}6 D(a,b){I(a.Pb.P)H 1;Y I(a.Lb.L)H 1;H 0}6 y(a,b){6 c(k){H k[0]}O(K d=N,h=[],g=b.2D?b.2D:c;(d=b.1I.X(a))!=N;){K i=g(d,b);I(1j i=="3f")i=[1f e.2L(i,d.P,b.23)];h=h.1O(i)}H h}6 E(a){K b=/(.*)((&1G;|&1y;).*)/;H a.Q(e.3A.3M,6(c){K d="",h=N;I(h=b.X(c)){c=h[1];d=h[2]}H\'\'+c+""+d})}6 z(){O(K a=1E.36("1k"),b=[],c=0;c<1z 4I="1Z://2y.3L.3K/4L/5L"><3J><4N 1Z-4M="5G-5M" 6K="2O/1z; 6J=6I-8" /><1t>6L 1v<3B 1L="25-6M:6Q,6P,6O,6N-6F;6y-2f:#6x;2f:#6w;25-22:6v;2O-3D:3C;">1v3v 3.0.76 (72 73 3x)1Z://3u.2w/1v70 17 6U 71.6T 6X-3x 6Y 6D.6t 61 60 J 1k, 5Z 5R 5V <2R/>5U 5T 5S!\'}},1Y:{2j:N,2A:{}},1U:{},3A:{6n:/\\/\\*[\\s\\S]*?\\*\\//2c,6m:/\\/\\/.*$/2c,6l:/#.*$/2c,6k:/"([^\\\\"\\n]|\\\\.)*"/g,6o:/\'([^\\\\\'\\n]|\\\\.)*\'/g,6p:1f M(\'"([^\\\\\\\\"]|\\\\\\\\.)*"\',"3z"),6s:1f M("\'([^\\\\\\\\\']|\\\\\\\\.)*\'","3z"),6q:/(&1y;|<)!--[\\s\\S]*?--(&1G;|>)/2c,3M:/\\w+:\\/\\/[\\w-.\\/?%&=:@;]*/g,6a:{18:/(&1y;|<)\\?=?/g,1b:/\\?(&1G;|>)/g},69:{18:/(&1y;|<)%=?/g,1b:/%(&1G;|>)/g},6d:{18:/(&1y;|<)\\s*1k.*?(&1G;|>)/2T,1b:/(&1y;|<)\\/\\s*1k\\s*(&1G;|>)/2T}},16:{1H:6(a){6 b(i,k){H e.16.2o(i,k,e.13.1x[k])}O(K c=\'\',d=e.16.2x,h=d.2X,g=0;g";H c},2o:6(a,b,c){H\'<2W>\'+c+""},2b:6(a){K b=a.1F,c=b.1l||"";b=B(p(b,".20",R).1c);K d=6(h){H(h=15(h+"6f(\\\\w+)").X(c))?h[1]:N}("6g");b&&d&&e.16.2x[d].2B(b);a.3N()},2x:{2X:["21","2P"],21:{1H:6(a){I(a.V("2l")!=R)H"";K b=a.V("1t");H e.16.2o(a,"21",b?b:e.13.1x.21)},2B:6(a){a=1E.6j(t(a.1c));a.1l=a.1l.Q("47","")}},2P:{2B:6(){K a="68=0";a+=", 18="+(31.30-33)/2+", 32="+(31.2Z-2Y)/2+", 30=33, 2Z=2Y";a=a.Q(/^,/,"");a=1P.6Z("","38",a);a.2C();K b=a.1E;b.6W(e.13.1x.37);b.6V();a.2C()}}}},35:6(a,b){K c;I(b)c=[b];Y{c=1E.36(e.13.34);O(K d=[],h=0;h(.*?))\\\\]$"),s=1f M("(?<27>[\\\\w-]+)\\\\s*:\\\\s*(?<1T>[\\\\w-%#]+|\\\\[.*?\\\\]|\\".*?\\"|\'.*?\')\\\\s*;?","g");(j=s.X(k))!=N;){K o=j.1T.Q(/^[\'"]|[\'"]$/g,"");I(o!=N&&m.1A(o)){o=m.X(o);o=o.2V.L>0?o.2V.1e(/\\s*,\\s*/):[]}l[j.27]=o}g={1F:g,1n:C(i,l)};g.1n.1D!=N&&d.U(g)}H d},1M:6(a,b){K c=J.35(a,b),d=N,h=e.13;I(c.L!==0)O(K g=0;g")==o-3){m=m.4h(0,o-3);s=R}l=s?m:l}I((i.1t||"")!="")k.1t=i.1t;k.1D=j;d.2Q(k);b=d.2F(l);I((i.1c||"")!="")b.1c=i.1c;i.2G.74(b,i)}}},2E:6(a){w(1P,"4k",6(){e.1M(a)})}};e.2E=e.2E;e.1M=e.1M;e.2L=6(a,b,c){J.1T=a;J.P=b;J.L=a.L;J.23=c;J.1V=N};e.2L.Z.1q=6(){H J.1T};e.4l=6(a){6 b(j,l){O(K m=0;md)1N;Y I(g.P==c.P&&g.L>c.L)a[b]=N;Y I(g.P>=c.P&&g.P\'+c+""},3Q:6(a,b){K c="",d=a.1e("\\n").L,h=2u(J.V("2i-1s")),g=J.V("2z-1s-2t");I(g==R)g=(h+d-1).1q().L;Y I(3R(g)==R)g=0;O(K i=0;i\'+j+"":"")+i)}H a},4f:6(a){H a?"<4a>"+a+"":""},4b:6(a,b){6 c(l){H(l=l?l.1V||g:g)?l+" ":""}O(K d=0,h="",g=J.V("1D",""),i=0;i|&1y;2R\\s*\\/?&1G;/2T;I(e.13.46==R)b=b.Q(h,"\\n");I(e.13.44==R)b=b.Q(h,"");b=b.1e("\\n");h=/^\\s*/;g=4Q;O(K i=0;i0;i++){K k=b[i];I(x(k).L!=0){k=h.X(k);I(k==N){a=a;1N a}g=1Q.4q(k[0].L,g)}}I(g>0)O(i=0;i\'+(J.V("16")?e.16.1H(J):"")+\'<3Z 5z="0" 5H="0" 5J="0">\'+J.4f(J.V("1t"))+"<3T><3P>"+(1u?\'<2d 1g="1u">\'+J.3Q(a)+"":"")+\'<2d 1g="17">\'+b+""},2F:6(a){I(a===N)a="";J.17=a;K b=J.3Y("T");b.3X=J.1H(a);J.V("16")&&w(p(b,".16"),"5c",e.16.2b);J.V("3V-17")&&w(p(b,".17"),"56",f);H b},2Q:6(a){J.1c=""+1Q.5d(1Q.5n()*5k).1q();e.1Y.2A[t(J.1c)]=J;J.1n=C(e.2v,a||{});I(J.V("2k")==R)J.1n.16=J.1n.1u=11},5j:6(a){a=a.Q(/^\\s+|\\s+$/g,"").Q(/\\s+/g,"|");H"\\\\b(?:"+a+")\\\\b"},5f:6(a){J.28={18:{1I:a.18,23:"1k"},1b:{1I:a.1b,23:"1k"},17:1f M("(?<18>"+a.18.1m+")(?<17>.*?)(?<1b>"+a.1b.1m+")","5o")}}};H e}();1j 2e!="1d"&&(2e.1v=1v);',62,441,'||||||function|||||||||||||||||||||||||||||||||||||return|if|this|var|length|XRegExp|null|for|index|replace|true||div|push|getParam|call|exec|else|prototype||false|lastIndex|config|arguments|RegExp|toolbar|code|left|captureNames|slice|right|id|undefined|split|new|class|addToken|indexOf|typeof|script|className|source|params|substr|apply|toString|String|line|title|gutter|SyntaxHighlighter|_xregexp|strings|lt|html|test|OUTSIDE_CLASS|match|brush|document|target|gt|getHtml|regex|global|join|style|highlight|break|concat|window|Math|isRegExp|throw|value|brushes|brushName|space|alert|vars|http|syntaxhighlighter|expandSource|size|css|case|font|Fa|name|htmlScript|dA|can|handler|gm|td|exports|color|in|href|first|discoveredBrushes|light|collapse|object|cache|getButtonHtml|trigger|pattern|getLineHtml|nbsp|numbers|parseInt|defaults|com|items|www|pad|highlighters|execute|focus|func|all|getDiv|parentNode|navigator|INSIDE_CLASS|regexList|hasFlag|Match|useScriptTags|hasNamedCapture|text|help|init|br|input|gi|Error|values|span|list|250|height|width|screen|top|500|tagName|findElements|getElementsByTagName|aboutDialog|_blank|appendChild|charAt|Array|copyAsGlobal|setFlag|highlighter_|string|attachEvent|nodeName|floor|backref|output|the|TypeError|sticky|Za|iterate|freezeTokens|scope|type|textarea|alexgorbatchev|version|margin|2010|005896|gs|regexLib|body|center|align|noBrush|require|childNodes|DTD|xhtml1|head|org|w3|url|preventDefault|container|tr|getLineNumbersHtml|isNaN|userAgent|tbody|isLineHighlighted|quick|void|innerHTML|create|table|links|auto|smart|tab|stripBrs|tabs|bloggerMode|collapsed|plain|getCodeLinesHtml|caption|getMatchesHtml|findMatches|figureOutLineNumbers|removeNestedMatches|getTitleHtml|brushNotHtmlScript|substring|createElement|Highlighter|load|HtmlScript|Brush|pre|expand|multiline|min|Can|ignoreCase|find|blur|extended|toLowerCase|aliases|addEventListener|innerText|textContent|wasn|select|createTextNode|removeChild|option|same|frame|xmlns|dtd|twice|1999|equiv|meta|htmlscript|transitional|1E3|expected|PUBLIC|DOCTYPE|on|W3C|XHTML|TR|EN|Transitional||configured|srcElement|Object|after|run|dblclick|matchChain|valueOf|constructor|default|switch|click|round|execAt|forHtmlScript|token|gimy|functions|getKeywords|1E6|escape|within|random|sgi|another|finally|supply|MSIE|ie|toUpperCase|catch|returnValue|definition|event|border|imsx|constructing|one|Infinity|from|when|Content|cellpadding|flags|cellspacing|try|xhtml|Type|spaces|2930402|hosted_button_id|lastIndexOf|donate|active|development|keep|to|xclick|_s|Xml|please|like|you|paypal|cgi|cmd|webscr|bin|highlighted|scrollbars|aspScriptTags|phpScriptTags|sort|max|scriptScriptTags|toolbar_item|_|command|command_|number|getElementById|doubleQuotedString|singleLinePerlComments|singleLineCComments|multiLineCComments|singleQuotedString|multiLineDoubleQuotedString|xmlComments|alt|multiLineSingleQuotedString|If|https|1em|000|fff|background|5em|xx|bottom|75em|Gorbatchev|large|serif|CDATA|continue|utf|charset|content|About|family|sans|Helvetica|Arial|Geneva|3em|nogutter|Copyright|syntax|close|write|2004|Alex|open|JavaScript|highlighter|July|02|replaceChild|offset|83'.split('|'),0,{})) diff --git a/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/syntaxhighlighter/shLegacy.js b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/syntaxhighlighter/shLegacy.js new file mode 100644 index 00000000..6d9fd4d1 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket8/src/main/webapp/js/syntaxhighlighter/shLegacy.js @@ -0,0 +1,17 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/SyntaxHighlighter + * + * SyntaxHighlighter is donationware. If you are using it, please donate. + * http://alexgorbatchev.com/SyntaxHighlighter/donate.html + * + * @version + * 3.0.83 (July 02 2010) + * + * @copyright + * Copyright (C) 2004-2010 Alex Gorbatchev. + * + * @license + * Dual licensed under the MIT and GPL licenses. + */ +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('3 u={8:{}};u.8={A:4(c,k,l,m,n,o){4 d(a,b){2 a!=1?a:b}4 f(a){2 a!=1?a.E():1}c=c.I(":");3 g=c[0],e={};t={"r":K};M=1;5=8.5;9(3 j R c)e[c[j]]="r";k=f(d(k,5.C));l=f(d(l,5.D));m=f(d(m,5.s));o=f(d(o,5.Q));n=f(d(n,5["x-y"]));2{P:g,C:d(t[e.O],k),D:d(t[e.N],l),s:d({"r":r}[e.s],m),"x-y":d(4(a,b){9(3 h=T S("^"+b+"\\\\[(?\\\\w+)\\\\]$","U"),i=1,p=0;p4q#?|p`Q?;E?{>wY~V1X4FhGJ`M%gWL#2fj~y4 zpoL>%kTD12Sd})lKS=Z z<~y8whP_w*IOo3iT1W=r?CM+h)$Kd%Z+~lj>)UH@;a@mzfaofa>!29Dwi{Y+-8=i# zh5PfbqFJ!1xm$O|7PGM^-CL%i~+ZCFL%okO1*(-BUIIb_(z(s`BhNe0}-H?96efmWarM`ZyWR3 zOXudUy?pQ9-`p`h?Spf9?!7NUh(#pn=Xtc!>rwhJf%g>}AWjsqu(lHT`7!AAlqiA7 zfhsJYfrXPXLc)%Hj`mDWjAt8v$ShyxdHjREo)^l8DHY&A1MHyMUyHeeU~h*YP#%Jr z7hHb%`^MAs)hberbvk)bRW?+WGa?r1G+OKT392FOv@y15fgd0a&K?IN(3*w|_Jh;< zwZcHF1J=O!)|%D457Rpn76S~I3dS%5o`T`C<&EY>`Tmz~eOC3+*4MAmOSnV6^+*i< zbKv9-@Hav7smDF;xfjmO{l)h2@h9}WFH|)us>+E7Mg&zwn&(y=Q@G5pd3 z4;+Pa3x>yDs>F$*w*cTR3uMb^ojT zH@SkhRxi~*;Zt%O2h?#y&dbL~1b5Hnm%F=9o_yv^yZx?9cJIC-N>f(LGFM0djH)UK zQVVWbmZ&P$7}~9tX+^?9$mckEw8BJ+RYPx4XpJi#p)8culY$PQui&YZ#0iKfJ_tU5 zA;%G6-8d`N4XyWNw_b2V`TjzpKeaiz#@s5`>aptY2oG?CN(V#3Z z3abkcD#1{P>evkAtKci}s(7te%uwJ+N{v>c#qwXvm-Jf~y&=21bggH(g2E^U5RJHn zgZgB^bB79u!ovv4ePCY?rHZ`jDLZzwC)@3AQB|=u#wyf&H2^gP3~+X7iL=YgJaGCn z51c(qcQBA7PEe|;+&^xOshuT07|xwkmQRCJ4MWsova$$y38IQPq0>>uT0`2z{k-$} z=tQ|szNyD&E-j8Om#t@YdklLyu~#DTR1)z78+bo=i01(70`m*tE&>1Fckh1F%-Gl; zOpc9(L0NW0grEwlbr3c=W{ly~;v$RPE=%1m!?I+0e4Gn+?~(EG33hDTHeThv&*`78 zvT{xkRief>G>cScw?b@{C>4!dpejmIoA#^ekB+^g|3X>N{WFg%?kzN)Epzh9lZF7X zMHONx8A`&Rn3w6z9Fd9x>dpgqd!54cckH-mB8uMkxY^m+`PEfXRntI%2Bfi;;5{c! zonmb;Aa)KTLSzhkwr|H;BLaGA;Y|By-=7EQl8B-xVH2qJ}=IZk}R=SEU0?F0ZfE^IOON^^JHa-vlbr$0CO`lltsbH(h@&8IWOHo*7ns@f>59; z>r)Xn8$YG;LK#XC6>sfeShilCymj#IZP#bFWzpoVKA6ZT7(;}jVi48F#R;l{B@o0i zXWHBd61W^U5)|`cDBqQ)dv=bG-#k4r;Y#mqVy${rG1lU%3g;ZdEaSwPGXzzv2&fVn zg92;49^EXf!&gM3$Rwvv#)_~2>;q~E2%CTjLZHNAONo}FqP({K?!ni$zk2xTp-r!) zU?9*EL54XBh!`l!8sMg7itr74FV?@}b8^zah7q3GvgH-~W@b9h+94puIT35g%Mv59 z0SquAbvbIDy(+7N0f-5t~F z&%T+N^xA4bCeTKZ%Gbc0-O!64R>FD7NV(6=T+mK4tY^nXRQVh z^`6){vf+@E=g!r@sJ8+}gle>WBI`^xf}u`C6N(OobEqOkpQbw2{{lINq}1qaGCzEV z+^_A~%gXNzq_x+0hBl(5^)g^g156;)OH_rLDMvzVA_#fa_qqEtZ~|1^p<0xy|Ga(s z6%)=~IxLDxoQr&uUn;`F@-mBSYc(qkFxlix8Y~+EAqZkrK*rG&SYlX0pw=b@JUNym zui_sjKQ6A8puaUcSAHz7qSPq42pq^;6#YW*+HP+ z01`Y<){G5{sUHUn z3JOKP9O^LoPPM=%*^%A-*gt%BI=TNl`?TUsejv{d8pk24{A2!JK7Zm$PNRss4*YxC z?YYF5r}VN+C#I%sRhInx)G5kF34I6{V?cF1BsY(T07FD5LXaXT*0G(EV>m!4h!`K{ z>0Rlm;dMKIyZd-+_3tWmQ`AnQC9aMot-zQ3V7SP)i=XpJPDJ-!{%z4v@=U+R`?TP9 z)W`TzA(UFJ6g^{!+kp#!(|iT%04AoUE*Z0Sa;4ud@}h{WwQQT7W?^*|AHv4OH-+XS z0Rt#PpbRPj#R=OfDKU6pJkOF(q#qf+a`L(QSZVV`Q$m0kbB}5uXBqcIEo&kL8iRUm5pyk{X zVi6sdWr#$W-M$^?98nZ;;`C{(wS)%bI;bWj9}ZYkD#WXTm01e9jA6<6Q1a#cjWfTy zdb!j58)}76+PkZs{lf4ke9r&C{&4cU(z;@tr(`P}?5@ed>?hHFHzk->1%p876+;os zpid-1%Q?`xZmI~1@Vmf&ISSqZR3aB?2-1lncJA6GMNv1hmb+a>TN)Y3{N`L^LnXBV zwyvZ;h!Lxm*N%^9+X3Hu{?>cm_Twk-c}^HiJZW{FSB4|p3DP~FOfTNcE9mpCb~kx? zuaqshsgS6GstmqIPQV~Il(g3yEi4Q(XthBFQ*;pn`+nme>3si5^j$NV= zb-N@CX8xod@@H`qzH(&o5t{KEQnX zarx$R+w5C9&YM@(>i{H#t=nd1SnYO2Rk2aT>G}B$l~hHHS@)Kk87oxr4*`rS9<{-v zNyG(TyKB1h$`AH`bl{cpIyc4h{Qc>3&qQuElZ-O6{IPYO_#LtjmI>Ib@+ad1Z5JM8fTpIXBQSYy|6%Me4M4_WkRzFH9#6gH83Ek zQiMRIN*=;50&Cu5MX*8@VV%s#{!bp7xiHFG&!g3PMK3S5E_Qomw&I6l!Ipy2UJ+6t zwu12n;Uj>b))kV$k6L+v&jgB-uJRRqdDF(~4s?s$_Xi;_9x{ z?9@~pZcW$~s#Fa)-6Sk_lh{a8%mZSKXs`qKn$?A*eZ#A=KRR=N_J0O0gcx+HWz%65 zqCpXiZ9H8zs6h?-HB0MXTX#2c4lT;s=_qIjH9+st?K`opltBUK*1>sL_NvUy&eqJ7 zC6y}17^*y{DoYAgh9M9d=^we1NCYQx9)r#1Rt&hc;Jrrx567ED`h9O zZf)p8rAqA3vV?B02Gp!2W|M|#s5NYuA;FJ&?nv6I-ycP2uZyg%FnI3ObT>11whRGh zjOIl_?mb3?6c}U~{Y_#qGR;*8B%|igW?)S|W~y{U(4i6qG@Dg-#Xk&q$9I2^Z){nT zH>|1e8b{%*gkB%%_tBB#7wYh9b-=kg1Q9e%Ax_Xu`$9DaLcIW?Qgm#b<*Vmd-OSu+ zMD*0@({g5UQ6poBnypM%RU0AE(Yb(trj5Wn6j-IoAOwoWhK(De2GT`em2qWXciaBm zul@3i_Izw?o<9;ty1J%iS)!c|5~rw(pgjh0Tmx$?E1fZjVi2<7$aVll8t&Nz)+QeDuH@06^Sqi zL3*lUL~LScMVWj5f7|D8{^rZJ-?g;J2W?6+HbLQ{df`Tb(S#snSx-LCkU_tG7HaN_ z94QMZEA-r1LVpb{bABcO(~Uy`9_V`S+s?V6s(MwiB9tKz8KWX1rK;K{m#U^`IqFda zAZu7075gAU-uzz*>O@Qy)CXZK$?V&2xmfK3*KpHse1S!2^Ui9(&{|RjRgdJu4PYTa zP}B&L=QX?804XaJMXW`-tB6=+YKku`10)y&(66eW79q?l*bstuK;L@?s;qfWzv+?m zL#P2X@$6N#P^BM&Rw1YnK~&X!$BNpToY( zC!-Fj26A5^g8^C;b=Y|iy4^>Rq3fpR*Q{T5z#s%g%HS_MaV;7B?PLv zJFT%X)~jk{q&-gjUq5oeW8U?{=kc#Xm!Fk}sNbW?GQ_$XV7FVlkm0a?Si7O5wP2#X zE+sKcZQ%!pe~V*)aF}4WHZ47cFRg}P&U(*^_o9GpoN^XI-7*l-vIeAiUDQWxb6#nobJpl+47^PEUlF9sJA*zrDw&tz|Ii(oPbz zDv_qMNEFqKJlKR7J!yox31PtcIw7BxvEQzX}OwZ$wS>N85MeI)YGeyd5;G%B5FVe8q(FFAI|Ue zpZMSl_nhpG^Y*f$jU^L7d}wM}!e1y>gN+cZbh1wNi7Ym zSCuY%Z@R%pgHpBH8~*nPUhtT|?Zte2dMmAJct{g=9wZeZSCv5s5}J@TO^s`E znSLWMEo%{Asj670Dzf_QLF;*nSh16rO(Q zqbfYEo$$l^uH=6JhATJD%-7rL^L3+0dU^i7EQI;k7^kXUM51Pn)Gi3ARCQFS*WE}1 z#sZ_<%tN5>Jx+u%YpGP}g}`uAIZ+S?szTH&s!~$3@1oC7-WDH?4~pe}8>3Z;_Z~^w zXnlr@8i(XP!uDOrp2u^mfN&4z9U-rSI}G6v*qctDK3A3HzjO6but!y!O==L(Q78&^ z;U0CLbu{7Hl`seaRi$GssR#q_88k;;PGntdLw?3LeF~&RiZ{@MqO$>zwarks$yvmhdQXX z%Nss;&8`FIw({yYp^arY973q-uhj}aJxR7@CvUz(Hl03f8ozMK=1>Fpl8K3_?)3C= zpkqbULzIQEF5#PscHKQ~HnCyTmu_z7kJw#5U)W^T)=S2yyH=N&EOOHBoRF8i;eS1F z+4v&w?w(~}BHCd>E?jd?8YrnwUC_ImXT(`Eitg5f;hv3eXrSYnP zdXJ`wh(yh*7pnBUXV}!WQ5yoOF9VFa&|wp>%=-=YHm`EM5!O&kd|H({?CuG7-14G5 zU+u2)H_;gFkg+;3M{Cy>{w%$U_w)C-hXV%iuy;6)f*u0%rq$K^UNkZB?bQ%o+%hJK zM7$BPRzx%JC8xGmBXQU~9(txQTFG8hk(1ii)(b)%(!*vK(v%!yfI`$Px5CSx{!h_s z?tc34;>kTcarX}X`iBR2)2T}kuHg|c**xL}l_Q`xLh{bFwI989>(*~CdH)BQs>?&D z3RT;08bh{WYc#>pWY>%Mrdqe=J&_0^TT8CUE$X5IjuIJ#>5klA9pEb=R)vtcv{Ys`pz`7&>dyJOpA9 z4Ip_4#Er$O8i5)8fCswXlNv)R8z;0%T}pQj#D7}{3;wZ6R|Lo>d zC;$8axFh`XJ7AB<+-Teh{uYRC=ys3){?ybLEnI~$+xk^ih=>UwYa!^cDc++kk!!@E zq-HD?p>6A*8!2YD-Yw8>*vnKm&)BPK4kntmCTxM%?AR+GJ^RON?#Pji>yQ83_@&H^ z#^|=*U3>TLI2OVOPI>?GysqUwg2;$aHp=IkT>&BtLs$=6+4S&@z_g4Z+vrrQs(P;) zj7U6Y471KHPQmrBy#M~s{;G3*)Zm~#UOwD}!v}WnKCt5bCvun@hEOyK7EC=u>x{7x z^$kXF+L+yeb(_D>eh5NdK;{zR}$;>(o{ zE3dg|o8B)~5ILLXvtIl5>N#JOOd1Wnqs3o|CH&_3)%k6yk>9%q<*Th*+pP{h`8MfJ zi*YvUmF+Z?t0^x!WMEPBj(9H=gC$Rl(ii9d&)j3 zbTLZUo^$C9pTUfx#bzsWYP%dfFaJ7`%~pJY<=Y|t;J>bqocFORJ8`)y%bsft`MuQV z>{(ffqGR9Jv){6}VE@M8vig|blV9STFXpbA!u05_iEyhlhqkKZ;q9M!rpxs*tJ<*3 zhiWIa`fr}ezEJ&I{ND#6cX8iNm8;zH2RodQ=n#@cCCOr| zTXCYzlEX`7T5ANh+?d0qlI6dJ@sW+nZle@FF~#KRKmX0;w|%=dD0Q*hi_hY5Y{CW4 zrOJiNd#@bdbya1dHCyZRTmE&^ii4i-IJn9!!^(ZV)t=3cyTYEANN&*o!@WvnMVp(G z{s(U^qqZe`enoqQPhO)mduP*#-L_kTKzrv7mI-@Dg3P;OV0 z+>^?;+IITpTAR2zDn5LAd`IV(R$N{5^Homy`Hv1=mC|&FBxtu~Lg@4UcN&B|cVxXe%hnAVv?S=fZxL-Vrp^2_sJA{-bZ z>z> zKgGsI?`g4Czs|(W$iRr~JYW)G2D&RF+G&cYMyt~S#qC>9Yo8yjfwPfwA z__FOSvwctPaoU&=rO7Hf`?L)EoW48GpSg3HG`N>Wh@H&bQ>GZp6P=NEzJCF4QTtMF zyCu^XE;=4q;eAoe&u6Fp<&$m~Ic0x)r`Sfd8H?)QbE`9U3bGFi_@iY1?tkt>-^;Q{1ps`KMkD|L literal 0 HcmV?d00001 diff --git a/wicket/wicked-charts-wicket8/.checkstyle b/wicket/wicked-charts-wicket8/.checkstyle new file mode 100644 index 00000000..75246d34 --- /dev/null +++ b/wicket/wicked-charts-wicket8/.checkstyle @@ -0,0 +1,7 @@ + + + + + + + diff --git a/wicket/wicked-charts-wicket8/build.gradle b/wicket/wicked-charts-wicket8/build.gradle new file mode 100644 index 00000000..6772806a --- /dev/null +++ b/wicket/wicked-charts-wicket8/build.gradle @@ -0,0 +1,8 @@ +dependencies { + compile project(':highcharts-wrapper') + compile project(':chartjs-wrapper') + compile 'org.apache.wicket:wicket-core:8.0.0' + testCompile 'junit:junit:4.12' + compile 'javax.servlet:javax.servlet-api:3.0.1' +} + diff --git a/wicket/wicked-charts-wicket8/eclipse/code-formatter.xml b/wicket/wicked-charts-wicket8/eclipse/code-formatter.xml new file mode 100644 index 00000000..a686fb0b --- /dev/null +++ b/wicket/wicked-charts-wicket8/eclipse/code-formatter.xml @@ -0,0 +1,279 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wicket/wicked-charts-wicket8/eclipse/wicket-charts package distribution.launch b/wicket/wicked-charts-wicket8/eclipse/wicket-charts package distribution.launch new file mode 100644 index 00000000..f954fab3 --- /dev/null +++ b/wicket/wicked-charts-wicket8/eclipse/wicket-charts package distribution.launch @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/JavaScriptExpressionSendingAjaxBehavior.java b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/JavaScriptExpressionSendingAjaxBehavior.java new file mode 100644 index 00000000..0dd7ed9d --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/JavaScriptExpressionSendingAjaxBehavior.java @@ -0,0 +1,102 @@ +/** + * 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.wicket8; + +import org.apache.wicket.ajax.AbstractDefaultAjaxBehavior; +import org.apache.wicket.ajax.attributes.AjaxRequestAttributes; +import org.apache.wicket.request.cycle.RequestCycle; +import org.apache.wicket.request.http.WebRequest; +import org.apache.wicket.util.string.StringValue; + +import java.util.HashMap; +import java.util.Map; + +/** + * This AJAX behavior passes the values of a set of defined javascript variables + * to the server via AJAX. + * + * @author Tom Hombergs (tom.hombergs@gmail.com) + */ +@SuppressWarnings("serial") +public abstract class JavaScriptExpressionSendingAjaxBehavior extends AbstractDefaultAjaxBehavior { + + private final Map javascriptExpressions = new HashMap<>(); + + /** + * Reads the value of the given javascript variable from the AJAX request. + * + * @param parameterName the parameter name of the javascript expression whose value to + * read. The parameterName must have been specified earlier when + * calling {@link #addJavaScriptValue(String, String)}. + * @return the string representation of the javascript expression's value + */ + protected StringValue getVariableValue(String parameterName) { + RequestCycle cycle = RequestCycle.get(); + WebRequest webRequest = (WebRequest) cycle.getRequest(); + StringValue value = webRequest.getRequestParameters().getParameterValue(parameterName); + return value; + } + + @Override + public CharSequence getCallbackScript() { + String script = super.getCallbackScript().toString(); + for (Map.Entry entry : this.javascriptExpressions.entrySet()) { + String expression = entry.getValue(); + script = script.replace("\"" + expression + "\"", expression); + } + return script; + } + + /** + * Adds a javascript expression whose value to be passed from client to + * server. The result value of this expression is sent to the server via AJAX + * and can be accessed using the method {@link #getVariableValue(String)}. A + * javascript variable with the given name must exist within the scope the + * callback script of this behavior is called on the client side! + * + * @param parameterName the name under which the value of the given javascript expression + * can be accessed later + * @param javascriptExpression the javascript expression whose value pass from client to server. + */ + public void addJavaScriptValue(String parameterName, String javascriptExpression) { + this.javascriptExpressions.put(parameterName, javascriptExpression); + } + + /** + * Adds a set of javascript expressions to be passed from client to server. + * + * @param parameterMap a map containing the name of a parameter as key and a javascript + * expression as value + * @see #addJavaScriptValue(String, String) + */ + public void addJavaScriptValues(Map parameterMap) { + for (Map.Entry entry : parameterMap.entrySet()) { + String parameterName = entry.getKey(); + String parameterValue = entry.getValue(); + this.javascriptExpressions.put(parameterName, parameterValue); + } + } + + @Override + protected void updateAjaxAttributes(AjaxRequestAttributes attributes) { + super.updateAjaxAttributes(attributes); + for (Map.Entry entry : this.javascriptExpressions.entrySet()) { + String parameterName = entry.getKey(); + String parameterValue = entry.getValue(); + attributes.getExtraParameters().put(parameterName, parameterValue); + } + } + +} diff --git a/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/JavaScriptResourceRegistry.java b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/JavaScriptResourceRegistry.java new file mode 100644 index 00000000..28025a8d --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/JavaScriptResourceRegistry.java @@ -0,0 +1,313 @@ +/** + * 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.wicket8; + +import org.apache.wicket.markup.head.IHeaderResponse; +import org.apache.wicket.markup.head.JavaScriptReferenceHeaderItem; +import org.apache.wicket.request.resource.ResourceReference; +import org.apache.wicket.resource.JQueryResourceReference; + +/** + * A registry for the JavaScript dependencies used by wicked-charts. By default, + * all JavaScript references will be loaded from the web. If you want to package + * your own JavaScript files or change the URLs, you can do so by calling the + * setter methods from the init() method of your wicket application. + * + * @author Tom Hombergs (tom.hombergs@gmail.com) + */ +public class JavaScriptResourceRegistry { + + public class RegistryEntry { + + private String url; + + private ResourceReference reference; + + public RegistryEntry(final ResourceReference reference) { + this.reference = reference; + } + + public RegistryEntry(final String url) { + this.url = url; + } + + public void addToHeaderResponse(final IHeaderResponse response) { + if (this.url != null) { + response.render(JavaScriptReferenceHeaderItem.forUrl(this.url)); + } else if (this.reference != null) { + response.render(JavaScriptReferenceHeaderItem.forReference(this.reference)); + } else { + throw new IllegalStateException("A RegistryEntry must have at least a non-null url or a non-null reference!"); + } + } + + } + + public static final String DEFAULT_HIGHCHARTS_URL = "http://code.highcharts.com/4.1.10/highcharts.js"; + + public static final String DEFAULT_FUNNEL_URL = "http://code.highcharts.com/4.1.10/modules/funnel.js"; + + public static final String DEFAULT_HEATMAP_URL = "http://code.highcharts.com/4.1.10/modules/heatmap.js"; + + public static final String DEFAULT_HIGHCHARTS_MORE_URL = "http://code.highcharts.com/4.1.10/highcharts-more.js"; + + public static final String DEFAULT_HIGHCHARTS_EXPORTING_URL = "http://code.highcharts.com/4.1.10/modules/exporting.js"; + + public static final String DEFAULT_CHARTJS_BUNDLE_URL = "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.bundle.min.js"; + + public static final String DEFAULT_CHARTJS_URL = "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js"; + + public static final String DEFAULT_MOMENTJS_URL = "https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.min.js"; + + public static JavaScriptResourceRegistry getInstance() { + if (INSTANCE == null) { + INSTANCE = new JavaScriptResourceRegistry(); + } + return INSTANCE; + } + + private RegistryEntry jqueryEntry = new RegistryEntry(JQueryResourceReference.get()); + + private RegistryEntry highchartsEntry = new RegistryEntry(DEFAULT_HIGHCHARTS_URL); + + private RegistryEntry funnelEntry = new RegistryEntry(DEFAULT_FUNNEL_URL); + + private RegistryEntry heatmapEntry = new RegistryEntry(DEFAULT_HEATMAP_URL); + + private RegistryEntry highchartsExportingEntry = new RegistryEntry(DEFAULT_HIGHCHARTS_EXPORTING_URL); + + private RegistryEntry highchartsMoreEntry = new RegistryEntry(DEFAULT_HIGHCHARTS_MORE_URL); + + private RegistryEntry chartJsEntry = new RegistryEntry(DEFAULT_CHARTJS_URL); + + private RegistryEntry chartJsBundleEntry = new RegistryEntry(DEFAULT_CHARTJS_BUNDLE_URL); + + private RegistryEntry momentJsEntry = new RegistryEntry(DEFAULT_MOMENTJS_URL); + + private static JavaScriptResourceRegistry INSTANCE; + + private JavaScriptResourceRegistry() { + + } + + public RegistryEntry getHighchartsEntry() { + return this.highchartsEntry; + } + + public RegistryEntry getHighchartsExportingEntry() { + return this.highchartsExportingEntry; + } + + public RegistryEntry getHighchartsMoreEntry() { + return this.highchartsMoreEntry; + } + + public RegistryEntry getJQueryEntry() { + return this.jqueryEntry; + } + + public RegistryEntry getFunnelEntry() { + return this.funnelEntry; + } + + public RegistryEntry getHeatmapEntry() { + return this.heatmapEntry; + } + + public RegistryEntry getChartJsEntry() { + return this.chartJsEntry; + } + + public RegistryEntry getChartJsBundle() { + return this.chartJsBundleEntry; + } + + public RegistryEntry getMomentJsentry() { + return this.momentJsEntry; + } + + + + /** + * Sets the {@link ResourceReference} to use to load the Highcharts exporting + * javascript library (exporting.js). Use this method if you want to include + * the javascript file in your web application. + * + * @param reference reference a Resource to be used + */ + public void setHighchartsExportingReference(final ResourceReference reference) { + this.highchartsExportingEntry = new RegistryEntry(reference); + } + + /** + * Sets the URL to use to load the Highcharts exporting javascript library + * (exporting.js). Use this method if you want to load the javascript file + * from an external URL. + * + * @param url String which specifies an url + */ + public void setHighchartsExportingReference(final String url) { + this.highchartsExportingEntry = new RegistryEntry(url); + } + + /** + * Sets the {@link ResourceReference} to use to load the Highcharts module "funnel.js". + * Use this method if you want to include the javascript file in your web application. + * + * @param reference reference a Resource to be used + */ + public void setFunnelReference(final ResourceReference reference) { + this.funnelEntry = new RegistryEntry(reference); + } + + /** + * Sets the {@link ResourceReference} to use to load the Highcharts module "heatmap.js". + * Use this method if you want to include the javascript file in your web application. + * + * @param reference reference a Resource to be used + */ + public void setHeatmapReference(final ResourceReference reference) { + this.heatmapEntry = new RegistryEntry(reference); + } + + /** + * Sets the {@link ResourceReference} to use to load the Highcharts "more" + * javascript library (highcharts-more.js). Use this method if you want to + * include the javascript file in your web application. + * + * @param reference reference a Resource to be used + */ + public void setHighchartsMoreReference(final ResourceReference reference) { + this.highchartsMoreEntry = new RegistryEntry(reference); + } + + /** + * Sets the URL to use to load the Highcharts "more" javascript library + * (highcharts-more.js). Use this method if you want to load the javascript + * file from an external URL. + * + * @param url String to specify an url + */ + public void setHighchartsMoreReference(final String url) { + this.highchartsMoreEntry = new RegistryEntry(url); + } + + /** + * Sets the {@link ResourceReference} to use to load the Highcharts javascript + * library (highcharts.js). Use this method if you want to include the + * javascript file in your web application. + * + * @param reference reference a Resource to be used + */ + public void setHighchartsReference(final ResourceReference reference) { + this.highchartsEntry = new RegistryEntry(reference); + } + + /** + * Sets the URL to use to load the Highcharts javascript library + * (highcharts.js). Use this method if you want to load the javascript file + * from an external URL. + * + * @param url String which specifies an url + */ + public void setHighchartsReference(final String url) { + this.highchartsEntry = new RegistryEntry(url); + } + + /** + * Sets the {@link ResourceReference} to use to load JQuery (jquery.js).Use + * this method if you want to include the javascript file in your web + * application. + * + * @param reference reference a Resource to be used + */ + public void setJQueryReference(final ResourceReference reference) { + this.jqueryEntry = new RegistryEntry(reference); + } + + /** + * Sets the URL to use to load JQuery (jquery.js). Use this method if you want + * to load the javascript file from an external URL. + * + * @param url String which specifies an url + */ + public void setJQueryReference(final String url) { + this.jqueryEntry = new RegistryEntry(url); + } + + /** + * Sets the {@link ResourceReference} to use to load Chart.js (chart.min.js).Use + * this method if you want to include the javascript file in your web + * application. + * + * @param reference reference a Resource to be used + */ + public void setChartJsReference(final ResourceReference reference) { + this.chartJsEntry = new RegistryEntry(reference); + } + + /** + * Sets the URL to use to load Chart.js (chart.min.js). Use this method if you want + * to load the javascript file from an external URL. + * + * @param url String which specifies an url + */ + public void setChartJsReference(final String url) { + this.chartJsEntry = new RegistryEntry(url); + } + + /** + * Sets the {@link ResourceReference} to use to load Chart.js bundled (chart.bundle.min.js).Use + * this method if you want to include the javascript file in your web + * application. + * + * @param reference reference a Resource to be used + */ + public void setChartJsBundleReference(final ResourceReference reference) { + this.chartJsBundleEntry= new RegistryEntry(reference); + } + + /** + * Sets the URL to use to load Chart.js bundled (chart.bundle.min.js). Use this method if you want + * to load the javascript file from an external URL. + * + * @param url String which specifies an url + */ + public void setChartJsBundleReference(final String url) { + this.chartJsBundleEntry= new RegistryEntry(url); + } + + /** + * Sets the {@link ResourceReference} to use to load Chart.js bundled (chart.bundle.min.js).Use + * this method if you want to include the javascript file in your web + * application. + * + * @param reference reference a Resource to be used + */ + public void setMomentJsReference(final ResourceReference reference) { + this.momentJsEntry= new RegistryEntry(reference); + } + + /** + * Sets the URL to use to load Chart.js bundled (chart.bundle.min.js). Use this method if you want + * to load the javascript file from an external URL. + * + * @param url String which specifies an url + */ + public void setMomentJsReference(final String url) { + this.momentJsEntry= new RegistryEntry(url); + } + +} diff --git a/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/chartjs/Chart.java b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/chartjs/Chart.java new file mode 100644 index 00000000..b820c41d --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/chartjs/Chart.java @@ -0,0 +1,63 @@ +/** + * 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.wicket8.chartjs; + +import de.adesso.wickedcharts.chartjs.ChartConfiguration; +import de.adesso.wickedcharts.wicket8.chartjs.features.basic.ChartBehavior; +import org.apache.wicket.markup.html.WebMarkupContainer; + +/** + * A simple markup container to set up and display a chart. + * + * + * @author SvenWirz + */ +public class Chart extends WebMarkupContainer { + + private static final long serialVersionUID = 1L; + + private ChartConfiguration options; + + public Chart(final String id, final ChartConfiguration options) { + super(id); + this.options = options; + setOutputMarkupId(true); + add(createChartBehavior()); + } + + public ChartConfiguration getChartConfiguration() { + return this.options; + } + + + public void setChartConfiguration(final ChartConfiguration options) { + this.options = options; + } + + public String getJavaScriptVarName() { + return this.getMarkupId() + "Var"; + } + + /** + * Factory method for {@link ChartBehavior}s. May be overridden, if a custom + * implementation of {@link ChartBehavior} is needed. + * + * @return ChartBehavior object + */ + protected ChartBehavior createChartBehavior() { + return new ChartBehavior(this); + } + +} diff --git a/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/chartjs/JsonRendererFactory.java b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/chartjs/JsonRendererFactory.java new file mode 100644 index 00000000..11b3b216 --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/chartjs/JsonRendererFactory.java @@ -0,0 +1,48 @@ +/** + * 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.wicket8.chartjs; + +import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer; + +/** + * Factory class responsible for creating a {@link JsonRenderer} instance that + * matches the needs of wicked-charts-wicket6. + * + * @author Tom Hombergs (tom.hombergs@gmail.com) + */ +public class JsonRendererFactory { + + private static final JsonRendererFactory INSTANCE = new JsonRendererFactory(); + + private static final JsonRenderer RENDERER = new JsonRenderer(); + + public static JsonRendererFactory getInstance() { + return INSTANCE; + } + + private JsonRendererFactory() { + } + + /** + * Returns the singleton instance of the {@link JsonRenderer} that is + * configured for Wicket 6.x. + * + * @return the singleton {@link JsonRenderer} + */ + public JsonRenderer getRenderer() { + return RENDERER; + } + +} diff --git a/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/chartjs/features/basic/ChartBehavior.java b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/chartjs/features/basic/ChartBehavior.java new file mode 100644 index 00000000..fd61fcfc --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/chartjs/features/basic/ChartBehavior.java @@ -0,0 +1,111 @@ +/** + * 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.wicket8.chartjs.features.basic; + + +import de.adesso.wickedcharts.chartjs.ChartConfiguration; +import de.adesso.wickedcharts.chartjs.chartoptions.Options; +import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer; +import de.adesso.wickedcharts.wicket8.JavaScriptResourceRegistry; +import de.adesso.wickedcharts.wicket8.chartjs.Chart; +import de.adesso.wickedcharts.wicket8.chartjs.JsonRendererFactory; +import org.apache.wicket.Component; +import org.apache.wicket.behavior.Behavior; +import org.apache.wicket.markup.head.IHeaderResponse; +import org.apache.wicket.markup.head.OnDomReadyHeaderItem; + +import java.text.MessageFormat; + +/** + * This behavior takes in an {@link Options} object containing the configuration + * of a chart and calls the proper javascript to display the chart in the + * component to which this behavior is added. + * + * @author Tom Hombergs (tom.hombergs@gmail.com) + */ +public class ChartBehavior extends Behavior { + + private static final long serialVersionUID = 1L; + + private final Chart chart; + + /** + * Constructor. + * + * @param container The chart component + */ + public ChartBehavior(final Chart container) { + this.chart = container; + } + + /** + * Includes the javascript that calls the Highcharts library to visualize the + * chart. + * + * @param response the Wicket HeaderResponse + * @param options the options containing the data to display + * @param renderer the JsonRenderer responsible for rendering the options + * @param markupId the DOM ID of the chart component. + */ + protected void includeChartJavascript(final IHeaderResponse response, final ChartConfiguration options, + final JsonRenderer renderer, final String markupId) { + String chartVarname = this.chart.getJavaScriptVarName(); + String optionsVarname = markupId + "Options"; + String contextVarname = markupId + "ctx"; + String jsonOptions = renderer.toJson(options); + + if(options.getOptionalJavascript() == null) { + response.render(OnDomReadyHeaderItem.forScript(MessageFormat.format( + "var {0} = {1};" + + "var {3} = document.getElementById(\"{4}\").getContext(\"2d\");" + + " window.{2} = new Chart({3},{0});", + optionsVarname, jsonOptions,chartVarname,contextVarname,markupId))); + } + else { + String optionalJavascript = options.getOptionalJavascript(); + String replacedVariablesInOptionalJavascript = optionalJavascript.replace("{0}", contextVarname); + response.render(OnDomReadyHeaderItem.forScript(MessageFormat.format( + "{5} var {0} = {1};" + + "var {3} = document.getElementById(\"{4}\").getContext(\"2d\");" + + " window.{2} = new Chart({3},{0});", + optionsVarname, jsonOptions,chartVarname,contextVarname,markupId,replacedVariablesInOptionalJavascript))); + } + } + + private void includeJavascriptDependencies(final IHeaderResponse response, final ChartConfiguration options) { + JavaScriptResourceRegistry resourceRegistry = JavaScriptResourceRegistry.getInstance(); + resourceRegistry.getJQueryEntry().addToHeaderResponse(response); + resourceRegistry.getChartJsBundle().addToHeaderResponse(response); + resourceRegistry.getMomentJsentry().addToHeaderResponse(response); + } + + @Override + public void onConfigure(final Component component) { + super.onConfigure(component); + } + + @Override + public void renderHead(final Component component, final IHeaderResponse response) { + component.setOutputMarkupId(true); + final String id = component.getMarkupId(); + ChartConfiguration options = this.chart.getChartConfiguration(); + + JsonRenderer renderer = JsonRendererFactory.getInstance().getRenderer(); + includeJavascriptDependencies(response, options); + + includeChartJavascript(response, options, renderer, id); + } + +} diff --git a/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/Chart.java b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/Chart.java new file mode 100644 index 00000000..84a7d49c --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/Chart.java @@ -0,0 +1,179 @@ +/** + * 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.wicket8.highcharts; + +import de.adesso.wickedcharts.highcharts.options.Options; +import de.adesso.wickedcharts.highcharts.theme.Theme; +import de.adesso.wickedcharts.wicket8.highcharts.features.basic.ChartBehavior; +import org.apache.wicket.markup.html.WebMarkupContainer; +import org.apache.wicket.request.resource.JavaScriptResourceReference; + +/** + * A simple markup container to display a chart. A chart can be provided with + * the following data: + *
        + *
      • options: the options define the content of the chart and + * can also define the look and feel of the chart to a given extent. The + * {@link Options} class is very similar in structure to the Highcharts API. See + * http://api.highcharts.com/ + * highcharts for more information of what all the options mean.
      • + *
      • theme: the theme defines the look and feel of a chart. + * If no theme is provided, the default theme of Highcharts is used. A + * {@link Theme} can contain any configuration an {@link Options} object, so it + * acts as a template for creating charts. It should contain all the + * configurations common to all the charts you want to display. Note that a + * theme is set globally, so all charts on one page have the same theme! + *
      + * Please note that due to a bug in the Highcharts javascript library, + * it is currently not possible to change the theme of a chart via + * AJAX. If you do this, only the configuration options defined in the + * new theme are overridden. Any configuration options defined in the old theme + * and not in the new theme will stay active. + * + * @author Tom Hombergs (tom.hombergs@gmail.com) + */ +public class Chart extends WebMarkupContainer { + + private static final long serialVersionUID = 1L; + + private Options options; + + private Theme theme; + + private JavaScriptResourceReference themeReference; + + private String themeUrl; + + public Chart(final String id, final Options options) { + this(id, options, null); + } + + public Chart(final String id, final Options options, final Theme theme) { + super(id); + + this.options = options; + this.setTheme(theme); + setOutputMarkupId(true); + add(createChartBehavior()); + } + + public Options getOptions() { + return this.options; + } + + public Theme getTheme() { + return this.theme; + } + + public JavaScriptResourceReference getThemeReference() { + return this.themeReference; + } + + public String getThemeUrl() { + return this.themeUrl; + } + + public void setOptions(final Options options) { + this.options = options; + } + + /** + * Sets the theme for this chart by specifying a reference to a javascript + * file containing the theme. The javascript file must contain the following + * code:
      
      +     * Highcharts.setOptions(myOptions);
      +     * 
      where myOptions is a JSON representation of the + * theme options. + * + * A theme can only be set via one setTheme method. An + * {@link IllegalStateException} will be thrown if you call two setTheme + * methods. + * + * @param theme reference to a javascript file containing a theme. + * @see http://www.highcharts.com/demo + */ + public void setTheme(final JavaScriptResourceReference theme) { + if (this.theme != null || this.themeUrl != null) { + throw new IllegalStateException( + "A theme can only be defined once. Calling different setTheme methods is not allowed!"); + } + this.themeReference = theme; + } + + /** + * Sets the theme for this chart by specifying a URL to a javascript file + * containing the theme. The javascript file must contain the following code: + *
      
      +     * Highcharts.setOptions(myOptions);
      +     * 
      where myOptions is a JSON representation of the + * theme options. + * + * A theme can only be set via one setTheme method. An + * {@link IllegalStateException} will be thrown if you call two setTheme + * methods. + * + * @param themeUrl reference to a javascript file containing a theme. + * @see http://www.highcharts.com/demo + */ + public void setTheme(final String themeUrl) { + if (this.themeReference != null || this.theme != null) { + throw new IllegalStateException( + "A theme can only be defined once. Calling different setTheme methods is not allowed!"); + } + this.themeUrl = themeUrl; + } + + /** + * Sets the theme for this chart by specifying a theme class. + * + * A theme can only be set via one setTheme method. An + * {@link IllegalStateException} will be thrown if you call two setTheme + * methods. + * + * @param theme the theme class. + */ + public void setTheme(final Theme theme) { + if (this.themeReference != null || this.themeUrl != null) { + throw new IllegalStateException( + "A theme can only be defined once. Calling different setTheme methods is not allowed!"); + } + this.theme = theme; + } + + public void setThemeReference(final JavaScriptResourceReference themeReference) { + this.themeReference = themeReference; + } + + public void setThemeUrl(final String themeUrl) { + this.themeUrl = themeUrl; + } + + public String getJavaScriptVarName() { + return this.getMarkupId() + "Var"; + } + + /** + * Factory method for {@link ChartBehavior}s. May be overridden, if a custom + * implementation of {@link ChartBehavior} is needed. + * + * @return ChartBehavior object + */ + protected ChartBehavior createChartBehavior() { + return new ChartBehavior(this); + } + +} diff --git a/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/JsonRendererFactory.java b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/JsonRendererFactory.java new file mode 100644 index 00000000..3b218c15 --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/JsonRendererFactory.java @@ -0,0 +1,48 @@ +/** + * 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.wicket8.highcharts; + +import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer; + +/** + * Factory class responsible for creating a {@link JsonRenderer} instance that + * matches the needs of wicked-charts-wicket6. + * + * @author Tom Hombergs (tom.hombergs@gmail.com) + */ +public class JsonRendererFactory { + + private static final JsonRendererFactory INSTANCE = new JsonRendererFactory(); + + private static final JsonRenderer RENDERER = new JsonRenderer(); + + public static JsonRendererFactory getInstance() { + return INSTANCE; + } + + private JsonRendererFactory() { + } + + /** + * Returns the singleton instance of the {@link JsonRenderer} that is + * configured for Wicket 6.x. + * + * @return the singleton {@link JsonRenderer} + */ + public JsonRenderer getRenderer() { + return RENDERER; + } + +} diff --git a/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/basic/ChartBehavior.java b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/basic/ChartBehavior.java new file mode 100644 index 00000000..2d186646 --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/basic/ChartBehavior.java @@ -0,0 +1,165 @@ +/** + * 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.wicket8.highcharts.features.basic; + +import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer; +import de.adesso.wickedcharts.highcharts.options.Options; +import de.adesso.wickedcharts.highcharts.options.processing.*; +import de.adesso.wickedcharts.highcharts.options.util.OptionsUtil; +import de.adesso.wickedcharts.wicket8.JavaScriptResourceRegistry; +import de.adesso.wickedcharts.wicket8.highcharts.Chart; +import de.adesso.wickedcharts.wicket8.highcharts.JsonRendererFactory; +import de.adesso.wickedcharts.wicket8.highcharts.features.drilldown.DrilldownProcessor; +import de.adesso.wickedcharts.wicket8.highcharts.features.global.GlobalProcessor; +import de.adesso.wickedcharts.wicket8.highcharts.features.interaction.InteractionProcessor; +import de.adesso.wickedcharts.wicket8.highcharts.features.livedata.LiveDataProcessor; +import de.adesso.wickedcharts.wicket8.highcharts.features.selection.SelectionProcessor; +import org.apache.wicket.Component; +import org.apache.wicket.behavior.Behavior; +import org.apache.wicket.markup.head.IHeaderResponse; +import org.apache.wicket.markup.head.JavaScriptReferenceHeaderItem; +import org.apache.wicket.markup.head.OnDomReadyHeaderItem; + +import java.text.MessageFormat; + +/** + * This behavior takes in an {@link Options} object containing the configuration + * of a chart and calls the proper javascript to display the chart in the + * component to which this behavior is added. + * + * @author Tom Hombergs (tom.hombergs@gmail.com) + */ +public class ChartBehavior extends Behavior { + + private static final long serialVersionUID = 1L; + + private final Chart chart; + + private static final Feature[] SUPPORTED_FEATURES = new Feature[]{ + + Feature.DRILLDOWN, + + Feature.GLOBAL, + + Feature.INTERACTION, + + Feature.LIVEDATA, + + Feature.SELECTION + + }; + + /** + * Constructor. + * + * @param container The chart component + */ + public ChartBehavior(final Chart container) { + this.chart = container; + } + + private void addTheme(final IHeaderResponse response, final JsonRenderer renderer) { + if (this.chart.getTheme() != null) { + response.render(OnDomReadyHeaderItem.forScript(MessageFormat.format("Highcharts.setOptions({0});", + renderer.toJson(this.chart.getTheme())))); + } else if (this.chart.getThemeUrl() != null) { + response.render(JavaScriptReferenceHeaderItem.forUrl(this.chart.getThemeUrl())); + } else if (this.chart.getThemeReference() != null) { + response.render(JavaScriptReferenceHeaderItem.forReference(this.chart.getThemeReference())); + } + } + + /** + * Includes the javascript that calls the Highcharts library to visualize the + * chart. + * + * @param response the Wicket HeaderResponse + * @param options the options containing the data to display + * @param renderer the JsonRenderer responsible for rendering the options + * @param markupId the DOM ID of the chart component. + */ + protected void includeChartJavascript(final IHeaderResponse response, final Options options, + final JsonRenderer renderer, final String markupId) { + String chartVarname = this.chart.getJavaScriptVarName(); + String optionsVarname = markupId + "Options"; + response + .render(OnDomReadyHeaderItem.forScript(MessageFormat.format( + "var {0} = {1};window.{2} = new Highcharts.Chart({0});", optionsVarname, renderer.toJson(options), + chartVarname))); + } + + private void includeJavascriptDependencies(final IHeaderResponse response, final Options options) { + JavaScriptResourceRegistry resourceRegistry = JavaScriptResourceRegistry.getInstance(); + resourceRegistry.getJQueryEntry().addToHeaderResponse(response); + resourceRegistry.getHighchartsEntry().addToHeaderResponse(response); + if (OptionsUtil.needsExportingJs(options)) { + resourceRegistry.getHighchartsExportingEntry().addToHeaderResponse(response); + } + if (OptionsUtil.needsHighchartsMoreJs(options)) { + resourceRegistry.getHighchartsMoreEntry().addToHeaderResponse(response); + } + if (OptionsUtil.needsFunnelJs(options)) { + resourceRegistry.getFunnelEntry().addToHeaderResponse(response); + } + if (OptionsUtil.needsHeatmapJs(options)) { + resourceRegistry.getHeatmapEntry().addToHeaderResponse(response); + } + } + + @Override + public void onConfigure(final Component component) { + super.onConfigure(component); + OptionsProcessorContext context = new OptionsProcessorContext(this.chart.getOptions()); + + IOptionsProcessor featureProcessor = new FeatureCheckingOptionsProcessor(SUPPORTED_FEATURES); + featureProcessor.processOptions(this.chart.getOptions(), context); + + IOptionsProcessor idProcessor = new IdGeneratorProcessor(); + idProcessor.processOptions(this.chart.getOptions(), context); + + LiveDataProcessor liveDataProcessor = new LiveDataProcessor(component); + liveDataProcessor.processOptions(this.chart.getOptions(), context); + + InteractionProcessor interactionProcessor = new InteractionProcessor(this.chart); + interactionProcessor.processOptions(this.chart.getOptions(), context); + + SelectionProcessor selectionProcessor = new SelectionProcessor(this.chart); + selectionProcessor.processOptions(this.chart.getOptions(), context); + } + + @Override + public void renderHead(final Component component, final IHeaderResponse response) { + + component.setOutputMarkupId(true); + Options options = this.chart.getOptions(); + final String id = component.getMarkupId(); + OptionsUtil.getInstance().setRenderTo(options, id); + + JsonRenderer renderer = JsonRendererFactory.getInstance().getRenderer(); + includeJavascriptDependencies(response, options); + addTheme(response, renderer); + + OptionsProcessorContext context = new OptionsProcessorContext(options); + + DrilldownProcessor drilldownProcessor = new DrilldownProcessor(component, response); + drilldownProcessor.processOptions(options, context); + + GlobalProcessor globalProcessor = new GlobalProcessor(response); + globalProcessor.processOptions(options, context); + + includeChartJavascript(response, options, renderer, id); + } + +} diff --git a/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/drilldown/DrilldownProcessor.java b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/drilldown/DrilldownProcessor.java new file mode 100644 index 00000000..624da6f1 --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/drilldown/DrilldownProcessor.java @@ -0,0 +1,124 @@ +/** + * 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.wicket8.highcharts.features.drilldown; + +import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer; +import de.adesso.wickedcharts.highcharts.options.*; +import de.adesso.wickedcharts.highcharts.options.drilldown.DrilldownFunction; +import de.adesso.wickedcharts.highcharts.options.drilldown.DrilldownPoint; +import de.adesso.wickedcharts.highcharts.options.processing.IOptionsProcessor; +import de.adesso.wickedcharts.highcharts.options.processing.OptionsProcessorContext; +import de.adesso.wickedcharts.highcharts.options.util.OptionsUtil; +import de.adesso.wickedcharts.wicket8.highcharts.JsonRendererFactory; +import org.apache.wicket.Component; +import org.apache.wicket.markup.head.IHeaderResponse; +import org.apache.wicket.markup.head.JavaScriptHeaderItem; +import org.apache.wicket.markup.head.OnDomReadyHeaderItem; +import org.apache.wicket.request.resource.JavaScriptResourceReference; + +import java.text.MessageFormat; + +/** + * This processor adds drilldown functionality to a chart. It searches the given + * options for {@link DrilldownPoint#drilldownOptions}. If any drilldown options are + * found, they are serialized in a special global javascript variable. This + * variable is referenced in a javascript function that is inserted at + * {@link PlotOptions}. + * + * This class is not part of the public API! Use {@link DrilldownPoint}s to + * enable drilldown in your charts. + * + * @author Tom Hombergs (tom.hombergs@gmail.com) + */ +public class DrilldownProcessor implements IOptionsProcessor { + + /** + * Name of the javascript array containing all drilldown options. + */ + private static final String JS_DRILLDOWN_ARRAY_NAME = "drilldownOptions"; + + private final Component component; + + private final IHeaderResponse response; + + public DrilldownProcessor(Component component, IHeaderResponse response) { + this.component = component; + this.response = response; + } + + @Override + public void processOptions(Options options, OptionsProcessorContext context) { + if (!context.getDrilldownOptions().isEmpty()) { + modifyDrilldownOptions(options, context); + addDrilldownOptionsArray(context); + addJavascriptDependencies(response); + } + } + + private void modifyDrilldownOptions(Options options, OptionsProcessorContext context) { + for (Options drilldownOptions : context.getDrilldownOptions()) { + OptionsUtil.getInstance().copyRenderTo(options, drilldownOptions); + addDrilldownFunction(drilldownOptions, context); + } + } + + /** + * Adds the drilldown options stored in the context to a javascript array. + */ + private void addDrilldownOptionsArray(OptionsProcessorContext context) { + JsonRenderer renderer = JsonRendererFactory.getInstance().getRenderer(); + response.render(JavaScriptHeaderItem.forScript( + MessageFormat.format("var {0};\n var {1};", JS_DRILLDOWN_ARRAY_NAME, getDrilldownArrayName(component)), + JS_DRILLDOWN_ARRAY_NAME + "-init")); + response.render(OnDomReadyHeaderItem.forScript(MessageFormat.format("{0} = {1};", getDrilldownArrayName(component), + renderer.toJson(context.getDrilldownOptions())))); + } + + /** + * Resolves the needed javascript dependencies. + */ + private void addJavascriptDependencies(IHeaderResponse headerResponse) { + headerResponse.render(JavaScriptHeaderItem.forReference(new JavaScriptResourceReference(DrilldownFunction.class, + "drilldown.js"))); + } + + /** + * Adds a {@link DrilldownFunction} to the {@link PlotOptions} of the given + * {@link Options}. + * + * @param options the {@link Options} to add a {@link DrilldownFunction} to + */ + private void addDrilldownFunction(Options options, OptionsProcessorContext context) { + SeriesType chartType = options.getChartOptions().getType(); + if (options.getPlotOptions() == null) { + options.setPlotOptions(new PlotOptionsChoice()); + } + if (options.getPlotOptions().getPlotOptions(chartType) == null) { + options.getPlotOptions().setPlotOptions(new PlotOptions(), chartType); + } + if (options.getPlotOptions().getPlotOptions(chartType).getPoint() == null) { + options.getPlotOptions().getPlotOptions(chartType).setPoint(new PointOptions()); + } + if (options.getPlotOptions().getPlotOptions(chartType).getPoint().getEvents() == null) { + options.getPlotOptions().getPlotOptions(chartType).getPoint().setEvents(new Events()); + } + options.getPlotOptions().getPlotOptions(chartType).getPoint().getEvents() + .setClick(new DrilldownFunction(getDrilldownArrayName(component))); + } + + private String getDrilldownArrayName(Component component) { + return component.getMarkupId() + "_" + JS_DRILLDOWN_ARRAY_NAME; + } +} diff --git a/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/global/GlobalProcessor.java b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/global/GlobalProcessor.java new file mode 100644 index 00000000..f2fa352f --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/global/GlobalProcessor.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.wicket8.highcharts.features.global; + +import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer; +import de.adesso.wickedcharts.highcharts.options.Global; +import de.adesso.wickedcharts.highcharts.options.Options; +import de.adesso.wickedcharts.highcharts.options.processing.IOptionsProcessor; +import de.adesso.wickedcharts.highcharts.options.processing.OptionsProcessorContext; +import de.adesso.wickedcharts.wicket8.highcharts.JsonRendererFactory; +import org.apache.wicket.markup.head.IHeaderResponse; +import org.apache.wicket.markup.head.JavaScriptHeaderItem; + +/** + * This processor reads the global options from an {@link Options} object and + * calls Highcharts' setOptions function to use the options globally for all + * charts. + * + * If more than one chart with global options are on a single page, the global + * options of the last chart override all others! + * + * @author Tom Hombergs (tom.hombergs@gmail.com) + */ +public class GlobalProcessor implements IOptionsProcessor { + + private IHeaderResponse response; + + public GlobalProcessor(IHeaderResponse response) { + this.response = response; + } + + @Override + public void processOptions(Options options, OptionsProcessorContext context) { + Global global = context.getGlobal(); + if (global != null) { + JsonRenderer renderer = JsonRendererFactory.getInstance().getRenderer(); + String globalJson = renderer.toJson(global); + response.render(JavaScriptHeaderItem.forScript("Highcharts.setOptions({global: " + globalJson + "});", + "highcharts-global")); + } + } + +} diff --git a/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/interaction/InteractionBehavior.java b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/interaction/InteractionBehavior.java new file mode 100644 index 00000000..6d00359e --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/interaction/InteractionBehavior.java @@ -0,0 +1,88 @@ +/** + * 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.wicket8.highcharts.features.interaction; + +import de.adesso.wickedcharts.highcharts.options.Options; +import de.adesso.wickedcharts.highcharts.options.interaction.InteractionEvent; +import de.adesso.wickedcharts.highcharts.options.series.Point; +import de.adesso.wickedcharts.highcharts.options.series.Series; +import de.adesso.wickedcharts.highcharts.options.util.OptionsUtil; +import de.adesso.wickedcharts.wicket8.JavaScriptExpressionSendingAjaxBehavior; +import de.adesso.wickedcharts.wicket8.highcharts.Chart; +import de.adesso.wickedcharts.wicket8.highcharts.features.livedata.LiveDataAjaxBehavior; +import org.apache.wicket.Component; +import org.apache.wicket.ajax.AjaxRequestTarget; +import org.apache.wicket.markup.head.IHeaderResponse; +import org.apache.wicket.markup.head.JavaScriptHeaderItem; +import org.apache.wicket.request.resource.JavaScriptResourceReference; +import org.apache.wicket.util.string.StringValue; + +public abstract class InteractionBehavior extends JavaScriptExpressionSendingAjaxBehavior { + + private static final String SELECTED_POINT = "selectedPoint"; + + private static final String SELECTED_SERIES = "selectedSeries"; + + public InteractionBehavior() { + addJavaScriptValue(SELECTED_SERIES, "WickedCharts.Interaction.getSelectedSeries(this)"); + addJavaScriptValue(SELECTED_POINT, "WickedCharts.Interaction.getSelectedPoint(this)"); + } + + @Override + protected void respond(final AjaxRequestTarget target) { + Chart chart = (Chart) getComponent(); + Options options = chart.getOptions(); + + InteractionEvent event = new InteractionEvent(); + event.setJavascriptChartName(chart.getJavaScriptVarName()); + + StringValue selectedPointValue = getVariableValue(SELECTED_POINT); + if (selectedPointValue != null && !"".equals(selectedPointValue.toString())) { + Integer selectedPoint = selectedPointValue.toInteger(); + Point point = OptionsUtil.getPointWithWickedChartsId(options, selectedPoint); + event.setSelectedPoint(point); + } + + StringValue selectedSeriesValue = getVariableValue(SELECTED_SERIES); + if (selectedSeriesValue != null && !"".equals(selectedSeriesValue.toString())) { + Integer selectedSeries = selectedSeriesValue.toInteger(); + Series series = OptionsUtil.getSeriesWithWickedChartsId(options, selectedSeries); + event.setSelectedSeries(series); + } + + event.setSelectedChart(options); + + onEvent(event, target); + } + + public abstract void onEvent(final InteractionEvent event, final AjaxRequestTarget target); + + @Override + protected void onBind() { + super.onBind(); + if (!(getComponent() instanceof Chart)) { + throw new IllegalStateException(LiveDataAjaxBehavior.class.getSimpleName() + + " can only be bound to components of type " + Chart.class.getSimpleName() + "."); + } + } + + @Override + public void renderHead(final Component component, final IHeaderResponse response) { + super.renderHead(component, response); + response.render(JavaScriptHeaderItem.forReference(new JavaScriptResourceReference(InteractionBehavior.class, + "InteractionBehavior.js"))); + } + +} diff --git a/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/interaction/InteractionBehavior.js b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/interaction/InteractionBehavior.js new file mode 100644 index 00000000..5f90f44b --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/interaction/InteractionBehavior.js @@ -0,0 +1,59 @@ +/** + * @namespace Root namespace of Wicked Charts. + */ +var WickedCharts = WickedCharts || {}; + +/** + * @namespace Namespace of the Interaction module of Wicked Charts. + */ +WickedCharts.Interaction = {}; + +/** + * Retrieves the wickedChartsId of the series the given object belongs to. + * + * @param highchartsObject the Highcharts object whose series to determine. + * Must either be a Point or a Series object, otherwise the result is null. + * @see http://api.highcharts.com/highcharts#Series + * @see http://api.highcharts.com/highcharts#Point + */ +WickedCharts.Interaction.getSelectedSeries = function (highchartsObject) { + var objectType = WickedCharts.Interaction.getObjectType(highchartsObject); + if (objectType == 'point') { + return highchartsObject.series.options.wickedChartsId; + } else if (objectType == 'series') { + return highchartsObject.options.wickedChartsId; + } else { + return null; + } +}; + +/** + * Retrieves the wickedChartsId of the point the given object belongs to. + * + * @param highchartsObject the Highcharts object whose point to determine. + * Must be a Point object, otherwise the result is null + * @see http://api.highcharts.com/highcharts#Point + */ +WickedCharts.Interaction.getSelectedPoint = function (highchartsObject) { + var objectType = WickedCharts.Interaction.getObjectType(highchartsObject); + if (objectType == 'point') { + return highchartsObject.wickedChartsId; + } else { + return null; + } +}; + +/** + * Determines the type of the given object. Returns 'point' if the object + * is a point, 'series' if the object is a series and null if it is none + * of the above. + */ +WickedCharts.Interaction.getObjectType = function (object) { + if (object != null && object.series != null && typeof object.series == 'object') { + return 'point'; + } else if (object != null && object.chart != null && typeof object.chart == 'object') { + return 'series'; + } else { + return null; + } +} \ No newline at end of file diff --git a/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/interaction/InteractionProcessor.java b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/interaction/InteractionProcessor.java new file mode 100644 index 00000000..d5f22373 --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/interaction/InteractionProcessor.java @@ -0,0 +1,64 @@ +/** + * 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.wicket8.highcharts.features.interaction; + +import de.adesso.wickedcharts.highcharts.options.Options; +import de.adesso.wickedcharts.highcharts.options.interaction.InteractionEvent; +import de.adesso.wickedcharts.highcharts.options.interaction.InteractionFunction; +import de.adesso.wickedcharts.highcharts.options.processing.IOptionsProcessor; +import de.adesso.wickedcharts.highcharts.options.processing.OptionsProcessorContext; +import de.adesso.wickedcharts.wicket8.highcharts.Chart; +import org.apache.wicket.ajax.AjaxRequestTarget; + +import java.io.Serializable; +import java.util.List; + +/** + * {@link IOptionsProcessor} enabling the Client/Server Interaction for Wicket + * 6. + * + * @author Tom Hombergs (tom.hombergs@gmail.com) + */ +public class InteractionProcessor implements IOptionsProcessor, Serializable { + + private final Chart chart; + + public InteractionProcessor(final Chart chart) { + this.chart = chart; + } + + @Override + public void processOptions(final Options options, final OptionsProcessorContext context) { + + List functions = context.getInteractionFunctions(); + for (final InteractionFunction function : functions) { + + // add server side AJAX event + InteractionBehavior interactionBehavior = new InteractionBehavior() { + @Override + public void onEvent(final InteractionEvent event, final AjaxRequestTarget target) { + WicketInteractionEvent wicketEvent = new WicketInteractionEvent(target, event); + function.onInteraction(wicketEvent); + } + }; + this.chart.add(interactionBehavior); + + // add client side javascript to trigger an AJAX call + String functionBody = interactionBehavior.getCallbackScript().toString(); + function.setFunction(functionBody); + } + } + +} diff --git a/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/interaction/WicketInteractionEvent.java b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/interaction/WicketInteractionEvent.java new file mode 100644 index 00000000..97b50493 --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/interaction/WicketInteractionEvent.java @@ -0,0 +1,90 @@ +/** + * 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.wicket8.highcharts.features.interaction; + +import de.adesso.wickedcharts.highcharts.options.Options; +import de.adesso.wickedcharts.highcharts.options.interaction.InteractionEvent; +import de.adesso.wickedcharts.highcharts.options.series.Point; +import de.adesso.wickedcharts.highcharts.options.series.Series; +import org.apache.wicket.ajax.AjaxRequestTarget; + +/** + * Wicket-specific extension of {@link InteractionEvent}. + * + * @author Tom Hombergs (tom.hombergs@gmail.com) + */ +public class WicketInteractionEvent extends InteractionEvent { + + private AjaxRequestTarget ajaxRequestTarget; + + private final InteractionEvent wrappedEvent; + + WicketInteractionEvent(final AjaxRequestTarget ajaxRequestTarget, final InteractionEvent wrappedEvent) { + this.wrappedEvent = wrappedEvent; + this.setAjaxRequestTarget(ajaxRequestTarget); + } + + public void setAjaxRequestTarget(final AjaxRequestTarget ajaxRequestTarget) { + this.ajaxRequestTarget = ajaxRequestTarget; + } + + /** + * Returns the {@link AjaxRequestTarget} that is connected to the AJAX request + * that was triggered by interacting with a chart. + * + * @return the Wicket {@link AjaxRequestTarget}. + */ + public AjaxRequestTarget getAjaxRequestTarget() { + return this.ajaxRequestTarget; + } + + @Override + public Options getSelectedChart() { + return this.wrappedEvent.getSelectedChart(); + } + + @Override + public Point getSelectedPoint() { + return this.wrappedEvent.getSelectedPoint(); + } + + @Override + public Series getSelectedSeries() { + return this.wrappedEvent.getSelectedSeries(); + } + + @Override + public void setSelectedChart(final Options selectedChart) { + this.wrappedEvent.setSelectedChart(selectedChart); + } + + @Override + public void setSelectedPoint(final Point selectedPoint) { + this.wrappedEvent.setSelectedPoint(selectedPoint); + } + + ; + + @Override + public void setSelectedSeries(final Series selectedSeries) { + this.wrappedEvent.setSelectedSeries(selectedSeries); + } + + @Override + public String getJavascriptChartName() { + return this.wrappedEvent.getJavascriptChartName(); + } + +} diff --git a/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/livedata/LiveDataAjaxBehavior.java b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/livedata/LiveDataAjaxBehavior.java new file mode 100644 index 00000000..5fd19e93 --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/livedata/LiveDataAjaxBehavior.java @@ -0,0 +1,127 @@ +/** + * 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.wicket8.highcharts.features.livedata; + +import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer; +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.highcharts.options.util.OptionsUtil; +import de.adesso.wickedcharts.wicket8.JavaScriptExpressionSendingAjaxBehavior; +import de.adesso.wickedcharts.wicket8.highcharts.Chart; +import de.adesso.wickedcharts.wicket8.highcharts.JsonRendererFactory; +import org.apache.wicket.Component; +import org.apache.wicket.ajax.AjaxRequestTarget; +import org.apache.wicket.markup.head.HeaderItem; +import org.apache.wicket.markup.head.IHeaderResponse; +import org.apache.wicket.markup.head.JavaScriptHeaderItem; +import org.apache.wicket.markup.head.OnDomReadyHeaderItem; + +import java.text.MessageFormat; + +/** + * This Behavior adds javascript functionality to a chart that allows live + * updating of a {@link LiveDataSeries} via AJAX. + * + * @author Tom Hombergs (tom.hombergs@gmail.com) + */ +public class LiveDataAjaxBehavior extends JavaScriptExpressionSendingAjaxBehavior { + + private static final long serialVersionUID = 1L; + + private final LiveDataSeries series; + + private boolean firstRendering = true; + + public LiveDataAjaxBehavior(final LiveDataSeries series) { + this.series = series; + } + + @Override + protected void respond(final AjaxRequestTarget target) { + Chart chart = (Chart) getComponent(); + int seriesIndex = OptionsUtil.getSeriesIndex(chart.getOptions(), this.series.getWickedChartsId()); + LiveDataUpdateEvent event = new LiveDataUpdateEvent(); + event.setJavascriptChartName(chart.getJavaScriptVarName()); + event.setParameters(createJavascriptParameters()); + WicketLiveDataUpdateEvent wicketEvent = new WicketLiveDataUpdateEvent(target, event); + final Point point = this.series.update(wicketEvent); + if (point != null) { + JsonRenderer renderer = JsonRendererFactory.getInstance().getRenderer(); + String jsonPoint = renderer.toJson(point); + String javaScript = "var chartVarName = " + ((Chart) getComponent()).getJavaScriptVarName() + ";\n"; + javaScript += "var seriesIndex = " + seriesIndex + ";\n"; + javaScript += "eval(chartVarName).series[seriesIndex].addPoint(" + jsonPoint + ", true, true);\n"; + target.appendJavaScript(javaScript); + } + } + + @Override + public void renderHead(final Component component, final IHeaderResponse response) { + super.renderHead(component, response); + if (this.firstRendering) { + response.render(getIntervalDeclarationHeaderItem()); + this.firstRendering = false; + } else { + response.render(getClearIntervalHeaderItem()); + } + } + + private HeaderItem getClearIntervalHeaderItem() { + String varName = getIntervalJavaScriptVarName(); + String javaScript = MessageFormat.format("if(!(typeof {0} === \"undefined\"))'{'\n" + "clearInterval({0});\n" + + "'}'", varName); + return OnDomReadyHeaderItem.forScript(javaScript); + } + + private HeaderItem getIntervalDeclarationHeaderItem() { + String varName = getIntervalJavaScriptVarName(); + String javaScript = MessageFormat.format("var {0};", varName); + return JavaScriptHeaderItem.forScript(javaScript, varName + "-declaration"); + } + + protected String getIntervalJavaScriptVarName() { + Chart chart = (Chart) getComponent(); + int seriesIndex = OptionsUtil.getSeriesIndex(chart.getOptions(), this.series.getWickedChartsId()); + return getComponent().getMarkupId() + "SeriesInterval" + seriesIndex; + } + + protected void reset() { + this.firstRendering = true; + } + + public LiveDataSeries getSeries() { + return this.series; + } + + @Override + protected void onBind() { + super.onBind(); + if (!(getComponent() instanceof Chart)) { + throw new IllegalStateException(LiveDataAjaxBehavior.class.getSimpleName() + + " can only be bound to components of type " + Chart.class.getSimpleName() + "."); + } + } + + private JavaScriptParameters createJavascriptParameters() { + return new JavaScriptParameters() { + @Override + public String getParameterValue(final String parameterName) { + return LiveDataAjaxBehavior.this.getVariableValue(parameterName).toString(); + } + }; + } +} diff --git a/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/livedata/LiveDataFunction.java b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/livedata/LiveDataFunction.java new file mode 100644 index 00000000..ab636226 --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/livedata/LiveDataFunction.java @@ -0,0 +1,52 @@ +/** + * 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.wicket8.highcharts.features.livedata; + +import de.adesso.wickedcharts.highcharts.options.Function; +import de.adesso.wickedcharts.highcharts.options.Options; +import de.adesso.wickedcharts.highcharts.options.livedata.LiveDataSeries; +import de.adesso.wickedcharts.highcharts.options.util.OptionsUtil; + +import java.text.MessageFormat; + +/** + * This javascript function starts a javascript timer to update a + * {@link LiveDataSeries}. + * + * @author Tom Hombergs (tom.hombergs@gmail.com) + */ +public class LiveDataFunction extends Function { + + private static final long serialVersionUID = 1L; + + private String createJavascript(final Options options, final LiveDataAjaxBehavior behavior) { + int seriesIndex = OptionsUtil.getSeriesIndex(options, behavior.getSeries().getWickedChartsId()); + String interval = String.valueOf(behavior.getSeries().getUpdateIntervalMs()); + String intervalVarName = behavior.getIntervalJavaScriptVarName(); + String functionBody = "var series = this.series[" + seriesIndex + "];\n"; + functionBody += MessageFormat.format("if(!(typeof {0} === \"undefined\"))'{'clearInterval({0});'}'", + intervalVarName); + functionBody += intervalVarName + " = setInterval(function(series){\n"; + functionBody += behavior.getCallbackScript(); + functionBody += "}, " + interval + ");"; + return functionBody; + } + + public void addLiveDataSeries(final Options options, final LiveDataAjaxBehavior behavior) { + String javascript = createJavascript(options, behavior); + setFunction(getBody() + "\n\n" + javascript); + } + +} diff --git a/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/livedata/LiveDataProcessor.java b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/livedata/LiveDataProcessor.java new file mode 100644 index 00000000..42ea6307 --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/livedata/LiveDataProcessor.java @@ -0,0 +1,75 @@ +/** + * 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.wicket8.highcharts.features.livedata; + +import de.adesso.wickedcharts.highcharts.options.IProcessableOption; +import de.adesso.wickedcharts.highcharts.options.Options; +import de.adesso.wickedcharts.highcharts.options.livedata.LiveDataSeries; +import de.adesso.wickedcharts.highcharts.options.processing.IOptionsProcessor; +import de.adesso.wickedcharts.highcharts.options.processing.OptionsProcessorContext; +import de.adesso.wickedcharts.highcharts.options.util.OptionsUtil; +import org.apache.wicket.Component; + +import java.util.List; + +/** + * This processor reads all {@link LiveDataSeries} from an {@link Options} + * object and adds a {@link LiveDataAjaxBehavior} to the chart. + * + * @author Tom Hombergs (tom.hombergs@gmail.com) + */ +public class LiveDataProcessor implements IOptionsProcessor { + + private final Component component; + + public LiveDataProcessor(final Component component) { + this.component = component; + } + + @Override + public void processOptions(final Options options, final OptionsProcessorContext context) { + List processables = options.getMarkedForProcessing(LiveDataSeries.PROCESSING_KEY); + LiveDataFunction function = new LiveDataFunction(); + if (processables.size() > 1) { + throw new RuntimeException("Only one LiveDataSeries per chart allowed!"); + } + for (IProcessableOption processable : processables) { + LiveDataSeries series = (LiveDataSeries) processable; + + LiveDataAjaxBehavior behavior = getBehaviorFromComponent(this.component, series); + if (behavior == null) { + behavior = new LiveDataAjaxBehavior(series); + this.component.add(behavior); + } + behavior.addJavaScriptValues(series.getJavaScriptParameters()); + function.addLiveDataSeries(options, behavior); + } + OptionsUtil.getInstance().setChartEventsLoad(options, function); + } + + private LiveDataAjaxBehavior getBehaviorFromComponent(final Component component, final LiveDataSeries series) { + List behaviors = component.getBehaviors(LiveDataAjaxBehavior.class); + + for (LiveDataAjaxBehavior behavior : behaviors) { + if (behavior.getSeries().getWickedChartsId().equals(series.getWickedChartsId())) { + behavior.reset(); + return behavior; + } + } + + return null; + } + +} diff --git a/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/livedata/WicketLiveDataUpdateEvent.java b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/livedata/WicketLiveDataUpdateEvent.java new file mode 100644 index 00000000..b0cc1c4f --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/livedata/WicketLiveDataUpdateEvent.java @@ -0,0 +1,66 @@ +/** + * 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.wicket8.highcharts.features.livedata; + +import de.adesso.wickedcharts.highcharts.options.livedata.JavaScriptParameters; +import de.adesso.wickedcharts.highcharts.options.livedata.LiveDataUpdateEvent; +import org.apache.wicket.ajax.AjaxRequestTarget; + +/** + * Wicket-specific extension of {@link LiveDataUpdateEvent}. + * + * @author Tom Hombergs (tom.hombergs@gmail.com) + */ +public class WicketLiveDataUpdateEvent extends LiveDataUpdateEvent { + + private AjaxRequestTarget ajaxRequestTarget; + + private final LiveDataUpdateEvent wrappedEvent; + + public WicketLiveDataUpdateEvent(final AjaxRequestTarget ajaxRequestTarget, final LiveDataUpdateEvent wrappedEvent) { + this.wrappedEvent = wrappedEvent; + this.setAjaxRequestTarget(ajaxRequestTarget); + } + + public void setAjaxRequestTarget(final AjaxRequestTarget ajaxRequestTarget) { + this.ajaxRequestTarget = ajaxRequestTarget; + } + + /** + * Returns the {@link AjaxRequestTarget} that is connected to the AJAX request + * that was triggered by interacting with a chart. + * + * @return the Wicket {@link AjaxRequestTarget}. + */ + public AjaxRequestTarget getAjaxRequestTarget() { + return this.ajaxRequestTarget; + } + + @Override + public void setParameters(final JavaScriptParameters parameters) { + this.wrappedEvent.setParameters(parameters); + } + + @Override + public JavaScriptParameters getParameters() { + return this.wrappedEvent.getParameters(); + } + + @Override + public String getJavascriptChartName() { + return this.wrappedEvent.getJavascriptChartName(); + } + +} diff --git a/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/selection/JsonSelection.java b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/selection/JsonSelection.java new file mode 100644 index 00000000..4c020879 --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/selection/JsonSelection.java @@ -0,0 +1,48 @@ +/** + * 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.wicket8.highcharts.features.selection; + +public class JsonSelection { + + private Integer wickedChartsId; + + private Number min; + + private Number max; + + public Integer getWickedChartsId() { + return this.wickedChartsId; + } + + public void setWickedChartsId(final Integer wickedChartsId) { + this.wickedChartsId = wickedChartsId; + } + + public Number getMin() { + return this.min; + } + + public void setMin(final Number min) { + this.min = min; + } + + public Number getMax() { + return this.max; + } + + public void setMax(final Number max) { + this.max = max; + } +} \ No newline at end of file diff --git a/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/selection/JsonSelectionEvent.java b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/selection/JsonSelectionEvent.java new file mode 100644 index 00000000..c1d0ec5d --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/selection/JsonSelectionEvent.java @@ -0,0 +1,38 @@ +/** + * 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.wicket8.highcharts.features.selection; + +import java.util.ArrayList; +import java.util.List; + +/** + * Helper class that is used as a container for deserialized JSON. + * + * @author Tom Hombergs (tom.hombergs@gmail.com) + */ +public class JsonSelectionEvent { + + private final List xAxes = new ArrayList(); + + private final List yAxes = new ArrayList(); + + public List getxAxes() { + return this.xAxes; + } + + public List getyAxes() { + return this.yAxes; + } +} diff --git a/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/selection/SelectionBehavior.java b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/selection/SelectionBehavior.java new file mode 100644 index 00000000..cc80137a --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/selection/SelectionBehavior.java @@ -0,0 +1,94 @@ +/** + * 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.wicket8.highcharts.features.selection; + +import de.adesso.wickedcharts.highcharts.jackson.JsonRenderer; +import de.adesso.wickedcharts.highcharts.options.Options; +import de.adesso.wickedcharts.highcharts.options.interaction.Selection; +import de.adesso.wickedcharts.highcharts.options.interaction.SelectionEvent; +import de.adesso.wickedcharts.highcharts.options.util.OptionsUtil; +import de.adesso.wickedcharts.wicket8.JavaScriptExpressionSendingAjaxBehavior; +import de.adesso.wickedcharts.wicket8.highcharts.Chart; +import de.adesso.wickedcharts.wicket8.highcharts.JsonRendererFactory; +import de.adesso.wickedcharts.wicket8.highcharts.features.livedata.LiveDataAjaxBehavior; +import org.apache.wicket.Component; +import org.apache.wicket.ajax.AjaxRequestTarget; +import org.apache.wicket.markup.head.IHeaderResponse; +import org.apache.wicket.markup.head.JavaScriptHeaderItem; +import org.apache.wicket.request.resource.JavaScriptResourceReference; +import org.apache.wicket.util.string.StringValue; + +public abstract class SelectionBehavior extends JavaScriptExpressionSendingAjaxBehavior { + + private static final String SELECTION_EVENT = "selectionEvent"; + + public SelectionBehavior() { + addJavaScriptValue(SELECTION_EVENT, "WickedCharts.Selection.selectionEventToJson(selectionEvent)"); + } + + @Override + protected void respond(final AjaxRequestTarget target) { + Chart chart = (Chart) getComponent(); + Options options = chart.getOptions(); + + SelectionEvent event = new SelectionEvent(); + event.setJavascriptChartName(chart.getJavaScriptVarName()); + + StringValue selectionEventJson = getVariableValue(SELECTION_EVENT); + if (selectionEventJson != null && !"".equals(selectionEventJson.toString())) { + JsonRenderer renderer = JsonRendererFactory.getInstance().getRenderer(); + JsonSelectionEvent jsonEvent = renderer.fromJson(selectionEventJson.toString(), JsonSelectionEvent.class); + + for (JsonSelection jsonSelection : jsonEvent.getxAxes()) { + Selection selection = mapJsonSelection(options, jsonSelection); + event.getxAxes().add(selection); + } + + for (JsonSelection jsonSelection : jsonEvent.getyAxes()) { + Selection selection = mapJsonSelection(options, jsonSelection); + event.getyAxes().add(selection); + } + } + + onSelection(event, target); + } + + private Selection mapJsonSelection(final Options options, final JsonSelection jsonSelection) { + Selection selection = new Selection(); + selection.setMax(jsonSelection.getMax()); + selection.setMin(jsonSelection.getMin()); + selection.setAxis(OptionsUtil.getAxisWithWickedChartsId(options, jsonSelection.getWickedChartsId())); + return selection; + } + + public abstract void onSelection(final SelectionEvent event, final AjaxRequestTarget target); + + @Override + protected void onBind() { + super.onBind(); + if (!(getComponent() instanceof Chart)) { + throw new IllegalStateException(LiveDataAjaxBehavior.class.getSimpleName() + + " can only be bound to components of type " + Chart.class.getSimpleName() + "."); + } + } + + @Override + public void renderHead(final Component component, final IHeaderResponse response) { + super.renderHead(component, response); + response.render(JavaScriptHeaderItem.forReference(new JavaScriptResourceReference(SelectionBehavior.class, + "SelectionBehavior.js"))); + } + +} diff --git a/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/selection/SelectionBehavior.js b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/selection/SelectionBehavior.js new file mode 100644 index 00000000..9584c1b6 --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/selection/SelectionBehavior.js @@ -0,0 +1,40 @@ +/** + * @namespace Root namespace of Wicked Charts. + */ +var WickedCharts = WickedCharts || {}; + +/** + * @namespace Namespace of the Selection module of Wicked Charts. + */ +WickedCharts.Selection = {}; + +WickedCharts.Selection.selectionEventToJson = function (selectionEvent) { + var wickedChartsEvent = {}; + wickedChartsEvent.xAxes = []; + wickedChartsEvent.yAxes = []; + + // convert all xAxes from highcharts event to WickedCharts event + if (!(selectionEvent.xAxis === undefined)) { + selectionEvent.xAxis.map(function (xAxis) { + console.log(xAxis); + wickedChartsEvent.xAxes.push({ + wickedChartsId: xAxis.axis.options.wickedChartsId, + min: xAxis.min, + max: xAxis.max + }); + }); + } + + // convert all yAxes from highcharts event to WickedCharts event + if (!(selectionEvent.yAxis === undefined)) { + selectionEvent.yAxis.map(function (yAxis) { + wickedChartsEvent.yAxes.push({ + wickedChartsId: yAxis.axis.options.wickedChartsId, + min: yAxis.min, + max: yAxis.max + }); + }); + } + + return JSON.stringify(wickedChartsEvent); +} diff --git a/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/selection/SelectionProcessor.java b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/selection/SelectionProcessor.java new file mode 100644 index 00000000..3aacf14c --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/selection/SelectionProcessor.java @@ -0,0 +1,58 @@ +/** + * 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.wicket8.highcharts.features.selection; + +import de.adesso.wickedcharts.highcharts.options.Options; +import de.adesso.wickedcharts.highcharts.options.interaction.SelectionEvent; +import de.adesso.wickedcharts.highcharts.options.interaction.SelectionFunction; +import de.adesso.wickedcharts.highcharts.options.processing.IOptionsProcessor; +import de.adesso.wickedcharts.highcharts.options.processing.OptionsProcessorContext; +import de.adesso.wickedcharts.wicket8.highcharts.Chart; +import org.apache.wicket.ajax.AjaxRequestTarget; + +import java.io.Serializable; +import java.util.List; + +public class SelectionProcessor implements IOptionsProcessor, Serializable { + + private final Chart chart; + + public SelectionProcessor(final Chart chart) { + this.chart = chart; + } + + @Override + public void processOptions(final Options options, final OptionsProcessorContext context) { + + List functions = context.getSelectionFunctions(); + for (final SelectionFunction function : functions) { + + // add server side AJAX event + SelectionBehavior selectionBehavior = new SelectionBehavior() { + @Override + public void onSelection(final SelectionEvent event, final AjaxRequestTarget target) { + WicketSelectionEvent wicketEvent = new WicketSelectionEvent(target, event); + function.onSelect(wicketEvent); + } + }; + this.chart.add(selectionBehavior); + + // add client side javascript to trigger an AJAX call + String functionBody = selectionBehavior.getCallbackScript().toString(); + function.setFunction(functionBody); + } + } + +} diff --git a/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/selection/WicketSelectionEvent.java b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/selection/WicketSelectionEvent.java new file mode 100644 index 00000000..aff7e97e --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/highcharts/features/selection/WicketSelectionEvent.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.wicket8.highcharts.features.selection; + +import de.adesso.wickedcharts.highcharts.options.interaction.SelectionEvent; +import org.apache.wicket.ajax.AjaxRequestTarget; + +/** + * Wicket-specific extension of {@link SelectionEvent}. + * + * @author Tom Hombergs (tom.hombergs@gmail.com) + */ +public class WicketSelectionEvent extends SelectionEvent { + + private AjaxRequestTarget ajaxRequestTarget; + + WicketSelectionEvent(final AjaxRequestTarget ajaxRequestTarget, final SelectionEvent sourceEvent) { + this.setAjaxRequestTarget(ajaxRequestTarget); + this.xAxes = sourceEvent.getxAxes(); + this.yAxes = sourceEvent.getyAxes(); + } + + public void setAjaxRequestTarget(final AjaxRequestTarget ajaxRequestTarget) { + this.ajaxRequestTarget = ajaxRequestTarget; + } + + /** + * Returns the {@link AjaxRequestTarget} that is connected to the AJAX request + * that was triggered by interacting with a chart. + * + * @return the Wicket {@link AjaxRequestTarget}. + */ + public AjaxRequestTarget getAjaxRequestTarget() { + return this.ajaxRequestTarget; + } + +} diff --git a/wicket/wicked-charts-wicket8/src/main/resources/LICENSE b/wicket/wicked-charts-wicket8/src/main/resources/LICENSE new file mode 100644 index 00000000..7a4a3ea2 --- /dev/null +++ b/wicket/wicked-charts-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/wicket/wicked-charts-wicket8/src/main/resources/NOTICE b/wicket/wicked-charts-wicket8/src/main/resources/NOTICE new file mode 100644 index 00000000..dcc02470 --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/resources/NOTICE @@ -0,0 +1,12 @@ + 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. diff --git a/wicket/wicked-charts-wicket8/src/main/resources/de/adesso/wickedcharts/highcharts/options/LanguageOptions_de.properties b/wicket/wicked-charts-wicket8/src/main/resources/de/adesso/wickedcharts/highcharts/options/LanguageOptions_de.properties new file mode 100644 index 00000000..2fda2d65 --- /dev/null +++ b/wicket/wicked-charts-wicket8/src/main/resources/de/adesso/wickedcharts/highcharts/options/LanguageOptions_de.properties @@ -0,0 +1,29 @@ +# +# Copyright 2012-2018 Wicked Charts (tom.hombergs@gmail.com) +# +# 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. +# + +decimalPoint=, +downloadPNG=Als PNG herunterladen +downloadJPEG=Als JPEG herunterladen +downloadPDF=Als PDF herunterladen +downloadSVG=Als SVG herunterladen +exportButtonTitle=Exportieren +loading=Ladevorgang... +months=Januar,Februar,M�rz,April,Mai,Juni,Juli,August,September,Oktober,November,Dezember +shortMonths=Jan,Feb,Mrz,Apr,Mai,Jun,Jul,Aug,Sep,Okt,Nov,Dez +printButtonTitle=Drucken +resetZoom=Zoom zur�cksetzen +resetZoomTitle=Zoom zur�cksetzen +thousandsSep=, +weekdays=Montag,Dienstag,Mittwoch,Donnerstag,Freitag,Samstag,Sonntag \ No newline at end of file From 1dc7e2d0b3ef52368ae53af9838ad4245d4219e5 Mon Sep 17 00:00:00 2001 From: max Date: Sat, 9 Jun 2018 20:21:57 +0200 Subject: [PATCH 12/23] Updated the README --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index af8e01f9..c2ec162e 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,9 @@ 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) From 3a7a4156fb7da3413126a5b9c432c0aa3289f7ea Mon Sep 17 00:00:00 2001 From: max Date: Sat, 9 Jun 2018 20:40:59 +0200 Subject: [PATCH 13/23] Updated the README --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index c2ec162e..0f3ed6b0 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,19 @@ Adding Wicked-Charts as a dependency ================= 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.0.0' +} +``` + Wicket 7.x --------- Gradle: From 10e4101801c80251d554e165638dbb1497319bef Mon Sep 17 00:00:00 2001 From: max Date: Sat, 9 Jun 2018 20:41:26 +0200 Subject: [PATCH 14/23] Updated the README --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 0f3ed6b0..1c7f53eb 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,16 @@ dependencies { } ``` +Maven: +```xml + + de.adesso.wicked-charts + wicked-charts-wicket8 + 3.0.0 + pom + +``` + Wicket 7.x --------- Gradle: From 63aa57d270397cab69b195a7b873c733ebf156fd Mon Sep 17 00:00:00 2001 From: max Date: Sun, 10 Jun 2018 10:06:15 +0200 Subject: [PATCH 15/23] made the URLs in all showcases much nicer and prettier --- README.md | 1 + .../links/SplineUpdatingChartLink.java | 35 -------- .../showcase/links/UpdateChartJsLink.java | 9 +- .../showcase/ShowcaseApplication.java | 4 +- .../links/SplineUpdatingChartLink.java | 35 -------- .../showcase/links/UpdateChartJsLink.java | 7 +- .../showcase/links/UpdateChartLink.java | 88 ------------------- .../showcase/links/UpdateHighchartLink.java | 7 +- .../showcase/links/UpdateThemeLink.java | 7 +- .../links/SplineUpdatingChartLink.java | 35 -------- .../showcase/links/UpdateChartJsLink.java | 7 +- .../showcase/links/UpdateHighchartLink.java | 7 +- .../showcase/links/UpdateThemeLink.java | 7 +- .../showcase/ShowcaseApplication.java | 4 +- .../links/SplineUpdatingChartLink.java | 35 -------- .../showcase/links/UpdateChartJsLink.java | 7 +- .../showcase/links/UpdateHighchartLink.java | 7 +- .../showcase/links/UpdateThemeLink.java | 7 +- .../build.gradle | 3 +- .../showcase/ShowcaseApplication.java | 4 +- .../links/SplineUpdatingChartLink.java | 35 -------- .../showcase/links/UpdateChartJsLink.java | 5 +- .../showcase/links/UpdateHighchartLink.java | 5 +- .../showcase/links/UpdateThemeLink.java | 5 +- 24 files changed, 49 insertions(+), 317 deletions(-) delete mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java delete mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java delete mode 100644 showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartLink.java delete mode 100644 showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java delete mode 100644 showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java delete mode 100644 showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java diff --git a/README.md b/README.md index 1c7f53eb..a439dc6a 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,7 @@ Maven: 3.0.0 pom + ``` Wicket 7.x diff --git a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java b/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java deleted file mode 100644 index 15de7c15..00000000 --- a/showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java +++ /dev/null @@ -1,35 +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; - -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-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 index 4019fcb9..49535eb8 100644 --- 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 @@ -16,15 +16,14 @@ import de.adesso.wickedcharts.showcase.HomepageChartJs; import org.apache.wicket.PageParameters; -import org.apache.wicket.ajax.AjaxRequestTarget; -import org.apache.wicket.ajax.markup.html.AjaxLink; +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 AjaxLink { +public class UpdateChartJsLink extends Link { private static final long serialVersionUID = 1L; @@ -42,9 +41,9 @@ 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(new HomepageChartJs(params)); + setResponsePage(HomepageChartJs.class, params); } } 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 8f4fc73d..d2c2f3cf 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 @@ -42,8 +42,8 @@ public void init() { .getInstance() .setJQueryReference("js/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)); } diff --git a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java b/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java deleted file mode 100644 index 15de7c15..00000000 --- a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java +++ /dev/null @@ -1,35 +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; - -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-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 index 9a918981..e3413d75 100644 --- 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 @@ -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-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 1cf44146..00000000 --- a/showcase/wicked-charts-showcase-wicket15/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateChartLink.java +++ /dev/null @@ -1,88 +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.showcase.ShowcaseSession; -import de.adesso.wickedcharts.showcase.StringFromResourceModel; -import de.adesso.wickedcharts.wicket15.highcharts.Chart; -import org.apache.wicket.ajax.AjaxRequestTarget; -import org.apache.wicket.ajax.markup.html.AjaxLink; -import org.apache.wicket.markup.html.basic.Label; - -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 index 0b788524..cf9d82c9 100644 --- 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 @@ -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 UpdateHighchartLink extends AjaxLink { +public class UpdateHighchartLink extends Link { private static final long serialVersionUID = 1L; @@ -45,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-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 index a611b842..b86794c8 100644 --- 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 @@ -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-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 15de7c15..00000000 --- a/showcase/wicked-charts-showcase-wicket6/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java +++ /dev/null @@ -1,35 +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; - -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-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 index 9a918981..e3413d75 100644 --- 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 @@ -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-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 index 0b788524..cf9d82c9 100644 --- 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 @@ -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 UpdateHighchartLink extends AjaxLink { +public class UpdateHighchartLink extends Link { private static final long serialVersionUID = 1L; @@ -45,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-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 index a611b842..b86794c8 100644 --- 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 @@ -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/ShowcaseApplication.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseApplication.java index daef77a0..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 @@ -50,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/links/SplineUpdatingChartLink.java b/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java deleted file mode 100644 index 15de7c15..00000000 --- a/showcase/wicked-charts-showcase-wicket7/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java +++ /dev/null @@ -1,35 +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; - -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 0b788524..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 @@ -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 UpdateHighchartLink extends AjaxLink { +public class UpdateHighchartLink extends Link { private static final long serialVersionUID = 1L; @@ -45,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-wicket8/build.gradle b/showcase/wicked-charts-showcase-wicket8/build.gradle index ee04641d..119b2f8f 100644 --- a/showcase/wicked-charts-showcase-wicket8/build.gradle +++ b/showcase/wicked-charts-showcase-wicket8/build.gradle @@ -46,7 +46,8 @@ bootRun { jvmArgs '-Xdebug', '-Dserver.port=8080', '-Dwicket.configurationType=DEVELOPMENT', - '-Dspring.jpa.hibernate.ddl-auto=update' + '-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/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseApplication.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/ShowcaseApplication.java index 15249a11..344c4c6c 100644 --- 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 @@ -50,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-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java deleted file mode 100644 index 15de7c15..00000000 --- a/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/links/SplineUpdatingChartLink.java +++ /dev/null @@ -1,35 +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; - -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-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 index 9a918981..2738eed5 100644 --- 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 @@ -17,6 +17,7 @@ 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 +25,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 +43,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-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 index 0b788524..1f69099b 100644 --- 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 @@ -17,6 +17,7 @@ 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 +25,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; @@ -45,7 +46,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-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 index a611b842..77465817 100644 --- 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 @@ -17,6 +17,7 @@ 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 +25,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 +45,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); From ef01979838a96e8f92649566a62ac75971b54eb0 Mon Sep 17 00:00:00 2001 From: max Date: Sun, 10 Jun 2018 11:04:33 +0200 Subject: [PATCH 16/23] tidied up the gradle configurations and fixed some bugs --- showcase/gradle.properties | 6 +--- .../build.gradle | 13 +++---- .../gradle.properties | 1 + .../build.gradle | 12 ++++--- .../gradle.properties | 1 + .../showcase/HomepageHighcharts.html | 2 +- .../showcase/HomepageHighcharts.java | 2 -- .../showcase/ShowcaseApplication.java | 1 + .../links/HighchartsShowcaseLink.java | 5 ++- .../build.gradle | 13 ++++--- .../gradle.properties | 1 + .../showcase/HomepageHighcharts.html | 2 +- .../showcase/HomepageHighcharts.java | 2 -- .../showcase/ShowcaseApplication.java | 4 +-- .../build.gradle | 5 ++- .../gradle.properties | 1 + .../showcase/HomepageHighcharts.html | 2 +- .../showcase/HomepageHighcharts.java | 2 -- .../build.gradle | 35 ++++++++++--------- .../gradle.properties | 1 + .../showcase/HomepageHighcharts.html | 2 +- .../showcase/HomepageHighcharts.java | 2 -- 22 files changed, 54 insertions(+), 61 deletions(-) create mode 100644 showcase/wicked-charts-showcase-wicket14/gradle.properties create mode 100644 showcase/wicked-charts-showcase-wicket15/gradle.properties create mode 100644 showcase/wicked-charts-showcase-wicket6/gradle.properties create mode 100644 showcase/wicked-charts-showcase-wicket7/gradle.properties create mode 100644 showcase/wicked-charts-showcase-wicket8/gradle.properties diff --git a/showcase/gradle.properties b/showcase/gradle.properties index afe04c52..1324eebf 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.0.0 \ No newline at end of file diff --git a/showcase/wicked-charts-showcase-wicket14/build.gradle b/showcase/wicked-charts-showcase-wicket14/build.gradle index 2abaac70..b32209ba 100644 --- a/showcase/wicked-charts-showcase-wicket14/build.gradle +++ b/showcase/wicked-charts-showcase-wicket14/build.gradle @@ -1,14 +1,12 @@ import org.apache.tools.ant.filters.ReplaceTokens dependencies { - compile 'org.apache.wicket:wicket:1.4.22' - compile 'de.adesso.wicked-charts:wicked-charts-wicket14:3.0.0' compile project(':wicked-charts-showcase-options') - testCompile 'junit:junit:4.12' compile 'commons-io:commons-io:2.4' + compile group: 'org.apache.wicket', name: 'wicket-extensions', version: "${wicket_spring_version}" compile( - [group: 'org.apache.wicket', name: 'wicket-spring', version: "1.4.22"], + [group: 'org.apache.wicket', name: 'wicket-spring', version: "${wicket_spring_version}"], [group: 'de.adesso.wicked-charts', name: 'wicked-charts-wicket14', version: "${wicketcharts_version}"], ) compile( @@ -37,7 +35,7 @@ processResources { from 'src/main/java' from 'src/main/resources' filter(ReplaceTokens, tokens: [projectVersion : wicketcharts_version]) - filter(ReplaceTokens, tokens: [wicketVersion : "1.4.22"]) + filter(ReplaceTokens, tokens: [wicketVersion : wicket_spring_version]) } bootRun { @@ -46,9 +44,7 @@ bootRun { 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' - + '-Dspring.jpa.hibernate.ddl-auto=update' } @@ -67,4 +63,3 @@ bootRun { - diff --git a/showcase/wicked-charts-showcase-wicket14/gradle.properties b/showcase/wicked-charts-showcase-wicket14/gradle.properties new file mode 100644 index 00000000..59d7373e --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket14/gradle.properties @@ -0,0 +1 @@ +wicket_spring_version=1.4.23 \ No newline at end of file diff --git a/showcase/wicked-charts-showcase-wicket15/build.gradle b/showcase/wicked-charts-showcase-wicket15/build.gradle index d45ae4ce..03eac9bf 100644 --- a/showcase/wicked-charts-showcase-wicket15/build.gradle +++ b/showcase/wicked-charts-showcase-wicket15/build.gradle @@ -1,14 +1,13 @@ import org.apache.tools.ant.filters.ReplaceTokens dependencies { - compile 'org.apache.wicket:wicket-core:1.5.10' - compile 'de.adesso.wicked-charts:wicked-charts-wicket15: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 group: 'org.apache.wicket', name: 'wicket-extensions', version: "${wicket_spring_version}" compile( - [group: 'org.apache.wicket', name: 'wicket-spring', version: "1.5.10"], + [group: 'org.apache.wicket', name: 'wicket-spring', version: "${wicket_spring_version}"], [group: 'de.adesso.wicked-charts', name: 'wicked-charts-wicket15', version: "${wicketcharts_version}"], ) compile( @@ -37,7 +36,7 @@ processResources { from 'src/main/java' from 'src/main/resources' filter(ReplaceTokens, tokens: [projectVersion : wicketcharts_version]) - filter(ReplaceTokens, tokens: [wicketVersion : "1.5.10"]) + filter(ReplaceTokens, tokens: [wicketVersion : wicket_spring_version]) } bootRun { @@ -62,3 +61,6 @@ bootRun { + + + diff --git a/showcase/wicked-charts-showcase-wicket15/gradle.properties b/showcase/wicked-charts-showcase-wicket15/gradle.properties new file mode 100644 index 00000000..e915a560 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket15/gradle.properties @@ -0,0 +1 @@ +wicket_spring_version=1.5.10 \ No newline at end of file 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 index 9337fd75..8396861c 100644 --- 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 @@ -188,7 +188,7 @@

      Wicked Charts

    • Skies
    • Gray
    • Dark Blue
    • -
    • Dark Green
    • +
    • Dark Green
    • 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 index e93ae9cb..75319ed1 100644 --- 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 @@ -66,7 +66,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)); @@ -74,7 +73,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)); } } 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 d2c2f3cf..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 @@ -19,6 +19,7 @@ import org.apache.wicket.protocol.http.WebApplication; import org.apache.wicket.request.Request; import org.apache.wicket.request.Response; +import org.apache.wicket.request.mapper.MountedMapper; import org.springframework.stereotype.Component; @Component 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 index 9965b20a..95425689 100644 --- 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 @@ -3,6 +3,7 @@ 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 @@ -11,7 +12,9 @@ public class HighchartsShowcaseLink extends BookmarkablePageLink { public HighchartsShowcaseLink() { - super("highchartShowcaseLink", HomepageHighcharts.class); + super("highchartShowcaseLink", HomepageHighcharts.class, new PageParameters() + .add("theme", "default") + .add("chart", "line")); } } diff --git a/showcase/wicked-charts-showcase-wicket6/build.gradle b/showcase/wicked-charts-showcase-wicket6/build.gradle index a3d860a8..68af7aca 100644 --- a/showcase/wicked-charts-showcase-wicket6/build.gradle +++ b/showcase/wicked-charts-showcase-wicket6/build.gradle @@ -1,16 +1,14 @@ import org.apache.tools.ant.filters.ReplaceTokens dependencies { - compile 'org.apache.wicket:wicket-core:6.21.0' - compile 'de.adesso.wicked-charts:wicked-charts-wicket6:3.0.0' + compile group: 'org.apache.wicket', name: 'wicket-core', version: "${wicket_spring_version}" compile project(':wicked-charts-showcase-options') - - compile 'javax.servlet:javax.servlet-api:3.1.0' testCompile 'junit:junit:4.12' + compile 'javax.servlet:javax.servlet-api:3.1.0' compile 'commons-io:commons-io:2.4' - compile 'org.apache.wicket:wicket-extensions:6.21.0' + compile group: 'org.apache.wicket', name: 'wicket-extensions', version: "${wicket_spring_version}" compile( - [group: 'org.apache.wicket', name: 'wicket-spring', version: "6.21.0"], + [group: 'org.apache.wicket', name: 'wicket-spring', version: "${wicket_spring_version}"], [group: 'de.adesso.wicked-charts', name: 'wicked-charts-wicket6', version: "${wicketcharts_version}"], ) compile( @@ -39,7 +37,7 @@ processResources { from 'src/main/java' from 'src/main/resources' filter(ReplaceTokens, tokens: [projectVersion : wicketcharts_version]) - filter(ReplaceTokens, tokens: [wicketVersion : "6.21.0"]) + filter(ReplaceTokens, tokens: [wicketVersion : wicket_spring_version]) } bootRun { @@ -66,3 +64,4 @@ bootRun { + diff --git a/showcase/wicked-charts-showcase-wicket6/gradle.properties b/showcase/wicked-charts-showcase-wicket6/gradle.properties new file mode 100644 index 00000000..62efb007 --- /dev/null +++ b/showcase/wicked-charts-showcase-wicket6/gradle.properties @@ -0,0 +1 @@ +wicket_spring_version=6.21.0 \ No newline at end of file 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 index 0cc9a20b..ce881247 100644 --- 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 @@ -188,7 +188,7 @@

      Wicked Charts

    • Skies
    • Gray
    • Dark Blue
    • -
    • Dark Green
    • +
    • Dark Green
    • 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 index e15303c2..700ab27b 100644 --- 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 @@ -68,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)); @@ -76,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)); } } 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 d17c2d23..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 @@ -50,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/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/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 f3a6fda7..a063d4dd 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 @@ -68,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)); @@ -76,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)); } } diff --git a/showcase/wicked-charts-showcase-wicket8/build.gradle b/showcase/wicked-charts-showcase-wicket8/build.gradle index 119b2f8f..29272036 100644 --- a/showcase/wicked-charts-showcase-wicket8/build.gradle +++ b/showcase/wicked-charts-showcase-wicket8/build.gradle @@ -1,19 +1,20 @@ import org.apache.tools.ant.filters.ReplaceTokens +import org.apache.tools.ant.filters.ReplaceTokens + dependencies { - compile 'org.apache.wicket:wicket-core:8.0.0' - compile 'de.adesso.wicked-charts:wicked-charts-wicket8:3.0.0' - compile 'org.apache.wicket:wicket-extensions:8.0.0' - compile project(':wicked-charts-showcase-options') - testCompile 'junit:junit:4.12' - compile 'commons-io:commons-io:2.4' - compile( - [group: 'org.apache.wicket', name: 'wicket-spring', version: "8.0.0"], - [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}"], - ) + 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 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}"], + ) } buildscript { @@ -34,10 +35,10 @@ apply plugin: 'war' apply plugin: 'org.springframework.boot' processResources { - from 'src/main/java' - from 'src/main/resources' - filter(ReplaceTokens, tokens: [projectVersion : wicketcharts_version]) - filter(ReplaceTokens, tokens: [wicketVersion : "8.0.0"]) + from 'src/main/java' + from 'src/main/resources' + filter(ReplaceTokens, tokens: [projectVersion : wicketcharts_version]) + filter(ReplaceTokens, tokens: [wicketVersion : wicket_spring_version]) } bootRun { 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/HomepageHighcharts.html b/showcase/wicked-charts-showcase-wicket8/src/main/java/de/adesso/wickedcharts/showcase/HomepageHighcharts.html index f14b1f82..d33f1bff 100644 --- 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 @@ -188,7 +188,7 @@

      Wicked Charts

    • Skies
    • Gray
    • Dark Blue
    • -
    • Dark Green
    • +
    • Dark Green
    • 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 index 814bee06..7f3eb424 100644 --- 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 @@ -68,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)); @@ -76,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)); } } From b07a520240ef2cb3d762d139f12f796d46390a0d Mon Sep 17 00:00:00 2001 From: max Date: Sun, 10 Jun 2018 16:51:30 +0200 Subject: [PATCH 17/23] Fixed some issues in the Wicket 1.4 Showcase + cleaned up some code --- .../showcase/HomepageChartJs.java | 1 + .../showcase/HomepageHighcharts.html | 455 +- .../showcase/HomepageHighcharts.java | 388 +- .../showcase/ShowcaseApplication.java | 11 +- .../showcase/links/UpdateHighchartLink.java | 69 +- .../showcase/links/UpdateThemeLink.java | 54 - .../main/webapp/js/jquery-1.8.3.min-IEfix.js | 9473 +++++++++++++++++ .../showcase/HomepageHighcharts.java | 116 +- .../showcase/HomepageHighcharts.java | 119 +- .../showcase/HomepageHighcharts.java | 118 +- .../showcase/HomepageHighcharts.java | 119 +- 11 files changed, 10253 insertions(+), 670 deletions(-) delete mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/java/de/adesso/wickedcharts/showcase/links/UpdateThemeLink.java create mode 100644 showcase/wicked-charts-showcase-wicket14/src/main/webapp/js/jquery-1.8.3.min-IEfix.js 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 index d13121ed..c0fd62c2 100644 --- 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 @@ -25,6 +25,7 @@ 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; 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 index 600b57d0..3257617b 100644 --- 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 @@ -1,195 +1,207 @@ - - - Wicked Charts :: Showcase :: Wicket 1.4.x - - - - - - - - - - - - - - - - - - - - - - - -