flot.html 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>AdminLTE 2 | Flot Charts</title>
  6. <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
  7. <!-- Bootstrap 3.3.2 -->
  8. <link href="../../bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
  9. <!-- Font Awesome Icons -->
  10. <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
  11. <!-- Ionicons -->
  12. <link href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" rel="stylesheet" type="text/css" />
  13. <!-- Theme style -->
  14. <link href="../../dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
  15. <!-- AdminLTE Skins. Choose a skin from the css/skins
  16. folder instead of downloading all of them to reduce the load. -->
  17. <link href="../../dist/css/skins/_all-skins.min.css" rel="stylesheet" type="text/css" />
  18. <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  19. <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  20. <!--[if lt IE 9]>
  21. <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
  22. <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
  23. <![endif]-->
  24. </head>
  25. <body class="skin-blue sidebar-mini">
  26. <div class="wrapper">
  27. <header class="main-header">
  28. <!-- Logo -->
  29. <a href="../../index2.html" class="logo">
  30. <!-- mini logo for sidebar mini 50x50 pixels -->
  31. <span class="logo-mini"><b>A</b>LT</span>
  32. <!-- logo for regular state and mobile devices -->
  33. <span class="logo-lg"><b>Admin</b>LTE</span>
  34. </a>
  35. <!-- Header Navbar: style can be found in header.less -->
  36. <nav class="navbar navbar-static-top" role="navigation">
  37. <!-- Sidebar toggle button-->
  38. <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
  39. <span class="sr-only">Toggle navigation</span>
  40. <span class="icon-bar"></span>
  41. <span class="icon-bar"></span>
  42. <span class="icon-bar"></span>
  43. </a>
  44. <div class="navbar-custom-menu">
  45. <ul class="nav navbar-nav">
  46. <!-- Messages: style can be found in dropdown.less-->
  47. <li class="dropdown messages-menu">
  48. <a href="#" class="dropdown-toggle" data-toggle="dropdown">
  49. <i class="fa fa-envelope-o"></i>
  50. <span class="label label-success">4</span>
  51. </a>
  52. <ul class="dropdown-menu">
  53. <li class="header">You have 4 messages</li>
  54. <li>
  55. <!-- inner menu: contains the actual data -->
  56. <ul class="menu">
  57. <li><!-- start message -->
  58. <a href="#">
  59. <div class="pull-left">
  60. <img src="../../dist/img/user2-160x160.jpg" class="img-circle" alt="User Image"/>
  61. </div>
  62. <h4>
  63. Support Team
  64. <small><i class="fa fa-clock-o"></i> 5 mins</small>
  65. </h4>
  66. <p>Why not buy a new awesome theme?</p>
  67. </a>
  68. </li><!-- end message -->
  69. <li>
  70. <a href="#">
  71. <div class="pull-left">
  72. <img src="../../dist/img/user3-128x128.jpg" class="img-circle" alt="user image"/>
  73. </div>
  74. <h4>
  75. AdminLTE Design Team
  76. <small><i class="fa fa-clock-o"></i> 2 hours</small>
  77. </h4>
  78. <p>Why not buy a new awesome theme?</p>
  79. </a>
  80. </li>
  81. <li>
  82. <a href="#">
  83. <div class="pull-left">
  84. <img src="../../dist/img/user4-128x128.jpg" class="img-circle" alt="user image"/>
  85. </div>
  86. <h4>
  87. Developers
  88. <small><i class="fa fa-clock-o"></i> Today</small>
  89. </h4>
  90. <p>Why not buy a new awesome theme?</p>
  91. </a>
  92. </li>
  93. <li>
  94. <a href="#">
  95. <div class="pull-left">
  96. <img src="../../dist/img/user3-128x128.jpg" class="img-circle" alt="user image"/>
  97. </div>
  98. <h4>
  99. Sales Department
  100. <small><i class="fa fa-clock-o"></i> Yesterday</small>
  101. </h4>
  102. <p>Why not buy a new awesome theme?</p>
  103. </a>
  104. </li>
  105. <li>
  106. <a href="#">
  107. <div class="pull-left">
  108. <img src="../../dist/img/user4-128x128.jpg" class="img-circle" alt="user image"/>
  109. </div>
  110. <h4>
  111. Reviewers
  112. <small><i class="fa fa-clock-o"></i> 2 days</small>
  113. </h4>
  114. <p>Why not buy a new awesome theme?</p>
  115. </a>
  116. </li>
  117. </ul>
  118. </li>
  119. <li class="footer"><a href="#">See All Messages</a></li>
  120. </ul>
  121. </li>
  122. <!-- Notifications: style can be found in dropdown.less -->
  123. <li class="dropdown notifications-menu">
  124. <a href="#" class="dropdown-toggle" data-toggle="dropdown">
  125. <i class="fa fa-bell-o"></i>
  126. <span class="label label-warning">10</span>
  127. </a>
  128. <ul class="dropdown-menu">
  129. <li class="header">You have 10 notifications</li>
  130. <li>
  131. <!-- inner menu: contains the actual data -->
  132. <ul class="menu">
  133. <li>
  134. <a href="#">
  135. <i class="fa fa-users text-aqua"></i> 5 new members joined today
  136. </a>
  137. </li>
  138. <li>
  139. <a href="#">
  140. <i class="fa fa-warning text-yellow"></i> Very long description here that may not fit into the page and may cause design problems
  141. </a>
  142. </li>
  143. <li>
  144. <a href="#">
  145. <i class="fa fa-users text-red"></i> 5 new members joined
  146. </a>
  147. </li>
  148. <li>
  149. <a href="#">
  150. <i class="fa fa-shopping-cart text-green"></i> 25 sales made
  151. </a>
  152. </li>
  153. <li>
  154. <a href="#">
  155. <i class="fa fa-user text-red"></i> You changed your username
  156. </a>
  157. </li>
  158. </ul>
  159. </li>
  160. <li class="footer"><a href="#">View all</a></li>
  161. </ul>
  162. </li>
  163. <!-- Tasks: style can be found in dropdown.less -->
  164. <li class="dropdown tasks-menu">
  165. <a href="#" class="dropdown-toggle" data-toggle="dropdown">
  166. <i class="fa fa-flag-o"></i>
  167. <span class="label label-danger">9</span>
  168. </a>
  169. <ul class="dropdown-menu">
  170. <li class="header">You have 9 tasks</li>
  171. <li>
  172. <!-- inner menu: contains the actual data -->
  173. <ul class="menu">
  174. <li><!-- Task item -->
  175. <a href="#">
  176. <h3>
  177. Design some buttons
  178. <small class="pull-right">20%</small>
  179. </h3>
  180. <div class="progress xs">
  181. <div class="progress-bar progress-bar-aqua" style="width: 20%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
  182. <span class="sr-only">20% Complete</span>
  183. </div>
  184. </div>
  185. </a>
  186. </li><!-- end task item -->
  187. <li><!-- Task item -->
  188. <a href="#">
  189. <h3>
  190. Create a nice theme
  191. <small class="pull-right">40%</small>
  192. </h3>
  193. <div class="progress xs">
  194. <div class="progress-bar progress-bar-green" style="width: 40%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
  195. <span class="sr-only">40% Complete</span>
  196. </div>
  197. </div>
  198. </a>
  199. </li><!-- end task item -->
  200. <li><!-- Task item -->
  201. <a href="#">
  202. <h3>
  203. Some task I need to do
  204. <small class="pull-right">60%</small>
  205. </h3>
  206. <div class="progress xs">
  207. <div class="progress-bar progress-bar-red" style="width: 60%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
  208. <span class="sr-only">60% Complete</span>
  209. </div>
  210. </div>
  211. </a>
  212. </li><!-- end task item -->
  213. <li><!-- Task item -->
  214. <a href="#">
  215. <h3>
  216. Make beautiful transitions
  217. <small class="pull-right">80%</small>
  218. </h3>
  219. <div class="progress xs">
  220. <div class="progress-bar progress-bar-yellow" style="width: 80%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
  221. <span class="sr-only">80% Complete</span>
  222. </div>
  223. </div>
  224. </a>
  225. </li><!-- end task item -->
  226. </ul>
  227. </li>
  228. <li class="footer">
  229. <a href="#">View all tasks</a>
  230. </li>
  231. </ul>
  232. </li>
  233. <!-- User Account: style can be found in dropdown.less -->
  234. <li class="dropdown user user-menu">
  235. <a href="#" class="dropdown-toggle" data-toggle="dropdown">
  236. <img src="../../dist/img/user2-160x160.jpg" class="user-image" alt="User Image"/>
  237. <span class="hidden-xs">Alexander Pierce</span>
  238. </a>
  239. <ul class="dropdown-menu">
  240. <!-- User image -->
  241. <li class="user-header">
  242. <img src="../../dist/img/user2-160x160.jpg" class="img-circle" alt="User Image" />
  243. <p>
  244. Alexander Pierce - Web Developer
  245. <small>Member since Nov. 2012</small>
  246. </p>
  247. </li>
  248. <!-- Menu Body -->
  249. <li class="user-body">
  250. <div class="col-xs-4 text-center">
  251. <a href="#">Followers</a>
  252. </div>
  253. <div class="col-xs-4 text-center">
  254. <a href="#">Sales</a>
  255. </div>
  256. <div class="col-xs-4 text-center">
  257. <a href="#">Friends</a>
  258. </div>
  259. </li>
  260. <!-- Menu Footer-->
  261. <li class="user-footer">
  262. <div class="pull-left">
  263. <a href="#" class="btn btn-default btn-flat">Profile</a>
  264. </div>
  265. <div class="pull-right">
  266. <a href="#" class="btn btn-default btn-flat">Sign out</a>
  267. </div>
  268. </li>
  269. </ul>
  270. </li>
  271. </ul>
  272. </div>
  273. </nav>
  274. </header>
  275. <!-- Left side column. contains the logo and sidebar -->
  276. <aside class="main-sidebar">
  277. <!-- sidebar: style can be found in sidebar.less -->
  278. <section class="sidebar">
  279. <!-- Sidebar user panel -->
  280. <div class="user-panel">
  281. <div class="pull-left image">
  282. <img src="../../dist/img/user2-160x160.jpg" class="img-circle" alt="User Image" />
  283. </div>
  284. <div class="pull-left info">
  285. <p>Alexander Pierce</p>
  286. <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
  287. </div>
  288. </div>
  289. <!-- search form -->
  290. <form action="#" method="get" class="sidebar-form">
  291. <div class="input-group">
  292. <input type="text" name="q" class="form-control" placeholder="Search..."/>
  293. <span class="input-group-btn">
  294. <button type='submit' name='search' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>
  295. </span>
  296. </div>
  297. </form>
  298. <!-- /.search form -->
  299. <!-- sidebar menu: : style can be found in sidebar.less -->
  300. <ul class="sidebar-menu">
  301. <li class="header">MAIN NAVIGATION</li>
  302. <li class="treeview">
  303. <a href="#">
  304. <i class="fa fa-dashboard"></i> <span>Dashboard</span> <i class="fa fa-angle-left pull-right"></i>
  305. </a>
  306. <ul class="treeview-menu">
  307. <li><a href="../../index.html"><i class="fa fa-circle-o"></i> Dashboard v1</a></li>
  308. <li><a href="../../index2.html"><i class="fa fa-circle-o"></i> Dashboard v2</a></li>
  309. </ul>
  310. </li>
  311. <li class="treeview">
  312. <a href="#">
  313. <i class="fa fa-files-o"></i>
  314. <span>Layout Options</span>
  315. <span class="label label-primary pull-right">4</span>
  316. </a>
  317. <ul class="treeview-menu">
  318. <li><a href="../layout/top-nav.html"><i class="fa fa-circle-o"></i> Top Navigation</a></li>
  319. <li><a href="../layout/boxed.html"><i class="fa fa-circle-o"></i> Boxed</a></li>
  320. <li><a href="../layout/fixed.html"><i class="fa fa-circle-o"></i> Fixed</a></li>
  321. <li><a href="../layout/collapsed-sidebar.html"><i class="fa fa-circle-o"></i> Collapsed Sidebar</a></li>
  322. </ul>
  323. </li>
  324. <li>
  325. <a href="../widgets.html">
  326. <i class="fa fa-th"></i> <span>Widgets</span> <small class="label pull-right bg-green">new</small>
  327. </a>
  328. </li>
  329. <li class="treeview active">
  330. <a href="#">
  331. <i class="fa fa-pie-chart"></i>
  332. <span>Charts</span>
  333. <i class="fa fa-angle-left pull-right"></i>
  334. </a>
  335. <ul class="treeview-menu">
  336. <li><a href="morris.html"><i class="fa fa-circle-o"></i> Morris</a></li>
  337. <li class="active"><a href="flot.html"><i class="fa fa-circle-o"></i> Flot</a></li>
  338. <li><a href="inline.html"><i class="fa fa-circle-o"></i> Inline charts</a></li>
  339. </ul>
  340. </li>
  341. <li class="treeview">
  342. <a href="#">
  343. <i class="fa fa-laptop"></i>
  344. <span>UI Elements</span>
  345. <i class="fa fa-angle-left pull-right"></i>
  346. </a>
  347. <ul class="treeview-menu">
  348. <li><a href="../UI/general.html"><i class="fa fa-circle-o"></i> General</a></li>
  349. <li><a href="../UI/icons.html"><i class="fa fa-circle-o"></i> Icons</a></li>
  350. <li><a href="../UI/buttons.html"><i class="fa fa-circle-o"></i> Buttons</a></li>
  351. <li><a href="../UI/sliders.html"><i class="fa fa-circle-o"></i> Sliders</a></li>
  352. <li><a href="../UI/timeline.html"><i class="fa fa-circle-o"></i> Timeline</a></li>
  353. <li><a href="../UI/modals.html"><i class="fa fa-circle-o"></i> Modals</a></li>
  354. </ul>
  355. </li>
  356. <li class="treeview">
  357. <a href="#">
  358. <i class="fa fa-edit"></i> <span>Forms</span>
  359. <i class="fa fa-angle-left pull-right"></i>
  360. </a>
  361. <ul class="treeview-menu">
  362. <li><a href="../forms/general.html"><i class="fa fa-circle-o"></i> General Elements</a></li>
  363. <li><a href="../forms/advanced.html"><i class="fa fa-circle-o"></i> Advanced Elements</a></li>
  364. <li><a href="../forms/editors.html"><i class="fa fa-circle-o"></i> Editors</a></li>
  365. </ul>
  366. </li>
  367. <li class="treeview">
  368. <a href="#">
  369. <i class="fa fa-table"></i> <span>Tables</span>
  370. <i class="fa fa-angle-left pull-right"></i>
  371. </a>
  372. <ul class="treeview-menu">
  373. <li><a href="../tables/simple.html"><i class="fa fa-circle-o"></i> Simple tables</a></li>
  374. <li><a href="../tables/data.html"><i class="fa fa-circle-o"></i> Data tables</a></li>
  375. </ul>
  376. </li>
  377. <li>
  378. <a href="../calendar.html">
  379. <i class="fa fa-calendar"></i> <span>Calendar</span>
  380. <small class="label pull-right bg-red">3</small>
  381. </a>
  382. </li>
  383. <li>
  384. <a href="../mailbox/mailbox.html">
  385. <i class="fa fa-envelope"></i> <span>Mailbox</span>
  386. <small class="label pull-right bg-yellow">12</small>
  387. </a>
  388. </li>
  389. <li class="treeview">
  390. <a href="#">
  391. <i class="fa fa-folder"></i> <span>Examples</span>
  392. <i class="fa fa-angle-left pull-right"></i>
  393. </a>
  394. <ul class="treeview-menu">
  395. <li><a href="../examples/invoice.html"><i class="fa fa-circle-o"></i> Invoice</a></li>
  396. <li><a href="../examples/login.html"><i class="fa fa-circle-o"></i> Login</a></li>
  397. <li><a href="../examples/register.html"><i class="fa fa-circle-o"></i> Register</a></li>
  398. <li><a href="../examples/lockscreen.html"><i class="fa fa-circle-o"></i> Lockscreen</a></li>
  399. <li><a href="../examples/404.html"><i class="fa fa-circle-o"></i> 404 Error</a></li>
  400. <li><a href="../examples/500.html"><i class="fa fa-circle-o"></i> 500 Error</a></li>
  401. <li><a href="../examples/blank.html"><i class="fa fa-circle-o"></i> Blank Page</a></li>
  402. </ul>
  403. </li>
  404. <li class="treeview">
  405. <a href="#">
  406. <i class="fa fa-share"></i> <span>Multilevel</span>
  407. <i class="fa fa-angle-left pull-right"></i>
  408. </a>
  409. <ul class="treeview-menu">
  410. <li><a href="#"><i class="fa fa-circle-o"></i> Level One</a></li>
  411. <li>
  412. <a href="#"><i class="fa fa-circle-o"></i> Level One <i class="fa fa-angle-left pull-right"></i></a>
  413. <ul class="treeview-menu">
  414. <li><a href="#"><i class="fa fa-circle-o"></i> Level Two</a></li>
  415. <li>
  416. <a href="#"><i class="fa fa-circle-o"></i> Level Two <i class="fa fa-angle-left pull-right"></i></a>
  417. <ul class="treeview-menu">
  418. <li><a href="#"><i class="fa fa-circle-o"></i> Level Three</a></li>
  419. <li><a href="#"><i class="fa fa-circle-o"></i> Level Three</a></li>
  420. </ul>
  421. </li>
  422. </ul>
  423. </li>
  424. <li><a href="#"><i class="fa fa-circle-o"></i> Level One</a></li>
  425. </ul>
  426. </li>
  427. <li><a href="../../documentation/index.html"><i class="fa fa-book"></i> <span>Documentation</span></a></li>
  428. <li class="header">LABELS</li>
  429. <li><a href="#"><i class="fa fa-circle-o text-danger"></i> <span>Important</span></a></li>
  430. <li><a href="#"><i class="fa fa-circle-o text-warning"></i> <span>Warning</span></a></li>
  431. <li><a href="#"><i class="fa fa-circle-o text-info"></i> <span>Information</span></a></li>
  432. </ul>
  433. </section>
  434. <!-- /.sidebar -->
  435. </aside>
  436. <!-- Content Wrapper. Contains page content -->
  437. <div class="content-wrapper">
  438. <!-- Content Header (Page header) -->
  439. <section class="content-header">
  440. <h1>
  441. Flot Charts
  442. <small>preview sample</small>
  443. </h1>
  444. <ol class="breadcrumb">
  445. <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
  446. <li class="active">Blank page</li>
  447. </ol>
  448. </section>
  449. <!-- Main content -->
  450. <section class="content">
  451. <div class="row">
  452. <div class="col-xs-12">
  453. <!-- interactive chart -->
  454. <div class="box box-primary">
  455. <div class="box-header with-border">
  456. <i class="fa fa-bar-chart-o"></i>
  457. <h3 class="box-title">Interactive Area Chart</h3>
  458. <div class="box-tools pull-right">
  459. Real time
  460. <div class="btn-group" id="realtime" data-toggle="btn-toggle">
  461. <button type="button" class="btn btn-default btn-xs active" data-toggle="on">On</button>
  462. <button type="button" class="btn btn-default btn-xs" data-toggle="off">Off</button>
  463. </div>
  464. </div>
  465. </div>
  466. <div class="box-body">
  467. <div id="interactive" style="height: 300px;"></div>
  468. </div><!-- /.box-body-->
  469. </div><!-- /.box -->
  470. </div><!-- /.col -->
  471. </div><!-- /.row -->
  472. <div class="row">
  473. <div class="col-md-6">
  474. <!-- Line chart -->
  475. <div class="box box-primary">
  476. <div class="box-header with-border">
  477. <i class="fa fa-bar-chart-o"></i>
  478. <h3 class="box-title">Line Chart</h3>
  479. <div class="box-tools pull-right">
  480. <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
  481. <button class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
  482. </div>
  483. </div>
  484. <div class="box-body">
  485. <div id="line-chart" style="height: 300px;"></div>
  486. </div><!-- /.box-body-->
  487. </div><!-- /.box -->
  488. <!-- Area chart -->
  489. <div class="box box-primary">
  490. <div class="box-header with-border">
  491. <i class="fa fa-bar-chart-o"></i>
  492. <h3 class="box-title">Full Width Area Chart</h3>
  493. <div class="box-tools pull-right">
  494. <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
  495. <button class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
  496. </div>
  497. </div>
  498. <div class="box-body">
  499. <div id="area-chart" style="height: 338px;" class="full-width-chart"></div>
  500. </div><!-- /.box-body-->
  501. </div><!-- /.box -->
  502. </div><!-- /.col -->
  503. <div class="col-md-6">
  504. <!-- Bar chart -->
  505. <div class="box box-primary">
  506. <div class="box-header with-border">
  507. <i class="fa fa-bar-chart-o"></i>
  508. <h3 class="box-title">Bar Chart</h3>
  509. <div class="box-tools pull-right">
  510. <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
  511. <button class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
  512. </div>
  513. </div>
  514. <div class="box-body">
  515. <div id="bar-chart" style="height: 300px;"></div>
  516. </div><!-- /.box-body-->
  517. </div><!-- /.box -->
  518. <!-- Donut chart -->
  519. <div class="box box-primary">
  520. <div class="box-header with-border">
  521. <i class="fa fa-bar-chart-o"></i>
  522. <h3 class="box-title">Donut Chart</h3>
  523. <div class="box-tools pull-right">
  524. <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
  525. <button class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
  526. </div>
  527. </div>
  528. <div class="box-body">
  529. <div id="donut-chart" style="height: 300px;"></div>
  530. </div><!-- /.box-body-->
  531. </div><!-- /.box -->
  532. </div><!-- /.col -->
  533. </div><!-- /.row -->
  534. </section><!-- /.content -->
  535. </div><!-- /.content-wrapper -->
  536. <footer class="main-footer">
  537. <div class="pull-right hidden-xs">
  538. <b>Version</b> 2.0
  539. </div>
  540. <strong>Copyright &copy; 2014-2015 <a href="http://almsaeedstudio.com">Almsaeed Studio</a>.</strong> All rights reserved.
  541. </footer>
  542. </div><!-- ./wrapper -->
  543. <!-- jQuery 2.1.3 -->
  544. <script src="../../plugins/jQuery/jQuery-2.1.3.min.js"></script>
  545. <!-- Bootstrap 3.3.2 JS -->
  546. <script src="../../bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
  547. <!-- FastClick -->
  548. <script src='../../plugins/fastclick/fastclick.min.js'></script>
  549. <!-- AdminLTE App -->
  550. <script src="../../dist/js/app.min.js" type="text/javascript"></script>
  551. <!-- AdminLTE for demo purposes -->
  552. <script src="../../dist/js/demo.js" type="text/javascript"></script>
  553. <!-- FLOT CHARTS -->
  554. <script src="../../plugins/flot/jquery.flot.min.js" type="text/javascript"></script>
  555. <!-- FLOT RESIZE PLUGIN - allows the chart to redraw when the window is resized -->
  556. <script src="../../plugins/flot/jquery.flot.resize.min.js" type="text/javascript"></script>
  557. <!-- FLOT PIE PLUGIN - also used to draw donut charts -->
  558. <script src="../../plugins/flot/jquery.flot.pie.min.js" type="text/javascript"></script>
  559. <!-- FLOT CATEGORIES PLUGIN - Used to draw bar charts -->
  560. <script src="../../plugins/flot/jquery.flot.categories.min.js" type="text/javascript"></script>
  561. <!-- Page script -->
  562. <script type="text/javascript">
  563. $(function () {
  564. /*
  565. * Flot Interactive Chart
  566. * -----------------------
  567. */
  568. // We use an inline data source in the example, usually data would
  569. // be fetched from a server
  570. var data = [], totalPoints = 100;
  571. function getRandomData() {
  572. if (data.length > 0)
  573. data = data.slice(1);
  574. // Do a random walk
  575. while (data.length < totalPoints) {
  576. var prev = data.length > 0 ? data[data.length - 1] : 50,
  577. y = prev + Math.random() * 10 - 5;
  578. if (y < 0) {
  579. y = 0;
  580. } else if (y > 100) {
  581. y = 100;
  582. }
  583. data.push(y);
  584. }
  585. // Zip the generated y values with the x values
  586. var res = [];
  587. for (var i = 0; i < data.length; ++i) {
  588. res.push([i, data[i]]);
  589. }
  590. return res;
  591. }
  592. var interactive_plot = $.plot("#interactive", [getRandomData()], {
  593. grid: {
  594. borderColor: "#f3f3f3",
  595. borderWidth: 1,
  596. tickColor: "#f3f3f3"
  597. },
  598. series: {
  599. shadowSize: 0, // Drawing is faster without shadows
  600. color: "#3c8dbc"
  601. },
  602. lines: {
  603. fill: true, //Converts the line chart to area chart
  604. color: "#3c8dbc"
  605. },
  606. yaxis: {
  607. min: 0,
  608. max: 100,
  609. show: true
  610. },
  611. xaxis: {
  612. show: true
  613. }
  614. });
  615. var updateInterval = 500; //Fetch data ever x milliseconds
  616. var realtime = "on"; //If == to on then fetch data every x seconds. else stop fetching
  617. function update() {
  618. interactive_plot.setData([getRandomData()]);
  619. // Since the axes don't change, we don't need to call plot.setupGrid()
  620. interactive_plot.draw();
  621. if (realtime === "on")
  622. setTimeout(update, updateInterval);
  623. }
  624. //INITIALIZE REALTIME DATA FETCHING
  625. if (realtime === "on") {
  626. update();
  627. }
  628. //REALTIME TOGGLE
  629. $("#realtime .btn").click(function () {
  630. if ($(this).data("toggle") === "on") {
  631. realtime = "on";
  632. }
  633. else {
  634. realtime = "off";
  635. }
  636. update();
  637. });
  638. /*
  639. * END INTERACTIVE CHART
  640. */
  641. /*
  642. * LINE CHART
  643. * ----------
  644. */
  645. //LINE randomly generated data
  646. var sin = [], cos = [];
  647. for (var i = 0; i < 14; i += 0.5) {
  648. sin.push([i, Math.sin(i)]);
  649. cos.push([i, Math.cos(i)]);
  650. }
  651. var line_data1 = {
  652. data: sin,
  653. color: "#3c8dbc"
  654. };
  655. var line_data2 = {
  656. data: cos,
  657. color: "#00c0ef"
  658. };
  659. $.plot("#line-chart", [line_data1, line_data2], {
  660. grid: {
  661. hoverable: true,
  662. borderColor: "#f3f3f3",
  663. borderWidth: 1,
  664. tickColor: "#f3f3f3"
  665. },
  666. series: {
  667. shadowSize: 0,
  668. lines: {
  669. show: true
  670. },
  671. points: {
  672. show: true
  673. }
  674. },
  675. lines: {
  676. fill: false,
  677. color: ["#3c8dbc", "#f56954"]
  678. },
  679. yaxis: {
  680. show: true,
  681. },
  682. xaxis: {
  683. show: true
  684. }
  685. });
  686. //Initialize tooltip on hover
  687. $("<div class='tooltip-inner' id='line-chart-tooltip'></div>").css({
  688. position: "absolute",
  689. display: "none",
  690. opacity: 0.8
  691. }).appendTo("body");
  692. $("#line-chart").bind("plothover", function (event, pos, item) {
  693. if (item) {
  694. var x = item.datapoint[0].toFixed(2),
  695. y = item.datapoint[1].toFixed(2);
  696. $("#line-chart-tooltip").html(item.series.label + " of " + x + " = " + y)
  697. .css({top: item.pageY + 5, left: item.pageX + 5})
  698. .fadeIn(200);
  699. } else {
  700. $("#line-chart-tooltip").hide();
  701. }
  702. });
  703. /* END LINE CHART */
  704. /*
  705. * FULL WIDTH STATIC AREA CHART
  706. * -----------------
  707. */
  708. var areaData = [[2, 88.0], [3, 93.3], [4, 102.0], [5, 108.5], [6, 115.7], [7, 115.6],
  709. [8, 124.6], [9, 130.3], [10, 134.3], [11, 141.4], [12, 146.5], [13, 151.7], [14, 159.9],
  710. [15, 165.4], [16, 167.8], [17, 168.7], [18, 169.5], [19, 168.0]];
  711. $.plot("#area-chart", [areaData], {
  712. grid: {
  713. borderWidth: 0
  714. },
  715. series: {
  716. shadowSize: 0, // Drawing is faster without shadows
  717. color: "#00c0ef"
  718. },
  719. lines: {
  720. fill: true //Converts the line chart to area chart
  721. },
  722. yaxis: {
  723. show: false
  724. },
  725. xaxis: {
  726. show: false
  727. }
  728. });
  729. /* END AREA CHART */
  730. /*
  731. * BAR CHART
  732. * ---------
  733. */
  734. var bar_data = {
  735. data: [["January", 10], ["February", 8], ["March", 4], ["April", 13], ["May", 17], ["June", 9]],
  736. color: "#3c8dbc"
  737. };
  738. $.plot("#bar-chart", [bar_data], {
  739. grid: {
  740. borderWidth: 1,
  741. borderColor: "#f3f3f3",
  742. tickColor: "#f3f3f3"
  743. },
  744. series: {
  745. bars: {
  746. show: true,
  747. barWidth: 0.5,
  748. align: "center"
  749. }
  750. },
  751. xaxis: {
  752. mode: "categories",
  753. tickLength: 0
  754. }
  755. });
  756. /* END BAR CHART */
  757. /*
  758. * DONUT CHART
  759. * -----------
  760. */
  761. var donutData = [
  762. {label: "Series2", data: 30, color: "#3c8dbc"},
  763. {label: "Series3", data: 20, color: "#0073b7"},
  764. {label: "Series4", data: 50, color: "#00c0ef"}
  765. ];
  766. $.plot("#donut-chart", donutData, {
  767. series: {
  768. pie: {
  769. show: true,
  770. radius: 1,
  771. innerRadius: 0.5,
  772. label: {
  773. show: true,
  774. radius: 2 / 3,
  775. formatter: labelFormatter,
  776. threshold: 0.1
  777. }
  778. }
  779. },
  780. legend: {
  781. show: false
  782. }
  783. });
  784. /*
  785. * END DONUT CHART
  786. */
  787. });
  788. /*
  789. * Custom Label formatter
  790. * ----------------------
  791. */
  792. function labelFormatter(label, series) {
  793. return "<div style='font-size:13px; text-align:center; padding:2px; color: #fff; font-weight: 600;'>"
  794. + label
  795. + "<br/>"
  796. + Math.round(series.percent) + "%</div>";
  797. }
  798. </script>
  799. </body>
  800. </html>