Comments (4)
@guoliuqing123 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
TRANSLATED
TITLE
[Bug] Add title display to each radar chart
BODY
Version
none
Link to Minimal Reproduction
none
Steps to Reproduce
let data = [
[
[ "Technology\nGuarantee\nCentral\nHeart\n", "#255359",4.94,5, 5.01,4.98,4.96,4.93,4.94],
["Network\nCenter\nHeart\n","#336774", 4.96,5.02, 5.01, 5,4.99,4.98,4.97]
],
]
let arr1 = []
let arr2 = []
if (data && data.length > 0) {
data.forEach((items,index) => {
let y = data.length === 1 ? '50%' : '';
let radius = '35%';
if(items[0]) {
let obj1 ={
center: data.length === 1 ? ['28%', y] : ['28%', y], //Radar chart position
radius: radius, //Radar chart diameter
indicator: [
{name: 'W1', max: 10},
{name: 'W7', max: 10, axisLabel: {show: false}},
{name: items[0][0]+' '+' W6', max: 10, axisLabel: {show: false}},
// {name: 'W6', max: 10, axisLabel: {show: false}},
{name: 'W5', max: 10, axisLabel: {show: false}},
{name: 'W4', max: 10, axisLabel: {show: false}},
{name: 'W3', max: 10, axisLabel: {show: false}},
{name: 'W2', max: 10, axisLabel: {show: false}}
],
nameGap:5, //The distance between the indicator name and the indicator axis.
splitNumber: 5, // Radar chart circle setting
axisLine: { //Set the color of the middle ray of the radar chart
lineStyle: {
color: '#fff',
},
},
axisLabel: {
show: false,
textStyle: {
fontSize: 8,
color: '#333',
}
}, //axis text label
splitArea: { //Set the chart color, the value of show is true
show: false,
areaStyle: {
color: "#fff", //General setting method
},
},
name: { //Modify the color of indicator text
textStyle: {
color: "#4f4f4f",
fontSize:7,
}
},
};
arr1.push(obj1)
let obj3 ={
type: 'radar',
radarIndex: arr1 && arr1.length ? arr1.length-1 :'',
symbolSize:4,
data: [{
name:items[0][0],
value: items[0].slice(2),
itemStyle: { //Style settings for this numerical area
normal: {
color: items[0][1], //Background color, areaStyle also needs to be set
},
},
},]
};
arr2.push(obj3)
}
if(items[1]){
let obj2 ={
center: data.length === 1 ? ['73%', y] : ['73%', y], //Radar chart position
radius: radius, //Radar chart diameter
indicator: [
{name: 'W1', max: 10},
{name: 'W7', max: 10, axisLabel: {show: false}},
{name: items[1][0]+' '+' W6', max: 10, axisLabel: {show: false}},
// {name: 'W6', max: 10, axisLabel: {show: false}},
{name: 'W5', max: 10, axisLabel: {show: false}},
{name: 'W4', max: 10, axisLabel: {show: false}},
{name: 'W3', max: 10, axisLabel: {show: false}},
{name: 'W2', max: 10, axisLabel: {show: false}}
],
nameGap:5, //The distance between the indicator name and the indicator axis.
splitNumber: 5, // Radar chart circle setting
axisLine: { //Set the color of the middle ray of the radar chart
lineStyle: {
color: '#fff',
},
},
axisLabel: {
show: false,
textStyle: {
fontSize: 8,
color: '#333',
}
}, //axis text label
splitArea: { //Set the chart color, the value of show is true
show: false,
areaStyle: {
color: "#fff", //General setting method
},
},
name: { //Modify the color of indicator text
textStyle: {
color: "#4f4f4f",
fontSize:7,
}
},
};
arr1.push(obj2)
let obj4 ={
type: 'radar',
radarIndex: arr1 && arr1.length ? arr1.length-1 :'',
symbolSize:4,
data: [
{
name:items[1][0],
value: items[1].slice(2),
itemStyle: { //Style settings for this numerical area
normal: {
color: items[1][1], //Background color, areaStyle also needs to be set
},
},
},
]
};
arr2.push(obj4)
}
});
}
option ={
radar:arr1,
series:arr2,
tooltip: {
formatter(params){
return (params.name + '<br/>'+
'W1: '+params.value[0]+ '<br/>'+
'W2: '+params.value[1]+ '<br/>'+
'W3: '+params.value[2]+ '<br/>'+
'W4: '+params.value[3]+ '<br/>'+
'W5: '+params.value[4]+ '<br/>'+
'W6: '+params.value[5]+ '<br/>'+
'W7: '+params.value[6]
)
},
},
}
Current Behavior
The current style is implemented in the name of the indicator. If the fontweight is modified in this way, other text will also be affected. If you want to achieve a picture that behaves as expected, when you modify the fontweight, other text will not be affected.
Expected Behavior
If you want to achieve the image that behaves as expected, when you modify the fontweight, other text will not be affected.
Environment
-OS:
-Browser:
- Framework:
Any additional comments?
No response
from echarts.
不能直接用 title 组件设置吗?
from echarts.
只能设置一个title 现在想要实现为每一个雷达图旁边都设置一个title
from echarts.
title 也可以是一个数组,并不是只支持一个,大多数 component 都是默认支持多个的。参见这个例子。
from echarts.
Related Issues (20)
- [Bug] series同时使用type: 'graph',type: 'lines',series ——type'graph'中配置emphasis: { focus: 'adjacency'},鼠标hover就报错,开发版本中会导致页面崩溃
- [Feature] roam配置能否支持移动鼠标时,整个graph也跟着移动 HOT 3
- [Bug] geo.select.disabled 设置为true,不生效 HOT 7
- [Bug] series下使用 type: 'sankey', 时数据量过大的情况下内容展示不完整 HOT 1
- [Feature] Make axisLabels and nameTextStyle more flexible HOT 2
- [Bug] geo3D.label.textStyle Not effective, but "echarts": "^4.6.0", "echarts-gl": "^1.1.2" is ok HOT 1
- [Bug] 配置多个legend 展示未实现 HOT 1
- [Bug] 配置多个legend 展示未实现 HOT 3
- [Feature] 词云图中textStyle是否支持formatter函数 HOT 1
- how to change the scale size of the pie and doughnut chart when hover HOT 2
- [Bug] visual map category deselection leaves parts visibile from boxplot and scattter series HOT 2
- [Bug] boxplots are holding space for multiple series, while each series has a datasetIndex HOT 1
- Can Bar racing Chart (realtimeSort) be sorted by the y-axis? HOT 3
- [Bug] 折线图设置降采样sampling: 'lttb'时,选中非采样点,tooltip的formatter函数的params参数返回为空,tooltip也不会弹出 HOT 1
- [Bug] eCharts xAxis label not align well when zooming in
- [Bug] X-Axis does not follow the configuration of each dataset and grid HOT 2
- [Bug] dataset 同名数据重叠,且tooltip formatter 字符串模板无法访问数据集数据 HOT 6
- [Bug] 盒须图dataset计算有误,最大值不对 HOT 2
- [Bug] echarts 5.3版本开始 柱状图 BarminHeight属性设置无效 HOT 2
- [Bug] Dt[_t] is not a constructor HOT 5
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 echarts.