Skip to content

Instantly share code, notes, and snippets.

@kucukharf
Created January 21, 2015 15:03
Show Gist options
  • Save kucukharf/230b0da6ba41ac0925c5 to your computer and use it in GitHub Desktop.
Save kucukharf/230b0da6ba41ac0925c5 to your computer and use it in GitHub Desktop.
Donut Chart using morris.js
35 <link rel="stylesheet" href="http://cdn.oesmith.co.uk/morris-0.5.1.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<script src="http://cdn.oesmith.co.uk/morris-0.5.1.min.js"></script>
<div id="chart"></div>
Morris.Donut({
element: 'chart',
data: [
{label: "Credit", value: 12},
{label: "Debit", value: 30},
{label: "Loan", value: 20},
{label: "Others", value: 35}
]
});
#chart{
height:400px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment