Wijmo 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +6 -0
- data/COMMERCIAL-LICENSE.txt +140 -0
- data/GPL-LICENSE.txt +222 -0
- data/Gemfile +4 -0
- data/History.md +5 -0
- data/README.md +291 -0
- data/Rakefile +1 -0
- data/VERSION.md +1 -0
- data/Wijmo.gemspec +29 -0
- data/lib/Wijmo/version.rb +3 -0
- data/lib/wijmo.rb +12 -0
- data/new 2.txt +189 -0
- data/screenshot/screenshot.png +0 -0
- data/vendor/assets/images/images/Line.gif +0 -0
- data/vendor/assets/images/images/filterop.png +0 -0
- data/vendor/assets/images/images/ui-anim_basic_16x16.gif +0 -0
- data/vendor/assets/images/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/vendor/assets/images/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/vendor/assets/images/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/vendor/assets/images/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/vendor/assets/images/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/vendor/assets/images/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/vendor/assets/images/images/ui-bg_glass_75_ffffff_1x400.png +0 -0
- data/vendor/assets/images/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/vendor/assets/images/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/vendor/assets/images/images/ui-bg_inset-soft_95_fef1ec_1x100.png +0 -0
- data/vendor/assets/images/images/ui-bg_smooth_75_e6e6e6_1x400.png +0 -0
- data/vendor/assets/images/images/ui-bg_smooth_75_fafafa_1x400.png +0 -0
- data/vendor/assets/images/images/ui-icons_222222_256x240.png +0 -0
- data/vendor/assets/images/images/ui-icons_2e83ff_256x240.png +0 -0
- data/vendor/assets/images/images/ui-icons_454545_256x240.png +0 -0
- data/vendor/assets/images/images/ui-icons_888888_256x240.png +0 -0
- data/vendor/assets/images/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/vendor/assets/images/images/ui-icons_f6cf3b_256x240.png +0 -0
- data/vendor/assets/images/images/waiting.gif +0 -0
- data/vendor/assets/images/images/wijeditor/wijmo-ui-editor.png +0 -0
- data/vendor/assets/images/images/wijeditor/wijmo-ui-icons_000000_240x112.png +0 -0
- data/vendor/assets/images/images/wijeditor/wijmo-ui-icons_ffffff_240x112.png +0 -0
- data/vendor/assets/images/images/wijmo-ui-icons_000000_240x112.png +0 -0
- data/vendor/assets/images/images/wijmo-ui-icons_ffffff_240x112.png +0 -0
- data/vendor/assets/images/images/wijrating/wijmo-ui-rating.png +0 -0
- data/vendor/assets/javascripts/jquery.plugin.wijtextselection.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.raphael.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijbarchart.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijbubblechart.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijcarousel.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijchartcore.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijcombobox.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijcompositechart.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijdatasource.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijdatepager.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijeditor.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijevcal.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijgallery.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijgauge.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijgrid.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijinputcore.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijinputdate.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijinputmask.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijinputnumber.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijlightbox.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijlineargauge.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijlinechart.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijpager.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijpiechart.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijradialgauge.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijrating.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijribbon.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijscatterchart.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijtree.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijupload.min.js +14 -0
- data/vendor/assets/javascripts/jquery.wijmo.wijwizard.min.js +14 -0
- data/vendor/assets/javascripts/wijmo.ui.all.js +34 -0
- data/vendor/assets/stylesheets/jquery-wijmo.css +2343 -0
- data/vendor/assets/stylesheets/jquery.wijmo-open.2.2.0.css +2032 -0
- data/vendor/assets/stylesheets/jquery.wijmo.wijcarousel.css +270 -0
- data/vendor/assets/stylesheets/jquery.wijmo.wijcombobox.css +130 -0
- data/vendor/assets/stylesheets/jquery.wijmo.wijdatepager.css +114 -0
- data/vendor/assets/stylesheets/jquery.wijmo.wijeditor.css +864 -0
- data/vendor/assets/stylesheets/jquery.wijmo.wijevcal.css +1067 -0
- data/vendor/assets/stylesheets/jquery.wijmo.wijgallery.css +311 -0
- data/vendor/assets/stylesheets/jquery.wijmo.wijgrid.css +567 -0
- data/vendor/assets/stylesheets/jquery.wijmo.wijinput.css +195 -0
- data/vendor/assets/stylesheets/jquery.wijmo.wijlightbox.css +232 -0
- data/vendor/assets/stylesheets/jquery.wijmo.wijpager.css +35 -0
- data/vendor/assets/stylesheets/jquery.wijmo.wijrating.css +226 -0
- data/vendor/assets/stylesheets/jquery.wijmo.wijribbon.css +688 -0
- data/vendor/assets/stylesheets/jquery.wijmo.wijtree.css +122 -0
- data/vendor/assets/stylesheets/jquery.wijmo.wijupload.css +65 -0
- data/vendor/assets/stylesheets/jquery.wijmo.wijwizard.css +59 -0
- data/vendor/assets/stylesheets/wijmo.ui.all.css +14 -0
- metadata +140 -0
data/Rakefile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require "bundler/gem_tasks"
|
data/VERSION.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#WIJMO UI VERSION-2.2.0
|
data/Wijmo.gemspec
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
|
3
|
+
require "Wijmo/version"
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |s|
|
|
6
|
+
s.name = "Wijmo"
|
|
7
|
+
s.version = Wijmo::VERSION
|
|
8
|
+
s.platform = Gem::Platform::RUBY
|
|
9
|
+
s.authors = ["Balamurali Pandranki"]
|
|
10
|
+
s.email = ["balamurali.pandranki@gmail.com"]
|
|
11
|
+
s.homepage = "https://github.com/itsbalamurali/wijmo"
|
|
12
|
+
s.summary = %q{Wijmo UI asset pipeline provider/wrapper}
|
|
13
|
+
s.description = <<-DESC
|
|
14
|
+
Everything You Need to Build a Better Web
|
|
15
|
+
Wijmo is a complete kit of over 40 UI widgets
|
|
16
|
+
with everything from interactive menus to rich charts.
|
|
17
|
+
If you know jQuery, you know Wijmo.
|
|
18
|
+
Complete with documentation and professional support,
|
|
19
|
+
every widget is hand-crafted and includes premium themes.
|
|
20
|
+
DESC
|
|
21
|
+
|
|
22
|
+
s.rubyforge_project = "Wijmo"
|
|
23
|
+
|
|
24
|
+
s.files = `git ls-files`.split("\n")
|
|
25
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
|
26
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
|
27
|
+
s.require_paths = ["lib"]
|
|
28
|
+
|
|
29
|
+
end
|
data/lib/wijmo.rb
ADDED
data/new 2.txt
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
Fulcrum
|
|
2
|
+
=======
|
|
3
|
+
|
|
4
|
+
Fulcrum is an application to provide a user story based backlog management
|
|
5
|
+
system for agile development teams. See
|
|
6
|
+
[the project page](http://wholemeal.co.nz/projects/fulcrum.html) for more
|
|
7
|
+
details.
|
|
8
|
+
|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
Get involved
|
|
12
|
+
------------
|
|
13
|
+
|
|
14
|
+
Fulcrum is still in early development, so now is the time to make your mark on
|
|
15
|
+
the project.
|
|
16
|
+
|
|
17
|
+
There are several communication channels for Fulcrum:
|
|
18
|
+
|
|
19
|
+
* [Follow @fulcrumagile on Twitter](https://twitter.com/fulcrumagile)
|
|
20
|
+
* [Fulcrum Users](http://groups.google.com/group/fulcrum-users) - A
|
|
21
|
+
discussion group for users and developers of Fulcrum.
|
|
22
|
+
* You might also find someone in #fulcrum on the Freenode IRC network if you're
|
|
23
|
+
looking for realtime help.
|
|
24
|
+
|
|
25
|
+
See the [Development](#development) section below for details on contributing
|
|
26
|
+
to the project, and [Translating](#translating) for details on how to help
|
|
27
|
+
translate Fulcrum into your native language.
|
|
28
|
+
|
|
29
|
+
Goals
|
|
30
|
+
-----
|
|
31
|
+
|
|
32
|
+
Fulcrum is a clone of [Pivotal Tracker](http://pivotaltracker.com/). It will
|
|
33
|
+
almost certainly never surpass the functionality, usability and sheer
|
|
34
|
+
awesomeness of Pivotal Tracker, but aims to provide a usable alternative for
|
|
35
|
+
users who require a Free and Open Source solution.
|
|
36
|
+
|
|
37
|
+
Installation
|
|
38
|
+
------------
|
|
39
|
+
|
|
40
|
+
Fulcrum is still a work in progress, but if you're really keen to try it out
|
|
41
|
+
these instructions will hopefully help you get up and running.
|
|
42
|
+
|
|
43
|
+
First up, your system will need the
|
|
44
|
+
[prerequisites for running Ruby on Rails installed](http://rubyonrails.org/download)
|
|
45
|
+
|
|
46
|
+
Once you have these:
|
|
47
|
+
|
|
48
|
+
# Checkout the project
|
|
49
|
+
$ git clone git://github.com/malclocke/fulcrum.git
|
|
50
|
+
$ cd fulcrum
|
|
51
|
+
|
|
52
|
+
# Install the project dependencies
|
|
53
|
+
$ gem install bundler
|
|
54
|
+
$ bundle install
|
|
55
|
+
|
|
56
|
+
# Set up the development database
|
|
57
|
+
$ bundle exec rake fulcrum:setup db:setup
|
|
58
|
+
|
|
59
|
+
# Start the local web server
|
|
60
|
+
$ rails server
|
|
61
|
+
|
|
62
|
+
You should then be able to navigate to `http://localhost:3000/` in a web browser.
|
|
63
|
+
You can log in with the test username `test@example.com`, password `testpass`.
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
Heroku setup
|
|
67
|
+
------------
|
|
68
|
+
|
|
69
|
+
If you wish to host a publicly available copy of Fulcrum, the easiest option is
|
|
70
|
+
to host it on [Heroku](http://heroku.com/).
|
|
71
|
+
|
|
72
|
+
To deploy it to Heroku, make sure you have a local copy of the project; refer
|
|
73
|
+
to the previous section for instructions. Then:
|
|
74
|
+
|
|
75
|
+
$ gem install heroku
|
|
76
|
+
|
|
77
|
+
# Create your app. Replace APPNAME with whatever you want to name it.
|
|
78
|
+
$ heroku create APPNAME --stack cedar
|
|
79
|
+
|
|
80
|
+
# Set APP_HOST heroku config so outbound emails have a proper host
|
|
81
|
+
# Replace APPNAME below with the value from `heroku create`
|
|
82
|
+
$ heroku config:set APP_HOST=APPNAME.herokuapp.com
|
|
83
|
+
|
|
84
|
+
# Define where the user emails will be coming from
|
|
85
|
+
# (This email address does not need to exist)
|
|
86
|
+
$ heroku config:set MAILER_SENDER=noreply@example.org
|
|
87
|
+
|
|
88
|
+
# Allow emails to be sent
|
|
89
|
+
$ heroku addons:add sendgrid:starter
|
|
90
|
+
|
|
91
|
+
# Deploy the first version
|
|
92
|
+
$ git push heroku master
|
|
93
|
+
|
|
94
|
+
# Set up the database
|
|
95
|
+
$ heroku run rake db:setup
|
|
96
|
+
|
|
97
|
+
Once that's done, you will be able to view your site at
|
|
98
|
+
`http://APPNAME.herokuapp.com`.
|
|
99
|
+
|
|
100
|
+
Deploying to other platforms
|
|
101
|
+
----------------------------
|
|
102
|
+
|
|
103
|
+
Fulcrum can be deployed to any platform that can host Rails. Setting this
|
|
104
|
+
up is beyond the scope of this document, but for the most part Fulcrum does
|
|
105
|
+
not have any special operational requirements and can be deployed as a normal
|
|
106
|
+
Rails application.
|
|
107
|
+
|
|
108
|
+
You will need to set up some custom configuration, to do this copy the file
|
|
109
|
+
`config/fulcrum.example.rb` to `config/fulcrum.rb` and edit to your
|
|
110
|
+
requirements, or ensure the relevant environment variables are set for the
|
|
111
|
+
application as described in the file above.
|
|
112
|
+
|
|
113
|
+
Translating
|
|
114
|
+
-----------
|
|
115
|
+
|
|
116
|
+
Below is an example of how you might go about translating Fulcrum to German.
|
|
117
|
+
|
|
118
|
+
* Find the name of your locale, in this case we are using `de`
|
|
119
|
+
* Copy the `config/locales/en.yml` file to `config/locales/de.yml`
|
|
120
|
+
* Edit the file and update all the translated strings in quotes on the right
|
|
121
|
+
hand side.
|
|
122
|
+
|
|
123
|
+
Thats it! Ideally you should send your translation as a pull request so you
|
|
124
|
+
get credit for it, but if you do not wish to do this please send the file to
|
|
125
|
+
one of the mailing lists.
|
|
126
|
+
|
|
127
|
+
If Fulcrum has already been translated for your language, please take the time
|
|
128
|
+
to check the translation database is complete for your language. You can do
|
|
129
|
+
this by running the `rake i18n:missing_keys` task. If you find any missing
|
|
130
|
+
keys for your language please add them.
|
|
131
|
+
|
|
132
|
+
Development
|
|
133
|
+
-----------
|
|
134
|
+
|
|
135
|
+
Fulcrum is currently welcoming contributions. If you'd like to help:
|
|
136
|
+
|
|
137
|
+
* Check the [issue queue](http://github.com/malclocke/fulcrum/issues) for a
|
|
138
|
+
list of the major features which are yet to be implemented. These have the
|
|
139
|
+
`feature` and `unstarted` labels. If a feature you'd like to work on isn't
|
|
140
|
+
there, add an issue.
|
|
141
|
+
* Leave a description of how you are going to implement the feature. Failure
|
|
142
|
+
to do this may lead to you implementing the feature in a way that might
|
|
143
|
+
conflict with future plans for Fulcrum, and so increase the chances of your
|
|
144
|
+
work being rejected or needing a rework.
|
|
145
|
+
* If you'd like to discuss anything about the issue in greater detail with
|
|
146
|
+
other developers, do so on the
|
|
147
|
+
[Fulcrum Developers](http://groups.google.com/group/fulcrum-devel) mailing
|
|
148
|
+
list.
|
|
149
|
+
|
|
150
|
+
Here are some general guidelines for contributing:
|
|
151
|
+
|
|
152
|
+
* Make your changes on a branch, and use that branch as the base for pull
|
|
153
|
+
requests.
|
|
154
|
+
* Try to break changes up into the smallest logical blocks possible. We'd
|
|
155
|
+
prefer to receive many small commits to one large one in a pull request.
|
|
156
|
+
* Feel free to open unfinished pull requests if you'd like to discuss work
|
|
157
|
+
in progress, or would like other developers to test it.
|
|
158
|
+
* All patches changes be covered by tests, and should not break the existing
|
|
159
|
+
tests, unless a current test is invalidated by a code change. This includes
|
|
160
|
+
Javascript, which is covered with a Jasmine test suite in `spec/javascripts/`.
|
|
161
|
+
* Run `rake spec` to check the Rails test suite is green. You will need
|
|
162
|
+
Firefox with Selenium installed to run the integration tests.
|
|
163
|
+
* To run the Javascript test suite, run `rake jasmine` and point your browser
|
|
164
|
+
to `http://localhost:8888/`
|
|
165
|
+
* For any UI changes, please try to follow the
|
|
166
|
+
[Tango theme guidelines](http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines).
|
|
167
|
+
* The easiest way to test the impact of CSS or view changes is using the
|
|
168
|
+
'testcard' at `http://localhost:3000/testcard`. This is a fake project which
|
|
169
|
+
exposes as many of the view states as possible on one page.
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
Colophon
|
|
173
|
+
--------
|
|
174
|
+
|
|
175
|
+
Fulcrum is built with the following Open Source technologies:
|
|
176
|
+
|
|
177
|
+
* [Ruby on Rails](http://rubyonrails.org/)
|
|
178
|
+
* [Backbone.js](http://documentcloud.github.com/backbone/)
|
|
179
|
+
* [jQuery](http://jquery.com/)
|
|
180
|
+
* [Tango Icon Library](http://tango.freedesktop.org/Tango_Icon_Library)
|
|
181
|
+
* [Jasmine](http://pivotal.github.com/jasmine/)
|
|
182
|
+
* [Sinon](http://sinonjs.org/)
|
|
183
|
+
|
|
184
|
+
License
|
|
185
|
+
-------
|
|
186
|
+
Copyright 2011, Malcolm Locke.
|
|
187
|
+
|
|
188
|
+
Fulcrum is made available under the Affero GPL license version 3, see
|
|
189
|
+
LICENSE.txt.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Wijmo Library 2.2.0
|
|
4
|
+
* http://wijmo.com/
|
|
5
|
+
*
|
|
6
|
+
* Copyright(c) GrapeCity, Inc. All rights reserved.
|
|
7
|
+
*
|
|
8
|
+
* Dual licensed under the Wijmo Commercial or GNU GPL Version 3 licenses.
|
|
9
|
+
* licensing@wijmo.com
|
|
10
|
+
* http://wijmo.com/license
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
**/
|
|
14
|
+
(function(a){"use strict";a.fn.extend({wijtextselection:function(){var c,e,g=this[0],d=this.val();if(arguments.length===0){var b,i,f,h;if(a.browser.msie&&a.browser.version<9)try{var k=document.selection;if(g.tagName.toLowerCase()!="textarea"){b=k.createRange().duplicate();b.moveEnd("character",d.length);f=b.text===""?d.length:d.lastIndexOf(b.text);b=k.createRange().duplicate();b.moveStart("character",-d.length);h=b.text.length}else{b=k.createRange();i=b.duplicate();i.moveToElementText(g);i.setEndPoint("EndToEnd",b);f=i.text.length-b.text.length,h=f+b.text.length}}catch(h){}else{f=g.selectionStart;h=g.selectionEnd}var m=d.substring(f,h);return{start:f,end:h,text:m,replace:function(a){return d.substring(0,f)+a+d.substring(h,d.length)}}}else if(arguments.length===1){if(typeof arguments[0]==="object"&&typeof arguments[0].start==="number"&&typeof arguments[0].end==="number"){c=arguments[0].start;e=arguments[0].end}else if(typeof arguments[0]==="string"){if((c=d.indexOf(arguments[0]))>-1)e=c+arguments[0].length}else if(Object.prototype.toString.call(arguments[0])==="[object RegExp]"){var l=arguments[0].exec(d);if(l!=null){c=l.index;e=c+l[0].length}}}else if(arguments.length===2)if(typeof arguments[0]==="number"&&typeof arguments[1]==="number"){c=arguments[0];e=arguments[1]}if(typeof c==="undefined"){c=0;e=d.length}if(a.browser.msie){var j=g.createTextRange();j.collapse(true);j.moveStart("character",c);j.moveEnd("character",e-c);j.select()}else{g.selectionStart=c;g.selectionEnd=e}}})})(jQuery);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Wijmo Library 2.2.0
|
|
4
|
+
* http://wijmo.com/
|
|
5
|
+
*
|
|
6
|
+
* Copyright(c) GrapeCity, Inc. All rights reserved.
|
|
7
|
+
*
|
|
8
|
+
* Dual licensed under the Wijmo Commercial or GNU GPL Version 3 licenses.
|
|
9
|
+
* licensing@wijmo.com
|
|
10
|
+
* http://wijmo.com/license
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
**/
|
|
14
|
+
(function(){"use strict";if(!window.Raphael)return;$.extend({round:function(a,b){return!a?0:Globalize.parseFloat(a.toFixed(b),10,Globalize.culture("en"))},toOADate:function(b){var c=864e5,a=b-new Date(1900,0,1)+2*c;return a},fromOADate:function(a){var c=864e5,b=new Date(a-2*c+ +new Date(1900,0,1));return b},arrayClone:function(b){var a=[];$.each(b,function(c,b){a.push($.extend(true,{},b))});return a}});$.wijraphael={isSVGElem:function(a){var b="http://www.w3.org/2000/svg";return a.nodeType===1&&a.namespaceURI===b},addClass:function(b,a){a=a||"";$.each(b,function(){if($.wijraphael.isSVGElem(this)){var b=this;$.each(a.split(/\s+/),function(d,c){var a=b.className?b.className.baseVal:b.getAttribute("class");if($.inArray(c,a.split(/\s+/))===-1){a+=(a?" ":"")+c;if(b.className)b.className.baseVal=a;else b.setAttribute("class",a)}})}else $(this).addClass(a)})},clearRaphaelCache:function(){Raphael.path2curve.cache=null;Raphael.path2curve.count=null;Raphael.parseTransformString.cache=null;Raphael.parseTransformString.count=null;Raphael.parsePathString.cache=null;Raphael.parsePathString.count=null;Raphael._pathToAbsolute.cache=null;Raphael._pathToAbsolute.count=null},getPositionByAngle:function(e,f,c,d){var a={},b=Raphael.rad(d);a.x=e+c*Math.cos(-1*b);a.y=f+c*Math.sin(-1*b);return a},hasClass:function(a,b){if(!b||b.length===0)return false;if($.wijraphael.isSVGElem(a)){var d=a.className?a.className.baseVal:a.getAttribute("class"),c=false;$.each(d.split(/\s+/),function(d,a){if(a===b){c=true;return false}});return c}else return $(a).hasClass(b)},sector:function(b,c,a,d,e){var f=$.wijraphael.getPositionByAngle(b,c,a,d),g=$.wijraphael.getPositionByAngle(b,c,a,e);return["M",b,c,"L",f.x,f.y,"A",a,a,0,+(e-d>180),0,g.x,g.y,"z"]}};var a="[\\x20\\t\\r\\n\\f]",b=$.expr.filter.CLASS;$.expr.filter.CLASS=function(b,e){if(parseFloat($.fn.jquery)<1.8){var c=!($.wijraphael&&$.wijraphael.isSVGElem(b))?b.className:b.className?b.className.baseVal:b.getAttribute("class");return(" "+c+" ").indexOf(e)>-1}else{var d=new RegExp("(^|"+a+")"+b+"("+a+"|$)");return function(a){var b=!($.wijraphael&&$.wijraphael.isSVGElem(a))?a.className:a.className?a.className.baseVal:a.getAttribute("class");return d.test(b)}}};if(parseFloat($.fn.jquery)<1.8)$.expr.preFilter.CLASS=function(c,e,f,g,i,h){var b=0,a=null,d=null;c=" "+c[1].replace(/\\/g,"")+" ";if(h)return c;for(b=0,a={};a;b++){a=e[b];if(!a)try{a=e.item(b)}catch(j){}if(a){d=!($.wijraphael&&$.wijraphael.isSVGElem(a))?a.className:(a.className?a.className.baseVal:"")||a.getAttribute("class");if(i^(d&&(" "+d+" ").indexOf(c)>-1))!f&&g.push(a);else if(f)e[b]=false}}return false};Raphael.fn.tri=function(b,c,e){var g=b,j=c-e,a=Math.cos(Math.PI/6)*e,d=Math.tan(Math.PI/3)*a,h=b+a,k=c+d,i=b-a,l=c+d,f=["M",g,j,"L",h,k,"L",i,l,"z"];return this.path(f.concat(" "))};Raphael.fn.invertedTri=function(b,c,e){var g=b,j=c+e,a=Math.cos(Math.PI/6)*e,d=Math.tan(Math.PI/3)*a,h=b+a,k=c-d,i=b-a,l=c-d,f=["M",g,j,"L",h,k,"L",i,l,"z"];return this.path(f.concat(" "))};Raphael.fn.box=function(b,c,e){var a=Math.cos(Math.PI/4)*e,d=["M",b-a,c-a,"L",b+a,c-a,"L",b+a,c+a,"L",b-a,c+a,"z"];return this.path(d.concat(" "))};Raphael.fn.diamond=function(b,c,a){var d=["M",b,c-a,"L",b+a,c,"L",b,c+a,"L",b-a,c,"z"];return this.path(d.concat(" "))};Raphael.fn.cross=function(b,c,e){var a=Math.cos(Math.PI/4)*e,d=["M",b-a,c-a,"L",b+a,c+a,"M",b-a,c+a,"L",b+a,c-a];return this.path(d.concat(" "))};Raphael.fn.paintMarker=function(f,d,e,b){var c=this,a=null;if(!f)f="circle";switch(f){case"circle":a=c.circle(d,e,b);break;case"tri":a=c.tri(d,e,b);break;case"invertedTri":a=c.invertedTri(d,e,b);break;case"box":a=c.box(d,e,b);break;case"diamond":a=c.diamond(d,e,b);break;case"cross":a=c.cross(d,e,b)}return a};Raphael.prototype.htmlText=function(k,l,a,i,e,d){function h(b,a,d){var f=/<(b|strong)>/,e=/<(i|em)>/,c=/href=[\"\']([^\"\']+)[\"\']/,g=/<a/;d&&b.attr(d);f.test(a)&&b.attr("font-weight","bold");e.test(a)&&b.attr("font-style","italic");if(g.test(a))a.match(c)[1]&&b.attr("href",a.match(c)[1])}var j=a.toString().split(/<br\s?\/>|\\r/i),g=this,b=g.set(),c=0,f=0;e=e||3;d=d||5;$.each(j,function(m,k){var j=0,l=k.split("|||");k=k.replace(/<([A-Za-z]+(.|\n)*?)>/g,"|||<$1>").replace(/<\/([A-Za-z]*)>/g,"</$1>|||");$.each(l,function(o,l){var k=null,d=null,m=0,n=0;if(l!==""){k=l;k=$.trim(k.replace(/<(.|\n)*?>/g,""));a=g.text(0,0,k);h(a,l,i);d=a.wijGetBBox();m=d.width/2+c;n=-d.height/2+f;c=c+d.width+e;a.translate(m,n);b.push(a);if(j<d.height)j=d.height}});f+=j+d;c=j=0});f=0;b.transform(Raphael.format("...t{0},{1}",k-b.getBBox().x,l-b.getBBox().y));return b};Raphael.fn.line=function(a,b,c,d){return this.path(["M",a,b,"L",c,d])};Raphael.fn.roundRect=function(l,m,e,d,k,i,h,j){var a=[],c=[-1,1,1,1,1,-1,-1,-1],g=["v","h","v","h"],b=null,f=null;$.each([k,i,h,j],function(c,b){if(typeof b==="number")a=a.concat({x:b,y:b});else if(typeof b==="object")a=a.concat(b);else a=a.concat({x:0,y:0})});b=["M",l+a[0].x,m];f=[d-a[0].y-a[1].y,e-a[1].x-a[2].x,a[2].y+a[3].y-d,a[3].x+a[0].x-e];$.each(a,function(d,a){if(a.x&&a.y)b=b.concat("a",a.x,a.y,0,0,0,c[2*d]*a.x,c[2*d+1]*a.y);b=b.concat(g[d],f[d])});b.push("z");return this.path(b)};Raphael.fn.wrapText=function(n,o,i,g,m,f){var h=this,b=f.rotation,k=b?$.extend(true,{},f,{rotation:0}):f,j=o,d=h.set(),a=null,c=null,e=[];if(typeof i==="undefined")i="";function l(j,i,g){var b=null,f=null,a=j.toString().split(" "),e=[],c=[],d="";while(a.length){d+=" "+a[0];b=h.text(-1e3,-1e3,d);b.attr(g);f=b.wijGetBBox();if(f.width>i){if(c.length){e.push(c);d=a[0]}c=[a.shift()]}else c.push(a.shift());a.length===0&&e.push(c);b.wijRemove();b=null}return e}$.each(l(i,g,k),function(q,p){var l=p.join(" "),o=m||"near",c=h.text(n,j,l),f=0,i=0;c.attr(k);a=c.wijGetBBox();switch(o){case"near":f=g-a.width/2;break;case"center":f+=g/2;break;case"far":f+=a.width/2}if(b){i+=a.height/2/Math.abs(Math.sin(b));j+=a.height/Math.abs(Math.sin(b))}else{i+=a.height/2;j+=a.height}a.x+=f;a.y+=i;if(b)c.attr({x:c.attr("x")+f,y:c.attr("y")+i});else c.transform(Raphael.format("...T{0},{1}",f,i));d.push(c);e.push(a)});if(b){a=d.wijGetBBox();if(d.length>1){$.each(d,function(c,b){b.attr({y:b.attr("y")-a.height/2});e[c].y-=a.height/2});c={x:a.x+a.width/2,y:a.y+a.height/2};$.each(d,function(l,g){var f=Math,h=e[l],d={x:h.x+h.width/2,y:h.y+h.height/2},j=f.sqrt(f.pow(d.x-c.x,2)+f.pow(d.y-c.y,2)),a=0,i=null,k=null;g.attr({rotation:b});if(j===0)return true;i=g.wijGetBBox();a=Raphael.deg(f.asin(f.abs(d.y-c.y)/j));if(d.y>c.y)if(d.x>c.x)a-=360;else a=-1*(a+180);else if(d.x>c.x)a*=-1;else a=-1*(180-a);k=$.wijraphael.getPositionByAngle(c.x,c.y,j,-1*(b+a));g.attr({y:g.attr("y")+k.y-i.y-i.height/2})})}else d[0].transform(Raphael.format("...R{0}",b))}return d};Raphael.fn.getSVG=function(){function l(e,b){var a="<"+e+" ",c=null,d=false;$.each(b,function(b,c){if(b==="text"||b==="opacity"||b==="transform"||b==="path"||b==="w"||b==="h"||b==="translation")return true;if(c){if(b==="stroke"&&c===0)c="none";a+=b+"='"+c+"' "}});if(b.opacity){c=b.opacity;a+="opacity='"+c+"' style='opacity:"+c+";";d=true}if(b.transform&&b.transform.length>0){c=b.transform;if(d)a+="transform:"+c;else{a+="style='transform:"+c;d=true}}if(d)a+="'";if(b.text){c=b.text;a+="><tspan>"+c+"</tspan>"}else a+=">";a+="</"+e+">";return a}for(var g=this,j='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="'+g.canvas.offsetWidth+'" height="'+g.canvas.offsetHeight+'"><desc>Created with Raphael</desc><defs></defs>',c="",h,f,d,e=0,k=0,b=0,i=0,a=g.bottom;a;a=a.next)if(a&&a.type)switch(a.type){case"path":for(e=0,k=a.attrs.path.length;e<k;e++){f=a.attrs.path[e];for(b=0,i=f.length;b<i;b++){d=f[b];if(b<1)c+=d;else if(b===i-1)c+=d;else c+=d+","}}if(c&&c.length>0)a.attrs.d=c.replace(/,/g," ");break;case"text":if(!a.attrs["text-anchor"])a.attrs["text-anchor"]="middle";break;case"image":h=a.transformations;a.attrs.transform=h?h.join(" "):"";break;case"ellipse":case"rect":j+=l(a.type,a.attrs)}j+="</svg>";return j};Raphael.el.wijRemove=function(){var a=this,b;if(a.removed)return;if(a.node.parentNode){b=$(a.node);a.stop().remove();b.remove()}};Raphael.st.wijRemove=function(){$.each(this,function(b,a){a.wijRemove&&!a.removed&&a.wijRemove()})};Raphael.el.wijGetBBox=function(){return this.getBBox()};Raphael.el.wijAnimate=function(a,g,b,f){if(!a||$.isEmptyObject(a))return;var e=this.shadow,d=0,c={easeInCubic:">",easeOutCubic:"<",easeInOutCubic:"<>",easeInBack:"backIn",easeOutBack:"backOut",easeOutElastic:"elastic",easeOutBounce:"bounce"};if(c[b])b=c[b];this.animate(a,g,b,f);c=null;if(e&&e.offset){d=e.offset;if(a.x)a.x+=d;if(a.y)a.y+=d;this.shadow.animate(a,g,b,f)}};Raphael.el.wijAttr=function(a,c){this.attr(a,c);if(this.shadow)if(typeof a==="object"){var b=$.extend(true,{},a);if(b.fill)delete b.fill;if(b.stroke)delete b.stroke;if(b["stroke-width"])delete b["stroke-width"];this.shadow.attr(b,c)}else if(typeof a==="string")switch(a){case"clip-rect":case"cx":case"cy":case"fill-opacity":case"font":case"font-family":case"font-size":case"font-weight":case"height":case"opacity":case"path":case"r":case"rotation":case"rx":case"ry":case"scale":case"stroke-dasharray":case"stroke-linecap":case"stroke-linejoin":case"stroke-miterlimit":case"stroke-opacity":case"stroke-width":case"translation":case"width":this.shadow.attr(a,c);break;case"x":this.shadow.attr(a,c);this.shadow.attr("transform","...t1,0");break;case"y":this.shadow.attr(a,c);this.shadow.attr("transform","...t0,1")}};Raphael.st.wijAttr=function(b,a){$.each(this.items,function(d,c){c.wijAttr(b,a)});return this};Raphael.st.wijAnimate=function(f,g,e,d){var a=0,c=0,b=null;for(a=0,c=this.items.length;a<c;a++){b=this.items[a];b.wijAnimate(f,g,e,d)}return this};Raphael.st.wijGetBBox=function(){for(var b=[],c=[],j=[],i=[],g=Math.max,h=Math.min,e="push",d="apply",a=null,f=0,f=this.items.length-1;f>=0;f--){a=this.items[f].wijGetBBox();b[e](a.x);c[e](a.y);j[e](a.x+a.width);i[e](a.y+a.height)}b=h[d](0,b);c=h[d](0,c);return{x:b,y:c,width:g[d](0,j)-b,height:g[d](0,i)-c}}})();
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Wijmo Library 2.2.0
|
|
4
|
+
* http://wijmo.com/
|
|
5
|
+
*
|
|
6
|
+
* Copyright(c) GrapeCity, Inc. All rights reserved.
|
|
7
|
+
*
|
|
8
|
+
* Dual licensed under the Wijmo Commercial or GNU GPL Version 3 licenses.
|
|
9
|
+
* licensing@wijmo.com
|
|
10
|
+
* http://wijmo.com/license
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
**/
|
|
14
|
+
(function(a){"use strict";a.widget("wijmo.wijbarchart",a.wijmo.wijchartcore,{options:{horizontal:true,stacked:false,is100Percent:false,clusterOverlap:0,clusterWidth:85,clusterRadius:0,clusterSpacing:0,animation:{enabled:true,duration:400,easing:">"},seriesTransition:{enabled:true,duration:400,easing:">"},mouseDown:null,mouseUp:null,mouseOver:null,mouseOut:null,mouseMove:null,click:null},_create:function(){var c=this,b=c.options,e=c._getDefFill(),d;if(b.horizontal){d=b.axis.y.compass||"south";b.axis.y.compass=b.axis.x.compass||"west";b.axis.x.compass=d}a.extend(true,{compass:"east"},b.hint);a.each(b.seriesStyles,function(b,a){if(!a.fill)a.fill=e[b]});e=null;a.wijmo.wijchartcore.prototype._create.apply(c,arguments);c.chartElement.addClass("wijmo-wijbarchart")},_setOption:function(c,b){c==="horizontal"&&a.extend(true,this.options.axis,{x:{compass:b?"west":"south"},y:{compass:b?"south":"west"}});a.wijmo.wijchartcore.prototype._setOption.apply(this,arguments)},destroy:function(){var e=this,c=e.chartElement,d=c.data("fields"),b=d&&d.bars;c.removeClass("wijmo-wijbarchart");a.wijmo.wijchartcore.prototype.destroy.apply(this,arguments);b&&b.length&&a.each(b,function(b,a){a=null});c.data("fields",null)},_clearChartElement:function(){var b=this,d=b.options,c=b.chartElement.data("fields");a.wijmo.wijchartcore.prototype._clearChartElement.apply(b,arguments);b.element.removeData("plotInfos");if(!d.seriesTransition.enabled)if(c&&c.aniBarsAttr)c.aniBarsAttr=null},_isBarChart:function(){return true},getBar:function(c){var a=this.chartElement,b=a.data("fields");return b.chartElements.bars[c]},_paintTooltip:function(){var c=this,d=c.chartElement,b=d.data("fields");a.wijmo.wijchartcore.prototype._paintTooltip.apply(this,arguments);if(c.tooltip)if(b&&b.trackers&&b.trackers.length){c.tooltip.setTargets(b.trackers);c.tooltip.setOptions({relatedElement:b.trackers[0]})}},_getTooltipText:function(e,d){var c=a(d.node),b,f;if(c.data("owner"))c=c.data("owner");b=c.data("wijchartDataObj");f={data:b,value:b.value,label:b.label,total:b.total,target:d,fmt:e,x:b.x,y:b.y};return a.proxy(e,f)()},_paintPlotArea:function(){var b=this,c=b.options;b.chartElement.wijbar({canvas:b.canvas,bounds:b.canvasBounds,tooltip:b.tooltip,widgetName:b.widgetName,horizontal:c.horizontal,stacked:c.stacked,axis:c.axis,seriesList:c.seriesList,seriesStyles:c.seriesStyles,seriesHoverStyles:c.seriesHoverStyles,seriesTransition:c.seriesTransition,showChartLabels:c.showChartLabels,textStyle:c.textStyle,chartLabelStyle:c.chartLabelStyle,chartLabelFormatString:c.chartLabelFormatString,shadow:c.shadow,disabled:c.disabled,clusterOverlap:c.clusterOverlap,clusterWidth:c.clusterWidth,clusterSpacing:c.clusterSpacing,is100Percent:c.is100Percent,clusterRadius:c.clusterRadius,animation:c.animation,culture:b._getCulture(),isYTime:b.axisInfo.y[0].isTime,isXTime:b.axisInfo.x.isTime,mouseDown:a.proxy(b._mouseDown,b),mouseUp:a.proxy(b._mouseUp,b),mouseOver:a.proxy(b._mouseOver,b),mouseOut:a.proxy(b._mouseOut,b),mouseMove:a.proxy(b._mouseMove,b),click:a.proxy(b._click,b)})},_showSerieEles:function(b){a.each(b,function(b,a){if(a&&a.bar){a.bar.show();a.bar.shadow&&a.bar.shadow.show();a.bar.tracker&&a.bar.tracker.show()}a&&a.dcl&&a.dcl.show();a&&a.animatedBar&&!a.animatedBar.removed&&a.animatedBar.show()})},_hideSerieEles:function(b){a.each(b,function(b,a){if(a&&a.bar){a.bar.hide();a.bar.shadow&&a.bar.shadow.hide();a.bar.tracker&&a.bar.tracker.hide()}a&&a.dcl&&a.dcl.hide();a&&a.animatedBar&&!a.animatedBar.removed&&a.animatedBar.hide()})},_calculateParameters:function(c,e){a.wijmo.wijchartcore.prototype._calculateParameters.apply(this,arguments);if(c.id==="x"){var d=e.unitMinor,b=this._getBarAdjustment(c);if(b===0)b=d;else if(d<b&&d!==0)b=Math.floor(b/d)*d;c.min-=b;c.max+=b;this._calculateMajorMinor(e,c)}},_getBarAdjustment:function(e){for(var a=0,h=this.options,g=e.max,b=e.min,d=h.seriesList,c=0,f=0,c=0;c<d.length&&d[c].data.x;c++){f=d[c].data.x.length;if(a<f)a=f}if(a>1)return(g-b)/a*h.clusterWidth*.0125;else if(a===1){if(b===0&&g===1){b=-1;e.min=b}return(g-b)*.0125}else return 0}});function b(c){var b=this;b.x=c;b.paSpec=[];b.stackValues=function(){var d=b.paSpec.length,c;if(d>1){c=b.paSpec[0];a.each(b.paSpec,function(b,a){if(b===0)return true;a.y+=c.y;c=a})}}}a.fn.extend({wijbar:function(c){var D=function(b,d,e){c.shadow&&a.wijchart.paintShadow(b,d,e)},u=a.wijraphael.addClass,E=a.wijchart.getScaling,A=a.wijchart.getTranslation,f=this,e=c.canvas,i=c.widgetName,d=c.horizontal,l=c.stacked,t=a.arrayClone(c.seriesList),v=t.length,C=[].concat(c.seriesStyles.slice(0,v)),z=[].concat(c.seriesHoverStyles.slice(0,v)),r=c.bounds,q=c.animation,I=q&&q.enabled,p={x:r.startX,y:r.startY},N=r.endX-p.x,L=r.endY-p.y,m=c.axis.x,x=c.axis.y,k=c.disabled,F=c.mouseDown,K=c.mouseUp,H=c.mouseOver,J=c.mouseOut,G=c.mouseMove,M=c.click,w=E(d,m.max,m.min,d?L:N),O=A(d,p,m.max,m.min,w),s,y,g=f.data("fields")||{},o=g.chartElements||{},j=g.aniBarsAttr,h,ab=c.isYTime,Z=c.isXTime,Y=c.culture;function W(d){for(var a=Number.MAX_VALUE,e=d.length,c,b=1;b<e;b++){c=d[b].x-d[b-1].x;if(c<a&&c>0)a=c}return a===Number.MAX_VALUE?2:a}function V(b){a.each(b,function(b,a){a.stackValues()});return b}function B(f){var c=[],d=a.wijchart.getXSortedPoints;function e(n,m){var h=d(m),l=m.length,f=null,o=0,e=0,g=0,k=true,i=0,j=false;if(h)o=h.length;if(c)g=c.length;if(h===undefined)return;a.each(h,function(d,a){if(k){k=false;i=a.x}else{if(i===a.x)j=true;else j=false;i=a.x}while(e<g&&c[e].x<a.x)e++;if(e<g)if(c[e].x!==a.x){f=new b(a.x,l);c.splice(e,0,f);g=c.length}else f=c[e];else{f=new b(a.x,l);c.push(f);g=c.length}f.paSpec.push({y:a.y,sIdx:n,pIdx:d,dupl:j})})}a.each(f,function(b,a){e(b,a)});return c}function n(a,c,b){return a<c?c:a>b?b:a}function R(c,d,e,f,g,b){a.each(b,function(j,a){var h=a.x,i=a.y,b=0;a.x=d*h+f;a.y=e*i+g;if(c){b=a.x;a.x=a.y;a.y=b}});return b}function P(b,n,m,l){var i=a.extend(true,{},c.textStyle,c.chartLabelStyle),h=d?{x:b.x+b.width,y:b.y+b.height/2}:{x:b.x+b.width/2,y:b.y},k=c.chartLabelFormatString,j,f,g=n;if(l)i=a.extend(true,i,l);if(m)g=a.fromOADate(n);if(k&&k.length)g=Globalize.format(g,c.chartLabelFormatString,Y);else if(!m)g=a.round(g,2);f=e.text(h.x,h.y,g).attr(i);u(a(f.node),"wijbarchart-label");j=f.getBBox();if(d)f.attr({x:h.x+j.width/2});else f.attr({y:h.y-j.height/2});return f}function X(i,r,Q,v,w,s,H,F,E,M,p,C,O,L,t){var N=c.is100Percent,z=v.min,y=v.max,B=w.min,A=w.max,T=v.scale,U=v.late,I=w.scale,K=w.late,x,b,G,f,u=null,g,J=s,o=s["stroke-width"],S=s.stroke,h,m,j,k,q=-1;if(t.origin!==null)q=I*t.origin+K;if(l)if(N){if(C>0)i.height=r/C;if(p||p===0){i.y=p/C;i.height-=i.y}}else{i.height=r;if(p||p===0){i.height-=p;i.y=p}}else if(p||p===0){i.x+=i.width*(1-M);i.height=r}b=[{x:i.x,y:i.y},{x:i.x+i.width,y:i.y+i.height}];G=(z<=b[0].x&&b[0].x<=y||z<=b[1].x&&b[1].x<=y)&&(B<=b[0].y&&b[0].y<=A||B<=b[1].y&&b[1].y<=A);b[0].x=n(b[0].x,z,y);b[0].y=n(b[0].y,B,A);b[1].x=n(b[1].x,z,y);b[1].y=n(b[1].y,B,A);b=R(d,T,I,U,K,b);if(b[0].x>b[1].x){x=b[0].x;b[0].x=b[1].x;b[1].x=x}if(b[0].y>b[1].y){x=b[0].y;b[0].y=b[1].y;b[1].y=x}f={x:b[0].x,y:b[0].y,width:b[1].x-b[0].x,height:b[1].y-b[0].y};if(G){if(f.width===0)f.width=.5;if(f.height===0)f.height=.5}if(c.showChartLabels)u=P(f,r,O,L);g=s.r?s.r:c.clusterRadius;if(g)J=a.extend(true,{},s,{r:0});if(S!=="none"&&o)o=parseInt(o,10);if(!o||isNaN(o))o=0;m=f.width-o;j=f.height-o;if(m<0)m=0;if(j<0)j=0;if(H){if(q===-1)if(d)q=E.x;else q=E.y+Q-o;if(g){if(d){if(r>t.origin)h=e.roundRect(f.x,f.y,m,j,0,0,g,g).hide();else h=e.roundRect(f.x,f.y,m,j,g,g,0,0).hide();k=e.rect(q,f.y,0,j)}else{if(r>t.origin)h=e.roundRect(f.x,f.y,m,j,g,0,0,g).hide();else h=e.roundRect(f.x,f.y,m,j,0,g,g,0).hide();k=e.rect(f.x,q,f.width,0)}D(k,F);k.wijAttr(J);k.bar=h}else{if(d)h=e.rect(q,f.y,0,j);else h=e.rect(f.x,q,f.width,0);k=h}if(u){u.attr({opacity:0});k.chartLabel=u}k.left=f.x;k.top=f.y;k.width=m;k.height=j;k.r=g}else if(g)if(d)if(r>t.origin)h=e.roundRect(f.x,f.y,m,j,0,0,g,g);else h=e.roundRect(f.x,f.y,m,j,g,g,0,0);else if(r>t.origin)h=e.roundRect(f.x,f.y,m,j,g,0,0,g);else h=e.roundRect(f.x,f.y,m,j,0,g,g,0);else h=e.rect(f.x,f.y,m,j);D(h,F);if(H&&g)h.shadow&&h.shadow.hide();h.wijAttr(s);return{rect:f,dcl:u,animatedBar:k,bar:h}}function T(i,J,F,K,v,C,p,q,n,w){var f=c.clusterOverlap/100,H=c.clusterWidth/100,t=1,G=c.clusterSpacing+t,o=i.length,b,g,k=[],D=[],r=[],j=[],z=[],h=[],m=e.set();if(n||w){a.each(i,function(d,c){var b=a.extend(true,{},c);b.data&&b.data.y&&b.data.y.length&&n&&a.each(b.data.y,function(d,c){b.data.y[d]=a.toOADate(c)});b.data&&b.data.x&&b.data.x.length&&w&&a.each(b.data.x,function(d,c){b.data.x[d]=a.toOADate(c)});z.push(b)});b=B(z)}else b=B(i);if(l)b=V(b);g=W(b)*H;if(o>1&&!l){f-=b.length*(o-1)*G/(d?p:C);g/=o*(1-f)+f}a.each(b,function(o,B){var e=B.paSpec,G=e.length,z,w,c,b;if(l)z=g;else z=g*(G*(1-f)+f);w={x:B.x-z/2,y:0,width:g,height:e[0].y};a.each(e,function(g,N){if(!j[g])j[g]=[];if(!h[g])h[g]=[];if(w.height===undefined)return true;var H=N.sIdx,L=J[H],z=i[H],l,M=z.yAxis||0,B=x[M]||x,G=v[M]||v;s=E(!d,B.max,B.min,d?C:p);y=A(!d,q,B.max,B.min,s);G.late=y;G.scale=s;b=X(w,N.y,p,K,G,L,I,t,q,f,g>0?e[g-1].y:null,e[e.length-1].y,n,z.textStyle,B);c=b.bar;l=c.clone().attr({opacity:.01,fill:"white","stroke-width":0,"fill-opacity":.01});if(z.visible===false){c.hide();b.dcl&&b.dcl.hide();l.hide();c.shadow&&c.shadow.hide()}u(a(c.node),"wijchart-canvas-object wijbarchart");a(c.node).data("wijchartDataObj",a.extend(false,{index:o,bar:c,type:"bar",style:L,hoverStyle:F[H],x:z.data.x[o],y:z.data.y[o]},z));a(l.node).data("owner",a(c.node));u(a(l.node),"wijbarchart bartracker");b.bar.tracker=l;m.push(l);D.push(c);b.animatedBar&&r.push(b.animatedBar);b.dcl&&k.push(b.dcl);j[g][o]=b.rect;h[g][o]=b;c=null;l=null})});a.each(k,function(b,a){a.toFront()});m.toFront();return{bars:D,animatedBars:r,rects:j,chartLabels:k,seriesEles:h,trackers:m}}function U(k){var e=c.seriesTransition,f,h,i=[],b;if(I){f=q.duration||2e3;h=q.easing||"linear";a.each(k,function(g,c){var k=d?{width:c.width,x:c.left}:{height:c.height,y:c.top};if(j&&e.enabled)if(j.length>g){b=a.wijchart.getDiffAttrs(j[g],c.attr());if(d){b.x=j[g].x;b.width=j[g].width}else{b.y=j[g].y;b.height=j[g].height}if(b.path)delete b.path;c.attr(b);f=e.duration;h=e.easing}i.push(a.extend(true,{},c.attr(),k));c.tracker&&c.tracker.hide();c.stop().wijAnimate(k,f,h,function(){var a=this,c=a.r,b=a;a.chartLabel&&a.chartLabel.wijAnimate({opacity:1},250);if(a.tracker){a.tracker.show();a.tracker.attr({width:a.width,height:a.height,x:a.attr("x"),y:a.attr("y")})}if(c){b=a.bar;b.show();b.shadow&&b.shadow.show();if(a.shadow){a.shadow.wijRemove();a.shadow=null}a.wijRemove();a=null}})});g.aniBarsAttr=i}}function S(){var b=a.isFunction;a(".wijbarchart",f[0]).live("mousedown."+i,function(e){if(k)return;if(b(F)){var c=a(e.target),d;if(c.data("owner"))c=c.data("owner");d=c.data("wijchartDataObj");F.call(f,e,d);d=null}}).live("mouseup."+i,function(e){if(k)return;if(b(K)){var c=a(e.target),d;if(c.data("owner"))c=c.data("owner");d=c.data("wijchartDataObj");K.call(f,e,d);d=null}}).live("mouseover."+i,function(e){if(k)return;if(b(H)){var c=a(e.target),d;if(c.data("owner"))c=c.data("owner");d=c.data("wijchartDataObj");H.call(f,e,d);d=null}}).live("mouseout."+i,function(g){if(k)return;var d=a(g.target),c,e;if(d.data("owner"))d=d.data("owner");c=d.data("wijchartDataObj");e=c.bar;if(!c.hoverStyle)e&&e.attr({opacity:"1"});else e.attr(c.style);b(J)&&J.call(f,g,c);c=null}).live("mousemove."+i,function(g){if(k)return;var d=a(g.target),c,e;if(d.data("owner"))d=d.data("owner");c=d.data("wijchartDataObj");e=c.bar;if(!c.hoverStyle)e&&e.attr({opacity:"0.8"});else e.attr(c.hoverStyle);b(G)&&G.call(f,g,c);c=null}).live("click."+i,function(e){if(k)return;if(b(M)){var c=a(e.target),d;if(c.data("owner"))c=c.data("owner");d=c.data("wijchartDataObj");M.call(f,e,d)}})}function Q(){a(".wijbarchart",f[0]).die(i).die("."+i)}Q();if(d&&!l){t.reverse();C.reverse();z.reverse()}if(v===0)return;h=T(t,C,z,{min:m.min,max:m.max,late:O,scale:w},x,N,L,p,ab,Z);f.data("plotInfos",{xscale:w,xlate:O,yscale:s,ylate:y,rects:h.rects});U(h.animatedBars);o.bars=h.bars;o.animatedBars=h.animatedBars;o.chartLabels=h.chartLabels;g.seriesEles=h.seriesEles;g.trackers=h.trackers;if(!g.chartElements)g.chartElements={};d&&!l&&g.seriesEles.reverse();a.extend(true,g.chartElements,o);f.data("fields",g);S()}})})(jQuery);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Wijmo Library 2.2.0
|
|
4
|
+
* http://wijmo.com/
|
|
5
|
+
*
|
|
6
|
+
* Copyright(c) GrapeCity, Inc. All rights reserved.
|
|
7
|
+
*
|
|
8
|
+
* Dual licensed under the Wijmo Commercial or GNU GPL Version 3 licenses.
|
|
9
|
+
* licensing@wijmo.com
|
|
10
|
+
* http://wijmo.com/license
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
**/
|
|
14
|
+
(function(a){"use strict";var d=0,c=0,b=0;a.widget("wijmo.wijbubblechart",a.wijmo.wijchartcore,{options:{minimumSize:5,maximumSize:20,sizingMethod:"diameter",animation:{enabled:true,duration:1e3,easing:">"},seriesTransition:{enabled:true,duration:400,easing:">"},seriesList:[],seriesHoverStyles:[{opacity:1,"stroke-width":5},{opacity:1,"stroke-width":5},{opacity:1,"stroke-width":5},{opacity:1,"stroke-width":5},{opacity:1,"stroke-width":5},{opacity:1,"stroke-width":5},{opacity:1,"stroke-width":5},{opacity:1,"stroke-width":5},{opacity:1,"stroke-width":5},{opacity:1,"stroke-width":5},{opacity:1,"stroke-width":5},{opacity:1,"stroke-width":5}],chartLabel:{position:"inside",compass:"north",visible:true,style:{},chartLabelFormatString:""},mouseDown:null,mouseUp:null,mouseOver:null,mouseOut:null,mouseMove:null,click:null},_setOption:function(d,c){var b=this,e=b.options;if(d==="minimumSize"||d==="minimumSize"){if(isNaN(c)||c<0)c=0;e[d]=c;b.redraw()}else if(d==="chartLabel"){a.extend(e.chartLabel,c);b.redraw()}else a.wijmo.wijchartcore.prototype._setOption.apply(b,arguments);if(d==="seriesList"){b.indexs=null;b.bubbleRadius=null}},_create:function(){var b=this,d=b.options,c=b._getDefFill();a.each(d.seriesStyles,function(b,a){if(!a.fill)a.fill=c[b]});b._setLabelOption();a.wijmo.wijchartcore.prototype._create.apply(b,arguments);b.chartElement.addClass("wijmo-wijbubblechart")},_setLabelOption:function(){var b=this.options;if(b.showChartLabels!==true&&b.chartLabel.visible===true)b.chartLabel.visible=false;if(!a.isPlainObject(b.chartLabel.style)&&a.isPlainObject(b.chartLabelStyle))b.chartLabel.style=b.chartLabelStyle},_clearChartElement:function(){var c=this,d=c.options,b=c.chartElement.data("fields");a.wijmo.wijchartcore.prototype._clearChartElement.apply(c,arguments);b&&b.bubbleInfos&&a.each(b.bubbleInfos,function(b,a){a.bubble&&a.bubble.wijRemove();a.dcl&&a.dcl.wijRemove();a.symbol&&a.symbol.wijRemove()});b&&b.bubbles&&c._destroyRaphaelArray(b.bubbles);c.element.removeData("plotInfos");if(!d.seriesTransition.enabled)if(b&&b.bubblesAnimationInfos)b.bubblesAnimationInfos=null},destroy:function(){var b=this;b.chartElement.removeClass("wijmo-wijbubblechart ui-helper-reset");b._destroyEles();a.wijmo.wijchartcore.prototype.destroy.apply(b,arguments)},_destroyEles:function(){var b=this,d=b.element,c=d.data("fields");c.bubbleInfos&&a.each(c.bubbleInfos,function(c,a){b._removeEle(a.bubble);b._removeEle(a.dcl);b._removeEle(a.symbol);a=null});d.removeData("fields");b.bubbleRadius=[]},_removeEle:function(b){if(b){b.node&&a(b.node).removeData();b.wijRemove();b=null}},_paintPlotArea:function(){var b=this,f=this.chartElement,c=b.options,e=c.seriesList,d=e.length,i=[].concat(c.seriesStyles.slice(0,d)),g=[].concat(c.seriesHoverStyles.slice(0,d)),h=b.canvasBounds,j=b.axisInfo.x,k=b.axisInfo.y[0];if(d===0)return;b._prepBubbleData();f.wijbubble({seriesList:e,seriesStyles:i,seriesHoverStyles:g,canvas:b.canvas,bounds:h,xAxisInfo:j,yAxisInfo:k,chartLabel:c.chartLabel,textStyle:c.textStyle,chartLabelStyle:c.chartLabelStyle,chartLabelFormatString:c.chartLabelFormatString,bubbleRadius:b.bubbleRadius,animation:c.animation,seriesTransition:c.seriesTransition,sizingMethod:c.sizingMethod,minimumSize:c.minimumSize,maximumSize:c.maximumSize,mouseDown:a.proxy(b._mouseDown,b),mouseUp:a.proxy(b._mouseUp,b),mouseOver:a.proxy(b._mouseOver,b),mouseOut:a.proxy(b._mouseOut,b),mouseMove:a.proxy(b._mouseMove,b),click:a.proxy(b._click,b),disabled:c.disabled,culture:b._getCulture()});b.tooltipbubbles=[];a.each(f.data("fields").bubbleInfos,function(c,a){b.tooltipbubbles.push(a.bubble);a.dcl&&b.tooltipbubbles.push(a.dcl);a.symbol&&b.tooltipbubbles.push(a.symbol)});b.tooltip&&b.tooltip.setTargets(b.tooltipbubbles)},_paintLegend:function(){var b=this,l=b.options,d=0,n=0,g=0,h=null,m=l.seriesList,q=l.seriesStyles,e=null,k=null,f=null,o=0,p=0,r=0,i=null,j=null,c=null;a.wijmo.wijchartcore.prototype._paintLegend.apply(b,arguments);if(l.legend.visible){if(b.legends.length&&b.legendIcons.length)for(d=0,n=b.legendIcons.length;d<n;d++){h=b.legendIcons[d];h.attr({fill:h.attr("stroke")})}if(!l.legend.reversed)for(d=0,n=m.length;d<n;d++){e=m[d];k=q[d];if(e.legendEntry){if(e.markers)j=e.markers.type;h=b.legendIcons[g];f=h.wijGetBBox();o=f.x+f.width/2;p=f.y+f.height/2;r=Math.min(f.width,f.height);i=e.markerStyle;i=a.extend({fill:k.stroke,stroke:k.stroke,opacity:1},i);if(!j)j="circle";c=b.canvas.paintMarker(j,o,p,r/2);a.wijraphael.addClass(a(c.node),"chart-legend-dot wijchart-canvas-object wijchart-legend");c.attr(i);a(c.node).data("index",d).data("legendIndex",g);h.remove();b.legendIcons[g]=c;if(!!e.visible){if(l.legend.textWidth)a(b.legends[g][0].node).data("dotOpacity",c.attr("opacity")||1);else a(b.legends[g].node).data("dotOpacity",c.attr("opacity")||1);c.attr("opacity",.3)}g++}}else for(d=m.length-1;d>=0;d--){e=m[d];k=q[m.length-1-d];if(e.legendEntry){if(e.markers)j=e.markers.type;h=b.legendIcons[g];f=h.wijGetBBox();o=f.x+f.width/2;p=f.y+f.height/2;i=e.markerStyle;i=a.extend({fill:k.stroke,stroke:k.stroke,opacity:1},i);if(!j)j="circle";c=b.canvas.paintMarker(j,o,p,7);a.wijraphael.addClass(a(c.node),"chart-legend-dot");c.attr(i);h.remove();b.legendIcons[g]=c;if(!!e.visible){if(l.legend.textWidth)a(b.legends[g][0].node).data("dotOpacity",c.attr("opacity")||1);else a(b.legends[g].node).data("dotOpacity",c.attr("opacity")||1);c.attr("opacity",.3)}g++}}}},_getbubbleIndexs:function(m,l){var d=this,e=d.options,o=e.axis.x.max,p=e.axis.x.min,t=e.axis.y.min,s=e.axis.y.max,q=[],u=[],n=[],r=[],f=[],g=[],i=-1,k=-1,h=-1,j=-1;d.bubbleRadius=[];d._prepBubbleData();a.each(e.seriesList,function(v,i){var h=i.data,k=i.markers||{},j=k.type||"circle";if(h.y1===undefined)return true;a.each(h.y1,function(k,x){var w=a.wijbubble.transform(x,e.maximumSize,e.minimumSize,d.canvasBounds,c,b,e.sizingMethod,j),v,i;if(d._isDate(h.x[k]))v=a.toOADate(h.x[k]);else if(isNaN(h.x[k]))v=k;else v=h.x[k];i=h.y[k];if(d._isDate(i))i=a.toOADate(i);q.push(v-w*(o-p)/m);u.push(i-w*(s-t)/l);n.push(v+w*(o-p)/m);r.push(i+w*(s-t)/l);f.push(v);g.push(i);d.bubbleRadius.push(w)})});i=d._getMinIndex(q);k=d._getMinIndex(u);h=d._getMaxIndex(n);j=d._getMaxIndex(r);d.indexs={xMin:{x:f[i],y:g[i],r:d.bubbleRadius[i]},xMax:{x:f[h],y:g[h],r:d.bubbleRadius[h]},yMin:{x:f[k],y:g[k],r:d.bubbleRadius[k]},yMax:{x:f[j],y:g[j],r:d.bubbleRadius[j]}}},_calculateParameters:function(c,b){a.wijmo.wijchartcore.prototype._calculateParameters.apply(this,arguments);var d=this;if(!b.autoMax&&!b.autoMin)return;d._adjust(b,c)},_adjust:function(e,b){var g=e.unitMinor,a=this,l=e.autoMin,k=e.autoMax,f=a.canvasBounds,j={x:f.startX,y:f.startY},i=f.endX-j.x,h=f.endY-j.y,c=b.max,d=b.min;!a.indexs&&a._getbubbleIndexs(i,h);if(b.id==="x"){if(l)d=a._getMinTick(a.indexs.xMin.x,a.indexs.xMin.r,d,c,i,g);if(k)c=a._getMaxTick(a.indexs.xMax.x,a.indexs.xMax.r,d,c,i,g)}else{if(l)d=a._getMinTick(a.indexs.yMin.y,a.indexs.yMin.r,d,c,h,g);if(k)c=a._getMaxTick(a.indexs.yMax.y,a.indexs.yMax.r,d,c,h,g)}if(c!==b.max||d!==b.min){b.min=d;b.max=c;this._calculateMajorMinor(e,b);a._adjust(e,b)}},_getMinTick:function(e,f,a,d,c,b){return(e-a)*c/(d-a)<f?a-b:a},_getMaxTick:function(e,f,c,a,b,d){return(e-c)*b/(a-c)+f>b?a+d:a},_getMinIndex:function(d){var c=-1,b=0;a.each(d,function(c,a){if(c===0)b=a;else if(a<b)b=a});a.each(d,function(a,d){if(d===b){c=a;return false}});return c},_getMaxIndex:function(d){var c=-1,b=0;a.each(d,function(c,a){if(c===0)b=a;else if(a>b)b=a});a.each(d,function(a,d){if(d===b){c=a;return false}});return c},_showSerieEles:function(b){a.each(b,function(b,a){if(a.bubble){a.bubble.show();a.bubble.tracker&&a.bubble.tracker.show()}a.dcl&&a.dcl.show();a.symbol&&a.symbol.show()})},_hideSerieEles:function(b){a.each(b,function(b,a){if(a.bubble){a.bubble.hide();a.bubble.tracker&&a.bubble.tracker.hide()}a.dcl&&a.dcl.hide();a.symbol&&a.symbol.hide()})},_parseTable:function(){if(!this.element.is("table"))return;var e=this,f=e.element,b=e.options,c=a("caption",f),m=a("thead th",f),g=[],n=a("tbody tr",f),l=null,k=null,i=[],j=[],h=[],d=function(b){var c=a.trim(b);if(!isNaN(b))c=parseFloat(b);return c};if(c.length){b.header=a.extend({visible:true,text:a.trim(a(c[0]).text())},b.header);if(c.length>1)b.footer=a.extend({visibel:true,text:a.trim(a(c[1]).text())},b.footer)}b.legend=a.extend({visible:true},b.legend);l=a.trim(m.eq(1).text());n.each(function(e,c){var b=a("td",c);if(b.length>=3){i.push(d(b.eq(0).text()));j.push(d(b.eq(1).text()));h.push(d(b.eq(2).text()))}});k={label:l,legendEntry:true,data:{x:i,y:j,y1:h}};g.push(k);e.options.seriesList=g},_unbindLiveEvents:function(){var b=this;a(".wijbubblechart-bubble",b.chartElement[0]).die(".wijbubblechart").die("wijbubblechart");if(b.tooltip){b.tooltip.destroy();b.tooltip=null}},_paintTooltip:function(){var c=this,b=c.chartElement.data("fields");a.wijmo.wijchartcore.prototype._paintTooltip.apply(this,arguments);if(c.tooltip)if(b&&b.trackers&&b.trackers.length){c.tooltip.setTargets(b.trackers);c.tooltip.setOptions({relatedElement:b.trackers[0]})}},_getTooltipText:function(e,d){var c=a(d.node),b,f;if(c.data("owner"))c=c.data("owner");b=c.data("wijchartDataObj");f={data:b,value:b.value,label:b.label,total:b.total,target:d,fmt:e,x:b.x,y:b.y,y1:b.y1};return a.proxy(e,f)()},_prepBubbleData:function(){var i=this,h=i.options.seriesList,f=-999999999999,g=9999999999999,e;a.each(h,function(c,b){e=b.data;e&&e.y1&&a.each(e.y1,function(b,a){f=Math.max(f,a);g=Math.min(g,a)})});d=f;c=g;b=f-g},getBubble:function(a){return this.chartElement.data("fields").bubbles[a]}});a.fn.extend({wijbubble:function(e){var l=this,d=e,f=l.data("fields")||{},n=0,g=d.bounds,h=d.canvas,C=a.arrayClone(d.seriesList),y=d.seriesStyles,t=d.seriesHoverStyles,H=d.xAxisInfo,I=d.yAxisInfo,j={x:g.startX,y:g.startY},P=g.endX-j.x,N=g.endY-j.y,i=d.chartLabel,p=[],q=[],E=d.mouseDown,M=d.mouseUp,G=d.mouseOver,K=d.mouseOut,F=d.mouseMove,O=d.click,o=[],J=d.disabled,k=h.set(),L=d.culture;function m(d,b){var a=d.bubble,e=d.symbol,c;if(a.type==="circle")a.attr({r:.0001,cx:b.startX,cy:b.endY});else{a.transform("s0.01");c=a.wijGetBBox();a.transform("t"+(b.startX-c.x)+","+(b.endY-c.y)+"s0.001")}e&&e.hide()}function w(){var b=d.animation,k=d.bounds,h=f.bubblesAnimationInfos,i=[],j=f.bubbleInfos,c=d.seriesTransition,e,g,l;if(b&&b.enabled){e=b.duration||400;g=b.easing;a.each(j,function(n,f){var a=f.bubble,j,b,d=a.wijGetBBox();if(a.type==="circle")j={r:a.attr("r"),cx:a.attr("cx"),cy:a.attr("cy")};else j={transform:"S1T0,0","stroke-width":a.attr("stroke-width"),width:d.width,x:d.x,y:d.y};if(h&&c.enabled){b=h[n];if(b){if(a.type==="circle")a.attr({cx:b.cx,cy:b.cy,r:b.r});else{d=a.wijGetBBox();l=b.width/d.width;a.transform("s"+l);d=a.wijGetBBox();a.transform("t"+(b.x-d.x)+","+(b.y-d.y)+"")}e=c.duration;g=c.easing}else m(f,k)}else m(f,k);i.push(j);a.wijAnimate(j,e,g,function(){f.dcl&&f.dcl.attr("opacity",1);f.symbol&&f.symbol.show()})});f.bubblesAnimationInfos=i}else a.each(j,function(b,a){a.dcl&&a.dcl.attr("opacity",1)})}function D(c,d){var b;a.each(c,function(a,c){if(a===d){b=c;return false}});return b}function u(c,d){var b=true;a.each(c,function(a){if(d===a){b=false;return false}});return b}function B(b,d,e,c){var a;if(h[b])a=h[b](d,e,c);return a}function z(d){var b=h.text(0,0,d),a=b.wijGetBBox(),c;c={width:a.width,height:a.height};b.remove();return c}function s(a,f){var d=e.chartLabel.compass||"north",b=z(f),c=a.r;switch(d){case"north":a.y-=c+b.height/2;break;case"south":a.y+=c+b.height/2;break;case"east":a.x+=c+b.width/2;break;case"west":a.x-=c+b.width/2}}function r(f,j){var g=a.extend(true,{},e.textStyle,e.chartLabelStyle,i.style),c=a.round(j,2),b=i.chartLabelFormatString===""?e.chartLabelFormatString:i.chartLabelFormatString,d;if(b&&b.length)c=Globalize.format(c,b,L);d=h.text(f.x,f.y,c).attr(g);return d}function A(l,x,v,m,t,G,F){var j=l.data,E=m.min,I=t.min,H=m.max,C=t.max,J=G/(H-E),K=F/(C-I),z=[],w=e.bubbleRadius,d,A,y;if(j.y1===undefined)return;a.each(j.y1,function(M,Q){if(j.x===undefined||j.y===undefined)return true;var N=j.x[M],R=j.y[M],V=l.markers||{},U=V.type||"circle",W=V.symbol,X=l.invisibleMarkLabels||[],T,S,I,p,O,P,H,L,G,F;if(w){G=w[n];n++}else G=a.wijbubble.transform(Q,e.maximumSize,e.minimumSize,e.bounds,c,b,e.sizingMethod,U);if(m.isTime)N=a.toOADate(N);else if(isNaN(N))N=M;if(t.isTime)R=a.toOADate(R);O=g.startX+(N-E)*J;P=g.startY+(C-R)*K;if(W)H=D(W,M);p=B(U,O,P,G);p.attr(x);if(H){A=H.width||G*2;y=H.height||G*2;L=h.image(H.url,O-G,P-G,A,y)}a.wijraphael.addClass(a(p.node),"wijchart-canvas-object wijbubblechart-bubble");H&&p.attr("opacity",.1);I=a.extend(false,{index:M,bubble:p,style:x,y1:Q,x:N,y:R,type:"bubble",hoverStyle:v},l);if(H){I.symbol=true;I.hoverStyle=a.extend({},v,{opacity:.1});a(L.node).data("wijchartDataObj",I);a.wijraphael.addClass(a(L.node),"wijbubblechart-symbol")}a(p.node).data("wijchartDataObj",I);F=p.clone();if(a.browser.msie&&a.browser.version<9)F.attr({opacity:.01,fill:"white","stroke-width":0,"fill-opacity":.01});else F.attr({opacity:.01,fill:"white","fill-opacity":.01});a(F.node).data("owner",a(p.node));a.wijraphael.addClass(a(F.node),"wijchart-canvas-object wijbubblechart-bubble bubbletracker");p.tracker=F;k.push(F);q.push(p);f.bubbles=q;T={x:O,y:P,r:G};if(i.visible&&u(X,M)){i.position==="outside"&&s(T,Q);d=r(T,Q);d.attr("opacity",0);a(d.node).data("wijchartDataObj",I);a.wijraphael.addClass(a(d.node),"wijbubblechart-label")}S={bubble:p,dcl:d,symbol:L};o.push(S);z.push(S);if(l.visible===false){p.hide();d&&d.hide();F.hide();L&&L.hide()}});f.bubbleInfos=o;p.push(z)}function x(){a.each(C,function(a,d){var c=y[a],b=t[a];A(d,c,b,H,I,P,N,j)})}function v(b,d,i,f,g,e,j,c){var h={mousedown:function(g){if(c)return;var e=a(g.target),f;if(e.data("owner"))e=e.data("owner");f=e.data("wijchartDataObj");d.call(b,g,f)},mouseup:function(f){if(c)return;var d=a(f.target),e;if(d.data("owner"))d=d.data("owner");e=d.data("wijchartDataObj");i.call(b,f,e)},mouseover:function(g){if(c)return;var d=a(g.target),e;if(d.data("owner"))d=d.data("owner");e=d.data("wijchartDataObj");f.call(b,g,e)},mouseout:function(h){if(c)return;var f=a(h.target),d,e;if(f.data("owner"))f=f.data("owner");d=f.data("wijchartDataObj");e=d.bubble;if(d.symbol)return;if(!d.hoverStyle)e&&e.attr({opacity:"1"});else{e.attr(d.style);d.style.opacity&&e.attr("opacity",d.style.opacity)}g.call(b,h,d)},mousemove:function(h){if(c)return;var g=a(h.target),d,f;if(g.data("owner"))g=g.data("owner");d=g.data("wijchartDataObj");f=d.bubble;if(!d.hoverStyle)f&&f.attr({opacity:"0.8"});else f.attr(d.hoverStyle);e.call(b,h,d)},click:function(f){if(c)return;var d=a(f.target),e;if(d.data("owner"))d=d.data("owner");e=d.data("wijchartDataObj");j.call(b,f,e)}};a.each(["click","mouseover","mouseout","mousemove","mousedown","mouseup"],function(d,c){a(".bubbletracker",b).bind(c+".wijbubblechart",h[c])})}x();f.seriesEles=p;w();k.toFront();f.trackers=k;v(l,E,M,G,K,F,O,J);l.data("fields",f)}});a.wijbubble={transform:function(n,k,e,c,o,j,g,i){var f,b=n,h=k-e,m=c.endX-c.startX,l=c.endY-c.startY;if(b<0)b=0;if(j===0)b=1;else b/=d;b=a.wijbubble.transformByArea(b,g,i);b*=h;b+=e;f=Math.min(m,l);b*=f/200;return b},transformByArea:function(d,b,c){var a=d;if(b==="area")switch(c){case"circle":a=Math.sqrt(a/Math.PI);break;case"tri":case"invertedTri":a=Math.sqrt(a/(3*Math.sin(Math.PI/6)*Math.cos(Math.PI/6)));break;case"box":a=Math.sqrt(a/2);break;case"diamond":case"cross":a=Math.sqrt(a/2);break;default:a=Math.sqrt(4*a/Math.PI)}return a}}})(jQuery);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Wijmo Library 2.2.0
|
|
4
|
+
* http://wijmo.com/
|
|
5
|
+
*
|
|
6
|
+
* Copyright(c) GrapeCity, Inc. All rights reserved.
|
|
7
|
+
*
|
|
8
|
+
* Dual licensed under the Wijmo Commercial or GNU GPL Version 3 licenses.
|
|
9
|
+
* licensing@wijmo.com
|
|
10
|
+
* http://wijmo.com/license
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
**/
|
|
14
|
+
(function(a){"use strict";var n="ui-helper-clearfix",y="ui-widget-content",l="ui-corner-",k=l+"all",c="ui-state-disabled",d="ui-state-hover",b="wijmo-wijcarousel-",B="wijmo-wijcarousel",w=B+" ui-widget ",F=b+"list",q=b+"item ",D=b+"clip",g=b+"current",t=b+"horizontal-multi",v=b+"horizontal",r=b+"button",u=b+"vertical-multi",x=b+"vertical",o=b+"button-next",p=b+"button-previous",z=b+"preview",e="ui-icon-triangle-1-",G=e+"n",H=e+"s",E=e+"e",I=e+"w",h="ui-icon-play",j="ui-icon-pause",C='<a class="ui-state-default"><span class="ui-icon"></span></a>',f=".wijmo-wijcarousel-pager,."+r+",."+o+",."+p,m='<div class="ui-helper-clearfix"></div>',A='<li class="ui-state-default wijmo-wijcarousel-page"><a></a></li>',s="li.wijmo-wijcarousel-page",i=1;a.widget("wijmo.wijcarousel",{options:{data:[],auto:false,interval:5e3,showTimer:false,buttonPosition:"inside",showPager:false,prevBtnClass:{defaultClass:"",hoverClass:"",disableClass:""},nextBtnClass:{defaultClass:"",hoverClass:"",disableClass:""},pagerType:"numbers",thumbnails:{mouseover:null,mouseout:null,mousedown:null,mouseup:null,click:null,imageWidth:58,imageHeight:74,images:[]},pagerPosition:{},orientation:"horizontal",sliderOrientation:"horizontal",loop:true,animation:{queue:true,disable:false,duration:1e3,easing:"easeOutCubic"},start:0,display:1,preview:false,step:1,showControls:false,control:"",controlPosition:{},showCaption:true,showControlsOnHover:false,itemClick:null,beforeScroll:null,afterScroll:null,loadCallback:null},_handleDisabledOption:function(d){var b=this;if(b.pager&&!b.pager.is(":hidden"))b.disabledEles=b.disabledEles.add(b.pager);if(d){b.element.addClass(c);!b.disabledDiv.length&&b._createDisabledDiv();b.disabledDiv.appendTo("body")}else if(b.disabledDiv){b.element.removeClass(c);b.disabledDiv.remove();b.disabledDiv=a()}},_createDisabledDiv:function(){var b=this;b.disabledEles.each(function(){var e=a(this),f=e.offset(),h=e.outerWidth(),g=e.outerHeight(),d=a("<div></div>").addClass(c).css({"z-index":"99999",position:"absolute",width:h,height:g,left:f.left,top:f.top});if(a.browser.msie){d.css("background-color","white");a.browser.version==="9.0"&&d.css("opacity","0.1")}b.disabledDiv=b.disabledDiv.add(d)})},_initStates:function(d,c){var b=this;b.count=0;b.currentIdx=d.start;b.timeout=null;b.isHorizontal=d.orientation==="horizontal";b.width=c.width()||640;b.height=c.height()||480;b.offset=0;b.disabledEles=c;b.disabledDiv=a()},_create:function(){var b=this,c=b.options,e=b.element;if(window.wijmoApplyWijTouchUtilEvents)a=window.wijmoApplyWijTouchUtilEvents(a);b._initStates(c,e);b._createDom(b.isHorizontal);b.list.bind("click."+b.widgetName,a.proxy(b._itemClick,b));if(c.showControlsOnHover){b.container.bind("mouseenter."+b.widgetName,function(){b._showControls()}).bind("mouseleave."+b.widgetName,function(){b._hideControls()});b.container.find(f).hide()}c.loadCallback&&a.isFunction(c.loadCallback)&&b._trigger("loadCallback",null,b);if(c.disabledState){var d=c.disabled;b.disable();c.disabled=d}else c.auto&&b.play();b.element.is(":hidden")&&b.element.wijAddVisibilityObserver&&b.element.wijAddVisibilityObserver(function(){b.refresh();b.element.wijRemoveVisibilityObserver&&b.element.wijRemoveVisibilityObserver()},"wijcarousel")},_showControls:function(){this.container.find(f).stop(true,true).fadeIn(600,function(){a(this).css("opacity","")})},_hideControls:function(){this.container.find(f).stop(true,true).fadeOut(600)},_applyContainerStyle:function(d,j){var a=this,h=a.options,g={},b=a.list,k=0,e,m=0,n=d?"left":"top",c=0,f,l=d?"width":"height";e=a.itemBound[d?"w":"h"];a.count=a.list.children("li").length;k=a.count*e;a.list[l](k);a.clip[l](h.display*e);a.clip[d?"height":"width"](a.itemBound[d?"h":"w"]);if(!h.loop){g[n]=-e*a.currentIdx;b.css(g)}else{f=b.find(">li:first");if(h.preview&&!!j)f=f.next();c=f.data("itemIndex");for(c;c<a.currentIdx;c++)b.children("li:first").appendTo(b);if(h.preview){if(!j)for(c=0;c<i;c++)b.children("li:last").prependTo(b);m=-e*i}g[n]=m;b.css(g)}},_applyListStyle:function(){var a=this,f=a.options,b=f.orientation==="horizontal",c=0,d,e=b?"width":"height";a.itemBound=a._getItemBound();d=a.itemBound[b?"w":"h"];c=a.count*d;a.list[e](c)},_createButtons:function(g,f){var b=this,h=b.options,e,d=c;a.each(["prevBtn","nextBtn"],function(q,j){var i=h[j+"Class"],k=j==="nextBtn",n=k?"next":"previous",m=k?o:p,l=k?f:g;if(i&&i.defaultClass){d=i.disableClass||d;e=i.hoverClass;b[j]=a('<a class="ui-state-default"></a>').addClass(i.defaultClass).mouseover(function(){!a(this).hasClass(d)&&a(this).addClass(e)}).mouseout(function(){!a(this).hasClass(d)&&a(this).removeClass(e)})}else b[j]=a(b._createBtn(m,l));b[j].bind("click."+b.widgetName,function(){var d=a(this);if(d.hasClass(c))return;b[n].call(b)}).appendTo(b.container)})},_applyBtnClass:function(){var e=this,g=e.options,b=c,f=d;a.each(["prevBtn","nextBtn"],function(i,d){var c=g[d+"Class"],h,a=e[d];if(c){b=c.disableClass||b;f=c.hoverClass||f}h=d==="prevBtn"?e.currentIdx<=0:e.currentIdx+g.display>=e.count;if(h&&!g.loop)a.removeClass(f).addClass(b);else a.hasClass(b)&&a.removeClass(b)})},_applyBtnStyle:function(b){var c=this,i=0,d,k={collision:"none",of:c.container,my:b?"right center":"center bottom",at:b?"right center":"center bottom"},m={collision:"none",of:c.container,my:b?"left center":"center top",at:b?"left center":"center top"},g=c.options.buttonPosition==="inside",e,f,j=["bottom","top","right","left"],h=function(e,f,g,c,d){e.removeClass(f).addClass(g);!isNaN(c)&&c!==0&&a.extend(d,{offset:b?c+" 0":"0 "+c});e.position(d)};i=b?c.prevBtn.width():c.prevBtn.height();d=g?0:i;e=l+j[b*2+g];f=l+j[b*2+!g];h(c.nextBtn,f,e,d,k);h(c.prevBtn,e,f,-d,m);c._applyBtnClass()},_createDom:function(d){var b=this,c=b.options,e=b.element,f,g,h,i;if(e.is("div")){b.list=e.children("ul:eq(0)");b.container=b.element;if(!b.list.length)b.list=a("<ul></ul>").appendTo(b.container)}else if(e.is("ul")){b.list=e;b.container=e.parent()}else return;b.itemBound=b._getItemBound();if(d){f=c.display>1&&!c.preview?t:v;g=E;h=I}else{f=c.display>1&&!c.preview?u:x;g=H;h=G}b.list.addClass(F).addClass(n);i=w+" "+f+" "+(c.preview?z+" ":"")+(c.display>1?y+" "+k:"");b.container.addClass(i);b._createItems(d);b._createClip(d);b._applyContainerStyle(d);b._createButtons(h,g);b._applyBtnStyle(d);c.preview&&b._createPreview();c.showTimer&&b._createTimer();c.showPager&&b._createPager();c.showControls&&b._createControls()},_createPreview:function(){var a=this,g=a.options,b,d,c=g.orientation==="horizontal",e=c?"left":"top",h=c?"right":"bottom",f;d=a.itemBound[c?"w":"h"];b=a.offset=Math.round(d/4);f=g.display*d+b*2;a.clip[c?"width":"height"](f);a.list.css(e,function(c,a){return parseFloat(a)+b});a.clip.css(e,function(){return-b});a.container.css("margin-"+e,b+"px").css("margin-"+h,b+"px");a._getItemByIndex(a.currentIdx).siblings().find(".wijmo-wijcarousel-text,.wijmo-wijcarousel-caption").hide()},_createItemsFromData:function(b){var c=this;if(!a.isArray(b)||!b.length||!a.isPlainObject(b[0])||a.isEmptyObject(b[0]))return;c.list.empty();a.each(b,function(e,b){var d;if(!a.isPlainObject(b))return true;d=c._generateMarkup(b);c.list.append(d)})},_generateMarkup:function(b){var c,d;if(!a.isPlainObject(b))return;c=a("<li></li>");if(typeof b.linkUrl==="string"&&b.linkUrl){d=a("<a>").attr("src",b.linkUrl);d.appendTo(c)}typeof b.imageUrl==="string"&&b.imageUrl&&a("<img>").attr("src",b.imageUrl).appendTo(d||c);typeof b.caption==="string"&&b.caption&&a("<span>").html(b.caption).appendTo(c);return c},_createItems:function(){var b=this,c,f,e=b.options,h,d;if(b.list){b._createItemsFromData(e.data);b.list.children("li").each(function(d){var c=a(this);b._createItem(c,d)});h=b.list.children("li").eq(b.currentIdx).addClass(g);if(e.preview&&e.display>1){c=d=h;for(f=0;f<e.display-1;f++){d=d.next();c=c.add(d)}c.find("div.wijmo-wijcarousel-mask").css({opacity:0})}}},_createItem:function(b,f){var c=this,g=c.options,e,d;e=b.addClass(q).addClass(n).find("img:eq(0)").attr("role","img").addClass("wijmo-wijcarousel-image");c._applyItemBound(b);d=b.children("span:eq(0)").hide();c._createCaption(b,e,d);g.preview&&a('<div class="wijmo-wijcarousel-mask">').appendTo(b);b.data("itemIndex",f);return b},_applyItemBound:function(b){var a=this,d=a.itemBound.w,c=a.itemBound.h;if(!a.itemWidth||!a.itemHeight){b.width(d).height(c);a.itemWidth=d-(b.outerWidth(true)-d);a.itemHeight=c-(b.outerHeight(true)-c)}b.width(a.itemWidth).height(a.itemHeight)},_createCaption:function(e,i,h){var f=this,j=f.options,b,g,c,d,k;if(j.showCaption){b=h.html()||i.attr("title");if(b&&b.length){c=a("<span></span>").html(b);d=a(m).addClass("wijmo-wijcarousel-caption").appendTo(e);g=a(m).addClass("ui-widget-content wijmo-wijcarousel-text").append(c).appendTo(e);f._applyCaptionStyle(d,g)}}},_applyCaptionStyle:function(d,c){var a=d.add(c),b;a.width(this.itemWidth);b=c.children("span").height();a.height(b)},_showCaption:function(b,c){var e=this,d=e._getItemByIndex(b),f=d.find(".wijmo-wijcarousel-text"),a=d.find(".wijmo-wijcarousel-caption");f.length&&f.fadeIn(300,function(){b<c&&e._showCaption(b+1,c)});if(a.length){a.show();a.animate({opacity:.5},300)}},_hideCaption:function(){this.element.find(".wijmo-wijcarousel-text,.wijmo-wijcarousel-caption").hide()},_createClip:function(){this.clip=this.list.wrap("<div></div>").parent().addClass(D)},_createBtn:function(f,e){var b=a(C);b.addClass(f).attr("role","button").mouseover(function(){!a(this).hasClass(c)&&a(this).addClass(d)}).mouseout(function(){!a(this).hasClass(c)&&a(this).removeClass(d)}).children("span:eq(0)").addClass(e);return b},_createControls:function(){var b=this,c=b.options,d={collision:"none",of:b.container,my:"center bottom",at:"center bottom"};if(c.control){b.controls=a(c.control).css({position:"absolute"}).appendTo(b.container);a.extend(d,c.controlPosition);b.controls.position(d)}},_createTimer:function(){var b=this;b._createPausePlay();b.progressBar=a("<div></div>").addClass("wijmo-wijcarousel-timerbar-inner "+k).css({width:"0%"}).attr("role","progressbar");b.timer=a("<div></div>").addClass("wijmo-wijcarousel-timerbar "+k).appendTo(b.container).append(b.progressBar).append(b.playPauseBtn)},_createPausePlay:function(){var b=this,c=b.options;b.playPauseBtn=a(b._createBtn(r,c.auto?j:h)).bind("click."+b.widgetName,function(){var c=a(this).children("span:eq(0)");b[c.hasClass(h)?"play":"pause"]()})},_createPagingItem:function(g,b,h,d){var c=a(A).attr({role:"tab","aria-label":d+1,title:d+1}),f,e;if(g)c.addClass("wijmo-wijcarousel-dot");else if(b&&b.images&&b.images[d]){f=b.imageWidth;e=b.imageHeight;f&&e&&c.width(f).height(e);c.children("a").append(a("<img>").attr("src",b.images[d]))}else return;h.append(c)},_createPaging:function(i){var b=this,j=b.options,f,h,g,c=j.thumbnails,e=i==="dots";b.container.append(b.pager=a('<div><ul class="wijmo-list ui-corner-all ui-helper-clearfix" role="tablist"></ul></div>'));!e&&b.pager.addClass("wijmo-wijcarousel-thumbnails");h=b.pager.children("ul.wijmo-list");for(f=0;f<b.count;f++)b._createPagingItem(e,c,h,f);g=b.pager.find("li").eq(b.currentIdx);g.length&&b._activePagerItem(g);c&&a.each(["mousedown","mouseup","mouseover","mouseout","click"],function(d,b){var a=c[b];if(a&&typeof a==="string"&&window[a])c[b]=window[a]});b.pager.bind("mouseover."+b.widgetName,function(a){b._pageingEvents(a,"mouseover",c,e,function(a){a.addClass(d)})}).bind("mouseout."+b.widgetName,function(a){b._pageingEvents(a,"mouseout",c,e,function(a){a.removeClass(d)})}).bind("click."+b.widgetName,function(a){b._pageingEvents(a,"click",c,e,function(a){b.scrollTo(a.index());b._activePagerItem(a)})});!e&&a.each(["mousedown","mouseup"],function(e,d){a.isFunction(c[d])&&b.pager.bind(d,function(b){var e=a(b.target).closest(s);e.length&&c[d].call(e,b)})})},_pageingEvents:function(b,f,d,g,e){var c=a(b.target).closest(s);if(c.length){a.isFunction(e)&&e.call(b,c);!g&&a.isFunction(d[f])&&d[f].call(c,b)}},_activePagerItem:function(a){a.addClass("ui-state-active").attr("aria-selected","true").siblings("li").removeClass("ui-state-active").removeAttr("aria-selected")},_createWijSlider:function(){var b=this,c=b.options.sliderOrientation,d={orientation:c,range:false,min:0,max:b.count-1,step:1,value:b.currentIdx,buttonClick:function(d,c){var a=c.value;b.scrollTo(a)},slide:function(d,c){var a=c.value;b.scrollTo(a)}},e=a("<div></div>").css("margin-bottom","10px").css(c==="horizontal"?"width":"height","200px").appendTo(b.container);b.pager=e.wijslider(d).parent().wrap("<div>").parent().addClass("wijmo-wijcarousel-slider-wrapper")},_createWijPager:function(){var b=this,c={pageCount:b.count,pageIndex:b.currentIdx,pageButtonCount:b.count,mode:"numeric",pageIndexChanged:function(d,c){var a=c.newPageIndex;b.scrollTo(a)}},d=a("<div></div>").appendTo(b.container);b.pager=d.wijpager(c).css({position:"absolute"})},_createPager:function(){var b=this,c=b.options,d={collision:"none",of:b.container,my:"right top",at:"right bottom"};if(c.pagerType==="numbers")b._createWijPager();else if(c.pagerType==="dots"||c.pagerType==="thumbnails"){b._createPaging(c.pagerType);b.pager.css({position:"absolute"})}else if(a.wijmo.wijslider&&c.pagerType==="slider"){b._createWijSlider();if(c.sliderOrientation!=="horizontal"){d.my="left center";d.at="right center"}}else return;b.pager.width(b.pager.width()+1);a.extend(d,c.pagerPosition);c.pagerPosition=d;b.pager.addClass("wijmo-wijcarousel-pager").position(d)},_setOption:function(c,d){var b=this,h=b.options,e,i,g,f=h.orientation==="horizontal";if(c==="pagerPosition"||c==="animation"||c==="controlPosition")a.extend(true,h[c],d);else{g=h[c];a.Widget.prototype._setOption.apply(b,arguments);switch(c){case"showControls":case"showPager":case"showTimer":if(d===g)break;e=c.replace(/show/i,"").toLowerCase();i=c.replace(/show/i,"_create");if(d===true)if(!b[e])b[i]();else b[e].jquery&&b[e].show();else b[e].hide();break;case"loop":case"orientation":case"display":case"preview":if(d!==g){b._destroy();b._create()}break;case"data":b._createItems(f);b._applyContainerStyle(f);b._applyBtnClass();h.showPager&&b._createPager();break;case"showCaption":if(d)b._createItems(f);else b.element.find(".wijmo-wijcarousel-caption,.wijmo-wijcarousel-text").remove();break;case"buttonPosition":b._applyBtnStyle(f);break;case"pagerType":if(d!==g){if(b.pager&&b.pager.jquery){b.pager.remove();b.pager=null}b._createPager()}break;case"disabled":b._handleDisabledOption(d,b.element)}}},_getItemBound:function(){var b={},a=this,c=a.options;if(c.orientation==="horizontal")b={w:Math.round(a.width/c.display),h:a.height};else b={w:a.width,h:Math.round(a.height/c.display)};return b},_stopAnimation:function(){var a=this;a.isPlaying&&a.progressBar&&a.progressBar.stop().css({width:"0%"});a.list.stop(true,true)},_itemClick:function(g){var i=a(g.target),b=this,j=b.options,e=b.currentIdx,c=i.closest("li."+q,i),d=c.data("itemIndex"),h,f;if(c.length>0){if(j.preview&&d<e||d>e+j.display-1){h=b._getItemByIndex(e).index();f=c.index()>h?"next":"previous";b[f]()}b._trigger("itemClick",g,{index:d,el:c})}},_destroy:function(){var b=this;b.container.removeClass("wijmo-wijcarousel ui-widget").removeClass("wijmo-wijcarousel-horizontal").removeClass("wijmo-wijcarousel-vertical");b.list.unwrap().removeClass("wijmo-wijcarousel-list ui-helper-clearfix").unbind("."+b.widgetName).removeAttr("style").children("li").each(function(){var b=a(this);b.removeClass("wijmo-wijcarousel-item ui-helper-clearfix").removeClass(g);b.children("img").removeClass("wijmo-wijcarousel-image");b.children(".wijmo-wijcarousel-caption,.wijmo-wijcarousel-text").remove();b.css({width:"",height:""});b.removeData("itemIndex")});b.itemWidth=b.itemHeight=undefined;b.element.find(f+",.wijmo-wijcarousel-timerbar").remove();b.pager&&b.pager.wijpager("destroy").remove();b.element.find("li>span").css("display","");if(b.disabledDiv.length){b.disabledDiv.remove();b.disabledDiv=a()}},destroy:function(){this._destroy();a.Widget.prototype.destroy.apply(this)},_resetDom:function(){var b=this;b._applyListStyle();b.list.children("li").each(function(){var c=a(this),d=c.children("div.wijmo-wijcarousel-caption"),e=c.children("div.wijmo-wijcarousel-text");b._applyItemBound(c);b._setStyle(d.add(e),function(){b._applyCaptionStyle(d,e)})});b._applyContainerStyle(b.isHorizontal,true);b.options.preview&&b._createPreview();b._setStyle(b.prevBtn.add(b.nextBtn),function(){b._applyBtnStyle(b.isHorizontal)});b._setStyle(b.pager,function(){b.pager.position(b.options.pagerPosition)});b._setStyle(b.controls,function(){b.controls.position(b.options.controlPosition)})},_setStyle:function(a,c){var b=true;if(!a||a.length===0)return;if(a.css("display")=="none"){b=false;a.css("display","")}c.call(this);!b&&a.css("display","none")},refresh:function(){var a=this,c=a.options,b=a.element;a.width=b.width()||640;a.height=b.height()||480;a.itemWidth=a.itemHeight=0;a._resetDom();a.pause()},play:function(){var a=this,b=a.options;if(a.isPlaying)return;if(b.interval===0)return a.pause();if(b.showTimer&&a.progressBar){a.progressBar.css({width:"0%"});a.playPauseBtn.children("span:eq(0)").removeClass(h).addClass(j);a.progressBar.animate({width:"100%"},b.interval,function(){a._scroll("next",b.step)})}else{if(a.timeout)return;a.timeout=window.setTimeout(function(){a.next()},b.interval)}a.isPlaying=true},pause:function(){var a=this,b=a.options;if(b.showTimer&&a.progressBar){a.progressBar.stop().css({width:"0%"});a.playPauseBtn.children("span:eq(0)").removeClass(j).addClass(h)}else{if(a.timeout===null)return;window.clearTimeout(a.timeout);a.timeout=null}a.isPlaying=false},next:function(){var a=this,b=a.options.step;if(typeof b!=="number"||b<1)return;a._stopAnimation();a._scroll("next",b)},previous:function(){var a=this,b=a.options.step;if(typeof b!=="number"||b<1)return;a._stopAnimation();a._scroll("previous",b)},scrollTo:function(b){var a=this,c,d;a._stopAnimation();c=b>a.currentIdx?"next":"previous";d=Math.abs(b-a.currentIdx);b!==a.currentIdx&&a._scroll(c,d)},_scroll:function(m,k){var b=this,d=b.options,p=b.list,c=0,n,h,r=d.orientation==="horizontal",j={},e=b.itemBound[r?"w":"h"],l=r?"left":"top",f=k,s={},q=0,o=b.currentIdx*e;if(!d.loop){if(m==="next")if(b.currentIdx+d.display+k<=b.count)c=-o-e*f;else if(b.currentIdx+d.display<b.count){f=b.count-b.currentIdx-d.display;c=-o-e*f}else return;else if(b.currentIdx-k>=0)c=-o+e*f;else if(b.currentIdx>0){f=b.currentIdx;c=0}if(c!==undefined){j[l]=c+b.offset;b._doAnimation(m,j,f)}}else{if(d.preview)c=q=-e*i+b.offset;if(m==="next"){c+=-e*f;j[l]=c}else{for(h=0;h<k;h++){c-=e;p.children("li:last").prependTo(p)}s[l]=c;j[l]=q;p.css(s)}b._doAnimation(m,j,k,l,e)}if(d.preview){n=a();for(h=0;h<d.display;h++)n=n.add(b._getItemByIndex(b.currentIdx+h).find("div.wijmo-wijcarousel-mask:eq(0)"));n.stop(true).animate({opacity:.6},d.animation.duration/2,function(){b._getItemByIndex(b.currentIdx).removeClass(g)})}},_doAnimation:function(k,o,h,n,p){var b=this,e=b.list,d=b.options,l,j,g={},f,m={},c;if(!b.list.children().length)return;if(k==="next")c=b.currentIdx+h;else c=b.currentIdx-h;if(!d.loop)f=function(){b.currentIdx=c;b._setCurrentState(b.currentIdx)};else{c=c%b.count+(c<0?b.count:0);f=function(){var a=0;if(d.preview)a=b.offset-i*p;if(k==="next"){for(j=0;j<h;j++)e.children("li:first").appendTo(e);if(n){m[n]=a;e.css(m)}}b.currentIdx=c;b._setCurrentState(b.currentIdx)}}g.complete=f;l={index:b.currentIdx,to:c,el:b._getItemByIndex(b.currentIdx)};if(!b._trigger("beforeScroll",null,l))return;if(d.animation&&d.animation.complete)d.animation.complete=undefined;a.extend(g,d.animation);b._hideCaption();e.animate(o,g)},_setCurrentState:function(c){var b=this,d=b.options,i,l,k,h=c+d.display-1,j,e,f;if(!d.loop){k=c+d.display<b.count;if(b.isPlaying&&k){window.clearTimeout(b.timeout);b.timeout=null;b.isPlaying=false;b.play()}else b.progressBar&&b.pause();b._applyBtnClass()}else if(b.isPlaying){window.clearTimeout(b.timeout);b.timeout=null;b.isPlaying=false;b.play()}if(d.preview){e=a();j=b._getItemByIndex(c);for(f=0;f<d.display;f++)e=e.add(b._getItemByIndex(c+f).find("div.wijmo-wijcarousel-mask:eq(0)"));e.animate({opacity:0},d.animation.duration/2,function(){j.addClass(g);b._showCaption(c,h)})}else b._showCaption(c,h);if(b.pager)if(a.wijmo.wijslider&&b.pager.find(":wijmo-wijslider").length)b.pager.find(":wijmo-wijslider:eq(0)").wijslider("value",c);else if(a.wijmo.wijpager&&b.pager.is(":wijmo-wijpager"))b.pager.wijpager("option","pageIndex",c);else if(b.pager.jquery){i=b.pager.find(">ul:eq(0)>li").eq(c);i.length&&b._activePagerItem(i)}l={firstIndex:c,lastIndex:h};b._trigger("afterScroll",null,l)},_getItemByIndex:function(f){var b=this,e=b.list,d,c=f%b.count;if(!b.options.loop)return e.children("li").eq(c);e.children("li").each(function(){var b=a(this);if(b.data("itemIndex")===c){d=b;return false}});return d},widget:function(){return this.container},_collectionChanged:function(b){var a=this;a.count=a.count+(b==="add"?1:-1);a._applyListStyle();if(a.pager&&a.pager.jquery){a.pager.remove();a.pager=null;a._createPager()}a._applyBtnClass()},add:function(e,d){var b=this,c,f;if(typeof e==="string")c=a(e);else if(e.jquery)c=e;else if(a.isPlainObject(e))c=b._generateMarkup(e);else return;if(!c.is("li"))c=c.wrap("<li></li>").parent();f=c;if(typeof d==="number"&&d>=0&&d<b.count){f.insertBefore(b._getItemByIndex(d));b.list.children("li").each(function(){var b=a(this);b.data("itemIndex")>=d&&b.data("itemIndex",b.data("itemIndex")+1)})}else f.insertAfter(b._getItemByIndex(b.count-1));b._createItem(c,d!==undefined?d:b.count);b._collectionChanged("add")},remove:function(c){var b=this,d;if(typeof c==="number"&&c>=0&&c<b.count){d=b._getItemByIndex(c);b.list.children("li").each(function(){var b=a(this);b.data("itemIndex")>c&&b.data("itemIndex",b.data("itemIndex")-1)})}else d=b._getItemByIndex(b.count-1);d&&d.remove();b._collectionChanged("remove")}})})(jQuery);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Wijmo Library 2.2.0
|
|
4
|
+
* http://wijmo.com/
|
|
5
|
+
*
|
|
6
|
+
* Copyright(c) GrapeCity, Inc. All rights reserved.
|
|
7
|
+
*
|
|
8
|
+
* Dual licensed under the Wijmo Commercial or GNU GPL Version 3 licenses.
|
|
9
|
+
* licensing@wijmo.com
|
|
10
|
+
* http://wijmo.com/license
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
**/
|
|
14
|
+
(function(a){"use strict";if(!window.Raphael)return;a.wijchart={getDiffAttrs:function(d,b){var c={};a.each(b,function(a){if(typeof d==="undefined")return true;else if(typeof d[a]==="undefined")c[a]=b[a];else if(d[a]!==b[a])c[a]=b[a]});return c},paintShadow:function(b,f,g){if(b.removed||a(b).parent().length===0)return;var c=b.clone(),d=f||1,e=g||"#cccccc";c.insertBefore(b);c.attr({transform:Raphael.format("...T{0},{1}",d,d),stroke:e,"stroke-width":d});c.toBack();c.offset=d;b.shadow=c},getScaling:function(b,d,e,c){var a=d-e;if(a===0)a=1;if(b)a=-a;return c/a},getTranslation:function(d,b,e,f,c){var a=0;if(d){a=b.y;a-=c*e}else{a=b.x;a-=c*f}return a},getXSortedPoints:function(e){var b=e.data.x,f=[].concat(b),g=[].concat(e.data.y),d=[],c=b;if(b===undefined||b.length===0)return;function h(a,b){return a-b}if(typeof b[0]==="number")c=[].concat(b).sort(h);a.each(c,function(c,b){a.each(f,function(e,a){if(b===a){if(typeof a!=="number")a=c;d.push({x:a,y:g[e]});f.splice(e,1);g.splice(e,1);return false}})});return d},sector:function(c,d,b,e,f){var g=a.wijraphael.getPositionByAngle(c,d,b,e),h=a.wijraphael.getPositionByAngle(c,d,b,f);return["M",c,d,"L",g.x,g.y,"A",b,b,0,+(f-e>180),0,h.x,h.y,"z"]},donut:function(e,f,c,b,g,h){var d=a.wijraphael.getPositionByAngle(e,f,c,g),l=a.wijraphael.getPositionByAngle(e,f,c,h),k=a.wijraphael.getPositionByAngle(e,f,b,g),j=a.wijraphael.getPositionByAngle(e,f,b,h),i=h-g>180;return["M",d.x,d.y,"A",c,c,0,+i,0,l.x,l.y,"L",j.x,j.y,"A",b,b,0,+i,1,k.x,k.y,"L",d.x,d.y,"z"]},getFirstValidListValue:function(c){var b;a.each(c,function(c,a){if(a===null)return true;else if(typeof a==="undefined")return true;else if(typeof a==="number"&&isNaN(a))return true;b=a;return false});return b},getLastValidListValue:function(b){var c=[].concat(b).reverse();return a.wijchart.getFirstValidListValue(c)},isHole:function(a,b){return a===null?true:typeof a==="undefined"?true:typeof a==="number"&&isNaN(a)?true:b===null?false:typeof a!=="undefined"?a-b===0?true:false:false}};var b={content:"",contentStyle:{},title:"",titleStyle:{},style:{fill:"white","fill-opacity":.5},closeBehavior:"auto",mouseTrailing:true,triggers:"hover",animated:"fade",showAnimated:null,hideAnimated:null,duration:500,showDuration:500,hideDuration:500,easing:null,showEasing:null,hideEasing:null,showDelay:150,hideDelay:150,relativeTo:"mouse",compass:"east",offsetX:0,offsetY:0,showCallout:true,calloutFilled:false,calloutFilledStyle:{fill:"black"},calloutLength:12,calloutOffset:0,calloutAnimation:{easing:null,duration:500},windowCollisionDetection:true,calloutSide:null,width:null,height:null,beforeShowing:null};Raphael.fn.closeBtn=function(c,d,b){var a=Math.cos(Math.PI/4)*b,f=this.set(),h=["M",c-a,d-a,"L",c+a,d+a,"M",c-a,d+a,"L",c+a,d-a],g=this.path(h.concat(" ")),e=null;g.attr({cursor:"pointer"});f.push(g);e=this.rect(c-b,d-b,b*2,b*2);e.attr({fill:"white","fill-opacity":0,cursor:"pointer",stroke:"none"});f.push(e);return f};Raphael.fn.tooltip=function(p,Y){var c=a.extend(true,{},b,Y),g=this,A=null,P=0,Q=0,f,h,i,e,d,y=null,x=null,n=null,m=5,l=null,u=g.tooltip.animations,t=c.calloutOffset,C=c.width,B=c.height,s=c.calloutLength/2,q=0,j=0,k=0,o,U=function(c,d){var a=c.getBBox(),b={x:0,y:0};switch(d.toLowerCase()){case"east":b.x=a.x+a.width;b.y=a.y+a.height/2;break;case"eastnorth":b.x=a.x+a.width;b.y=a.y;break;case"eastsouth":b.x=a.x+a.width;b.y=a.y+a.height;break;case"west":b.x=a.x;b.y=a.y+a.height/2;break;case"westnorth":b.x=a.x;b.y=a.y;break;case"westsouth":b.x=a.x;b.y=a.y+a.height;break;case"north":b.x=a.x+a.width/2;b.y=a.y;break;case"northeast":b.x=a.x+a.width;b.y=a.y;break;case"northwest":b.x=a.x;b.y=a.y;break;case"south":b.x=a.x+a.width/2;b.y=a.y+a.height;break;case"southeast":b.x=a.x+a.width;b.y=a.y+a.height;break;case"southwest":b.x=a.x;b.y=a.y+a.height}return b},G=function(a){if(a){window.clearTimeout(a);a=null}},z=function(g){if(l){var a,b,j;if(c.hideAnimated||c.animated){a=c.hideAnimated;if(!a)a=c.animated;if(a&&u[a]){j={animated:a,duration:c.hideDuration||c.duration,easing:c.hideEasing||c.easing,context:l,show:false};u[a](j)}}b=c.hideDuration;if(g)b=g;window.setTimeout(function(){var a,b;if(f){f.wijRemove();f=null}if(h){h.wijRemove();h=null}if(i){i.wijRemove();i=null}if(e){for(a=0,b=e.length;a<b;a++)e[a].unclick();e.wijRemove();e=null}if(d){d.wijRemove();d=null}n=null;l=null},b)}},L=function(){y&&G(y);x&&G(x)},v=function(){L();if(c.hideDelay)x=window.setTimeout(function(){z()},c.hideDelay);else z()},D=function(b){var a="";switch(b.toLowerCase()){case"east":a="right-middle";j=2;k=0;break;case"eastnorth":a="right-top";j=2;k=-2;break;case"eastsouth":a="right-bottom";j=2;k=2;break;case"west":a="left-middle";j=-2;k=0;break;case"westnorth":a="left-top";j=-2;k=-2;break;case"westsouth":a="left-bottom";j=-2;k=2;break;case"north":a="top-middle";j=0;k=-2;break;case"northeast":a="top-right";j=2;k=-2;break;case"northwest":a="top-left";j=-2;k=-2;break;case"south":a="bottom-middle";j=0;k=2;break;case"southeast":a="bottom-right";j=2;k=2;break;case"southwest":a="bottom-left";j=-2;k=2}return a},K=function(b,a){var d=[],e=c.compass;if(c.calloutSide)e=c.calloutSide;switch(e.toLowerCase()){case"east":case"eastsouth":case"eastnorth":d=["M",b.x+a,b.y+a,"l",-a,-a,"l",a,-a,"Z"];break;case"west":case"westsouth":case"westnorth":d=["M",b.x-a,b.y-a,"l",a,a,"l",-a,a,"Z"];break;case"north":case"northeast":case"northwest":d=["M",b.x-a,b.y-a,"l",a,a,"l",a,-a,"Z"];break;case"south":case"southeast":case"southwest":d=["M",b.x-a,b.y+a,"l",a,-a,"l",a,a,"Z"]}return d},M=function(e,d){if(a.isFunction(e)){var h=null,f,c={target:null,fmt:e},b;if(d&&d.target){b=d.target;if(!b.raphael||!b.raphaelid)b=b.parentNode;if(b.raphael&&b.raphaelid){f=g.getById(b.raphaelid);c.target=f}else c.target=d.target}h=a.proxy(c.fmt,c);return h().toString()}return e},H=function(a){if(c.calloutSide){var b=s||q;switch(c.calloutSide){case"south":case"north":if(a)d.animate({translation:-C/2+b+t+",0"},a);else d.translate(-C/2+b+t,0);break;case"east":case"west":if(a)d.animate({translation:"0,"+(-B/2+b+t)},a);else d.translate(0,-B/2+b+t)}}},V=/\{([^\}]+)\}/g,S=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,W=function(c,d,b){var a=b;d.replace(S,function(f,b,e,c,d){b=b||c;if(a){if(a[b]!=="string")a=a[b];if(typeof a==="function"&&d)a=a()}});a=(a===null||a===b?c:a).toString();return a},ab=function(b,a){return String(b).replace(V,function(b,c){return W(b,c,a)})},N=function(i,u,s,t,h){var o=u.split("-"),e=5,p=s.getBBox(),d=Math.round(p.width),b=Math.round(p.height),j=Math.round(p.x)-e,k=Math.round(p.y)-e,a=0,f=0,m=0,n=0,q=null,l=null,r=null;if(c.width)d=d>c.width?d:c.width;if(c.height)b=b>c.height?b:c.height;C=d;B=b;a=Math.min(b/4,d/4,t);if(h)h=Math.min(b/4,d/4,h);if(h){f=h;q={top:"M{x},{y}h{w4},{w4},{w4},{w4}a{r},{r},0,0,1,{r},{r}v{h4},{h4},{h4},{h4}a{r},{r},0,0,1,-{r},{r}l-{right},0-{offset},0,-{left},0a{r},{r},0,0,1-{r}-{r}v-{h4}-{h4}-{h4}-{h4}a{r},{r},0,0,1,{r}-{r}z",bottom:"M{x},{y}l{left},0,{offset},0,{right},0a{r},{r},0,0,1,{r},{r}v{h4},{h4},{h4},{h4}a{r},{r},0,0,1,-{r},{r}h-{w4}-{w4}-{w4}-{w4}a{r},{r},0,0,1-{r}-{r}v-{h4}-{h4}-{h4}-{h4}a{r},{r},0,0,1,{r}-{r}z",right:"M{x},{y}h{w4},{w4},{w4},{w4}a{r},{r},0,0,1,{r},{r}v{h4},{h4},{h4},{h4}a{r},{r},0,0,1,-{r},{r}h-{w4}-{w4}-{w4}-{w4}a{r},{r},0,0,1-{r}-{r}l0-{bottom},0-{offset},0-{top}a{r},{r},0,0,1,{r}-{r}z",left:"M{x},{y}h{w4},{w4},{w4},{w4}a{r},{r},0,0,1,{r},{r}l0,{top},0,{offset},0,{bottom}a{r},{r},0,0,1,-{r},{r}h-{w4}-{w4}-{w4}-{w4}a{r},{r},0,0,1-{r}-{r}v-{h4}-{h4}-{h4}-{h4}a{r},{r},0,0,1,{r}-{r}z"}}else q={top:"M{x},{y}h{w4},{w4},{w4},{w4}a{r},{r},0,0,1,{r},{r}v{h4},{h4},{h4},{h4}a{r},{r},0,0,1,-{r},{r}l-{right},0-{gap},{gap}-{gap}-{gap}-{left},0a{r},{r},0,0,1-{r}-{r}v-{h4}-{h4}-{h4}-{h4}a{r},{r},0,0,1,{r}-{r}z",bottom:"M{x},{y}l{left},0,{gap}-{gap},{gap},{gap},{right},0a{r},{r},0,0,1,{r},{r}v{h4},{h4},{h4},{h4}a{r},{r},0,0,1,-{r},{r}h-{w4}-{w4}-{w4}-{w4}a{r},{r},0,0,1-{r}-{r}v-{h4}-{h4}-{h4}-{h4}a{r},{r},0,0,1,{r}-{r}z",right:"M{x},{y}h{w4},{w4},{w4},{w4}a{r},{r},0,0,1,{r},{r}v{h4},{h4},{h4},{h4}a{r},{r},0,0,1,-{r},{r}h-{w4}-{w4}-{w4}-{w4}a{r},{r},0,0,1-{r}-{r}l0-{bottom}-{gap}-{gap},{gap}-{gap},0-{top}a{r},{r},0,0,1,{r}-{r}z",left:"M{x},{y}h{w4},{w4},{w4},{w4}a{r},{r},0,0,1,{r},{r}l0,{top},{gap},{gap}-{gap},{gap},0,{bottom}a{r},{r},0,0,1,-{r},{r}h-{w4}-{w4}-{w4}-{w4}a{r},{r},0,0,1-{r}-{r}v-{h4}-{h4}-{h4}-{h4}a{r},{r},0,0,1,{r}-{r}z"};l=([{x:j+e,y:k,w:d,w4:d/4,h4:b/4,left:0,right:d-a*2-f*2,top:0,bottom:b-a*2-f*2,r:e,h:b,gap:a,offset:f*2},{x:j+e,y:k,w:d,w4:d/4,h4:b/4,left:d/2-a-f,right:d/2-a-f,top:b/2-a-f,bottom:b/2-a-f,r:e,h:b,gap:a,offset:f*2},{x:j+e,y:k,w:d,w4:d/4,h4:b/4,right:0,left:d-a*2-f*2,bottom:0,top:b-a*2-f*2,r:e,h:b,gap:a,offset:f*2}])[o[1]==="middle"?1:(o[1]==="left"||o[1]==="top")*2];r=g.path(ab(q[o[0]],l));switch(o[0]){case"top":m=i.x-(j+e+l.left+a+h);n=i.y-(k+e+b+e+a+h);break;case"bottom":m=i.x-(j+e+l.left+a+h);n=i.y-(k-a-h);break;case"left":m=i.x-(j+e+d+e+a+h);n=i.y-(k+e+l.top+a+h);break;case"right":m=i.x-(j-a-f);n=i.y-(k+e+l.top+a+f)}r.translate(m,n);s.translate(m,n);return r},F=function(n,o,d,e,p,q){var c=n.getBBox(),f=0,b=o,h=c.x+p,i=c.y+q,m=g.width,l=g.height,j=d,k=e;if(g.raphael.vml){m=a(g.canvas).width();l=a(g.canvas).height()}if(h+d<0)if(b.toLowerCase().indexOf("west")===-1){if(h+c.width/2+c.width-d<=m){f++;b=b.toLowerCase()+"east";j=0-d}}else if(h+c.width+c.width-d<=m){f++;b=b.toLowerCase().replace("west","east");j=0-d}if(i+e<0)if(b.toLowerCase().indexOf("north")===-1){if(i+c.height/2+c.height-e<=l){f++;b=b.toLowerCase()+"south";k=0-e}}else if(i+c.height+c.height-e<=l){f++;b=b.toLowerCase().replace("north","south");k=0-e}if(h+c.width+d>m)if(b.toLowerCase().indexOf("east")===-1){if(h-c.width/2-d>=0){f++;b=b.toLowerCase()+"west";j=0-d}}else if(h-c.width-d>=0){f++;b=b.toLowerCase().replace("east","west");j=0-d}if(i+c.height+e>l)if(b.toLowerCase().indexOf("south")===-1){if(i-c.height/2-e>=0){f++;b=b.toLowerCase()+"north";k=0-e}}else if(i-c.height-e>=0){f++;b=b.toLowerCase().replace("south","north");k=0-e}return f?{compass:b,offsetX:j,offsetY:k}:false},w=function(E,A,z,M,I,J,L){var x,t,B,p=g.set(),C=null,r=null,P=null,Q=0,R=0,S=250,G=0,O=0,b,o={x:E.x,y:E.y},y=null;a.wijraphael.clearRaphaelCache();B=D(I);o.x+=J+j;o.y+=L+k;l=g.set();if(h){a.each(h,function(c,b){a(b.node).unbind(".Rtooltip")});h.wijRemove()}if(A&&A.length>0){h=g.htmlText(-1e3,-1e3,A,c.titleStyle);l.push(h);x=h.getBBox()}else x={left:-1e3,top:-1e3,width:0,height:0};if(f){a.each(f,function(c,b){a(b.node).unbind(".Rtooltip")});f.wijRemove()}if(z&&z.length>0){f=g.htmlText(-1e3,-1e3,z,c.contentStyle);l.push(f);t=f.getBBox()}else t={left:-1e3,top:-1e3,width:0,height:0};if(e){for(G=0,O=e.length;G<O;G++)e[G].unclick();e.wijRemove()}f&&f.transform(Raphael.format("T0,{0}",x.height/2+t.height/2));h&&h.transform(Raphael.format("T0,{0}",0));if(c.closeBehavior==="sticky"){e=g.closeBtn(-1e3,-1e3,m);l.push(e);if(c.width&&c.width>x.width+m*2&&c.width>t.width+m*2)e.transform(Raphael.format("T{0},{1}",c.width-m,m));else if(x.width>=t.width-m*2)e.transform(Raphael.format("T{0},{1}",x.width+m,m));else e.transform(Raphael.format("T{0},{1}",t.width-m,m));a.each(e,function(){this.click(function(a){v(a)})})}if(h){p.push(h);c.relatedElement&&h.insertBefore(c.relatedElement)}if(f){p.push(f);c.relatedElement&&f.insertBefore(c.relatedElement)}if(e){p.push(e);c.relatedElement&&e.insertBefore(c.relatedElement)}if(!c.showCallout)s=0;if(c.calloutSide||c.calloutFilled){s=0;q=c.calloutLength/2;if(c.calloutSide)B=D(c.calloutSide)}if(c.calloutSide&&p.length===0){f=g.htmlText(-1e3,-1e3," ");p.push(f);c.relatedElement&&f.insertBefore(c.relatedElement)}if(d){a(d.node).unbind(".Rtooltip");d.wijRemove()}if(i){a(i.node).unbind(".Rtooltip");i.wijRemove()}if(n){if(c.showCallout&&(c.calloutSide||c.calloutFilled)){C=K(n,q);d=g.path(C.concat(" "));c.relatedElement&&d.insertBefore(c.relatedElement);c.calloutFilled&&d.attr(c.calloutFilledStyle);c.calloutSide&&H(0)}i=N(n,B,p,s,q);c.relatedElement&&i.insertBefore(c.relatedElement);if(M){b=F(i,I,J,L,o.x-n.x,o.y-n.y);if(b){w(E,A,z,false,b.compass,b.offsetX,b.offsetY);return}}l.push(d);l.push(i);Q=o.x-n.x;R=o.y-n.y;y=Raphael.animation({transform:Raphael.format("...T{0},{1}",Q,R)},S);i&&i.animate(y);h&&h.animate(y);f&&f.animate(y);e&&e.animate(y);d&&d.animate(y)}else{if(c.showCallout&&(c.calloutSide||c.calloutFilled)){C=K(o,q);d=g.path(C.concat(" "));c.relatedElement&&d.insertBefore(c.relatedElement);c.calloutFilled&&d.attr(c.calloutFilledStyle);c.calloutSide&&H(0)}i=N(o,B,p,s,q);c.relatedElement&&i.insertBefore(c.relatedElement);if(M){b=F(i,I,J,L,0,0);if(b){w(E,A,z,false,b.compass,b.offsetX,b.offsetY);return}}l.push(d);l.push(i);if(c.showAnimated||c.animated){r=c.showAnimated;if(!r)r=c.animated;if(r&&u[r]){P={animated:r,duration:c.showDuration||c.duration,easing:c.showEasing||c.easing,context:l,show:true};u[r](P)}}}n=o;i.attr(c.style);if(c.relatedElement){h&&h.insertBefore(c.relatedElement);f&&f.insertBefore(c.relatedElement);e&&e.insertBefore(c.relatedElement)}else p.toFront()},J=function(k,d){var h=null,e=null,j=null,f=null,i,b;if(a.isFunction(c.beforeShowing)){j=null;f={target:null,options:c,fmt:c.beforeShowing};if(d&&d.target){b=d.target;if(!b.raphael||!b.raphaelid)b=b.parentNode;if(b.raphael&&b.raphaelid){i=g.getById(b.raphaelid);f.target=i}else{i=d.target;f.target=i}}j=a.proxy(f.fmt,f);j()}h=c.title;e=c.content;h=M(h,d);e=M(e,d);if(!h&&!e)return;w(k,h,e,c.windowCollisionDetection,c.compass,c.offsetX,c.offsetY)},R=function(a,b){L();if(c.showDelay)y=window.setTimeout(function(){J(a,b)},c.showDelay);else J(a,b)},r=function(e){A=a(g.canvas.parentNode).offset();P=A.left;Q=A.top;var h=c.relativeTo,d={x:0,y:0},f=null,b=e.target;switch(h){case"mouse":d.x=e.pageX-P;d.y=e.pageY-Q;break;case"element":if(!b.raphael||!b.raphaelid)b=b.parentNode;if(b.raphael&&b.raphaelid){f=g.getById(b.raphaelid);d=U(f,c.compass)}}R(d,e)},O=function(b){switch(c.triggers){case"hover":a(b.node).bind("mouseover.Rtooltip",function(a){r(a)}).bind("mouseout.Rtooltip",function(a){c.closeBehavior==="auto"&&v(a)});c.mouseTrailing&&c.relativeTo==="mouse"&&a(b.node).bind("mousemove.Rtooltip",function(a){r(a)});break;case"click":a(b.node).bind("click.Rtooltip",function(a){r(a)})}},I=function(a){var b,c;if(a)if(a.length)for(b=0,c=a.length;b<c;b++)O(a[b]);else O(a)},E=function(){if(o)switch(c.triggers){case"hover":o.live("mouseover.Rtooltip",function(a){r(a)}).live("mouseout.Rtooltip",function(a){c.closeBehavior==="auto"&&v(a)});c.mouseTrailing&&c.relativeTo==="mouse"&&o.live("mousemove.Rtooltip",function(a){r(a)});break;case"click":o.live("click.Rtooltip",function(a){r(a)})}},T=function(){var b,c;if(p)if(p.length)for(b=0,c=p.length;b<c;b++)a(p[b].node).unbind(".Rtooltip");else a(p.node).unbind(".Rtooltip");o&&o.die("Rtooltip").die(".Rtooltip")},X=function(){T();z(0)},Z=function(){this.hide=function(){v()};this.showAt=function(a){R(a)};this.resetCalloutOffset=function(e){var f=c.calloutOffset,a=c.calloutSide,b=c.calloutAnimation;if(d)if(a==="south"||a==="north")d.animate({translation:e-f+",0"},b.duration,b.easing);else(a==="east"||a==="west")&&d.animate({translation:"0,"+(e-f)},b.duration,b.easing);c.calloutOffset=e};this.destroy=function(){X()};this.getOptions=function(){return c};this.setTargets=function(a){I(a)};this.setSelector=function(a){o=a;E()};this.setOptions=function(b){c=a.extend(true,c,b)}};p&&I(p);o&&E(o);return new Z};Raphael.fn.tooltip.animations={fade:function(a){var b=a.context;if(a.show){b.attr({opacity:0});b.animate({opacity:1},a.duration,a.easing)}else b.animate({opacity:0},a.duration,a.easing)}}})(jQuery);(function(a){"use strict";a.widget("wijmo.wijchartcore",{options:{width:null,height:null,culture:"",seriesList:[],seriesStyles:[{stroke:"#00cc00",opacity:.9,"stroke-width":1},{stroke:"#0099cc",opacity:.9,"stroke-width":1},{stroke:"#0055cc",opacity:.9,"stroke-width":1},{stroke:"#2200cc",opacity:.9,"stroke-width":1},{stroke:"#8800cc",opacity:.9,"stroke-width":1},{stroke:"#d9007e",opacity:.9,"stroke-width":1},{stroke:"#ff0000",opacity:.9,"stroke-width":1},{stroke:"#ff6600",opacity:.9,"stroke-width":1},{stroke:"#ff9900",opacity:.9,"stroke-width":1},{stroke:"#ffcc00",opacity:.9,"stroke-width":1},{stroke:"#ffff00",opacity:.9,"stroke-width":1},{stroke:"#ace600",opacity:.9,"stroke-width":1}],seriesHoverStyles:[{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5}],marginTop:25,marginRight:25,marginBottom:25,marginLeft:25,textStyle:{fill:"#888","font-size":10,stroke:"none"},header:{text:"",style:{fill:"none",stroke:"none"},textStyle:{"font-size":18,fill:"#666",stroke:"none"},compass:"north",orientation:"horizontal",visible:true},footer:{text:"",style:{fill:"#fff",stroke:"none"},textStyle:{fill:"#000",stroke:"none"},compass:"south",orientation:"horizontal",visible:false},legend:{text:"",textMargin:{left:2,top:2,right:2,bottom:2},style:{fill:"none",stroke:"none"},textWidth:null,textStyle:{fill:"#333",stroke:"none"},titleStyle:{"font-weight":"bold",fill:"#000",stroke:"none"},compass:"east",orientation:"vertical",visible:true},axis:{x:{alignment:"center",style:{stroke:"#999999","stroke-width":.5},visible:true,textVisible:true,text:"",textStyle:{fill:"#888","font-size":15,"font-weight":"bold"},labels:{style:{fill:"#333","font-size":11},textAlign:"near",width:null},compass:"south",autoMin:true,autoMax:true,min:null,max:null,origin:null,autoMajor:true,autoMinor:true,unitMajor:null,unitMinor:null,gridMajor:{visible:false,style:{stroke:"#CACACA","stroke-dasharray":"- "}},gridMinor:{visible:false,style:{stroke:"#CACACA","stroke-dasharray":"- "}},tickMajor:{position:"none",style:{fill:"black"},factor:1},tickMinor:{position:"none",style:{fill:"black"},factor:1},annoMethod:"values",annoFormatString:"",valueLabels:[]},y:{alignment:"center",style:{stroke:"#999999","stroke-width":.5},visible:false,textVisible:true,text:"",textStyle:{fill:"#888","font-size":15,"font-weight":"bold"},labels:{style:{fill:"#333","font-size":11},textAlign:"center",width:null},compass:"west",autoMin:true,autoMax:true,min:null,max:null,origin:null,autoMajor:true,autoMinor:true,unitMajor:null,unitMinor:null,gridMajor:{visible:true,style:{stroke:"#999999","stroke-width":.5,"stroke-dasharray":"none"}},gridMinor:{visible:false,style:{stroke:"#CACACA","stroke-dasharray":"- "}},tickMajor:{position:"none",style:{fill:"black"},factor:1},tickMinor:{position:"none",style:{fill:"black"},factor:1},annoMethod:"values",annoFormatString:"",valueLabels:[]}},hint:{enable:true,content:null,contentStyle:{fill:"#d1d1d1","font-size":16},title:null,titleStyle:{fill:"#d1d1d1","font-size":16},style:{fill:"#000000","stroke-width":2},animated:"fade",showAnimated:"fade",hideAnimated:"fade",duration:120,showDuration:120,hideDuration:120,easing:"",showEasing:"",hideEasing:"",showDelay:0,hideDelay:150,compass:"north",offsetX:0,offsetY:0,showCallout:true,calloutFilled:false,calloutFilledStyle:{fill:"#000"}},showChartLabels:true,chartLabelStyle:{},chartLabelFormatString:"",disableDefaultTextStyle:false,shadow:true,dataSource:null,data:null,beforeSeriesChange:null,seriesChanged:null,beforePaint:null,painted:null},innerState:{},_setOption:function(d,f){var c=this,b=c.options,o=null,n=0,g=0,j=b.axis.x.tickMajor.factor,k=b.axis.x.tickMinor.factor,l,m,e,i,h;if(d==="dataSource"){c.seriesTransition=true;b.dataSource=f;if(c.seriesList)b.seriesList=a.arrayClone(c.seriesList);c._init()}if(d==="seriesList"){if(!f)f=[];o=a.Event("beforeserieschange");if(c._trigger("beforeSeriesChange",o,{oldSeriesList:b.seriesList,newSeriesList:f})===false)return false;b.seriesList=f;c.seriesList=a.arrayClone(f);c._trigger("seriesChanged",null,f);c.seriesTransition=true;c._init()}else if(a.isPlainObject(b[d])){if(d==="axis")if(a.isArray(b.axis.y))e=a.arrayClone(b.axis.y);else e=a.extend(true,{},b.axis.y);a.extend(true,b[d],f);if(d==="axis"){i=b.axis.y;if(b.axis.x.tickMajor.factor<0)b.axis.x.tickMajor.factor=j;if(b.axis.x.tickMinor.factor<0)b.axis.x.tickMinor.factor=k;if(!a.isArray(i)){if(a.isArray(e)){l=e[0].tickMajor.factor;m=e[0].tickMinor.factor}else{j=e.tickMajor.factor;k=e.tickMinor.factor}if(b.axis.y.tickMajor.factor<0)b.axis.y.tickMajor.factor=l;if(b.axis.y.tickMinor.factor<0)b.axis.y.tickMinor.factor=m}else{if(!a.isArray(e))e=[e];a.each(i,function(c,a){var b=e[c]||{};if(b.tickMajor&&a.tickMajor.factor)if(a.tickMajor.factor<0)a.tickMajor.factor=b.tickMajor.factor;if(b.tickMinor&&b.tickMinor.factor)if(a.tickMinor.factor<0)a.tickMinor.factor=b.tickMinor.factor})}}}else a.Widget.prototype._setOption.apply(c,arguments);d==="disabled"&&c._handleDisabledOption(f,c.chartElement);if(d==="seriesTransition"||d==="animation")return;n=b.seriesList.length;if(d==="seriesList"||d==="seriesStyles"||d==="seriesHoverStyles"){c.styles={style:[].concat(b.seriesStyles.slice(0,b.seriesStyles.length)),hoverStyles:[].concat(b.seriesHoverStyles.slice(0,b.seriesHoverStyles.length))};c._initStyles()}if(d==="seriesList"||d==="seriesHoverStyles"){h=b.seriesHoverStyles.length;for(g=h;g<n;g++)b.seriesHoverStyles[g]=b.seriesHoverStyles[g%h]}c.redraw()},_initStyles:function(){var b=this.options,g=b.seriesStyles,f=b.seriesHoverStyles,e,d,c,a;if(b.seriesList)d=b.seriesList.length||0;if(b.seriesStyles)e=b.seriesStyles.length||0;if(b.seriesHoverStyles)c=b.seriesHoverStyles.length||0;if(d>e&&e)for(a=e;a<d;a++)g[a]=g[a%e];if(d>c&&c)for(a=c;a<d;a++)f[a]=f[a%c]},_create:function(){var b=this,c=b.options,g=c.width||b.element.width(),f=c.height||b.element.height(),e=null,d;if(window.wijmoApplyWijTouchUtilEvents)a=window.wijmoApplyWijTouchUtilEvents(a);b.updating=0;b.innerState={};b.element.is(":hidden")&&b.element.wijAddVisibilityObserver&&b.element.wijAddVisibilityObserver(function(){b.redraw();b.element.wijRemoveVisibilityObserver&&b.element.wijRemoveVisibilityObserver()},"wijchart");a.isFunction(window.wijmoASPNetParseOptions)&&wijmoASPNetParseOptions(c);b.styles={style:[].concat(c.seriesStyles.slice(0,c.seriesStyles.length)),hoverStyles:[].concat(c.seriesHoverStyles.slice(0,c.seriesHoverStyles.length))};b._initStyles();if(c.hint&&typeof c.hint.content==="string"&&window[c.hint.content])c.hint.content=window[c.hint.content];if(c.hint&&typeof c.hint.title==="string"&&window[c.hint.title])c.hint.title=window[c.hint.title];b.headerEles=[];b.footerEles=[];b.legendEles=[];b.axisEles=[];b.legends=[];b.legendIcons=[];b.legendDots=[];b.chartLabelEles=[];b.seriesEles=[];if(b.element.length>0){if(b.element.is("table")){b._parseTable();e=a("<div></div>");g&&e.css("width",g);f&&e.css("height",f);b.element.after(e);b.chartElement=e}else b.chartElement=b.element;b.chartElement.addClass("ui-widget");d=new Raphael(b.chartElement[0],g,f);b.canvas=d;c.disabled&&b.disable();d.customAttributes.rotation=function(a){this.transform("...R"+a)};d.customAttributes.scale=function(a){this.transform("...S"+a)};d.customAttributes.translation=function(a,b){this.transform(Raphael.format("...T{0},{1}",a,b))};b._bindLiveEvents()}},_getDefFill:function(){return["#00cc00","#0099cc","#0055cc","#2200cc","#8800cc","#d9007e","#ff0000","#ff6600","#ff9900","#ffcc00","#ffff00","#ace600"]},_getCulture:function(a){return Globalize.findClosestCulture(a||this.options.culture)},_handleDisabledOption:function(b,c){var a=this;if(b){if(!a.disabledDiv)a.disabledDiv=a._createDisabledDiv(c);a.disabledDiv.appendTo("body")}else if(a.disabledDiv){a.disabledDiv.remove();a.disabledDiv=null}},_createDisabledDiv:function(h){var d=this,e=d.options,b=h||d.element,c=b.offset(),g=e.width||b.outerWidth(),f=e.height||b.outerHeight();return a("<div></div>").addClass("ui-disabled").css({"z-index":"99999",position:"absolute",width:g,height:f,left:c.left,top:c.top})},_bindData:function(){var b=this,e=b.options,f=e.dataSource,g=e.seriesList,c=e.data,d;a.each(g,function(k,j){var a=j.data,h,i,g,e=j.dataSource||f;if(e&&a){h=a.x;i=a.y;g=a.y1;if(h&&h.bind)a.x=b._getBindData(e,h.bind);else if(c&&c.x&&c.x.bind){if(d===undefined)d=b._getBindData(e,c.x.bind);a.x=d}if(i&&i.bind)a.y=b._getBindData(e,i.bind);if(g&&g.bind)a.y1=b._getBindData(e,g.bind)}})},_getBindData:function(b,c){if(a.isArray(b)){var d=[];a.each(b,function(b,a){a&&a[c]!==undefined&&d.push(a[c])});return d}return null},_hanldSharedXData:function(){var e=this,c=e.options,d=c.seriesList,b=c.data;b&&a.each(d,function(e,d){var c=d.data;if(c.x===undefined||c.x===null&&a.isArray(b.x))c.x=b.x})},_init:function(){var b=this,c=b.options;if(!b.rendered)b.seriesList=a.arrayClone(c.seriesList);b._bindData();b._hanldSharedXData();a.each(c.seriesList,function(f,b){var d=b.data,e;if(typeof d==="undefined"||d===null){e=a.inArray(b,c.seriesList);c.seriesList.splice(e,1)}});!b.rendered&&b._paint();a.Widget.prototype._init.apply(b,arguments)},destroy:function(){var b=this;b._unbindLiveEvents();b._clearChartElement();b.chartElement.removeClass("ui-widget");a(".wijchart-canvas-object",b.chartElement[0]).die(b.widgetName).die("."+b.widgetName);b.element!==b.chartElement&&b.chartElement.remove();b.element.empty();if(b.styles)b.styles=null;if(b.disabledDiv){b.disabledDiv.remove();b.disabledDiv=null}a.Widget.prototype.destroy.apply(b,arguments)},getCanvas:function(){return this.canvas},addSeriesPoint:function(c,e,f){var b=this.options.seriesList,d=null,a=null;if(c>=b.length)return;d=b[c];a=d.data||[];a.x.push(e.x);a.y.push(e.y);if(f){a.x.shift();a.y.shift()}this._setOption("seriesList",b)},beginUpdate:function(){var a=this;a.updating++},endUpdate:function(){var a=this;a.updating--;a.redraw()},redraw:function(e){var a=this,d=a.options,c=0,b=0;if(a.updating>0)return;if(e&&a.rendered)return;c=d.width||a.element.width();b=d.height||a.element.height();if(c<1||b<1)return;a.canvas.setSize(c,b);a._paint()},_parseTable:function(){if(!this.element.is("table"))return;var d=this,e=d.element,b=d.options,c=a("caption",e),g=a("thead th",e),f=[],h=a("tbody tr",e);if(c.length){b.header=a.extend({visible:true,text:a.trim(a(c[0]).text())},b.header);if(c.length>1)b.footer=a.extend({visibel:true,text:a.trim(a(c[1]).text())},b.footer)}b.legend=a.extend({visible:true},b.legend);d._getSeriesFromTR(g,h,f);d.options.seriesList=f},_getSeriesFromTR:function(b,e,g){var c=[],f=null,d=null;b.length&&b.each(function(){f=a.trim(a(this).text());c.push(f)});e.length&&e.each(function(){var h=a("th",a(this)),f=a.trim(h.text()),b=[],e=a("td",a(this));e.length&&e.each(function(){var c=a(this);b.push(parseFloat(a.trim(c.text())))});d={label:f,legendEntry:true,data:{x:c,y:b}};g.push(d)})},_destroyRaphaelArray:function(c){if(!c)return;for(var f=c.length,e=0,b,d;f&&e<f;e++){b=c[e];if(b&&b[0]){d=a(b.node);d.unbind().removeData();b.wijRemove();d.remove();d=null}c[e]=null}},_clearChartElement:function(){var b=this,c=b.chartElement.data("fields");b._destroyRaphaelArray(b.headerEles);b._destroyRaphaelArray(b.footerEles);b._destroyRaphaelArray(b.legendEles);b._destroyRaphaelArray(b.legends);b._destroyRaphaelArray(b.legendIcons);b._destroyRaphaelArray(b.legendDots);b._destroyRaphaelArray(b.axisEles);b._destroyRaphaelArray(b.chartLabelEles);if(b.tooltip){b.tooltip.destroy();b.tooltip=null}if(c&&c.trackers){b._destroyRaphaelArray(c.trackers);c.trackers=null}b.headerEles=[];b.footerEles=[];b.legendEles=[];b.legends=[];b.legendIcons=[];b.legendDots=[];b.axisEles=[];b.chartLabelEles=[];if(c&&c.chartElements){a.each(c.chartElements,function(c,a){b._destroyRaphaelArray(a)});c.chartElements=null}if(c&&c.seriesEles)c.seriesEles=null;if(b.seriesEles)b.seriesEles=[];b.canvas.clear();b.innerState=null;b.axisInfo=null;b.seriesGroup=null;b.lastAxisOffset=null;b.innerState={}},_text:function(c,d,b){var a=this.canvas.text(c,d,b);if(this.options.disableDefaultTextStyle)a.node.style.cssText="";return a},_paint:function(){var b=this,c=b.options,a=b.element,f=a.css("display")==="none"||a.css("visibility")==="hidden",e={},d=null;if(f){e=a.css("left");d=a.css("position");a.css("left","-10000px");a.css("position","absolute");a.show()}if(a.is(":hidden")){if(f){a.css("left",e);a.css("position",d);a.hide()}return}b._clearChartElement();if(b._trigger("beforePaint")===false)return;b.canvasBounds={startX:0,endX:c.width||a.width(),startY:0,endY:c.height||a.height()};b._paintHeader();b._paintFooter();b._paintLegend();b._paintChartArea();b._paintTooltip();b._trigger("painted");b.rendered=true;if(b.styles){c.seriesStyles=b.styles.style;c.seriesHoverStyles=b.styles.hoverStyles}if(f){a.css("left",e);a.css("position",d);a.hide()}},_calculatePosition:function(g,f,e){var b={x:0,y:0},c=5,d=5,a=this.canvasBounds;switch(g){case"north":b.x=(a.endX-a.startX)/2;b.y=a.startY+e/2+d;a.startY=a.startY+d*2+e;break;case"south":b.x=(a.endX-a.startX)/2;b.y=a.endY-e/2-d;a.endY=a.endY-d*2-e;break;case"east":b.x=a.endX-f/2-c;b.y=(a.endY-a.startY)/2;a.endX=a.endX-c*2-f;break;case"west":b.x=a.startX+f/2+c;b.y=(a.endY-a.startY)/2;a.startX=a.startX+c*2+f}return b},_paintHeader:function(){var g=2,d=this,m=d.options,c=m.header,h=null,b=null,k=null,j=null,i=null,f=null,l=0,e=null;if(c.text&&c.text.length>0&&c.visible){h=c.compass;b=d._text(0,0,c.text);a.wijraphael.addClass(a(b.node),"wijchart-header-text");l=d._getRotationByCompass(h);k=a.extend(true,{},m.textStyle,c.textStyle);b.attr(k);b.transform("...R"+l);j=b.wijGetBBox();i=d._calculatePosition(h,j.width,j.height);b.transform(Raphael.format("...T{0},{1}",i.x,i.y));f=b.wijGetBBox();e=d.canvas.rect(f.x-g,f.y-g,f.width+2*g,f.height+2*g);a.wijraphael.addClass(a(e.node),"wijchart-header-container");e.attr(c.style);e.toBack();d.headerEles.push(b);d.headerEles.push(e)}},_paintFooter:function(){var g=2,d=this,m=d.options,c=m.footer,h=null,b=null,k=null,j=null,i=null,f=null,l=0,e=null;if(c.text&&c.text.length>0&&c.visible){h=c.compass;b=d._text(0,0,c.text);a.wijraphael.addClass(a(b.node),"wijchart-footer-text");l=d._getRotationByCompass(h);k=a.extend(true,{},m.textStyle,c.textStyle);b.attr(k);b.transform("...R"+l);j=b.wijGetBBox();i=d._calculatePosition(h,j.width,j.height);b.transform(Raphael.format("...T{0},{1}",i.x,i.y));f=b.wijGetBBox();e=d.canvas.rect(f.x-g,f.y-g,f.width+2*g,f.height+2*g);a.wijraphael.addClass(a(e.node),"wijchart-footer-container");e.attr(c.style);e.toBack();d.footerEles.push(b);d.footerEles.push(e)}},_getRotationByCompass:function(b){var a=0;if(b==="east")a=90;else if(b==="west")a=-90;return a},_paintLegend:function(){if(!this.options.legend.visible)return;var b=this,t=b.options,c=a.extend(true,{size:{width:22,height:10}},t.legend),g=2,L=t.seriesStyles,u=[].concat(t.seriesList),r=c.compass,y=c.orientation,i,J,f,e,v=b.canvasBounds,x=v.endX-v.startX,w=v.endY-v.startY,h=c.size.width,I=c.size.height,E,l=0,D=0,m=0,j=0,q=0,p=0,d=1,K=0,k=0,z=0,F=0,n=0,G,A,B,o,H=[],s=0,C=0;if(c.text&&c.text.length){i=b._text(0,0,c.text);a.wijraphael.addClass(a(i.node),"wijchart-legend-title");J=a.extend(true,{},t.textStyle,c.textStyle,c.titleStyle);i.attr(J);b.legendEles.push(i)}if(c.reversed)u=u.reverse();a.each(u,function(f,d){d=a.extend(true,{legendEntry:true,display:"show"},d);function e(e){var n=c.reversed?u.length-1-s:s,l=L[n],m=a.extend(true,{fill:"none",opacity:1,stroke:"black"},l),d,j,k,g=false,f=e.type,i;if(e.legendEntry&&e.display!=="exclude"){j=a.extend(true,{},t.textStyle,c.textStyle);if(c.textWidth)d=b.canvas.wrapText(0,0,e.label,c.textWidth,"far",j);else{d=b._text(0,0,e.label);d.attr(j)}a.wijraphael.addClass(a(d.node),"wijchart-legend-text wijchart-legend");b.legends.push(d);k=a.extend(m,{"stroke-width":1});i=b.canvas.rect(0,0,h,I);a.wijraphael.addClass(a(i.node),"wijchart-legend-icon wijchart-legend");i.attr(k);b.legendIcons.push(i);H.push(k);if(b.widgetName==="wijcompositechart")g=f==="line"||f==="spline"||f==="bezier"||f==="area";else g=b.widgetName==="wijlinechart";if(c.textWidth)a.each(d,function(c,b){if(e.visible===false&&!g){a(b.node).data("hidden",true).data("textOpacity",b.attr("opacity")||1);b.attr("opacity",.3)}a.wijraphael.addClass(a(b.node),"wijchart-legend-text wijchart-legend");a(b.node).data("legendIndex",C).data("index",s)});else{if(e.visible===false&&!g){a(d.node).data("hidden",true).data("textOpacity",d.attr("opacity")||1);d.attr("opacity",.3)}a.wijraphael.addClass(a(d.node),"wijchart-legend-text wijchart-legend");a(d.node).data("legendIndex",C).data("index",s)}C++}s++}if(d.type==="pie"&&d.legendEntry)a.each(d.data,function(c,b){b=a.extend({legendEntry:d.legendEntry},b);e(b)});else if(b._isPieChart())e(d);else{if(d.data.x===undefined&&d.data.xy===undefined||d.data.xy===undefined&&d.data.y===undefined)return true;e(d)}});f=b.legends.length;e=c.textMargin;if(i){E=i.wijGetBBox();l=E.height;D=E.width}a.each(b.legends,function(c,b){var a=b.wijGetBBox();if(a.width>m)m=a.width;if(a.height>j)j=a.height});if(r==="east"||r==="west"){if(y==="horizontal"){q=f*(m+h+g)+f*(e.left+e.right);if(q>x/2){d=Math.floor(x/2/m);if(d<1)d=1}else d=f}else if(y==="vertical"){p=j*f+l+f*(e.top+e.bottom);if(p>w)d=Math.ceil(p/w);else d=1}}else if(r==="south"||r==="north")if(y==="horizontal"){q=(m+h+g)*f+f*(e.left+e.right);if(q>x){d=Math.floor(f/q*x);if(d<1)d=1}else d=f}else if(y==="vertical"){p=j*f+l+f*(e.top+e.bottom);if(p>w/2){K=Math.floor(w-l)/2/j;d=Math.ceil(f/K)}else d=1}if(d===0)d=1;k=d*(m+h+g)+d*(e.left+e.right);z=j*Math.ceil(f/d)+l+Math.ceil(f/d)*(e.top+e.bottom);k=k>D?k:D;G=b._calculatePosition(r,k,z);A=G.x-k/2;B=G.y-z/2;o=b.canvas.rect(A-g,B-g,k+2*g,z+2*g);a.wijraphael.addClass(a(o.node),"wijchart-legend-container");o.attr(c.style);o.toBack();b.legendEles.push(o);i&&i.transform(Raphael.format("...T{0},{1}",A+k/2,B+l/2));F=l;a.each(b.legends,function(s,l){var i=l.wijGetBBox(),f=b.legendIcons[s],p=A+n*(h+m+g)+(n+1)*e.left+n*e.right,q=B+F+i.height/2+e.top+j/2-i.height/2,t=q-f.wijGetBBox().height/2,r,o,k=l;f.wijRemove();f=null;f=b.canvas.rect(p,t,h,I);if(c.textWidth)k=l[0];a(f.node).data("legendIndex",a(k.node).data("legendIndex")).data("index",a(k.node).data("index"));a.wijraphael.addClass(a(f.node),"wijchart-legend-icon wijchart-legend");b.legendIcons[s]=f;r=H[s];if(r){f.attr(r);if(a(k.node).data("hidden")===true){a(k.node).data("iconOpacity",f.attr("opacity")||1);f.attr("opacity",.3)}}if(c.textStyle["text-anchor"]==="start")p-=i.width/2;if(c.textWidth)l.transform(Raphael.format("...T{0},{1}",p+h+g,q-i.height/2));else l.transform(Raphael.format("...T{0},{1}",p+h+g+i.width/2,q));if(Raphael.vml){o=b.canvas.rect(p+h+g,q-i.height/2,i.width,i.height).attr({stroke:"none",fill:"#000000",opacity:.01});a.wijraphael.addClass(a(o.node),"wijchart-legend-textCover wijchart-legend");a(o.node).data("legendIndex",a(k.node).data("legendIndex"));a(o.node).data("index",a(k.node).data("index"));b.legendEles.push(o)}l.toFront();n++;if(n===d){n=0;F+=j+e.top+e.bottom}})},_hasAxes:function(){return this.widgetName==="wijpiechart"?false:true},_applyAxisText:function(i){var j=this,h=i.text,c=null,d=null,b=null,f=0,e=0,g=j.canvasBounds;if(h!==null&&h!==undefined&&h.length>0){d=j._text(-100,-100,h);b=a.extend(true,{},j.options.textStyle,i.textStyle);d.attr(b);c=d.wijGetBBox();if(b["margin-left"])e+=parseFloat(b["margin-left"]);if(b["margin-top"])f+=parseFloat(b["margin-top"]);if(b["margin-right"])e+=parseFloat(b["margin-right"]);if(b["margin-bottom"])f+=parseFloat(b["margin-bottom"]);switch(i.compass){case"north":g.startY+=c.height+f;break;case"south":g.endY-=c.height+f;break;case"east":g.endX-=c.height+e;break;case"west":g.startX+=c.height+e}d.wijRemove();d=null}return c},_isSeriesDataEmpty:function(){var c=this,b=c.options.seriesList;if(!b||b.length===0)return true;a.each(b,function(b,a){if(!a.data||(!a.data.x||!a.data.y)&&!a.data.xy)return true});return false},_paintTooltip:function(){var b=this,h=b.options,d=h.hint,i=!h.disabled&&d.enable,c=d,f,e,g=a.isFunction;if(i&&!b.tooltip){c=a.extend(true,{},d,{});f=d.title;e=d.content;if(g(f))c.title=function(){return b._getTooltipText(f,this.target)};if(g(e))c.content=function(){return b._getTooltipText(e,this.target)};c.beforeShowing=function(){b._onBeforeTooltipShowing(this)};b.tooltip=b.canvas.tooltip(null,c)}},_getTooltipText:function(d,c){var b=a(c.node).data("wijchartDataObj"),e={data:b,label:b.label,x:b.x,y:b.y,target:c,fmt:d};return a.proxy(d,e)()},_onBeforeTooltipShowing:function(b){var a=b.target,c=this.options.hint.style;if(a)b.options.style.stroke=c.stroke||a.attrs.stroke||a.attrs.fill},_paintChartArea:function(){var b=this,p=b.options,c=p.axis,l=2,n=null,k=null,h={},m=5,f=0,g=0,j=a.isArray(c.y),o=0,i,d,e;b._applyMargins();b.isMultiYAxis=j;if(b._isSeriesDataEmpty())return;j&&a.each(c.y,function(d,b){c.y[d]=a.extend(true,{alignment:"center",style:{stroke:"#999999","stroke-width":.5},visible:false,textVisible:true,text:"",textStyle:{fill:"#888","font-size":15,"font-weight":"bold"},labels:{style:{fill:"#333","font-size":11},textAlign:"center",width:null},compass:"west",autoMin:true,autoMax:true,min:null,max:null,origin:null,autoMajor:true,autoMinor:true,unitMajor:null,unitMinor:null,gridMajor:{visible:true,style:{stroke:"#999999","stroke-width":"0.5","stroke-dasharray":"none"}},gridMinor:{visible:false,style:{stroke:"#CACACA","stroke-dasharray":"- "}},tickMajor:{position:"none",style:{fill:"black"},factor:1},tickMinor:{position:"none",style:{fill:"black"},factor:1},annoMethod:"values",annoFormatString:"",valueLabels:[]},b)});if(b._hasAxes()){if(b.innerState.axisInfo){b.axisInfo=b.innerState.axisInfo;b.canvasBounds=b.innerState.canvasBounds}else{n=b._applyAxisText(c.x,{});b.axisInfo={x:{id:"x",tprec:0,isTime:false,offset:0,vOffset:0,max:0,min:0,majorTickRect:null,minorTickRect:null,annoFormatString:null,textBounds:n,axisTextOffset:l,autoMax:true,autoMin:true,autoMajor:true,autoMinor:true,annoMethod:c.x.annoMethod,valueLabels:c.x.valueLabels||[]},y:{}};if(j)a.each(c.y,function(c,a){k=b._applyAxisText(a,{});b.axisInfo.y[c.toString()]={id:"y"+c,tprec:0,isTime:false,offset:0,vOffset:0,max:0,min:0,majorTickRect:null,minorTickRect:null,annoFormatString:null,textBounds:k,axisTextOffset:l,autoMax:true,autoMin:true,autoMajor:true,autoMinor:true,annoMethod:a.annoMethod,valueLabels:a.valueLabels||[]}});else{k=b._applyAxisText(c.y,{});b.axisInfo.y["0"]={id:"y",tprec:0,isTime:false,offset:0,vOffset:0,max:0,min:0,majorTickRect:null,minorTickRect:null,annoFormatString:null,textBounds:k,axisTextOffset:l,autoMax:true,autoMin:true,autoMajor:true,autoMinor:true,annoMethod:c.y.annoMethod,valueLabels:c.y.valueLabels||[]}}b._getSeriesGroup();h=b._getDataExtreme(j);if(c.x.autoMin&&b.axisInfo.x.autoMin)c.x.min=h.txn;else if(c.x.min&&b._isDate(c.x.min))c.x.min=a.toOADate(c.x.min);if(c.x.autoMax&&b.axisInfo.x.autoMax)c.x.max=h.txx;else if(c.x.max&&b._isDate(c.x.max))c.x.max=a.toOADate(c.x.max);a.each(h.y,function(){o++});for(i=0;i<o;i++){d=c.y[i]||c.y;e=i.toString();if(d.autoMin&&b.axisInfo.y[e].autoMin)d.min=h.y[e].tyn;else if(d.min&&b._isDate(d.min))d.min=a.toOADate(d.min);if(d.autoMax&&b.axisInfo.y[e].autoMax)d.max=h.y[e].tyx;else if(d.max&&b._isDate(d.max))d.max=a.toOADate(d.max);do{g=b._autoPosition(b.axisInfo,c,"y",e);f=b._autoPosition(b.axisInfo,c,"x",e);if(g===b.axisInfo.y[e].offset&&f===b.axisInfo.x.offset){m=0;break}if(!isNaN(f)&&!isNaN(g)){if(g!==b.axisInfo.y[e].offset&&g!==0){b.axisInfo.y[e].offset=g;b.axisInfo.y[e].vOffset=f}if(f!==b.axisInfo.x.offset&&f!==0){b.axisInfo.x.offset=f;b.axisInfo.x.vOffset=g}}m--}while(m>0)}b._adjustPlotArea(c.x,b.axisInfo.x);b._adjustPlotArea(c.y,b.axisInfo.y,true);b.innerState.axisInfo=b.axisInfo;b.innerState.canvasBounds=b.canvasBounds}b._paintAxes();b._paintPlotArea()}else b._paintPlotArea()},_getSeriesGroup:function(){var c=this,d=c.options,b={};a.each(d.seriesList,function(c,a){if(a.yAxis)if(b[a.yAxis.toString()])b[a.yAxis.toString()].push(a);else b[a.yAxis.toString()]=[a];else if(b["0"])b["0"].push(a);else b["0"]=[a]});c.seriesGroup=b},_adjustPlotArea:function(e,d,f){var c=this.canvasBounds,g,b={east:Number.MIN_VALUE,west:Number.MIN_VALUE,south:Number.MIN_VALUE,north:Number.MIN_VALUE};if(f){a.each(d,function(a){g=a});a.each(d,function(f,a){var c=e[f]||e,d=c.compass;c.max=a.max;c.min=a.min;switch(d){case"north":b.north=Math.max(a.offset,b.north);break;case"south":b.south=Math.max(a.offset,b.south);break;case"east":b.east=Math.max(a.offset,b.east);break;case"west":b.west=Math.max(a.offset,b.west)}});if(b.north!==Number.MIN_VALUE)c.startY+=b.north;if(b.south!==Number.MIN_VALUE)c.endY-=b.south;if(b.east!==Number.MIN_VALUE)c.endX-=b.east;if(b.west!==Number.MIN_VALUE)c.startX+=b.west}else{e.max=d.max;e.min=d.min;switch(e.compass){case"north":c.startY+=d.offset;break;case"south":c.endY-=d.offset;break;case"east":c.endX-=d.offset;break;case"west":c.startX+=d.offset}}},_autoPosition:function(b,a,c,d){return this._autoPositionCartesianAxis(b,a,c,d)},_autoPositionCartesianAxis:function(m,g,p,i){var h=this,o=null,b,e,k,n,c,j,q,r,f=h.lastAxisOffset||{},d,l;if(p==="y"){b=m.y[i];e=g.y[i]||g.y;n=g.x;k=m.x}else{b=m.x;e=g.x;k=m.y[i];n=g.y[i]||g.y}c=e.compass;j=n.origin;q=k.max;r=k.min;if(j!==null&&h._isDate(j))j=a.toOADate(j);h._calculateParameters(b,e);o=h._getMaxExtents(b,e);switch(c){case"north":case"south":d=o.height;b.maxExtent=d;break;case"east":case"west":d=o.width;b.maxExtent=d}if(p==="y"&&f[c]){a.each(f[c],function(b,a){if(b!==i)l=a});if(l){b.preStartOffset=l;d+=l}}if(p==="y"){if(f[c]===undefined)f[c]={};f[c][i]=d+h._getAxisLabelBox(e).width;h.lastAxisOffset=f}return d},_getAxisLabelBox:function(d){var f=this,m=f.options,l=d.text,j=0,h=0,i=0,g=0,c,e,k=f._isVertical(d.compass),b=a.extend(true,{},m.textStyle,d.textStyle);if(b["margin-top"])j=parseFloat(b["margin-top"]);if(b["margin-left"])i=parseFloat(b["margin-left"]);if(b["margin-right"])h=parseFloat(b["margin-right"]);if(b["margin-bottom"])g=parseFloat(b["margin-bottom"]);c=f._text(0,0,l);c.attr(b);k&&c.transform("...R-90");e=c.wijGetBBox();c.wijRemove();c=null;return{width:e.width+i+h,height:e.height+g+j}},_getMaxExtents:function(b,f,o){var c=this,p=c.options,i=null,e={width:0,height:0},u=b.min,t=b.max,s=b.isTime,d=f.annoFormatString,r=p.is100Percent,l=0,q=f.compass,h=f.labels,g,m=false,n=c.canvasBounds,j,k;b.majorTickRect=c._getTickRect(b,f,true,true,o);b.minorTickRect=c._getTickRect(b,f,false,true,o);i=c._getMajorTickValues(b,f);if(!f.textVisible)return e;if(!d||d.length===0)d=b.annoFormatString;g=a.extend(true,{},p.textStyle,f.textStyle,h.style);k=g.transform;k&&k.length&&a.each(k,function(b,a){if(a[0].toLowerCase()==="r"){m=true;return false}});g=a.extend(true,g,b.textStyle);j=n.endX-n.startX-b.vOffset-b.axisTextOffset;if(i&&i.length){j=j/(i.length-1);a.each(i,function(o,f){var k,i,n;if(f<u||f>t)return true;if(b.annoMethod==="valueLabels"){if(f<0)return true;if(l>=b.valueLabels.length)return false;f=b.valueLabels[l];if(f.text)f=f.text;else if(typeof f.value!=="undefined"){f=f.value;if(d&&d.length)f=Globalize.format(f,d,c._getCulture())}}else if(b.annoMethod==="values")if(d&&d.length){if(s)f=a.fromOADate(f);f=Globalize.format(f,d,c._getCulture())}else if(r&&b.id==="y")f=Globalize.format(f,"p0",c._getCulture());if(h.width)k=c.canvas.wrapText(-100,-100,f,h.width,h.textAlign,g);else k=c._text(-100,-100,f).attr(g);i=k.wijGetBBox();if(!c._isVertical(q)&&!m&&b.annoMethod==="valueLabels")if(i.width>j){k.attr({transform:"r-45"});i=k.wijGetBBox();if(o===0){g.transform="r-45";b.textStyle={transform:"r-45"};n=k.clone();n.attr({transform:"r0"});i=n.wijGetBBox();if(Math.sqrt(2)*i.height>j){k.attr({transform:"r-90"});g.transform="r-90";b.textStyle={transform:"r-90"}}n.wijRemove();n=null;i=k.wijGetBBox()}}k.wijRemove();k=null;if(i.width>e.width)e.width=i.width;if(i.height>e.height)e.height=i.height;l++})}if(e.width<h.width)e.width=h.width;b.labelWidth=e.width;return e},_getMajorTickValues:function(c,e){var d=[],b=c.valueLabels;b&&b.length>0&&a.each(b,function(c,a){if(typeof a.text!=="undefined"||typeof a.value!=="undefined")return false;if(typeof a==="string")b[c]={text:a,gridLine:false};else b[c]={value:a,gridLine:false}});if(c.annoMethod==="valueLabels"&&b&&b.length>0&&typeof b[0].value!=="undefined"){d=this._getSortedDataValues(c,e);return d}d=this._getTickValues(c.max,c.min,e.unitMajor,c.tprec,!c.isTime,e.autoMajor);return d},_getSortedDataValues:function(d){var e=this,b=[],c=d.valueLabels;a.each(c,function(f,d){var c=d.value;if(e._isDate(c))b.push(a.toOADate(c));else if(typeof c==="number")b.push(c);else b.push(f)});return b},_getMinorTickValues:function(a,b){var c=[];c=this._getTickValues(a.max,a.min,b.unitMinor,a.tprec,!a.isTime,b.autoMinor);return c},_getTickValues:function(f,b,c,g,o,l){var p=this,i=[],n=b,e=0,h=0,m=0,k=0,d=0,j=0;try{if(c===0)i=[f,b];else{if(l){if(g+1<0)g=-1;else if(g+1>15)g=14;j=a.round(p._signedCeiling(b/c)*c,g+1);if(j<f)b=j;m=parseInt(a.round(f/c,5),10);k=parseInt(a.round(b/c,5),10);d=parseInt(m-k+1,10);if(d>1){h=k*c;if(h<b){d--;b+=c}h=b+(d-1)*c;if(h>f)d--}if(d<1){d=2;b=n;c=f-b}}else{d=parseInt((f-b)/c+1,10);if(d>1){h=b+(d-1)*c;if(h>f)d--}if(d<1){d=2;c=f-b}}for(e=0;e<d;e++)if(o)if(l)i[e]=a.round(b+e*c,g+1);else i[e]=b+e*c;else i[e]=b+e*c}}catch(q){}return i},_getTickRect:function(m,d,l,e){var c=d.compass,f=0,a=null,j=3,k=2,i=2,g=d.tickMajor.factor,h=d.tickMinor.factor,b={x:0,y:0,width:0,height:0};if(l){a=d.tickMajor.position;g=g>0?g:1;f=j*g}else{a=d.tickMinor.position;h=h>0?h:1;f=k*h}if(a==="none"||a==="inside"&&e)f=0;if(c==="east"||c==="west"){b={x:0,y:-1,width:f*i,height:i};if(c==="east"&&(a==="outside"||a==="cross"&&e)||c==="west"&&a==="inside")b.width+=2;else if(!e){if(a==="cross")b.width<<=1;b.width+=2}}else{b={x:-1,y:0,width:i,height:f*i};if(c==="south"&&(a==="outside"||a==="corss"&&e)||c==="north"&&a==="inside")b.height+=2;else if(!e){if(a==="cross")b.height<<=1;b.height+=2}}return b},_applyMargins:function(){var c=this,b=c.options,a=c.canvasBounds;a.startX+=b.marginLeft;a.endX-=b.marginRight;a.startY+=b.marginTop;a.endY-=b.marginBottom},_paintAxes:function(){var b=this,h=b.options.axis,g=b.axisInfo,c=h.x,e=h.y,f=g.x,i=g.y,d;d=b._paintAxis(c,f);a.each(i,function(g,f){var a=e[g]||e;a.origin!==null&&b._translateAxisIfNeeded(d,c.compass,a.origin,a.compass,f.max,f.min)});a.each(i,function(h,g){var a=e[h]||e;d=b._paintAxis(a,g);c.origin!==null&&b._translateAxisIfNeeded(d,a.compass,c.origin,c.compass,f.max,f.min)})},_translateAxisIfNeeded:function(g,h,l,i,e,f){var j=this,k=i==="west"||i==="east",b=j.canvasBounds,c=l,d;if(j._isDate(c))c=a.toOADate(c);if(!k){if(h==="west")d=(c-f)/(e-f)*(b.endX-b.startX);else d=(c-e)/(e-f)*(b.endX-b.startX);a.each(g,function(b,a){a.transform(Raphael.format("...T{0},{1}",d,0))})}else{if(h==="south")d=(f-c)/(e-f)*(b.endY-b.startY);else d=(e-c)/(e-f)*(b.endY-b.startY);a.each(g,function(b,a){a.transform(Raphael.format("...T{0},{1}",0,d))})}},_paintAxis:function(c,b){var e=this,B=e.options,d=e.canvasBounds,f={x:0,y:0},g={x:0,y:0},s=c.compass,k=2,q=true,o=null,p=[],u=[],v=[],m=b.max,n=b.min,I=c.unitMajor,J=c.unitMinor,G=c.tickMajor.position,H=c.tickMinor.position,A=b.maxExtent,C=c.tickMajor.style,D=c.tickMinor.style,x=b.majorTickRect,y=b.minorTickRect,w=b.axisTextOffset,E=c.gridMajor,F=c.gridMinor,j=c.labels,t=0,z=[],l=0,h=c.annoFormatString,r=null,i=[];x=e._getTickRect(b,c,true,false);y=e._getTickRect(b,c,false,false);if(!h||h.length===0)h=b.annoFormatString;p=e._getMajorTickValues(b,c);u=e._getMinorTickValues(b,c);v=e._resetMinorTickValues(u,p);switch(s){case"south":f.x=d.startX;f.y=d.endY;g.x=d.endX;g.y=d.endY;q=false;break;case"north":f.x=d.startX;f.y=d.startY-k;g.x=d.endX;g.y=d.startY-k;q=false;break;case"east":f.x=d.endX-k;if(b.preStartOffset)f.x+=b.preStartOffset;f.y=d.endY;g.x=d.endX-k;g.y=d.startY;break;case"west":f.x=d.startX;if(b.preStartOffset)f.x-=b.preStartOffset;f.y=d.endY;g.x=d.startX;g.y=d.startY}if(c.visible){o=e.canvas.line(f.x,f.y,g.x,g.y).attr(c.style);a.wijraphael.addClass(a(o.node),"wijchart-axis");e.axisEles.push(o);i.push(o)}a.each(p,function(D,k){var d=k,y=b.isTime,v=B.is100Percent,p,o,u=false,q={};if(k<n||k>m){l++;return true}if(b.annoMethod==="valueLabels"){if(l>=b.valueLabels.length)return false;d=b.valueLabels[l];u=d.gridLine;q=d.gridLineStyle;if(d.text)d=d.text;else if(typeof d.value!=="undefined"){d=d.value;if(h&&h.length)d=Globalize.format(d,h,e._getCulture())}}else if(b.annoMethod==="values")if(h&&h.length){if(y)d=a.fromOADate(k);d=Globalize.format(d,h,e._getCulture())}else if(v&&b.id==="y")d=Globalize.format(k,"p0",e._getCulture());r=a.extend(true,{},B.textStyle,c.textStyle,j.style,b.textStyle);p=e._paintMajorMinor(m,n,k,G,I,x,s,f,g,A,w,C,d,E,c.textVisible,r,j.textAlign,j.width?b.labelWidth:null,u,q);if(p){if(p.elements)i=i.concat(p.elements);o=p.textInfo}if(o){z.push(o);if(t<o.len)t=o.len}l++});!j.width&&a.each(z,function(d,c){var b=c.text,a=(c.len-t)/2;a=j.textAlign==="near"?a*-1:a;if(q)b.transform(Raphael.format("...T{0},{1}",a,0));else b.transform(Raphael.format("...T{0},{1}",0,a))});a.each(v,function(h,d){var a;if(d>n&&d<m){a=e._paintMajorMinor(m,n,d,H,J,y,s,f,g,A,w,D,null,F,c.textVisible,r,j.textAlign,j.width?b.labelWidth:null);if(a&&a.elements)i=i.concat(a.elements)}});c.text&&c.text.length>0&&i.push(e._paintAxisText(c,b));return i},_paintAxisText:function(d,f){if(!d.text||d.text.length===0)return;var j=this,z=d.text,p=d.compass,x=d.alignment,l=j.canvasBounds,m=l.startX,n=l.startY,q=l.endX,r=l.endY,h=m,i=n,c=f.textBounds,o=j._isVertical(p),k=f.axisTextOffset,s=f.majorTickRect,y=d.tickMajor.position,e=o?s.width:s.height,b=null,g=null,w=0,v=0,u=0,t=0;b=a.extend(true,{},j.options.textStyle,d.textStyle);if(b["margin-top"])w=parseFloat(b["margin-top"]);if(b["margin-left"])v=parseFloat(b["margin-left"]);if(b["margin-right"])u=parseFloat(b["margin-right"]);if(b["margin-bottom"])t=parseFloat(b["margin-bottom"]);if(y==="cross")e=e/2;else if(y==="inside")e=0;if(o){switch(x){case"near":i=r-c.width/2;break;case"center":i=(n+r)/2;break;case"far":i=n+c.width/2}if(p==="west")h=m-(f.offset+k+e+c.height/2+u);else h=q+f.offset+k+e+c.height/2+v}else{switch(x){case"near":h=m+c.width/2;break;case"center":h=(m+q)/2;break;case"far":h=q-c.width/2}if(p==="north")i=n-(f.offset+k+e+c.height/2+t);else i=r+f.offset+k+e+c.height/2+w}g=j._text(h,i,z);a.wijraphael.addClass(a(g.node),"wijchart-axis-text");j.axisEles.push(g);g.attr(b);o&&g.transform("...R-90");return g},_resetMinorTickValues:function(a,d){for(var b=0,c=0,f=null,e=null,b=a.length-1;b>=0;b--){f=a[b];for(c=d.length-1;c>=0;c--){e=d[c];f===e&&a.splice(b,1)}}return a},_paintMajorMinor:function(J,u,K,h,L,c,j,t,G,o,k,x,A,q,C,F,E,l,D,B){var f=this,e=t.x,b=t.y,m=-1,n=-1,s=true,g=f.canvasBounds,H=null,r=null,y=[],p=[],d=null,z={"stroke-width":2},i={text:null,len:0},w=null,I={},v=[];switch(j){case"south":if(h==="inside")b-=c.height;else if(h==="cross")b-=c.height/2;if(l)n=b+k+c.height;else n=b+k+c.height+o/2;s=false;break;case"west":if(h==="outside")e-=c.width;else if(h==="cross")e-=c.width/2;if(l)m=e-(k+o);else m=e-(k+o/2);break;case"north":if(h==="outside")b-=c.height;else if(h==="cross")b-=c.height/2;if(l)n=b-(k+o);else n=b-(k+o/2);s=false;break;case"east":if(h==="inside")e-=c.width;else if(h==="cross")e-=c.width/2;if(l)m=e+k+c.width;else m=e+k+c.width+o/2}if(s){b+=(K-u)/(J-u)*(G.y-t.y);p=["M",g.startX,b,"H",g.endX];if(q.visible)if(b!==g.startY&&j==="east"||b!==g.endY&&j==="west"){d=f.canvas.path(p.concat(" "));a.wijraphael.addClass(a(d.node),"wijchart-axis-gridline");d.attr(q.style);f.axisEles.push(d)}if(D)if(b!==g.startY&&j==="east"||b!==g.endY&&j==="west"){d=f.canvas.path(p.concat(" "));a.wijraphael.addClass(a(d.node),"wijchart-axis-gridline");d.attr(a.extend(true,q.style,B));f.axisEles.push(d)}n=b;if(h!=="none"){y=["M",e,b,"h",c.width];x["stroke-width"]=c.height}}else{e+=(K-u)/(J-u)*(G.x-t.x);p=["M",e,g.startY,"V",g.endY];if(q.visible)if(e!==g.startX&&j==="south"||e!==g.endX&&j==="north"){d=f.canvas.path(p.concat(" "));a.wijraphael.addClass(a(d.node),"wijchart-axis-gridline");d.attr(q.style);f.axisEles.push(d)}if(D)if(b!==g.startY&&j==="south"||b!==g.endY&&j==="north"){d=f.canvas.path(p.concat(" "));a.wijraphael.addClass(a(d.node),"wijchart-axis-gridline");d.attr(a.extend(true,{},q.style,B));f.axisEles.push(d)}if(l)m=e-l/2;else m=e;if(h!=="none"){y=["M",e,b,"v",c.height];x["stroke-width"]=c.width}}if(h!=="none"){r=f.canvas.path(y.concat(" "));a.wijraphael.addClass(a(r.node),"wijchart-axis-tick");z=a.extend(z,x);r.attr(z);f.axisEles.push(r);v.push(r)}if(A!==null&&C){if(l){i=f.canvas.wrapText(m,n,A.toString(),l,E,F);a.wijraphael.addClass(a(i.node),"wijchart-axis-label")}else{i=f._text(m,n,A.toString());a.wijraphael.addClass(a(i.node),"wijchart-axis-label");i.attr(F)}f.axisEles.push(i);v.push(i);!C&&i.hide();if(E!=="center"){w=i.getBBox();H={text:i,len:s?w.width:w.height}}}I={textInfo:H,elements:v};return I},_paintPlotArea:function(){},_paintChartLabels:function(){var c=this,b=c.options.chartLabels;b&&b.length&&a.each(b,function(e,b){var d;b=a.extend(true,{compass:"east",attachMethod:"coordinate",attachMethodData:{seriesIndex:-1,pointIndex:-1,x:-1,y:-1},offset:0,visible:false,text:"",connected:false},b);if(b.visible){d=c._getChartLabelPointPosition(b);if(typeof d.x!=="number"||typeof d.y!=="number")return false;c._setChartLabel(b,d)}})},_getChartLabelPointPosition:function(){},_setChartLabel:function(d,g,o,l){var c=this,n=d.compass,k=c.options,m=a.extend(true,{},k.textStyle,k.chartLabelStyle),e=c._text(0,0,d.text).attr(m),h=d.offset,i=0,j=0,b=null,f=null;a.wijraphael.addClass(a(e.node),"wijchart-label-text");c.chartLabelEles.push(e);b=c._getCompassTextPosition(n,e.wijGetBBox(),h,g,o);if(h&&d.connected){f=c.canvas.path("M"+g.x+" "+g.y+"L"+b.endPoint.x+" "+b.endPoint.y);a.wijraphael.addClass(a(f.node),"wijchart-label-connect");f.attr(l);c.chartLabelEles.push(f)}i=b.endPoint.x+b.offsetX;j=b.endPoint.y+b.offsetY;e.transform(Raphael.format("...T{0},{1}",i,j)).toFront()},_getCompassTextPosition:function(h,c,i,g,b){var d=0,e=0,f={x:0,y:0};switch(h.toLowerCase()){case"east":b=0;break;case"west":b=180;break;case"north":b=90;break;case"south":b=270;break;case"northeast":b=45;break;case"northwest":b=135;break;case"southeast":b=315;break;case"southwest":b=225}if(b>=0&&b<45/2||b>675/2&&b<360)d=c.width/2;else if(b>=45/2&&b<135/2){d=c.width/2;e=c.height/-2}else if(b>=135/2&&b<225/2)e=c.height/-2;else if(b>=225/2&&b<315/2){d=c.width/-2;e=c.height/-2}else if(b>=315/2&&b<405/2)d=c.width/-2;else if(b>=405/2&&b<495/2){d=c.width/-2;e=c.height/2}else if(b>=495/2&&b<585/2)e=c.height/2;else{d=c.width/2;e=c.height/2}f=a.wijraphael.getPositionByAngle(g.x,g.y,i,b);return{endPoint:f,offsetX:d,offsetY:e}},_mouseDown:function(b,a){this._trigger("mouseDown",b,a)},_mouseUp:function(b,a){this._trigger("mouseUp",b,a)},_mouseOver:function(b,a){this._trigger("mouseOver",b,a)},_mouseOut:function(b,a){this._trigger("mouseOut",b,a)},_mouseMove:function(b,a){this._trigger("mouseMove",b,a)},_click:function(b,a){this._trigger("click",b,a)},_mouseMoveInsidePlotArea:function(){},_mouseMoveOutsidePlotArea:function(){},_bindLiveEvents:function(){this._bindLegendEvents();this._bindCanvasEvents()},_bindCanvasEvents:function(){var a=this,b=a.chartElement;b.bind("mousemove",function(e){var f=b.offset(),d=a.canvasBounds,c={left:e.pageX-f.left,top:e.pageY-f.top},g=a.options.disabled;if(g)return;if(c.left>=d.startX&&c.left<=d.endX&&c.top>=d.startY&&c.top<=d.endY)a._mouseMoveInsidePlotArea(e,c);else a._mouseMoveOutsidePlotArea(e,c)})},_bindLegendEvents:function(){var b=this,d=b.chartElement,c=b.widgetName;a(".wijchart-legend",d[0]).live("click."+c,function(d){if(b.options.disabled)return;var c=a(d.target);if(c[0].tagName&&c[0].tagName==="tspan")c=c.parent();b._legendClick(c)})},_legendClick:function(j){if(typeof j.data("index")==="undefined")return;var c=this,k=c.options.legend,h=j.data("index"),l=j.data("legendIndex"),i=c.chartElement.data("fields"),m=c.seriesEles,g,f=c.legendIcons[l],e=c.legends[l],b=k.textWidth?a(e[0].node):a(e.node),n=h,d;if(i&&i.seriesEles)m=i.seriesEles;if(c.legendDots&&c.legendDots.length>h)d=c.legendDots[h];if(k.reversed)n=c.legends.length-1-h;g=m[n];if(g)if(!b.data("hidden")){c._hideSerieEles(g);if(!b.data("textOpacity"))if(k.textWidth)b.data("textOpacity",e[0].attr("opacity")||1);else b.data("textOpacity",e.attr("opacity")||1);!b.data("iconOpacity")&&b.data("iconOpacity",f.attr("opacity")||1);d&&!b.data("dotOpacity")&&b.data("dotOpacity",f.attr("opacity")||1);e.attr("opacity","0.3");f.attr("opacity","0.3");d&&d.attr("opacity","0.3");b.data("hidden",true)}else{c._showSerieEles(g);e.attr("opacity",b.data("textOpacity"));f.attr("opacity",b.data("iconOpacity"));d&&d.attr("opacity",b.data("dotOpacity"));b.data("hidden",false)}},_showSerieEles:function(){},_hideSerieEles:function(){},_unbindLiveEvents:function(){var d=this,c=this.chartElement,b=d.widgetName;a(".wijchart-legend",c[0]).die(b).die("."+b);c.unbind("mousemove")},_isBarChart:function(){return false},_isPieChart:function(){return false},_calculateParameters:function(c,g){var d=this,b=g.max,a=g.min,o=g.autoMax&&c.autoMax,m=g.autoMin&&c.autoMin,r=g.autoMajor&&c.autoMajor,s=g.autoMinor&&c.autoMinor,h=null,k=null,p=c.annoMethod==="valueLabels",e=0,i=0,j=0,f=0,l=0,n=c.isTime,q=d.options.adjustMinValue;if(o&&b!==Number.MIN_VALUE)if(c.id!=="x"&&d._isBarChart())if(b<0&&.5*(b-a)>-b)b=0;if(m&&a!==Number.MAX_VALUE)if(c.id!=="x"&&d._isBarChart())if(a>0&&.5*(b-a)>a)a=0;if(b===a){if(a!==0)a-=1;b+=1}f=b-a;if(n){h=g.annoFormatString;if(!h||h.length===0){h=d._getTimeDefaultFormat(b,a);c.annoFormatString=h}l=d._niceTimeUnit(0,h)}k=d._nicePrecision(f);c.tprec=k;if(o)if(n){i=d._roundTime(b,l,true);if(i<b)b=i+l;else b=i}else{i=d._precCeil(-k,b);if(typeof i==="number")b=i}if(m)if(n){j=d._roundTime(a,l,false);if(j>a)a=j-l;else a=j}else{j=d._precFloor(-k,a);if(typeof j==="number")a=j}c.max=b;c.min=a;c.annoFormatString=h;c.tinc=l;if(r||s){f=b-a;d._calculateMajorMinor(g,c);e=g.unitMajor;if(o&&e!==0&&!n&&!p){f=b-parseInt(b/e,10)*e;if(f!==0){b+=e-f;b=d._precCeil(-k,b)}}if(m&&e!==0&&!n&&!p){f=a-parseInt(a/e,10)*e;if(f!==0){if(f<0)f+=e;a-=Math.abs(f);a=d._precFloor(-k,a)}}if(m&&e!==0&&!p&&(typeof q==="undefined"||q===false)&&m&&a===g.min&&a-e>=0&&c.id==="y")a-=e}c.max=b;c.min=a},_roundTime:function(k,g,e){var c=this,d=g,f=a.fromOADate(k),b,h,j,i;if(d>0){b={year:f.getFullYear(),month:f.getMonth(),day:f.getDate(),hour:f.getHours(),minute:f.getMinutes(),second:f.getSeconds()};if(d<c._tmInc.minute){b.second=c._tround(b.second,d,e);return c._getTimeAsDouble(b)}b.second=0;if(d<c._tmInc.hour){d/=c._tmInc.minute;b.minute=c._tround(b.minute,d,e);return c._getTimeAsDouble(b)}b.minute=0;if(d<c._tmInc.day){d/=c._tmInc.hour;b.hour=c._tround(b.hour,d,e);return c._getTimeAsDouble(b)}b.hour=0;if(d<c._tmInc.month){d/=c._tmInc.day;b.day=c._tround(b.day,d,e);return c._getTimeAsDouble(b)}b.day=1;if(d<c._tmInc.year){d/=c._tmInc.month;b.month=c._tround(b.month,d,e);return c._getTimeAsDouble(b)}b.month=0;d/=c._tmInc.year;b.year=c._tround(b.year,d,e);return c._getTimeAsDouble(b)}else{h=f;j=h-d;i=parseInt(j/g,10)*g;if(e&&i!==j)i+=g;h=d+i;return h}},_tround:function(c,a,d){var b=parseInt(c/a*a,10);if(d&&b!==c)b+=parseInt(a,10);return b},_getTimeAsDouble:function(b){var e=0,d=0,c=null;if(b.day<1){d=-1-b.day;b.day=1}else if(b.day>28){d=b.day-28;b.day=28}if(b.month<0){e=-1-b.day;b.month=0}else if(b.month>11){e=b.month-11;b.month=11}c=new Date(b.year,b.month,b.day,b.hour,b.minute,b.second);c.setDate(c.getDate()+d);c.setMonth(c.getMonth()+e);return a.toOADate(c)},_getTimeDefaultFormat:function(d,e){var c=this,b=d-e,a="d";if(b>2*c._tmInc.year)a="yyyy";else if(b>c._tmInc.year)a="MMM yy";else if(b>3*c._tmInc.month)a="MMM";else if(b>2*c._tmInc.week)a="MMM d";else if(b>2*c._tmInc.day)a="ddd d";else if(b>c._tmInc.day)a="ddd H:mm";else if(b>c._tmInc.hour)a="H:mm";else if(b>=1e3)a="H:mm:ss";return a},_niceTimeUnit:function(c,b){var d=this,a=c;a=d._niceTimeSpan(a,b);return a},_niceTimeSpan:function(f,e){var a=this,c=a._manualTimeInc(e),d=0,b=0;d=Math.ceil(f);if(d===0)return a._timeSpanFromTmInc(c);b=1;if(c<a._tmInc.minute){if(d<a._tmInc.minute){b=a._getNiceInc([1,2,5,10,15,30],d,c);if(b!==0)return b}c=a._tmInc.minute}if(c<a._tmInc.hour){if(d<a._tmInc.hour){b=a._getNiceInc([1,2,5,10,15,30],d,c);if(b!==0)return b}c=a._tmInc.hour}if(c<a._tmInc.day){if(d<a._tmInc.day){b=a._getNiceInc([1,3,6,12],d,c);if(b!==0)return b}c=a._tmInc.day}if(c<a._tmInc.month){if(d<a._tmInc.month){b=a._getNiceInc([1,2,7,14],d,c);if(b!==0)return b}c=a._tmInc.month}if(c<a._tmInc.year){if(d<a._tmInc.year){b=a._getNiceInc([1,2,3,4,6],d,c);if(b!==0)return b}c=a._tmInc.year}b=100*a._tmInc.year;if(d<b){b=a._getNiceInc([1,2,5,10,20,50],d,c);if(b===0)b=100*a._tmInc.year}return b},_getNiceInc:function(c,f,d){for(var b=0,a=0,e=c.length,b=0;b<e;b++){a=c[b]*d;if(f<=a)return a}return 0},_timeSpanFromTmInc:function(a){var b=1e3,d=a,c=1;if(a!==this._tmInc.maxtime)if(a>this._tmInc.tickf1)b=a;else{a+=7;while(d>0){c*=10;d--}b=c}return b},_manualTimeInc:function(a){var c=this,b=c._tmInc.second;if(!a||a.length===0)return b;if(a.indexOf("s")>=0)b=c._tmInc.second;else if(a.indexOf("m")>=0)b=c._tmInc.minute;else if(a.indexOf("h")>=0||a.indexOf("H")>=0)b=c._tmInc.hour;else if(a.indexOf("d")>=0)b=c._tmInc.day;else if(a.indexOf("M")>=0)b=c._tmInc.month;else if(a.indexOf("y")>=0)b=c._tmInc.year;return b},_tmInc:{tickf7:-7e3,tickf6:-6e3,tickf5:-5e3,tickf4:-4e3,tickf3:-3e3,tickf2:-2e3,tickf1:-1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:26784e5,year:31536e6,maxtime:2147483647},_niceTickNumber:function(a){if(parseFloat(a)===0)return a;else if(a<0)a=-a;var e=Math.log(a)/Math.log(10),d=parseInt(this._signedFloor(e),10),c=a/Math.pow(10,d),b=10;if(c<=1)b=1;else if(c<=2)b=2;else if(c<=5)b=5;return b*Math.pow(10,d)},_niceNumber:function(c,d,e){if(parseFloat(c)===0)return c;else if(c<0)c=-c;var b=c/Math.pow(10,d),a=10;if(e){if(b<1.5)a=1;else if(b<3)a=2;else if(b<7)a=5}else if(b<=1)a=1;else if(b<=2)a=2;else if(b<=5)a=5;return a*Math.pow(10,d)},_nicePrecision:function(a){if(a<=0||typeof a!=="number")return 0;var c=Math.log(a)/Math.log(10),b=parseInt(this._signedFloor(c),10),d=a/Math.pow(10,b);if(d<3)b=-b+1;return b},_precCeil:function(d,c){var b=Math.pow(10,d),a=c/b;a=Math.ceil(a);return a*b},_precFloor:function(d,c){var b=Math.pow(10,d),a=c/b;a=Math.floor(a);return a*b},_signedCeiling:function(a){return a<0?Math.floor(a):Math.ceil(a)},_signedFloor:function(a){return a<0?Math.ceil(a):Math.floor(a)},_getDataExtreme:function(c){var b={txx:0,txn:0,tyx:0,tyn:0},a;a=this._getDataExtremes(b,c);if(a){if(a.txn>a.txx){a.txn=0;a.txx=1}return a}else{if(b.txn>b.txx){b.txn=0;b.txx=1}return b}},_getDataExtremes:function(b){var f=this,k=f.options,n=k.seriesList,p=k.stacked,o=k.is100Percent,d=k.axis,c=f.axisInfo,e=[],l=[],i=[],h,j={y:{}},g=d.x.valueLabels,m=c.x.annoMethod,r=c.y.annoMethod;if(!n||n.length===0)return b;f.seriesGroup&&a.each(f.seriesGroup,function(k,n){var g=[],m=parseInt(k,10);a.each(n,function(n,i){if(i.type==="pie")return true;i=a.extend(true,{display:"show"},i);var c=i.data,m=0,j=0,k=[].concat(c.xy),o=k.length,d,h;if(i.display==="exclude")return true;e=[].concat(c.x);g=[].concat(c.y);if(c.xy&&o){e=[];g=[];while(j<o){e[m]=k[j];g[m]=k[j+1];j+=2;m++;c.x=e;c.y=g}}else if(!c.x){e=[];a.each(g,function(a){e.push(a)});c.x=e}p&&n>0&&a.each(g,function(a){g[a]+=l[a]});l=g;d=f._getMinMaxValue(e);h=f._getMinMaxValue(g);if(n===0){b.txx=d.max;b.txn=d.min;b.tyx=h.max;b.tyn=h.min}else{if(b.txx<d.max)b.txx=d.max;if(b.txn>d.min)b.txn=d.min;if(b.tyx<h.max)b.tyx=h.max;if(b.tyn>h.min)b.tyn=h.min}n++});if(o){b.tyx=1;b.tyn=0}j.y[k]={tyx:b.tyx,tyn:b.tyn};j.txx=b.txx;j.txn=b.txn;b.tyx=0;b.tyn=0;if(g.length){h=a.wijchart.getFirstValidListValue(g);if(f._isDate(h))c.y[k].isTime=true;else if(typeof h==="undefined")return true;else if(typeof h!=="number"){a.each(g,function(e,c){var b=d.y.annoFormatString,a=c;if(b&&b.length>0)a=Globalize.format(a,b,f._getCulture());else a=a.toString();i.push({text:a,value:c,gridLine:false})});c.y[k].annoMethod="valueLabels";if(!d.y[m].valueLabels&&d.y[m].valueLabels.length===0)c.y[k].valueLabels=i;else c.y[k].valueLabels=d.y[m].valueLabels;d.x.max=g.length-1;d.x.min=0;d.y[m].unitMajor=1;d.x.unitMinor=.5;c.y[k].autoMax=false;c.y[k].autoMin=false;c.y[k].autoMajor=false;c.y[k].autoMinor=false}}});if(e.length){h=a.wijchart.getFirstValidListValue(e);if(m==="valueLabels"&&g&&g.length>0)c.x.valueLabels=g;if(f._isDate(h))c.x.isTime=true;else if(typeof h!=="number"){a.each(e,function(d,h){var e={},b,c;if(m==="valueLabels"&&g&&g.length&&d<g.length){b=g[d];c=typeof b;if(c==="string")b={text:b};else if(c==="number"||f._isDate(b))b={value:b}}e=a.extend({text:h,value:d,gridLine:false},b);i.push(e)});d.x.max=e.length-1;d.x.min=0;d.x.unitMajor=1;d.x.unitMinor=.5;c.x.annoMethod="valueLabels";c.x.valueLabels=i;c.x.autoMax=false;c.x.autoMin=false;c.x.autoMajor=false;c.x.autoMinor=false}}return j},_isDate:function(a){return!a?false:typeof a==="object"&&a.constructor===Date},_getMinMaxValue:function(c){var f=this,b={min:0,max:0},d=0,e;if(!c.length)return b;e=a.wijchart.getFirstValidListValue(c);if(typeof e!=="number")if(f._isDate(e)){b.min=e;b.max=e}else{b.min=0;b.max=c.length-1;return b}else{b.min=e;b.max=e}for(d=0;d<c.length;d++){if(c[d]===null||typeof c[d]==="undefined")continue;if(typeof c[d]==="number"&&isNaN(c[d]))continue;if(c[d]<b.min)b.min=c[d];else if(c[d]>b.max)b.max=c[d]}if(f._isDate(b.min)){b.min=a.toOADate(b.min);b.max=a.toOADate(b.max)}return b},_isVertical:function(a){return a==="west"||a==="east"},_calculateMajorMinor:function(f,d){var c=this,A=c.options,n=c.canvasBounds,y=f.autoMajor,z=f.autoMinor,p=d.max,q=d.min,v=d.isTime,x=d.tinc,r=d.annoFormatString,s=null,t=null,g=null,j=null,i=null,h=null,o=null,l=null,m=null,e=p-q,w=0,u=0,k=0,b=0;if(y){m=a.extend(true,{},A.textStyle,f.textStyle,f.labels.style);if(v){s=Globalize.format(a.fromOADate(p),r,c._getCulture());t=Globalize.format(a.fromOADate(q),r,c._getCulture());i=c._text(-1e3,-1e3,s).attr(m);h=c._text(-1e3,-1e3,t).attr(m);g=i.wijGetBBox();j=h.wijGetBBox();i.wijRemove();i=null;h.wijRemove();h=null}else{o=c._nicePrecision(e);l=o+1;if(l<0||l>15)l=0;i=c._text(-1e3,-1e3,a.round(p,l)).attr(m);h=c._text(-1e3,-1e3,a.round(q,l)).attr(m);g=i.wijGetBBox();j=h.wijGetBBox();i.wijRemove();i=null;h.wijRemove();h=null}if(g.width<j.width)g.width=j.width;if(g.height<j.height)g.height=j.height;if(!c._isVertical(f.compass)){w=n.endX-n.startX-d.vOffset-d.axisTextOffset;b=w/g.width;if(Number.POSITIVE_INFINITY===b)k=0;else k=parseInt(b,10)}else{u=n.endY-n.startY-d.vOffset-d.axisTextOffset;b=u/g.height;if(Number.POSITIVE_INFINITY===b)k=0;else k=parseInt(b,10)}b=e;if(k>0){e/=k;if(v)if(e<x)b=x;else b=c._niceTimeUnit(e,d.annoFormatString);else{d.tprec=c._nicePrecision(e);b=c._niceNumber(2*e,-o,true);if(b<e)b=c._niceNumber(e,-o+1,false);if(b<e)b=c._niceTickNumber(e)}}f.unitMajor=b}if(z&&f.unitMajor&&!isNaN(f.unitMajor))f.unitMinor=f.unitMajor/2}})})(jQuery);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Wijmo Library 2.2.0
|
|
4
|
+
* http://wijmo.com/
|
|
5
|
+
*
|
|
6
|
+
* Copyright(c) GrapeCity, Inc. All rights reserved.
|
|
7
|
+
*
|
|
8
|
+
* Dual licensed under the Wijmo Commercial or GNU GPL Version 3 licenses.
|
|
9
|
+
* licensing@wijmo.com
|
|
10
|
+
* http://wijmo.com/license
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
**/
|
|
14
|
+
(function(a){"use strict";var h="wijmo-wijcombobox-input",c="ui-state-hover",d="ui-state-active",b="ui-state-focus",f="ui-corner-left",e="ui-corner-right",i="<div class='wijmo-wijcombobox-trigger ui-state-default ui-corner-right'><span class='ui-icon ui-icon-triangle-1-s'></span></div>",g="<label class='wijmo-wijcombobox-label ui-widget-content'></label>";a.widget("wijmo.wijcombobox",{options:{data:null,labelText:null,minLength:4,delay:300,showingAnimation:null,hidingAnimation:null,showTrigger:true,triggerPosition:"right",dropdownHeight:300,dropdownWidth:"auto",selectOnItemFocus:false,autoFilter:true,autoComplete:true,highlightMatching:true,dropDownListPosition:{},columns:[],selectionMode:"single",multipleSelectionSeparator:",",forceSelectionText:false,select:null,isEditable:true,selectedIndex:-1,selectedValue:null,open:null,close:null,selectElementWidthFix:6,search:null,changed:null,listOptions:null},_create:function(){var b=this;b.selectedItem=null;b.selectedItems=[];if(window.wijmoApplyWijTouchUtilEvents)a=window.wijmoApplyWijTouchUtilEvents(a);b._createDOMElements();b._bindInputEvents();b._initDropDownList();b.repaint();b._checkSelectIndex();if(b._usingRemoteData()&&b.options.data)b.originalDataSourceLoaded=b.options.data.loaded;b.element.is(":hidden")&&b.element.wijAddVisibilityObserver&&b.element.wijAddVisibilityObserver(function(){b.repaint();b.element.wijRemoveVisibilityObserver&&b.element.wijRemoveVisibilityObserver()},"wijcombobox")},_checkSelectIndex:function(){var c=this,d,b=c.options;b.selectedIndex===-1&&b.selectedValue&&a.each(b.data,function(a){if(b.data[a].value===b.selectedValue){c.options.selectedIndex=a;return false}});d=b.selectedIndex;!c._usingRemoteData()&&(d>=0||a.isArray(d))&&c.search(null,"checkindex")},repaint:function(){var b=this.options,a=this;if(a.element.is(":visible")||a._comboDiv||a._select!==undefined&&a._input.is(":visible")){a._showTrigger();if(b.disabledState){var c=b.disabled;a.disable();b.disabled=c}b.disabled&&a.disable();return true}return false},_bindInputEvents:function(){var c=this,e,f,g,d;e=c._input;f=c.options;e.bind("keydown.wijcombobox",function(b){if(f.disabledState===true||f.disabled)return;g=b.keyCode;d=a.ui.keyCode;switch(g){case d.UP:c._move("previous",b);b.preventDefault();break;case d.DOWN:c._move("next",b);b.preventDefault();break;case d.ENTER:if(c.menu.active){b.preventDefault();f.selectionMode==="multiple"&&c.menu&&c.menu.items&&c.menu.items.length===1&&a.each(c.selectedItems,function(b,a){if(a!==c.menu.items[0])a.selected=false});c.menu.select(b)}b.preventDefault();break;case d.TAB:e.trigger("wijcomboblur");if(!c.menu.active||f.selectionMode==="multiple"&&d.TAB===g)return;c.menu.select(b);var h=e.val().length;c._selectText(h,h,e);break;case d.ESCAPE:c.close(b);break;case d.LEFT:case d.RIGHT:case d.SHIFT:case d.CONTROL:case d.HOME:case d.END:case d.DELETE:case d.PAGE_UP:case d.PAGE_DOWN:break;case 18:e.trigger("wijcomboblur");break;default:window.clearTimeout(c.searching);if(f.isEditable===false){if(c._cacheKey===undefined)c._cacheKey="";c._cacheKey+=String.fromCharCode(g)}c.searching=window.setTimeout(function(){var a;if(f.isEditable===false){a=c._cacheKey;c._cacheKey=undefined}else a=e.val();c.search(a,b)},f.delay)}}).bind("wijcomboblur.wijcombobox",function(a){window.clearTimeout(c.searching);c._addInputFocus(false,b);c.closing=window.setTimeout(function(){c.close(a,true)},150)}).bind("focus.wijcombobox",function(){c._addInputFocus(true,b)}).bind("blur.wijcombobox",function(){!c.menu.element.is(":visible")&&e.trigger("wijcomboblur");c._change()})},_addInputFocus:function(f,e){var c=this,d,b,a;d=c._input.parent();b=f?"addClass":"removeClass";a=c._triggerArrow;d[b](e);a!==undefined&&a[b](e)},_renderColumnsHeader:function(c){var b=a("<ul class='wijmo-wijcombobox-rowheader'></ul>");a.each(this.options.columns,function(e,c){var d=a("<li class='wijmo-wijcombobox-cell ui-widget-header'></li>");d.html(c.name);c.width!==undefined&&d.width(c.width);d.appendTo(b)});c.append(b)},_hasSameValueText:function(a,b){return a.label===b.label&&a.value===b.value},_initDropDownList:function(){var b=this,g,d,c,f,e;g=b.element[0].ownerDocument;if(!b._comboDiv)d=a("<div class='wijmo-wijcombobox-list'></div>");else d=b._oriList;c=b.options;if(c.columns.length>0){d.addClass("wijmo-wijcombobox-multicolumn");f=a("<div class='wijmo-wijsuperpanel-header ui-state-default'></div>");b._renderColumnsHeader(f);d.append(f)}e={keepHightlightOnMouseLeave:true,selectionMode:c.selectionMode,addHoverItemClass:c.columns.length===0,focus:function(e,d){var a=d;c.selectOnItemFocus&&b.menu.select(null,{notCloseAfterSelected:true});if(c.columns.length>0){a.element.prev().addClass("wijmo-wijcombobox-active-prev");a.element.find(".wijmo-wijcombobox-row>.wijmo-wijcombobox-cell").addClass("ui-state-hover")}},selected:function(i,f){window.clearTimeout(b.closing);var j=c.selectionMode,d,e,h,g;d=f.item;if(b._trigger("select",i,d))if(j==="single"){if(!b._usingRemoteData()){e=a.inArray(d,b.items);if(e===undefined)e=f.selectedIndex;if(e!==c.selectedIndex){b._input.val(d.label);g=b.selectedItem;if(g!==null)g.selected=false;b.selectedItem=d;h=c.selectedIndex;c.selectedIndex=e;c.selectedValue=b.selectedItem.value;if(b._select!==undefined){b._select[0].selectedIndex=c.selectedIndex;b._select.trigger("change")}b._trigger("changed",null,{oldItem:g,selectedItem:b.selectedItem,newIndex:c.selectedIndex,oldIndex:h})}else b.selectedItem&&b._input.val()!==b.selectedItem.label&&b._input.val(d.label)}else if(b.selectedItem===null||!b._hasSameValueText(d,b.selectedItem)){b._input.val(d.label);b.selectedItem=d;b._trigger("changed",null,{selectedItem:d})}}else if(!b._usingRemoteData()){b.selectedItems=f.selectedItems;b._selectedItemsToInputVal(b.selectedItems);b._trigger("changed",null,{selectedItem:d,selectedItems:b.selectedItems})}if((f.data===undefined||!f.data.notCloseAfterSelected)&&j==="single"){b.close(i);b._input.focus()}},blur:function(d,b){var a=b.element;if(c.columns.length>0&&a){a.find(".wijmo-wijcombobox-row>.wijmo-wijcombobox-cell").removeClass("ui-state-hover");a.prev().removeClass("wijmo-wijcombobox-active-prev")}},itemRendering:function(g,f){var d=f,e;e="";if(d.isSeparator)e+=" wijmo-wijcombobox-separator";if(d.selected)e+=" wijmo-wijcombobox-selecteditem";e.length>0&&d.element.addClass(e);if(b._keypress&&c.isEditable&&c.columns.length===0&&c.highlightMatching&&a.trim(b._input.val()).length>0&&d.label)d.text=d.label.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+b._escapeRegex(b._input.val())+")(?![^<>]*>)(?![^&;]+;)","gi"),"<span class='ui-priority-primary'>$1</span>");else d.text=undefined},itemRendered:function(g,f){var b=f,d,e;if(b.cells===undefined)return;d=b.element;d.empty();e=a("<ul class='wijmo-wijcombobox-row'></ul>");a.each(b.cells,function(d,f){var b=a("<li class='wijmo-wijcombobox-cell ui-state-default'></li>");if(c.columns&&c.columns.length>d)typeof c.columns[d].width!=="undefined"&&b.width(c.columns[d].width);b.append(f);b.attr("title",f);e.append(b)});d.append(e)},superPanelOptions:{resized:function(){var d=b.menu,a=d.element;c.dropdownWidth=a.outerWidth();c.dropdownHeight=a.outerHeight();b._positionList();b.menu.refreshSuperPanel()}}};e=a.extend(true,e,c.listOptions);b.menu=d.appendTo("body",g).wijlist(e).zIndex(b._input.zIndex()+1).css({top:0,left:0}).hide().data("wijlist");b._menuUL=b.menu.ul},_getSelectedItemsText:function(e){var b="",c,d;c=this;d=c.options.multipleSelectionSeparator;c.selectedItems=e;a.each(e,function(c,a){if(a)b+=a.label+d});if(b.length>0)b=b.substr(0,b.lastIndexOf(d));return b},_selectedItemsToInputVal:function(b){var a=this;a._input.val(a._getSelectedItemsText(b))},_createDOMElements:function(){var b=this,e,d,f,g;g=a("<div class='wijmo-wijcombobox-wrapper ui-state-default ui-corner-all'></div>");d=b.element;if(d.is("select")){e=a("<div role='combobox' class='wijmo-wijcombobox ui-widget ui-helper-clearfix'></div>");e.append(g);b._comboElement=e;b._select=d;d.addClass("ui-widget");f=b._input=a("<input role='textbox' aria-autocomplete='list' aria-haspopup='true' />").insertAfter(d);if(!b.options.data)b.options.data=b._convertSelectOptions()}else if(d.is("div")&&a(d.children()[0]).is("input[type='text']")&&a(d.children()[1]).is("div")){b._comboElement=b._comboDiv=e=d;b._oriList=a(d.children()[1]);f=b._input=a(d.children()[0]);g.prependTo(e).append(f);d.addClass("wijmo-wijcombobox ui-widget ui-helper-clearfix");d.attr("role","combobox")}else{e=a("<div role='combobox' class='wijmo-wijcombobox ui-widget ui-helper-clearfix'></div>");e.append(g);b._comboElement=e;f=b._input=d}if(!b._comboDiv){e.insertBefore(f);b.element.is(":visible")&&f.width(f.width());e.children(".wijmo-wijcombobox-wrapper").append(f)}f.attr({autocomplete:"off",role:"textbox","aria-wijcombobox":"list","aria-haspopup":"true"}).addClass(h);b._oldWidth=d.css("width");if(b.options.isEditable===false){f.attr("readonly","readonly");g.bind("click",function(){if(b.options.disabledState===true||b.options.disabled)return;b._triggerClick()})}e.bind("mouseenter",function(){if(b.options.disabledState===true||b.options.disabled)return;b._addInputFocus(true,c)}).bind("mouseleave",function(){b._addInputFocus(false,c)})},_convertSelectOptions:function(){var d=[],b,c;b=this;c=b._select.get(0).options;a.each(c,function(b,a){d.push({label:a.text,value:a.value})});b.options.selectedIndex=b._select[0].selectedIndex;return d},getComboElement:function(){return this._comboElement},_showTrigger:function(){var h=this,k,j,q,p,r,t=0,b,l,o,m,s,n;k=h.options;j=h._input;q=j.parent();p=h._comboElement;b=h._triggerArrow;l=h._label;if(h._select!==undefined){if(!a.browser.msie)t=h._select.width();else{r=h._select.clone();h._select.after(r);t=r.width();r.remove()}j.width(t+(k.data.length>20?k.selectElementWidthFix:0));h._select.hide()}j.css("margin-left","");j.css("margin-right","");p.width(q[0].offsetWidth);if(k.labelText!==null){l=h._label=a(g);q.append(l.html(k.labelText))}else if(l!==undefined){l.remove();h._label=undefined}if(k.showTrigger){j.removeClass("ui-corner-all");if(b===undefined){b=h._triggerArrow=a(i);p.append(b);b.bind("mouseover.triggerevent",h,function(d){if(k.disabledState===true||k.disabled)return;var b=a(d.currentTarget);b.addClass(c)}).bind("mousedown.triggerevent",h,function(c){if(k.disabledState===true||k.disabled)return;var b=a(c.currentTarget);b.addClass(d)}).bind("mouseup.triggerevent",h,function(c){var b=a(c.currentTarget);b.removeClass(d)}).bind("click.triggerevent",h,function(){if(k.disabledState===true||k.disabled)return;h._triggerClick()})}if(k.triggerPosition==="right"){b.css({left:"",right:"0px"});b.removeClass(f);b.addClass(e)}else{b.css({right:"",left:"0px"});b.removeClass(e);b.addClass(f)}b.setOutHeight(p.innerHeight());o=b.find("span");o.css("margin-left",(b.innerWidth()-o[0].offsetWidth)/2);o.css("margin-top",(b.innerHeight()-o[0].offsetHeight)/2)}else{if(b!==undefined){b.unbind(".triggerevent");b.remove();h._triggerArrow=undefined}j.removeClass("ui-corner-left");j.removeClass("ui-corner-right");j.addClass("ui-corner-all")}m=s=n=0;if(l!==undefined)s+=l[0].offsetWidth;if(b!==undefined)n=b[0].offsetWidth;m=s+n;j.setOutWidth(q.innerWidth()-m);m=m===0?"":m;if(k.triggerPosition==="right"){j.css("margin-left","");j.css("margin-right",m);if(l!==undefined){l.css("left","");l.css("right",n)}}else{j.css("margin-right","");j.css("margin-left",m);if(l!==undefined){l.css("right","");l.css("left",n)}}},_triggerClick:function(c){var a=this,b="";window.clearTimeout(a.closing);if(a.menu.element.is(":visible"))a.close();else{if(a._usingRemoteData())b=a._input.val();a.search(b,c)}},destroy:function(){var b=this,c=b.element;b.options.isEditable===false&&c.removeAttr("readonly");if(b._select!==undefined){b._select.removeClass("ui-widget");b._select.show();b._input.remove()}else if(b._comboDiv){b._comboDiv.removeClass("wijmo-wijcombobox ui-widget ui-helper-clearfix");b._comboDiv.removeAttr("role");b._input.insertBefore(b._comboDiv);b._comboDiv.children(".wijmo-wijcombobox-wrapper").remove()}else{c.css("width",b._oldWidth);c.removeClass(h);c.removeAttr("autocomplete").removeAttr("role").removeAttr("aria-wijcombobox").removeAttr("aria-haspopup");c.insertBefore(b._comboElement);c.css("padding","")}b._comboElement.remove();b.menu.destroy();b.menu.element.remove();a.Widget.prototype.destroy.call(b)},_setOption:function(h,f){var b=this,l,d,c,m,e=b._label,j,k=0,i=b.options;l=b._comboElement;d=b.element;m=d.parent();if(b._triggerArrow)k=b._triggerArrow.outerWidth();a.Widget.prototype._setOption.apply(b,arguments);if(h==="disabled")if(f){l.addClass("wijmo-wijcombobox-disabled ui-state-disabled");d.attr("disabled","disabled");b._comboDiv&&b._input.addClass("wijmo-wijcombobox-disabled ui-state-disabled").attr("disabled","disabled");b._triggerArrow&&b._triggerArrow.unbind("click.triggerevent");b.close()}else{l.removeClass("wijmo-wijcombobox-disabled ui-state-disabled");d.removeAttr("disabled");b._comboDiv&&b._input.removeClass("wijmo-wijcombobox-disabled ui-state-disabled").removeAttr("disabled");b._triggerArrow&&b._triggerArrow.bind("click.triggerevent",b,function(){if(i.disabledState===true)return;b._triggerClick()})}else if(h==="labelText"){if(i.labelText!==null){e=b._label=a(g);b._input.parent().append(e.html(i.labelText));if(b._triggerArrow!==undefined)j=b._triggerArrow[0].offsetWidth;if(i.triggerPosition==="right"){if(e!==undefined){e.css("left","");e.css("right",j)}}else if(e!==undefined){e.css("right","");e.css("left",j)}b.repaint()}else if(e!==undefined){e.remove();b._label=undefined}}else if(h==="showTrigger"){b._showTrigger();!i.showTrigger&&b.element.is("select")&&d.width(d.width()+k)}else if(h==="triggerPosition"){d.width(d.width()+k);b._showTrigger()}else if(h==="selectionMode")b.menu._setOption("selectionMode",f);else if(h==="isEditable")if(f){d.removeAttr("readonly");a(".wijmo-wijcombobox-wrapper",b._comboElement[0]).bind("click",function(){b._triggerClick()})}else{d.attr("readonly","readonly");a(".wijmo-wijcombobox-wrapper",b._comboElement[0]).unbind("click")}else if(h==="data"){b.selectedItem=null;b.options.selectedIndex=-1;b.options.selectedValue=null;b._input.val("")}else if(h==="selectedIndex")if(f>-1){if(b.selectedItem!==null)b.selectedItem.selected=false;c=b.items;if(!c)c=b.options.data;if(c&&c[f]!==null){b.selectedItem=c[f];b.selectedItem.selected=true;b._input.val(b.selectedItem.label);i.selectedValue=b.selectedItem.value}}else(f<=-1||!f)&&b._clearSelection();else if(h==="selectedValue")if(f){if(b.selectedItem!==null)b.selectedItem.selected=false;c=b.items;if(!c)c=b.options.data;a.each(c,function(a){if(c[a].value===f){b.selectedItem=c[a];b.selectedItem.selected=true;b._input.val(b.selectedItem.label);b.options.selectedIndex=a;return false}})}else b._clearSelection()},search:function(g,d){var b=this,f,c,e;f=b.options;c=f.data;window.clearTimeout(b.closing);e={value:g,e:d,self:b};if(c!==null||b._comboDiv){if(d!=="checkindex")if(b._trigger("search",d,{datasrc:c,term:e})===false)return;if(a.isArray(c)||b._comboDiv){b._hideShowArrow(false);b._onListLoaded(c,e)}else{if(b._usingRemoteData()&&d!==undefined&&g.length<f.minLength)return;b._hideShowArrow(false);c.loaded=function(c,a){b._onListLoaded(c,a);b.originalDataSourceLoaded&&b.originalDataSourceLoaded(c,a)};c.load(e)}}},_clearSelection:function(){var b=this,c=b.options;if(c.selectionMode==="single"){if(b.selectedItem!==null)b.selectedItem.selected=false;b.selectedItem=null}else if(b.selectedItems){a.each(b.selectedItems,function(b,a){if(a.selected)a.selected=false});b.selectedItem=null;b.selectedItems=null}c.selectedValue=null;b._input.val("")},_usingRemoteData:function(){var b=this.options.data,c=false;if(!a.isArray(b)&&b!==null&&b.proxy!==null)c=true;return c},_hideShowArrow:function(d){var c=this,b,a;b=c.element;a=c._triggerArrow;a!==undefined&&a[d?"show":"hide"]();b[d?"removeClass":"addClass"]("wijmo-wijcombobox-loading")},_onListLoaded:function(g,h){var c=h.self,k,i,j,d,f,e;k=c._input;i=c.options;j=h.value;if(g===null)d=null;else d=a.isArray(g)?g:g.items;c.items=d;if(h.e==="checkindex"){f=i.selectedIndex;if(i.selectionMode==="multiple"&&a.isArray(f)){a.each(f,function(e,b){var a=d[b];a.selected=true;c.selectedItems.push(a)});c._selectedItemsToInputVal(c.selectedItems)}else{d[f].selected=true;c.selectedItem=d[f];k.val(c.selectedItem.label)}c._hideShowArrow(true);return}if(!c._usingRemoteData()&&d){c._filter(d,j);e=a.grep(d,function(a){return!i.autoFilter||a.match})}else{c._topHit=null;e=d}if(e&&e.length>0||c._comboDiv){c._openlist(e,h,j);c._trigger("open");c._addInputFocus(true,b)}else c.close(null,true);c._hideShowArrow(true)},close:function(h,g){var e=this,d,c,f;d=e.menu;e._dropDownHeight=d.element.outerHeight();e._dropDownWidth=d.element.outerWidth();window.clearTimeout(e.closing);if(d.element.is(":visible")&&!d.element.is(":animated")&&!d.element.parent().is(":animated")){e._trigger("close",h);d.deactivate();c=e.options.hidingAnimation;if(c&&(c.effect==="size"||c.animated==="size"))c.options=a.extend({to:{width:0,height:0}},c.options);f=d.element.attr("style");if(g!==true&&c)d.element.hide(c.effect||c.animated,c.options,c.speed||c.duration,function(){d.element.removeAttr("style").attr("style",f).hide();c.callback&&c.callback.apply(this,arguments)});else d.element.hide();e._addInputFocus(false,b);a(document).unbind("click",e.closeOnClick)}},_change:function(){var a=this,f,g,e,c,h,b,d;f=a.options;g=f.forceSelectionText;e=f.selectionMode;c=a._input;h=c.val();b=a.selectedItem;d=a.selectedItems;if(g)if(e==="single")if(b!==null)b.label!==h&&c.val(b.label);else c.val("");if(e==="multiple"){if(!a.selectedItems||a.selectedItems.length===0)d=[b];a._selectedItemsToInputVal(d)}},_openlist:function(s,p,g){var b=p.self,f=p.e,i,h,c,e,o,r=2,l=0,k,j,q,d,m,n;i=b._keypress=!!f;e=b.options;c=b.menu.element;c.zIndex(b.element.zIndex()+100);if(b._comboDiv){if(!b.listHasCreated){b.menu.setTemplateItems(e.data);b.menu.renderList();b.listHasCreated=true}if(g!==null&&g!==undefined)b._topHit=b.menu.filterTemplateItems(g)}else{b.menu.setItems(s);b.menu.renderList()}b.menu.element.show();if(e.dropdownWidth==="auto")h=b._comboElement.outerWidth();else h=e.dropdownWidth;o=c.css("padding");c.css("padding","0px");c.setOutWidth(h);c.css("padding",o);k=e.dropdownHeight;if(c.children(".wijmo-wijsuperpanel-header"))l=c.children(".wijmo-wijsuperpanel-header").outerHeight()||0;q=Math.min(b._menuUL.outerHeight()+r+l,k);c.setOutHeight(q);b.menu.refreshSuperPanel();b._positionList();!i&&b.selectedItem!==undefined&&b.menu.activate(null,b.selectedItem,true);if(i&&f.keyCode!==a.ui.keyCode.BACKSPACE)if(e.isEditable)b._runAutoComplete();else b.menu.activate(null,b._topHit,true);else{d=b.options.showingAnimation;if(e.showingAnimation!==null&&!(f!==undefined&&f.keyCode===a.ui.keyCode.BACKSPACE)){b.menu.element.hide();n={from:{width:0,height:0},to:{width:b._dropDownWidth||c.outerWidth(),height:b._dropDownHeight||c.outerHeight()}};if(d&&(d.effect==="size"||d.animated==="size"))d.options=a.extend(n,d.options);m=c.attr("style");c.show(d.effect||d.animated,d.options,d.speed||d.duration,function(){c.removeAttr("style").attr("style",m).show();d.callback&&d.callback.apply(this,arguments);a.browser.msie&&c.css("filter","")})}}if(!b.hasOwnProperty("closeOnClick")){j=b.closeOnClick;b.closeOnClick=function(a){return j(a)}}a(document).bind("mouseup",b,b.closeOnClick)},closeOnClick:function(c){var b=c.data,d=c.target;if(!a.contains(b._comboElement[0],d)&&!a.contains(b.menu.element[0],d)){b.close();a(".wijmo-wijcombobox-wrapper",b._comboElement[0]).removeClass("ui-state-hover").removeClass("ui-state-focus");a(".wijmo-wijcombobox-trigger",b._comboElement[0]).removeClass("ui-state-hover").removeClass("ui-state-focus")}},_positionList:function(){var c=this,d,b;d=c.options.dropDownListPosition;b={my:"left top",at:"left bottom",of:c._comboElement,collision:"none"};b=a.extend(b,d);c.menu.element.position(b)},_runAutoComplete:function(){var a=this,c,b,e,d,f,g;c=a._input;b=a._topHit;if(!a.options.autoComplete||b===null)return;a.menu.activate(null,b,true);e=c.val();d=b.label;c.val(d);f=e.length;g=d.length;a._selectText(f,g,c)},_selectText:function(d,e,c){var f=c.val(),a=c.get(0),b;if(f.length>0)if(a.setSelectionRange!==undefined)a.setSelectionRange(d,e);else if(a.createTextRange!==undefined){b=a.createTextRange();b.moveStart("character",d);b.moveEnd("character",e-f.length);b.select()}},_move:function(a,b){if(!this.menu.element.is(":visible")){this.search("",b);return}if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a))return;this.menu[a](b)},_escapeRegex:function(a){return a===undefined?a:a.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")},_filter:function(c,f){var d=this._escapeRegex(f),e,b=null;if(!c)return null;e=new RegExp(d,"i");a.each(c,function(f,a){if(d===undefined||d.length===0){a.match=true;return}var c=e.exec(a.label);if(c===null)a.match=false;else{if(b===null&&c.index===0)b=a;a.match=c.index>=0}});this._topHit=b;return c}})})(jQuery);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Wijmo Library 2.2.0
|
|
4
|
+
* http://wijmo.com/
|
|
5
|
+
*
|
|
6
|
+
* Copyright(c) GrapeCity, Inc. All rights reserved.
|
|
7
|
+
*
|
|
8
|
+
* Dual licensed under the Wijmo Commercial or GNU GPL Version 3 licenses.
|
|
9
|
+
* licensing@wijmo.com
|
|
10
|
+
* http://wijmo.com/license
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
**/
|
|
14
|
+
(function(a){"use strict";a.widget("wijmo.wijcompositechart",a.wijmo.wijchartcore,{options:{stacked:false,clusterOverlap:0,clusterWidth:85,clusterRadius:0,clusterSpacing:0,seriesList:[],animation:{enabled:true,duration:400,easing:">"},seriesTransition:{enabled:true,duration:400,easing:">"},mouseDown:null,mouseUp:null,mouseOver:null,mouseOut:null,mouseMove:null,click:null},_create:function(){var c=this,b=c.options,d=c._getDefFill();a.each(b.seriesList,function(d,c){if(c.type==="bar"){a.extend(true,b.axis,{x:{compass:"west"},y:{compass:"south"}});return true}else if(c.type==="pie"&&c.pieSeriesList)c.data=c.pieSeriesList});a.extend(true,{compass:"east"},b.hint);if(b.is100Percent)b.is100Percent=false;a.each(b.seriesStyles,function(b,a){if(!a.fill)a.fill=d[b]});a.wijmo.wijchartcore.prototype._create.apply(c,arguments);c.chartElement.addClass("wijmo-wijcompositechart")},_setOption:function(b){b!=="is100Percent"&&a.wijmo.wijchartcore.prototype._setOption.apply(this,arguments)},destroy:function(){var d=this,b=d.chartElement,c=b.data("fields"),e=c&&c.aniBarsAttr;b.removeClass("wijmo-wijcompositechart");a.wijmo.wijchartcore.prototype.destroy.apply(this,arguments);d._destroyRaphaelArray(e);b.data("fields",null)},_isBarChart:function(){return true},_clearChartElement:function(){var c=this,e=c.options,d=c.chartElement,b=d.data("fields");if(b&&b.allElements){a.each(b.allElements,function(d,b){if(d==="scatters")b.length&&a.each(b,function(d,c){if(c.length){a.each(c,function(b,a){a&&a.remove&&a.remove();c[b]=null});b[d]=null}});c._destroyRaphaelArray(b)});b.allElements=null}a.wijmo.wijchartcore.prototype._clearChartElement.apply(c,arguments);if(b&&b.ctracers)b.ctracers=null;c.element.removeData("plotInfos");if(!e.seriesTransition.enabled)if(b&&b.aniBarsAttr)b.aniBarsAttr=null},_bindData:function(){var b=this,e=b.options,f=e.dataSource,g=e.seriesList,c=e.data,d;a.each(g,function(q,l){var e=l.data,m,n,k,j=l.dataSource||f,p=l.type,h,i,g,o=[];if(j&&e)if(p==="pie"){h=e.label;i=e.value;g=e.offset;if(h&&h.bind)h=b._getBindData(j,h.bind);if(i&&i.bind)i=b._getBindData(j,i.bind);if(g&&g.bind)g=b._getBindData(j,g.bind);if(h&&a.isArray(h)&&h.length&&i&&a.isArray(i)&&i.length){a.each(i,function(b,e){var d,c=0;if(b>=0&&b<h.length)d=h[b];if(g&&a.isArray(i)&&g.length&&b>=0&&b<g.length)c=typeof g[b]==="undefined"?0:g[b];o.push({data:e,label:d,offset:c,legendEntry:true})});l.data=o}}else{m=e.x;n=e.y;k=e.y1;if(m&&m.bind)e.x=b._getBindData(j,m.bind);else if(c&&c.x&&c.x.bind){if(d===undefined)d=b._getBindData(j,c.x.bind);e.x=d}if(n&&n.bind)e.y=b._getBindData(j,n.bind);if(k&&k.bind)e.y1=b._getBindData(j,k.bind)}})},getElement:function(f,b,c){var d=this.chartElement,e=d.data("fields"),a=e.chartElements;switch(f){case"bar":case"column":return a.bars[b];case"line":case"area":return a.paths[b];case"linemarkers":return a.markersSet[b];case"pie":return this._getPie(a,b,c)}return null},_getPie:function(b,e,d){if(d!==undefined)return b["sectors"+d]?b["sectors"+d][e]:null;else{var c=[];a.each(b,function(b,d){/sectors/.test(b)&&b!=="sectors"&&a.each(d,function(b,a){c.push(a)})});if(c.length===0)c=b.sectors;return c[e]}},_isSeriesDataEmpty:function(){var c=this,b=c.options.seriesList;if(!b||b.length===0)return true;a.each(b,function(b,a){return a.type==="pie"&&(!a.data||!a.label||a.label.length===0)?true:!a.data||(!a.data.x||!a.data.y)&&!a.data.xy?true:void 0});return false},_showSerieEles:function(d){var f=d.type,b=d.eles,e=this.options.showChartLabels,c;switch(f){case"pie":if(b.sector){b.sector.show();b.sector.shadow&&b.sector.shadow.show();b.sector.tracker&&b.sector.tracker.show()}b.label&&b.label.show();break;case"line":case"spline":case"bezier":case"area":b.markers&&a.each(b.markers,function(d,b){c=a(b.node).data("wijchartDataObj");if(c&&c.lineSeries&&c.lineSeries.markers)if(!c.lineSeries.markers.visible)return true;b.show()});b.dcl&&a.each(b.dcl,function(b,a){e&&a.show()});if(b.path){c=a(b.path.node).data("wijchartDataObj");if(c.visible){b.path.show();b.path.shadow&&b.path.shadow.show();b.path.area&&b.path.area.show();b.path.tracker&&b.path.tracker.show()}}break;case"bar":case"column":a.each(b,function(b,a){if(a.bar){a.bar.show();a.bar.shadow&&a.bar.shadow.show();a.bar.tracker&&a.bar.tracker.show()}a.dcl&&a.dcl.show();a.animatedBar&&!a.animatedBar.removed&&a.animatedBar.show()});break;case"scatter":a.each(b,function(b,a){a.show()})}},_hideSerieEles:function(c){var d=c.type,b=c.eles;switch(d){case"pie":if(b.sector){b.sector.hide();b.sector.shadow&&b.sector.shadow.hide();b.sector.tracker&&b.sector.tracker.hide()}b.label&&b.label.hide();break;case"line":case"spline":case"bezier":case"area":b.markers&&a.each(b.markers,function(b,a){a.hide()});b.dcl&&a.each(b.dcl,function(b,a){a.hide()});if(b.path){b.path.hide();b.path.shadow&&b.path.shadow.hide();b.path.area&&b.path.area.hide();b.path.tracker&&b.path.tracker.hide()}break;case"bar":case"column":a.each(b,function(b,a){if(a.bar){a.bar.hide();a.bar.shadow&&a.bar.shadow.hide();a.bar.tracker&&a.bar.tracker.hide()}a.dcl&&a.dcl.hide();a.animatedBar&&!a.animatedBar.removed&&a.animatedBar.hide()});break;case"scatter":a.each(b,function(b,a){a.hide()})}},_paintTooltip:function(){var b=this,d=b.chartElement,e=d.data("fields")||{},c=e.ctracers||[];a.wijmo.wijchartcore.prototype._paintTooltip.apply(this,arguments);b.tooltip&&a.each(c,function(c,a){if(a.trackers&&a.trackers.length)c===0&&b.tooltip.setOptions({relatedElement:a.trackers[0]})})},_paintPlotArea:function(){var b=this,c=b.options,g="seriesList",f="seriesStyles",e="seriesHoverStyles",o=c[f],m=c[e],i=b.canvasBounds,l={},h=0,p=a.isArray(c.axis.y),k={canvas:b.canvas,tooltip:b.tooltip,bounds:i,widgetName:b.widgetName,seriesTransition:c.seriesTransition,showChartLabels:c.showChartLabels,textStyle:c.textStyle,chartLabelStyle:c.chartLabelStyle,chartLabelFormatString:c.chartLabelFormatString,shadow:c.shadow,hint:c.hint,animation:c.animation,disabled:c.disabled,culture:b._getCulture(),mouseDown:function(c,a){b._trigger("mouseDown",c,a)},mouseUp:function(c,a){b._trigger("mouseUp",c,a)},mouseOver:function(c,a){b._trigger("mouseOver",c,a)},mouseOut:function(c,a){b._trigger("mouseOut",c,a)},mouseMove:function(c,a){b._trigger("mouseMove",c,a)},click:function(c,a){b._trigger("click",c,a)}},n=b.chartElement.data("fields"),d,j;if(n)n.ctracers=[];a.each(c[g],function(s,d){var j=d.type,b={},k=j,i={},q=a.extend({},o[h]),n=a.extend({},m[h]),r=d.yAxis;if(!j||j.length===0)return true;if(k==="spline"||k==="bezier")k="line";b=l[k];if(!b){if(j==="pie")b=[];else b={};l[k]=b;if(d.hint){b.hint=d.hint;if(!c.hint.content)c.hint.content=d.hint.content;if(!c.hint.title)c.hint.title=d.hint.title}}if(j==="pie"){a.each(d.data,function(c,b){q=a.extend({},o[h]);n=a.extend({},m[h]);if(!i[g])i[g]=[];if(!i[f])i[f]=[];if(!i[e])i[e]=[];b.pieID=s+1;i[g].push(b);i[f].push(q);i[e].push(n);h++});i.radius=d.radius;i.center=d.center;i.label=d.label;b.push(i);return true}else if(j==="column")b.horizontal=false;else if(j==="bar")b.horizontal=true;else if(j==="spline")d.fitType="spline";else if(j==="bezier")d.fitType="bezier";if(p)b.yAxis=r||0;if(j==="line"||j==="spline"||j==="bezier"){delete q.fill;delete n.fill}if(!b[g])b[g]=[];if(!b[f])b[f]=[];if(!b[e])b[e]=[];b[g].push(d);b[f].push(q);b[e].push(n);h++});a.each(l,function(e,f){var g=f.yAxis;switch(e){case"pie":a.each(f,function(j,g){var f=g.center,c=g.radius||50,h=f?{startX:f.x-c,startY:f.y-c,endX:f.x+c,endY:f.y+c}:{startX:i.startX+10,startY:i.startY+10,endX:i.startX+10+2*c,endY:i.startY+10+2*c};d=a.extend(true,{},k,{bounds:h,radius:c},g);b.chartElement.wijpie(d);b.chartElement.data("fields").aniSectorAttrs=null;b.chartElement.data("fields").aniLabelAttrs=null;b._savechartData(e)});break;case"bar":case"column":d=a.extend(true,{},k,{stacked:c.stacked,axis:c.axis,clusterOverlap:c.clusterOverlap,clusterWidth:c.clusterWidth,clusterSpacing:c.clusterSpacing,is100Percent:c.is100Percent,clusterRadius:c.clusterRadius,isYTime:b.axisInfo.y[0].isTime,isXTime:b.axisInfo.x.isTime,yAxisInfo:b.axisInfo.y,yAxisIndex:g},f);b.chartElement.wijbar(d);b._savechartData(e);break;case"line":case"spline":case"bezier":case"area":j=b._getyAxisGroup(f);a.each(j,function(g,f){if(!b.aniPathsAttr)b.aniPathsAttr=[];d=a.extend(true,{},k,{axis:c.axis,isXTime:b.axisInfo.x.isTime,isYTime:b.axisInfo.y[0].isTime,aniPathsAttr:b.aniPathsAttr,chartLabelEles:b.chartLabelEles,type:e==="area"?"area":"line",hole:c.hole},f);d.axis.y=c.axis.y[g]||c.axis.y;b.chartElement.wijline(d);b._savechartData(e,true)});break;case"scatter":j=b._getyAxisGroup(f);a.each(j,function(g,f){d=a.extend(true,{},k,{axis:c.axis,isXTime:b.axisInfo.x.isTime,isYTime:b.axisInfo.y[0].isTime,zoomOnHover:c.zoomOnHover},f);d.axis.y=c.axis.y[g]||c.axis.y;b.chartElement.wijscatter(d);b._savechartData(e)})}});b.chartElement.data("fields").seriesEles=null;b._bindtooltip()},_savechartData:function(f,g){var d=this,b=d.chartElement.data("fields"),h=b.seriesEles,e=b.allElements||{},c;a.each(h,function(b,a){d.seriesEles.push({eles:a,type:f})});if(g)b.ctracers=[];else{c=b.ctracers||[];c.push({trackers:b.trackers,type:f});b.ctracers=c}b&&b.chartElements&&a.each(b.chartElements,function(b,a){d._copyElements(e,b,a)});b.allElements=e},_copyElements:function(d,e,b){var c;if(b&&a.isArray(b)){c=d[e]||[];d[e]=c.concat(b)}else if(b){c=d[e]||[];c.concat([b])}},_getyAxisGroup:function(c){var b={};a.each(c.seriesList,function(e,d){var a=d.yAxis||0;if(!b[a])b[a]={seriesList:[],seriesStyles:[],seriesHoverStyles:[]};b[a].seriesList.push(d);b[a].seriesStyles.push(c.seriesStyles[e]);b[a].seriesHoverStyles.push(c.seriesHoverStyles[e])});return b},_bindtooltip:function(){var b=this,c=b.widgetName,d=b.chartElement.data("fields");d&&a.each(d.ctracers,function(b,a){a.trackers&&a.trackers.toFront()});b.chartElement.delegate(".linetracker, .bartracker, .pietracker, .wijscatterchart","mouseover."+c,a.proxy(b._tooltipMouseOver,b));b.chartElement.delegate(".linetracker, .bartracker, .pietracker, .wijscatterchart","mouseout."+c,a.proxy(b._tooltipMouseOut,b));b.chartElement.delegate(".linetracker, .bartracker, .pietracker, .wijscatterchart","mousemove."+c,a.proxy(b._tooltipMouseMove,b))},_tooltipMouseOver:function(f){var d=f.target,b=this,o=b.tooltip,i=b.options.hint,e=null,n=i.title,m=i.content,l=i.style,k=a.isFunction(n),j=a.isFunction(m),c,g,h;h=a(b.canvas.canvas.parentNode).offset();if(a(d).data("owner"))d=a(d).data("owner");d=a(d);c=d.data("wijchartDataObj");if(b.tooltip){e=o.getOptions();if(k||j){if(k)e.title=a.proxy(n,c);if(j)e.content=a.proxy(m,c)}if(c.type==="line"){if(c.path.removed)return;if(b.hoverLine!==c){b.isNewLine=true;if(b.hoverLine)if(!b.hoverLine.path.removed){b.hoverLine.path.wijAttr(b.hoverLine.lineStyle);if(b.hoverPoint&&!b.hoverPoint.isSymbol){b.hoverPoint.marker.wijAttr(b.hoverPoint.markerStyle);b.hoverPoint.marker.transform("s1")}}c.lineHoverStyle&&c.path.wijAttr(c.lineHoverStyle);b.hoverLine=c;b.hoverPoint=null;b.hoverVirtualPoint=null}}else if(c.type==="scatter"){b._clearHoverState();g=c.dot.getBBox();e.style.stroke=l.stroke||d.attr("stroke");b.tooltip.showAt({x:g.x+g.width/2,y:g.y},f)}else{b._clearHoverState();e.style.stroke=l.stroke||d.attr("stroke");b.tooltip.showAt({x:f.pageX-h.left,y:f.pageY-h.top},f)}}},_tooltipMouseMove:function(c){var e=this,b=c.target,d,f=a(e.canvas.canvas.parentNode).offset();if(a(b).data("owner"))b=a(b).data("owner");b=a(b);d=b.data("wijchartDataObj");if(e.tooltip)d.type!=="line"&&d.type!=="scatter"&&e.tooltip.showAt({x:c.pageX-f.left,y:c.pageY-f.top},c)},_tooltipMouseOut:function(e){var d=this,b=e.target,c;if(a(b).data("owner"))b=a(b).data("owner");b=a(b);c=b.data("wijchartDataObj");if(c.type!=="line")d.tooltip&&d.tooltip.hide()},_mouseMoveInsidePlotArea:function(v,r){var b=this,g=b.tooltip,k=b.options.hint,f,i,c=0,m,e,n,o,u=null,h=null,l=null,t=k.title,s=k.content,q=a.isFunction(t),p=a.isFunction(s),j=0,d;if(g)l=g.getOptions();if(b.hoverLine){d=b.hoverLine;if(b.isNewLine){k.enable&&g&&g.hide();b.isNewLine=false}f=d.lineMarkers;i=d.virtualMarkers;c=-1;m={x:0,y:0};if(f&&f.length){a.each(f,function(f,b){if(b.removed)return true;var a=b.wijGetBBox(),e=a.x+a.width/2,d=Math.abs(e-r.left);if(f===0||d<j){j=d;c=f;m={x:e,y:a.y+a.height/2}}});if(b.hoverPoint&&b.hoverPoint.index===c)return;if(c>-1){if(f[c].removed)return;e=a(f[c].node).data("wijchartDataObj");if(e){if(b.hoverPoint&&!b.hoverPoint.isSymbol)if(!b.hoverPoint.removed){b.hoverPoint.marker.wijAttr(b.hoverPoint.markerStyle);b.hoverPoint.marker.transform("s1")}if(!e.isSymbol)!e.marker.removed&&e.marker.wijAttr(e.markerHoverStyle)}b.hoverPoint=e;b.hoverVirtualPoint=i[c]}}else{a.each(i,function(d,a){var b=Math.abs(a.x-r.left);if(d===0||b<j){j=b;c=d;m={x:a.x,y:a.y}}});if(b.hoverVirtualPoint&&b.hoverVirtualPoint.index===c)return;if(c>-1){b.hoverPoint=null;b.hoverVirtualPoint=i[c]}}if(g){h=b.hoverVirtualPoint;n=h.valX;o=h.valY;if(q||p){if(q)l.title=function(){var b={pointIndex:c,lineIndex:d.index,x:n,y:o,label:d.label,data:h,fmt:t},e=a.proxy(b.fmt,b),f=e();return f};if(p)l.content=function(){var b={pointIndex:c,lineIndex:d.index,x:n,y:o,label:d.label,data:h,fmt:s},f=a.proxy(b.fmt,b),e=f();return e}}u=a.extend({stroke:d.path.attr("stroke")},k.style);l.style.stroke=u.stroke;g.showAt(m)}}a.wijmo.wijchartcore.prototype._mouseMoveInsidePlotArea.apply(b,arguments)},_mouseMoveOutsidePlotArea:function(){var b=this;b._clearHoverState();a.wijmo.wijchartcore.prototype._mouseMoveOutsidePlotArea.apply(b,arguments)},_clearHoverState:function(){var a=this,b=a.tooltip,c=a.options.hint;c.enable&&b&&b.hide();if(a.hoverLine)if(!a.hoverLine.path.removed){a.hoverLine.path.wijAttr(a.hoverLine.lineStyle);if(a.hoverPoint&&!a.hoverPoint.isSymbol){a.hoverPoint.marker.wijAttr(a.hoverPoint.markerStyle);a.hoverPoint.marker.transform("s1")}}a.hoverLine=null;a.hoverPoint=null;a.hoverVirtualPoint=null},_getTooltipText:function(){return""},_calculateParameters:function(d,g){var e=this,f=false,c,b;a.wijmo.wijchartcore.prototype._calculateParameters.apply(e,arguments);a.each(e.options.seriesList,function(b,a){if(a.type==="column"||a.type==="bar"){f=true;return false}});if(!f)return;if(d.id==="x"){c=g.unitMinor;b=e._getBarAdjustment(d);if(b===0)b=c;else if(c<b&&c!==0)b=Math.floor(b/c)*c;d.min-=b;d.max+=b;e._calculateMajorMinor(g,d)}},_getBarAdjustment:function(d){var b=0,g=this.options,f=d.max,c=d.min,e=0;a.each(g.seriesList,function(c,a){if(a.type==="pie")return true;if(a.data.x===undefined||a.data.y===undefined)return true;e=a.data.x.length;if(b<e)b=e});if(b>1)return(f-c)/b*g.clusterWidth*.0125;else if(b===1){if(c===0&&f===1){c=-1;d.min=c}return(f-c)*.0125}else return 0}})})(jQuery);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Wijmo Library 2.2.0
|
|
4
|
+
* http://wijmo.com/
|
|
5
|
+
*
|
|
6
|
+
* Copyright(c) GrapeCity, Inc. All rights reserved.
|
|
7
|
+
*
|
|
8
|
+
* Dual licensed under the Wijmo Commercial or GNU GPL Version 3 licenses.
|
|
9
|
+
* licensing@wijmo.com
|
|
10
|
+
* http://wijmo.com/license
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
**/
|
|
14
|
+
(function(a){"use strict";var c,b,d;c=function(b){var a=this;a.data={};a.reader=null;a.proxy=null;a.items=[];a.loading=null;a.loaded=null;a._constructor(b)};window.wijdatasource=c;a.extend(c.prototype,{_constructor:function(b){a.extend(this,b)},load:function(c,e){var b=this,d=b.proxy;if(a.isFunction(b.loading))if(b.loading(b,c)===false)return;if(d)d.request(b,b.loaded,c);else{(b.items.length===0||e)&&this.read();a.isFunction(b.loaded)&&b.loaded(b,c)}},read:function(){var a=this,b=a.data;if(b&&a.reader)a.reader.read(a);else a.items=a.data}});b=function(b){a.isFunction(window.wijmoASPNetParseOptions)&&wijmoASPNetParseOptions(b);if(a.isArray(b))this.fields=b};window.wijarrayreader=b;a.extend(b.prototype,{read:function(b){if(a.isArray(b.data))b.items=this._map(b.data);else b.items=[]},_map:function(d){var c=this,b=[];if(c.fields===undefined||c.fields.length===0){a.extend(true,b,d);return b}else a.each(d,function(f,d){var e={};a.each(c.fields,function(g,b){if(b.mapping&&typeof b.mapping&&window[b.mapping])b.mapping=window[b.mapping];if(a.isFunction(b.mapping)){e[b.name]=b.mapping(d);return true}var f=b.mapping!==undefined?b.mapping:b.name,c=d[f];if(c===undefined)if(b.defaultValue!==undefined)c=b.defaultValue;else c=d;e[b.name]=c});b.push(e)});return b}});d=function(b){this.options=b;a.isFunction(window.wijmoASPNetParseOptions)&&wijmoASPNetParseOptions(b)};window.wijhttpproxy=d;a.extend(d.prototype,{request:function(d,e,f){var g=this,b=a.extend({},this.options),c=b.success;b.success=function(h){a.isFunction(c)&&c(h);g._complete(h,d,e,b,f)};a.ajax(b)},_complete:function(e,b,c,d,f){b.data=d.key!==undefined?e[d.key]:e;b.read();a.isFunction(c)&&c(b,f)}})})(jQuery);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Wijmo Library 2.2.0
|
|
4
|
+
* http://wijmo.com/
|
|
5
|
+
*
|
|
6
|
+
* Copyright(c) GrapeCity, Inc. All rights reserved.
|
|
7
|
+
*
|
|
8
|
+
* Dual licensed under the Wijmo Commercial or GNU GPL Version 3 licenses.
|
|
9
|
+
* licensing@wijmo.com
|
|
10
|
+
* http://wijmo.com/license
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
**/
|
|
14
|
+
(function(a){"use strict";a.widget("wijmo.wijdatepager",{options:{culture:"",firstDayOfWeek:0,selectedDate:new Date,viewType:"day",nextTooltip:"right",prevTooltip:"left"},_setOption:function(c,b){a.Widget.prototype._setOption.apply(this,arguments);switch(c){case"culture":this.options.culture=b;this._initBackground();break;case"selectedDate":this.options.selectedDate=b;this._initBackground();break;case"disabled":if(b)this._disable();else this._enable();break;case"viewType":this.options.viewType=b;this._initBackground();break;case"nextTooltip":this.element.find(".wijmo-wijdatepager-increment").attr("title",b);break;case"prevTooltip":this.element.find(".wijmo-wijdatepager-decrement").attr("title",b)}return this},_disable:function(){this.element.addClass("ui-state-disabled");this.element.find(".wijmo-wijdatepager-decrement").button("option","disabled",true);this.element.find(".wijmo-wijdatepager-increment").button("option","disabled",true)},_enable:function(){this.element.removeClass("ui-state-disabled");this.element.find(".wijmo-wijdatepager-decrement").button("option","disabled",false);this.element.find(".wijmo-wijdatepager-increment").button("option","disabled",false)},_create:function(){var b=this.options,c;if(window.wijmoApplyWijTouchUtilEvents)a=window.wijmoApplyWijTouchUtilEvents(a);if(!b.selectedDate)b.selectedDate=new Date;this._dtpagernamespacekey="dtpager"+ +new Date;this.element.addClass("wijmo-wijdatepager ui-widget ui-helper-clearfix");c=a.proxy(this.invalidate,this);a(window).bind("resize."+this._dtpagernamespacekey,c);this.element.disableSelection();this.element.append(a('<a class="wijmo-wijdatepager-decrement"><span>'+b.prevTooltip+"</span></a>")).append('<div class="wijmo-wijdatepager-container ui-widget-content"><div class="wijmo-wijdatepager-pages"></div></div><a class="wijmo-wijdatepager-increment"><span>'+b.nextTooltip+"</span></a>");a.Widget.prototype._create.apply(this,arguments);this.element.find(".wijmo-wijdatepager-decrement").button({icons:{primary:"ui-icon-triangle-1-w"},text:false}).click(a.proxy(this.goLeft,this));this.element.find(".wijmo-wijdatepager-increment").button({icons:{primary:"ui-icon-triangle-1-e"},text:false}).click(a.proxy(this.goRight,this));this._initBackground();b.disabled&&this._disable()},destroy:function(){this.element.removeClass("wijmo-wijdatepager");a(window).unbind("."+this._dtpagernamespacekey)},refresh:function(){this.invalidate()},invalidate:function(){var g=a(this.element.find(".wijmo-wijdatepager-pagelabel")[this._index]),c=this.element.find(".wijmo-wijdatepager-container"),e=this.element.find(".wijmo-wijdatepager-decrement"),f=this.element.find(".wijmo-wijdatepager-increment"),b=this.element.innerWidth(),d=e.is(":visible")?e.outerWidth(true):0,h=f.is(":visible")?f.outerWidth(true):0;this.element.find(".wijmo-wijdatepager-pagelabel.ui-state-active").removeClass("ui-state-active");g.addClass("ui-state-active");c.css("left",d);this.element.removeClass("wijmo-wijdatepager-width-smallest wijmo-wijdatepager-width-small wijmo-wijdatepager-width-medium wijmo-wijdatepager-width-normal");if(b<300)this.element.addClass("wijmo-wijdatepager-width-smallest");else if(b<475)this.element.addClass("wijmo-wijdatepager-width-small");else if(b<600)this.element.addClass("wijmo-wijdatepager-width-medium");else this.element.addClass("wijmo-wijdatepager-width-normal");c.outerWidth(b-d-h)},goLeft:function(){var a=this.options;if(a.disabled)return;this._setSelectedIndex(this._index-1,true)},goRight:function(){var a=this.options;if(a.disabled)return;this._setSelectedIndex(this._index+1)},_getCulture:function(a){return Globalize.findClosestCulture(a||this.options.culture)},_isRTL:function(){return!!this._getCulture().isRTL},_initBackground:function(j,i){var f,d,c,b,g,h,e=this;if(this._isInAnimate)return;this._index=0;this._datesDef=this._getDatesDefinition();this._min=0;this._max=this._datesDef.length-1;f="";for(d=0;d<this._datesDef.length;d+=1)f+='<div class="wijmo-wijdatepager-pagelabel'+(d===0?" wijmo-wijdatepager-pagelabel-first":"")+(this._datesDef[d].range?" wijmo-wijdatepager-pagerange":"")+(this._datesDef[d].header?" wijmo-wijdatepager-pageheader ui-state-highlight":"")+(d===this._datesDef.length-1?" wijmo-wijdatepager-pagelabel-last":"")+'">'+this._datesDef[d].l+"</div>";b=this.element.find(".wijmo-wijdatepager-pages");if(j){this._isInAnimate=true;c=b.clone(true);b.html(f);g=b.find(".wijmo-wijdatepager-pagelabel");if(!i){c.insertBefore(b);h=a(g[this._index]).offset().left;b.css("opacity",0).css("left",c.outerWidth(true)).stop().animate({left:"0px",opacity:100});c.stop().animate({left:"-"+c.outerWidth(true)+"px",opacity:0},function(){c.remove();e._isInAnimate=false;e.invalidate()})}else{c.insertAfter(b);h=a(g[this._index]).offset().left;b.css("opacity",0).css("left",-c.outerWidth(true)).stop().animate({left:"0px",opacity:100});c.css("left",0).stop().animate({left:c.outerWidth(true)+"px",opacity:0},function(){c.remove();e._isInAnimate=false;e.invalidate()})}}else{b.html(f);this.invalidate()}b.find(".wijmo-wijdatepager-pagelabel").hover(a.proxy(this._pagelabelHover,this),a.proxy(this._pagelabelHout,this));b.find(".wijmo-wijdatepager-pagelabel").bind("mousedown",a.proxy(this._pagelabelMouseDown,this));b.find(".wijmo-wijdatepager-pagelabel").click(a.proxy(function(d){var c=a(d.target),b;b=this.element.find(".wijmo-wijdatepager-pagelabel").index(c);this._setSelectedIndex(b)},this))},_addDays:function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate()+b)},_getDatesDefinition:function(){var g=this.options,i=g.viewType.toLowerCase(),d,c,a,f,h,e=[],b=g.selectedDate;switch(i){case"week":a=new Date(b.getFullYear(),b.getMonth(),-6);d=g.firstDayOfWeek-a.getDay();if(Math.abs(d)>6)d=a.getDay()-g.firstDayOfWeek;a=this._addDays(a,d);h=new Date(b.getFullYear(),b.getMonth()+1,7);d=0;while(a<h||a.getMonth()===b.getMonth()){f=this._addDays(a,7);e.push({l:Globalize.format(a,"MMM",this._getCulture())+" "+Globalize.format(a,"dd",this._getCulture())+"-"+Globalize.format(this._addDays(a,6),"dd",this._getCulture()),d:a,d2:this._addDays(a,6)});if(b>=a&&b<=f)this._index=d;a=f;d+=1}break;case"month":c=new Date(b.getFullYear()-1,0,1);e.push({l:c.getFullYear(),d:c,range:true});c=new Date(b.getFullYear(),0,1);e.push({l:c.getFullYear(),d:c,header:true});for(d=0;d<12;d+=1){c=new Date(b.getFullYear(),d,1);e.push({l:Globalize.format(c,"MMM",this._getCulture()),d:c});f=new Date(b.getFullYear(),d+1,1);if(b>=c&&b<=f)this._index=d+2}c=new Date(b.getFullYear()+1,0,1);e.push({l:c.getFullYear(),d:c,range:true});break;default:c=new Date(b.getFullYear(),b.getMonth(),0);e.push({l:Globalize.format(c,"MMM",this._getCulture()),d:c,range:true});c=new Date(b.getFullYear(),b.getMonth(),1);e.push({l:Globalize.format(c,"MMM",this._getCulture()),d:c,header:true});a=c;d=2;while(a.getMonth()===b.getMonth()){f=new Date(a.getFullYear(),a.getMonth(),a.getDate()+1);e.push({l:Globalize.format(a,"d ",this._getCulture()),d:a});if(b>=a&&b<=f)this._index=d;a=f;d+=1}c=new Date(b.getFullYear(),b.getMonth()+1,1);e.push({l:Globalize.format(c,"MMM",this._getCulture()),d:c,range:true})}return e},_setSelectedIndex:function(a,c){var b=this.options;if(b.disabled)return;if(a>=this._min&&a<=this._max){this._dragActivated&&this._showTooltip(a);if(this._index!==a){if(this._datesDef[a].header)if(c)a=a-1;else return;this._index=a;b.selectedDate=this._datesDef[a].d;if(this._index===this._max)if(b.viewType==="week")b.selectedDate=new Date(b.selectedDate.getFullYear(),b.selectedDate.getMonth(),b.selectedDate.getDate()+7);if(this._max>2&&this._index===0)this._initBackground(true,true);else if(this._index===this._max)this._initBackground(true,false);else this.invalidate();this._trigger("selectedDateChanged",null,{selectedDate:b.selectedDate})}}},_pagelabelHover:function(c){var b=a(c.target);if(b.hasClass("wijmo-wijdatepager-pageheader"))return;b.addClass("ui-state-hover")},_showTooltip:function(d){var g=this.options,b=this._datesDef[d],e=g.viewType,c,f=this.element.find(".wijmo-wijdatepager-pagelabel")[d];if(!this._tooltip){this._tooltip=a('<div class="wijmo-wijdatepager-tooltip"><div class="wijmo-wijdatepager-tooltip-inner"></div><div class="wijmo-wijdatepager-triangle"></div></div>');this.element.append(this._tooltip);this._tooltip.wijpopup()}c="";switch(e){case"day":c=Globalize.format(b.d,"dddd, MMMM d, yyyy",this._getCulture());break;case"week":c=Globalize.format(b.d,"MMMM d - ",this._getCulture())+Globalize.format(b.d2,b.d.getMonth()!==b.d2.getMonth()?"MMMM d, yyyy":"d, yyyy",this._getCulture());break;case"month":c=Globalize.format(b.d,"MMMM yyyy",this._getCulture())}this._tooltip.wijpopup("show",{of:f,my:"center bottom",at:"center top",offset:"-10 -10"});this._tooltip.find(".wijmo-wijdatepager-tooltip-inner").html(c)},_hideTooltip:function(){this._tooltip.wijpopup("hide")},_pagelabelHout:function(b){a(b.target).removeClass("ui-state-hover")},_pagelabelMouseDown:function(c){this._dragActivated=false;if(this.options.disabled)return;c.preventDefault();var d=a(c.target),b;if(d.hasClass("wijmo-wijdatepager-pageheader"))return;b=this.element.find(".wijmo-wijdatepager-pagelabel").index(d);this._dragActivated=true;this._setSelectedIndex(b);this._mouseDownTimeFix20555=+new Date;this._startClientX=c.pageX;this._startInd=b;a(document).bind("mousemove."+this._dtpagernamespacekey,a.proxy(this._pageindicatorMouseMove,this));a(document).bind("mouseup."+this._dtpagernamespacekey,a.proxy(this._pageindicatorMouseUp,this))},_pageindicatorMouseMove:function(d){d.preventDefault();if(this._isInAnimate)return;var b=this.element.find(".wijmo-wijdatepager-pagelabel")[this._startInd],c,a;if(!b)return;c=b.offsetLeft+Math.round(b.offsetWidth/2)+(d.pageX-this._startClientX);a=this._findClosesPageIndexByPos(c);if(this._prevMoveInd===a)return;this._prevMoveInd=a;if(this._mouseDownTimeFix20555+150>+new Date)return;a!==-1&&a!==this._index&&this._setSelectedIndex(a)},_pageindicatorMouseUp:function(){this._dragActivated=false;a(document).unbind("."+this._dtpagernamespacekey);this._hideTooltip()},_findClosesPageIndexByPos:function(c){for(var b=this.element.find(".wijmo-wijdatepager-pages").find(".wijmo-wijdatepager-pagelabel"),a=0;a<b.length;a+=1)if(b[a].offsetLeft<c&&b[a].offsetLeft+b[a].offsetWidth>c)return a;return-1}})})(jQuery);
|