120 lines
5.1 KiB
HTML
120 lines
5.1 KiB
HTML
<!DOCTYPE html >
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
|
<title>An example of the Line chart</title>
|
|
|
|
<meta name="keywords" content="html5 canvas example line charts" />
|
|
<meta name="description" content="An example of the type of Line chart that OfficeExcel can produce" />
|
|
<meta name="googlebot" content="NOODP">
|
|
|
|
<meta property="og:title" content="OfficeExcel: HTML5 Javascript charts library" />
|
|
<meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
|
|
|
|
<link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
|
|
<link rel="icon" type="image/png" href="../images/favicon.png">
|
|
|
|
<!-- Place this tag in your head or just before your close body tag -->
|
|
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
|
|
|
|
<script src="../libraries/OfficeExcel.common.core.js" ></script>
|
|
<script src="../libraries/OfficeExcel.common.context.js" ></script>
|
|
<script src="../libraries/OfficeExcel.common.annotate.js" ></script>
|
|
<script src="../libraries/OfficeExcel.common.tooltips.js" ></script>
|
|
<script src="../libraries/OfficeExcel.common.zoom.js" ></script>
|
|
<script src="../libraries/OfficeExcel.common.effects.js" ></script>
|
|
<script src="../libraries/OfficeExcel.common.key.js" ></script>
|
|
|
|
<script src="../libraries/OfficeExcel.chartProperties.js" ></script>
|
|
<script src="../libraries/OfficeExcel.line.js" ></script>
|
|
|
|
<script src="../libraries/OfficeExcel.common.key.js" ></script>
|
|
<!--[if lt IE 9]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
|
|
<script src="libraries/jquery.min.js" ></script>
|
|
|
|
<script>
|
|
window.onload = function ()
|
|
{
|
|
var line1 = new OfficeExcel.Line('line1', [1,4,2,8,1], [4,5,6]);
|
|
line1._otherProps._background_image = 'file:///X:/AVS/Sources/AVSOfficeStudio/OfficeWebExcelChart/images/bg.png';
|
|
line1._otherProps._linewidth = 4;
|
|
|
|
|
|
if (!document.all || OfficeExcel.isIE9up()) {
|
|
line1._otherProps._shadow = true;
|
|
}
|
|
|
|
line1._otherProps._background_grid_hlines = false;
|
|
line1._otherProps._background_grid_vlines = false;
|
|
|
|
line1._otherProps._background_grid_border = false;
|
|
|
|
line1._otherProps._ylabels_inside = true;
|
|
line1._otherProps._xlabels_inside = true;
|
|
line1._otherProps._ylabels_inside_color = '#4BB2C5';
|
|
line1._otherProps._xlabels_inside_color = '#4BB2C5';
|
|
|
|
line1._otherProps._labels = ['1','4','2','8','1'];
|
|
line1._otherProps._colors = ['#4BB2C5', '#20EC51'];
|
|
|
|
line1._otherProps._curvy = 1;
|
|
|
|
line1._chartTitle._text = 'A curvy Line chart';
|
|
line1._chartTitle._background = '#4BB2C5';
|
|
|
|
line1._xAxisTitle._text = 'testxAxis';
|
|
line1._yAxisTitle._text = 'testyAxis';
|
|
|
|
line1._otherProps._tickmarks = 'filledcircle';
|
|
|
|
line1.Draw();
|
|
}
|
|
</script>
|
|
|
|
<?php PrintAnalyticsCode() ?>
|
|
|
|
</head>
|
|
<body>
|
|
|
|
|
|
<div id="breadcrumb">
|
|
<a href="../index.html">OfficeExcel: HTML5 Javascript charts library</a>
|
|
>
|
|
<a href="./index.html">Examples</a>
|
|
>
|
|
Line charts example
|
|
</div>
|
|
|
|
<h1>Line <span>charts</span></h1>
|
|
|
|
<script>
|
|
if (OfficeExcel.isOld()) {
|
|
document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the OfficeExcel Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag.</div>');
|
|
}
|
|
</script>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
<p>
|
|
Like Bar charts, Line charts are one of the most versatile chart types. It is similar, but can indicate
|
|
chronological data better. Line charts are good if, for example, you want to illustrate sales figures
|
|
over a year (or any period of time). You'll then be able to easily see whether sales are going up, down
|
|
or are stagnant. It will also become apparent which months are busier than others. By using multiple
|
|
line charts you can show multiple sets of data (eg two or more years of figures) to your charts. You can
|
|
customise line charts by stipulating them as being filled, having drop shadows, keys, having the X
|
|
axis in the centre, different colors, different tickmark styles and tooltips etc.
|
|
</p>
|
|
|
|
<ul>
|
|
<li><a href="../docs/line.html">Line charts API documentation</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div style="text-align: center">
|
|
<canvas id="line1" width="600" height="250">[Please wait...]</canvas>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html> |