Skip to content
/ T8 Public

๐Ÿงฌ Narrative text visualization for unstructured data.

License

Notifications You must be signed in to change notification settings

antvis/T8

Repository files navigation

English | ็ฎ€ไฝ“ไธญๆ–‡

๐Ÿงฌ T8: Narrative Text Visualization

T8 is a text visualization solution for unstructured data within the AntV technology stack, where T stands for Text, and 8 represents a byte of 8 bits, symbolizing that it can deeply uncover insights hidden beneath the text.

gzip size Build Status codecov npm Version npm License

T8-Preview-Lite.mp4

T8 is a declarative markdown syntax that can be used to describe the content of data interpretation reports. Technically, based on the assumption that the markdown syntax is generated by the server, the frontend simply consumes the syntax for rendering. As the demand for diversity and immediacy in data representation grows, along with the increasing application of AI and NLP technologies, maintaining text templates on the frontend will become unsustainable. In this context, using T8 for unified rendering will be the optimal choice.

๐Ÿ“š Documentation

  • Quick Start - Get started with T8 in minutes with installation and basic usage examples
  • Tutorial - Learn about themes, events, plugins, streaming, and LLM integration
  • Syntax - Complete T8 syntax reference and structure guide
  • API Reference - Detailed API documentation and usage guides

โœจ Features

  • ๐Ÿ›ซ Technology stack agnostic - Can be used into React, Vue, and other frontend stack.
  • ๐Ÿค– LLM friendly - The T8's syntax is easy to be generated by AI with prompt.
  • ๐Ÿ› ๏ธ Extensible - Register custom EntityPhrase to easily customize the T8's ui elements.
  • ๐Ÿชฉ Lightweight - Few dependencies, small footprint, before gzip it was less than 20 Kb.

๐Ÿ”จ Installation

Install T8 using npm or yarn:

npm install @antv/t8
yarn add @antv/t8

๐Ÿš€ Quick Example

import { Text } from '@antv/t8';

const text = new Text({ container: 'container' });
text.theme('light').render(`
  # Sales Report
  Total sales reached [ยฅ1,234,567](metric_value, origin=1234567).
`);

For complete usage examples and advanced features, see the Quick Start Guide.

๐Ÿค– Using with LLM

T8 is designed to be LLM-friendly. The T8 syntax can be easily generated by AI models, making it ideal for automated data narrative generation. To help you integrate T8 with AI agents:

๐Ÿ“ฎ Contributing

This project exists thanks to all the people who contribute. And thank you to all our backers! ๐Ÿ™

๐Ÿ“„ License

MIT@AntV.