房源散列图新增物业类型标识
This commit is contained in:
@@ -724,19 +724,59 @@
|
|||||||
});
|
});
|
||||||
var series = new Array();
|
var series = new Array();
|
||||||
series[0] = {
|
series[0] = {
|
||||||
name:"房源散列图",
|
name:"房源散列图-普通住宅",
|
||||||
data:new Array()
|
data:new Array()
|
||||||
//color:"#660099"
|
//color:"#660099"
|
||||||
}
|
}
|
||||||
|
series[1] = {
|
||||||
|
name:"房源散列图-商住",
|
||||||
|
data:new Array(),
|
||||||
|
color:"#12990f"
|
||||||
|
}
|
||||||
|
series[2] = {
|
||||||
|
name:"房源散列图-别墅",
|
||||||
|
data:new Array(),
|
||||||
|
color:"#992632"
|
||||||
|
}
|
||||||
|
var series_arry_0 = []
|
||||||
|
var series_arry_1 = []
|
||||||
|
var series_arry_2 = []
|
||||||
$(data).each(function(i,item){
|
$(data).each(function(i,item){
|
||||||
var pdate = item.pDate + "";
|
var pdate = item.pDate + "";
|
||||||
var ds = pdate.substring(0, 4) + '-' + pdate.substring(4, 6) + '-' + pdate.substring(6)
|
var ds = pdate.substring(0, 4) + '-' + pdate.substring(4, 6) + '-' + pdate.substring(6)
|
||||||
series[0].data.push({
|
if (item.estateType.indexOf('别墅') > -1){
|
||||||
x:new Date(ds),
|
series_arry_2.push({
|
||||||
y:Math.round(item.totalPrice/item.area),
|
x:new Date(ds),
|
||||||
data:item
|
y:Math.round(item.totalPrice/item.area),
|
||||||
})
|
data:item
|
||||||
|
})
|
||||||
|
}else if((item.estateType.indexOf('商住') > -1) || (item.estateType.indexOf('公寓酒店') > -1)){
|
||||||
|
series_arry_1.push({
|
||||||
|
x:new Date(ds),
|
||||||
|
y:Math.round(item.totalPrice/item.area),
|
||||||
|
data:item
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
series_arry_0.push({
|
||||||
|
x:new Date(ds),
|
||||||
|
y:Math.round(item.totalPrice/item.area),
|
||||||
|
data:item
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// series[0].data.push({
|
||||||
|
// x:new Date(ds),
|
||||||
|
// y:Math.round(item.totalPrice/item.area),
|
||||||
|
// data:item
|
||||||
|
// })
|
||||||
|
// series[1].data.push({
|
||||||
|
// x:new Date(ds),
|
||||||
|
// y:Math.round(item.totalPrice/item.area),
|
||||||
|
// data:item
|
||||||
|
// })
|
||||||
});
|
});
|
||||||
|
series[0].data = series_arry_0
|
||||||
|
series[1].data = series_arry_1
|
||||||
|
series[2].data = series_arry_2
|
||||||
$('#houseChart').highcharts({
|
$('#houseChart').highcharts({
|
||||||
chart: {
|
chart: {
|
||||||
type: 'scatter',
|
type: 'scatter',
|
||||||
|
|||||||
Reference in New Issue
Block a user