• Stars
    star
    1,053
  • Rank 43,788 (Top 0.9 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created about 4 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Easily create data visualization animation videos


Code Time NPM npm GitHub last commit GitHub closed issues Language grade: JavaScript

中文 | English

Easily create data visualization animated video.

DEMO

anichart-preview

Online editable DEMO

Warning

Due to a browser security policy update, online editing is now only supported for browsing, and no longer directly supports video export.

Edit anichart 2.x

TJDXT

This project is open source and free.

This is a web environment, using TypeScript programming animation library. It can be used in data visualization, video animation display, opening and ending and other fields.

Currently under development, although the features have been implemented, but does not provide a friendly interface, want to make their own work need to read the source code and understand Typescript programming.

If you feel that the wasm version of FFmpeg is too slow, it also supports exporting Png sequences and calling local FFmpeg to generate videos.

This project needs the technical support of all the technical personnel. But if you're just a regular user, you can also support it through sponsorship. You can use Alipay or WeChat to support through AZZ. It can also be supported by GitHub Sponsor (one credit card is required).

Brief

This is a better template for visualization.

Compared with its predecessor,the main advantage lies in:

  • Programmable: Open interfaces that allow the insertion of custom code, data calculated by the framework, drawing based on the Canvas API.
  • Straight out video: Video can be rendered directly from each image frame without any screen recording tools. Maintains FPS stability and rendering speed.And thanks to this, you can now export any resolution, regardless of the screen range displayed. At the same time through the built-in API to achieve the progress of the drag, easy debugging.
  • Convention over configuration: simplifies the user's configuration to the greatest extent, without too many complex Settings you can get a beautiful chart.
  • Virtual components: Similar to virtual DOM, it further enhances extensibility by splitting components and renderers. Ease of porting to more platforms and support for more efficient WebGL rendering in the future.

Use

Currently, anichart for general users is under development, and what is described below is geared towards developers and is more hardcore. If you have data visualization needs right now, you can use the predecessor project, or use the aforementioned online editing project codesandbox.io/s/anichart-2x-m3xbz?fontsize=14&hidenavigation=1&theme=dark).


For general developers, you can use this repository as a template for data visualization projects. You need to have some basic development in Javascript or Typescript.

Steps

yarn install
yarn start

Installation

For advanced developers who want to use anichart in their projects, you can install it as follows.

Via Package Manager

yarn add anichart

# or
npm i anichart

Via HTML tags

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/anichart.min.js"></script>

Usage

Use Npm or Yarn imports

You can skip this step if you are using label imports, but if you are using NPM or Yarn you need to import the package with the following code:

const anichart = require("anichart");

OR

import * as anichart from "anichart";

Prepare Data

For example, use CSV file.

name,date,value,channel,other
Jannchie,2020-01-01,1,科技,other
Jannchie,2020-01-03,6,科技,other
Jannchie,2020-01-05,3,科技,other
Jannchie,2020-01-07,-,科技,other
Jannchie,2020-01-09,7,科技,other
Jannchie,2020-01-12,12,科技,other
Cake47,2020-01-03,10,生活,other
Cake47,2020-01-02,5,生活,other
Cake47,2020-01-06,2,生活,other
Cake47,2020-01-09,3,生活,other
Cake47,2020-01-11,4,生活,other

Load Data

// Recourse By default, data needs to be loaded through a built-in recourse object
// The first argument is the path of the data, and the second argument is the name of the data
anichart.recourse.loadData("path/to/data.csv", "data")

Create the Object

// Create a Stage
let stage = new anichart.Stage();
// Create a chart that loads data named "data" by default
let chart = new anichart.BarChart();
// Mount the chart
stage.addChild(chart);

Play the Animation

You can use code to control playback.

stage.play();

Output Video

Built-in FFMPEG for export. The output is printed in the Console.

// Configure to export video
stage.output = true;

Test

Browser

yarn serve
# or
npm run serve

Node.js

If you have special needs, such as server side users who regularly export video, you can use the Node.js environment.

Node.js support is now available, you can run the project with Node without any configuration, you will be able to export PNG sequences directly for video integration in tools like FFmpeg (there are no plans to call native FFmpeg functionality at this time, we look forward to the developer coming up with PR). However, the Node environment is not the primary development test environment, and you may encounter unknown bugs while developing in this environment. My energy is limited and I may not be able to give feedback in time. I hope capable developers can work with me to maintain it.

You can test Anichart under Node.js using the following command:

cd test
ts-node index.ts # This project is written in TypeScript, so it requires a TS-Node environment. You can also compile it into JS and test the compiled file.

More Repositories

1

Historical-ranking-data-visualization-based-on-d3.js

[Deprecated!] This is a data visualization project that converts historical data rankings into dynamic bar charts.
JavaScript
4,677
star
2

biliob-frontend

The frontend part of biliob.
Vue
127
star
3

biliob_backend

bilibili data acquisition and analysis.
Java
92
star
4

simpyder

超高速异步协程Python爬虫
Python
77
star
5

ComfyUI-J

Jannchie's ComfyUI custom nodes.
Python
69
star
6

codetime-web-v3

Front-end page of codetime, third version.
TypeScript
28
star
7

BilibiliRankListSpider

一个B站排行榜的爬虫Py程序
Python
26
star
8

roku-ui

又一个组件库,但是很好看。
TypeScript
23
star
9

biliob-spider-public

Publicable crawler part of the BiliOB
23
star
10

pyoxies

Python proxy pool
Python
17
star
11

gazer-system

Gazer system is used to track data.
Go
12
star
12

Software-Design-Pattern-Note

软件设计模式笔记
11
star
13

vue-ios-sheet

Vue
9
star
14

algorithm-c

各种算法的实现(C语言版本)
C
7
star
15

my-open-code-snippet

Some code snippet that opened to public.
Python
6
star
16

SchoolMap

It's a school map of HIT(WH) Based on QT (数据结构大作业,基于QT的校园地图)
C++
6
star
17

codetime-web

TypeScript
6
star
18

anichart-template

anichart template
TypeScript
6
star
19

jannchie.com

My profile, powered by nuxt.
Vue
5
star
20

anichart.io

Vue
4
star
21

Computer-Network-Notes

计算机网络复习笔记
4
star
22

Jannchie

4
star
23

anichart-remotion-template

TypeScript
3
star
24

ZEROROKU-QQ-Bot

QQ Bot
Python
3
star
25

biliob-analytics

Use NodeJS to analyze and sort out Biliob data.
JavaScript
3
star
26

jannchie-workspace-python3-webapp

A python webapp
Python
3
star
27

vuetify-template

This is an out-of-the-box template that uses Vue.js 2.0 and Vuetify.js. Devoting to help users start projects faster.
JavaScript
3
star
28

6tp

6tp is a simple IPv6 transport proxy, specifically designed to generate and assign random IP addresses from a specified subnet for efficient request handling and network traffic distribution.
Go
3
star
29

eslint-config

Jannchie's eslint config.
TypeScript
3
star
30

gitcm

An opinionated git commits message helper.
TypeScript
3
star
31

cake47.art

Cake47's Illustration Studio
Vue
3
star
32

gemini-chat-ui

Gemini Style Web UI, for ChatGPT Services
Vue
3
star
33

roku-charts

TypeScript
2
star
34

Tr.GPT

Translator GPT (https://trgpt.app/)
TypeScript
2
star
35

geoJson-map-data

2
star
36

spider-cookies

Parse and stringify cookies for web spider.
TypeScript
2
star
37

simple-diffusion

Stable Diffusion Web UI without Web UI
Python
2
star
38

zeroroku

TypeScript
2
star
39

word-recite-app-front-end

the front end of an app for memorizing vocabulary. Base on VUE.
Vue
2
star
40

koishi-plugin-openai-chatbot

A plugin for Koishi to integrate with OpenAI's GPT-3 language model as a chatbot.
TypeScript
2
star
41

log

My personal logs.
2
star
42

spying.js

Spy on the data of any website, for a long time.
TypeScript
2
star
43

zrrk

ZRRK is a Zappy live Room Robot toolKit.
Go
1
star
44

AdressListWebSite

A small web application to practise js and HTML skills
HTML
1
star
45

STR

Simple Tag Recommender.
Python
1
star
46

speedo

Go
1
star
47

anichart-remotion

Utility library for generate video from anichart by remotion.
TypeScript
1
star
48

PNCF

Neural collaborative filtering based on pre-trained embedding
Python
1
star
49

blog

Vue
1
star
50

anichart-doc

1
star
51

rank-spider

Crawl the data and calculate the ranklist.
Python
1
star
52

active-time

Automatic recording of time spent using the PC
TypeScript
1
star
53

vue-wf

Vue waterfall layout
Vue
1
star
54

furigana

Vue
1
star
55

anichart-v4

TypeScript
1
star
56

tgit-rs

TGIT is a tool for managing git repositories.
Rust
1
star