You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
20 KiB
JavaScript
1 line
20 KiB
JavaScript
2 years ago
|
$(function(){var e={series:{bars:{show:!0,barWidth:.6,fill:!0,fillColor:{colors:[{opacity:.8},{opacity:.8}]}}},xaxis:{tickDecimals:0},colors:["#1ab394"],grid:{color:"#999999",hoverable:!0,clickable:!0,tickColor:"#D4D4D4",borderWidth:0},legend:{show:!1},tooltip:!0,tooltipOpts:{content:"x: %x, y: %y"}},o={label:"bar",data:[[1,34],[2,25],[3,19],[4,34],[5,32],[6,44]]};$.plot($("#flot-bar-chart"),[o],e)}),$(function(){var e={series:{lines:{show:!0,lineWidth:2,fill:!0,fillColor:{colors:[{opacity:0},{opacity:0}]}}},xaxis:{tickDecimals:0},colors:["#1ab394"],grid:{color:"#999999",hoverable:!0,clickable:!0,tickColor:"#D4D4D4",borderWidth:0},legend:{show:!1},tooltip:!0,tooltipOpts:{content:"x: %x, y: %y"}},o={label:"bar",data:[[1,34],[2,25],[3,19],[4,34],[5,32],[6,44]]};$.plot($("#flot-line-chart"),[o],e)}),$(function(){{var e=[{label:"数据 1",data:21,color:"#d3d3d3"},{label:"数据 2",data:3,color:"#bababa"},{label:"数据 3",data:15,color:"#79d2c0"},{label:"数据 4",data:52,color:"#1ab394"}];$.plot($("#flot-pie-chart"),e,{series:{pie:{show:!0}},grid:{hoverable:!0},tooltip:!0,tooltipOpts:{content:"%p.0%, %s",shifts:{x:20,y:0},defaultTheme:!1}})}}),$(function(){function e(){for(i.length&&(i=i.slice(1));i.length<t;){var e=i.length?i[i.length-1]:50,o=e+10*Math.random()-5;i.push(0>o?0:o>100?100:o)}for(var l=[],a=0;a<i.length;++a)l.push([a,i[a]]);return l}var o=$("#flot-line-chart-moving"),t=o.outerWidth()/2||300,i=[];series=[{data:e(),lines:{fill:!0}}];var l=$.plot(o,series,{grid:{color:"#999999",tickColor:"#D4D4D4",borderWidth:0,minBorderMargin:20,labelMargin:10,backgroundColor:{colors:["#ffffff","#ffffff"]},margin:{top:8,bottom:20,left:20},markings:function(e){for(var o=[],t=e.xaxis,i=Math.floor(t.min);i<t.max;i+=2*t.tickSize)o.push({xaxis:{from:i,to:i+t.tickSize},color:"#fff"});return o}},colors:["#1ab394"],xaxis:{tickFormatter:function(){return""}},yaxis:{min:0,max:110},legend:{show:!0}});setInterval(function(){series[0].data=e(),l.setData(series),l.draw()},40)}),$(function(){function e(e,o){return"¥"+e.toFixed(o.tickDecimals)}function o(o){$.plot($("#flot-line-chart-multi"),[{data:t,label:"油价 (¥)"},{data:i,label:"美元/人民币汇率",yaxis:2}],{xaxes:[{mode:"time"}],yaxes:[{min:0},{alignTicksWithAxis:"right"==o?1:null,position:o,tickFormatter:e}],legend:{position:"sw"},colors:["#1ab394"],grid:{color:"#999999",hoverable:!0,clickable:!0,tickColor:"#D4D4D4",borderWidth:0,hoverable:!0},tooltip:!0,tooltipOpts:{content:"%s %x 为 %y",xDateFormat:"%y-%0m-%0d",onHover:function(){}}})}var t=[[11676924e5,61.05],[11677788e5,58.32],[11678652e5,57.35],[11679516e5,56.31],[11682108e5,55.55],[11682972e5,55.64],[11683836e5,54.02],[116847e7,51.88],[11685564e5,52.99],[11688156e5,52.99],[1168902e6,51.21],[11689884e5,52.24],[11690748e5,50.48],[11691612e5,51.99],[11694204e5,51.13],[11695068e5,55.04],[11695932e5,55.37],[11696796e5,54.23],[1169766e6,55.42],[11700252e5,54.01],[11701116e5,56.97],[1170198e6,58.14],[11702844e5,58.14],[11703708e5,59.02],[117063e7,58.74],[11707164e5,58.88],[11708028e5,57.71],[11708892e5,59.71],[11709756e5,59.89],[11712348e5,57.81],[11713212e5,59.06],[11714076e5,58],[1171494e6,57.99],[11715804e5,59.39],[11718396e5,59.39],[1171926e6,58.07],[11720124e5,60.07],[11720988e5,61.14],[11724444e5,61.39],[11725308e5,61.46],[11726172e5,61.79],[11727036e5,62],[117279e7,60.07],[11731356e5,60.69],[1173222e6,61.82],[11733084e5,60.05],[1173654e6,58.91],[11737404e5,57.93],[11738268e5,58.16],[11739132e5,57.55],[11739996e5,57.11],[11742588e5,56.59],[11743452e5,59.61],[1174518e6,61.69],[11746044e5,62.28],[117486e7,62.91],[11749464e5,62.93],[11750328e5,64.03],[11751192e5,66.03],[11752056e5,65.87],[11754648e5,64.64],[11756376e5,64.38],[1175724e6,64.28],[11758104e5,64.28],[11760696e5,61.51],[1176156e6,61.89],[11762424e5,62.01],[11763288e5,63.85],[11764152e5,63.63],[11766744e5,63.61],[11767608e5,63.1],[11768472e5,63.13],[11769336e5,61.83],[117702e7,63.38],[11772792e5,64.58],[1177452e6,65.84],[11775384e5,65.06],[11776248e5,66.46],[1177884e6,64.4],[11780568e5,63.68],[11781432e5,63.19],[11782296e5,61.93],[11784888e5,61.47],[11785752e5
|