| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
<![if gte IE 9]> |
| 13 |
<!DOCTYPE HTML> |
| 14 |
<html lang="en"> |
| 15 |
<head> |
| 16 |
<![endif]> |
| 17 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 18 |
<title>Tension test.</title> |
| 19 |
<style> |
| 20 |
@import "../../../dojo/resources/dojo.css"; |
| 21 |
@import "../../../dijit/themes/tundra/tundra.css"; |
| 22 |
@import "../../../dijit/tests/css/dijitTests.css"; |
| 23 |
</style> |
| 24 |
<style> |
| 25 |
.dojoxLegendNode {border: 1px solid #ccc; margin: 5px 10px 5px 10px; padding: 3px} |
| 26 |
.dojoxLegendText {vertical-align: text-top; padding-right: 10px} |
| 27 |
</style> |
| 28 |
<script src="../../../dojo/dojo.js" data-dojo-config="isDebug: true"></script> |
| 29 |
<script> |
| 30 |
dojo.require("dojox.charting.Chart"); |
| 31 |
dojo.require("dojox.charting.Theme"); |
| 32 |
dojo.require("dojox.charting.axis2d.Default"); |
| 33 |
dojo.require("dojox.charting.plot2d.Default"); |
| 34 |
dojo.require("dojox.charting.widget.Legend"); |
| 35 |
|
| 36 |
var data = [{x: 1, y: 1}, {x: 1, y: 2}, {x: 2, y: 2}, {x: 2, y: 1}]; |
| 37 |
|
| 38 |
makeObjects = function(){ |
| 39 |
var theme = new dojox.charting.Theme({ |
| 40 |
chart: {fill: null}, // no background |
| 41 |
plotarea: {fill: null}, // no background |
| 42 |
colors: ["red", "green", "blue", "orange"] |
| 43 |
}); |
| 44 |
var chart = new dojox.charting.Chart("test_chart"). |
| 45 |
setTheme(theme). |
| 46 |
addAxis("x", {natural: true, min: 0, max: 3}). |
| 47 |
addAxis("y", {vertical: true, natural: true, min: 0, max: 3}). |
| 48 |
addPlot("S tension", {tension: "S"}). |
| 49 |
addSeries("\"S\" tension", data, {plot: "S tension"}). |
| 50 |
addPlot("x tension", {tension: "x"}). |
| 51 |
addSeries("\"x\" tension", data, {plot: "x tension"}). |
| 52 |
addPlot("X tension", {tension: "X"}). |
| 53 |
addSeries("\"X\" tension", data, {plot: "X tension"}). |
| 54 |
addPlot("no tension", {markers: true, tension: ""}). |
| 55 |
addSeries("No Tension", data, {plot: "no tension"}). |
| 56 |
render(); |
| 57 |
var legend = new dojox.charting.widget.Legend({chart: chart}, "test_legend"); |
| 58 |
}; |
| 59 |
|
| 60 |
dojo.addOnLoad(makeObjects); |
| 61 |
</script> |
| 62 |
</head> |
| 63 |
<body class="tundra"> |
| 64 |
<h1>Tension test.</h1> |
| 65 |
|
| 66 |
<div id="test_chart" style="width: 400px; height: 400px;"></div> |
| 67 |
<div id="test_legend"></div> |
| 68 |
<p>That's all Folks!</p> |
| 69 |
</body> |
| 70 |
</html> |