npm i -S chart.xkcd
npm i -S chart.xkcd-vue
You can install chart.xkcd via script tag in HTML or via npm
Register components at the main entry.
import Vue from 'vue'
import chartXkcdVue from 'chart.xkcd-vue'
// ↓↓↓ will auto register all chart.xkcd component.
Vue.use(chartXkcdVue)
import Vue from 'vue'
import chartXkcd from 'chart.xkcd'
import { genComponent } from 'chart.xkcd-vue'
Vue.component('chartxkcd-line', genComponent(chartXkcd, 'chartxkcd-line'))
yTickCount: customize tick numbers you want to see on
the y axis (default 3)
legendPosition: specify where you want to place the
legend. (default
chartXkcd.config.positionType.upLeft) Possible
values:
chart.Xkcd.positionType.upLeftchart.Xkcd.positionType.upLeft
xTickCount: customize tick numbers you want to see on
the x axis (default 3)
yTickCount: customize tick numbers you want to see on
the y axis (default 3)
legendPosition: specify where you want to place the
legend (default chartXkcd.config.positionType.upLeft)
Possible values:
chart.Xkcd.positionType.upLeftchart.Xkcd.positionType.upLeftshowLine: connect the points with lines (default:
false)
timeFormat: specify the time format if the x values
are time (default undefined) chart.xkcd use
dayjs to format
time, you can find the all the available formats
here
dotSize: you can change size of the dots if you want
(default 1)
yTickCount: customize tick numbers you want to see on
the y axis
innerRadius: specify empty pie chart radius (default:
0.5)
innerRadius to
0
legendPosition: specify where you want to place the
legend. (default
chartXkcd.config.positionType.upLeft) Possible
values:
chart.Xkcd.positionType.upLeft