alchemy 1.0.3 → 8.4.4
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.
- checksums.yaml +7 -0
- data/LICENSE +24 -17
- data/README.md +538 -4
- data/lib/alchemy.rb +3 -2
- metadata +61 -223
- data/Rakefile +0 -21
- data/app/assets/fonts/alchemy/LiberationSans-Bold-webfont.eot +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Bold-webfont.svg +0 -154
- data/app/assets/fonts/alchemy/LiberationSans-Bold-webfont.ttf +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Bold-webfont.woff +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-BoldItalic-webfont.eot +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-BoldItalic-webfont.svg +0 -154
- data/app/assets/fonts/alchemy/LiberationSans-BoldItalic-webfont.ttf +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-BoldItalic-webfont.woff +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Italic-webfont.eot +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Italic-webfont.svg +0 -154
- data/app/assets/fonts/alchemy/LiberationSans-Italic-webfont.ttf +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Italic-webfont.woff +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Regular-webfont.eot +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Regular-webfont.svg +0 -154
- data/app/assets/fonts/alchemy/LiberationSans-Regular-webfont.ttf +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Regular-webfont.woff +0 -0
- data/app/assets/fonts/alchemy/Red Hat Liberation License.txt +0 -78
- data/app/assets/fonts/alchemy/overpass_bold-web.eot +0 -0
- data/app/assets/fonts/alchemy/overpass_bold-web.svg +0 -470
- data/app/assets/fonts/alchemy/overpass_bold-web.ttf +0 -0
- data/app/assets/fonts/alchemy/overpass_bold-web.woff +0 -0
- data/app/assets/fonts/alchemy/overpass_regular-web.eot +0 -0
- data/app/assets/fonts/alchemy/overpass_regular-web.svg +0 -470
- data/app/assets/fonts/alchemy/overpass_regular-web.ttf +0 -0
- data/app/assets/fonts/alchemy/overpass_regular-web.woff +0 -0
- data/app/assets/images/alchemy/icons/action-icons.png +0 -0
- data/app/assets/images/alchemy/icons/arrow_icon.png +0 -0
- data/app/assets/images/alchemy/icons/chosen-sprite.png +0 -0
- data/app/assets/images/alchemy/icons/error_icon.png +0 -0
- data/app/assets/images/alchemy/icons/objects.png +0 -0
- data/app/assets/images/alchemy/icons/spinner.gif +0 -0
- data/app/assets/images/alchemy/icons/spinner_head.gif +0 -0
- data/app/assets/images/alchemy/icons/success_icon.png +0 -0
- data/app/assets/images/alchemy/icons/warning_icon.png +0 -0
- data/app/assets/javascripts/alchemy/flash_messages.js +0 -12
- data/app/assets/javascripts/alchemy/forms.js +0 -25
- data/app/assets/javascripts/alchemy/i18n.js +0 -36
- data/app/assets/javascripts/alchemy/login.js +0 -130
- data/app/assets/javascripts/alchemy/password.js +0 -99
- data/app/assets/stylesheets/alchemy/components/_chosen.scss +0 -423
- data/app/assets/stylesheets/alchemy/components/_content.scss +0 -58
- data/app/assets/stylesheets/alchemy/components/_helpers.scss +0 -38
- data/app/assets/stylesheets/alchemy/components/_media.scss +0 -49
- data/app/assets/stylesheets/alchemy/components/_media_object.scss +0 -22
- data/app/assets/stylesheets/alchemy/components/_normalize.scss +0 -396
- data/app/assets/stylesheets/alchemy/components/_shared.scss +0 -18
- data/app/assets/stylesheets/alchemy/components/buttons/_buttons.scss +0 -278
- data/app/assets/stylesheets/alchemy/components/buttons/_buttons_vars.scss +0 -11
- data/app/assets/stylesheets/alchemy/components/flash_messages/_flash_messages.scss +0 -93
- data/app/assets/stylesheets/alchemy/components/flash_messages/_flash_messages_vars.scss +0 -3
- data/app/assets/stylesheets/alchemy/components/fonts/_liberation.scss +0 -44
- data/app/assets/stylesheets/alchemy/components/fonts/_overpass.scss +0 -24
- data/app/assets/stylesheets/alchemy/components/footer/_footer.scss +0 -53
- data/app/assets/stylesheets/alchemy/components/footer/_footer_vars.scss +0 -4
- data/app/assets/stylesheets/alchemy/components/forms/_forms.scss +0 -552
- data/app/assets/stylesheets/alchemy/components/forms/_forms_ie.scss +0 -45
- data/app/assets/stylesheets/alchemy/components/forms/_forms_mixins.scss +0 -18
- data/app/assets/stylesheets/alchemy/components/forms/_forms_responsive.scss +0 -167
- data/app/assets/stylesheets/alchemy/components/forms/_forms_vars.scss +0 -25
- data/app/assets/stylesheets/alchemy/components/header/_header.scss +0 -216
- data/app/assets/stylesheets/alchemy/components/header/_header_vars.scss +0 -11
- data/app/assets/stylesheets/alchemy/components/login/_login.scss +0 -173
- data/app/assets/stylesheets/alchemy/components/login/_login_mixins.scss +0 -7
- data/app/assets/stylesheets/alchemy/components/login/_login_vars.scss +0 -19
- data/app/assets/stylesheets/alchemy/components/sprites/_sprites.scss +0 -110
- data/app/assets/stylesheets/alchemy/components/sprites/_sprites_mixins.scss +0 -9
- data/app/assets/stylesheets/alchemy/components/text/_text.scss +0 -30
- data/app/assets/stylesheets/alchemy/components/text/_text_vars.scss +0 -1
- data/app/assets/stylesheets/alchemy/composites/content_elements.scss +0 -6
- data/app/assets/stylesheets/alchemy/composites/login.scss +0 -9
- data/app/assets/stylesheets/alchemy/composites/shell.scss +0 -4
- data/app/assets/stylesheets/alchemy/partials/_base.scss +0 -8
- data/app/assets/stylesheets/alchemy/partials/_colors.scss +0 -99
- data/app/assets/stylesheets/alchemy/partials/_mixins.scss +0 -24
- data/app/assets/stylesheets/alchemy/partials/_vars.scss +0 -31
- data/app/helpers/alchemy/gettext_translations.rb +0 -28
- data/app/helpers/alchemy/layout_helper.rb +0 -35
- data/app/helpers/alchemy/rails_translations.rb +0 -21
- data/app/helpers/alchemy/translation_helper.rb +0 -19
- data/app/views/alchemy/layouts/_change_password_layout.html.haml +0 -20
- data/app/views/alchemy/layouts/_common_i18n.haml +0 -4
- data/app/views/alchemy/layouts/_header_layout.haml +0 -13
- data/app/views/alchemy/layouts/_login_layout.html.haml +0 -58
- data/app/views/alchemy/layouts/_user_session_layout.haml +0 -17
- data/app/views/alchemy/layouts/base.html.haml +0 -20
- data/app/views/alchemy/layouts/shell_layout.haml +0 -10
- data/lib/alchemy/engine.rb +0 -8
- data/lib/alchemy/version.rb +0 -3
- data/test/alchemy_test.rb +0 -7
- data/test/test_helper.rb +0 -9
- data/vendor/assets/javascripts/alchemy/handlebars.js +0 -2201
- data/vendor/assets/javascripts/alchemy/html5shiv.js +0 -298
- data/vendor/assets/javascripts/alchemy/jquery/jquery-1.6.2.js +0 -8981
- data/vendor/assets/javascripts/alchemy/jquery/plugins/chosen.jquery.js +0 -1003
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/excanvas.js +0 -1427
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/excanvas.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.colorhelpers.js +0 -179
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.colorhelpers.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.crosshair.js +0 -167
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.crosshair.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.fillbetween.js +0 -183
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.fillbetween.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.image.js +0 -238
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.image.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.js +0 -2599
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.min.js +0 -6
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.navigate.js +0 -336
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.navigate.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.pie.js +0 -750
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.pie.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.resize.js +0 -60
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.resize.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.selection.js +0 -344
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.selection.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.stack.js +0 -184
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.stack.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.symbol.js +0 -70
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.symbol.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.threshold.js +0 -103
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.threshold.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/blank.svg +0 -3
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/custom_test.js +0 -67
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svg.css +0 -9
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svg.js +0 -1101
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svg.min.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svg.pack.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svgfilter.js +0 -396
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svgfilter.min.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svgfilter.pack.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svggraph.js +0 -1337
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svggraph.min.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svggraph.pack.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/lion.svg +0 -161
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/test.js +0 -714
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ajaxfileupload.js +0 -205
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ba-bbq.js +0 -1137
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ba-resize.js +0 -246
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.cookie.js +0 -92
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.easing.1.3.js +0 -205
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.fancyqueries.js +0 -106
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.flash.js +0 -288
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.form.js +0 -964
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.hoverIntent.js +0 -106
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jeditable.ajaxupload.js +0 -62
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jeditable.js +0 -556
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jnotify.js +0 -210
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jscrollpane.js +0 -1390
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jscrollpane.min.js +0 -11
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.linkHover.js +0 -89
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.loadmask.min.js +0 -10
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.mousewheel.js +0 -78
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.multiselect.filter.js +0 -176
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.multiselect.js +0 -668
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.pack.js +0 -11
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.periodicalupdater.js +0 -175
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.sortElements.js +0 -75
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.sparkline.min.js +0 -94
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.text-overflow.js +0 -60
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.timepickr.js +0 -214
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.timers.js +0 -142
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.tipsy.js +0 -358
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.treeTable.js +0 -226
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.trunk8.js +0 -203
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ui.multiselect.js +0 -338
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ui.totop.js +0 -58
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.uitablefilter.js +0 -95
- data/vendor/assets/javascripts/alchemy/jquery/plugins/ui.spinner.js +0 -683
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_highlight-hard_75_dadada_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_highlight-hard_75_e6e6e6_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_highlight-hard_95_ffffff_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_highlight-soft_80_e0e0e0_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_inset-hard_65_ffffff_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_inset-soft_95_fef1ec_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-icons_8f8f8f_256x240.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-icons_97baed_256x240.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/jquery-ui-1.8.11.custom.css +0 -573
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/js/jquery-1.5.1.min.js +0 -16
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/js/jquery-ui-1.8.11.custom.min.js +0 -783
- data/vendor/assets/javascripts/alchemy/rails.js +0 -331
- data/vendor/assets/javascripts/alchemy/underscore-1.3.1.js +0 -999
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Flot plugin that adds some extra symbols for plotting points.
|
|
3
|
-
|
|
4
|
-
The symbols are accessed as strings through the standard symbol
|
|
5
|
-
choice:
|
|
6
|
-
|
|
7
|
-
series: {
|
|
8
|
-
points: {
|
|
9
|
-
symbol: "square" // or "diamond", "triangle", "cross"
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
(function ($) {
|
|
16
|
-
function processRawData(plot, series, datapoints) {
|
|
17
|
-
// we normalize the area of each symbol so it is approximately the
|
|
18
|
-
// same as a circle of the given radius
|
|
19
|
-
|
|
20
|
-
var handlers = {
|
|
21
|
-
square: function (ctx, x, y, radius, shadow) {
|
|
22
|
-
// pi * r^2 = (2s)^2 => s = r * sqrt(pi)/2
|
|
23
|
-
var size = radius * Math.sqrt(Math.PI) / 2;
|
|
24
|
-
ctx.rect(x - size, y - size, size + size, size + size);
|
|
25
|
-
},
|
|
26
|
-
diamond: function (ctx, x, y, radius, shadow) {
|
|
27
|
-
// pi * r^2 = 2s^2 => s = r * sqrt(pi/2)
|
|
28
|
-
var size = radius * Math.sqrt(Math.PI / 2);
|
|
29
|
-
ctx.moveTo(x - size, y);
|
|
30
|
-
ctx.lineTo(x, y - size);
|
|
31
|
-
ctx.lineTo(x + size, y);
|
|
32
|
-
ctx.lineTo(x, y + size);
|
|
33
|
-
ctx.lineTo(x - size, y);
|
|
34
|
-
},
|
|
35
|
-
triangle: function (ctx, x, y, radius, shadow) {
|
|
36
|
-
// pi * r^2 = 1/2 * s^2 * sin (pi / 3) => s = r * sqrt(2 * pi / sin(pi / 3))
|
|
37
|
-
var size = radius * Math.sqrt(2 * Math.PI / Math.sin(Math.PI / 3));
|
|
38
|
-
var height = size * Math.sin(Math.PI / 3);
|
|
39
|
-
ctx.moveTo(x - size/2, y + height/2);
|
|
40
|
-
ctx.lineTo(x + size/2, y + height/2);
|
|
41
|
-
if (!shadow) {
|
|
42
|
-
ctx.lineTo(x, y - height/2);
|
|
43
|
-
ctx.lineTo(x - size/2, y + height/2);
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
cross: function (ctx, x, y, radius, shadow) {
|
|
47
|
-
// pi * r^2 = (2s)^2 => s = r * sqrt(pi)/2
|
|
48
|
-
var size = radius * Math.sqrt(Math.PI) / 2;
|
|
49
|
-
ctx.moveTo(x - size, y - size);
|
|
50
|
-
ctx.lineTo(x + size, y + size);
|
|
51
|
-
ctx.moveTo(x - size, y + size);
|
|
52
|
-
ctx.lineTo(x + size, y - size);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
var s = series.points.symbol;
|
|
57
|
-
if (handlers[s])
|
|
58
|
-
series.points.symbol = handlers[s];
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function init(plot) {
|
|
62
|
-
plot.hooks.processDatapoints.push(processRawData);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
$.plot.plugins.push({
|
|
66
|
-
init: init,
|
|
67
|
-
name: 'symbols',
|
|
68
|
-
version: '1.0'
|
|
69
|
-
});
|
|
70
|
-
})(jQuery);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(b){function a(h,e,g){var d={square:function(k,j,n,i,m){var l=i*Math.sqrt(Math.PI)/2;k.rect(j-l,n-l,l+l,l+l)},diamond:function(k,j,n,i,m){var l=i*Math.sqrt(Math.PI/2);k.moveTo(j-l,n);k.lineTo(j,n-l);k.lineTo(j+l,n);k.lineTo(j,n+l);k.lineTo(j-l,n)},triangle:function(l,k,o,j,n){var m=j*Math.sqrt(2*Math.PI/Math.sin(Math.PI/3));var i=m*Math.sin(Math.PI/3);l.moveTo(k-m/2,o+i/2);l.lineTo(k+m/2,o+i/2);if(!n){l.lineTo(k,o-i/2);l.lineTo(k-m/2,o+i/2)}},cross:function(k,j,n,i,m){var l=i*Math.sqrt(Math.PI)/2;k.moveTo(j-l,n-l);k.lineTo(j+l,n+l);k.moveTo(j-l,n+l);k.lineTo(j+l,n-l)}};var f=e.points.symbol;if(d[f]){e.points.symbol=d[f]}}function c(d){d.hooks.processDatapoints.push(a)}b.plot.plugins.push({init:c,name:"symbols",version:"1.0"})})(jQuery);
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Flot plugin for thresholding data. Controlled through the option
|
|
3
|
-
"threshold" in either the global series options
|
|
4
|
-
|
|
5
|
-
series: {
|
|
6
|
-
threshold: {
|
|
7
|
-
below: number
|
|
8
|
-
color: colorspec
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
or in a specific series
|
|
13
|
-
|
|
14
|
-
$.plot($("#placeholder"), [{ data: [ ... ], threshold: { ... }}])
|
|
15
|
-
|
|
16
|
-
The data points below "below" are drawn with the specified color. This
|
|
17
|
-
makes it easy to mark points below 0, e.g. for budget data.
|
|
18
|
-
|
|
19
|
-
Internally, the plugin works by splitting the data into two series,
|
|
20
|
-
above and below the threshold. The extra series below the threshold
|
|
21
|
-
will have its label cleared and the special "originSeries" attribute
|
|
22
|
-
set to the original series. You may need to check for this in hover
|
|
23
|
-
events.
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
(function ($) {
|
|
27
|
-
var options = {
|
|
28
|
-
series: { threshold: null } // or { below: number, color: color spec}
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
function init(plot) {
|
|
32
|
-
function thresholdData(plot, s, datapoints) {
|
|
33
|
-
if (!s.threshold)
|
|
34
|
-
return;
|
|
35
|
-
|
|
36
|
-
var ps = datapoints.pointsize, i, x, y, p, prevp,
|
|
37
|
-
thresholded = $.extend({}, s); // note: shallow copy
|
|
38
|
-
|
|
39
|
-
thresholded.datapoints = { points: [], pointsize: ps };
|
|
40
|
-
thresholded.label = null;
|
|
41
|
-
thresholded.color = s.threshold.color;
|
|
42
|
-
thresholded.threshold = null;
|
|
43
|
-
thresholded.originSeries = s;
|
|
44
|
-
thresholded.data = [];
|
|
45
|
-
|
|
46
|
-
var below = s.threshold.below,
|
|
47
|
-
origpoints = datapoints.points,
|
|
48
|
-
addCrossingPoints = s.lines.show;
|
|
49
|
-
|
|
50
|
-
threspoints = [];
|
|
51
|
-
newpoints = [];
|
|
52
|
-
|
|
53
|
-
for (i = 0; i < origpoints.length; i += ps) {
|
|
54
|
-
x = origpoints[i]
|
|
55
|
-
y = origpoints[i + 1];
|
|
56
|
-
|
|
57
|
-
prevp = p;
|
|
58
|
-
if (y < below)
|
|
59
|
-
p = threspoints;
|
|
60
|
-
else
|
|
61
|
-
p = newpoints;
|
|
62
|
-
|
|
63
|
-
if (addCrossingPoints && prevp != p && x != null
|
|
64
|
-
&& i > 0 && origpoints[i - ps] != null) {
|
|
65
|
-
var interx = (x - origpoints[i - ps]) / (y - origpoints[i - ps + 1]) * (below - y) + x;
|
|
66
|
-
prevp.push(interx);
|
|
67
|
-
prevp.push(below);
|
|
68
|
-
for (m = 2; m < ps; ++m)
|
|
69
|
-
prevp.push(origpoints[i + m]);
|
|
70
|
-
|
|
71
|
-
p.push(null); // start new segment
|
|
72
|
-
p.push(null);
|
|
73
|
-
for (m = 2; m < ps; ++m)
|
|
74
|
-
p.push(origpoints[i + m]);
|
|
75
|
-
p.push(interx);
|
|
76
|
-
p.push(below);
|
|
77
|
-
for (m = 2; m < ps; ++m)
|
|
78
|
-
p.push(origpoints[i + m]);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
p.push(x);
|
|
82
|
-
p.push(y);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
datapoints.points = newpoints;
|
|
86
|
-
thresholded.datapoints.points = threspoints;
|
|
87
|
-
|
|
88
|
-
if (thresholded.datapoints.points.length > 0)
|
|
89
|
-
plot.getData().push(thresholded);
|
|
90
|
-
|
|
91
|
-
// FIXME: there are probably some edge cases left in bars
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
plot.hooks.processDatapoints.push(thresholdData);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
$.plot.plugins.push({
|
|
98
|
-
init: init,
|
|
99
|
-
options: options,
|
|
100
|
-
name: 'threshold',
|
|
101
|
-
version: '1.0'
|
|
102
|
-
});
|
|
103
|
-
})(jQuery);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(B){var A={series:{threshold:null}};function C(D){function E(L,S,M){if(!S.threshold){return }var F=M.pointsize,I,O,N,G,K,H=B.extend({},S);H.datapoints={points:[],pointsize:F};H.label=null;H.color=S.threshold.color;H.threshold=null;H.originSeries=S;H.data=[];var P=S.threshold.below,Q=M.points,R=S.lines.show;threspoints=[];newpoints=[];for(I=0;I<Q.length;I+=F){O=Q[I];N=Q[I+1];K=G;if(N<P){G=threspoints}else{G=newpoints}if(R&&K!=G&&O!=null&&I>0&&Q[I-F]!=null){var J=(O-Q[I-F])/(N-Q[I-F+1])*(P-N)+O;K.push(J);K.push(P);for(m=2;m<F;++m){K.push(Q[I+m])}G.push(null);G.push(null);for(m=2;m<F;++m){G.push(Q[I+m])}G.push(J);G.push(P);for(m=2;m<F;++m){G.push(Q[I+m])}}G.push(O);G.push(N)}M.points=newpoints;H.datapoints.points=threspoints;if(H.datapoints.points.length>0){L.getData().push(H)}}D.hooks.processDatapoints.push(E)}B.plot.plugins.push({init:C,options:A,name:"threshold",version:"1.0"})})(jQuery);
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
//var chartArea = [[0.1, 0.1, 0.95, 0.9], [0.2, 0.1, 0.95, 0.9],
|
|
2
|
-
// [0.1, 0.1, 0.8, 0.9], [0.1, 0.25, 0.9, 0.9], [0.1, 0.1, 0.9, 0.8]];
|
|
3
|
-
//var legendArea = [[0.0, 0.0, 0.0, 0.0], [0.005, 0.1, 0.125, 0.5],
|
|
4
|
-
// [0.875, 0.1, 0.995, 0.5], [0.2, 0.1, 0.8, 0.2], [0.2, 0.9, 0.8, 0.995]];
|
|
5
|
-
//var fills = [['lightblue', 'url(#fadeBlue)'], ['pink', 'url(#fadeRed)'],
|
|
6
|
-
// ['lightgreen', 'url(#fadeGreen)']];
|
|
7
|
-
function buildGraph(options) {
|
|
8
|
-
var settings = $.extend({
|
|
9
|
-
svg_container: "",
|
|
10
|
-
graph_url: "test",
|
|
11
|
-
id: 1,
|
|
12
|
-
dataType: "summary",
|
|
13
|
-
chartType: "line", //tell svg plugin if we want line, bar, or pie graphs
|
|
14
|
-
chartTitle: "",
|
|
15
|
-
timeframe: "7 days",
|
|
16
|
-
xTitle: "",
|
|
17
|
-
yTitle: ""
|
|
18
|
-
},options||{});
|
|
19
|
-
var svg = svgManager.getSVGFor(settings.svg_container);
|
|
20
|
-
var params = {
|
|
21
|
-
id:settings.id, //id of the node to get graph data for
|
|
22
|
-
type:settings.dataType, /*this will be what we pass in to tell
|
|
23
|
-
*the data api what kind of data to return*/
|
|
24
|
-
timeframe:settings.timeframe, //what time period do we want back from the data api?
|
|
25
|
-
isJSON:true}; /*while this is not used right now, there is the chance we will want to
|
|
26
|
-
call the data api before rendering the page, this is a flag to allow that*/
|
|
27
|
-
$.getJSON(settings.graph_url, params, function(response) {
|
|
28
|
-
var defs = svg.defs();
|
|
29
|
-
var legendPos = 1;
|
|
30
|
-
/*
|
|
31
|
-
* Everything else that is commented out from here down is experimental stuff that we shouldn't need right away,
|
|
32
|
-
* but may want to play with as we make this look nicer.
|
|
33
|
-
*/
|
|
34
|
-
//svg.linearGradient(defs, 'fadeBlue', [[0, 'lightblue'], [1, 'blue']]);
|
|
35
|
-
//svg.linearGradient(defs, 'fadeRed', [[0, 'pink'], [1, 'red']]);
|
|
36
|
-
//svg.linearGradient(defs, 'fadeGreen', [[0, 'lightgreen'], [1, 'green']]);
|
|
37
|
-
svg.graph.noDraw().title(settings.chartTitle,10).
|
|
38
|
-
chartFormat('lightyellow', 'gray').
|
|
39
|
-
//gridlines({stroke: 'gray', stroke_dasharray: '2,2'}, 'gray').
|
|
40
|
-
status(setStatus);
|
|
41
|
-
$(response.dataset).each(function(){
|
|
42
|
-
svg.graph.noDraw().
|
|
43
|
-
addSeries(this.name, this.values, this.fill, this.stroke, this.strokeWidth);
|
|
44
|
-
|
|
45
|
-
});
|
|
46
|
-
svg.graph.xAxis.title(settings.xTitle).scale(0, 3);
|
|
47
|
-
if (response.timepoints.length > 0){
|
|
48
|
-
svg.graph.xAxis.ticks(1, 0).labels(response.timepoints);
|
|
49
|
-
}
|
|
50
|
-
svg.graph.yAxis.title(settings.yTitle).scale(-5, 105).ticks(10, 5);
|
|
51
|
-
//svg.graph.legend.settings({fill: 'lightgoldenrodyellow', stroke: 'gray'});
|
|
52
|
-
svg.graph.legend.show(legendPos).area([0.0, 0.0, 0.0, 0.0]);
|
|
53
|
-
//for (var i = 0; i < 3; i++) {
|
|
54
|
-
// svg.graph.series()[i].format((fills[i])[0]);
|
|
55
|
-
//}
|
|
56
|
-
svg.graph.noDraw().//chartArea(chartArea[legendPos]).
|
|
57
|
-
chartType(settings.chartType, {explode: [2], explodeDist: 10}).redraw();
|
|
58
|
-
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
/*callback function for when you mouse over the data.
|
|
62
|
-
*I hope for this eventually to highlight the datapoint and show any additional information
|
|
63
|
-
*the design may call for.
|
|
64
|
-
**/
|
|
65
|
-
function setStatus(value) {
|
|
66
|
-
//alert(value);
|
|
67
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/* http://home.iprimus.com.au/kbwood/jquery/svg.html
|
|
2
|
-
SVG for jQuery v1.0.0.
|
|
3
|
-
Written by Keith Wood (kbwood@iprimus.com.au) August 2007.
|
|
4
|
-
Under the Creative Commons Licence http://creativecommons.org/licenses/by/3.0/
|
|
5
|
-
Share or Remix it but please Attribute the author. */
|
|
6
|
-
|
|
7
|
-
svg\:svg { display: none; }
|
|
8
|
-
|
|
9
|
-
.svg_error { color: red; font-weight: bold; }
|