[M] Move non-course-related files to misc
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
node_modules
|
||||
dist
|
||||
.parcel-cache
|
||||
*.log
|
||||
@@ -0,0 +1,6 @@
|
||||
const serveStatic = require("serve-static");
|
||||
|
||||
module.exports = function (app) {
|
||||
app.use(serveStatic("node_modules/@ffmpeg/core/dist"));
|
||||
app.use(serveStatic("data"));
|
||||
};
|
||||
@@ -0,0 +1,15 @@
|
||||
# anichart-template
|
||||
|
||||
Quick start anichart project.
|
||||
|
||||
## Start
|
||||
|
||||
``` bash
|
||||
parcel index.html --open
|
||||
```
|
||||
|
||||
## Build
|
||||
|
||||
``` build
|
||||
parcel build index.html
|
||||
```
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 39 KiB |
@@ -0,0 +1,7 @@
|
||||
id,date,value
|
||||
A,2021-01-01,1
|
||||
A,2021-01-02,2
|
||||
A,2021-01-03,3
|
||||
B,2021-01-01,2
|
||||
B,2021-01-02,3
|
||||
B,2021-01-03,1
|
||||
|
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Anichart Typescript</title>
|
||||
<meta charset="UTF-8" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script type="module" src="src/index.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "anichart-template",
|
||||
"version": "1.0.1",
|
||||
"description": "Starter of anichart.js.",
|
||||
"scripts": {
|
||||
"start": "parcel index.html --open",
|
||||
"build": "parcel build index.html"
|
||||
},
|
||||
"dependencies": {
|
||||
"anichart": "2.3.1-alpha",
|
||||
"serve-static": "^1.14.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"parcel": "^2.0.0-rc.0",
|
||||
"typescript": "^4.3.5"
|
||||
},
|
||||
"keywords": [
|
||||
"chart",
|
||||
"data",
|
||||
"anichart"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
import * as ANI from "anichart";
|
||||
|
||||
const stage = new ANI.Stage();
|
||||
stage.options.fps = 60;
|
||||
stage.options.sec = 40;
|
||||
|
||||
const userid: {[id: string]: string} = {
|
||||
'user1868166081': '桂',
|
||||
}
|
||||
|
||||
// Bar chart
|
||||
ANI.recourse.loadCSV("./output.csv", "data");
|
||||
let bar = new ANI.BarChart({
|
||||
dateLabelOptions: {},
|
||||
});
|
||||
|
||||
// Disable name display
|
||||
bar.barInfoFormat = (id, meta, data) => ''
|
||||
bar.showRankLabel = false
|
||||
console.log(bar.data);
|
||||
|
||||
|
||||
// Avatars
|
||||
for (let key in userid) {
|
||||
let user = userid[key]
|
||||
ANI.recourse.loadImage(`./avatar/${user}.jpg`, user);
|
||||
}
|
||||
|
||||
stage.canvas.width = 1920;
|
||||
stage.canvas.height = 1080;
|
||||
const rect = new ANI.Rect({
|
||||
shape: { width: 1920, height: 1080 },
|
||||
fillStyle: "#1e1e1e",
|
||||
});
|
||||
stage.addChild(rect);
|
||||
stage.addChild(bar);
|
||||
|
||||
const center = new ANI.Text({ text: "uwu", font: 'Microsoft Yahei UI' })
|
||||
center.fontSize = 90
|
||||
stage.addChild(center);
|
||||
|
||||
stage.play();
|
||||
stage.output = true;
|
||||
|
||||
// new ANI.MapChart({});
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"strict": true,
|
||||
"module": "commonjs",
|
||||
"jsx": "preserve",
|
||||
"esModuleInterop": true,
|
||||
"sourceMap": true,
|
||||
"allowJs": false,
|
||||
"lib": ["es6", "dom"],
|
||||
"rootDir": "src",
|
||||
"moduleResolution": "node"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user