diff --git a/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js b/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js index 9eedb8e3e..a19eb05c8 100644 --- a/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js +++ b/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js @@ -38,21 +38,23 @@ class Signinstatistics extends Component { if(response.data.history_attendances.length>0){ response.data.history_attendances.map((item,key)=>{ newlists.push({ - // month: item.index, - // month: item.name+" "+item.attendance_date+" "+item.start_time+"-"+item.end_time, - month:item.name, + month: item.index, + name: item.name+" "+item.attendance_date+" "+item.start_time+"-"+item.end_time, + // month:item.name, city:"到课率", temperature: (item.normal_rate*100).toFixed(0) }) newlists.push({ - //month: item.index, - month:item.name, + month: item.index, + name: item.name+" "+item.attendance_date+" "+item.start_time+"-"+item.end_time, + // month:item.name, city: "旷课率", temperature: (item.absence_rate*100).toFixed(0) }) newlists.push({ - //month: item.index, - month:item.name, + month: item.index, + name: item.name+" "+item.attendance_date+" "+item.start_time+"-"+item.end_time, + // month:item.name, city: "请假率", temperature: (item.leave_rate*100).toFixed(0) }) @@ -105,6 +107,9 @@ class Signinstatistics extends Component { let {datas,newlist,course_groups,spal}=this.state; const cols = { + month:{ + range: [0, 1] + }, temperature: { type: 'log', base: 10 @@ -229,6 +234,14 @@ class Signinstatistics extends Component { // color={"city"} shape={"smooth"} color={["city", ["#26C7C9", "#FF835C","#EDBA6F"]]} + tooltip={['name*temperature*city', (name, temperature,city) => { + return { + //自定义 tooltip 上显示的 title 显示内容等。 + name: city, + title: name, + value: temperature+"%" + }; + }]} /> { + // return { + // //自定义 tooltip 上显示的 title 显示内容等。 + // name: 'sold1', + // title: 'dddd' + month, + // value: temperature + // }; + // }]} />