Open DunklesArchipel opened 10 months ago
I tried to implement it by adding an __init__
to the Timeseries class, where you could for example define the width and the height.
When you want to show the widget with
ts = TimeSeries() # this line does not throw an error
ts # this one does
one gets the following error:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
File C:\Miniconda3\envs\iok\lib\site-packages\IPython\core\formatters.py:973, in MimeBundleFormatter.__call__(self, obj, include, exclude)
970 method = get_real_method(obj, self.print_method)
972 if method is not None:
--> 973 return method(include=include, exclude=exclude)
974 return None
975 else:
File C:\Miniconda3\envs\iok\lib\site-packages\ipywidgets\widgets\widget.py:811, in Widget._repr_mimebundle_(self, **kwargs)
799 data = {
800 'text/plain': plaintext,
801 }
802 if self._view_name is not None:
803 # The 'application/vnd.jupyter.widget-view+json' mimetype has not been registered yet.
804 # See the registration process and naming convention at
805 # http://tools.ietf.org/html/rfc6838
806 # and the currently registered mimetypes at
807 # http://www.iana.org/assignments/media-types/media-types.xhtml.
808 data['application/vnd.jupyter.widget-view+json'] = {
809 'version_major': 2,
810 'version_minor': 0,
--> 811 'model_id': self._model_id
812 }
813 return data
AttributeError: 'TimeSeries' object has no attribute '_model_id'
I figured that one has to modify by some means the template in the
TimeSeries
class. So a template, which allows drawing a rescaled plot with a title would look as follows.Originally posted by @DunklesArchipel in https://github.com/saraedum/ipyvue-time-series/issues/6#issuecomment-1786128678