Skip to content

Commit 5508524

Browse files
committed
Updated API docs.
1 parent d0d94eb commit 5508524

File tree

280 files changed

+4465
-4221
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

280 files changed

+4465
-4221
lines changed

docs/api.rst

Lines changed: 856 additions & 835 deletions
Large diffs are not rendered by default.

docs/api/_class_structures.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
`Highcharts Stock <https://www.highcharts.com/products/stock/>`__ objects re-use many of
1+
`Highcharts Gantt <https://www.highcharts.com/products/gantt/>`__ objects re-use many of
22
the same properties. This is one of the strengths of the Highcharts API, in that it is
33
internally consistent and that behavior configured on one object should be readily
44
transferrable to a second object provided it shares the same properties. However,
5-
Highcharts Stock has a *lot* of properties. For example, I estimate that
5+
Highcharts Gantt has a *lot* of properties. For example, I estimate that
66
the ``options.plotOptions`` objects and their sub-properties have close to 3,000
77
properties. But because they are heavily repeated, those 3,000 or so properties can be
88
reduced to only 421 unique property names. That's almost an 85% reduction.

docs/api/_handling_defaults.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
*Explicit is better than implicit.*
22
-- The Zen of Python
33

4-
`Highcharts Stock <https://www.highcharts.com/products/stock/>`__ has a *lot* of default
4+
`Highcharts Gantt <https://www.highcharts.com/products/gantt/>`__ has a *lot* of default
55
values. These default values are generally applied if a JavaScript property is
66
``undefined`` (missing or otherwise not specified), which is different from the JavaScript
77
value of ``null``.
@@ -16,25 +16,25 @@ While my Pythonic instinct is to:
1616
doing so would introduce a massive problem: It would bloat data transferred on the wire
1717
*unnecessarily*.
1818

19-
The way that `Highcharts Stock <https://www.highcharts.com/products/stock/>`__ handles
19+
The way that `Highcharts Gantt <https://www.highcharts.com/products/gantt/>`__ handles
2020
defaults is an elegant compromise between explicitness and the practical reality of making
2121
your code readable. Why make a property explicit in a configuration string if you don't
2222
care about it? Purity is only valuable to a point. And with thousands of properties across
23-
the `Highcharts JS <https://www.highcharts.com/products/highcharts/>`__ and
24-
`Highcharts Stock <https://www.highcharts.com/products/stock/>`__ libraries, *nobody*
23+
the `Highcharts Core <https://www.highcharts.com/products/highcharts/>`__ and
24+
`Highcharts Gantt <https://www.highcharts.com/products/gantt/>`__ libraries, *nobody*
2525
wants to transmit or maintain thousands of property configurations if it can be avoided.
2626

2727
For that reason, the **Highcharts for Python** toolkit explicitly breaks Pythonic
2828
convention: when an object's property returns :obj:`None <python:None>`, that has the
2929
equivalent meaning of "Highcharts JS/Stock will apply the Highcharts default for this
3030
property". These properties will *not* be serialized, either to a JS literal, nor to a
3131
:class:`dict <python:dict>`, nor to JSON. This has the advantage of maintaining consistent
32-
behavior with `Highcharts JS <https://www.highcharts.com/products/highcharts/>`__ and
33-
`Highcharts Stock <https://www.highcharts.com/products/stock/>`__ while still providing an
32+
behavior with `Highcharts Core <https://www.highcharts.com/products/highcharts/>`__ and
33+
`Highcharts Gantt <https://www.highcharts.com/products/gantt/>`__ while still providing an
3434
internally consistent logic to follow.
3535

3636
.. note::
3737

3838
There's an item on the **Highcharts for Python** :doc:`roadmap <../toolkit>`
39-
(:issue:`1`) to *optionally* surface defaults when explicitly requested. Not sure when
39+
(:issue:`8`) to *optionally* surface defaults when explicitly requested. Not sure when
4040
it will be implemented, but we'll get there at some point.

docs/api/_module_structure.rst

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11

2-
The structure of the **Highcharts Stock for Python** library closely matches the structure
3-
of the `Highcharts Stock <https://www.highcharts.com/products/stock/>`__ options object (see the relevant
4-
`reference documentation <https://api.highcharts.com/highstock/>`_).
2+
The structure of the **Highcharts Gantt for Python** library closely matches the structure
3+
of the `Highcharts Gantt <https://www.highcharts.com/products/gantt/>`__ options object (see the relevant
4+
`reference documentation <https://api.highcharts.com/gantt/>`_).
55

6-
At the root of the library - importable from ``highcharts_stock`` - you will find the
7-
:mod:`highcharts_stock.highcharts` module. This module is a catch-all importable module,
8-
which allows you to easily access the most-commonly-used Highcharts Stock for Python
6+
At the root of the library - importable from ``highcharts_gantt`` - you will find the
7+
:mod:`highcharts_gantt.highcharts` module. This module is a catch-all importable module,
8+
which allows you to easily access the most-commonly-used Highcharts Gantt for Python
99
classes and modules.
1010

1111
.. note::
1212

13-
Whlie you can access all of the **Highcharts Stock for Python** classes from
14-
``highcharts_stock.highcharts``, if you want to more precisely navigate to specific
13+
Whlie you can access all of the **Highcharts Gantt for Python** classes from
14+
``highcharts_gantt.highcharts``, if you want to more precisely navigate to specific
1515
class definitions you can do fairly easily using the module organization and naming
1616
conventions used in the library.
1717

18-
In the root of the ``highcharts_stock`` library you can find universally-shared
19-
class definitions, like :mod:`.metaclasses <highcharts_stock.metaclasses>` which
20-
contains the :class:`HighchartsMeta <highcharts_stock.metaclasses.HighchartsMeta>`
21-
and :class:`JavaScriptDict <highcharts_stock.metaclasses.JavaScriptDict>`
22-
definitions, or :mod:`.decorators <highcharts_stock.decorators>` which define
18+
In the root of the ``highcharts_gantt`` library you can find universally-shared
19+
class definitions, like :mod:`.metaclasses <highcharts_gantt.metaclasses>` which
20+
contains the :class:`HighchartsMeta <highcharts_gantt.metaclasses.HighchartsMeta>`
21+
and :class:`JavaScriptDict <highcharts_gantt.metaclasses.JavaScriptDict>`
22+
definitions, or :mod:`.decorators <highcharts_gantt.decorators>` which define
2323
method/property decorators that are used throughout the library.
2424

25-
The :mod:`.utility_classes <highcharts_stock.utility_classes>` module contains class
25+
The :mod:`.utility_classes <highcharts_gantt.utility_classes>` module contains class
2626
definitions for classes that are referenced or used throughout the other class
2727
definitions.
2828

29-
And you can find the Highcharts Stock ``options`` object and all of its
30-
properties defined in the :mod:`.options <highcharts_stock.options>` module, with
29+
And you can find the Highcharts Gantt ``options`` object and all of its
30+
properties defined in the :mod:`.options <highcharts_gantt.options>` module, with
3131
specific (complicated or extensive) sub-modules providing property-specific classes
32-
(e.g. the :mod:`.options.plot_options <highcharts_stock.options.plot_options>`
32+
(e.g. the :mod:`.options.plot_options <highcharts_gantt.options.plot_options>`
3333
module defines all of the different configuration options for different series types,
34-
while the :mod:`.options.series <highcharts_stock.options.series>` module defines all
34+
while the :mod:`.options.series <highcharts_gantt.options.series>` module defines all
3535
of the classes that represent :term:`series` of data in a given chart).
3636

3737
.. tip::
3838

3939
To keep things simple, we recommend importing classes you need directly from the
40-
:mod:`highcharts_stock.highcharts` module. There are two paths to do so easily:
40+
:mod:`highcharts_gantt.highcharts` module. There are two paths to do so easily:
4141

4242
.. code-block:: python
4343
@@ -51,7 +51,7 @@ classes and modules.
5151
my_line_series = highcharts.options.series.area.LineSeries()
5252
5353
# APPROACH #2: Import a specific class or module by name from the "highcharts" module.
54-
from highcharts_stock.highcharts import Chart, SharedStockOptions, options
54+
from highcharts_gantt.highcharts import Chart, SharedStockOptions, options
5555
5656
my_chart = Chart()
5757
my_shared_options = SharedStockOptions()

docs/api/_other_convenience_methods.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
:param other: The target instance to which the properties of this instance should
88
be copied.
9-
:type other: :class:`HighchartsMeta <highcharts_stock.metaclasses.HighchartsMeta>`
9+
:type other: :class:`HighchartsMeta <highcharts_gantt.metaclasses.HighchartsMeta>`
1010

1111
:param overwrite: if ``True``, properties in ``other`` that are already set will
1212
be overwritten by their counterparts in ``self``. Defaults to ``True``.
1313
:type overwrite: :class:`bool <python:bool>`
1414

1515
:param kwargs: Additional keyword arguments. Some special descendants of
16-
:class:`HighchartsMeta <highcharts_stock.metaclasses.HighchartsMeta>` may have
16+
:class:`HighchartsMeta <highcharts_gantt.metaclasses.HighchartsMeta>` may have
1717
special implementations of this method which rely on additional keyword arguments.
1818

1919
:returns: A mutated version of ``other`` with new property values

docs/api/_serialization_methods.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
.. method:: to_js_literal(self, filename = None, encoding = 'utf-8')
33
:noindex:
44

5-
Convert the **Highcharts Stock for Python** instance to Highcharts Stock-compatible
5+
Convert the **Highcharts Gantt for Python** instance to Highcharts Gantt-compatible
66
JavaScript code using :term:`JavaScript object literal notation`.
77

88
:param filename: If supplied, persists the JavaScript code to the file indicated.
@@ -13,15 +13,15 @@
1313
literal string. Defaults to ``'utf-8'``.
1414
:type encoding: :class:`str <python:str>`
1515

16-
:returns: Highcharts Stock-compatible JavaScript code using
16+
:returns: Highcharts Gantt-compatible JavaScript code using
1717
:term:`JavaScript object literal notation`.
1818
:rtype: :class:`str <python:str>`
1919

2020

2121
.. method:: to_json(self, filename = None, encoding = 'utf-8')
2222
:noindex:
2323

24-
Convert the **Highcharts Stock for Python** instance to Highcharts Stock-compatible
24+
Convert the **Highcharts Gantt for Python** instance to Highcharts Gantt-compatible
2525
JSON.
2626

2727
.. warning::
@@ -30,7 +30,7 @@
3030
:term:`JavaScript object literal notation`. In particular, it cannot include
3131
JavaScript functions. This means if you try to convert a Highcharts for Python object
3232
to JSON, any properties that are
33-
:class:`CallbackFunction <highcharts_stock.utility_classes.javascript_functions.CallbackFunction>`
33+
:class:`CallbackFunction <highcharts_gantt.utility_classes.javascript_functions.CallbackFunction>`
3434
instances will not be included. If you want to convert those functions, please use
3535
``.to_js_literal()`` instead.
3636

@@ -42,12 +42,12 @@
4242
Defaults to ``'utf-8'``.
4343
:type encoding: :class:`str <python:str>`
4444

45-
:returns: Highcharts Stock-compatible JSON representation of the object.
45+
:returns: Highcharts Gantt-compatible JSON representation of the object.
4646
:rtype: :class:`str <python:str>` or :class:`bytes <python:bytes>`
4747

4848
.. note::
4949

50-
**Highcharts Stock for Python** works with different JSON encoders. If your
50+
**Highcharts Gantt for Python** works with different JSON encoders. If your
5151
environment has `orjson <https://github.com/ijl/orjson>`_, for example, the result
5252
will be returned as a :class:`bytes <python:bytes>` instance. Otherwise, the
5353
library will fallback to various other JSON encoders until finally falling back to
@@ -57,8 +57,8 @@
5757
.. method:: to_dict(self)
5858
:noindex:
5959

60-
Convert the **Highcharts Stock for Python** object into a Highcharts Stock-compatible
60+
Convert the **Highcharts Gantt for Python** object into a Highcharts Gantt-compatible
6161
:class:`dict <python:dict>` object.
6262

63-
:returns: Highcharts Stock-compatible :class:`dict <python:dict>` object
63+
:returns: Highcharts Gantt-compatible :class:`dict <python:dict>` object
6464
:rtype: :class:`dict <python:dict>`

docs/api/chart.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
##################################################
2-
:mod:`.chart <highcharts_stock.chart>`
2+
:mod:`.chart <highcharts_gantt.chart>`
33
##################################################
44

55
.. contents:: Module Contents
@@ -9,10 +9,10 @@
99

1010
--------------
1111

12-
.. module:: highcharts_stock.chart
12+
.. module:: highcharts_gantt.chart
1313

1414
******************************************************
15-
class: :class:`Chart <highcharts_stock.chart.Chart>`
15+
class: :class:`Chart <highcharts_gantt.chart.Chart>`
1616
******************************************************
1717

1818
.. autoclass:: Chart
@@ -22,7 +22,7 @@ class: :class:`Chart <highcharts_stock.chart.Chart>`
2222
.. collapse:: Class Inheritance
2323

2424
.. inheritance-diagram:: Chart
25-
:top-classes: highcharts_stock.metaclasses.HighchartsMeta, highcharts_core.metaclasses.HighchartsMeta
25+
:top-classes: highcharts_gantt.metaclasses.HighchartsMeta, highcharts_core.metaclasses.HighchartsMeta
2626
:parts: -1
2727

2828
|

0 commit comments

Comments
 (0)