/
githubmirror
/
echarts
Обзор
Документация
Войти
/
githubmirror
/
echarts
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/pie-endAngle.html
93 строки
3 KB
plainheart
fix(pie): fix `endAngle` is not applied on the empty circle
24 фев 2024, 13:28
Не верифицирован
24 фев 2024, 13:28
c539b1f
Код
Авторство
О чём код?
<!-- 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="data/pie-texture.js"></script> <script src="lib/dat.gui.min.js"></script> <link rel="stylesheet" href="lib/reset.css" /> <script src="lib/testHelper.js"></script> </head> <body> <style> </style> <div id="main"></div> <script> require([ 'echarts' ], function (echarts) { let chart = echarts.init(document.getElementById('main')); var config = { clockwise: true, startAngle: 90, endAngle: 360, }; function update() { chart.setOption({ legend: { bottom: '10%' }, series: { type: "pie", startAngle: config.startAngle, endAngle: config.endAngle, clockwise: config.clockwise, data: [{ value: 335, name: "Apple" }, { value: 310, name: "Grapes" }, { value: 234, name: "Pineapples" }, { value: 135, name: "Oranges" }, { value: 1548, name: "Bananas" }], } }); } var gui = new dat.GUI(); gui.add(config, 'clockwise') .onChange(update); gui.add(config, 'startAngle', 0, 360) .onChange(update); gui.add(config, 'endAngle', 0, 360) .onChange(update); update(); }); </script> </body> </html>