dojo Charts: addAxis()

<html>

<head runat=”server”>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″>
<title>Untitled 1</title>
<script type=”text/javascript” src= “../js/dojo/dojo/dojo.js” djConfig=”isDebug: true”></script>
<script type=”text/javascript”>
dojo.require(“dojox.charting.Chart2D”);
makeCharts = function(){
var chart1 = new dojox.charting.Chart2D(“simplechart”);
chart1.addPlot(“default”, {type: “Lines”});
chart1.addPlot(“other”, {type: “Areas”, hAxis: “other x”, vAxis: “other y”});
chart1.addAxis(“x”);
chart1.addAxis(“y”, {vertical: true});
chart1.addAxis(“other x”, {leftBottom: false});
chart1.addAxis(“other y”, {vertical: true, leftBottom: false});
chart1.addSeries(“Series 1”, [1, 2, 2, 3, 4, 5, 5, 7]);
chart1.addSeries(“Series 2”, [1, 1, 4, 2, 1, 6, 4, 3],
        {plot: “other”, stroke: {color:”blue”}, fill: “lightblue”}
);
chart1.render();

};
dojo.addOnLoad(makeCharts);
</script>
</head>
<body>
<div id=”simplechart” style=”width: 250px; height: 150px;”></div>
</body>
</html>

Output:

image

Advertisements

2 Responses

  1. Hey, I think your website might be having browser compatibility issues.

    When I look at your website in Opera, it looks fine but when opening
    in Internet Explorer, it has some overlapping.

    I just wanted to give you a quick heads up! Other then
    that, superb blog!

  2. I wanted to write you this small bit of note to lastly thank you more than once more on your stunning ideas you have documented in this case. This really is generous of men and women like you to give freely all that most of us may have made available as an ebook to make some money for their own finish, principally since you could have tried it in case you decided. These strategies also worked as the excellent way to realize that a lot of people have related keenness comparable to my really own to grasp way far more on the topic of this difficulty. I believe you can find numerous far more enjoyable instances up front for folks who look at your site.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: