A bar chart or bar graph is a chart with rectangular bars with lengths proportional to the values that they represent.
The stacked charts are used when data sets have to be broken down into their constituents.
Javascript Code
new Morris.Bar({
element: 'morrisBar1',
data: [
{ y: '2006', a: 100, b: 90 },
{ y: '2007', a: 75, b: 65 },
{ y: '2008', a: 50, b: 40 },
{ y: '2009', a: 75, b: 65 },
{ y: '2010', a: 50, b: 40 },
],
xkey: 'y',
ykeys: ['a', 'b'],
labels: ['Series A', 'Series B'],
barColors: ['#5058AB', '#14A0C1'],
gridTextSize: 11,
hideHover: 'auto',
resize: true
});
For stacked bar, just add
stacked: true
A bar chart or bar graph is a chart with rectangular bars with lengths proportional to the values that they represent.
The stacked charts are used when data sets have to be broken down into their constituents.
For additional data
data: [
{ y: '2006', a: 100, b: 90, c: 80 },
{ y: '2007', a: 75, b: 65, c: 75 },
{ y: '2008', a: 50, b: 40, c: 45 },
{ y: '2009', a: 75, b: 65, c: 85 },
],
ykeys: ['a', 'b', 'c'],
labels: ['Series A', 'Series B', 'Series C'],
barColors: ['#5058AB', '#14A0C1','#01CB99']
A line graph is a type of chart which displays information as a series of data points connected by straight line segments.
A line graph is a type of chart which displays information as a series of data points connected by straight line segments.
Javascript Code
new Morris.Line({ ... );
A line graph is a type of chart which displays information as a series of data points connected by straight line segments.
Area charts are used to represent cumulated totals using numbers or percentages (stacked area charts in this case) over time.
Javascript Code
new Morris.Area({ ... );
A donut chart, or doughnut chart, functions precisely like a pie chart. The only difference is that the center is blank.
A donut chart, or doughnut chart, functions precisely like a pie chart. The only difference is that the center is blank.
Javascript Code
new Morris.Donut({
element: 'morrisDonut1',
data: [
{label: "Men", value: 12},
{label: "Women", value: 30},
{label: "Kids", value: 20}
],
colors: ['#3D449C','#268FB2','#74DE00'],
resize: true
});