vue-chartist icon indicating copy to clipboard operation
vue-chartist copied to clipboard

chartist in options not defined

Open devJoshLopez opened this issue 5 years ago • 1 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,
}

devJoshLopez avatar Dec 31 '19 05:12 devJoshLopez

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....
    },
},
....

riv0tril avatar Feb 05 '20 15:02 riv0tril