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</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
        font-size: 0.65em;
50
        line-height: 1em;
51
        margin: 0px 0px 10px 15px;
52
        border-collapse: collapse;
53
    }
54
 
55
    td.jqplot-table-legend-label {
56
      width: 20em;
57
    }
58
 
59
    div.jqplot-table-legend-swatch {
60
        border-width: 2px 6px;
61
    }
62
 
63
    div.jqplot-table-legend-swatch-outline {
64
        border: none;
65
    }
66
 
67
    tr.jqplot-table-legend td {
68
        padding: 2px;
69
    }
70
 
71
    .legend-row-highlighted {
72
        background-color: #666666;
73
    }
74
 
75
    .legend-text-highlighted {
76
        color: #ffffff;
77
    }
78
 
79
    #chart1 {
80
        width: 96%;
81
        height: 96%;
82
    }
83
 
84
    .jqplot-datestamp {
85
      font-size: 0.8em;
86
      color: #777;
87
/*      margin-top: 1em;
88
      text-align: right;*/
89
      font-style: italic;
90
      position: absolute;
91
      bottom: 15px;
92
      right: 15px;
93
    }
94
 
95
    td.controls li {
96
        list-style-type: none;
97
    }
98
 
99
    td.controls ul {
100
        margin-top: 0.5em;
101
        padding-left: 0.2em;
102
    }
103
 
104
    pre.code {
105
        margin-top: 45px;
106
        clear: both;
107
    }
108
 
109
  </style>
110
 
111
      <div class="chart-container">
112
        <div id="chart1"></div>
113
        <div class="jqplot-datestamp"></div>
114
    </div>
115
 
116
    <pre class="code brush:js"></pre>
117
 
118
  <script class="common" type="text/javascript">
119
    var data = [
120
      [15.8442,13.0993,11.2898,10.7892,10.252,9.0165,8.5287,7.7442,6.9867,6.5213,5.9473,5.4766,4.9214,4.6398,3.8935,3.5228,3.0128,2.4847,2.0357,1.0672],
121
      [1.7703,2.2535,2.2753,2.7927,2.2509,2.4341,2.5518,2.5547,2.4204,2.4186,2.4261,2.2927,2.4386,2.2295,2.2203,1.915,1.8791,1.7941,1.6567,0.9296],
122
      [8.3728,8.1221,8.3989,7.9758,8.8246,8.2377,8.432,7.8466,7.5343,7.1171,6.9801,6.9349,5.8307,5.7089,4.927,4.2237,3.6872,3.1429,2.581,1.3766],
123
      [9.1249,8.7326,7.6122,7.8577,7.1625,6.8527,6.5158,6.1715,6.1298,5.8702,5.3456,4.9906,4.4424,4.3022,3.5298,3.405,2.9977,2.4159,2.0832,1.1499],
124
      [8.0508,7.7875,7.6534,7.4448,7.3702,7.4188,7.3882,7.1647,6.9617,6.6576,6.6077,6.4823,5.9117,5.8149,5.505,5.5355,5.0907,4.569,4.3049,2.6325],
125
      [10.4408,9.8278,9.9293,9.5176,9.6658,9.2359,9.2842,8.6497,8.7656,8.2962,8.155,7.7294,7.3674,6.9888,6.2995,5.7314,5.2703,4.6947,3.9614,2.2509],
126
      [4.1883,4.7514,5.3198,5.8819,5.1732,5.5764,6.1713,6.7915,6.8511,7.2681,7.1461,8.109,9.2649,9.5322,11.2138,12.8299,12.9621,13.8936,13.7828,10.0525],
127
      [0.6641,0.8454,0.9018,1.0461,1.0113,1.235,1.279,1.3049,1.5024,1.4471,1.5358,1.5796,1.6471,1.6443,1.6562,1.6763,1.6097,1.5039,1.3752,0.864],
128
      [0.5221,0.6997,0.8513,0.8849,0.9168,0.9099,0.8339,0.9921,1.1169,1.1764,1.1936,1.1415,1.1181,1.2889,1.1378,1.023,1.1283,1.0417,0.9839,0.587],
129
      [1.0969,1.188,1.0713,1.2803,1.1787,1.148,1.3229,1.1726,1.3764,1.3887,1.4011,1.3034,1.4368,1.5017,1.4899,1.4123,1.3168,1.1407,0.8458,0.38],
130
      [2.275,2.5511,3.1025,2.9834,3.2857,3.7625,3.1928,3.7071,4.0364,3.629,3.9258,3.2208,3.7113,3.3166,3.4775,3.429,3.6121,3.4569,3.8416,4.1323],
131
      [16.0654,15.719,16.3773,16.0175,15.8853,16.132,16.1309,16.3491,15.8512,16.4743,16.2862,15.7327,16.2793,16.6329,17.4903,17.4425,17.3413,18.3527,18.5029,15.2763],
132
      [1.1145,1.176,1.1183,1.0411,1.0058,1.0796,1.0321,1.0714,1.1117,1.0278,1.136,1.1397,1.1556,1.2206,1.2871,1.2361,1.2111,1.2312,1.1545,0.7881],
133
      [4.5928,4.7558,4.8855,4.4684,4.6677,4.6038,4.7789,4.6098,4.4171,4.5078,4.4137,4.4645,4.2693,4.2836,4.1709,4.159,3.8423,3.9957,3.6816,2.5785],
134
      [2.1027,2.1576,2.0721,2.0623,2.3498,2.2573,2.2866,2.3766,2.2488,2.3665,2.3445,2.2474,2.3345,2.2479,2.158,2.355,2.0744,2.2269,3.0474,3.8925],
135
      [1.2709,1.6007,1.3996,1.612,1.4649,1.5875,1.7056,1.7315,1.7378,2.0401,2.3265,2.1096,2.0513,2.1548,2.0634,2.2206,1.8427,2.4817,2.3066,2.1685],
136
      [4.6414,5.6167,5.9571,6.5372,7.0242,7.6332,7.9823,8.3906,9.112,9.6872,10.2014,11.0074,11.375,11.6753,12.0489,12.0692,13.2962,13.2183,14.6559,32.0912],
137
      [0.2334,0.3642,0.5267,0.5911,0.8888,1.1633,1.0997,1.76,1.9811,2.1708,2.931,3.2634,3.6254,4.107,4.6944,5.0941,5.9984,6.2419,6.6059,5.8353],
138
      [2.2553,2.8903,2.9564,3.2839,3.4822,3.255,3.1666,3.4245,3.4066,3.8536,3.6333,4.0331,4.4847,4.3552,4.2768,4.1439,4.7196,4.6585,4.4286,3.921],
139
      [0.3437,0.3282,0.4805,0.3881,0.4796,0.9766,0.6589,0.6443,1.0423,0.7941,1.064,1.5504,1.3977,1.5226,1.8344,1.9186,2.3022,2.8188,2.8424,2.7792],
140
      [3.4466,3.5641,3.5711,3.4219,3.2835,3.3569,3.3416,3.4544,3.3675,3.2806,3.118,3.1881,3.2252,3.0588,3.0051,2.9868,3.0361,2.8972,2.9611,2.2867],
141
      [1.5831,1.9691,2.2498,2.122,2.3766,2.1273,2.3165,2.0884,2.0421,2.0067,1.8809,2.0027,1.7115,1.7734,1.6204,1.6702,1.769,1.7391,2.3607,2.9604],
142
      [58.4561,55.4196,53.3806,53.3059,51.7105,50.007,50.1509,48.2276,47.1521,45.5962,44.1436,43.5952,41.8242,40.8606,39.2451,38.8396,36.5095,34.4988,31.7809,20.3231],
143
      [41.5439,44.5804,46.6194,46.6941,48.2895,49.993,49.8491,51.7724,52.8479,54.4038,55.8564,56.4048,58.1758,59.1394,60.7549,61.1604,63.4905,65.5012,68.2191,79.6769]
144
    ];
145
  </script>
146
 
147
  <script class="code" type="text/javascript">
148
$(document).ready(function(){
149
 
150
    var labels = ["Rice", "Bread and other cereals", "Fish and seafood", "Fruits and vegetables", "Other food products",
151
        "Catering services", "Non-alcoholic beverages", "Alcoholic beverages", "Tobacco and narcotics", "Clothing and footwear",
152
        "Rentals (actual or imputed) and maintenance and repair of the dwelling", "Water supply and miscellaneous services related to the dwelling",
153
        "Electricity gas and other fuels", "Furnishing household equipment and routine household maintenance", "Health", "Transport",
154
        "Communication", "Recreation and culture", "Education", "Personal care", "Other miscellaneous goods and services",
155
        "Food and non-alcoholic beverages", "Non food"]
156
    var ticks = [[1, "v01"], [2, "v02"], [3, "v03"], [4, "v04"], [5, "v05"],
157
      [6, "v06"], [7, "v07"], [8, "v08"], [9, "v09"], [10, "v10"],
158
      [11, "v11"], [12, "v12"], [13, "v13"], [14, "v14"], [15, "v15"],
159
      [16, "v16"], [17, "v17"], [18, "v18"], [19, "v19"], [20, "v20"]];    // make the plot
160
 
161
    plot1 = $.jqplot('chart1', data, {
162
        title: 'Area Plot',
163
        stackSeries: true,
164
        seriesDefaults: {
165
            showMarker: false,
166
            fill: true,
167
            fillAndStroke: true
168
        },
169
        legend: {
170
            show: true,
171
            placement: 'outsideGrid',
172
            labels: labels,
173
            location: 'ne',
174
            rowSpacing: '0px'
175
        },
176
        axesDefaults: {
177
            labelRenderer: $.jqplot.CanvasAxisLabelRenderer
178
        },
179
        axes: {
180
            xaxis: {
181
                pad: 0,
182
                ticks: ticks,
183
                label: 'Population Vingtile',
184
                tickOptions: {
185
                    showGridline: false
186
                }
187
            },
188
            yaxis: {
189
                min: 0,
190
                max: 100,
191
                label: 'Share of Item in Total Expenditure (%)',
192
                tickOptions: {
193
                  showGridline: false,
194
                  suffix: '%'
195
                }
196
            }
197
        },
198
        grid: {
199
            drawBorder: false,
200
            shadow: false,
201
            // background: 'rgba(0,0,0,0)'  works to make transparent.
202
            background: 'white'
203
        }
204
    });
205
 
206
    // add a date at the bottom.
207
 
208
    var d = new $.jsDate();
209
    $('div.jqplot-datestamp').html('Generated on '+d.strftime('%v'));
210
 
211
    // make it resizable.
212
 
213
    $("div.chart-container").resizable({delay:20});
214
 
215
    $('div.chart-container').bind('resize', function(event, ui) {
216
        plot1.replot();
217
    });
218
 
219
    $('#chart1').bind('jqplotDataHighlight', function(ev, seriesIndex, pointIndex, data) {
220
        var idx = 21 - seriesIndex
221
        $('tr.jqplot-table-legend').removeClass('legend-row-highlighted');
222
        $('tr.jqplot-table-legend').children('.jqplot-table-legend-label').removeClass('legend-text-highlighted');
223
        $('tr.jqplot-table-legend').eq(idx).addClass('legend-row-highlighted');
224
        $('tr.jqplot-table-legend').eq(idx).children('.jqplot-table-legend-label').addClass('legend-text-highlighted');
225
    });
226
 
227
    $('#chart1').bind('jqplotDataUnhighlight', function(ev, seriesIndex, pointIndex, data) {
228
        $('tr.jqplot-table-legend').removeClass('legend-row-highlighted');
229
        $('tr.jqplot-table-legend').children('.jqplot-table-legend-label').removeClass('legend-text-highlighted');
230
    });
231
});
232
 
233
</script>
234
 
235
 
236
<!-- End example scripts -->
237
 
238
<!-- Don't touch this! -->
239
 
240
 
241
    <script class="include" type="text/javascript" src="../jquery.jqplot.min.js"></script>
242
    <script type="text/javascript" src="syntaxhighlighter/scripts/shCore.min.js"></script>
243
    <script type="text/javascript" src="syntaxhighlighter/scripts/shBrushJScript.min.js"></script>
244
    <script type="text/javascript" src="syntaxhighlighter/scripts/shBrushXml.min.js"></script>
245
<!-- End Don't touch this! -->
246
 
247
<!-- Additional plugins go here -->
248
 
249
  <script class="include" type="text/javascript" src="jquery-ui/js/jquery-ui.min.js"></script>
250
  <script class="include" type="text/javascript" src="../plugins/jqplot.canvasTextRenderer.min.js"></script>
251
  <script class="include" type="text/javascript" src="../plugins/jqplot.canvasAxisLabelRenderer.min.js"></script>
252
 
253
<!-- End additional plugins -->
254
 
255
        </div>
256
         <div class="col2">
257
 
258
           <div class="example-link"><a class="example-link" href="data-renderers.html">AJAX and JSON Data Loading via Data Renderers</a></div>
259
           <div class="example-link"><a class="example-link" href="barLineAnimated.html">Animated Charts</a></div>
260
           <div class="example-link"><a class="example-link" href="dashboardWidget.html">Animated Dashboard Sample - Filled Line with Log Axis</a></div>
261
           <div class="example-link"><a class="example-link" href="kcp_area.html">Area Chart</a></div>
262
           <div class="example-link"><a class="example-link" href="kcp_area2.html">Area Chart 2</a></div>
263
           <div class="example-link"><a class="example-link" href="axisLabelTests.html">Axis Labels</a></div>
264
           <div class="example-link"><a class="example-link" href="axisLabelsRotatedText.html">Axis Labels and Rotated Text</a></div>
265
           <div class="example-link"><a class="example-link" href="barTest.html">Bar Charts</a></div>
266
           <div class="example-link"><a class="example-link" href="multipleBarColors.html">Bar Colors Example</a></div>
267
           <div class="example-link"><a class="example-link" href="bezierCurve.html">Bezier Curve Plots</a></div>
268
           <div class="example-link"><a class="example-link" href="blockPlot.html">Block Plots</a></div>
269
           <div class="example-link"><a class="example-link" href="bubbleChart.html">Bubble Charts</a></div>
270
           <div class="example-link"><a class="example-link" href="bubble-plots.html">Bubble Plots</a></div>
271
           <div class="example-link"><a class="example-link" href="candlestick.html">Candlestick and Open Hi Low Close Charts</a></div>
272
           <div class="example-link"><a class="example-link" href="theming.html">Chart Theming</a></div>
273
           <div class="example-link"><a class="example-link" href="fillBetweenLines.html">Charts with Fill Between Lines</a></div>
274
           <div class="example-link"><a class="example-link" href="kcp_cdf.html">Cumulative Density Function Chart</a></div>
275
           <div class="example-link"><a class="example-link" href="dashedLines.html">Dashed Lines with Smoothing</a></div>
276
           <div class="example-link"><a class="example-link" href="cursor-highlighter.html">Data Point Highlighting, Tooltips and Cursor Tracking</a></div>
277
           <div class="example-link"><a class="example-link" href="point-labels.html">Data Point labels</a></div>
278
           <div class="example-link"><a class="example-link" href="date-axes.html">Date Axes</a></div>
279
           <div class="example-link"><a class="example-link" href="dateAxisRenderer.html">Date Axes 2</a></div>
280
           <div class="example-link"><a class="example-link" href="rotatedTickLabelsZoom.html">Date Axes, Rotated Labels and Zooming</a></div>
281
           <div class="example-link"><a class="example-link" href="canvas-overlay.html">Draw Lines on Plots - Canvas Overlay</a></div>
282
           <div class="example-link"><a class="example-link" href="draw-rectangles.html">Draw Rectangles on Plots</a></div>
283
           <div class="example-link"><a class="example-link" href="kcp_engel.html">Engel Curves</a></div>
284
           <div class="example-link"><a class="example-link" href="bandedLine.html">Error Bands and Confidence Intervals</a></div>
285
           <div class="example-link"><a class="example-link" href="area.html">Filled (Area) Charts</a></div>
286
           <div class="example-link"><a class="example-link" href="axisScalingForceTickAt.html">Force Plot to Have Tick at 0 or 100</a></div>
287
           <div class="example-link"><a class="example-link" href="hiddenPlotsInTabs.html">Hidden Plots</a></div>
288
           <div class="example-link"><a class="example-link" href="customHighlighterCursorTrendline.html">Highlighting, Dragging Points, Cursor and Trend Lines</a></div>
289
           <div class="example-link"><a class="example-link" href="line-charts.html">Line Charts and Options</a></div>
290
           <div class="example-link"><a class="example-link" href="kcp_lorenz.html">Lorenz Curves</a></div>
291
           <div class="example-link"><a class="example-link" href="mekkoCharts.html">Mekko Charts</a></div>
292
           <div class="example-link"><a class="example-link" href="meterGauge.html">Meter Gauge</a></div>
293
           <div class="example-link"><a class="example-link" href="candlestick-charts.html">Open Hi Low Close and Candlestick Charts</a></div>
294
           <div class="example-link"><a class="example-link" href="pieTest.html">Pie Charts and Options</a></div>
295
           <div class="example-link"><a class="example-link" href="pieTest4.html">Pie Charts and Options 2</a></div>
296
           <div class="example-link"><a class="example-link" href="pie-donut-charts.html">Pie and Donut Charts</a></div>
297
           <div class="example-link"><a class="example-link" href="selectorSyntax.html">Plot Creation with jQuery Selectors</a></div>
298
           <div class="example-link"><a class="example-link" href="zooming.html">Plot Zooming and Cursor Control</a></div>
299
           <div class="example-link"><a class="example-link" href="kcp_pdf.html">Probability Density Function Chart</a></div>
300
           <div class="example-link"><a class="example-link" href="kcp_pyramid_by_age.html">Pyramid Chart By Age</a></div>
301
           <div class="example-link"><a class="example-link" href="kcp_pyramid.html">Pyramid Charts</a></div>
302
           <div class="example-link"><a class="example-link" href="kcp_pyramid2.html">Pyramid Charts 2</a></div>
303
           <div class="example-link"><a class="example-link" href="kcp_quintiles.html">Quintile Pyramid Charts</a></div>
304
           <div class="example-link"><a class="example-link" href="resizablePlot.html">Resizable Plots</a></div>
305
           <div class="example-link"><a class="example-link" href="rotated-tick-labels.html">Rotated Labels and Font Styling</a></div>
306
           <div class="example-link"><a class="example-link" href="smoothedLine.html">Smoothed Lines</a></div>
307
           <div class="example-link"><a class="example-link" href="bar-charts.html">Vertical and Horizontal Bar Charts</a></div>
308
           <div class="example-link"><a class="example-link" href="waterfall.html">Waterfall Charts</a></div>
309
           <div class="example-link"><a class="example-link" href="waterfall2.html">Waterfall Charts 2</a></div>
310
           <div class="example-link"><a class="example-link" href="zoomOptions.html">Zoom Options</a></div>
311
           <div class="example-link"><a class="example-link" href="zoomProxy.html">Zoom Proxy - Control one plot from another</a></div>
312
           <div class="example-link"><a class="example-link" href="zoom1.html">Zooming</a></div>
313
           <div class="example-link"><a class="example-link" href="dateAxisLogAxisZooming.html">Zooming with Date and Log Axes</a></div>
314
 
315
         </div>
316
               </div>
317
    </div>
318
    <script type="text/javascript" src="example.min.js"></script>
319
 
320
</body>
321
 
322
 
323
</html>