当前位置:网站首页>Echart histogram: stack histogram value formatted display
Echart histogram: stack histogram value formatted display
2022-06-13 06:08:00 【HaanLen】



option = {
title: {
text: 'World Population'
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'value'
},
yAxis: {
type: 'category',
data: ['Indonesia', 'USA', 'India', 'China', 'World']
},
series: [
{
name: '2011',
type: 'bar',
stack: 'total',
label: {
show: true
},
data: [823, 234, 2034, 4970, 230]
},
{
name: '2012',
type: 'bar',
stack: 'total',
label: {
show: true,
formatter: '{a} {b} \n{c}',
},
data: [325, 238, 1214, 1141, 807]
}
]
};

option = {
title: {
text: 'World Population'
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'value'
},
yAxis: {
type: 'category',
data: ['Indonesia', 'USA', 'India', 'China', 'World']
},
series: [
{
name: '2011',
type: 'bar',
stack: 'total',
label: {
show: true
},
data: [823, 234, 2034, 4970, 230]
},
{
name: '2012',
type: 'bar',
stack: 'total',
label: {
show: true,
// formatter: '{a} {b} \n{c}',
formatter:(params) => {
return `${
params?.seriesName} ${
params?.name} \n ${
params?.value} `
},
},
data: [325, 238, 1214, 1141, 807]
}
]
};
{
componentType: 'series',
// Series type
seriesType: string,
// The series is coming in option.series Medium index
seriesIndex: number,
// Series name
seriesName: string,
// Data name , Class name
name: string,
// The data is coming in data Array index
dataIndex: number,
// Incoming raw data items
data: Object,
// Incoming data value . In most series, it is similar to data identical . Under some series is data The components in the ( Such as map、radar in )
value: number|Array|Object,
// Axis encode The mapping information ,
// key For the axis ( Such as 'x' 'y' 'radius' 'angle' etc. )
// value Must be an array , Not for null/undefied, Express dimension index .
// Its contents are as follows: :
// {
// x: [2] // dimension index by 2 Data mapped to x Axis
// y: [0] // dimension index by 0 Data mapped to y Axis
// }
encode: Object,
// List of dimension names
dimensionNames: Array<String>,
// The dimensions of data index, Such as 0 or 1 or 2 ...
// Used only in radar charts .
dimensionIndex: number,
// The color of the data graphic
color: string
}
边栏推荐
- Not in the following list of legal domain names, wechat applet solution
- 【美团笔试题】
- Leetcode fizz buzz simple
- Leetcode- find all missing numbers in the array - simple
- Tongweb adapts to openrasp
- Tongweb customs clearance guidelines
- The SQL file of mysql8.0 was imported into version 5.5. There was a pit
- Time conversion'2015-04-20t11:12:00.000+0000 '
- Commit specification
- Alibaba cloud OSS file download cannot be resumed at a breakpoint
猜你喜欢

Pod libwebp error reporting solution

AUTOSAR actual combat tutorial pdf version

推荐扩容工具,彻底解决C盘及其它磁盘空间不够的难题

自我总结ing

超有范的 logo 在线设计制作工具
![A glimpse of [wechat applet]](/img/ef/17564759e720b06c2bd496d1db7544.jpg)
A glimpse of [wechat applet]

The difference between the increment and decrement operators before and after variables i+, +i, I –, – I

You still can't remotely debug idea? Come and have a look at my article. It's easy to use

SPI primary key generation strategy for shardingsphere JDBC

Echart line chart: different colors are displayed when the names of multiple line charts are the same
随机推荐
Commit specification
Leetcode- reverse vowels in string - simple
Echart矩形树图:简单实现矩形树图
CORS request principle
Uniapp mobile terminal uses canvas to draw background convex arc
Alibaba cloud OSS file download cannot be resumed at a breakpoint
Ffmpeg download suffix is Video files for m3u8
Experience of redis installation under Linux system (an error is reported at the same time. The struct redis server does not have a member named XXXX)
What happens when the MySQL union index ABC encounters a "comparison operator"?
Echart柱状图:x轴显示value,y轴显示类别
Kotlin learning notes (1)
[compilation and assembly link] coff file and structure description
USB 0xc0000011 error
Essays on November 5, 2021
Conf/tongweb Functions of properties
Concurrent programming -- countdownlatch combined with thread pool
Leetcode- find all missing numbers in the array - simple
USB status error and its cause (error code)
免费录屏软件Captura下载安装
Source code analysis of ArrayList