Вход Регистрация
Файл: Main Website Files/assets/js/flot-data.js
Строк: 131
<?php
//Flot Line Chart
$(document).ready(function() {
    
console.log("document ready");
    var 
offset 0;
    
plot();

    function 
plot() {
        var 
sin = [],
            
cos = [];
        for (var 
012+= 0.2) {
            
sin.push([iMath.sin(offset)]);
            
cos.push([iMath.cos(offset)]);
        }

        var 
options = {
            
series: {
                
lines: {
                    
showtrue
                
},
                
points: {
                    
showtrue
                
}
            },
            
grid: {
                
hoverabletrue //IMPORTANT! this is needed for tooltip to work
            
},
            
yaxis: {
                
min: -1.2,
                
max1.2
            
},
            
tooltiptrue,
            
tooltipOpts: {
                
content"'%s' of %x.1 is %y.4",
                
shifts: {
                    
x: -60,
                    
y25
                
}
            }
        };

        var 
plotObj = $.plot($("#flot-line-chart"), [{
                
datasin,
                
label"sin(x)"
            
}, {
                
datacos,
                
label"cos(x)"
            
}],
            
options);
    }
});

//Flot Pie Chart
$(function() {

    var 
data = [{
        
label"Series 0",
        
data1
    
}, {
        
label"Series 1",
        
data3
    
}, {
        
label"Series 2",
        
data9
    
}, {
        
label"Series 3",
        
data20
    
}];

    var 
plotObj = $.plot($("#flot-pie-chart"), data, {
        
series: {
            
pie: {
                
showtrue
            
}
        },
        
grid: {
            
hoverabletrue
        
},
        
tooltiptrue,
        
tooltipOpts: {
            
content"%p.0%, %s"// show percentages, rounding to 2 decimal places
            
shifts: {
                
x20,
                
y0
            
},
            
defaultThemefalse
        
}
    });

});

//Flot Multiple Axes Line Chart
$(function() {
    var 
oilprices = [
        [
116769240000061.05],
        [
116777880000058.32],
        [
116786520000057.35],
        [
116795160000056.31],
        [
116821080000055.55],
        [
116829720000055.64],
        [
116838360000054.02],
        [
116847000000051.88],
        [
116855640000052.99],
        [
116881560000052.99],
        [
116890200000051.21],
        [
116898840000052.24],
        [
116907480000050.48],
        [
116916120000051.99],
        [
116942040000051.13],
        [
116950680000055.04],
        [
116959320000055.37],
        [
116967960000054.23],
        [
116976600000055.42],
        [
117002520000054.01],
        [
117011160000056.97],
        [
117019800000058.14],
        [
117028440000058.14],
        [
117037080000059.02],
        [
117063000000058.74],
        [
117071640000058.88],
        [
117080280000057.71],
        [
117088920000059.71],
        [
117097560000059.89],
        [
117123480000057.81],
        [
117132120000059.06],
        [
117140760000058.00],
        [
117149400000057.99],
        [
117158040000059.39],
        [
117183960000059.39],
        [
117192600000058.07],
        [
117201240000060.07],
        [
117209880000061.14],
        [
117244440000061.39],
        [
117253080000061.46],
        [
117261720000061.79],
        [
117270360000062.00],
        [
117279000000060.07],
        [
117313560000060.69],
        [
117322200000061.82],
        [
117330840000060.05],
        [
117365400000058.91],
        [
117374040000057.93],
        [
117382680000058.16],
        [
117391320000057.55],
        [
117399960000057.11],
        [
117425880000056.59],
        [
117434520000059.61],
        [
117451800000061.69],
        [
117460440000062.28],
        [
117486000000062.91],
        [
117494640000062.93],
        [
117503280000064.03],
        [
117511920000066.03],
        [
117520560000065.87],
        [
117546480000064.64],
        [
117563760000064.38],
        [
117572400000064.28],
        [
117581040000064.28],
        [
117606960000061.51],
        [
117615600000061.89],
        [
117624240000062.01],
        [
117632880000063.85],
        [
117641520000063.63],
        [
117667440000063.61],
        [
117676080000063.10],
        [
117684720000063.13],
        [
117693360000061.83],
        [
117702000000063.38],
        [
117727920000064.58],
        [
117745200000065.84],
        [
117753840000065.06],
        [
117762480000066.46],
        [
117788400000064.40],
        [
117805680000063.68],
        [
117814320000063.19],
        [
117822960000061.93],
        [
117848880000061.47],
        [
117857520000061.55],
        [
117874800000061.81],
        [
117883440000062.37],
        [
117909360000062.46],
        [
117918000000063.17],
        [
117926640000062.55],
        [
117935280000064.94],
        [
117969840000066.27],
        [
117978480000065.50],
        [
117987120000065.77],
        [
117995760000064.18],
        [
118004400000065.20],
        [
118038960000063.15],
        [
118047600000063.49],
        [
118056240000065.08],
        [
118090800000066.30],
        [
118099440000065.96],
        [
118116720000066.93],
        [
118125360000065.98],
        [
118159920000065.35],
        [
118168560000066.26],
        [
118185840000068.00],
        [
118211760000069.09],
        [
118220400000069.10],
        [
118229040000068.19],
        [
118237680000068.19],
        [
118246320000069.14],
        [
118272240000068.19],
        [
118280880000067.77],
        [
118289520000068.97],
        [
118298160000069.57],
        [
118306800000070.68],
        [
118332720000071.09],
        [
118341360000070.92],
        [
118358640000071.81],
        [
118367280000072.81],
        [
118393200000072.19],
        [
118401840000072.56],
        [
118419120000072.50],
        [
118427760000074.15],
        [
118462320000075.05],
        [
118479600000075.92],
        [
118488240000075.57],
        [
118514160000074.89],
        [
118522800000073.56],
        [
118531440000075.57],
        [
118540080000074.95],
        [
118548720000076.83],
        [
118583280000078.21],
        [
118591920000076.53],
        [
118600560000076.86],
        [
118609200000076.00],
        [
118643760000071.59],
        [
118669680000071.47],
        [
118695600000071.62],
        [
118704240000071.00],
        [
118730160000071.98],
        [
118756080000071.12],
        [
118764720000069.47],
        [
118773360000069.26],
        [
118782000000069.83],
        [
118790640000071.09],
        [
118816560000071.73],
        [
118833840000073.36],
        [
118851120000074.04],
        [
118885680000076.30],
        [
118911600000077.49],
        [
118946160000078.23],
        [
118954800000079.91],
        [
118963440000080.09],
        [
118972080000079.10],
        [
118998000000080.57],
        [
119006640000081.93],
        [
119023920000083.32],
        [
119032560000081.62],
        [
119058480000080.95],
        [
119067120000079.53],
        [
119075760000080.30],
        [
119084400000082.88],
        [
119093040000081.66],
        [
119118960000080.24],
        [
119127600000080.05],
        [
119136240000079.94],
        [
119144880000081.44],
        [
119153520000081.22],
        [
119179440000079.02],
        [
119188080000080.26],
        [
119196720000080.30],
        [
119205360000083.08],
        [
119214000000083.69],
        [
119239920000086.13],
        [
119248560000087.61],
        [
119257200000087.40],
        [
119265840000089.47],
        [
119274480000088.60],
        [
119300400000087.56],
        [
119309040000087.56],
        [
119317680000087.10],
        [
119326320000091.86],
        [
119361240000093.53],
        [
119369880000094.53],
        [
119387160000095.93],
        [
119421720000093.98],
        [
119430360000096.37],
        [
119447640000095.46],
        [
119456280000096.32],
        [
119508120000093.43],
        [
119516760000095.10],
        [
119542680000094.64],
        [
119551320000095.10],
        [
119603160000097.70],
        [
119611800000094.42],
        [
119620440000090.62],
        [
119629080000091.01],
        [
119637720000088.71],
        [
119663640000088.32],
        [
119680920000090.23],
        [
119698200000088.28],
        [
119724120000087.86],
        [
119732760000090.02],
        [
119741400000092.25],
        [
119758680000090.63],
        [
119784600000090.63],
        [
119793240000090.49],
        [
119801880000091.24],
        [
119810520000091.06],
        [
119819160000090.49],
        [
119871000000096.62],
        [
119879640000096.00],
        [
119914200000099.62],
        [
119931480000099.18],
        [
119940120000095.09],
        [
119966040000096.33],
        [
119983320000095.67],
        [
120035160000091.90],
        [
120043800000090.84],
        [
120052440000090.13],
        [
120061080000090.57],
        [
120095640000089.21],
        [
120104280000086.99],
        [
120112920000089.85],
        [
120147480000090.99],
        [
120156120000091.64],
        [
120164760000092.33],
        [
120173400000091.75],
        [
120207960000090.02],
        [
120216600000088.41],
        [
120225240000087.14],
        [
120233880000088.11],
        [
120242520000091.77],
        [
120277080000092.78],
        [
120285720000093.27],
        [
120294360000095.46],
        [
120303000000095.46],
        [
1203289200000101.74],
        [
120346200000098.81],
        [
1203894000000100.88],
        [
120406680000099.64],
        [
1204153200000102.59],
        [
1204239600000101.84],
        [
120449880000099.52],
        [
120458520000099.52],
        [
1204671600000104.52],
        [
1204758000000105.47],
        [
1204844400000105.15],
        [
1205103600000108.75],
        [
1205276400000109.92],
        [
1205362800000110.33],
        [
1205449200000110.21],
        [
1205708400000105.68],
        [
1205967600000101.84],
        [
1206313200000100.86],
        [
1206399600000101.22],
        [
1206486000000105.90],
        [
1206572400000107.58],
        [
1206658800000105.62],
        [
1206914400000101.58],
        [
1207000800000100.98],
        [
1207173600000103.83],
        [
1207260000000106.23],
        [
1207605600000108.50],
        [
1207778400000110.11],
        [
1207864800000110.14],
        [
1208210400000113.79],
        [
1208296800000114.93],
        [
1208383200000114.86],
        [
1208728800000117.48],
        [
1208815200000118.30],
        [
1208988000000116.06],
        [
1209074400000118.52],
        [
1209333600000118.75],
        [
1209420000000113.46],
        [
1209592800000112.52],
        [
1210024800000121.84],
        [
1210111200000123.53],
        [
1210197600000123.69],
        [
1210543200000124.23],
        [
1210629600000125.80],
        [
1210716000000126.29],
        [
1211148000000127.05],
        [
1211320800000129.07],
        [
1211493600000132.19],
        [
1211839200000128.85],
        [
1212357600000127.76],
        [
1212703200000138.54],
        [
1212962400000136.80],
        [
1213135200000136.38],
        [
1213308000000134.86],
        [
1213653600000134.01],
        [
1213740000000136.68],
        [
1213912800000135.65],
        [
1214172000000134.62],
        [
1214258400000134.62],
        [
1214344800000134.62],
        [
1214431200000139.64],
        [
1214517600000140.21],
        [
1214776800000140.00],
        [
1214863200000140.97],
        [
1214949600000143.57],
        [
1215036000000145.29],
        [
1215381600000141.37],
        [
1215468000000136.04],
        [
1215727200000146.40],
        [
1215986400000145.18],
        [
1216072800000138.74],
        [
1216159200000134.60],
        [
1216245600000129.29],
        [
1216332000000130.65],
        [
1216677600000127.95],
        [
1216850400000127.95],
        [
1217282400000122.19],
        [
1217455200000124.08],
        [
1217541600000125.10],
        [
1217800800000121.41],
        [
1217887200000119.17],
        [
1217973600000118.58],
        [
1218060000000120.02],
        [
1218405600000114.45],
        [
1218492000000113.01],
        [
1218578400000116.00],
        [
1218751200000113.77],
        [
1219010400000112.87],
        [
1219096800000114.53],
        [
1219269600000114.98],
        [
1219356000000114.98],
        [
1219701600000116.27],
        [
1219788000000118.15],
        [
1219874400000115.59],
        [
1219960800000115.46],
        [
1220306400000109.71],
        [
1220392800000109.35],
        [
1220565600000106.23],
        [
1220824800000106.34]
    ];
    var 
exchangerates = [
        [
11676060000000.7580],
        [
11676924000000.7580],
        [
11677788000000.75470],
        [
11678652000000.75490],
        [
11679516000000.76130],
        [
11680380000000.76550],
        [
11681244000000.76930],
        [
11682108000000.76940],
        [
11682972000000.76880],
        [
11683836000000.76780],
        [
11684700000000.77080],
        [
11685564000000.77270],
        [
11686428000000.77490],
        [
11687292000000.77410],
        [
11688156000000.77410],
        [
11689020000000.77320],
        [
11689884000000.77270],
        [
11690748000000.77370],
        [
11691612000000.77240],
        [
11692476000000.77120],
        [
11693340000000.7720],
        [
11694204000000.77210],
        [
11695068000000.77170],
        [
11695932000000.77040],
        [
11696796000000.7690],
        [
11697660000000.77110],
        [
11698524000000.7740],
        [
11699388000000.77450],
        [
11700252000000.77450],
        [
11701116000000.7740],
        [
11701980000000.77160],
        [
11702844000000.77130],
        [
11703708000000.76780],
        [
11704572000000.76880],
        [
11705436000000.77180],
        [
11706300000000.77180],
        [
11707164000000.77280],
        [
11708028000000.77290],
        [
11708892000000.76980],
        [
11709756000000.76850],
        [
11710620000000.76810],
        [
11711484000000.7690],
        [
11712348000000.7690],
        [
11713212000000.76980],
        [
11714076000000.76990],
        [
11714940000000.76510],
        [
11715804000000.76130],
        [
11716668000000.76160],
        [
11717532000000.76140],
        [
11718396000000.76140],
        [
11719260000000.76070],
        [
11720124000000.76020],
        [
11720988000000.76110],
        [
11721852000000.76220],
        [
11722716000000.76150],
        [
11723580000000.75980],
        [
11724444000000.75980],
        [
11725308000000.75920],
        [
11726172000000.75730],
        [
11727036000000.75660],
        [
11727900000000.75670],
        [
11728764000000.75910],
        [
11729628000000.75820],
        [
11730492000000.75850],
        [
11731356000000.76130],
        [
11732220000000.76310],
        [
11733084000000.76150],
        [
11733948000000.760],
        [
11734812000000.76130],
        [
11735676000000.76270],
        [
11736540000000.76270],
        [
11737404000000.76080],
        [
11738268000000.75830],
        [
11739132000000.75750],
        [
11739996000000.75620],
        [
11740860000000.7520],
        [
11741724000000.75120],
        [
11742588000000.75120],
        [
11743452000000.75170],
        [
11744316000000.7520],
        [
11745180000000.75110],
        [
11746044000000.7480],
        [
11746908000000.75090],
        [
11747772000000.75310],
        [
11748600000000.75310],
        [
11749464000000.75270],
        [
11750328000000.74980],
        [
11751192000000.74930],
        [
11752056000000.75040],
        [
11752920000000.750],
        [
11753784000000.74910],
        [
11754648000000.74910],
        [
11755512000000.74850],
        [
11756376000000.74840],
        [
11757240000000.74920],
        [
11758104000000.74710],
        [
11758968000000.74590],
        [
11759832000000.74770],
        [
11760696000000.74770],
        [
11761560000000.74830],
        [
11762424000000.74580],
        [
11763288000000.74480],
        [
11764152000000.7430],
        [
11765016000000.73990],
        [
11765880000000.73950],
        [
11766744000000.73950],
        [
11767608000000.73780],
        [
11768472000000.73820],
        [
11769336000000.73620],
        [
11770200000000.73550],
        [
11771064000000.73480],
        [
11771928000000.73610],
        [
11772792000000.73610],
        [
11773656000000.73650],
        [
11774520000000.73620],
        [
11775384000000.73310],
        [
11776248000000.73390],
        [
11777112000000.73440],
        [
11777976000000.73270],
        [
11778840000000.73270],
        [
11779704000000.73360],
        [
11780568000000.73330],
        [
11781432000000.73590],
        [
11782296000000.73590],
        [
11783160000000.73720],
        [
11784024000000.7360],
        [
11784888000000.7360],
        [
11785752000000.7350],
        [
11786616000000.73650],
        [
11787480000000.73840],
        [
11788344000000.73950],
        [
11789208000000.74130],
        [
11790072000000.73970],
        [
11790936000000.73960],
        [
11791800000000.73850],
        [
11792664000000.73780],
        [
11793528000000.73660],
        [
11794392000000.740],
        [
11795256000000.74110],
        [
11796120000000.74060],
        [
11796984000000.74050],
        [
11797848000000.74140],
        [
11798712000000.74310],
        [
11799576000000.74310],
        [
11800440000000.74380],
        [
11801304000000.74430],
        [
11802168000000.74430],
        [
11803032000000.74430],
        [
11803896000000.74340],
        [
11804760000000.74290],
        [
11805624000000.74420],
        [
11806488000000.7440],
        [
11807352000000.74390],
        [
11808216000000.74370],
        [
11809080000000.74370],
        [
11809944000000.74290],
        [
11810808000000.74030],
        [
11811672000000.73990],
        [
11812536000000.74180],
        [
11813400000000.74680],
        [
11814264000000.7480],
        [
11815128000000.7480],
        [
11815992000000.7490],
        [
11816856000000.74940],
        [
11817720000000.75220],
        [
11818584000000.75150],
        [
11819448000000.75020],
        [
11820312000000.74720],
        [
11821176000000.74720],
        [
11822040000000.74620],
        [
11822904000000.74550],
        [
11823768000000.74490],
        [
11824632000000.74670],
        [
11825496000000.74580],
        [
11826360000000.74270],
        [
11827224000000.74270],
        [
11828088000000.7430],
        [
11828952000000.74290],
        [
11829816000000.7440],
        [
11830680000000.7430],
        [
11831544000000.74220],
        [
11832408000000.73880],
        [
11833272000000.73880],
        [
11834136000000.73690],
        [
11835000000000.73450],
        [
11835864000000.73450],
        [
11836728000000.73450],
        [
11837592000000.73520],
        [
11838456000000.73410],
        [
11839320000000.73410],
        [
11840184000000.7340],
        [
11841048000000.73240],
        [
11841912000000.72720],
        [
11842776000000.72640],
        [
11843640000000.72550],
        [
11844504000000.72580],
        [
11845368000000.72580],
        [
11846232000000.72560],
        [
11847096000000.72570],
        [
11847960000000.72470],
        [
11848824000000.72430],
        [
11849688000000.72440],
        [
11850552000000.72350],
        [
11851416000000.72350],
        [
11852280000000.72350],
        [
11853144000000.72350],
        [
11854008000000.72620],
        [
11854872000000.72880],
        [
11855736000000.73010],
        [
11856600000000.73370],
        [
11857464000000.73370],
        [
11858328000000.73240],
        [
11859192000000.72970],
        [
11860056000000.73170],
        [
11860920000000.73150],
        [
11861784000000.72880],
        [
11862648000000.72630],
        [
11863512000000.72630],
        [
11864376000000.72420],
        [
11865240000000.72530],
        [
11866104000000.72640],
        [
11866968000000.7270],
        [
11867832000000.73120],
        [
11868696000000.73050],
        [
11869560000000.73050],
        [
11870424000000.73180],
        [
11871288000000.73580],
        [
11872152000000.74090],
        [
11873016000000.74540],
        [
11873880000000.74370],
        [
11874744000000.74240],
        [
11875608000000.74240],
        [
11876472000000.74150],
        [
11877336000000.74190],
        [
11878200000000.74140],
        [
11879064000000.73770],
        [
11879928000000.73550],
        [
11880792000000.73150],
        [
11881656000000.73150],
        [
11882520000000.7320],
        [
11883384000000.73320],
        [
11884248000000.73460],
        [
11885112000000.73280],
        [
11885976000000.73230],
        [
11886840000000.7340],
        [
11887704000000.7340],
        [
11888568000000.73360],
        [
11889432000000.73510],
        [
11890296000000.73460],
        [
11891160000000.73210],
        [
11892024000000.72940],
        [
11892888000000.72660],
        [
11893752000000.72660],
        [
11894616000000.72540],
        [
11895480000000.72420],
        [
11896344000000.72130],
        [
11897208000000.71970],
        [
11898072000000.72090],
        [
11898936000000.7210],
        [
11899800000000.7210],
        [
11900664000000.7210],
        [
11901528000000.72090],
        [
11902392000000.71590],
        [
11903256000000.71330],
        [
11904120000000.71050],
        [
11904984000000.70990],
        [
11905848000000.70990],
        [
11906712000000.70930],
        [
11907576000000.70930],
        [
11908440000000.70760],
        [
11909304000000.7070],
        [
11910168000000.70490],
        [
11911032000000.70120],
        [
11911896000000.70110],
        [
11912760000000.70190],
        [
11913624000000.70460],
        [
11914488000000.70630],
        [
11915352000000.70890],
        [
11916216000000.70770],
        [
11917080000000.70770],
        [
11917944000000.70770],
        [
11918808000000.70910],
        [
11919672000000.71180],
        [
11920536000000.70790],
        [
11921400000000.70530],
        [
11922264000000.7050],
        [
11923128000000.70550],
        [
11923992000000.70550],
        [
11924856000000.70450],
        [
11925720000000.70510],
        [
11926584000000.70510],
        [
11927448000000.70170],
        [
11928312000000.70],
        [
11929176000000.69950],
        [
11930040000000.69940],
        [
11930904000000.70140],
        [
11931768000000.70360],
        [
11932632000000.70210],
        [
11933496000000.70020],
        [
11934360000000.69670],
        [
11935224000000.6950],
        [
11936124000000.6950],
        [
11936988000000.69390],
        [
11937852000000.6940],
        [
11938716000000.69220],
        [
11939580000000.69190],
        [
11940444000000.69140],
        [
11941308000000.68940],
        [
11942172000000.68910],
        [
11943036000000.69040],
        [
11943900000000.6890],
        [
11944764000000.68340],
        [
11945628000000.68230],
        [
11946492000000.68070],
        [
11947356000000.68150],
        [
11948220000000.68150],
        [
11949084000000.68470],
        [
11949948000000.68590],
        [
11950812000000.68220],
        [
11951676000000.68270],
        [
11952540000000.68370],
        [
11953404000000.68230],
        [
11954268000000.68220],
        [
11955132000000.68220],
        [
11955996000000.67920],
        [
11956860000000.67460],
        [
11957724000000.67350],
        [
11958588000000.67310],
        [
11959452000000.67420],
        [
11960316000000.67440],
        [
11961180000000.67390],
        [
11962044000000.67310],
        [
11962908000000.67610],
        [
11963772000000.67610],
        [
11964636000000.67850],
        [
11965500000000.68180],
        [
11966364000000.68360],
        [
11967228000000.68230],
        [
11968092000000.68050],
        [
11968956000000.67930],
        [
11969820000000.68490],
        [
11970684000000.68330],
        [
11971548000000.68250],
        [
11972412000000.68250],
        [
11973276000000.68160],
        [
11974140000000.67990],
        [
11975004000000.68130],
        [
11975868000000.68090],
        [
11976732000000.68680],
        [
11977596000000.69330],
        [
11978460000000.69330],
        [
11979324000000.69450],
        [
11980188000000.69440],
        [
11981052000000.69460],
        [
11981916000000.69640],
        [
11982780000000.69650],
        [
11983644000000.69560],
        [
11984508000000.69560],
        [
11985372000000.6950],
        [
11986236000000.69480],
        [
11987100000000.69280],
        [
11987964000000.68870],
        [
11988828000000.68240],
        [
11989692000000.67940],
        [
11990556000000.67940],
        [
11991420000000.68030],
        [
11992284000000.68550],
        [
11993148000000.68240],
        [
11994012000000.67910],
        [
11994876000000.67830],
        [
11995740000000.67850],
        [
11996604000000.67850],
        [
11997468000000.67970],
        [
11998332000000.680],
        [
11999196000000.68030],
        [
12000060000000.68050],
        [
12000924000000.6760],
        [
12001788000000.6770],
        [
12002652000000.6770],
        [
12003516000000.67360],
        [
12004380000000.67260],
        [
12005244000000.67640],
        [
12006108000000.68210],
        [
12006972000000.68310],
        [
12007836000000.68420],
        [
12008700000000.68420],
        [
12009564000000.68870],
        [
12010428000000.69030],
        [
12011292000000.68480],
        [
12012156000000.68240],
        [
12013020000000.67880],
        [
12013884000000.68140],
        [
12014748000000.68140],
        [
12015612000000.67970],
        [
12016476000000.67690],
        [
12017340000000.67650],
        [
12018204000000.67330],
        [
12019068000000.67290],
        [
12019932000000.67580],
        [
12020796000000.67580],
        [
12021660000000.6750],
        [
12022524000000.6780],
        [
12023388000000.68330],
        [
12024252000000.68560],
        [
12025116000000.69030],
        [
12025980000000.68960],
        [
12026844000000.68960],
        [
12027708000000.68820],
        [
12028572000000.68790],
        [
12029436000000.68620],
        [
12030300000000.68520],
        [
12031164000000.68230],
        [
12032028000000.68130],
        [
12032892000000.68130],
        [
12033756000000.68220],
        [
12034620000000.68020],
        [
12035484000000.68020],
        [
12036348000000.67840],
        [
12037212000000.67480],
        [
12038076000000.67470],
        [
12038940000000.67470],
        [
12039804000000.67480],
        [
12040668000000.67330],
        [
12041532000000.6650],
        [
12042396000000.66110],
        [
12043260000000.65830],
        [
12044124000000.6590],
        [
12044988000000.6590],
        [
12045852000000.65810],
        [
12046716000000.65780],
        [
12047580000000.65740],
        [
12048444000000.65320],
        [
12049308000000.65020],
        [
12050172000000.65140],
        [
12051036000000.65140],
        [
12051900000000.65070],
        [
12052764000000.6510],
        [
12053628000000.64890],
        [
12054492000000.64240],
        [
12055356000000.64060],
        [
12056220000000.63820],
        [
12057084000000.63820],
        [
12057948000000.63410],
        [
12058812000000.63440],
        [
12059676000000.63780],
        [
12060540000000.64390],
        [
12061404000000.64780],
        [
12062268000000.64810],
        [
12063132000000.64810],
        [
12063996000000.64940],
        [
12064860000000.64380],
        [
12065724000000.63770],
        [
12066588000000.63290],
        [
12067452000000.63360],
        [
12068316000000.63330],
        [
12069144000000.63330],
        [
12070008000000.6330],
        [
12070872000000.63710],
        [
12071736000000.64030],
        [
12072600000000.63960],
        [
12073464000000.63640],
        [
12074328000000.63560],
        [
12075192000000.63560],
        [
12076056000000.63680],
        [
12076920000000.63570],
        [
12077784000000.63540],
        [
12078648000000.6320],
        [
12079512000000.63320],
        [
12080376000000.63280],
        [
12081240000000.63310],
        [
12082104000000.63420],
        [
12082968000000.63210],
        [
12083832000000.63020],
        [
12084696000000.62780],
        [
12085560000000.63080],
        [
12086424000000.63240],
        [
12087288000000.63240],
        [
12088152000000.63070],
        [
12089016000000.62770],
        [
12089880000000.62690],
        [
12090744000000.63350],
        [
12091608000000.63920],
        [
12092472000000.640],
        [
12093336000000.64010],
        [
12094200000000.63960],
        [
12095064000000.64070],
        [
12095928000000.64230],
        [
12096792000000.64290],
        [
12097656000000.64720],
        [
12098520000000.64850],
        [
12099384000000.64860],
        [
12100248000000.64670],
        [
12101112000000.64440],
        [
12101976000000.64670],
        [
12102840000000.65090],
        [
12103704000000.64780],
        [
12104568000000.64610],
        [
12105432000000.64610],
        [
12106296000000.64680],
        [
12107160000000.64490],
        [
12108024000000.6470],
        [
12108888000000.64610],
        [
12109752000000.64520],
        [
12110616000000.64220],
        [
12111480000000.64220],
        [
12112344000000.64250],
        [
12113208000000.64140],
        [
12114072000000.63660],
        [
12114936000000.63460],
        [
12115800000000.6350],
        [
12116664000000.63460],
        [
12117528000000.63460],
        [
12118392000000.63430],
        [
12119256000000.63460],
        [
12120120000000.63790],
        [
12120984000000.64160],
        [
12121848000000.64420],
        [
12122712000000.64310],
        [
12123576000000.64310],
        [
12124440000000.64350],
        [
12125304000000.6440],
        [
12126168000000.64730],
        [
12127032000000.64690],
        [
12127896000000.63860],
        [
12128760000000.63560],
        [
12129624000000.6340],
        [
12130488000000.63460],
        [
12131352000000.6430],
        [
12132216000000.64520],
        [
12133080000000.64670],
        [
12133944000000.65060],
        [
12134808000000.65040],
        [
12135672000000.65030],
        [
12136536000000.64810],
        [
12137400000000.64510],
        [
12138264000000.6450],
        [
12139128000000.64410],
        [
12139992000000.64140],
        [
12140856000000.64090],
        [
12141720000000.64090],
        [
12142584000000.64280],
        [
12143448000000.64310],
        [
12144312000000.64180],
        [
12145176000000.63710],
        [
12146040000000.63490],
        [
12146904000000.63330],
        [
12147768000000.63340],
        [
12148632000000.63380],
        [
12149496000000.63420],
        [
12150360000000.6320],
        [
12151224000000.63180],
        [
12152088000000.6370],
        [
12152952000000.63680],
        [
12153816000000.63680],
        [
12154680000000.63830],
        [
12155544000000.63710],
        [
12156408000000.63710],
        [
12157272000000.63550],
        [
12158136000000.6320],
        [
12159000000000.62770],
        [
12159864000000.62760],
        [
12160728000000.62910],
        [
12161592000000.62740],
        [
12162456000000.62930],
        [
12163320000000.63110],
        [
12164184000000.6310],
        [
12165048000000.63120],
        [
12165912000000.63120],
        [
12166776000000.63040],
        [
12167640000000.62940],
        [
12168504000000.63480],
        [
12169368000000.63780],
        [
12170232000000.63680],
        [
12171096000000.63680],
        [
12171960000000.63680],
        [
12172824000000.6360],
        [
12173688000000.6370],
        [
12174552000000.64180],
        [
12175416000000.64110],
        [
12176280000000.64350],
        [
12177144000000.64270],
        [
12178008000000.64270],
        [
12178872000000.64190],
        [
12179736000000.64460],
        [
12180600000000.64680],
        [
12181464000000.64870],
        [
12182328000000.65940],
        [
12183192000000.66660],
        [
12184056000000.66660],
        [
12184920000000.66780],
        [
12185784000000.67120],
        [
12186648000000.67050],
        [
12187512000000.67180],
        [
12188376000000.67840],
        [
12189240000000.68110],
        [
12190104000000.68110],
        [
12190968000000.67940],
        [
12191832000000.68040],
        [
12192696000000.67810],
        [
12193560000000.67560],
        [
12194424000000.67350],
        [
12195288000000.67630],
        [
12196152000000.67620],
        [
12197016000000.67770],
        [
12197880000000.68150],
        [
12198744000000.68020],
        [
12199608000000.6780],
        [
12200472000000.67960],
        [
12201336000000.68170],
        [
12202200000000.68170],
        [
12203064000000.68320],
        [
12203928000000.68770],
        [
12204792000000.69120],
        [
12205656000000.69140],
        [
12206520000000.70090],
        [
12207384000000.70120],
        [
12208248000000.7010],
        [
12209112000000.70050]
    ];

    function 
euroFormatter(vaxis) {
        return 
v.toFixed(axis.tickDecimals) + "€";
    }

    function 
doPlot(position) {
        $.
plot($("#flot-line-chart-multi"), [{
            
dataoilprices,
            
label"Oil price ($)"
        
}, {
            
dataexchangerates,
            
label"USD/EUR exchange rate",
            
yaxis2
        
}], {
            
xaxes: [{
                
mode'time'
            
}],
            
yaxes: [{
                
min0
            
}, {
                
// align if we are to the right
                
alignTicksWithAxisposition == "right" null,
                
positionposition,
                
tickFormattereuroFormatter
            
}],
            
legend: {
                
position'sw'
            
},
            
grid: {
                
hoverabletrue //IMPORTANT! this is needed for tooltip to work
            
},
            
tooltiptrue,
            
tooltipOpts: {
                
content"%s for %x was %y",
                
xDateFormat"%y-%0m-%0d",

                
onHover: function(flotItem$tooltipEl) {
                    
// console.log(flotItem, $tooltipEl);
                
}
            }

        });
    }

    
doPlot("right");

    $(
"button").click(function() {
        
doPlot($(this).text());
    });
});

//Flot Moving Line Chart

$(function() {

    var 
container = $("#flot-line-chart-moving");

    
// Determine how many data points to keep based on the placeholder's initial size;
    // this gives us a nice high-res plot while avoiding more than one point per pixel.

    
var maximum container.outerWidth() / || 300;

    
//

    
var data = [];

    function 
getRandomData() {

        if (
data.length) {
            
data data.slice(1);
        }

        while (
data.length maximum) {
            var 
previous data.length data[data.length 1] : 50;
            var 
previous Math.random() * 10 5;
            
data.push(100 100 y);
        }

        
// zip the generated y values with the x values

        
var res = [];
        for (var 
0data.length; ++i) {
            
res.push([idata[i]])
        }

        return 
res;
    }

    
//

    
series = [{
        
datagetRandomData(),
        
lines: {
            
filltrue
        
}
    }];

    
//

    
var plot = $.plot(containerseries, {
        
grid: {
            
borderWidth1,
            
minBorderMargin20,
            
labelMargin10,
            
backgroundColor: {
                
colors: ["#fff""#e4f4f4"]
            },
            
margin: {
                
top8,
                
bottom20,
                
left20
            
},
            
markings: function(axes) {
                var 
markings = [];
                var 
xaxis axes.xaxis;
                for (var 
Math.floor(xaxis.min); xaxis.max+= xaxis.tickSize 2) {
                    
markings.push({
                        
xaxis: {
                            
fromx,
                            
toxaxis.tickSize
                        
},
                        
color"rgba(232, 232, 255, 0.2)"
                    
});
                }
                return 
markings;
            }
        },
        
xaxis: {
            
tickFormatter: function() {
                return 
"";
            }
        },
        
yaxis: {
            
min0,
            
max110
        
},
        
legend: {
            
showtrue
        
}
    });

    
// Update the random dataset at 25FPS for a smoothly-animating chart

    
setInterval(function updateRandom() {
        
series[0].data getRandomData();
        
plot.setData(series);
        
plot.draw();
    }, 
40);

});

//Flot Bar Chart

$(function() {

    var 
barOptions = {
        
series: {
            
bars: {
                
showtrue,
                
barWidth43200000
            
}
        },
        
xaxis: {
            
mode"time",
            
timeformat"%m/%d",
            
minTickSize: [1"day"]
        },
        
grid: {
            
hoverabletrue
        
},
        
legend: {
            
showfalse
        
},
        
tooltiptrue,
        
tooltipOpts: {
            
content"x: %x, y: %y"
        
}
    };
    var 
barData = {
        
label"bar",
        
data: [
            [
13545216000001000],
            [
13550400000002000],
            [
13552236000003000],
            [
13553064000004000],
            [
13554873000005000],
            [
13555719000006000]
        ]
    };
    $.
plot($("#flot-bar-chart"), [barData], barOptions);

});
?>
Онлайн: 2
Реклама