bbonnin / vue-morris

VueJS component wrapping Morris.js
MIT License
237 stars 36 forks source link

Xkeys 'undefined' #17

Open mailnike opened 5 years ago

mailnike commented 5 years ago

I have copied example as it is but my Xkeys are still showed as 'undefined' . Everything else is perfect. Any idea how to fix this?

image

bbonnin commented 5 years ago

Hi, Could you provide some examples of your code, please?

anamarquezz commented 5 years ago

Hi ! Maybe you forgot to add some properties in the HTML

this is a complete example,

<bar-chart id="bar" :data=data :xkey=xkye :ykeys=ykeys :bar-colors=barcolors :labels=labels   :grid-text-weight=gridtextweight :grid=grid :resize=resize ></bar-chart>

 data() {
    return {     
      xkye: "year",
      ykeys: ["and", "ios", "win"],
      barcolors: ["blue", "purple", "pink"],
      labels: ["and", "ios", "win"],
      grid: "false",
      resize: "true",
      gridtextweight: "bold",
      data: [
        { year: "2013", and: 10, ios: 5, win: 2 },
        { year: "2014", and: 10, ios: 15, win: 3 },
        { year: "2015", and: 20, ios: 25, win: 2 },
        { year: "2016", and: 30, ios: 20, win: 1 }
      ]
    };

.```

in the image of the documentation ist not defined the properti labels.

[image](https://user-images.githubusercontent.com/12877909/64544899-aedf0400-d2dc-11e9-8a22-085498ad3f8e.png)