Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
228 changes: 227 additions & 1 deletion LICENSE

Large diffs are not rendered by default.

115 changes: 85 additions & 30 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,32 @@ Highcharts for Python Toolkit

The **Highcharts for Python Toolkit** is a Python library that provides a Python wrapper
for the fantastic `Highcharts JS <https://www.highcharts.com>`__ suite of JavaScript data
visualization libraries, with full integration into the robust Python ecosystem. The full
toolkit includes support for:

* **Highcharts JS** - the core Highcharts data visualization library
* **Highcharts Stock** - the robust time series visualization extension to Highcharts JS
* **Highcharts Maps** - the rich map visualization extension to Highcharts JS
* **Highcharts Gantt** - the :term:`Gantt charting <Gantt Chart>` extension to
Highcharts JS
* The **Highcharts Export Server** - enabling the programmatic creation of static
(downloadable) data visualizations
visualization libraries, with full integration into the robust Python ecosystem.

The toolkit is composed of several different libraries, each of which provides comprehensive support for a component of the Highcharts JS suite:

.. list-table::
:widths: 30 30 40
:header-rows: 1

* - Python Library
- JavaScript Library
- Description
* - **Highcharts Core for Python**
- `Highcharts Core (JS) <https://www.highcharts.com/products/highcharts/>`__
- (this library) the core Highcharts data visualization library
* - `Highcharts Stock for Python <https://highcharts-stock.readthedocs.io/>`__
- `Highcharts Stock (JS) <https://www.highcharts.com/products/stock/>`__
- the robust time series visualization extension to Highcharts Core
* - `Highcharts Maps <https://highcharts-maps.readthedocs.io/>`__
- `Highcharts Maps (JS) <https://www.highcharts.com/products/maps/>`__
- the rich map visualization extension to Highcharts Core
* - `Highcharts Gantt <https://highcharts-gantt.readthedocs.io/>`__
- `Highcharts Gantt (JS) <https://www.highcharts.com/products/gantt/>`__
- the Gantt charting extension to Highcharts Core
* - (all libraries in the Python toolkit)
- The **Highcharts Export Server**
- enabling the programmatic creation of static (downloadable) data visualizations

In order to integrate **Highcharts for Python** into the Python ecosystem, the library
features native integration with:
Expand All @@ -25,8 +41,9 @@ features native integration with:
* **Pandas**. Automatically produce data visualizations from your Pandas dataframes
* **PySpark**. Automatically produce data visualizations from data in a PySpark
dataframe.
* ...and even more use-case specific integrations in each tool in the toolkit.

**COMPLETE DOCUMENTATION:** http://highcharts-core.readthedocs.org/en/latest/index.html
**COMPLETE DOCUMENTATION:** https://highcharts-core.readthedocs.org/en/latest/index.html

--------------------

Expand Down Expand Up @@ -70,7 +87,7 @@ capabilities to simplify integration with Javascript frontend frameworks (React,
VueJS, etc.). But facilitating that with Highcharts has historically been very difficult.
Part of this difficulty is because the Highcharts JavaScript suite - while supporting JSON as a
serialization/deserialization format - leverages
:term:`JavaScript object literals <JavaScript Object Literal Notation>` to expose the
JavaScript object literals to expose the
full power and interactivity of its data visualizations. And while it's easy to serialize
JSON from Python, serializing and deserializing to/from JavaScript object literal notation
is much more complicated. This means that Python developers looking to integrate with
Expand All @@ -96,21 +113,22 @@ Key Highcharts for Python Features
`Highcharts JS <https://www.highcharts.com/product/highcharts/>`__ and the 50+
technical indicator visualizations available in
`Highcharts Stock <https://www.highcharts.com/product/stock/>`__, with full support for
the rich JavaScript formatter (JS :term:`callback functions <callback function>`)
the rich JavaScript formatter (JS callback functions)
capabilities that are often needed to get the most out of Highcharts' visualization and
interaction capabilities.

.. seealso::
.. note::

**See Also**

* :doc:`Supported Visualizations <visualizations>`
* `Supported Visualizations <https://highcharts-core.readthedocs.io/en/latest/visualizations.html>`__

* **Simple JavaScript Code Generation**. With one method call, produce production-ready
JavaScript code to render your interactive visualizations using Highcharts' rich
capabilities.
* **Easy and Robust Chart Download**. With one method call, produce high-end static
visualizations that can be downloaded or shared as files with your audience. Produce
static charts using the Highsoft-provided
:term:`Highcharts Export Server <Export Server>`, or using your own private export
static charts using the Highsoft-provided **Highcharts Export Server**, or using your own private export
server as needed.
* **Integration with Pandas and PySpark**. With two lines of code, produce a high-end
interactive visualization of your Pandas or PySpark dataframe.
Expand All @@ -125,18 +143,47 @@ Key Highcharts for Python Features
==============================================

For a discussion of **Highcharts for Python** in comparison to alternatives, please see
the **COMPLETE DOCUMENTATION:** http://highcharts-core.readthedocs.org/en/latest/index.html
the **COMPLETE DOCUMENTATION:** https://highcharts-core.readthedocs.org/en/latest/index.html

---------------------

********************************
Hello World, and Basic Usage
********************************

1. Import Highcharts Stock for Python
1. Import Highcharts Core for Python
==========================================

.. include:: using/_importing.rst
.. code-block:: python

# PRECISE-LOCATION PATTERN: BEST PRACTICE!
# This method of importing Highcharts for Python objects yields the fastest
# performance for the import statement. However, it is more verbose and requires
# you to navigate the extensive Highcharts Core for Python API.

# Import classes using precise module indications. For example:
from highcharts_core.chart import Chart
from highcharts_core.global_options.shared_options import SharedOptions
from highcharts_core.options import HighchartsOptions
from highcharts_core.options.plot_options.bar import BarOptions
from highcharts_core.options.series.bar import BarSeries

# CATCH-ALL PATTERN
# This method of importing Highcharts for Python classes has relatively slow
# performance because it imports hundreds of different classes from across the entire
# library. This performance impact may be acceptable to you in your use-case, but
# do use at your own risk.

# Import objects from the catch-all ".highcharts" module.
from highcharts_core import highcharts

# You can now access specific classes without individual import statements.
highcharts.Chart
highcharts.SharedOptions
highcharts.HighchartsOptions
highcharts.BarOptions
highcharts.BarSeries


2. Create Your Chart
================================
Expand Down Expand Up @@ -292,12 +339,23 @@ that will render the chart wherever it is you want it to go:

--------------

*********************
Questions and Issues
*********************
***********************
Getting Help/Support
***********************

You can ask questions and report issues on the project's
`Github Issues Page <https://github.com/highcharts-for-python/highcharts-core/issues>`_
The **Highcharts for Python** toolkit comes with all of the great support that you are used to from working with the
Highcharts JavaScript libraries. When you license the toolkit, you are welcome to use any of the following tools to get
help using the toolkit. In particular, you can:

* Use the `Highcharts Forums <https://highcharts.com/forum>`__
* Use `Stack Overflow <https://stackoverflow.com/questions/tagged/highcharts-for-python>`__ with the
``highcharts-for-python`` tag
* `Report bugs or request features <https://github.com/highcharts-for-python/highcharts-core/issues>`__ in the
library's Github repository
* `File a support ticket <https://www.highchartspython.com/get-help>`__ with us
* `Schedule a live chat or video call <https://www.highchartspython.com/get-help>`__ with us

**FOR MORE INFORMATION:** https://www.highchartspython.com/get-help

-----------------

Expand All @@ -306,18 +364,15 @@ Contributing
*********************

We welcome contributions and pull requests! For more information, please see the
:doc:`Contributor Guide <contributing>`. And thanks to all those who've already
contributed:

.. include:: _contributors.rst
`Contributor Guide <https://highcharts-core.readthedocs.io/en/latest/contributing.html>`__. And thanks to all those who've already contributed!

-------------------

*********************
Testing
*********************

We use `TravisCI <http://travisci.org>`_ for our build automation and
We use `TravisCI <https://travisci.org>`_ for our build automation and
`ReadTheDocs <https://readthedocs.org>`_ for our documentation.

Detailed information about our test suite and how to run tests locally can be
Expand Down
47 changes: 31 additions & 16 deletions docs/_dependencies.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. note::

**Highcharts for Python** has several types of dependencies:
**Highcharts Core for Python** has several types of dependencies:

* "hard" dependencies, without which you will not be able to use the library at all,
* "soft" dependencies, which will not produce errors but which may limit the value you
Expand All @@ -16,15 +16,19 @@
.. warning::

If these hard dependencies are not available in the environment where
**Highcharts for Python** is running, then the library will simply not work. Besides
**Highcharts Core for Python** is running, then the library will simply not work. Besides
Highcharts JS itself, all of the other hard dependencies are automatically installed
when installing **Highcharts for Python**.
when installing **Highcharts Core for Python** using:

.. code-block:: bash

$ pip install highcharts-core

* `Highcharts JS <https://www.highcharts.com>`__ v.10.2 or higher

.. note::

Not technically a Python dependency, but obviously **Highcharts for Python** will
Not technically a Python dependency, but obviously **Highcharts Core for Python** will
not work properly if your rendering layer does not leverage Highcharts JS.

* `esprima-python <https://github.com/Kronuz/esprima-python>`_ v.4.0 or higher
Expand All @@ -37,24 +41,25 @@
.. warning::

If these soft dependencies are not available in the environment where
**Highcharts for Python** is running, then the library will throw a
**Highcharts Core for Python** is running, then the library will throw a
:exc:`HighchartsDependencyError <errors.HighchartsDependencyError>` exception when
you try to use functionality that relies on them.

No error will be thrown until you try to use dependent functionality. So if you call
a ``from_pandas()`` method but `pandas <https://pandas.pydata.org/>`_ is not
installed, you will get an error.

You can install *all* soft dependencies by executing:

.. code-block:: bash

$ pip install highcharts-core[soft]

* `IPython <https://ipython.org/>`__ v. 8.10 or higher
* `orjson <https://github.com/ijl/orjson>`__ v.3.7.7 or higher
* `pandas <https://pandas.pydata.org/>`_ v. 1.3 or higher
* `pyspark <https://spark.apache.org/docs/latest/api/python/index.html>`_ v.3.3 or
higher
* `python-dotenv <https://github.com/theskumar/python-dotenv>`_ v. 0.21 or higher

.. note::

`python-dotenv <https://github.com/theskumar/python-dotenv>`_ will fail silently if
not available, as it will only leverage natural environment variables rather than
a ``.env`` file in the runtime environment.

.. tab:: Developer

Expand All @@ -66,11 +71,21 @@

.. code-block:: bash

$ pip install highcharts-core[develop]
$ pip install highcharts-core[dev]

* `pytest <https://docs.pytest.org/en/7.1.x/>`_ v.7.1 or higher
* `pytest-cov <https://pytest-cov.readthedocs.io/en/latest/>`_ v.3.0 or higher
* `pytest-xdist <https://pytest-xdist.readthedocs.io/en/latest/>`_ v.2.5 or higher
* `python-dotenv <https://github.com/theskumar/python-dotenv>`_ v. 0.21 or higher

.. note::

`python-dotenv <https://github.com/theskumar/python-dotenv>`_ will fail silently if
not available, as it will only leverage natural environment variables rather than
a ``.env`` file in the runtime environment.

* `pytz <https://pythonhosted.org/pytz/>`__ v.2022.1 or higher
* `tox <https://tox.wiki/en/latest/>`__ v.4.0.0 or higher

.. tab:: Documentation

Expand All @@ -83,8 +98,8 @@

$ pip install highcharts-core[docs]

* `Sphinx <https://www.sphinx-doc.org/en/master/>`_ v.5.1 or higher
* `Sphinx RTD Theme <https://sphinx-themes.org/sample-sites/sphinx-rtd-theme/>`_ v.1.0
* `Sphinx <https://www.sphinx-doc.org/en/master/>`_ v.6.1.3 or higher
* `Sphinx RTD Theme <https://sphinx-themes.org/sample-sites/sphinx-rtd-theme/>`_ v.1.2
or higher
* `sphinx-tabs <https://sphinx-tabs.readthedocs.io/>`_ v.3.4.1 or higher
* `Sphinx Toolbox <https://sphinx-toolbox.readthedocs.io/en/latest/>`_ v.3.2 or higher
* `Sphinx Toolbox <https://sphinx-toolbox.readthedocs.io/en/latest/>`_ v.3.4 or higher
Binary file added docs/_static/gantt-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/highcharts-for-python-dark-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions docs/_support.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
The **Highcharts for Python** toolkit comes with all of the great support that you are used to from working with the
Highcharts JavaScript libraries. When you license the toolkit, you are welcome to use any of the following tools to get
help using the toolkit. In particular, you can:

* Use the `Highcharts Forums <https://highcharts.com/forum>`__
* Use `Stack Overflow <https://stackoverflow.com/questions/tagged/highcharts-for-python>`__ with the
``highcharts-for-python`` tag
* `Report bugs or request features <https://github.com/highcharts-for-python/highcharts-core/issues>`__ in the
library's Github repository
* `File a support ticket <https://www.highchartspython.com/get-help>`__ with us
* `Schedule a live chat or video call <https://www.highchartspython.com/get-help>`__ with us

**FOR MORE INFORMATION:** https://www.highchartspython.com/get-help
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
__version__ = version_dict.get('__version__')


project = 'Highcharts for Python'
project = 'Highcharts Core for Python'
copyright = '2022, HCP LLC'
author = 'Chris Modzelewski'

Expand Down Expand Up @@ -72,8 +72,8 @@
'prev_next_buttons_location': 'both'
}

html_logo = '_static/highcharts-python-logo-100x50.png'
html_favicon = '_static/highcharts-python-logo-32x32.png'
html_logo = '_static/highcharts-for-python-light-150x149.png'
html_favicon = '_static/highcharts-for-python-dark-32x32.png'

html_context = {
"display_github": True, # Integrate GitHub
Expand Down
Loading