合并
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
var colorList = ['#c23531', '#2f4554', '#61a0a8', '#d48265', '#91c7ae', '#749f83', '#ca8622', '#bda29a', '#6e7074', '#546570', '#c4ccd3'];
|
||||
var labelFont = 'bold 12px Sans-serif';
|
||||
var date = new Date();
|
||||
var year = date.getFullYear();
|
||||
var month = date.getMonth()+1;
|
||||
|
||||
var dates;
|
||||
var data;
|
||||
@@ -114,7 +117,8 @@ function clickLineChart(type){
|
||||
}
|
||||
|
||||
/* 图表切换 */
|
||||
function lineChart() {
|
||||
|
||||
/*function lineChart() {
|
||||
mode = "kLine"
|
||||
$(".icon-chart01a").hide();
|
||||
$(".icon-chart01").show();
|
||||
@@ -135,7 +139,33 @@ function kLineChart() {
|
||||
$("#chart01a").show();
|
||||
$("#chart01").hide();
|
||||
loadLineData(city, region, name, type);
|
||||
};
|
||||
};*/
|
||||
|
||||
$("body").delegate(".icon-chart01a-no", "click", function () {
|
||||
$(this).addClass("icon-chart01a");
|
||||
$(this).removeClass("icon-chart01a-no");
|
||||
$(this).parent().find(".icon-chart01").addClass("icon-chart01-no")
|
||||
$(this).parent().find("i").removeClass("icon-chart01")
|
||||
mode = "line"
|
||||
var type = $("#trendDiv1 a.active").attr("t-v");
|
||||
$("#chart01a").show();
|
||||
$("#chart01").hide();
|
||||
loadLineData(city, region, name, type);
|
||||
})
|
||||
|
||||
$("body").delegate(".icon-chart01-no", "click", function () {
|
||||
|
||||
$(this).addClass("icon-chart01");
|
||||
$(this).removeClass("icon-chart01-no");
|
||||
$(this).parent().find(".icon-chart01a").addClass("icon-chart01a-no")
|
||||
$(this).parent().find("i").removeClass("icon-chart01a")
|
||||
mode = "kLine"
|
||||
var type = $("#trendDiv1 a.active").attr("t-v");
|
||||
$("#chart01a").hide();
|
||||
$("#chart01").show();
|
||||
loadKLineData(city, region, name, type);
|
||||
|
||||
})
|
||||
|
||||
|
||||
function showLoadRentTrends(type) {
|
||||
@@ -199,7 +229,16 @@ function doLoadKLineData(city, region, name, type){
|
||||
var counts = [];
|
||||
var times = []
|
||||
var haveCount = false;
|
||||
var curMonth;
|
||||
if(month<10){
|
||||
curMonth = year+"-0"+month;
|
||||
}else{
|
||||
curMonth = year+"-"+month;
|
||||
}
|
||||
for(var d in datas){
|
||||
if(d == curMonth){
|
||||
continue;
|
||||
}
|
||||
times.push(d);
|
||||
|
||||
var prices = new Array();
|
||||
@@ -268,7 +307,6 @@ function showTrends(v){
|
||||
|
||||
|
||||
var option01 = {
|
||||
animation: false,
|
||||
color: colorList,
|
||||
title: {
|
||||
text: null,
|
||||
@@ -280,9 +318,6 @@ var option01 = {
|
||||
data: ['均价']
|
||||
},
|
||||
tooltip: {
|
||||
triggerOn: 'none',
|
||||
transitionDuration: 0,
|
||||
confine: true,
|
||||
bordeRadius: 4,
|
||||
borderWidth: 1,
|
||||
borderColor: '#333',
|
||||
@@ -292,19 +327,21 @@ var option01 = {
|
||||
color: '#333'
|
||||
},
|
||||
formatter: function (params) {
|
||||
var res = params[0].seriesName + ' ' + params[0].name;
|
||||
res += '<br/> 月初 : ' + params[0].value[1]+ '元/㎡';
|
||||
res += '<br/> 月末 : ' + params[0].value[2]+ '元/㎡';
|
||||
res += '<br/> 最低 : ' + params[0].value[3]+ '元/㎡';
|
||||
res += '<br/> 最高 : ' + params[0].value[4]+ '元/㎡';
|
||||
return res;
|
||||
},
|
||||
position: function (pos, params, el, elRect, size) {
|
||||
var obj = {
|
||||
top: 60
|
||||
};
|
||||
obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 5;
|
||||
return obj;
|
||||
var res = params.seriesName + ' ' + params.name;
|
||||
var vals = params.value;
|
||||
if(vals == undefined){
|
||||
var obj = params[0];
|
||||
res = obj.seriesName + ' ' + obj.name;
|
||||
vals = obj.value;
|
||||
}
|
||||
if(vals){
|
||||
res += '<br/> 月初 : ' + vals[1]+ '元/㎡';
|
||||
res += '<br/> 月末 : ' + vals[2]+ '元/㎡';
|
||||
res += '<br/> 最低 : ' + vals[3]+ '元/㎡';
|
||||
res += '<br/> 最高 : ' + vals[4]+ '元/㎡';
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
axisPointer: {
|
||||
@@ -313,20 +350,10 @@ var option01 = {
|
||||
}]
|
||||
},
|
||||
dataZoom: [{
|
||||
type: 'slider',
|
||||
xAxisIndex: [0, 1],
|
||||
realtime: false,
|
||||
start: 1,
|
||||
end: 99,
|
||||
top: 5,
|
||||
height: 20,
|
||||
handleIcon: 'M10.7,11.9H9.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
|
||||
handleSize: '120%'
|
||||
}, {
|
||||
type: 'inside',
|
||||
xAxisIndex: [0, 1],
|
||||
start: 40,
|
||||
end: 70,
|
||||
start: 1,
|
||||
end: 99,
|
||||
top: 30,
|
||||
height: 20
|
||||
}],
|
||||
@@ -369,7 +396,7 @@ var option01 = {
|
||||
triggerTooltip: true,
|
||||
handle: {
|
||||
show: true,
|
||||
margin: -70,
|
||||
margin: -90,
|
||||
color: '#F18D00'
|
||||
}
|
||||
}
|
||||
@@ -412,7 +439,7 @@ var option01 = {
|
||||
grid: [{
|
||||
left: 20,
|
||||
right: 20,
|
||||
top: 60,
|
||||
top: 30,
|
||||
height: 120
|
||||
}, {
|
||||
left: 20,
|
||||
@@ -763,7 +790,7 @@ function doLoadLineData(city, region, name, type){
|
||||
function showLineChart(times, datas){
|
||||
var option01b = {
|
||||
tooltip: {
|
||||
triggerOn: 'none',
|
||||
//triggerOn: 'none',
|
||||
transitionDuration: 0,
|
||||
confine: true,
|
||||
bordeRadius: 4,
|
||||
@@ -791,11 +818,11 @@ function showLineChart(times, datas){
|
||||
y: 10,
|
||||
x2: 20,
|
||||
y2: 60,
|
||||
top: 60,
|
||||
top: 30,
|
||||
height: 120
|
||||
},
|
||||
color: ['#78CDE6'],
|
||||
dataZoom: [{
|
||||
/*dataZoom: [{
|
||||
realtime: false,
|
||||
start: 1,
|
||||
end: 99,
|
||||
@@ -803,7 +830,7 @@ function showLineChart(times, datas){
|
||||
height: 20,
|
||||
handleIcon: 'M10.7,11.9H9.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
|
||||
handleSize: '120%'
|
||||
}],
|
||||
}],*/
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
|
||||
Reference in New Issue
Block a user