Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(props) {
super(props);
ReactChartkick.addAdapter(Chart)
this.state = {
chartData: [],
}
this.timer = null;
this.lastsongid = "";
console.log(zoom);
}
import Counter from './components/counter/Counter';
import Authors from './components/authors/Authors';
import Commits from './components/commits/Commits';
import CommitCountList from './components/commitCountList/CommitCountList';
import { connect } from 'react-redux';
import ACTIONS from './constants/actions.constants';
import Chart from 'chart.js';
import './dashboard.css';
import '../node_modules/react-github-contribution-calendar/default.css';
import moment from 'moment';
import PR from './components/pr/PR';
import CommitsCard from './components/commitsCard/CommitsCard';
import CommitShare from './components/commitShare/CommitShare';
ReactChartkick.addAdapter(Chart);
const until = new Date();
const panelColors = ['#eeeeee', '#c6e48b', '#7bc96f', '#239a3b', '#196127'];
class Dashboard extends React.Component {
constructor(props) {
super(props);
this.state = {
author: 'all',
duration: 'weeks'
};
}
componentDidMount() {
const { dispatch } = this.props;
dispatch({
render() {
const { classes } = this.props
let rows = []
if (this.state.updatedUserStats.length !== 0) {
rows = this.state.updatedUserStats
}
const compareRowsByDateDesc =(a, b) => {
return Moment(b.day).diff(Moment(a.day))
}
ReactChartkick.addAdapter(Chart)
let followersFollowingChartData = [{name: 'Followers', data: {}}, {name: 'Following', data: {}}]
let newFollowersChartData = [{name: 'New Followers', data: {}}]
rows.forEach((item) => {
followersFollowingChartData[0]['data'][item.day] = item.followers
followersFollowingChartData[1]['data'][item.day] = item.following
newFollowersChartData[0]['data'][item.day] = item.newFollowers
}
)
return (
<div>
<h1>User Statistics</h1>
</div>
import React from 'react';
import * as http from 'http';
import * as socketio from 'socket.io-client';
import Layout from '../layout';
import { Meta } from '../types/meta';
import { getMetaData } from '../server/helper/meta';
import ReactChartkick, { AreaChart } from 'react-chartkick';
import Chart from 'chart.js';
import { Stats } from '../types/mongodb';
ReactChartkick.addAdapter(Chart);
type Props = {
meta: Meta;
};
type State = {
stats?: Stats;
};
export default class LegalNotice extends React.Component {
state: State = {};
static async getInitialProps(ctx: { req: http.IncomingMessage }) {
let meta: Meta;
if (ctx.req) {
import React, {Component} from "react"
import ReactChartkick, { LineChart, PieChart } from 'react-chartkick'
import Chart from 'chart.js'
ReactChartkick.addAdapter(Chart)
class MoneyChart extends Component {
constructor(props) {
super(props);
this.state = {
data: [],
};
}
render(){
return(
)
}