lakb248 / vue-chartist

A component of Chartist implement by vuejs 2.0

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

chartist in options not defined

devJoshLopez opened this issue · comments

hey im trying to use Chartist in my options like the documentation says on their website but im getting chartist is not defined. What am I missing?

axisX: {
        type: Chartist.FixedScaleAxis,
}

The problem is that the component does not expose FixedScaleAxis constant,you are just importing the component, a workarround for this is importing chartist and use the constant instead

ie:
import VueChartist from 'v-chartist'
import * as c from 'chartist'

....
lineOptions: {
    axisX: {
    type: c.FixedScaleAxis,
    ....other props....
    },
},
....