78 lines
2.2 KiB
JavaScript
78 lines
2.2 KiB
JavaScript
|
|
$(document).ready(function()
|
|
{
|
|
new Chart(document.getElementById("bar-chart"), {
|
|
type: 'bar',
|
|
data: {
|
|
labels: ["2013", "2014", "2015", "2016"],
|
|
datasets: [
|
|
{
|
|
label: "Cost",
|
|
backgroundColor: "#3e95cd",
|
|
data: [
|
|
randomScalingFactor(),
|
|
randomScalingFactor(),
|
|
randomScalingFactor(),
|
|
randomScalingFactor(),
|
|
randomScalingFactor(),
|
|
randomScalingFactor(),
|
|
randomScalingFactor()
|
|
]
|
|
}, {
|
|
label: "Earing",
|
|
backgroundColor: "#8e5ea2",
|
|
data: [
|
|
randomScalingFactor(),
|
|
randomScalingFactor(),
|
|
randomScalingFactor(),
|
|
randomScalingFactor(),
|
|
randomScalingFactor(),
|
|
randomScalingFactor(),
|
|
randomScalingFactor()
|
|
]
|
|
}
|
|
]
|
|
},
|
|
options: {
|
|
title: {
|
|
display: true,
|
|
text: 'Hospital Earing & Cost (in Millions)'
|
|
}
|
|
}
|
|
});
|
|
});
|
|
$(document).ready(function()
|
|
{
|
|
var ctx = document.getElementById('myChart').getContext('2d');
|
|
var myChart = new Chart(ctx, {
|
|
type: 'line',
|
|
data: {
|
|
labels: ['M', 'T', 'W', 'T', 'F', 'S', 'S'],
|
|
datasets: [{
|
|
label: 'Cost',
|
|
data: [
|
|
randomScalingFactor(),
|
|
randomScalingFactor(),
|
|
randomScalingFactor(),
|
|
randomScalingFactor(),
|
|
randomScalingFactor(),
|
|
randomScalingFactor(),
|
|
randomScalingFactor()
|
|
],
|
|
backgroundColor: "rgba(255,61,103,0.3)"
|
|
}, {
|
|
label: 'Earning',
|
|
data: [
|
|
randomScalingFactor(),
|
|
randomScalingFactor(),
|
|
randomScalingFactor(),
|
|
randomScalingFactor(),
|
|
randomScalingFactor(),
|
|
randomScalingFactor(),
|
|
randomScalingFactor()
|
|
],
|
|
backgroundColor: "rgba(34,206,206,0.3)"
|
|
}]
|
|
}
|
|
});
|
|
}); |