123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>Flot Examples: Symbols</title>
- <link href="../examples.css" rel="stylesheet" type="text/css">
- <script language="javascript" type="text/javascript" src="../../source/jquery.js"></script>
- <script language="javascript" type="text/javascript" src="../../source/jquery.canvaswrapper.js"></script>
- <script language="javascript" type="text/javascript" src="../../source/jquery.colorhelpers.js"></script>
- <script language="javascript" type="text/javascript" src="../../source/jquery.flot.js"></script>
- <script language="javascript" type="text/javascript" src="../../source/jquery.flot.saturated.js"></script>
- <script language="javascript" type="text/javascript" src="../../source/jquery.flot.browser.js"></script>
- <script language="javascript" type="text/javascript" src="../../source/jquery.flot.drawSeries.js"></script>
- <script language="javascript" type="text/javascript" src="../../source/jquery.flot.errorbars.js"></script>
- <script language="javascript" type="text/javascript" src="../../source/jquery.flot.uiConstants.js"></script>
- <script language="javascript" type="text/javascript" src="../../source/jquery.flot.logaxis.js"></script>
- <script language="javascript" type="text/javascript" src="../../source/jquery.flot.symbol.js"></script>
- <script language="javascript" type="text/javascript" src="../../source/jquery.flot.flatdata.js"></script>
- <script language="javascript" type="text/javascript" src="../../source/jquery.flot.navigate.js"></script>
- <script language="javascript" type="text/javascript" src="../../source/jquery.flot.fillbetween.js"></script>
- <script language="javascript" type="text/javascript" src="../../source/jquery.flot.stack.js"></script>
- <script language="javascript" type="text/javascript" src="../../source/jquery.flot.touchNavigate.js"></script>
- <script language="javascript" type="text/javascript" src="../../source/jquery.flot.hover.js"></script>
- <script language="javascript" type="text/javascript" src="../../source/jquery.flot.touch.js"></script>
- <script language="javascript" type="text/javascript" src="../../source/jquery.flot.time.js"></script>
- <script language="javascript" type="text/javascript" src="../../source/jquery.flot.axislabels.js"></script>
- <script language="javascript" type="text/javascript" src="../../source/jquery.flot.selection.js"></script>
- <script language="javascript" type="text/javascript" src="../../source/jquery.flot.composeImages.js"></script>
- <script language="javascript" type="text/javascript" src="../../source/jquery.flot.legend.js"></script>
- <script type="text/javascript">
- $(function() {
- function generate(offset, amplitude) {
- var res = [];
- var start = 0, end = 10;
- for (var i = 0; i <= 50; ++i) {
- var x = start + i / 50 * (end - start);
- res.push([x, amplitude * Math.sin(x + offset)]);
- }
- return res;
- }
- var data = [
- { data: generate(2, 1.8), points: { symbol: "circle" } },
- { data: generate(3, 1.5), points: { symbol: "square" } },
- { data: generate(4, 0.9), points: { symbol: "diamond" } },
- { data: generate(6, 1.4), points: { symbol: "triangle" } },
- { data: generate(7, 1.1), points: { symbol: "cross" } },
- { data: generate(8, 1.0), points: { symbol: "ellipse" } },
- { data: generate(9, 1.3), points: { symbol: "plus" } }
- ];
- $.plot("#placeholder", data, {
- series: {
- points: {
- show: true,
- radius: 3,
- lineWidth: 2
- }
- },
- grid: {
- hoverable: true
- }
- });
- // Add the Flot version string to the footer
- $("#footer").prepend("Flot " + $.plot.version + " – ");
- });
- </script>
- </head>
- <body>
- <div id="header">
- <h2>Symbols</h2>
- </div>
- <div id="content">
- <div class="demo-container">
- <div id="placeholder" class="demo-placeholder"></div>
- </div>
- <p>Points can be marked in several ways, with circles being the built-in default. For other point types, you can define a callback function to draw the symbol. Some common symbols are available in the symbol plugin.</p>
- </div>
- <div id="footer">
- Copyright © 2007 - 2014 IOLA and Ole Laursen
- </div>
- </body>
- </html>
|