All Projects → mher → Chartkick.py

mher / Chartkick.py

Licence: mit
Create beautiful Javascript charts with minimal code

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Chartkick.py

Django Jchart
📈 A Django package for plotting charts using the excellent Chart.JS library.
Stars: ✭ 115 (-83.45%)
Mutual labels:  django, chart, charting-library, chartjs
React Jsx Highcharts
Highcharts built with proper React components
Stars: ✭ 336 (-51.65%)
Mutual labels:  chart, charts, charting-library, highcharts
React Chartjs 2
React components for Chart.js, the most popular charting library
Stars: ✭ 4,667 (+571.51%)
Mutual labels:  chart, charts, charting-library, chartjs
Devextreme
HTML5 JavaScript Component Suite for Responsive Web Development
Stars: ✭ 1,385 (+99.28%)
Mutual labels:  chart, charts, charting-library
Aachartkit
📈📊🚀🚀🚀An elegant modern declarative data visualization chart framework for iOS, iPadOS and macOS. Extremely powerful, supports line, spline, area, areaspline, column, bar, pie, scatter, angular gauges, arearange, areasplinerange, columnrange, bubble, box plot, error bars, funnel, waterfall and polar chart types. 极其精美而又强大的跨平台数据可视化图表框架,支持柱状图、条形图、折…
Stars: ✭ 4,358 (+527.05%)
Mutual labels:  chart, charting-library, highcharts
Amcharts4
The most advanced amCharts charting library for JavaScript and TypeScript apps.
Stars: ✭ 907 (+30.5%)
Mutual labels:  chart, charts, charting-library
React D3 Components
D3 Components for React
Stars: ✭ 1,599 (+130.07%)
Mutual labels:  chart, charts, charting-library
Graphic
A Flutter data visualization library based on Grammar of Graphics.
Stars: ✭ 173 (-75.11%)
Mutual labels:  chart, charts, charting-library
Anychart Android
AnyChart Android Chart is an amazing data visualization library for easily creating interactive charts in Android apps. It runs on API 19+ (Android 4.4) and features dozens of built-in chart types.
Stars: ✭ 1,762 (+153.53%)
Mutual labels:  chart, charts, charting-library
Chart
Quick & smart charting for STDIN
Stars: ✭ 521 (-25.04%)
Mutual labels:  chart, charting-library, chartjs
ipychart
The power of Chart.js with Python
Stars: ✭ 48 (-93.09%)
Mutual labels:  charts, charting-library, chartjs
Aachartcore
📈📊☕️☕️☕️An elegant modern declarative data visualization chart framework for Android. Extremely powerful, supports line, spline, area, areaspline, column, bar, pie, scatter, angular gauges, arearange, areasplinerange, columnrange, bubble, box plot, error bars, funnel, waterfall and polar chart types.极其精美而又强大的 Android 数据可视化图表框架,支持柱状图、条形图、折线图、曲线图、折线填充图、曲线填充图、气泡图、扇形图、环形图、散点图、雷达图、混合图等各种类型的多达几十种的信息图图表,完全满足工作所需.
Stars: ✭ 424 (-38.99%)
Mutual labels:  chart, charts, highcharts
Flutter echarts
A Flutter widget to use Apache ECharts (incubating) in a reactive way.
Stars: ✭ 420 (-39.57%)
Mutual labels:  chart, charts, charting-library
Chartkick
Create beautiful JavaScript charts with one line of Ruby
Stars: ✭ 5,903 (+749.35%)
Mutual labels:  charts, chartjs, highcharts
chart
📊📉 Add beautiful and reusable charts with one line of ruby for Rails 5.x
Stars: ✭ 42 (-93.96%)
Mutual labels:  chart, highcharts, chartjs
HCLineChartView
HCLineChartView is a beautiful iOS library for drawing line charts. It is highly customizable and easy to use.
Stars: ✭ 22 (-96.83%)
Mutual labels:  chart, charts, charting-library
Anychart
AnyChart is a lightweight and robust JavaScript charting solution with great API and documentation. The chart types and unique features are numerous, the library works easily with any development stack.
Stars: ✭ 288 (-58.56%)
Mutual labels:  chart, charts, charting-library
Laravel Chartjs
Simple package to facilitate and automate the use of charts in Laravel 5.x using Chartjs v2 library
Stars: ✭ 404 (-41.87%)
Mutual labels:  chart, chartjs
Vue Chartjs
📊 Vue.js wrapper for Chart.js
Stars: ✭ 4,554 (+555.25%)
Mutual labels:  chart, chartjs
Reactochart
📈 React chart component library 📉
Stars: ✭ 459 (-33.96%)
Mutual labels:  charts, charting-library

Chartkick.py

.. image:: https://img.shields.io/pypi/v/chartkick.svg :target: https://pypi.python.org/pypi/chartkick

.. image:: https://travis-ci.org/mher/chartkick.py.svg?branch=master :target: https://travis-ci.org/mher/chartkick.py

Create beautiful Javascript charts with minimal code. Demo_!

Supports Chart.js, Google Charts, and Highcharts_

Works with Django, Flask/Jinja2 and most browsers (including IE 6). Also available in Ruby_ and pure JavaScript_

.. _Chartkick: http://chartkick.com .. _Chart.js: http://www.chartjs.org .. _Google Charts: https://developers.google.com/chart/ .. _Highcharts: http://highcharts.com .. _Demo: http://mher.github.io/chartkick.py/ .. _Ruby: http://chartkick.com .. _Javascript: https://github.com/ankane/chartkick.js

Usage

Line chart: ::

{% line_chart data %}

Pie chart: ::

{% pie_chart data with id='chart-1' height='400px' %}

Column chart: ::

{% column_chart data with min=400 max=1000 %}

Bar chart: ::

{% bar_chart data %}

Area chart: ::

{% area_chart data %}

Scatter chart: ::

{% scatter_chart data %}

Data

Data can be a dictionary or a list: ::

{'Chrome': 52.9, 'Opera': 1.6, 'Firefox': 27.7}

[['Chrome', 52.9], ['Firefox', 27.7], ['Opera', 1.6]]

For multiple series: ::

[{'data': [['2013-04-01 00:00:00 UTC', 52.9], ['2013-05-01 00:00:00 UTC', 50.7]], 'name': 'Chrome'},
 {'data': [['2013-04-01 00:00:00 UTC', 27.7], ['2013-05-01 00:00:00 UTC', 25.9]], 'name': 'Firefox'}]

Options

Charting library options can be passed through the library variable: ::

{% column_chart data with library={"title":"Super chart","width":"400px"} %}

.. Note:: Google Charts and Highcharts have different APIs. You may need to change the value of library when you switch from one library to another.

Or using chartkick.json file. Chartkick tries to locate chartkick.json file in template path and match options by id.

Installation

Install chartkick: ::

$ pip install chartkick
  • Django: Add chartkick to INSTALLED_APPS and STATICFILES_DIRS: ::

    INSTALLED_APPS = ( 'chartkick', )

    import chartkick STATICFILES_DIRS = ( chartkick.js(), )

  • Flask: Add chartkick to jinja_env and static_folder: ::

    import chartkick ck = Blueprint('ck_page', name, static_folder=chartkick.js(), static_url_path='/static') app.register_blueprint(ck, url_prefix='/ck') app.jinja_env.add_extension("chartkick.ext.charts")

Load JS scripts:

  • Chart.js ::

    <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.bundle.min.js"></script> <script src="/ck/static/chartkick.js"></script>
  • Google Charts ::

    <script src="https://www.gstatic.com/charts/loader.js"></script> <script src="/ck/static/chartkick.js"></script>
  • Highcharts ::

    <script src="https://code.highcharts.com/highcharts.js"></script> <script src="/ck/static/chartkick.js"></script>
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].