|
@@ -47,6 +47,7 @@ export const getItemStyle = (c1, c2) => {
|
|
|
};
|
|
|
}
|
|
|
export const defaultMonth = ['01', "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"];
|
|
|
+export const defaultDay = ['01', "02", "03", "04", "05", "06", "07"];
|
|
|
export const defaultName = ['name1', 'name2', 'name3'];
|
|
|
|
|
|
|
|
@@ -67,9 +68,9 @@ export const ringType = (
|
|
|
data.map(item => {
|
|
|
if (item.name == v) {
|
|
|
if (legendFcuntion.type == '%') {
|
|
|
- val = `{a|${v}} · · · · · · {b|${parseInt((item.value / legendFcuntion.total).toFixed(2) * 100) || 0}%}`
|
|
|
+ val = `{a|${v}}· · ·{b|${parseInt((item.value / legendFcuntion.total).toFixed(2) * 100) || 0}%}`
|
|
|
} else {
|
|
|
- val = `{a|${v}} · · · · · · {b|${item.value}}`
|
|
|
+ val = `{a|${v}}· · ·{b|${item.value}}`
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -82,7 +83,7 @@ export const ringType = (
|
|
|
},
|
|
|
legend: {
|
|
|
orient: 'vertical',
|
|
|
- right: 10,
|
|
|
+ right: 0,
|
|
|
top: 20,
|
|
|
itemGap: 10,
|
|
|
itemWidth: 12, // 图例图形宽度
|
|
@@ -288,7 +289,7 @@ export const columnOptionsChart = (
|
|
|
barWidth = 6
|
|
|
) => {
|
|
|
let defaultData = [{
|
|
|
- name: '', type: 'bar', data: []
|
|
|
+ name: '', type: 'bar', data: [0,0,0,0,0,0,0]
|
|
|
}]
|
|
|
let defaultColor = [['#0EAEFF', '#85E9FF'], ['#F0646C', '#F4994E']]
|
|
|
let seriesConfiguration = () => {
|
|
@@ -355,7 +356,7 @@ export const columnOptionsChart = (
|
|
|
color: "#FFFFFF"
|
|
|
},
|
|
|
formatter(param) {
|
|
|
- let el = `<div class="dmp-echart-tooltip" style="text-align: center;"><h4>${dateType(param[0].axisValue)}</h4>`;
|
|
|
+ let el = `<div class="dmp-echart-tooltip" style="text-align: center;"><h4>${param[0].axisValue}</h4>`;
|
|
|
param.forEach(item => {
|
|
|
el += `<p style="text-align: left;">
|
|
|
<span style="display:inline-block;margin-right:5px;border-radius:4px;width:12px;height:8px;background-image: linear-gradient(to left,
|
|
@@ -389,7 +390,7 @@ export const columnOptionsChart = (
|
|
|
color: "#9B9DA5",
|
|
|
margin: 15
|
|
|
},
|
|
|
- data: !!xAxis.length ? xAxis : defaultMonth
|
|
|
+ data: !!xAxis.length ? xAxis : defaultDay
|
|
|
},
|
|
|
yAxis: {
|
|
|
type: "value",
|