jqplot.Multi column legend / test3.html

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8">
		<title>Test 3</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" />
		
		<!-- BEGIN: load jquery -->
		<script language="javascript" type="text/javascript" src="./src/jquery-1.3.2.min.js"></script>
		<!-- END: load jquery -->
		
		<!-- BEGIN: load jqplot -->
		<script language="javascript" type="text/javascript" src="./src/jquery.jqplot.js"></script>
		<script language="javascript" type="text/javascript" src="./src/plugins/jqplot.categoryAxisRenderer.js"></script>
		<script language="javascript" type="text/javascript" src="./src/plugins/jqplot.barRenderer.js"></script>
		<!-- END: load jqplot -->

	<script type="text/javascript" language="javascript">
	  
	$(document).ready(function(){

    line1 = [[2,4], [1,6], [3,2], [4,9], [5,16]];
    plot1 = $.jqplot('chart', [line1], {    
        series: [{label: '1st Qtr'}],
        axes: {
            xaxis: {
                ticks:['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday'],
                renderer: $.jqplot.CategoryAxisRenderer
            },
        }
    });

    line1 = [[4, 1], [2, 2], [9, 3], [16, 4]];
    line2 = [[3, 1], [7, 2], [6.25, 3], [3.125, 4]];
    plot2 = $.jqplot('chart2', [line1, line2], {
        stackSeries: true,
        legend: {
            show: true,
            location: 'se'
        },
        title: 'Unit Sales: Acme Decoy Division',
        seriesDefaults: {
            renderer: $.jqplot.BarRenderer,
            rendererOptions: {
                barDirection: 'horizontal',
                barPadding: 6,
                barMargin: 40
            }
        },
        series: [{
            label: '1st Qtr'
        },
        {
            label: '2nd Qtr'
        }],
        axes: {
            yaxis: {
                renderer: $.jqplot.CategoryAxisRenderer,
                ticks: ['Q1', 'Q2', 'Q3', 'Q4']
            },
            xaxis: {min: 0, max: 20, numberTicks:5}
        }
    });

});

	</script>

	</head>
	<body>
    <div id="chart" style="margin-top:20px; margin-left:20px; width:400px; height:240px;"></div>
    <div id="chart2" style="margin-top:20px; margin-left:20px; width:320px; height:270px;"></div>

	</body>
</html>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.