Skip to content

Commit 4614d4e

Browse files
committed
Fixed missing import.
1 parent 328fb65 commit 4614d4e

File tree

1 file changed

+1
-33
lines changed

1 file changed

+1
-33
lines changed

highcharts_gantt/chart.py

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from highcharts_stock.chart import Chart as ChartBase
66

7-
from highcharts_gantt import constants, errors
7+
from highcharts_gantt import constants, errors, utility_functions
88
from highcharts_gantt.options import (HighchartsOptions,
99
HighchartsStockOptions,
1010
HighchartsGanttOptions)
@@ -447,38 +447,6 @@ def from_series(cls, *series, kwargs = None):
447447

448448
instance.add_series(series)
449449

450-
def display(self, global_options = None):
451-
"""Display the chart in `Jupyter Labs <https://jupyter.org/>`_ or
452-
`Jupyter Notebooks <https://jupyter.org/>`_.
453-
454-
:raises HighchartsDependencyError: if
455-
`ipython <https://ipython.readthedocs.io/en/stable/>`_ is not available in the
456-
runtime environment
457-
"""
458-
try:
459-
from IPython import display
460-
except ImportError:
461-
raise errors.HighchartsDependencyError('Unable to import IPython.display. '
462-
'Make sure that it is available in '
463-
'your runtime environment. To install,'
464-
'use: pip install ipython')
465-
466-
if global_options is not None:
467-
global_options = validate_types(global_options,
468-
types = SharedGanttOptions)
469-
470-
if self.is_gantt_chart:
471-
include_str = constants.GANTT_INCLUDE_STR
472-
else:
473-
include_str = constants.INCLUDE_STR
474-
475-
html_str = include_str + '\n'
476-
if global_options:
477-
html_str += global_options._repr_html_() + '\n'
478-
html_str += self._repr_html_()
479-
480-
display.display_html(html_str, raw = True)
481-
482450
@staticmethod
483451
def _get_options_obj(series_type, options_kwargs):
484452
"""Return an :class:`Options` descendent based on the series type.

0 commit comments

Comments
 (0)