提交 66f88dda 编写于 作者: S sushuang

tweak cases and code check.

上级 157e9610
{
"bitwise": false,
"camelcase": true,
"camelcase": false,
"curly": true,
"eqeqeq": false,
"forin": false,
......
......@@ -251,6 +251,8 @@ echarts.registerPreprocessor(function (option) {
if (toolboxOpt && toolboxOpt.feature) {
var dataZoomOpt = toolboxOpt.feature.dataZoom;
// FIXME: If add dataZoom when setOption in merge mode,
// no axis info to be added. See `test/dataZoom-extreme.html`
addForAxis('xAxis', dataZoomOpt);
addForAxis('yAxis', dataZoomOpt);
}
......
......@@ -466,7 +466,7 @@ function makeSeriesTaskProgress(resetDefineIdx) {
else if (resetDefine && resetDefine.progress) {
resetDefine.progress(params, data);
}
}
};
}
function seriesTaskCount(context) {
......
......@@ -42,14 +42,14 @@ var replaceMap = {
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
'\'': '&#39;',
'\'': '&#39;'
};
export function encodeHTML(source) {
return source == null
? ''
: (source + '').replace(replaceReg, function (str, char) {
return replaceMap[char];
: (source + '').replace(replaceReg, function (str, c) {
return replaceMap[c];
});
}
......
......@@ -461,7 +461,7 @@
var myChart = echarts.init(document.getElementById('main'));
myChart.setOption({
backgroundColor: '#404a59',
// backgroundColor: '#404a59',
title: {
text: '全国主要城市空气质量',
subtext: 'data from PM25.in',
......
......@@ -42,27 +42,11 @@
require([
'echarts'
// 'echarts/chart/line',
// 'echarts/chart/bar',
// 'echarts/chart/pie',
// 'echarts/chart/scatter',
// 'echarts/chart/custom',
// 'echarts/chart/parallel',
// 'echarts/chart/radar',
// 'echarts/component/grid',
// 'echarts/component/polar',
// 'echarts/component/geo',
// 'echarts/component/singleAxis',
// 'echarts/component/legend',
// 'echarts/component/tooltip',
// 'echarts/component/toolbox',
// 'echarts/component/visualMap',
// 'echarts/component/dataZoom'
], function (ec) {
echarts = ec;
chart = myChart = echarts.init(document.getElementById('main'));
var data = [
var data = [
{name:'广州', value: 50},
{name:'深圳', value: 72},
{name:'珠海', value: 30},
......@@ -70,10 +54,10 @@ var data = [
{name:'杭州', value: 42},
{name:'舟山', value: 32},
{name:'宁波', value: 52}
];
];
option = {
option = {
tooltip : {
trigger: 'item'
},
......@@ -115,9 +99,9 @@ option = {
renderItem: renderProvinceName,
data: [0]
}])
};
};
function renderProvinceName(param, api) {
function renderProvinceName(param, api) {
var currentSeriesIndices = api.currentSeriesIndices();
currentSeriesIndices.pop(); // remove custom series;
......@@ -140,6 +124,7 @@ function renderProvinceName(param, api) {
style: {
text: serIdx,
fill: '#333',
textFill: '#eee',
stroke: null
}
};
......@@ -150,7 +135,7 @@ function renderProvinceName(param, api) {
diffChildrenByName: true,
children: nameTexts
};
}
}
chart.setOption(option);
});
......
......@@ -25,7 +25,7 @@
<h1>rainfall</h1>
<div class="chart" id="rainfall"></div>
<h1>zoom lock | Should not prevent default when mouse wheel.</h1>
<h1>zoom lock (only inside) | Should not prevent default when mouse wheel.</h1>
<div class="chart" id="zoom-lock"></div>
<h1>zoomOnMouseWheel: 'shift', moveOnMouseMove: 'alt' | Should not prevent default when mouse wheel.</h1>
<div class="chart" id="zoom-shift"></div>
......
......@@ -51,13 +51,13 @@
id: 'text1',
type: 'rect',
shape: {
x:0,
y:0,
x: 0,
y: 0,
width: 100,
height: 100,
},
style: {
fill: 'red',
fill: 'red'
}
}
};
......@@ -82,6 +82,7 @@
// });
// 删除后再添加。
myChart.setOption({
graphic: {
id: 'text1',
type: 'rect',
shape: {
......@@ -93,9 +94,13 @@
style: {
fill: 'red',
}
}
});
}, 1000);
document.getElementById('wid').innerText = window.innerWidth;
var hasRect;
window.onresize = function() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册