forked from Gitlink/forgeplus-react
This commit is contained in:
parent
418b31c115
commit
bf4584e70f
|
@ -242,6 +242,8 @@ class Activity extends Component{
|
|||
</div>
|
||||
}
|
||||
</div>
|
||||
{
|
||||
false ?
|
||||
<div className="normalBox mt20">
|
||||
<div class="normalBox-title">项目演化分析</div>
|
||||
<div className="echartBox">
|
||||
|
@ -252,7 +254,8 @@ class Activity extends Component{
|
|||
<span className="echartTitle">Issue演化图</span>
|
||||
<Pie />
|
||||
</div>
|
||||
</div>
|
||||
</div>:""
|
||||
}
|
||||
<div className="commentsBox">
|
||||
<div className="trendsTop">
|
||||
<span>Issue/Pr记录</span>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2,6 +2,7 @@ import React ,{ useEffect } from 'react';
|
|||
import * as echarts from 'echarts';
|
||||
import 'echarts/lib/chart/line';
|
||||
import axios from 'axios';
|
||||
import { getdata } from './data';
|
||||
|
||||
function Line() {
|
||||
useEffect(()=>{
|
||||
|
@ -12,8 +13,9 @@ function Line() {
|
|||
var chartDom = document.getElementById('line');
|
||||
var myChart = echarts.init(chartDom);
|
||||
var option;
|
||||
axios.get('https://echarts.apache.org/examples/data/asset/data/aqi-beijing.json').then((result)=>{
|
||||
console.log(result.data);
|
||||
console.log(getdata());
|
||||
var data = getdata();
|
||||
// axios.get('http://106.75.10.84:5000/Paddle/entropy').then((result)=>{
|
||||
myChart.setOption(
|
||||
(option = {
|
||||
tooltip: {
|
||||
|
@ -26,14 +28,14 @@ function Line() {
|
|||
bottom: '18%'
|
||||
},
|
||||
xAxis: {
|
||||
data: result && result.data.map(function (item) {
|
||||
data: data.map(function (item) {
|
||||
return item[0];
|
||||
})
|
||||
},
|
||||
yAxis: {},
|
||||
dataZoom: [
|
||||
{
|
||||
startValue: '2014-06-01'
|
||||
startValue: '2022-06-01'
|
||||
},
|
||||
{
|
||||
type: 'inside'
|
||||
|
@ -41,13 +43,13 @@ function Line() {
|
|||
],
|
||||
series: {
|
||||
type: 'line',
|
||||
data: result && result.data.map(function (item) {
|
||||
data: data.map(function (item) {
|
||||
return item[1];
|
||||
})
|
||||
}
|
||||
})
|
||||
);
|
||||
})
|
||||
// })
|
||||
option && myChart.setOption(option);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue