chartist README

The project's README from github.com/chartist-js/chartist. As one markdown file: README.md.

Big welcome by the Chartist Guy

NPM version Downloads Build status Coverage status Bundle size Join the chat at https://gitter.im/gionkunz/chartist-js

The Chartist Guy

Chartist is a simple responsive charting library built with SVG. There are hundreds of nice charting libraries already out there, but they are either:

That's why we started Chartist and our goal is to solve all of the above issues.


Quickstart   •   What is it made for?   •   What's new in v1?   •   Docs   •   Examples   •   Contribution

Quickstart

Install this library using your favorite package manager:

pnpm add chartist
# or
yarn add chartist
# or
npm i chartist

Then, just import chart you want and use it:

import { BarChart } from 'chartist';

new BarChart('#chart', {
  labels: ['W1', 'W2', 'W3', 'W4', 'W5', 'W6', 'W7', 'W8', 'W9', 'W10'],
  series: [
    [1, 2, 4, 8, 6, -2, -1, -4, -6, -2]
  ]
}, {
  high: 10,
  low: -10,
  axisX: {
    labelInterpolationFnc: (value, index) => (index % 2 === 0 ? value : null)
  }
});

Need an API to fetch data? Consider Cube, an open-source API for data apps.


supported by Cube

What is it made for?

Chartist's goal is to provide a simple, lightweight and unintrusive library to responsively craft charts on your website. It's important to understand that one of the main intentions of Chartist is to rely on standards rather than providing it's own solution to a problem which is already solved by those standards. We need to leverage the power of browsers today and say good bye to the idea of solving all problems ourselves.

Chartist works with inline-SVG and therefore leverages the power of the DOM to provide parts of its functionality. This also means that Chartist does not provide it's own event handling, labels, behaviors or anything else that can just be done with plain HTML, JavaScript and CSS. The single and only responsibility of Chartist is to help you drawing "Simple responsive Charts" using inline-SVG in the DOM, CSS to style and JavaScript to provide an API for configuring your charts.

Plugins

Coming soon.

For v0.11

Some features aren't right for the core product but there is a great set of plugins available which add features like:

and more.

See all the plugins here.

Contribution

We are looking for people who share the idea of having a simple, flexible charting library that is responsive and uses modern and future-proof technologies. The goal of this project is to create a responsive charting library where developers have their joy in using it and designers love it because of the designing flexibility they have. Please contribute to the project if you like the idea and the concept and help us to bring nice looking responsive open-source charts to the masses.

Contribute if you like the Chartist Guy!

chartist (chartist-js/chartist)

Searching Database…

13.4K ·GitHub
Что это?Chartist — простая адаптивная библиотека для построения графиков в вебе, основанная на встроенном SVG, а не на canvas.
Это фреймворк или просто библиотека для рисования?Это легковесная библиотека на JavaScript/TypeScript, а не фреймворк. Она рисует графики с помощью встроенного SVG в DOM и использует обычные CSS и JS для оформления и событий, не изобретая их заново.
Как мне добавить её в проект?Установите её любым удобным менеджером пакетов (например, npm), затем импортируйте нужный тип графика и используйте его прямо в коде.
Нужны ли мне дополнительные инструменты или бэкенд, чтобы передавать данные в графики?Для самой библиотеки никаких особых зависимостей не требуется: в ней не указано ни одной зависимости времени выполнения. Если нужен API для данных, в README в качестве необязательного open-source варианта предлагается Cube.
Каких функций сейчас нет в базовой библиотеке?Такие возможности, как подписи осей, всплывающие подсказки и окраска по пороговым значениям, не встроены в базовый Chartist — они реализованы в отдельных плагинах.
Для кого это предназначено?Для веб-разработчиков, которые хотят адаптивные графики без лишнего веса canvas, и для дизайнеров, которым нужен простой визуальный контроль через CSS.
Зачем использовать Chartist вместо библиотеки для графиков на основе canvas?Библиотеки на основе canvas обычно тяжелее и менее гибки в оформлении. Chartist использует встроенный SVG, поэтому графики можно стилизовать обычным CSS и напрямую управлять DOM, избегая «неправильной технологии» и лишнего веса, которые автор критикует в других решениях.
Можно ли расширить Chartist дополнительными возможностями, например подсказками?Да, дополнительные возможности, такие как подписи осей, всплывающие подсказки и окраска по пороговым значениям, доступны через отдельную экосистему плагинов, а не в базовой библиотеке.
Подходит ли Chartist для адаптивных панелей мониторинга, удобных на мобильных?Да, адаптивность — одна из основных целей проекта: и название библиотеки, и её описание подчеркивают построение графиков, которые подстраиваются под свой контейнер.
Size
22.2 MB
Stars
13.4K
Age
12y
Commits · 90 Days