-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Hi. May i get some help? why it still doesn't work? thanks for help.
my code:
<style></style>
<script src="/scripts/snippet-javascript-console.min.js?v=1"></script>
function initMorris() {
morrisLine = Morris.Line({
element: 'samplechart',
xkey: 'period',
ykeys: ['a', 'b'],
labels: ['YES', 'NO'],
xLabelAngle: 60,
parseTime: false,
resize: true,
lineColors: ['#32c5d2', '#c03e26']
});
}
function setMorris(data) {
morrisLine.setData(data);
}
function getMorris() {
$.get('@Url.Action("GetData")', function (result) {
setMorris(result);
});
}
function getMorrisOffline() {
var lineData = [
{ period: '2006', a: 100, b: 90 },
{ period: '2007', a: 75, b: 65 },
{ period: '2008', a: 50, b: 40 },
{ period: '2009', a: 75, b: 65 },
{ period: '2010', a: 50, b: 40 },
{ period: '2011', a: 75, b: 65 },
{ period: '2012', a: 100, b: 40 }
];
setMorris(lineData);
}
</script>