Subversion-Projekte lars-tiefland.cienc

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
9 lars 1
<!DOCTYPE html>
2
 
3
<html>
4
<head>
5
 
6
    <title>Area Chart 2</title>
7
 
8
    <link class="include" rel="stylesheet" type="text/css" href="../jquery.jqplot.min.css" />
9
    <link rel="stylesheet" type="text/css" href="examples.min.css" />
10
    <link type="text/css" rel="stylesheet" href="syntaxhighlighter/styles/shCoreDefault.min.css" />
11
    <link type="text/css" rel="stylesheet" href="syntaxhighlighter/styles/shThemejqPlot.min.css" />
12
 
13
    <!--[if lt IE 9]><script language="javascript" type="text/javascript" src="../excanvas.js"></script><![endif]-->
14
    <script class="include" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
15
 
16
 
17
</head>
18
<body>
19
    <div id="header">
20
        <div class="nav">
21
            <a class="nav" href="../../../index.php"><span>&gt;</span>Home</a>
22
            <a class="nav"  href="../../../docs/"><span>&gt;</span>Docs</a>
23
            <a class="nav"  href="../../download/"><span>&gt;</span>Download</a>
24
            <a class="nav" href="../../../info.php"><span>&gt;</span>Info</a>
25
            <a class="nav"  href="../../../donate.php"><span>&gt;</span>Donate</a>
26
        </div>
27
    </div>
28
    <div class="colmask leftmenu">
29
      <div class="colleft">
30
        <div class="col1" id="example-content">
31
 
32
 
33
<!-- Example scripts go here -->
34
 
35
 
36
  <link class="include" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/themes/smoothness/jquery-ui.css" rel="Stylesheet" />
37
 
38
   <style type="text/css">
39
 
40
    .chart-container {
41
        border: 1px solid darkblue;
42
        padding: 30px 0px 30px 30px;
43
        width: 900px;
44
        height: 400px;
45
 
46
    }
47
 
48
    table.jqplot-table-legend {
49
        border: 0px;
50
    }
51
 
52
    td.jqplot-table-legend-label {
53
      padding: 0.25em;
54
    }
55
 
56
    td.jqplot-table-legend-label + td.jqplot-table-legend-swatch {
57
        padding-left: 1.5em;
58
    }
59
 
60
    div.jqplot-table-legend-swatch {
61
        border-width: 4px 6px;
62
    }
63
 
64
    div.jqplot-table-legend-swatch-outline {
65
        border: none;
66
    }
67
 
68
    #chart1 {
69
        width: 96%;
70
        height: 96%;
71
    }
72
 
73
    .jqplot-datestamp {
74
      font-size: 0.8em;
75
      color: #777;
76
/*      margin-top: 1em;
77
      text-align: right;*/
78
      font-style: italic;
79
      position: absolute;
80
      bottom: 15px;
81
      right: 15px;
82
    }
83
 
84
    td.controls li {
85
        list-style-type: none;
86
    }
87
 
88
    td.controls ul {
89
        margin-top: 0.5em;
90
        padding-left: 0.2em;
91
    }
92
 
93
    pre.code {
94
        margin-top: 45px;
95
        clear: both;
96
    }
97
 
98
  </style>
99
 
100
      <div class="chart-container">
101
        <div id="chart1"></div>
102
        <div class="jqplot-datestamp"></div>
103
    </div>
104
 
105
    <pre class="code brush:js"></pre>
106
 
107
  <script class="common" type="text/javascript">
108
    var data = {
109
      "rural": [0.9176, 0.9296, 0.927, 0.9251, 0.9241, 0.9225, 0.9197, 0.9164, 0.9131, 0.9098, 0.9064, 0.9028, 0.8991, 0.8957, 0.8925, 0.8896, 0.8869, 0.8844, 0.882, 0.8797, 0.8776, 0.8755, 0.8735, 0.8715, 0.8696, 0.8677, 0.8658, 0.8637, 0.8616, 0.8594, 0.8572, 0.8548, 0.8524, 0.8499, 0.8473, 0.8446, 0.8418, 0.8389, 0.8359, 0.8328, 0.8295, 0.8262, 0.8227, 0.8191, 0.8155, 0.8119, 0.8083, 0.8048, 0.8013, 0.7979, 0.7945, 0.7912, 0.7879, 0.7846, 0.7813, 0.778, 0.7747, 0.7714, 0.768, 0.7647, 0.7612, 0.7577, 0.7538, 0.7496, 0.7449, 0.7398, 0.7342, 0.7279, 0.721, 0.7137, 0.7059, 0.6977, 0.6889, 0.6797, 0.6698, 0.6593, 0.6482, 0.6367, 0.6247, 0.6121, 0.5989, 0.5852, 0.571, 0.5561, 0.5402, 0.5232, 0.505, 0.4855, 0.4643, 0.4414, 0.4166, 0.3893, 0.3577, 0.3204, 0.2764, 0.2272, 0.1774, 0.1231, 0.0855, 0.0849],
110
      "urban": [0.0824, 0.0704, 0.073, 0.0749, 0.0759, 0.0775, 0.0803, 0.0836, 0.0869, 0.0902, 0.0936, 0.0972, 0.1009, 0.1043, 0.1075, 0.1104, 0.1131, 0.1156, 0.118, 0.1203, 0.1224, 0.1245, 0.1265, 0.1285, 0.1304, 0.1323, 0.1342, 0.1363, 0.1384, 0.1406, 0.1428, 0.1452, 0.1476, 0.1501, 0.1527, 0.1554, 0.1582, 0.1611, 0.1641, 0.1672, 0.1705, 0.1738, 0.1773, 0.1809, 0.1845, 0.1881, 0.1917, 0.1952, 0.1987, 0.2021, 0.2055, 0.2088, 0.2121, 0.2154, 0.2187, 0.222, 0.2253, 0.2286, 0.232, 0.2353, 0.2388, 0.2423, 0.2462, 0.2504, 0.2551, 0.2602, 0.2658, 0.2721, 0.279, 0.2863, 0.2941, 0.3023, 0.3111, 0.3203, 0.3302, 0.3407, 0.3518, 0.3633, 0.3753, 0.3879, 0.4011, 0.4148, 0.429, 0.4439, 0.4598, 0.4768, 0.495, 0.5145, 0.5357, 0.5586, 0.5834, 0.6107, 0.6423, 0.6796, 0.7236, 0.7728, 0.8226, 0.8769, 0.9145, 0.9151]
111
    };
112
 
113
  </script>
114
 
115
  <script class="code" type="text/javascript">
116
$(document).ready(function(){
117
 
118
    var labels = ['Rural', 'Urban'];
119
 
120
    // make the plot
121
    plot1 = $.jqplot('chart1', [data.rural, data.urban], {
122
        title: 'Contribution of Urban and Rural Population to National Percentiles (edited data)',
123
        stackSeries: true,
124
        seriesColors: ['#77933C', '#B9CDE5'],
125
        seriesDefaults: {
126
            showMarker: false,
127
            fill: true,
128
            fillAndStroke: true
129
        },
130
        legend: {
131
            show: true,
132
            renderer: $.jqplot.EnhancedLegendRenderer,
133
            rendererOptions: {
134
                numberRows: 1
135
            },
136
            placement: 'outsideGrid',
137
            labels: labels,
138
            location: 's'
139
        },
140
        axes: {
141
            xaxis: {
142
                pad: 0,
143
                min: 1,
144
                max: 100,
145
                label: 'Population Percentile',
146
                labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
147
                tickInterval: 3,
148
                tickOptions: {
149
                    showGridline: false
150
                }
151
            },
152
            yaxis: {
153
                min: 0,
154
                max: 1,
155
                label: 'Percentage of Population',
156
                labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
157
                tickOptions: {
158
                  formatter: $.jqplot.PercentTickFormatter,
159
                  showGridline: false,
160
                  formatString: '%d%%'
161
                }
162
            }
163
        },
164
        grid: {
165
            drawBorder: false,
166
            shadow: false,
167
            // background: 'rgba(0,0,0,0)'  works to make transparent.
168
            background: 'white'
169
        }
170
    });
171
 
172
    // data is in json format in plain file.
173
    // Each series is represented by a 1-D array of y values.
174
    // X values will be added by jqPlot and will start 1 by default.
175
    //$.getJSON('kcp_area2.json', '', makePlot);
176
 
177
    // add a date at the bottom.
178
 
179
    var d = new $.jsDate();
180
    $('div.jqplot-datestamp').html('Generated on '+d.strftime('%v'));
181
 
182
    // make it resizable.
183
 
184
    $("div.chart-container").resizable({delay:20});
185
 
186
    $('div.chart-container').bind('resize', function(event, ui) {
187
        plot1.replot();
188
    });
189
});
190
 
191
</script>
192
 
193
 
194
<!-- End example scripts -->
195
 
196
<!-- Don't touch this! -->
197
 
198
 
199
    <script class="include" type="text/javascript" src="../jquery.jqplot.min.js"></script>
200
    <script type="text/javascript" src="syntaxhighlighter/scripts/shCore.min.js"></script>
201
    <script type="text/javascript" src="syntaxhighlighter/scripts/shBrushJScript.min.js"></script>
202
    <script type="text/javascript" src="syntaxhighlighter/scripts/shBrushXml.min.js"></script>
203
<!-- End Don't touch this! -->
204
 
205
<!-- Additional plugins go here -->
206
 
207
  <script class="include" type="text/javascript" src="../plugins/jqplot.enhancedLegendRenderer.min.js"></script>
208
  <script class="include" type="text/javascript" src="../plugins/jqplot.canvasTextRenderer.min.js"></script>
209
  <script class="include" type="text/javascript" src="../plugins/jqplot.canvasAxisLabelRenderer.min.js"></script>
210
  <script class="include" type="text/javascript" src="jquery-ui/js/jquery-ui.min.js"></script>
211
 
212
<!-- End additional plugins -->
213
 
214
        </div>
215
         <div class="col2">
216
 
217
           <div class="example-link"><a class="example-link" href="data-renderers.html">AJAX and JSON Data Loading via Data Renderers</a></div>
218
           <div class="example-link"><a class="example-link" href="barLineAnimated.html">Animated Charts</a></div>
219
           <div class="example-link"><a class="example-link" href="dashboardWidget.html">Animated Dashboard Sample - Filled Line with Log Axis</a></div>
220
           <div class="example-link"><a class="example-link" href="kcp_area.html">Area Chart</a></div>
221
           <div class="example-link"><a class="example-link" href="kcp_area2.html">Area Chart 2</a></div>
222
           <div class="example-link"><a class="example-link" href="axisLabelTests.html">Axis Labels</a></div>
223
           <div class="example-link"><a class="example-link" href="axisLabelsRotatedText.html">Axis Labels and Rotated Text</a></div>
224
           <div class="example-link"><a class="example-link" href="barTest.html">Bar Charts</a></div>
225
           <div class="example-link"><a class="example-link" href="multipleBarColors.html">Bar Colors Example</a></div>
226
           <div class="example-link"><a class="example-link" href="bezierCurve.html">Bezier Curve Plots</a></div>
227
           <div class="example-link"><a class="example-link" href="blockPlot.html">Block Plots</a></div>
228
           <div class="example-link"><a class="example-link" href="bubbleChart.html">Bubble Charts</a></div>
229
           <div class="example-link"><a class="example-link" href="bubble-plots.html">Bubble Plots</a></div>
230
           <div class="example-link"><a class="example-link" href="candlestick.html">Candlestick and Open Hi Low Close Charts</a></div>
231
           <div class="example-link"><a class="example-link" href="theming.html">Chart Theming</a></div>
232
           <div class="example-link"><a class="example-link" href="fillBetweenLines.html">Charts with Fill Between Lines</a></div>
233
           <div class="example-link"><a class="example-link" href="kcp_cdf.html">Cumulative Density Function Chart</a></div>
234
           <div class="example-link"><a class="example-link" href="dashedLines.html">Dashed Lines with Smoothing</a></div>
235
           <div class="example-link"><a class="example-link" href="cursor-highlighter.html">Data Point Highlighting, Tooltips and Cursor Tracking</a></div>
236
           <div class="example-link"><a class="example-link" href="point-labels.html">Data Point labels</a></div>
237
           <div class="example-link"><a class="example-link" href="date-axes.html">Date Axes</a></div>
238
           <div class="example-link"><a class="example-link" href="dateAxisRenderer.html">Date Axes 2</a></div>
239
           <div class="example-link"><a class="example-link" href="rotatedTickLabelsZoom.html">Date Axes, Rotated Labels and Zooming</a></div>
240
           <div class="example-link"><a class="example-link" href="canvas-overlay.html">Draw Lines on Plots - Canvas Overlay</a></div>
241
           <div class="example-link"><a class="example-link" href="draw-rectangles.html">Draw Rectangles on Plots</a></div>
242
           <div class="example-link"><a class="example-link" href="kcp_engel.html">Engel Curves</a></div>
243
           <div class="example-link"><a class="example-link" href="bandedLine.html">Error Bands and Confidence Intervals</a></div>
244
           <div class="example-link"><a class="example-link" href="area.html">Filled (Area) Charts</a></div>
245
           <div class="example-link"><a class="example-link" href="axisScalingForceTickAt.html">Force Plot to Have Tick at 0 or 100</a></div>
246
           <div class="example-link"><a class="example-link" href="hiddenPlotsInTabs.html">Hidden Plots</a></div>
247
           <div class="example-link"><a class="example-link" href="customHighlighterCursorTrendline.html">Highlighting, Dragging Points, Cursor and Trend Lines</a></div>
248
           <div class="example-link"><a class="example-link" href="line-charts.html">Line Charts and Options</a></div>
249
           <div class="example-link"><a class="example-link" href="kcp_lorenz.html">Lorenz Curves</a></div>
250
           <div class="example-link"><a class="example-link" href="mekkoCharts.html">Mekko Charts</a></div>
251
           <div class="example-link"><a class="example-link" href="meterGauge.html">Meter Gauge</a></div>
252
           <div class="example-link"><a class="example-link" href="candlestick-charts.html">Open Hi Low Close and Candlestick Charts</a></div>
253
           <div class="example-link"><a class="example-link" href="pieTest.html">Pie Charts and Options</a></div>
254
           <div class="example-link"><a class="example-link" href="pieTest4.html">Pie Charts and Options 2</a></div>
255
           <div class="example-link"><a class="example-link" href="pie-donut-charts.html">Pie and Donut Charts</a></div>
256
           <div class="example-link"><a class="example-link" href="selectorSyntax.html">Plot Creation with jQuery Selectors</a></div>
257
           <div class="example-link"><a class="example-link" href="zooming.html">Plot Zooming and Cursor Control</a></div>
258
           <div class="example-link"><a class="example-link" href="kcp_pdf.html">Probability Density Function Chart</a></div>
259
           <div class="example-link"><a class="example-link" href="kcp_pyramid_by_age.html">Pyramid Chart By Age</a></div>
260
           <div class="example-link"><a class="example-link" href="kcp_pyramid.html">Pyramid Charts</a></div>
261
           <div class="example-link"><a class="example-link" href="kcp_pyramid2.html">Pyramid Charts 2</a></div>
262
           <div class="example-link"><a class="example-link" href="kcp_quintiles.html">Quintile Pyramid Charts</a></div>
263
           <div class="example-link"><a class="example-link" href="resizablePlot.html">Resizable Plots</a></div>
264
           <div class="example-link"><a class="example-link" href="rotated-tick-labels.html">Rotated Labels and Font Styling</a></div>
265
           <div class="example-link"><a class="example-link" href="smoothedLine.html">Smoothed Lines</a></div>
266
           <div class="example-link"><a class="example-link" href="bar-charts.html">Vertical and Horizontal Bar Charts</a></div>
267
           <div class="example-link"><a class="example-link" href="waterfall.html">Waterfall Charts</a></div>
268
           <div class="example-link"><a class="example-link" href="waterfall2.html">Waterfall Charts 2</a></div>
269
           <div class="example-link"><a class="example-link" href="zoomOptions.html">Zoom Options</a></div>
270
           <div class="example-link"><a class="example-link" href="zoomProxy.html">Zoom Proxy - Control one plot from another</a></div>
271
           <div class="example-link"><a class="example-link" href="zoom1.html">Zooming</a></div>
272
           <div class="example-link"><a class="example-link" href="dateAxisLogAxisZooming.html">Zooming with Date and Log Axes</a></div>
273
 
274
         </div>
275
               </div>
276
    </div>
277
    <script type="text/javascript" src="example.min.js"></script>
278
 
279
</body>
280
 
281
 
282
</html>