| <!-- | |
| Licensed to the Apache Software Foundation (ASF) under one | |
| or more contributor license agreements. See the NOTICE file | |
| distributed with this work for additional information | |
| regarding copyright ownership. The ASF licenses this file | |
| to you under the Apache License, Version 2.0 (the | |
| "License"); you may not use this file except in compliance | |
| with the License. You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, | |
| software distributed under the License is distributed on an | |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| KIND, either express or implied. See the License for the | |
| specific language governing permissions and limitations | |
| under the License. | |
| --> | |
| <html> | |
| <head> | |
| <meta charset='utf-8'> | |
| <script src='lib/simpleRequire.js'></script> | |
| <script src='lib/config.js'></script> | |
| <script src='lib/jquery.min.js'></script> | |
| <script src='lib/testHelper.js'></script> | |
| <link rel="stylesheet" href="lib/reset.css" /> | |
| <meta name='viewport' content='width=device-width, initial-scale=1' /> | |
| </head> | |
| <body> | |
| <style> | |
| html, body, #main0 { | |
| width: 100%; | |
| height: 100%; | |
| margin: 0; | |
| } | |
| </style> | |
| <div id='main0'></div> | |
| <script> | |
| var xs = [440000, 450000]; | |
| var ys = [4368000, 4537000]; | |
| require([ | |
| 'echarts', | |
| './data/map/json/world.json' | |
| ], function (echarts, worldJson) { | |
| echarts.registerMap('world', worldJson); | |
| var linesCount = 35663; | |
| var chart; | |
| var routes = []; | |
| var lngStep = 0.01; | |
| var lng0 = -160; | |
| var lng1 = lng0 + linesCount * lngStep; | |
| for (var i = 0; i < linesCount; i++) { | |
| var lng = lng0 + i * lngStep; | |
| var lat0 = 0; | |
| var lat1 = 90; | |
| // if (i % 1000 < 500) { | |
| // lat0 = 30; | |
| // lat1 = 120; | |
| // } | |
| routes.push([[lng, lat0], [lng, lat1]]); | |
| } | |
| var option = { | |
| title: { | |
| text: 'World Flights', | |
| left: 'center', | |
| textStyle: { | |
| color: '#eee' | |
| } | |
| }, | |
| backgroundColor: '#003', | |
| tooltip: { | |
| formatter: function (param) { | |
| return 'Line: ' + param.dataIndex; | |
| } | |
| }, | |
| geo: { | |
| map: 'world', | |
| left: 0, | |
| right: 0, | |
| zoom: 0.3, | |
| roam: true, | |
| silent: true, | |
| itemStyle: { | |
| normal: { | |
| borderColor: '#003', | |
| color: '#005' | |
| } | |
| } | |
| }, | |
| series: [{ | |
| type: 'lines', | |
| coordinateSystem: 'geo', | |
| blendModel: 'lighter', | |
| data: routes, | |
| large: true, | |
| // large: false, | |
| largeThreshold: 0, | |
| // progressive: 5e3, | |
| progressiveThreshold: 101, | |
| lineStyle: { | |
| normal: { | |
| opacity: 1, | |
| width: 1, | |
| // curveness: 0.3 | |
| } | |
| }, | |
| // blendMode: 'lighter' | |
| }, { | |
| type: 'scatter', | |
| coordinateSystem: 'geo', | |
| symbolSize: 5, | |
| color: ['green'], | |
| data: [ | |
| { | |
| value: [lng0, 30], | |
| label: { | |
| show: true, | |
| position: 'top', | |
| formatter: 'longitude start' | |
| } | |
| }, { | |
| value: [lng1, 30], | |
| label: { | |
| show: true, | |
| position: 'top', | |
| formatter: 'longitude end' | |
| } | |
| } | |
| ] | |
| }] | |
| }; | |
| var chart = testHelper.create(echarts, 'main0', { | |
| title: [ | |
| linesCount + ' lines should be rendered vertically side by side ', | |
| 'from the left green point to the right green point, NO GAP.', | |
| '( large:true and el.incremetal = true) ', | |
| 'And check roam.' | |
| ], | |
| option: option, | |
| height: 550 | |
| }); | |
| chart.on('finished', function () { | |
| console.log('finished'); | |
| }); | |
| }); | |
| </script> | |
| </body> | |
| </html> |