Git.Storage.Web/Theme/plugins/flot/examples/zooming.html

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Flot Examples</title>
    <link href="layout.css" rel="stylesheet" type="text/css">
    <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../excanvas.min.js"></script><![endif]-->
    <script language="javascript" type="text/javascript" src="../jquery.js"></script>
    <script language="javascript" type="text/javascript" src="../jquery.flot.js"></script>
    <script language="javascript" type="text/javascript" src="../jquery.flot.selection.js"></script>
 </head>
    <body>
    <h1>Flot Examples</h1>

    <div style="float:left">
      <div id="placeholder" style="width:500px;height:300px"></div>
    </div>
    
    <div id="miniature" style="float:left;margin-left:20px">
      <div id="overview" style="width:166px;height:100px"></div>

      <p id="overviewLegend" style="margin-left:10px"></p>
    </div>

    <p style="clear:left">The selection support makes it easy to
    construct flexible zooming schemes. With a few lines of code, the
    small overview plot to the right has been connected to the large
    plot. Try selecting a rectangle on either of them.</p>

<script id="source">
$(function () {
    // setup plot
    function getData(x1, x2) {
        var d = [];
        for (var i = 0; i <= 100; ++i) {
            var x = x1 + i * (x2 - x1) / 100;
            d.push([x, Math.sin(x * Math.sin(x))]);
        }

        return [
            { label: "sin(x sin(x))", data: d }
        ];
    }

    var options = {
        legend: { show: false },
        series: {
            lines: { show: true },
            points: { show: true }
        },
        yaxis: { ticks: 10 },
        selection: { mode: "xy" }
    };

    var startData = getData(0, 3 * Math.PI);
    
    var plot = $.plot($("#placeholder"), startData, options);

    // setup overview
    var overview = $.plot($("#overview"), startData, {
后面还有 38 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。