native-echarts实现动态资源图形化实时监控及代码示例
1、组件集成以优化
- native-echarts集成:https://blog.csdn.net/weixin_44187730/article/details/86489233
- react-native-orientation集成:https://blog.csdn.net/weixin_44187730/article/details/86691850
2、示例代码
import React, {
Component} from 'react';
import Echarts from 'native-echarts';
import Orientation from "react-native-orientation";
export default class EchartsDynamicChart extends Component {
constructor(props) {
super(...arguments);
this.state = {
qpsData: [],
xData: [],
};
this._getDateToHS = this._getDateToHS.bind(this);
}
//返回mm:ss时间
_getDateToHS = (date = new Date()) => {
let mon = date