Skip to content

Commit bd174bd

Browse files
committed
Added Pictorial series type support.
1 parent 65cbf9b commit bd174bd

File tree

17 files changed

+1419
-0
lines changed

17 files changed

+1419
-0
lines changed

docs/api.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,8 @@ Core Components
524524
:class:`ParentNodeOptions <highcharts_gantt.options.plot_options.packedbubble.ParentNodeOptions>`
525525
* - :mod:`.options.plot_options.pareto <highcharts_gantt.options.plot_options.pareto>`
526526
- :class:`ParetoOptions <highcharts_gantt.options.plot_options.pareto.ParetoOptions>`
527+
* - :mod:`.options.plot_options.pictorial <highcharts_gantt.options.plot_options.pictorial>`
528+
- :class:`PictorialOptions <highcharts_gantt.options.plot_options.pictorial.PictorialOptions>`
527529
* - :mod:`.options.plot_options.pie <highcharts_gantt.options.plot_options.pie>`
528530
- :class:`PieOptions <highcharts_gantt.options.plot_options.pie.PieOptions>`
529531
:class:`VariablePieOptions <highcharts_gantt.options.plot_options.pie.VariablePieOptions>`
@@ -784,6 +786,9 @@ Core Components
784786
- :class:`PackedBubbleSeries <highcharts_gantt.options.series.packedbubble.PackedBubbleSeries>`
785787
* - :mod:`.options.series.pareto <highcharts_gantt.options.series.pareto>`
786788
- :class:`ParetoSeries <highcharts_gantt.options.series.pareto.ParetoSeries>`
789+
* - :mod:`.options.series.pictorial <highcharts_gantt.options.series.pictorial>`
790+
- :class:`PictorialSeries <highcharts_gantt.options.series.pictorial.PictorialSeries>`
791+
:class:`PictorialPaths <highcharts_gantt.options.series.pictorial.PictorialPaths>`
787792
* - :mod:`.options.series.pie <highcharts_gantt.options.series.pie>`
788793
- :class:`PieSeries <highcharts_gantt.options.series.pie.PieSeries>`
789794
:class:`VariablePieSeries <highcharts_gantt.options.series.pie.VariablePieSeries>`

docs/api/options/plot_options/index.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
oscillators/index
5151
packedbubble
5252
pareto
53+
pictorial
5354
pie
5455
pivot_points
5556
points
@@ -293,6 +294,8 @@ Sub-components
293294
:class:`ParentNodeOptions <highcharts_gantt.options.plot_options.packedbubble.ParentNodeOptions>`
294295
* - :mod:`.options.plot_options.pareto <highcharts_gantt.options.plot_options.pareto>`
295296
- :class:`ParetoOptions <highcharts_gantt.options.plot_options.pareto.ParetoOptions>`
297+
* - :mod:`.options.plot_options.pictorial <highcharts_gantt.options.plot_options.pictorial>`
298+
- :class:`PictorialOptions <highcharts_gantt.options.plot_options.pictorial.PictorialOptions>`
296299
* - :mod:`.options.plot_options.pie <highcharts_gantt.options.plot_options.pie>`
297300
- :class:`PieOptions <highcharts_gantt.options.plot_options.pie.PieOptions>`
298301
:class:`VariablePieOptions <highcharts_gantt.options.plot_options.pie.VariablePieOptions>`
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
##########################################################################################
2+
:mod:`.pictorial <highcharts_gantt.options.plot_options.pictorial>`
3+
##########################################################################################
4+
5+
.. contents:: Module Contents
6+
:local:
7+
:depth: 3
8+
:backlinks: entry
9+
10+
--------------
11+
12+
.. module:: highcharts_gantt.options.plot_options.pictorial
13+
14+
********************************************************************************************************************
15+
class: :class:`PictorialOptions <highcharts_gantt.options.plot_options.pictorial.PictorialOptions>`
16+
********************************************************************************************************************
17+
18+
.. autoclass:: PictorialOptions
19+
:members:
20+
:inherited-members:
21+
22+
.. collapse:: Class Inheritance
23+
24+
.. inheritance-diagram:: PictorialOptions
25+
:top-classes: highcharts_core.metaclasses.HighchartsMeta, highcharts_gantt.metaclasses.HighchartsMeta
26+
:parts: -1
27+
28+
|

docs/api/options/series/index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
organization
4646
packedbubble
4747
pareto
48+
pictorial
4849
pie
4950
pivot_points
5051
points
@@ -276,6 +277,9 @@ Sub-components
276277
- :class:`PackedBubbleSeries <highcharts_gantt.options.series.packedbubble.PackedBubbleSeries>`
277278
* - :mod:`.options.series.pareto <highcharts_gantt.options.series.pareto>`
278279
- :class:`ParetoSeries <highcharts_gantt.options.series.pareto.ParetoSeries>`
280+
* - :mod:`.options.series.pictorial <highcharts_gantt.options.series.pictorial>`
281+
- :class:`PictorialSeries <highcharts_gantt.options.series.pictorial.PictorialSeries>`
282+
:class:`PictorialPaths <highcharts_gantt.options.series.pictorial.PictorialPaths>`
279283
* - :mod:`.options.series.pie <highcharts_gantt.options.series.pie>`
280284
- :class:`PieSeries <highcharts_gantt.options.series.pie.PieSeries>`
281285
:class:`VariablePieSeries <highcharts_gantt.options.series.pie.VariablePieSeries>`
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
##########################################################################################
2+
:mod:`.pictorial <highcharts_gantt.options.series.pictorial>`
3+
##########################################################################################
4+
5+
.. contents:: Module Contents
6+
:local:
7+
:depth: 3
8+
:backlinks: entry
9+
10+
--------------
11+
12+
.. module:: highcharts_gantt.options.series.pictorial
13+
14+
********************************************************************************************************************
15+
class: :class:`PictorialSeries <highcharts_gantt.options.series.pictorial.PictorialSeries>`
16+
********************************************************************************************************************
17+
18+
.. autoclass:: PictorialSeries
19+
:members:
20+
:inherited-members:
21+
22+
.. collapse:: Class Inheritance
23+
24+
.. inheritance-diagram:: PictorialSeries
25+
:top-classes: highcharts_core.metaclasses.HighchartsMeta, highcharts_gantt.metaclasses.HighchartsMeta
26+
:parts: -1
27+
28+
|
29+
30+
--------------
31+
32+
.. module:: highcharts_gantt.options.series.pictorial
33+
34+
********************************************************************************************************************
35+
class: :class:`PictorialPaths <highcharts_gantt.options.series.pictorial.PictorialPaths>`
36+
********************************************************************************************************************
37+
38+
.. autoclass:: PictorialPaths
39+
:members:
40+
:inherited-members:
41+
42+
.. collapse:: Class Inheritance
43+
44+
.. inheritance-diagram:: PictorialPaths
45+
:top-classes: highcharts_core.metaclasses.HighchartsMeta, highcharts_gantt.metaclasses.HighchartsMeta
46+
:parts: -1
47+
48+
|

highcharts_gantt/options/plot_options/__init__.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
from highcharts_gantt.options.plot_options.organization import OrganizationOptions
3333
from highcharts_gantt.options.plot_options.packedbubble import PackedBubbleOptions
3434
from highcharts_gantt.options.plot_options.pareto import ParetoOptions
35+
from highcharts_gantt.options.plot_options.pictorial import PictorialOptions
3536
from highcharts_gantt.options.plot_options.pie import PieOptions
3637
from highcharts_gantt.options.plot_options.polygon import PolygonOptions
3738
from highcharts_gantt.options.plot_options.pyramid import PyramidOptions
@@ -783,6 +784,28 @@ def pareto(self) -> Optional[ParetoOptions]:
783784
def pareto(self, value):
784785
self._pareto = value
785786

787+
@property
788+
def pictorial(self) -> Optional[PictorialOptions]:
789+
"""General options to apply to all Pictorial series types.
790+
791+
A pictorial series uses vector images to represent the data, with the data's shape
792+
determined by the ``path`` parameter.
793+
794+
.. figure:: ../../../_static/pictorial-example.png
795+
:alt: Pictorial Example Chart
796+
:align: center
797+
798+
799+
:rtype: :class:`PictorialOptions <highcharts_gantt.options.plot_options.pictorial.PictorialOptions>` or
800+
:obj:`None <python:None>`
801+
"""
802+
return self._pictorial
803+
804+
@pictorial.setter
805+
@class_sensitive(PictorialOptions)
806+
def pictorial(self, value):
807+
self._pictorial = value
808+
786809
@property
787810
def pie(self) -> Optional[PieOptions]:
788811
"""General options to apply to all Pie series types.
@@ -1405,6 +1428,7 @@ def _get_kwargs_from_dict(cls, as_dict):
14051428
'organization': as_dict.get('organization', None),
14061429
'packedbubble': as_dict.get('packedbubble', None),
14071430
'pareto': as_dict.get('pareto', None),
1431+
'pictorial': as_dict.get('pictorial', None),
14081432
'pie': as_dict.get('pie', None),
14091433
'polygon': as_dict.get('polygon', None),
14101434
'pyramid': as_dict.get('pyramid', None),
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from highcharts_stock.options.plot_options.pictorial import *
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from highcharts_stock.options.series.pictorial import *

highcharts_gantt/options/series/series_generator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
from highcharts_gantt.options.series.organization import OrganizationSeries
4444
from highcharts_gantt.options.series.packedbubble import PackedBubbleSeries
4545
from highcharts_gantt.options.series.pareto import ParetoSeries
46+
from highcharts_gantt.options.series.pictorial import PictorialSeries
4647
from highcharts_gantt.options.series.pie import PieSeries
4748
from highcharts_gantt.options.series.pie import VariablePieSeries
4849
from highcharts_gantt.options.series.polygon import PolygonSeries
@@ -100,6 +101,7 @@
100101
'organization': OrganizationSeries,
101102
'packedbubble': PackedBubbleSeries,
102103
'pareto': ParetoSeries,
104+
'pictorial': PictorialSeries,
103105
'pie': PieSeries,
104106
'variablepie': VariablePieSeries,
105107
'polygon': PolygonSeries,
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
depth: 10,
3+
edgeColor: '#999',
4+
edgeWidth: 1,
5+
groupZPadding: 4
6+
}

0 commit comments

Comments
 (0)