Skip to content

Commit

Permalink
例子更新
Browse files Browse the repository at this point in the history
  • Loading branch information
kener committed Mar 25, 2014
1 parent b13bdff commit 6f184b4
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
18 changes: 13 additions & 5 deletions doc/asset/js/echartsTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,22 @@ var theme = 'erik';
$('[name=theme-select]').on('change', function(){selectChange(this.value);});

function selectChange(value){
window.location.hash = value;

theme = value;
showLoading();
$('[name=theme-select]').val(theme);
require(['theme/' + theme], function(curTheme){
theme = curTheme;
if (theme != 'default') {
window.location.hash = value;
require(['theme/' + theme], function(curTheme){
theme = curTheme;
setTimeout(refreshAll, 500);
})
}
else {
window.location.hash = '';
theme = {};
setTimeout(refreshAll, 500);
})
}
}

function showLoading() {
Expand Down Expand Up @@ -65,7 +73,7 @@ else {
});
}

var hash = window.location.hash.replace('#','') || 'default';
var hash = window.location.hash.replace('#','') || 'erik';
if ($('[name=theme-select]').val(hash).val() != hash) {
$('[name=theme-select]').val('erik');
hash = 'erik';
Expand Down
6 changes: 3 additions & 3 deletions doc/example/map1.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
type: 'map',
mapType: 'china',
itemStyle:{
normal:{label:{show:true}, color:'#ffd700'},// for legend
normal:{label:{show:true}},
emphasis:{label:{show:true}}
},
data:[
Expand Down Expand Up @@ -157,7 +157,7 @@
type: 'map',
mapType: 'china',
itemStyle:{
normal:{label:{show:true}, color:'#ff8c00'},// for legend
normal:{label:{show:true}},
emphasis:{label:{show:true}}
},
data:[
Expand Down Expand Up @@ -187,7 +187,7 @@
type: 'map',
mapType: 'china',
itemStyle:{
normal:{label:{show:true}, color:'#da70d6'},// for legend
normal:{label:{show:true}},
emphasis:{label:{show:true}}
},
data:[
Expand Down
1 change: 1 addition & 0 deletions doc/example/map4.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
min: 0,
max: 1000000,
text:['High','Low'],
realtime: false,
calculable : true,
color: ['orangered','yellow','lightskyblue']
},
Expand Down
1 change: 1 addition & 0 deletions doc/example/map6.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
min: 800,
max: 50000,
text:['High','Low'],
realtime: false,
calculable : true,
color: ['orangered','yellow','lightskyblue']
},
Expand Down
2 changes: 2 additions & 0 deletions doc/example/theme.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
<option name='gray'>gray</option>
<option name='green'>green</option>
<option name='red'>red</option>
<option name='default'>default</option>
</select>
</div>
<button class="btn btn-info span4" type="button" onclick="saveAsImage()">Save As Image</button>
Expand Down Expand Up @@ -133,6 +134,7 @@
<option name='gray'>gray</option>
<option name='green'>green</option>
<option name='red'>red</option>
<option name='default'>default</option>
</select>
</div>
<button class="btn btn-info span4" type="button" onclick="saveAsImage()">Save As Image</button>
Expand Down

0 comments on commit 6f184b4

Please sign in to comment.