flot.html 34 KB

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