Commits

cleonello  committed 3e473e5

Added example for legend labels option.

  • Participants
  • Parent commits 29dbfeb

Comments (0)

Files changed (1)

File examples/legendLabels.html

+<!DOCTYPE html>
+
+<html lang="en">
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+  <title>Simple Test</title>
+  <!--[if IE]><script language="javascript" type="text/javascript" src="../src/excanvas.js"></script><![endif]-->
+  
+  <link rel="stylesheet" type="text/css" href="../src/jquery.jqplot.css" />
+  <link rel="stylesheet" type="text/css" href="examples.css" />
+  
+  <!-- BEGIN: load jquery -->
+  <script language="javascript" type="text/javascript" src="../src/jquery-1.4.1.min.js"></script>
+  <!-- END: load jquery -->
+  
+  <!-- BEGIN: load jqplot -->
+  <script language="javascript" type="text/javascript" src="../src/jquery.jqplot.js"></script>
+  <!-- END: load jqplot -->
+
+
+<script language="javascript" type="text/javascript">
+$(document).ready(function(){
+
+   s1 = [1,6,9,8];
+   s2 = [4,3,1,2];
+   s3 = [6,2,4,1];
+
+   plot1 = $.jqplot('chart1',[s1, s2, s3],{
+       stackSeries: true,
+        seriesDefaults: {
+            fill: true,
+            showMarker: false
+        },
+       legend:{
+           show:true,
+           rendererOptions:{
+               labels:["a","b", "c"]
+           }
+		},
+		axes: {
+		    xaxis:{min:1, max:4},
+		    yaxis:{min:0, max:20}
+		}
+   });
+   
+ });
+</script>
+  </head>
+  <body>
+<?php include "nav.inc"; ?>
+<div id="chart1" class="plot" style="width:500px;height:300px;"></div>
+  </body>
+</html>