superman66 / vue-highcharts

The Component of Vue 2.x for highcharts
https://codesandbox.io/s/jjyqvv0k13
MIT License
115 stars 48 forks source link

可否把noData需要的js加入进去 #45

Closed xusimin1008 closed 6 years ago

xusimin1008 commented 6 years ago

https://api.hcharts.cn/highcharts#noData

superman66 commented 6 years ago

要使用 noData 模块,你只需要把这个模块引入就可以了。跟使用其他模块的方法一样

xusimin1008 commented 6 years ago

感谢回答,我文档没看仔细

import Highcharts from 'highcharts'
require('highcharts/modules/no-data-to-display.js')(Highcharts)
import VueHighcharts from 'vue2-highcharts'
superman66 commented 6 years ago

也可以使用 ES6 Module 的方式引入

import Drilldown from 'highcharts/modules/Drilldown.js'
import Highcharts from 'highcharts'
// Load Drilldown module
Drilldown(Highcharts);
xusimin1008 commented 6 years ago

了解,但文档中写但的是

import Exporting from '../node_modules/highcharts/modules/Exporting.js'

多了../node_modules我就误解了

superman66 commented 6 years ago

两种都可以识别出文件。文档的写法是比较不简洁的,我去改下。