|
@@ -55,6 +55,7 @@ export const colorList = [
|
|
|
export const createStackingBarOption = ({ xData, seriesData }, extend = {}) => {
|
|
|
return mergeParams(
|
|
|
{
|
|
|
+ customType: 'NORMAL',
|
|
|
tooltip: {
|
|
|
trigger: 'axis',
|
|
|
axisPointer: {
|
|
@@ -152,6 +153,7 @@ export const createStackingBarOption = ({ xData, seriesData }, extend = {}) => {
|
|
|
export const createBarOption = ({ xData, seriesData }, extend = {}) => {
|
|
|
return mergeParams(
|
|
|
{
|
|
|
+ customType: 'NORMAL',
|
|
|
tooltip: {
|
|
|
trigger: 'axis',
|
|
|
axisPointer: {
|
|
@@ -244,6 +246,7 @@ export const createRingPieOption = (
|
|
|
const total = getTotal(data);
|
|
|
return mergeParams(
|
|
|
{
|
|
|
+ customType: 'NORMAL',
|
|
|
tooltip: {
|
|
|
trigger: 'item',
|
|
|
},
|
|
@@ -507,6 +510,7 @@ export const createPercentBarOption = (
|
|
|
}
|
|
|
return mergeParams(
|
|
|
{
|
|
|
+ customType: 'NORMAL',
|
|
|
tooltip: {
|
|
|
trigger: 'axis',
|
|
|
axisPointer: {
|
|
@@ -616,6 +620,7 @@ export const createPercentBarOption = (
|
|
|
export const createLineOption = ({ sData = [], xData = [] }, extend = {}) => {
|
|
|
return mergeParams(
|
|
|
{
|
|
|
+ customType: 'NORMAL',
|
|
|
grid: {
|
|
|
top: 50,
|
|
|
bottom: 15,
|
|
@@ -661,15 +666,18 @@ export const createLineOption = ({ sData = [], xData = [] }, extend = {}) => {
|
|
|
};
|
|
|
|
|
|
// 雷达图
|
|
|
-export const createRadarOption = ({ names, sData }, extend = {}) => {
|
|
|
+export const createRadarOption = ({ names, sData = [] }, extend = {}) => {
|
|
|
return mergeParams(
|
|
|
{
|
|
|
color: colorList,
|
|
|
+ tooltip: {
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
legend: {
|
|
|
data: sData.map((item) => item.name),
|
|
|
- bottom: 10,
|
|
|
- itemWidth: 8,
|
|
|
- itemHeight: 8,
|
|
|
+ bottom: 0,
|
|
|
+ itemWidth: 10,
|
|
|
+ itemHeight: 10,
|
|
|
textStyle: {
|
|
|
color: '#595959',
|
|
|
fontSize: 12,
|
|
@@ -677,9 +685,7 @@ export const createRadarOption = ({ names, sData }, extend = {}) => {
|
|
|
},
|
|
|
radar: {
|
|
|
radius: '65%',
|
|
|
- indicator: names.map((item) => {
|
|
|
- return { name: item };
|
|
|
- }),
|
|
|
+ indicator: names.map((item) => ({ name: item })),
|
|
|
axisName: {
|
|
|
color: '#8c8c8c',
|
|
|
fontSize: 10,
|
|
@@ -702,14 +708,13 @@ export const createRadarOption = ({ names, sData }, extend = {}) => {
|
|
|
series: [
|
|
|
{
|
|
|
type: 'radar',
|
|
|
- data: sData,
|
|
|
- itemStyle: {
|
|
|
- borderWidth: 1,
|
|
|
- borderColor: '#fff',
|
|
|
- },
|
|
|
- areaStyle: {
|
|
|
- opacity: 0.35,
|
|
|
- },
|
|
|
+ data: sData.map((item) => ({
|
|
|
+ value: item.data,
|
|
|
+ name: item.name,
|
|
|
+ areaStyle: {
|
|
|
+ opacity: 0.2,
|
|
|
+ },
|
|
|
+ })),
|
|
|
},
|
|
|
],
|
|
|
},
|