We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi. May i get some help? why it still doesn't work? thanks for help.
my code:
</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>
index.txt
The text was updated successfully, but these errors were encountered:
Did you look at the documentation? http://morrisjs.github.io/morris.js/lines.html
Specifically at the top of the page:
Note 2: if you need to update the plot, use the setData method on the object that Morris.Line returns. There's a setData example in the GitHub repo.
Sorry, something went wrong.
No branches or pull requests
Hi. May i get some help? why it still doesn't work? thanks for help.
my code:
<style>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>
index.txt
The text was updated successfully, but these errors were encountered: