integrate into git
continuous-integration/drone Build is passing

This commit is contained in:
2022-03-07 11:02:16 +01:00
parent e164316466
commit 2c4f05aebf
82 changed files with 63754 additions and 386 deletions
+44
View File
@@ -0,0 +1,44 @@
import React from "react";
import { Bar } from "react-chartjs-2";
import { Chart, CategoryScale, BarElement, LogarithmicScale } from "chart.js";
import styles from "./RepoSummary.module.sass";
Chart.register(CategoryScale, BarElement, LogarithmicScale);
function sortByValue(obj) {
return Object.entries(obj).sort(([, a], [, b]) => b - a);
}
export function RepoSummary(props) {
const langs = sortByValue(props.stats.languages);
console.log(props.publicGithubRepos);
return (
<div className={styles.container}>
<Bar
options={{
indexAxis: "y",
responsive: true,
scales: {
myScale: {
type: "logarithmic",
position: "bottom",
},
},
}}
data={{
labels: langs.map((obj) => {
return obj[0];
}),
datasets: [
{
label: "D1",
data: langs.map((obj) => {
return obj[1];
}),
backgroundColor: "#355070",
},
],
}}
/>
</div>
);
}
@@ -0,0 +1,4 @@
.container
max-width: 1000px
width: 50vw
margin: 150px 0
+3
View File
@@ -0,0 +1,3 @@
import { RepoSummary } from "./RepoSummary";
export default RepoSummary;