vueblocks / ve-charts Goto Github PK
View Code? Open in Web Editor NEW📈 ECharts 4.x for Vue.js 2.x. | 📈 ECharts 5.x for Vue.js 3.x in next version.
Home Page: https://vueblocks.github.io/ve-charts
📈 ECharts 4.x for Vue.js 2.x. | 📈 ECharts 5.x for Vue.js 3.x in next version.
Home Page: https://vueblocks.github.io/ve-charts
只要导入,vue页面就空白,浏览器控制台报以下错误,请问如何解决?
Uncaught TypeError: Cannot read property 'graphic' of undefined
at Module.fb15 (ve-charts.umd.min.js?8709:8)
at r (ve-charts.umd.min.js?8709:1)
at 068a (ve-charts.umd.min.js?8709:1)
at eval (ve-charts.umd.min.js?8709:1)
at eval (ve-charts.umd.min.js?8709:1)
at eval (ve-charts.umd.min.js?8709:1)
at Object../node_modules/_ve-charts@0.9.5@ve-charts/lib/ve-charts.umd.min.js (chunk-vendors.js:6361)
at webpack_require (app.js:849)
at fn (app.js:151)
at eval (main.js:12)
是否能添加自定义loading配置项,为了保持整个网站的loading风格统一
如题
ERROR Failed to compile with 1 errors 4:39:31 PM
error in ./node_modules/ve-charts/lib/ve-charts.min.css
Module build failed (from ./node_modules/postcss-loader/src/index.js):
Error: Loading PostCSS Plugin failed: Cannot find module 'postcss-import'
(@/vue-demo/node_modules/ve-charts/.postcssrc.js)
at load (/vue-demo/node_modules/postcss-load-config/src/plugins.js:21:13)
at Object.keys.filter.map (/vue-demo/node_modules/postcss-load-config/src/plugins.js:53:16)
at Array.map (<anonymous>)
at plugins (/vue-demo/node_modules/postcss-load-config/src/plugins.js:52:8)
at config.load.then (/vue-demo/node_modules/postcss-load-config/src/index.js:72:18)
@ ./node_modules/ve-charts/lib/ve-charts.min.css 4:14-142 14:3-18:5 15:22-150
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://172.30.26.4:8082/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
dependences:
{
"echarts": "^4.3.0",
"express": "^4.16.4",
"ve-charts": "^0.8.3",
"vue": "^2.5.22"
}
code:
import Vue from 'vue'
import App from './App.vue'
import VeCharts from 've-charts'
import 've-charts/lib/ve-charts.min.css'
Vue.config.productionTip = false
Vue.use(VeCharts)
new Vue({
render: h => h(App),
}).$mount('#app')
"dependencies": {
"ajv": "^7.2.1",
"axios": "^0.18.0",
"echarts": "^4.9.0",
"element-ui": "^2.3.7",
"js-cookie": "^2.2.0",
"normalize.css": "^8.0.0",
"nprogress": "^0.2.0",
"v-distpicker": "^1.0.20",
"ve-charts": "^0.9.5",
"vue": "^2.5.2",
"vue-router": "^3.0.1",
"vuex": "^3.0.1"
},
在 main.js 中,引入后,npm run dev 报错
import VeCharts from 've-charts'
Vue.use(VeCharts)
错误信息
ERROR Failed to compile with 1 errors 上午9:28:58
error in ./node_modules/ve-charts/lib/ve-charts.umd.min.js
Module parse failed: Unexpected token (8:48734)
You may need an appropriate loader to handle this file type.
| * license : MIT
| * http://adamwdraper.github.com/Numeral-js/
| */(function(i,o){n=o,a="function"===typeof n?n.call(t,r,t,e):n,void 0===a||(e.exports=a)})(0,(function(){var e,t,r="2.0.6",n={},a={},i={currentLocale:............
@ ./src/main.js 8:0-33
@ multi (webpack)-dev-server/client?http://localhost:9001 webpack/hot/dev-server ./src/main.js
因为对npm不太熟悉,不太清楚是什么问题
建议增加按需加载的功能
请问这个要怎么解决呢?
文档里并没有提到这个部分,我需要在页面加载之后异步地获取数据,然后再加载到图表上。
ie11下有错误
您好,我用的是"echarts": "^5.1.2","ve-charts": "^0.9.10",然后报:Uncaught TypeError: Cannot read property 'graphic' of undefined,想问一下应该怎么解决。
:grid="gridArray"
直角坐标系不能是数组,Invalid prop: type check failed for prop "grid". Expected Object, got Array
ECharts 5.x for Vue.js 3.x in next version啥时候开发
option = {
legend: {},
tooltip: {},
dataset: {
source: {
'Week': ['2015', '2016', '2017'],
'Vue': [1, 2, 3],
'react': [2, 3, 3]
},
dimensions:["Week", "Vue", 'react']
},
xAxis: {type: 'category'},
yAxis: [{
type: 'value',
scale: true,
axisLine: {
symbol: ['none', 'arrow']
},
splitLine: {
show: false
}
}, {
type: 'value',
scale: true,
axisLine: {
symbol: ['none', 'arrow']
},
splitLine: {
show: false
}
}],
// Declare several bar series, each will be mapped
// to a column of dataset.source by default.
series: [
{type: 'line'},
{type: 'line'}
]
};
以下设置,y轴字体还是黑色的
yAxis: {
name: '数量',
nameLocation: "end",//坐标位置,支持start,end,middle
nameTextStyle: {//字体样式
padding: 0, //距离坐标位置的距离
fontSize: 14,//正常是不用添加
color: "rgb(255,255,255)"
},
axisLabel: {
textStyle: {
color: "rgb(255,252,251)" //y轴字体颜色
}
}
},
ve-charts.umd.min.js:8 Uncaught TypeError: Cannot read properties of undefined (reading 'graphic')
good day help please:
during gulp --production this series of error prompt.
{ Error
at new JS_Parse_Error (eval at (C:\xampp2\htdocs\ERP\node_module s\gulp-uglify\node_modules\uglify-js\tools\node.js:1:1), :1534:18)
at js_error (eval at (C:\xampp2\htdocs\ERP\node_modules\gulp-ugl ify\node_modules\uglify-js\tools\node.js:1:1), :1542:11)
at croak (eval at (C:\xampp2\htdocs\ERP\node_modules\gulp-uglify \node_modules\uglify-js\tools\node.js:1:1), :2089:9)
at token_error (eval at (C:\xampp2\htdocs\ERP\node_modules\gulp- uglify\node_modules\uglify-js\tools\node.js:1:1), :2097:9)
at unexpected (eval at (C:\xampp2\htdocs\ERP\node_modules\gulp-u glify\node_modules\uglify-js\tools\node.js:1:1), :2103:9)
at semicolon (eval at (C:\xampp2\htdocs\ERP\node_modules\gulp-ug lify\node_modules\uglify-js\tools\node.js:1:1), :2123:56)
at simple_statement (eval at (C:\xampp2\htdocs\ERP\node_modules\ gulp-uglify\node_modules\uglify-js\tools\node.js:1:1), :2314:73)
at eval (eval at (C:\xampp2\htdocs\ERP\node_modules\gulp-uglify\ node_modules\uglify-js\tools\node.js:1:1), :2183:19)
at eval (eval at (C:\xampp2\htdocs\ERP\node_modules\gulp-uglify\ node_modules\uglify-js\tools\node.js:1:1), :2136:24)
at block_ (eval at (C:\xampp2\htdocs\ERP\node_modules\gulp-uglif y\node_modules\uglify-js\tools\node.js:1:1), :2429:20)
message: 'C:\xampp2\htdocs\ERP\main.js: SyntaxError: Unexpected token: nam e (i)',
fileName: 'C:\xampp2\htdocs\ERP\main.js',
lineNumber: 99549,
stack: 'Error\n at new JS_Parse_Error (eval at (C:\xampp2\htd ocs\ERP\node_modules\gulp-uglify\node_modules\uglify-js\tools\node.js:1:1 ), :1534:18)\n at js_error (eval at (C:\xampp2\htdoc s\ERP\node_modules\gulp-uglify\node_modules\uglify-js\tools\node.js:1:1), :1542:11)\n at croak (eval at (C:\xampp2\htdocs\ER P\node_modules\gulp-uglify\node_modules\uglify-js\tools\node.js:1:1), :2089:9)\n at token_error (eval at (C:\xampp2\htdocs\ER P\node_modules\gulp-uglify\node_modules\uglify-js\tools\node.js:1:1), :2097:9)\n at unexpected (eval at (C:\xampp2\htdocs\ERP \node_modules\gulp-uglify\node_modules\uglify-js\tools\node.js:1:1), :2103:9)\n at semicolon (eval at (C:\xampp2\htdocs\ERP\ node_modules\gulp-uglify\node_modules\uglify-js\tools\node.js:1:1), :2123:56)\n at simple_statement (eval at (C:\xampp2\htdocs\ \ERP\node_modules\gulp-uglify\node_modules\uglify-js\tools\node.js:1:1), < anonymous>:2314:73)\n at eval (eval at (C:\xampp2\htdocs\ERP\ node_modules\gulp-uglify\node_modules\uglify-js\tools\node.js:1:1), :2183:19)\n at eval (eval at (C:\xampp2\htdocs\ERP\node_m odules\gulp-uglify\node_modules\uglify-js\tools\node.js:1:1), :2 136:24)\n at block_ (eval at (C:\xampp2\htdocs\ERP\node_modul es\gulp-uglify\node_modules\uglify-js\tools\node.js:1:1), :2429: 20)',
showStack: false,
showProperties: true,
plugin: 'gulp-uglify' }
<ve-donut-chart :title="dayTitle" :data="dayChartData" :settings="chartSettings" :theme="ins"/>
title如果是数组前台报错,dayChartData是计算属性
computed: { dayTitle () { return [{ show: true, text: this.epDayTotal, subtext: 'kWh', x: 'center', y: 'center', textStyle: { fontSize: 16, fontWeight: 'normal', color: ['#333'] }, subtextStyle: { color: '#666', fontSize: 12 } }, { text: '本日用电', x: 'center', y: 'center', textStyle: { fontSize: 14, fontWeight: 'normal', color: ['#333'] } }] }, ...
vue.runtime.esm.js?2b0e:619 [Vue warn]: Invalid prop: type check failed for prop "title". Expected Object, got Array
建议增加个ref配置项,这样能获取组件内部的dom
光是背景图用了17s加载。。
您好,请教一下有关ve-geo-chart的问题:vegeo地图在本地开发时显示,打报到服务器以后打开网页却不显示地图。
盼望您于百忙之中抽出空闲回复我一下,谢谢您。
有ts类型支持吗?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.