{Object.keys(data).map((k) => (
diff --git a/pkg/ui/react-app/src/thanos/pages/blocks/__testdata__/testdata.ts b/pkg/ui/react-app/src/thanos/pages/blocks/__testdata__/testdata.ts
index 3fb5229321..91cb6ceeff 100644
--- a/pkg/ui/react-app/src/thanos/pages/blocks/__testdata__/testdata.ts
+++ b/pkg/ui/react-app/src/thanos/pages/blocks/__testdata__/testdata.ts
@@ -85,6 +85,23 @@ export const sampleAPIResponse: { status: string; data: BlockListProps } = {
monitor: 'prometheus_one',
},
source: 'sidecar',
+ files: [
+ {
+ rel_path: 'chunks/000001',
+ size_bytes: 536870882,
+ },
+ {
+ rel_path: 'chunks/000002',
+ size_bytes: 143670,
+ },
+ {
+ rel_path: 'index',
+ size_bytes: 257574,
+ },
+ {
+ rel_path: 'meta.json',
+ },
+ ],
},
ulid: '01EEG1J4JXZGQMZA9TQ3DHMTET',
version: 1,
@@ -147,6 +164,23 @@ export const sampleAPIResponse: { status: string; data: BlockListProps } = {
monitor: 'prometheus_one',
},
source: 'compactor',
+ files: [
+ {
+ rel_path: 'chunks/000001',
+ size_bytes: 536870882,
+ },
+ {
+ rel_path: 'chunks/000002',
+ size_bytes: 143670,
+ },
+ {
+ rel_path: 'index',
+ size_bytes: 257574,
+ },
+ {
+ rel_path: 'meta.json',
+ },
+ ],
},
ulid: '01EEEXQJ71TT74ZTQZN50CEETE',
version: 1,
@@ -195,6 +229,23 @@ export const sampleAPIResponse: { status: string; data: BlockListProps } = {
monitor: 'prometheus_one',
},
source: 'sidecar',
+ files: [
+ {
+ rel_path: 'chunks/000001',
+ size_bytes: 536870882,
+ },
+ {
+ rel_path: 'chunks/000002',
+ size_bytes: 143670,
+ },
+ {
+ rel_path: 'index',
+ size_bytes: 257574,
+ },
+ {
+ rel_path: 'meta.json',
+ },
+ ],
},
ulid: '01EEAQ4FPMZXKJE0EXE5P0YCWP',
version: 1,
@@ -219,6 +270,23 @@ export const sampleAPIResponse: { status: string; data: BlockListProps } = {
monitor: 'prometheus_one',
},
source: 'sidecar',
+ files: [
+ {
+ rel_path: 'chunks/000001',
+ size_bytes: 536870882,
+ },
+ {
+ rel_path: 'chunks/000002',
+ size_bytes: 143670,
+ },
+ {
+ rel_path: 'index',
+ size_bytes: 257574,
+ },
+ {
+ rel_path: 'meta.json',
+ },
+ ],
},
ulid: '01EEF8AGCHTPJ1MZ8KH0SEJZ4E',
version: 1,
@@ -291,6 +359,23 @@ export const sampleAPIResponse: { status: string; data: BlockListProps } = {
monitor: 'prometheus_one',
},
source: 'sidecar',
+ files: [
+ {
+ rel_path: 'chunks/000001',
+ size_bytes: 536870882,
+ },
+ {
+ rel_path: 'chunks/000002',
+ size_bytes: 143670,
+ },
+ {
+ rel_path: 'index',
+ size_bytes: 257574,
+ },
+ {
+ rel_path: 'meta.json',
+ },
+ ],
},
ulid: '01EEF75H09C3TEPJHRHFTCFQD4',
version: 1,
@@ -413,6 +498,23 @@ export const sampleAPIResponse: { status: string; data: BlockListProps } = {
monitor: 'prometheus_one',
},
source: 'compactor',
+ files: [
+ {
+ rel_path: 'chunks/000001',
+ size_bytes: 536870882,
+ },
+ {
+ rel_path: 'chunks/000002',
+ size_bytes: 143670,
+ },
+ {
+ rel_path: 'index',
+ size_bytes: 257574,
+ },
+ {
+ rel_path: 'meta.json',
+ },
+ ],
},
ulid: '01EEB0R6V1EX65QW2B4A2HT0HH',
version: 1,
@@ -511,6 +613,23 @@ export const sampleAPIResponse: { status: string; data: BlockListProps } = {
monitor: 'prometheus_one',
},
source: 'compactor',
+ files: [
+ {
+ rel_path: 'chunks/000001',
+ size_bytes: 536870882,
+ },
+ {
+ rel_path: 'chunks/000002',
+ size_bytes: 143670,
+ },
+ {
+ rel_path: 'index',
+ size_bytes: 257574,
+ },
+ {
+ rel_path: 'meta.json',
+ },
+ ],
},
ulid: '01EEFA63X7DYWPW0AAGX47MY09',
version: 1,
@@ -2058,3 +2177,46 @@ export const sampleAPIResponse: { status: string; data: BlockListProps } = {
},
status: 'success',
};
+
+export const sizeBlock = {
+ ulid: '01FT8X9MJF5G7PFRNGZBYT8SCS',
+ minTime: 1643123700000,
+ maxTime: 1643124000000,
+ stats: {
+ numSamples: 171320,
+ numSeries: 2859,
+ numChunks: 2859,
+ },
+ compaction: {
+ level: 1,
+ sources: ['01FT8X9MJF5G7PFRNGZBYT8SCS'],
+ },
+ version: 1,
+ thanos: {
+ labels: {
+ prometheus: 'prom-2 random:2',
+ },
+ downsample: {
+ resolution: 0,
+ },
+ source: 'sidecar',
+ segment_files: ['000001', '000002'],
+ files: [
+ {
+ rel_path: 'chunks/000001',
+ size_bytes: 536870882,
+ },
+ {
+ rel_path: 'chunks/000002',
+ size_bytes: 143670,
+ },
+ {
+ rel_path: 'index',
+ size_bytes: 257574,
+ },
+ {
+ rel_path: 'meta.json',
+ },
+ ],
+ },
+};
diff --git a/pkg/ui/react-app/src/thanos/pages/blocks/block.ts b/pkg/ui/react-app/src/thanos/pages/blocks/block.ts
index 5b9d3ac4c5..f263c70521 100644
--- a/pkg/ui/react-app/src/thanos/pages/blocks/block.ts
+++ b/pkg/ui/react-app/src/thanos/pages/blocks/block.ts
@@ -21,6 +21,10 @@ export interface Block {
};
labels: LabelSet;
source: string;
+ files?: {
+ rel_path: string;
+ size_bytes?: number;
+ }[];
};
ulid: string;
version: number;
@@ -33,3 +37,9 @@ export interface LabelSet {
export interface BlocksPool {
[key: string]: Block[][];
}
+
+export interface BlockSizeStats {
+ chunkBytes: number;
+ indexBytes: number;
+ totalBytes: number;
+}
diff --git a/pkg/ui/react-app/src/thanos/pages/blocks/helpers.test.tsx b/pkg/ui/react-app/src/thanos/pages/blocks/helpers.test.tsx
index 0a55dd2804..646829d317 100644
--- a/pkg/ui/react-app/src/thanos/pages/blocks/helpers.test.tsx
+++ b/pkg/ui/react-app/src/thanos/pages/blocks/helpers.test.tsx
@@ -1,4 +1,5 @@
-import { sortBlocks, isOverlapping, getFilteredBlockPools } from './helpers';
+import { getBlockSizeStats, getFilteredBlockPools, humanizeBytes, isOverlapping, sortBlocks } from './helpers';
+import { sizeBlock } from './__testdata__/testdata';
// Number of blocks in data: 8.
const overlapCaseData = {
@@ -656,3 +657,48 @@ describe('Filtered block pools', () => {
expect(filteredBlockPoolArray[0].thanos.labels).toEqual(filteredBlocks[0].thanos.labels);
});
});
+
+describe('Block Size Stats', () => {
+ it('should return the index size', () => {
+ expect(getBlockSizeStats(sizeBlock)?.indexBytes).toEqual(257574);
+ });
+ it('should return the summed chunk size', () => {
+ expect(getBlockSizeStats(sizeBlock)?.chunkBytes).toEqual(537014552);
+ });
+ it('should return total summed size', () => {
+ expect(getBlockSizeStats(sizeBlock)?.totalBytes).toEqual(537272126);
+ });
+});
+
+describe('humanizeBytes', () => {
+ it('should return Unknown for undefined', () => {
+ expect(humanizeBytes(undefined)).toEqual('Unknown Bytes');
+ });
+ it('should return Unknown for NaN', () => {
+ expect(humanizeBytes(Number.NaN)).toEqual('Unknown Bytes');
+ });
+ it('should return 0 Bytes', () => {
+ expect(humanizeBytes(0)).toEqual('0 Byte');
+ });
+ it('should return Bytes', () => {
+ expect(humanizeBytes(512)).toEqual('512.00 Bytes');
+ });
+ it('should return Kibibytes', () => {
+ expect(humanizeBytes(Math.pow(2, 10) * 1.5)).toEqual('1.50 KiB');
+ });
+ it('should return Mebibytes', () => {
+ expect(humanizeBytes(Math.pow(2, 20) * 1.5)).toEqual('1.50 MiB');
+ });
+ it('should return Gibibytes', () => {
+ expect(humanizeBytes(Math.pow(2, 30) * 1.5)).toEqual('1.50 GiB');
+ });
+ it('should return Tebibytes', () => {
+ expect(humanizeBytes(Math.pow(2, 40) * 1.5)).toEqual('1.50 TiB');
+ });
+ it('should return Pebibytes', () => {
+ expect(humanizeBytes(Math.pow(2, 50) * 1.5)).toEqual('1.50 PiB');
+ });
+ it('should still return Pebibytes for bigger units', () => {
+ expect(humanizeBytes(Math.pow(2, 60) * 2)).toEqual('2048.00 PiB');
+ });
+});
diff --git a/pkg/ui/react-app/src/thanos/pages/blocks/helpers.ts b/pkg/ui/react-app/src/thanos/pages/blocks/helpers.ts
index 3320cc71a7..76253e4e96 100644
--- a/pkg/ui/react-app/src/thanos/pages/blocks/helpers.ts
+++ b/pkg/ui/react-app/src/thanos/pages/blocks/helpers.ts
@@ -1,4 +1,4 @@
-import { LabelSet, Block, BlocksPool } from './block';
+import { Block, BlockSizeStats, BlocksPool, LabelSet } from './block';
import { Fuzzy, FuzzyResult } from '@nexucis/fuzzy';
const stringify = (map: LabelSet): string => {
@@ -164,3 +164,54 @@ export const getFilteredBlockPools = (
});
return newblockPools;
};
+
+export const getBlockSizeStats = (block?: Block): BlockSizeStats | undefined => {
+ if (!block || !block.thanos.files) return undefined;
+
+ const sizeStats: BlockSizeStats = {
+ chunkBytes: 0,
+ indexBytes: 0,
+ totalBytes: 0,
+ };
+
+ block?.thanos.files?.forEach((f) => {
+ if (f.rel_path === 'index') {
+ sizeStats.indexBytes += f.size_bytes || 0;
+ } else if (f.rel_path.startsWith('chunks/')) {
+ sizeStats.chunkBytes += f.size_bytes || 0;
+ }
+ });
+
+ sizeStats.totalBytes = sizeStats.indexBytes + sizeStats.chunkBytes;
+
+ return sizeStats;
+};
+
+export const sumBlockSizeStats = (bp: BlocksPool, compactionLevel: number): BlockSizeStats => {
+ const poolSizeStats: BlockSizeStats = { chunkBytes: 0, indexBytes: 0, totalBytes: 0 };
+
+ Object.values(bp).forEach((rows) => {
+ rows.forEach((row) => {
+ getBlocksByCompactionLevel(row, compactionLevel).forEach((block) => {
+ const blockStats = getBlockSizeStats(block);
+ if (blockStats) {
+ poolSizeStats.chunkBytes += blockStats.chunkBytes;
+ poolSizeStats.indexBytes += blockStats.indexBytes;
+ poolSizeStats.totalBytes += blockStats.totalBytes;
+ }
+ });
+ });
+ });
+
+ return poolSizeStats;
+};
+
+export const humanizeBytes = (bytes?: number): string => {
+ if (bytes === undefined || Number.isNaN(bytes)) return 'Unknown Bytes';
+
+ const units = ['Bytes', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB'];
+ if (bytes === 0) return '0 Byte';
+
+ const unitIndex = Math.min(Math.floor(Math.log(bytes) / Math.log(1024)), units.length - 1);
+ return `${(bytes / Math.pow(1024, unitIndex)).toFixed(2)} ${units[unitIndex]}`;
+};
diff --git a/pkg/ui/static/react/asset-manifest.json b/pkg/ui/static/react/asset-manifest.json
index fbc0c9240b..2bfb050954 100644
--- a/pkg/ui/static/react/asset-manifest.json
+++ b/pkg/ui/static/react/asset-manifest.json
@@ -1,15 +1,15 @@
{
"files": {
"main.css": "./static/css/main.5a4981c4.css",
- "main.js": "./static/js/main.00501579.js",
+ "main.js": "./static/js/main.f9e9438f.js",
"static/media/codicon.ttf": "./static/media/codicon.b3726f0165bf67ac6849.ttf",
"index.html": "./index.html",
"static/media/index.cjs": "./static/media/index.cd351d7c31d0d3fccf96.cjs",
"main.5a4981c4.css.map": "./static/css/main.5a4981c4.css.map",
- "main.00501579.js.map": "./static/js/main.00501579.js.map"
+ "main.f9e9438f.js.map": "./static/js/main.f9e9438f.js.map"
},
"entrypoints": [
"static/css/main.5a4981c4.css",
- "static/js/main.00501579.js"
+ "static/js/main.f9e9438f.js"
]
}
\ No newline at end of file
diff --git a/pkg/ui/static/react/index.html b/pkg/ui/static/react/index.html
index 6d7fcd085b..d19de46ea3 100644
--- a/pkg/ui/static/react/index.html
+++ b/pkg/ui/static/react/index.html
@@ -1 +1 @@
-
Thanos | Highly available Prometheus setup
\ No newline at end of file
+
Thanos | Highly available Prometheus setup
\ No newline at end of file
diff --git a/pkg/ui/static/react/static/js/main.00501579.js b/pkg/ui/static/react/static/js/main.f9e9438f.js
similarity index 90%
rename from pkg/ui/static/react/static/js/main.00501579.js
rename to pkg/ui/static/react/static/js/main.f9e9438f.js
index e4b5e27930..15e2859aef 100644
--- a/pkg/ui/static/react/static/js/main.00501579.js
+++ b/pkg/ui/static/react/static/js/main.f9e9438f.js
@@ -1,3 +1,3 @@
-/*! For license information please see main.00501579.js.LICENSE.txt */
-!function(){var e={7228:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n
=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw a}}}},e.exports.__esModule=!0,e.exports.default=e.exports},9842:function(e,t,n){var r=n(9754),i=n(7067),o=n(8585);e.exports=function(e){var t=i();return function(){var n,i=r(e);if(t){var a=r(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return o(this,n)}},e.exports.__esModule=!0,e.exports.default=e.exports},9713:function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},6525:function(e,t,n){var r=n(8331);function i(){return"undefined"!==typeof Reflect&&Reflect.get?(e.exports=i=Reflect.get,e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=i=function(e,t,n){var i=r(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},e.exports.__esModule=!0,e.exports.default=e.exports),i.apply(this,arguments)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},9754:function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},2205:function(e,t,n){var r=n(9489);e.exports=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},5318:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},430:function(e){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.__esModule=!0,e.exports.default=e.exports},7067:function(e){e.exports=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.__esModule=!0,e.exports.default=e.exports},6860:function(e){e.exports=function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},3884:function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(c){s=!0,i=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}},e.exports.__esModule=!0,e.exports.default=e.exports},521:function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},8206:function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},1109:function(e,t,n){var r=n(9713);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},e.exports.__esModule=!0,e.exports.default=e.exports},7316:function(e){e.exports=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i},e.exports.__esModule=!0,e.exports.default=e.exports},8585:function(e,t,n){var r=n(8).default,i=n(1506);e.exports=function(e,t){if(t&&("object"===r(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports},9489:function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},3038:function(e,t,n){var r=n(2858),i=n(3884),o=n(379),a=n(521);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},8331:function(e,t,n){var r=n(9754);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=r(e)););return e},e.exports.__esModule=!0,e.exports.default=e.exports},319:function(e,t,n){var r=n(3646),i=n(6860),o=n(379),a=n(8206);e.exports=function(e){return r(e)||i(e)||o(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},8:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},379:function(e,t,n){var r=n(7228);e.exports=function(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},5957:function(e,t,n){var r=n(9754),i=n(9489),o=n(430),a=n(9100);function s(t){var n="function"===typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!o(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return a(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,s(t)}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},7757:function(e,t,n){e.exports=n(9727)},8825:function(){window.jQuery.plot.plugins.push({init:function(e){var t={x:-1,y:-1,locked:!1};function n(){t.locked||-1!=t.x&&(t.x=-1,e.triggerRedrawOverlay())}function r(n){if(!t.locked)if(e.getSelection&&e.getSelection())t.x=-1;else{var r=e.offset();t.x=Math.max(0,Math.min(n.pageX-r.left,e.width())),t.y=Math.max(0,Math.min(n.pageY-r.top,e.height())),e.triggerRedrawOverlay()}}e.setCrosshair=function(n){if(n){var r=e.p2c(n);t.x=Math.max(0,Math.min(r.left,e.width())),t.y=Math.max(0,Math.min(r.top,e.height()))}else t.x=-1;e.triggerRedrawOverlay()},e.clearCrosshair=e.setCrosshair,e.lockCrosshair=function(n){n&&e.setCrosshair(n),t.locked=!0},e.unlockCrosshair=function(){t.locked=!1},e.hooks.bindEvents.push((function(e,t){e.getOptions().crosshair.mode&&(t.mouseout(n),t.mousemove(r))})),e.hooks.drawOverlay.push((function(e,n){var r=e.getOptions().crosshair;if(r.mode){var i=e.getPlotOffset();if(n.save(),n.translate(i.left,i.top),-1!=t.x){var o=e.getOptions().crosshair.lineWidth%2?.5:0;if(n.strokeStyle=r.color,n.lineWidth=r.lineWidth,n.lineJoin="round",n.beginPath(),-1!=r.mode.indexOf("x")){var a=Math.floor(t.x)+o;n.moveTo(a,0),n.lineTo(a,e.height())}if(-1!=r.mode.indexOf("y")){var s=Math.floor(t.y)+o;n.moveTo(0,s),n.lineTo(e.width(),s)}n.stroke()}n.restore()}})),e.hooks.shutdown.push((function(e,t){t.unbind("mouseout",n),t.unbind("mousemove",r)}))},options:{crosshair:{mode:null,color:"rgba(170, 0, 0, 0.80)",lineWidth:1}},name:"crosshair",version:"1.0"})},7220:function(){!function(e){e.color={},e.color.make=function(t,n,r,i){var o={};return o.r=t||0,o.g=n||0,o.b=r||0,o.a=null!=i?i:1,o.add=function(e,t){for(var n=0;n=1?"rgb("+[o.r,o.g,o.b].join(",")+")":"rgba("+[o.r,o.g,o.b,o.a].join(",")+")"},o.normalize=function(){function e(e,t,n){return tn?n:t}return o.r=e(0,parseInt(o.r),255),o.g=e(0,parseInt(o.g),255),o.b=e(0,parseInt(o.b),255),o.a=e(0,o.a,1),o},o.clone=function(){return e.color.make(o.r,o.b,o.g,o.a)},o.normalize()},e.color.extract=function(t,n){var r;do{if(""!=(r=t.css(n).toLowerCase())&&"transparent"!=r)break;t=t.parent()}while(t.length&&!e.nodeName(t.get(0),"body"));return"rgba(0, 0, 0, 0)"==r&&(r="transparent"),e.color.parse(r)},e.color.parse=function(n){var r,i=e.color.make;if(r=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(n))return i(parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10));if(r=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(n))return i(parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10),parseFloat(r[4]));if(r=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(n))return i(2.55*parseFloat(r[1]),2.55*parseFloat(r[2]),2.55*parseFloat(r[3]));if(r=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(n))return i(2.55*parseFloat(r[1]),2.55*parseFloat(r[2]),2.55*parseFloat(r[3]),parseFloat(r[4]));if(r=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(n))return i(parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16));if(r=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(n))return i(parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16));var o=e.trim(n).toLowerCase();return"transparent"==o?i(255,255,255,0):i((r=t[o]||[0,0,0])[0],r[1],r[2])};var t={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}}(window.jQuery),function(e){var t=Object.prototype.hasOwnProperty;function n(t,n){var r=n.children("."+t)[0];if(null==r&&((r=document.createElement("canvas")).className=t,e(r).css({direction:"ltr",position:"absolute",left:0,top:0}).appendTo(n),!r.getContext)){if(!window.G_vmlCanvasManager)throw new Error("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.");r=window.G_vmlCanvasManager.initElement(r)}this.element=r;var i=this.context=r.getContext("2d"),o=window.devicePixelRatio||1,a=i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1;this.pixelRatio=o/a,this.resize(n.width(),n.height()),this.textContainer=null,this.text={},this._textCache={},this._textSizeCache=window.flotTextSizeCache=window.flotTextSizeCache||{}}function r(t,r,i,o){var a=[],s={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:!0,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:.85,sorted:null},xaxis:{show:null,position:"bottom",mode:null,font:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null},yaxis:{autoscaleMargin:.02,position:"left"},xaxes:[],yaxes:[],series:{points:{show:!1,radius:3,lineWidth:2,fill:!0,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:2,fill:!1,fillColor:null,steps:!1},bars:{show:!1,lineWidth:2,barWidth:1,fill:!0,fillColor:null,align:"left",horizontal:!1,zero:!0},shadowSize:3,highlightColor:null},grid:{show:!0,aboveData:!1,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,margin:0,labelMargin:5,eventSectionHeight:0,axisMargin:8,borderWidth:2,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:!1,hoverable:!1,autoHighlight:!0,mouseActiveRadius:10},interaction:{redrawOverlayInterval:1e3/60},hooks:{}},c=null,l=null,u=null,f=null,d=null,h=[],p=[],m={left:0,right:0,top:0,bottom:0},v=0,g=0,y={processOptions:[],processRawData:[],processDatapoints:[],processOffset:[],processRange:[],drawBackground:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},b=this;function M(e,t){t=[b].concat(t);for(var n=0;nr&&(r=i))}n<=r&&(n=r+1);var o,c=[],l=s.colors,u=l.length,f=0;for(t=0;t=0?f<.5?-f-.2:0:-f),c[t]=o.scale("rgb",1+f);var d,m=0;for(t=0;te.datamax&&n!=v&&(e.datamax=n)}for(e.each(A(),(function(e,t){t.datamin=p,t.datamax=m,t.used=!1})),t=0;t0&&(!x||null!=s[r-c])){for(i=0;iT&&(T=l)),u.y&&(lS&&(S=l)));if(o.bars.show){var _;switch(o.bars.align){case"left":_=0;break;case"right":_=-o.bars.barWidth;break;default:_=-o.bars.barWidth/2}o.bars.horizontal?(O+=_,S+=_+o.bars.barWidth):(k+=_,T+=_+o.bars.barWidth)}g(o.xaxis,k,T),g(o.yaxis,O,S)}e.each(A(),(function(e,t){t.datamin==p&&(t.datamin=null),t.datamax==m&&(t.datamax=null)}))}()}function x(e,t){var n=e[t+"axis"];return"object"==typeof n&&(n=n.n),"number"!=typeof n&&(n=1),n}function A(){return e.grep(h.concat(p),(function(e){return e}))}function k(e){var t,n,r={};for(t=0;t=0&&(n=0),null==t.max&&(r+=i*s)>0&&null!=e.datamax&&e.datamax<=0&&(r=0))}e.min=n,e.max=r}(t)})),M(y.processRange,[]),o)&&function(){n=e.grep(i,(function(e){return e.show||e.reserveSpace}));var t=!1;for(r=0;r<2&&(e.each(n,(function(e,n){C(n),E(n),t=N(n,n.ticks)||t,S(n)})),t&&y.processRange.length>0);r++)M(y.processRange,[]),t=!1;for(r=n.length-1;r>=0;--r)_(n[r]);!function(){var t,n=s.grid.minBorderMargin;if(null==n)for(n=0,t=0;tt.max||("x"==t.direction?(o="center",r=m.left+t.p2c(n.v),"bottom"==t.position?i=s.top+s.padding+s.eventSectionPadding:(i=s.top+s.height-s.padding,a="bottom")):(a="middle",i=m.top+t.p2c(n.v),"left"==t.position?(r=s.left+s.width-s.padding,o="right"):r=s.left+s.padding),c.addText(u,r,i,n.label,f,null,null,o,a))})),function(){null!=s.legend.container?e(s.legend.container).html(""):t.find(".legend").remove();if(!s.legend.show)return;for(var n,r,i=[],o=[],c=!1,l=s.legend.labelFormatter,u=0;u"),i.push(""),c=!0),i.push(' | '+d.label+" | ")}c&&i.push("
");if(0==i.length)return;var h='";if(null!=s.legend.container)e(s.legend.container).html(h);else{var p="",v=s.legend.position,g=s.legend.margin;null==g[0]&&(g=[g,g]),"n"==v.charAt(0)?p+="top:"+(g[1]+m.top)+"px;":"s"==v.charAt(0)&&(p+="bottom:"+(g[1]+m.bottom)+"px;"),"e"==v.charAt(1)?p+="right:"+(g[0]+m.right)+"px;":"w"==v.charAt(1)&&(p+="left:"+(g[0]+m.left)+"px;");var y=e(''+h.replace('style="','style="position:absolute;'+p+";")+"
").appendTo(t);if(0!=s.legend.backgroundOpacity){var b=s.legend.backgroundColor;null==b&&((b=(b=s.grid.backgroundColor)&&"string"==typeof b?e.color.parse(b):e.color.extract(y,"background-color")).a=1,b=b.toString());var M=y.children();e('
').prependTo(y).css("opacity",s.legend.backgroundOpacity)}}}()}function C(t){var n,r=t.options;n="number"==typeof r.ticks&&r.ticks>0?r.ticks:.3*Math.sqrt("x"==t.direction?c.width:c.height);var i=(t.max-t.min)/n,o=-Math.floor(Math.log(i)/Math.LN10),a=r.tickDecimals;null!=a&&o>a&&(o=a);var s,l=Math.pow(10,-o),u=i/l;if(u<1.5?s=1:u<3?(s=2,u>2.25&&(null==a||o+1<=a)&&(s=2.5,++o)):s=u<7.5?5:10,s*=l,null!=r.minTickSize&&s0&&(null==r.min&&(t.min=Math.min(t.min,d[0])),null==r.max&&d.length>1&&(t.max=Math.max(t.max,d[d.length-1]))),t.tickGenerator=function(e){var t,n,r=[];for(n=0;n1&&/\..*0$/.test((v[1]-v[0]).toFixed(m))||(t.tickDecimals=m)}}}}function E(t){var n,r,i=t.options.ticks,o=[];for(null==i||"number"==typeof i&&i>0?o=t.tickGenerator(t):i&&(o=e.isFunction(i)?i(t):i),t.ticks=[],n=0;n1&&(a=s[1])):r=+s,null==a&&(a=t.tickFormatter(r,t)),isNaN(r)||t.ticks.push({v:r,label:a})}}function N(e,t){var n=!1;return e.options.autoscaleMargin&&t.length>0&&(null==e.options.min&&(e.min=Math.min(e.min,t[0].v),n=!0),null==e.options.max&&t.length>1&&(e.max=Math.max(e.max,t[t.length-1].v),n=!0)),n}function L(){c.clear(),M(y.drawBackground,[f]);var e=s.grid;e.show&&e.backgroundColor&&(f.save(),f.translate(m.left,m.top),f.fillStyle=Z(s.grid.backgroundColor,g,0,"rgba(255, 255, 255, 0)"),f.fillRect(0,0,v,g),f.restore()),e.show&&!e.aboveData&&P();for(var t=0;ti){var c=r;r=i,i=c}return{from:r,to:i,axis:n}}function P(){var t,n,r,i;f.save(),f.translate(m.left,m.top);var o=s.grid.markings;if(o)for(e.isFunction(o)&&((n=b.getAxes()).xmin=n.xaxis.min,n.xmax=n.xaxis.max,n.ymin=n.yaxis.min,n.ymax=n.yaxis.max,o=o(n)),t=0;tc.axis.max||l.tol.axis.max)){c.from=Math.max(c.from,c.axis.min),c.to=Math.min(c.to,c.axis.max),l.from=Math.max(l.from,l.axis.min),l.to=Math.min(l.to,l.axis.max);var u=c.from===c.to,d=l.from===l.to;if(!u||!d)if(c.from=Math.floor(c.axis.p2c(c.from)),c.to=Math.floor(c.axis.p2c(c.to)),l.from=Math.floor(l.axis.p2c(l.from)),l.to=Math.floor(l.axis.p2c(l.to)),u||d){var h=a.lineWidth||s.grid.markingsLineWidth,p=h%2?.5:0;f.beginPath(),f.strokeStyle=a.color||s.grid.markingsColor,f.lineWidth=h,u?(f.moveTo(c.to+p,l.from),f.lineTo(c.to+p,l.to)):(f.moveTo(c.from,l.to+p),f.lineTo(c.to,l.to+p)),f.stroke()}else f.fillStyle=a.color||s.grid.markingsColor,f.fillRect(c.from,l.to,c.to-c.from,l.from-l.to)}}n=A(),r=s.grid.borderWidth;for(var y=0;yO.max||"full"==S&&("object"==typeof r&&r[O.position]>0||r>0)&&(_==O.min||_==O.max)||("x"==O.direction?(M=O.p2c(_),k="full"==S?-g:S,"top"==O.position&&(k=-k)):(w=O.p2c(_),x="full"==S?-v:S,"left"==O.position&&(x=-x)),1==f.lineWidth&&("x"==O.direction?M=Math.floor(M)+.5:w=Math.floor(w)+.5),f.moveTo(M,w),f.lineTo(M+x,w+k))}f.stroke()}}r&&(i=s.grid.borderColor,"object"==typeof r||"object"==typeof i?("object"!==typeof r&&(r={top:r,right:r,bottom:r,left:r}),"object"!==typeof i&&(i={top:i,right:i,bottom:i,left:i}),r.top>0&&(f.strokeStyle=i.top,f.lineWidth=r.top,f.beginPath(),f.moveTo(0-r.left,0-r.top/2),f.lineTo(v,0-r.top/2),f.stroke()),r.right>0&&(f.strokeStyle=i.right,f.lineWidth=r.right,f.beginPath(),f.moveTo(v+r.right/2,0-r.top),f.lineTo(v+r.right/2,g),f.stroke()),r.bottom>0&&(f.strokeStyle=i.bottom,f.lineWidth=r.bottom,f.beginPath(),f.moveTo(v+r.right,g+r.bottom/2),f.lineTo(0,g+r.bottom/2),f.stroke()),r.left>0&&(f.strokeStyle=i.left,f.lineWidth=r.left,f.beginPath(),f.moveTo(0-r.left/2,g+r.bottom),f.lineTo(0-r.left/2,0),f.stroke())):(f.lineWidth=r,f.strokeStyle=s.grid.borderColor,f.strokeRect(-r/2,-r/2,v+r,g+r))),f.restore()}function q(e){e.lines.show&&(function(e){function t(e,t,n,r,i){var o=e.points,a=e.pointsize,s=null,c=null;f.beginPath();for(var l=a;l=p&&d>i.max){if(p>i.max)continue;u=(i.max-d)/(p-d)*(h-u)+u,d=i.max}else if(p>=d&&p>i.max){if(d>i.max)continue;h=(i.max-d)/(p-d)*(h-u)+u,p=i.max}if(u<=h&&u=h&&u>r.max){if(h>r.max)continue;d=(r.max-u)/(h-u)*(p-d)+d,u=r.max}else if(h>=u&&h>r.max){if(u>r.max)continue;p=(r.max-u)/(h-u)*(p-d)+d,h=r.max}u==s&&d==c||f.moveTo(r.p2c(u)+t,i.p2c(d)+n),s=h,c=p,f.lineTo(r.p2c(h)+t,i.p2c(p)+n)}}f.stroke()}function n(e,t,n){for(var r=e.points,i=e.pointsize,o=Math.min(Math.max(0,n.min),n.max),a=0,s=!1,c=1,l=0,u=0;!(i>0&&a>r.length+i);){var d=r[(a+=i)-i],h=r[a-i+c],p=r[a],m=r[a+c];if(s){if(i>0&&null!=d&&null==p){u=a,i=-i,c=2;continue}if(i<0&&a==l+i){f.fill(),s=!1,c=1,a=l=u+(i=-i);continue}}if(null!=d&&null!=p){if(d<=p&&d=p&&d>t.max){if(p>t.max)continue;h=(t.max-d)/(p-d)*(m-h)+h,d=t.max}else if(p>=d&&p>t.max){if(d>t.max)continue;m=(t.max-d)/(p-d)*(m-h)+h,p=t.max}if(s||(f.beginPath(),f.moveTo(t.p2c(d),n.p2c(o)),s=!0),h>=n.max&&m>=n.max)f.lineTo(t.p2c(d),n.p2c(n.max)),f.lineTo(t.p2c(p),n.p2c(n.max));else if(h<=n.min&&m<=n.min)f.lineTo(t.p2c(d),n.p2c(n.min)),f.lineTo(t.p2c(p),n.p2c(n.min));else{var v=d,g=p;h<=m&&h=n.min?(d=(n.min-h)/(m-h)*(p-d)+d,h=n.min):m<=h&&m=n.min&&(p=(n.min-h)/(m-h)*(p-d)+d,m=n.min),h>=m&&h>n.max&&m<=n.max?(d=(n.max-h)/(m-h)*(p-d)+d,h=n.max):m>=h&&m>n.max&&h<=n.max&&(p=(n.max-h)/(m-h)*(p-d)+d,m=n.max),d!=v&&f.lineTo(t.p2c(v),n.p2c(h)),f.lineTo(t.p2c(d),n.p2c(h)),f.lineTo(t.p2c(p),n.p2c(m)),p!=g&&(f.lineTo(t.p2c(p),n.p2c(m)),f.lineTo(t.p2c(g),n.p2c(m)))}}}}f.save(),f.translate(m.left,m.top),f.lineJoin="round";var r=e.lines.lineWidth,i=e.shadowSize;if(r>0&&i>0){f.lineWidth=i,f.strokeStyle="rgba(0,0,0,0.1)";var o=Math.PI/18;t(e.datapoints,Math.sin(o)*(r/2+i/2),Math.cos(o)*(r/2+i/2),e.xaxis,e.yaxis),f.lineWidth=i/2,t(e.datapoints,Math.sin(o)*(r/2+i/4),Math.cos(o)*(r/2+i/4),e.xaxis,e.yaxis)}f.lineWidth=r,f.strokeStyle=e.color;var a=W(e.lines,e.color,0,g);a&&(f.fillStyle=a,n(e.datapoints,e.xaxis,e.yaxis));r>0&&t(e.datapoints,0,0,e.xaxis,e.yaxis);f.restore()}(e),e.points.show||e.bars.show||function(e){for(var t=[],n=null,r=null,i=e.datapoints,o=[],a=0;ao.max||ha.max||(f.beginPath(),d=o.p2c(d),h=a.p2c(h)+r,"circle"==s?f.arc(d,h,t,0,i?Math.PI:2*Math.PI,!1):s(f,d,h,t,i),f.closePath(),n&&(f.fillStyle=n,f.fill()),f.stroke())}}f.save(),f.translate(m.left,m.top);var n=e.points.lineWidth,r=e.shadowSize,i=e.points.radius,o=e.points.symbol;if(0==n&&(n=1e-4),n>0&&r>0){var a=r/2;f.lineWidth=a,f.strokeStyle="rgba(0,0,0,0.1)",t(e.datapoints,i,null,a+a/2,!0,e.xaxis,e.yaxis,o),f.strokeStyle="rgba(0,0,0,0.2)",t(e.datapoints,i,null,a/2,!0,e.xaxis,e.yaxis,o)}f.lineWidth=n,f.strokeStyle=e.color,t(e.datapoints,i,W(e.points,e.color),0,!1,e.xaxis,e.yaxis,o),f.restore()}function B(e,t,n,r,i,o,a,s,c,l,u){var f,d,h,p,m,v,g,y,b;l?(y=v=g=!0,m=!1,p=t+r,h=t+i,(d=e)<(f=n)&&(b=d,d=f,f=b,m=!0,v=!1)):(m=v=g=!0,y=!1,f=e+r,d=e+i,(p=t)<(h=n)&&(b=p,p=h,h=b,y=!0,g=!1)),da.max||ps.max||(fa.max&&(d=a.max,v=!1),hs.max&&(p=s.max,g=!1),f=a.p2c(f),h=s.p2c(h),d=a.p2c(d),p=s.p2c(p),o&&(c.fillStyle=o(h,p),c.fillRect(f,p,d-f,h-p)),u>0&&(m||v||g||y)&&(c.beginPath(),c.moveTo(f,h),m?c.lineTo(f,p):c.moveTo(f,p),g?c.lineTo(d,p):c.moveTo(d,p),v?c.lineTo(d,h):c.moveTo(d,h),y?c.lineTo(f,h):c.moveTo(f,h),c.stroke()))}function W(t,n,r,i){var o=t.fill;if(!o)return null;if(t.fillColor)return Z(t.fillColor,r,i,n);var a=e.color.parse(n);return a.a="number"==typeof o?o:.4,a.normalize(),a.toString()}b.setData=w,b.setupGrid=z,b.draw=L,b.getPlaceholder=function(){return t},b.getCanvas=function(){return c.element},b.getPlotOffset=function(){return m},b.width=function(){return v},b.height=function(){return g},b.offset=function(){var e=u.offset();return e.left+=m.left,e.top+=m.top,e},b.getData=function(){return a},b.getAxes=function(){var t={};return e.each(h.concat(p),(function(e,n){n&&(t[n.direction+(1!=n.n?n.n:"")+"axis"]=n)})),t},b.getXAxes=function(){return h},b.getYAxes=function(){return p},b.c2p=k,b.p2c=function(e){var t,n,r,i={};for(t=0;t=0;--r)if(n(a[r])){var f=a[r],d=f.xaxis,h=f.yaxis,p=f.datapoints.points,m=d.c2p(e),v=h.c2p(t),g=c/d.scale,y=c/h.scale;if(o=f.datapoints.pointsize,d.options.inverseTransform&&(g=Number.MAX_VALUE),h.options.inverseTransform&&(y=Number.MAX_VALUE),f.lines.show||f.points.show)for(i=0;ig||b-m<-g||M-v>y||M-v<-y)){var w=Math.abs(d.p2c(b)-e),x=Math.abs(h.p2c(M)-t),A=w*w+x*x;A=Math.min(T,b)&&v>=M+k&&v<=M+O:m>=b+k&&m<=b+O&&v>=Math.min(T,M)&&v<=Math.max(T,M))&&(u=[r,i/o])}}}return u?(r=u[0],i=u[1],o=a[r].datapoints.pointsize,{datapoint:a[r].datapoints.points.slice(i*o,(i+1)*o),dataIndex:i,series:a[r],seriesIndex:r}):null}(o,c,r);if(f&&(f.pageX=parseInt(f.series.xaxis.p2c(f.datapoint[0])+i.left+m.left,10),f.pageY=parseInt(f.series.yaxis.p2c(f.datapoint[1])+i.top+m.top,10)),s.grid.autoHighlight){for(var d=0;do.max||ia.max)){var c=t.points.radius+t.points.lineWidth/2;d.lineWidth=c,d.strokeStyle=s;var l=1.5*c;r=o.p2c(r),i=a.p2c(i),d.beginPath(),"circle"==t.points.symbol?d.arc(r,i,l,0,2*Math.PI,!1):t.points.symbol(d,r,i,l,!1),d.closePath(),d.stroke()}}function J(t,n){var r,i="string"===typeof t.highlightColor?t.highlightColor:e.color.parse(t.color).scale("a",.5).toString(),o=i;switch(t.bars.align){case"left":r=0;break;case"right":r=-t.bars.barWidth;break;default:r=-t.bars.barWidth/2}d.lineWidth=t.bars.lineWidth,d.strokeStyle=i,B(n[0],n[1],n[2]||0,r,r+t.bars.barWidth,(function(){return o}),t.xaxis,t.yaxis,d,t.bars.horizontal,t.bars.lineWidth)}function Z(t,n,r,i){if("string"==typeof t)return t;for(var o=f.createLinearGradient(0,r,0,n),a=0,s=t.colors.length;a").css({position:"absolute",top:0,left:0,bottom:0,right:0,"font-size":"smaller",color:"#545454"}).insertAfter(this.element)),n=this.text[t]=e("
").addClass(t).css({position:"absolute",top:0,left:0,bottom:0,right:0}).appendTo(this.textContainer)),n},n.prototype.getTextInfo=function(t,n,r,i,o){var a,s,c,l;if(n=""+n,a="object"===typeof r?r.style+" "+r.variant+" "+r.weight+" "+r.size+"px/"+r.lineHeight+"px "+r.family:r,null==(s=this._textCache[t])&&(s=this._textCache[t]={}),null==(c=s[a])&&(c=s[a]={}),null==(l=c[n])){var u=e("
").html(n).css({position:"absolute","max-width":o,top:-9999}).appendTo(this.getTextLayer(t));"object"===typeof r?u.css({font:a,color:r.color}):"string"===typeof r&&u.addClass(r),l=c[n]={element:u,positions:[]};var f=this._textSizeCache[n];f?(l.width=f.width,l.height=f.height):(l.width=u.outerWidth(!0),l.height=u.outerHeight(!0),this._textSizeCache[n]={width:l.width,height:l.height}),u.detach()}return l},n.prototype.addText=function(e,t,n,r,i,o,a,s,c){var l=this.getTextInfo(e,r,i,o,a),u=l.positions;"center"==s?t-=l.width/2:"right"==s&&(t-=l.width),"middle"==c?n-=l.height/2:"bottom"==c&&(n-=l.height);for(var f,d=0;f=u[d];d++)if(f.x==t&&f.y==n)return void(f.active=!0);f={active:!0,rendered:!1,element:u.length?l.element.clone():l.element,x:t,y:n},u.push(f),f.element.css({top:Math.round(n),left:Math.round(t),"text-align":s})},n.prototype.removeText=function(e,n,r,i,o,a){if(null==i){var s=this._textCache[e];if(null!=s)for(var c in s)if(t.call(s,c)){var l=s[c];for(var u in l)if(t.call(l,u))for(var f=l[u].positions,d=0;h=f[d];d++)h.active=!1}}else{var h;for(f=this.getTextInfo(e,i,o,a).positions,d=0;h=f[d];d++)h.x==n&&h.y==r&&(h.active=!1)}},e.plot=function(t,n,i){return new r(e(t),n,i,e.plot.plugins)},e.plot.version="0.8.3",e.plot.plugins=[],e.fn.plot=function(t,n){return this.each((function(){e.plot(this,t,n)}))}}(window.jQuery)},4906:function(){window.jQuery.plot.plugins.push({init:function(e){e.hooks.processDatapoints.push((function(e,t,n){if(null!=t.stack&&!1!==t.stack){var r=function(e,t){for(var n=null,r=0;r