1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
| <!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="Author" content="Daniel Hagnoul">
<title>Forum jQuery</title>
<link rel='stylesheet' href='http://fonts.googleapis.com/css?family=Redressed&subset=latin&v2'>
<link rel="stylesheet" href="http://danielhagnoul.developpez.com/lib/jPicker/css/jPicker.dvjh-1.1.6.min.css" />
<link rel="stylesheet" href="../jqPlot/jquery.jqplot.css" />
<style>
/* Base */
div,p,h1,h2,h3,h4,h5,h6,ul,ol,dl,form,table,img {margin:0; padding:0; }
body {background-color:rgba(210, 214, 98, 0.5); color:#000000; font-family:sans-serif; font-size:medium; font-style:normal; font-weight:normal; line-height:normal; letter-spacing:normal; }
h1,h2,h3,h4,h5 {font-family:'Redressed', cursive; padding:6px; }
p, div, td {word-wrap:break-word; }
pre, code {white-space:pre-wrap; word-wrap:break-word; }
img, input, textarea, select {max-width:100%; }
img {border:none; }
h1 {font-size:2em; text-shadow: 4px 4px 4px #bbbbbb; text-align:center; }
p {padding:6px; }
.conteneur {width:95%; min-width:800px; min-height:300px; margin:12px auto; background-color:#ffffff; color:#000000; border:1px solid #666666; }
/* --- */
#chartDivID {height:400px; width:600px; margin:12px; }
</style>
</head>
<body>
<h1>Forum jQuery</h1>
<section class="conteneur">
<div id="chartDivID"></div>
</section>
<footer itemscope itemtype="http://data-vocabulary.org/Person">
<time datetime="2011-07-18T00:50:00.000+02:00" pubdate>2011-07-18</time> <span itemprop="name">Daniel Hagnoul</span> <a href="http://www.developpez.net/forums/u285162/danielhagnoul/" itemprop="url">@danielhagnoul</a>
</footer>
<script charset="utf-8" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
<script charset="utf-8" src="http://danielhagnoul.developpez.com/lib/jPicker/jpicker-1.1.6.min.js"></script>
<script charset="utf-8" src="../jqPlot/jquery.jqplot.min.js"></script>
<script charset="utf-8" src="../jqPlot/plugins/jqplot.pointLabels.js"></script>
<script>
$(function(){
/* --- */
$.jqplot.config.enablePlugins = true;
$.jqplot("chartDivID", [[ [1, 131, "131"], [5, 128, "128"], [9, 105, "105"], [12, 100, "100"], [18, 98, "98"], [19, 92, "92"], [20, 89, "89"], [25, 80, "80"], [28, 65, "65"], [30, 60, "60"], [33, 55, "55"], [36, 50, "50"], [38, 26, "26"] ]], {
title: "Progression du rang de XYZ",
axes: {
xaxis: {
label: "Journée",
ticks: [[1, 1], [3, 3], [5, 5], [7, 7], [9, 9], [11, 11], [13, 13], [15, 15], [17, 17], [19, 19], [21, 21], [23, 23], [25, 25], [27, 27], [29, 29], [31, 31], [33, 33], [35, 35], [37, 37], [39, 39]]
},
yaxis: {
label: "Rang",
ticks: [[131, 131], [121, 121], [111, 111], [101, 101], [91, 91], [81, 81], [71, 71], [61, 61], [51, 51], [41, 41], [31, 31], [21, 21], [11, 11], [1, 1]]
}
},
series:[{
pointLabels:{
location:'nw',
ypadding: 6
},
label: "Test",
lineWidth:3,
color:'#ff4466',
showMarker:true
}],
legend: {show: true, location: "nw"}
});
/* jPicker : http://www.digitalmagicpro.com/jPicker/, outil pour choisir rapidement une couleur */
$.fn.jPicker.defaults.images.clientPath="http://danielhagnoul.developpez.com/lib/jPicker/images/";
$(".conteneur").jPicker({window:{expandable:true,title:"jPicker : choissisez une couleur :",
alphaSupport:true,position:{x:'screenCenter',y:'top'}},color:{ active:new $.jPicker.Color({ r: 210, g: 214, b: 98, a: 128 })}},
function(color, context){var c = color.val("all");if (c){$("body").css("backgroundColor", "rgba(" +
c.r + "," + c.g + "," + c.b + "," + (c.a/255).toFixed(2) + ")");}});
});
</script>
</body>
</html> |
Partager