/
githubmirror
/
echarts
Обзор
Документация
Войти
/
githubmirror
/
echarts
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/lines-symbol.html
198 строк
7 KB
Mayank Mehta
Merge pull request #21320 from mynk2611/fix-20216
24 окт 2025, 12:02
Не верифицирован
24 окт 2025, 12:02
51ae58d
Код
Авторство
О чём код?
<!-- 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/testHelper.js"></script> <!-- <script src="ut/lib/canteen.js"></script> --> <link rel="stylesheet" href="lib/reset.css" /> </head> <body> <div id='main0'></div> <div id='main1'></div> <script> require([ 'echarts', './data/map/js/china.js' ], function (echarts) { var planePath = 'path://M1705.06,1318.313v-89.254l-319.9-221.799l0.073-208.063c0.521-84.662-26.629-121.796-63.961-121.491c-37.332-0.305-64.482,36.829-63.961,121.491l0.073,208.063l-319.9,221.799v89.254l330.343-157.288l12.238,241.308l-134.449,92.931l0.531,42.034l175.125-42.917l175.125,42.917l0.531-42.034l-134.449-92.931l12.238-241.308L1705.06,1318.313z'; var option = { title: [{ text: '地图数据来源:天地图 cloudcenter.tianditu.gov.cn', subtext: '仅作为功能测试使用,线上产品应从天地图获取最新地图数据并申请审图号', link: 'https://cloudcenter.tianditu.gov.cn/', top: 15, left: 15, textStyle: { color: '#888', fontSize: 12 }, subtextStyle: { color: '#aaa', fontSize: 12 } }], geo: { map: 'china', roam: true, center: [104.2, 36], zoom: 1.4 }, legend: { show: true, data: ['a', 'b'] }, series: [{ name: 'a', type: 'lines', coordinateSystem: 'geo', polyline: true, effect: { show: true, period: 8, color: '#4433aa', symbolSize: 20, symbol: planePath }, zlevel: 1, lineStyle: { width: 4, opacity: 0.2 }, data: [{ coords: [ [100.5107, 23.2196], [120.5107, 23.2196] ], lineStyle: { curveness: 0.2 } }, { coords: [ [100.5107, 30.2196], [100.5107, 32.2196], [110.5107, 34.2196], [112.5107, 38.2196], [104.5107, 30.2196], [100.5107, 30.2196] ] }] }, { name: 'b', type: 'lines', coordinateSystem: 'geo', effect: { show: true, period: 4, color: '#4433aa', symbolSize: 20, symbol: planePath }, zlevel: 1, data: [{ coords: [ [100.5107, 23.2196], [120.5107, 23.2196] ], lineStyle: { curveness: 0.2, width: 4, opacity: 0.4 } }] }] } var chart = testHelper.create(echarts, 'main0', { option: option }); }); </script> <script> require([ 'echarts' ], async function (echarts) { var effectPeriod = 3; var option = { xAxis: { type: 'value', min: 0, max: 100, show: false }, yAxis: { type: 'value', min: 0, max: 100, inverse: true, show: false }, series: { type: 'lines', symbol: ['none', 'none'], symbolSize: 10, effect: { show: true, period: effectPeriod, trailLength: 0, symbol: 'arrow', color: '#FFC12F', symbolSize: 10, }, lineStyle: { color: '#000', width: 2, opacity: 0.6, curveness: 0.2 }, coordinateSystem: 'cartesian2d', data: [ { coords: [ [10, 43.2], [50, 38] ] } ] } }; var chart = testHelper.create(echarts, 'main1', { option: option, title: [ 'Effect symbol **SHOULD NOT** flip on unidirectional loop end when `roundTrip` is not enabled' ] }); await new Promise((resolve) => setTimeout(resolve, effectPeriod * 1e3 / (window.__VRT_INIT__ ? 5 : 1))) chart.getZr().animation.pause() }) </script> </body> </html>