Yopadd / vue-chartist

Pluging chartist for vuejs
Do What The F*ck You Want To Public License
172 stars 21 forks source link

Write something about using plugins in the README #35

Closed fonsecas72 closed 2 years ago

fonsecas72 commented 6 years ago

I'm having some trouble about using plugins and despite I've found some issues about it I couldn't use any.

I think it would be very useful if this was clear in the README even if it is just to say "you can't use plugins"

Thank you for your work.

douglasg14b commented 4 years ago

@Yopadd Any word on this? Would love to hear if we can use plugins or not....

PureLines commented 4 years ago

It's possible to use plugins with vue-chartist.

There is an example, how to use chartist-plugin-legend:

  1. Install plugin: npm install chartist-plugin-legend --save.
  2. Import plugin and add plugins section to Chartist options in your Vue component:
    
    import Legend from 'chartist-plugin-legend';

export default { data() { return { [...], chartOptions: { axisX: {...}, axisY: {...}, plugins: [ Legend({ position: 'top', }), ], }, }, }, }


3. Add plugin styles (optional, check plugin readme).