|
4 | 4 |
|
5 | 5 | from highcharts_stock.chart import Chart as ChartBase |
6 | 6 |
|
7 | | -from highcharts_gantt import constants, errors |
| 7 | +from highcharts_gantt import constants, errors, utility_functions |
8 | 8 | from highcharts_gantt.options import (HighchartsOptions, |
9 | 9 | HighchartsStockOptions, |
10 | 10 | HighchartsGanttOptions) |
@@ -447,38 +447,6 @@ def from_series(cls, *series, kwargs = None): |
447 | 447 |
|
448 | 448 | instance.add_series(series) |
449 | 449 |
|
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 | | - |
482 | 450 | @staticmethod |
483 | 451 | def _get_options_obj(series_type, options_kwargs): |
484 | 452 | """Return an :class:`Options` descendent based on the series type. |
|
0 commit comments