|
@@ -10,10 +10,10 @@ namespace shiduan {
|
|
|
if (chartCatch.toufangfenxiChart === undefined) return
|
|
|
chartCatch.toufangfenxiChart.clear()
|
|
|
let title = this.data.DayList.length ? `${this.data.DayList[0].dt}至${this.data.DayList[0].dt}` : "";
|
|
|
- const data = this.data.DayList.map((v: any, i:number) => {
|
|
|
+ const data = this.data.DayList.map((v: any, i: number) => {
|
|
|
v.type = title
|
|
|
v.index = i
|
|
|
- v.timeSize = v.timeSize *100
|
|
|
+ v.timeSize = v.timeSize * 100
|
|
|
return v
|
|
|
});
|
|
|
if (chartCatch.toufangfenxiChart === undefined) return;
|
|
@@ -31,7 +31,7 @@ namespace shiduan {
|
|
|
if (index === total - 1) align = 'right';
|
|
|
return {
|
|
|
textAlign: align,
|
|
|
- text: data[Number(text)].hour
|
|
|
+ text: data[Number(text)].hour + '点'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -50,7 +50,7 @@ namespace shiduan {
|
|
|
const { tooltip: { title } } = ev;
|
|
|
let index = Number(title || 0);
|
|
|
index < 0 ? index = 0 : "";
|
|
|
- let nT = data[index].hour > 9 ? Number(data[index].hour) + 1 : '0' +( Number(data[index].hour ) + 1);
|
|
|
+ let nT = data[index].hour > 9 ? Number(data[index].hour) + 1 : '0' + (Number(data[index].hour) + 1);
|
|
|
items[0].name = data[index].hour + '~' + nT;
|
|
|
items[0].value = formmaterValueZhou(items[0].value, 2) + '%';
|
|
|
}
|
|
@@ -67,10 +67,10 @@ namespace shiduan {
|
|
|
config.height = sys.windowWidth / 16 * 9;
|
|
|
chartCatch.toufangfenxiChart = new F2.Chart(config);
|
|
|
let title = this.data.DayList.length ? `${this.data.DayList[0].dt}至${this.data.DayList[0].dt}` : "";
|
|
|
- const data = this.data.DayList.map((v: any, i:number) => {
|
|
|
+ const data = this.data.DayList.map((v: any, i: number) => {
|
|
|
v.type = title
|
|
|
v.index = i
|
|
|
- v.timeSize = v.timeSize *100
|
|
|
+ v.timeSize = v.timeSize * 100
|
|
|
return v
|
|
|
});
|
|
|
if (chartCatch.toufangfenxiChart === undefined) return;
|
|
@@ -88,7 +88,7 @@ namespace shiduan {
|
|
|
if (index === total - 1) align = 'right';
|
|
|
return {
|
|
|
textAlign: align,
|
|
|
- text: data[Number(text)].hour
|
|
|
+ text: data[Number(text)].hour + '点'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -107,8 +107,10 @@ namespace shiduan {
|
|
|
const { tooltip: { title } } = ev;
|
|
|
let index = Number(title || 0);
|
|
|
index < 0 ? index = 0 : "";
|
|
|
- let nT = data[index].hour > 9 ? Number(data[index].hour) + 1 : '0' +( Number(data[index].hour ) + 1);
|
|
|
- items[0].name = data[index].hour + '~' + nT;
|
|
|
+ let nT = data[index].hour > 9 ? Number(data[index].hour) + 1 : '0' + (Number(data[index].hour) + 1);
|
|
|
+ if (data[index].hour === '平均值') {
|
|
|
+ items[0].name = data[index].hour;
|
|
|
+ } else items[0].name = data[index].hour + '~' + nT;
|
|
|
items[0].value = formmaterValueZhou(items[0].value, 2) + '%';
|
|
|
}
|
|
|
});
|
|
@@ -116,6 +118,16 @@ namespace shiduan {
|
|
|
type: 'dodge',
|
|
|
marginRatio: 0.05 // 设置分组间柱子的间距
|
|
|
});
|
|
|
+ let linkey = data[data.length - 1].timeSize || 0
|
|
|
+ chartCatch.toufangfenxiChart.guide().line({
|
|
|
+ start: [ 'min', linkey ],
|
|
|
+ end: [ 'max', linkey ],
|
|
|
+ style: {
|
|
|
+ stroke: '#1b9ade',
|
|
|
+ lineWidth: 1,
|
|
|
+ lineCap: 'round'
|
|
|
+ }
|
|
|
+ });
|
|
|
chartCatch.toufangfenxiChart.render();
|
|
|
return chartCatch.toufangfenxiChart;
|
|
|
}
|