Skip to content
New issue

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

Drawing a sum of Items #799

Open
DesRodman opened this issue Aug 7, 2020 · 1 comment
Open

Drawing a sum of Items #799

DesRodman opened this issue Aug 7, 2020 · 1 comment

Comments

@DesRodman
Copy link

Hello team.

I'm using the next line chart
<script> $(function () { "use strict"; // AREA CHART var area = new Morris.Area({ element: 'revenue-chart' , resize: true , data: [{y:'2020-08-07 00:00:00',Item1:11654,Item2:10799},{y:'2020-08-07 01:00:00',Item1:2491,Item2:2222},{y:'2020-08-07 02:00:00',Item1:2120,Item2:1987},{y:'2020-08-07 03:00:00',Item1:14854,Item2:13175},{y:'2020-08-07 04:00:00',Item1:17369,Item2:15501},{y:'2020-08-07 05:00:00',Item1:1782,Item2:1611}] , xkey: 'y' , ykeys: ['Item1', 'Item2'] , labels: ['Sent', 'Delivered'] , lineColors: ['#17a317', '#1410b1'] , pointStrokeColors: ['#cff8cf', '#0b0bdc'] , hideHover: 'auto' }); }); </script>

For example we can see at first data {y:'2020-08-07 00:00:00',Item1:11654,Item2:10799}
but on web, i can see the next chart https://prnt.sc/tvidjf, i mean max place is more then 20k, but in source data max is 11654. I can see in blue line a sum of this two items... but on view - we can see a correct signing - https://prnt.sc/tvie8h

How can i setup data - for get a real chart lines?

Thanks

@pierresh
Copy link

Hello,
You should use set the option ChartAreaOptions to true, so that the lines would not be stacked.
More info about this in the help: http://morrisjs.github.io/morris.js/lines.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants