{ "info": { "author": "modusvivendi", "author_email": "yellolegalpad@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "Graphos\n----------------\n\n[![Build Status](https://travis-ci.org/agiliq/django-graphos.png)](https://travis-ci.org/agiliq/django-graphos)\n\nGraphos is a Django app to normalize data to create beautiful charts. \n\n* Demo: [http://agiliq.com/demo/graphos/](http://agiliq.com/demo/graphos/). \n* Docs: [https://pythonhosted.org/django-graphos-3/](https://pythonhosted.org/django-graphos-3/).\n\n### Supported Backends:\n\n* Python Nested lists\n* CSV Files\n* MongoDB\n* Redis\n* Django ORM\n\n### Charting API Supported\n\n* [Flot](http://flotcharts.org)\n* [Google Charts API](https://developers.google.com/chart/)\n* [YUI Charts](http://yuilibrary.com/yui/docs/charts/)\n* [Morris.js](http://www.oesmith.co.uk/morris.js/)\n* [Highcharts](http://www.highcharts.com/)\n\n### Chart types supported\n\n#### Flot\n\n* Line chart\n* Bar Chart\n* Point Chart\n\n#### Google Charts\n\n* Area chart\n* Bar chart\n* Candlestick charts\n* Column chart\n* Line chart\n* Pie chart\n* Treemap chart\n* Area chart\n\n#### YUI\n\n* Line chart\n* Column chart\n* Bar chart\n* Pie chart\n\n#### Morris.js\n\n* Line chart\n* Column chart\n* Donut chart\n\n#### Highcharts\n\n(You will need to buy a license if you use highcharts for commerical use)\n\n* Line Chart\n* Bar Chart\n* Column Chart\n* Pie Chart\n\n#### Matplotlib\n\n* LineChart\n* BarChart\n\n\n### Demo\n\nInstall the requirements, `manage.py runserver`.\nThe installed demo app shows the various suported chart types.\n\n\n### Overview of Plot generation\n\nGenerating a plot requires two things. A DataSource and a Chart object.\n\nIn your view, you do something like this:\n\n data = [\n ['Year', 'Sales', 'Expenses'],\n [2004, 1000, 400],\n [2005, 1170, 460],\n [2006, 660, 1120],\n [2007, 1030, 540]\n ]\n Chart = LineChart(SimpleDataSource(data=data), html_id=\"line_chart\")\n\nAnd then in the template:\n\n {{ chart.as_html }}\n\n\n### Examples\n\n#### Generating a plot from python list\n\n data = [\n ['Year', 'Sales', 'Expenses'],\n [2004, 1000, 400],\n [2005, 1170, 460],\n [2006, 660, 1120],\n [2007, 1030, 540]\n ]\n Chart = LineChart(SimpleDataSource(data=data))\n\n#### Generating a plot from CSV file\n\n csv_file = open(\"hello.csv\")\n LineChart(CSVDataSource(csv_file))\n\n#### Generating a plot from the ORM\n\n queryset = Accounts.objects.filter(foo=bar)\n LineChart(ModelDataSource(queryset, fields=[\"year\", \"sales\", \"expenses\"]))\n\n\n#### Generating a plot from Redis\nTodo\n\n#### Generating a plot from MongoDB\nTodo\n\n### Installation\n\npip install django-graphos\n\n### Compatibility\n\nGraphos is compatible with Python 2.7 and Python 3.3+\n\n[available on pypi](https://pypi.python.org/pypi/django-graphos/)\n\n\n### Creating new DataSource\n\nA DataSource is a class which has these three methods.\n\n get_data\n get_header\n get_first_column\n\n`get_header` is used by a `Renderer` to create the labels.\n`get_first_column` is used to set the x axis labels\n`get_data` is used to get the data for display. It should always return a nested list. Eg:\n\n [\n ['Year', 'Sales', 'Expenses'],\n [2004, 1000, 400],\n [2005, 1170, 460],\n [2006, 660, 1120],\n [2007, 1030, 540]\n ]\n\nIf you create a class extending `SimpleDataSource`, and implement `get_data`. You get\n`get_header` and `get_first_column` for free.\n\n### Creating new Renderer\n\nA renderer is a class which takes a `DataSource` and can convert it to the html to display.\n\nThe only required method on a `Renderer` is `as_html`. This will convert the dat ato a format which can display the chart.\n\nGenerally you will convert the data to json and pass it to the template which you return.\n\n\n### License\n\nBSD\n\n", "description_content_type": null, "docs_url": "https://pythonhosted.org/django-graphos-3/", "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/ModusVivendi/django-graphos", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-graphos-3", "package_url": "https://pypi.org/project/django-graphos-3/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-graphos-3/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/ModusVivendi/django-graphos" }, "release_url": "https://pypi.org/project/django-graphos-3/1.1/", "requires_dist": null, "requires_python": null, "summary": "Django app to provide a JS agnostic way to work with charts for Python 3+", "version": "1.1" }, "last_serial": 2120238, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "0dc54ab26eb81ef08ea662a6df12f20a", "sha256": "b9491e2026ffe77b68fcb875355fcc6f404beca1f6dba249e437fce1b0eac669" }, "downloads": -1, "filename": "django-graphos-3-0.1.1.tar.gz", "has_sig": false, "md5_digest": "0dc54ab26eb81ef08ea662a6df12f20a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 56495, "upload_time": "2015-10-27T05:43:34", "url": "https://files.pythonhosted.org/packages/6b/96/66a20945908886b1940bbd62f5e2681fd37a1fd38e3fd939573c77f63acf/django-graphos-3-0.1.1.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "55d1ba96bb02f332a80086a73781df31", "sha256": "041d783ddb106e3e79abc8ac75f9ca4b6deec24b91a7230b631806f6eea9a1cd" }, "downloads": -1, "filename": "django-graphos-3-1.0.tar.gz", "has_sig": false, "md5_digest": "55d1ba96bb02f332a80086a73781df31", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 57547, "upload_time": "2016-05-17T16:15:44", "url": "https://files.pythonhosted.org/packages/e7/df/2362ded9c0dc0f6a3a3db3213151f468764fd9aa92736ca025c04e4eb3e3/django-graphos-3-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "1894ecb61c3b708e7ab28933318354c6", "sha256": "4a7e881a444e9d398b4e4407c41b45b8a029b373cb4992939bdb3e5244d21756" }, "downloads": -1, "filename": "django-graphos-3-1.1.tar.gz", "has_sig": false, "md5_digest": "1894ecb61c3b708e7ab28933318354c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 57617, "upload_time": "2016-05-17T16:53:14", "url": "https://files.pythonhosted.org/packages/fb/b0/49820a64854109472be10de47ae45abc9eb8e80e10cf08134de72a626faa/django-graphos-3-1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1894ecb61c3b708e7ab28933318354c6", "sha256": "4a7e881a444e9d398b4e4407c41b45b8a029b373cb4992939bdb3e5244d21756" }, "downloads": -1, "filename": "django-graphos-3-1.1.tar.gz", "has_sig": false, "md5_digest": "1894ecb61c3b708e7ab28933318354c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 57617, "upload_time": "2016-05-17T16:53:14", "url": "https://files.pythonhosted.org/packages/fb/b0/49820a64854109472be10de47ae45abc9eb8e80e10cf08134de72a626faa/django-graphos-3-1.1.tar.gz" } ] }