You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by wa...@apache.org on 2021/04/02 08:13:59 UTC
[echarts-examples] branch gh-pages updated: example: update Basic
Radar Chart and Customized Radar Chart
This is an automated email from the ASF dual-hosted git repository.
wangdd pushed a commit to branch gh-pages
in repository https://gitbox.apache.org/repos/asf/echarts-examples.git
The following commit(s) were added to refs/heads/gh-pages by this push:
new 0fa8eb2 example: update Basic Radar Chart and Customized Radar Chart
0fa8eb2 is described below
commit 0fa8eb293d7edc115d6beae6958ba4af84455fdf
Author: Wdingding <wa...@gmail.com>
AuthorDate: Fri Apr 2 16:13:37 2021 +0800
example: update Basic Radar Chart and Customized Radar Chart
---
public/data/radar-custom.js | 59 +++++++++++++++++++++++++--------------------
public/data/radar.js | 16 +++---------
2 files changed, 36 insertions(+), 39 deletions(-)
diff --git a/public/data/radar-custom.js b/public/data/radar-custom.js
index b7821b9..56a93b0 100644
--- a/public/data/radar-custom.js
+++ b/public/data/radar-custom.js
@@ -6,11 +6,12 @@ difficulty: 2
*/
option = {
+ color: [ '#67F9D8', '#FFE434', '#56A3F1', '#FF917C'],
title: {
text: '自定义雷达图'
},
legend: {
- data: ['图一','图二', '张三', '李四']
+ data: ['Data A', 'Data B', 'Data C', 'Data D']
},
radar: [
{
@@ -29,26 +30,24 @@ option = {
name: {
formatter: '【{value}】',
textStyle: {
- color: '#72ACD1'
+ color: '#428BD4'
}
},
splitArea: {
areaStyle: {
- color: ['rgba(114, 172, 209, 0.2)',
- 'rgba(114, 172, 209, 0.4)', 'rgba(114, 172, 209, 0.6)',
- 'rgba(114, 172, 209, 0.8)', 'rgba(114, 172, 209, 1)'],
- shadowColor: 'rgba(0, 0, 0, 0.3)',
+ color: ['#77EADF', '#26C3BE', '#64AFE9', '#428BD4'],
+ shadowColor: 'rgba(0, 0, 0, 0.2)',
shadowBlur: 10
}
},
axisLine: {
lineStyle: {
- color: 'rgba(255, 255, 255, 0.5)'
+ color: 'rgba(211, 253, 250, 0.8)'
}
},
splitLine: {
lineStyle: {
- color: 'rgba(255, 255, 255, 0.5)'
+ color: 'rgba(211, 253, 250, 0.8)'
}
}
},
@@ -62,7 +61,16 @@ option = {
{ text: '生物', max: 72 }
],
center: ['75%', '50%'],
- radius: 120
+ radius: 120,
+ name: {
+ textStyle: {
+ color: '#fff',
+ backgroundColor: '#666',
+ borderRadius: 3,
+ padding: [3, 5]
+ }
+ }
+
}
],
series: [
@@ -77,18 +85,13 @@ option = {
data: [
{
value: [100, 8, 0.40, -80, 2000],
- name: '图一',
- symbol: 'rect',
- symbolSize: 5,
- lineStyle: {
- type: 'dashed'
- }
+ name: 'Data A'
},
{
value: [60, 5, 0.30, -100, 1500],
- name: '图二',
+ name: 'Data B',
areaStyle: {
- color: 'rgba(255, 255, 255, 0.5)'
+ color: 'rgba(255, 228, 52, 0.6)'
}
}
]
@@ -100,26 +103,30 @@ option = {
data: [
{
value: [120, 118, 130, 100, 99, 70],
- name: '张三',
+ name: 'Data C',
+ symbol: 'rect',
+ symbolSize: 12,
+ lineStyle: {
+ type: 'dashed'
+ },
label: {
show: true,
- formatter: function(params) {
+ formatter: function (params) {
return params.value;
}
}
},
{
- value: [90, 113, 140, 30, 70, 60],
- name: '李四',
+ value: [100, 93, 50, 90, 70, 60],
+ name: 'Data D',
areaStyle: {
- opacity: 0.9,
- color: new echarts.graphic.RadialGradient(0.5, 0.5, 1, [
+ color: new echarts.graphic.RadialGradient(0.1, 0.6, 1, [
{
- color: '#B8D3E4',
+ color: 'rgba(255, 145, 124, 0.1)',
offset: 0
},
{
- color: '#72ACD1',
+ color: 'rgba(255, 145, 124, 0.9)',
offset: 1
}
])
@@ -128,4 +135,4 @@ option = {
]
}
]
-}
\ No newline at end of file
+};
\ No newline at end of file
diff --git a/public/data/radar.js b/public/data/radar.js
index 8aabdf2..9897b2a 100644
--- a/public/data/radar.js
+++ b/public/data/radar.js
@@ -9,22 +9,13 @@ option = {
title: {
text: '基础雷达图'
},
- tooltip: {},
legend: {
data: ['预算分配(Allocated Budget)', '实际开销(Actual Spending)']
},
radar: {
// shape: 'circle',
- name: {
- textStyle: {
- color: '#fff',
- backgroundColor: '#999',
- borderRadius: 3,
- padding: [3, 5]
- }
- },
indicator: [
- { name: '销售(sales)', max: 6500},
+ { name: '销售(Sales)', max: 6500},
{ name: '管理(Administration)', max: 16000},
{ name: '信息技术(Information Technology)', max: 30000},
{ name: '客服(Customer Support)', max: 38000},
@@ -35,14 +26,13 @@ option = {
series: [{
name: '预算 vs 开销(Budget vs spending)',
type: 'radar',
- // areaStyle: {normal: {}},
data: [
{
- value: [4300, 10000, 28000, 35000, 50000, 19000],
+ value: [4200, 3000, 20000, 35000, 50000, 18000],
name: '预算分配(Allocated Budget)'
},
{
- value: [5000, 14000, 28000, 31000, 42000, 21000],
+ value: [5000, 14000, 28000, 26000, 42000, 21000],
name: '实际开销(Actual Spending)'
}
]
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org