Skip to content
Advertisement

Divide xKey to more than one attribute in Morris.js?

I am displaying MySQL values in a Bar graph generated by Morris.js using PHP. Currently I am displaying only one attribute in x axis and its values in y axis. Is it possible to divide the xkey into a number of attributes?

That is, for ID = BBAT102, the values of Wrongs, Rights and Percentage will be displayed. But instead I want Wrongs, Rights and Percentage to be mentioned in xKey so that each of these attributes have its own bar.

enter image description here

php:

JavaScript

js:

JavaScript

Advertisement

Answer

I had stacked all one on one which is why it was vertically getting stacked to each other. I recreated the script to support non-stacking;

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement