| <!-- | |
| 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> | |
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | |
| <link rel="stylesheet" href="lib/reset.css"> | |
| </head> | |
| <body> | |
| <style> | |
| </style> | |
| <div id="main"></div> | |
| <script> | |
| var echarts; | |
| var colorTool; | |
| var chart; | |
| var myChart; | |
| var groupCategories = []; | |
| var groupColors = []; | |
| require(['echarts'], function (ec) { | |
| echarts = ec; | |
| colorTool = echarts.color; | |
| var myChart = echarts.init(document.getElementById('main')); | |
| var xAxisData = [ | |
| 'Aries', 'Taurus', 'Gemini', 'Cancer', 'Leo', 'Virgo', 'Libra', | |
| 'Scorpio', 'Sagittarius', 'Capricornus', 'Aquarius', 'Pisces' | |
| ]; | |
| var data0 = []; | |
| var data1 = []; | |
| var data2 = []; | |
| var data3 = []; | |
| for (var i = 0; i < xAxisData.length; i++) { | |
| data0.push([Math.random() * 100, Math.random() * 30]); | |
| data1.push(Math.random() * 30); | |
| data2.push([Math.random() * (i % 2 === 0 ? 100 : 1000000), Math.random() * 30]); | |
| data3.push([+new Date() + Math.round(Math.random() * 3600 * 24 * 30), Math.random() * 30]); | |
| } | |
| var height = '18%'; | |
| myChart.setOption({ | |
| backgroundColor: '#fff', | |
| tooltip: { | |
| trigger: 'axis' | |
| }, | |
| dataZoom: [{ | |
| type: 'inside', | |
| singleAxisIndex: [0] | |
| }, { | |
| type: 'inside', | |
| singleAxisIndex: [1] | |
| }, { | |
| type: 'inside', | |
| singleAxisIndex: [2] | |
| }, { | |
| type: 'inside', | |
| singleAxisIndex: [3] | |
| }], | |
| singleAxis: [{ | |
| type: 'value', | |
| id: 'a', | |
| height: height, | |
| splitArea: { | |
| show: true | |
| } | |
| }, { | |
| type: 'category', | |
| id: 'b', | |
| data: xAxisData, | |
| height: height, | |
| axisPointer: { | |
| type: 'shadow' | |
| }, | |
| splitArea: { | |
| show: true | |
| }, | |
| top: '27%' | |
| }, { | |
| type: 'log', | |
| id: 'c', | |
| height: height, | |
| axisPointer: { | |
| snap: false, | |
| label: { | |
| show: true | |
| } | |
| }, | |
| splitArea: { | |
| show: true | |
| }, | |
| top: '55%' | |
| }, { | |
| type: 'time', | |
| id: 'd', | |
| splitArea: { | |
| show: true | |
| }, | |
| height: height, | |
| top: '77%' | |
| }], | |
| series: [{ | |
| type: 'scatter', | |
| coordinateSystem: 'singleAxis', | |
| singleAxisId: 'a', | |
| symbolSize: function (val) { | |
| return val[1]; | |
| }, | |
| data: data0 | |
| }, { | |
| type: 'scatter', | |
| coordinateSystem: 'singleAxis', | |
| singleAxisId: 'b', | |
| symbolSize: function (val) { | |
| return val; | |
| }, | |
| data: data1 | |
| }, { | |
| type: 'scatter', | |
| coordinateSystem: 'singleAxis', | |
| singleAxisId: 'c', | |
| symbolSize: function (val) { | |
| return val[1]; | |
| }, | |
| data: data2 | |
| }, { | |
| type: 'scatter', | |
| coordinateSystem: 'singleAxis', | |
| singleAxisId: 'd', | |
| symbolSize: function (val) { | |
| return val[1]; | |
| }, | |
| data: data3 | |
| }] | |
| }); | |
| }); | |
| </script> | |
| </body> | |
| </html> |