morris.js website:
http://www.oesmith.co.uk/morris.js/
Add morris.js and its dependencies (jQuery & Raphaƫl) to your page to plot nice charts.
Example code:
<link rel="stylesheet" href="http://cdn.oesmith.co.uk/morris-0.4.2.min.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.4.2.min.js"></script>
<div
id
=
"myfirstchart"
style
=
"height: 250px;"
></
div
>
<script>
new
Morris.Line({
// ID of the element in which to draw the chart.
element:
'myfirstchart'
,
// Chart data records -- each entry in this array corresponds to a point on
// the chart.
data: [
{ year:
'2008'
, value: 20 },
{ year:
'2009'
, value: 10 },
{ year:
'2010'
, value: 5 },
{ year:
'2011'
, value: 5 },
{ year:
'2012'
, value: 20 }
],
// The name of the data record attribute that contains x-values.
xkey:
'year'
,
// A list of names of data record attributes that contain y-values.
ykeys: [
'value'
],
// Labels for the ykeys -- will be displayed when you hover over the
// chart.
labels: [
'Value'
]
});
</script>
DEMO:
This is a great post. I like this topic.This site has lots of advantage.I found many interesting things from this site. It helps me in many ways.Thanks for posting.
ReplyDeleteBiotech Internships |
internships for cse students |
web designing course in chennai |
it internships |
electrical engineering internships |
internship for bcom students |
python training in chennai |
web development internship |
internship for bba students |
internship for 1st year engineering students