Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function randomData() {
- return Math.round(Math.random()*500);
- }
- var option=new Array();
- for (var i=0;i<3;i++){
- option.push(
- {"series": [{
- "data":new Array(),
- "label": {
- "emphasis": {
- "show": true
- },
- "normal": {
- "show": true
- }
- },
- "mapType": "china",
- "roam": false,
- "type": "map"
- }],
- visualMap: {
- min: 0,
- max: 500,
- left: 'right',
- top: 'bottom',
- text: ['高','低'], // 文本,默认为数值文本
- calculable: true,
- inRange: {
- color: ['#0ba800','#eac736','#d94e5d']
- }
- }
- }
- );
- }
- for(var j=0;j<option.length;j++){
- for(var m=0;m<10;m++){
- option[j].series[0].data.push(
- {
- name:'北京',
- value:randomData()
- }
- );
- }
- }
- for(var i=0;i<3;i++){
- for(var m=0;m<10;m++){
- document.write(option[i].series[0].data[m].value+"<br/>")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement