/
githubmirror
/
echarts
Обзор
Документация
Войти
/
githubmirror
/
echarts
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
6.0.0-beta.1
test/logScale.html
285 строк
10 KB
100pah
fix(logScale): add miss files.
23 июн 2025, 20:26
23 июн 2025, 20:26
f12ea98
Код
Авторство
О чём код?
<!-- 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/facePrint.js"></script> <script src="lib/testHelper.js"></script> <!-- <script src="lib/canteen.js"></script> --> <!-- <script src="lib/draggable.js"></script> --> <link rel="stylesheet" href="lib/reset.css" /> </head> <body> <style> </style> <div id='main0'></div> <div id='main1'></div> <div id='main2_negative'></div> <script> require([ 'echarts' ], function (echarts) { var option = { title: { text: '对数轴示例', x: 'center' }, tooltip: { trigger: 'item', formatter: '{a} <br/>{b} : {c}' }, legend: { left: 'left', //data: ['2的指数', '3的指数'] }, xAxis: [{ type: 'category', name: 'x', splitLine: {show: false}, data: ['一', '二', '三', '四', '五', '六', '七', '八', '九'] }], yAxis: [{ type: 'log', name: 'y', scale: false }], series: [ { name: '3的指数', type: 'line', data: [1, 3, 9, 27, 81, 247, 741, 2223, 6669] }, { name: '2的指数', type: 'line', data: [1, 2, 4, 8, 16, 32, 64, 128, 256] }, { name: '0.1 的指数', type: 'line', data: [1, 0.1, 0.01, 1e-3, 1e-4, 1e-5, 1e-6, 1e-7, 1e-8] }] }; var chart = testHelper.create(echarts, 'main0', { title: [ 'log test 1', ], option: option, }); }); </script> <script> require([ 'echarts' ], function (echarts) { // See #13154 var option = { xAxis: { type: 'value', }, yAxis: { type: 'log', logBase: 2, }, series: [ { type: 'scatter', itemStyle: { color: 'red', }, data: [ [1, .5], ], }, ], }; var chart = testHelper.create(echarts, 'main1', { title: [ 'log test 2', ], option: option, }); }); </script> <script> require([ 'echarts', ], function (echarts /*, data */) { var option = { backgroundColor: 'rgba(0,0,0,0.1)', legend: { top: 3, backgroundColor: 'rgba(250,0,0,0.4)', borderRadius: 3, borderWidth: 2, borderColor: 'rgba(150,0,0,0.7)' }, tooltip: {}, xAxis: [ { id: 0, name: 'xAxis_0 long name', nameTextStyle: { rich: { name_big_1: { borderWidth: 4, borderColor: 'rgba(0,180,0,0.5)', backgroundColor: 'rgba(0,150,0,0.5)', padding: [10, 20], color: '#000', fontSize: 20 } }, color: '#555' }, nameMoveOverlap: true, nameLocation: 'middle', axisLabel: { textStyle: { rich: { label_big_1: { borderWidth: 4, borderColor: 'rgba(0,180,0,0.5)', backgroundColor: 'rgba(0,150,0,0.5)', padding: [10, 20], color: '#000', fontSize: 20 } }, color: '#555' } }, axisLine: {onZero: false}, position: ['bottom', 'top'] } ], yAxis: [ { id: 0, name: 'yAxis_0 long name', type: 'log', nameTextStyle: { rich: { name_big_1: { borderWidth: 4, borderColor: 'rgba(0,180,0,0.5)', backgroundColor: 'rgba(0,150,0,0.5)', padding: [10, 20], color: '#000', fontSize: 20 } }, color: '#555' }, nameMoveOverlap: true, nameLocation: 'middle', axisLabel: { textStyle: { rich: { label_big_1: { borderWidth: 4, borderColor: 'rgba(0,180,0,0.5)', backgroundColor: 'rgba(0,150,0,0.5)', padding: [10, 20], color: '#000', fontSize: 20 } }, color: '#555' } }, axisLine: {onZero: false}, position: ['left', 'right'] } ], grid: [ { left: 100, right: 10, top: 30, bottom: 100, show: true, backgroundColor: 'rgba(150,0,0,0.2)' } ], series: [ { xAxisIndex: 0, yAxisIndex: 0, symbolSize: 10, name: 'series_small_0', data: [[-50, 12]], type: 'scatter' }, { xAxisIndex: 0, yAxisIndex: 0, symbolSize: 10, name: 'series_big_0', data: [ [10000000000, -832], [55555550000, 31133232233] ], type: 'scatter' } ] }; var chart = testHelper.create(echarts, 'main2_negative', { title: [ 'Test negative', ], option: option, }); }); </script> </body> </html>