In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces "how to use vue and echarts to achieve progress bar bar chart". In daily operation, I believe many people have doubts about how to use vue and echarts to achieve progress bar bar chart. Xiaobian consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubt of "how to use vue and echarts to achieve progress bar bar chart". Next, please follow the editor to study!
This paper gives you an example to share the specific code of the bar bar chart of vue+echarts implementation for your reference. The specific contents are as follows.
The effect picture is as follows
Code:
Import * as echarts from 'echarts' Export default {data () {return {option: {color: ["# 157ef5"], / / set the color of the histogram textStyle: {color: "# 828282"}, tooltip: {trigger: "axis" AxisPointer: {type: "line"}}, grid: {left: "3", right: "4", bottom: "3", containLabel: true}, xAxis: {type: "value" / / set x axis to display several segments min: 0, max: 100, interval: 50, axisTick: {show: false}, axisLine: {lineStyle: {color: "transparent"} YAxis: {type: "category", data: ["Financial Revenue", "headquarters economy"], axisTick: {show: false}, axisLine: {lineStyle: {color: "# e0e0e0"}}, inside: true TextStyle: {color: "# 000"}}, series: [{type: "bar", itemStyle: {color: "# f1f1f1", / / define the background color of the column borderRadius: [0,10,10 0] / / define fillet of background column}, barGap: "- 100%", / / important steps to set cylinder coincident data: [100,100], animation: false, / / turn off animation barWidth: "22px", / / set column width} {type: "bar", data: [65,75], barWidth: "22px", barGap: "- 100%", / / important steps to set column coincident itemStyle: {borderRadius: [0,10,10,0] / / define cylindrical fillet color: function (params) {var colorList = ['# 3C90EBneedle,'# B573F4terrain,'# F9B341cylinder,'# F9B341Christ,'# 91c7ae'] Return colorList [params.dataIndex]},}]}}, mounted () {this.getChartData ();}, methods: {getChartData () {let myChart1 = echarts.init (document.querySelector ("# myChart1")); myChart1.setOption (this.option) / / set the chart initialization data setTimeout (function () {_ window.onresize = function () {myChart1.resize (); / / the chart adapts according to the window size};}, 200);}} # myChart1 {width: 600px; height: 400px At this point, the study on "how to implement a progress bar bar chart with vue and echarts" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.