| 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>Chart 2D</title> |
| 19 |
<style type="text/css"> |
| 20 |
@import "../../../dojo/resources/dojo.css"; |
| 21 |
@import "../../../dijit/tests/css/dijitTests.css"; |
| 22 |
</style> |
| 23 |
|
| 24 |
<link rel="stylesheet" href="../../../dijit/themes/tundra/tundra.css"> |
| 25 |
<style> |
| 26 |
.dojoxLegendNode {border: 1px solid #ccc; margin: 5px 10px 5px 10px; padding: 3px} |
| 27 |
.dojoxLegendText {vertical-align: text-top; padding-right: 10px} |
| 28 |
</style> |
| 29 |
<script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config="isDebug: true, async: true, parseOnLoad: true"></script> |
| 30 |
|
| 31 |
<script type="text/javascript"> |
| 32 |
var seriesB = [2.6, 1.8, 2, 1, 1.4, 0.7, 2]; |
| 33 |
var onClick; |
| 34 |
require([ |
| 35 |
"dijit/registry", |
| 36 |
"dijit/form/Button", |
| 37 |
"dojox/charting/widget/Chart", |
| 38 |
"dojox/charting/axis2d/Default", |
| 39 |
"dojox/charting/plot2d/Default", |
| 40 |
"dojox/charting/widget/Legend", |
| 41 |
"dojo/parser"], function(registry){ |
| 42 |
onClick = function(){ |
| 43 |
var chart = registry.byId("chart1").chart; |
| 44 |
chart.addSeries("Run B", [6.2, 1.4, 1, 2, 4.1, 6.3, 5]); |
| 45 |
chart.render(); |
| 46 |
registry.byId("legend1").refresh(); |
| 47 |
} |
| 48 |
}); |
| 49 |
</script> |
| 50 |
</head> |
| 51 |
<body class="tundra"> |
| 52 |
<h1>Legend</h1> |
| 53 |
|
| 54 |
<div data-dojo-type="dojox.charting.widget.Chart" id="chart1" style="width: 300px; height: 300px;"> |
| 55 |
<div class="axis" name="x" font="italic normal normal 8pt Tahoma"></div> |
| 56 |
<div class="axis" name="y" vertical="true" fixUpper="major" includeZero="true" |
| 57 |
font="italic normal normal 8pt Tahoma"></div> |
| 58 |
<div class="plot" name="default" type="Default" markers="true" markerFill="'red'"></div> |
| 59 |
<div class="series" name="Run A" data="1, 2, 0.5, 1.5, 1, 2.8, 0.4"></div> |
| 60 |
</div> |
| 61 |
<div data-dojo-type="dojox.charting.widget.Legend" chartRef="chart1" id="legend1"></div> |
| 62 |
|
| 63 |
<div data-dojo-type="dojox.charting.widget.Chart" id="chart2" style="width: 300px; height: 300px;"> |
| 64 |
<div class="axis" name="x" font="italic normal normal 8pt Tahoma"></div> |
| 65 |
<div class="axis" name="y" vertical="true" fixUpper="major" includeZero="true" |
| 66 |
font="italic normal normal 8pt Tahoma"></div> |
| 67 |
<div class="plot" name="default" type="Default" markers="true" lines="false" markerFill="'red'"></div> |
| 68 |
<div class="series" name="Run A" data="1, 2, 0.5, 1.5, 1, 2.8, 0.4"></div> |
| 69 |
</div> |
| 70 |
<div data-dojo-type="dojox.charting.widget.Legend" chartRef="chart2"></div> |
| 71 |
<button data-dojo-type="dijit.form.Button" onclick="onClick()">Click me</button> |
| 72 |
</body> |
| 73 |
</html> |