Comments (8)
You're welcome! Every question you meet can be asked here.
from v-charts.
@Anehta What kind of scene do you need to use this or where you want to set this prop?
And I guess the following example may be helpful to you.🙂
<template>
<div>
<ve-line :data="chartData" :colors="chartColor"></ve-line>
</div>
</template>
<script>
import VeLine from 'v-charts/lib/line'
import echarts from 'echarts/lib/echarts'
export default {
data () {
this.chartColor = [new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#5bcee2' }, { offset: 1, color: '#045d69' }])]
return {
chartData: {
columns: ['日期', '余额', '比率'],
rows: [
{ '日期': '1月1日', '余额': 123, '比率': 0.3 },
{ '日期': '1月2日', '余额': 1223, '比率': 0.6 }
]
}
}
},
components: { VeLine }
}
</script>
from v-charts.
Another example may be useful:
<template>
<div>
<ve-line
:data="chartData"
:settings="chartSettings"
:after-config="afterConfig">
</ve-line>
</div>
</template>
<script>
import VeLine from 'v-charts/lib/line'
import echarts from 'echarts/lib/echarts'
export default {
data () {
return {
chartData: {
columns: ['日期', '余额', '比率'],
rows: [
{ '日期': '1月1日', '余额': 123, '比率': 0.3 },
{ '日期': '1月2日', '余额': 1223, '比率': 0.6 }
]
},
chartSettings: {
area: true
}
}
},
methods: {
afterConfig (options) {
options.series[0].areaStyle = {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: 'rgb(255, 158, 68)'
}, {
offset: 1,
color: 'rgb(255, 70, 131)'
}])
}
}
return options
}
},
components: { VeLine }
}
</script>
from v-charts.
Thank you for answering this question so seriously. And use this prop isn't normal?
from v-charts.
em....i encountered an bug
<div style="display: flex"> <ve-line :data="chartData"></ve-line> </div>
In this code , chart will be disappear. @xiguaxigua
from v-charts.
Because the default width of V-Charts box is auto
, and in your current scene, you need set width such as
<ve-line
width="100%"
:data="chartData"
:settings="chartSettings"
:after-config="afterConfig">
</ve-line>
from v-charts.
This problem is caused by flex-basis
, as you knew, If you don't set the flex-basis
, flex-basis
value will be the width
, and flex: 0 0 auto
is the same as flex: none
. So, echarts can't get dom width and won't draw anything. @Anehta
from v-charts.
thhhk u bro. im a newbee....
from v-charts.
Related Issues (20)
- 能封装一个矩形树图的实例吗
- 环形图 label标签重叠了 HOT 1
- 官网打不开了, 是彻底放弃了吗
- 使用cdn方式引用时出现”Unknown custom element”
- 数据超出28条不显示legend HOT 4
- v-charts中的extend属性与vue中的extend冲突报错 HOT 1
- 柱状图的柱子横向显示,请问如何竖着显示 HOT 1
- v-charts.js.org 里面的例子代码都看不了 HOT 2
- feat:有没有vue 3 的支持计划 HOT 2
- 可以支持一下echart v5+
- 树状图有问题
- http://woolen.gitee.io/v-charts/#/bar 文档打不开 哥哥们还有别的能打开的文档吗 HOT 1
- vue 2.7 this._watchers is undefined in core.js HOT 4
- 引入任意图表的时候报错 :map undefined HOT 12
- 解决 map unde 问题
- 使用ve-map地图组件,消失但没有任何报错 HOT 1
- 没法自动撑满tab容器
- v-charts 多折线图,切换时候,y轴刻度重复问题
- 谷歌浏览器,首次打开图表不显示,按F12才显示
- iphoneXs 微信平台 无法显示图表,官网demo都无法显示
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from v-charts.