Skip to content

Instantly share code, notes, and snippets.

@Deborah-Digges
Last active April 28, 2017 21:01
Show Gist options
  • Save Deborah-Digges/0b276e11400fecd051fb to your computer and use it in GitHub Desktop.
Save Deborah-Digges/0b276e11400fecd051fb to your computer and use it in GitHub Desktop.
Bar Graph using dimple.js to show the Average Divorce Rate in America
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://d3js.org/d3.v3.min.js"></script>
<script src="http://dimplejs.org/dist/dimple.v2.0.0.min.js"></script>
<script type="text/javascript">
function draw(data) {
/*
D3.js setup code
*/
"use strict";
var margin = 75,
width = 400 - margin,
height = 400 - margin;
var svg = d3.select("body")
.append("svg")
.attr("width", width + margin)
.attr("height", height + margin)
.append('g')
.attr('class','chart');
/*
Dimple.js Chart construction code
*/
var myChart = new dimple.chart(svg, data);
var x = myChart.addCategoryAxis("x", "category");
x.title = "";
var y = myChart.addMeasureAxis("y", "rate");
y.title = "Divorce Rate";
y.fontSize = "10px";
myChart.defaultColors = [
new dimple.color("DarkCyan")
];
myChart.addSeries(null, dimple.plot.bar);
myChart.draw();
};
</script>
</head>
<body>
<h1>The Average Divorce Rates in America</h1>
<script type="text/javascript">
draw([{"category": "3rd Marriage", "rate": 73}, {"category": "2nd Marriage", "rate": 60}, {"category": "1st Marriage", "rate": 41}]);
</script>
</body>
</html>
@manzo1
Copy link

manzo1 commented Apr 28, 2017

GBOJIE about how my wife left me. He only said to me that i have come to the right place were i will be getting my heart desire without any side effect.He

told me what i need to do,After it was been done,In the next 2 days,My wife called me on the phone and was saying sorry for living me before now and

also in the next one week after my wife called me to be pleading for forgiveness. I am so happy and overwhelmed that i have to tell this to the entire world

on how DR GBOJIE help me grant my heart desire. If you need any kind of help contact DR GBOJIE at the following email address:

gbojiespiritualtemple@gmail.com or call +2349066410185 He also cast so many spell like,
(1) If you want your ex back.
(2) you dont need a divorce in your relationship.
(3) You want to be promoted in your office.
(4) You want women & men to run after you.
(5) If you want a child.
(6) You want to be rich.
(7) You want to tie your husband & wife to be yours forever.
(8) If you need financial assistance.
(9) Herbal care.
Contact him today on: gbojiespiritualtempple@gmail.com or call +2349066410185 and get your problems solved. or contact him on his web site

https://gbojiespelltemple.wordpress.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment