Running the following chartify code:
import chartify
data = chartify.examples.example_data()
price_by_date = (
data.groupby('date')['total_price'].sum()
.reset_index() # Move 'date' from index to column
)
print(price_by_date.head())
ch = chartify.Chart(blank_labels=True, x_axis_type='datetime')
ch.set_title("Line charts")
ch.set_subtitle("Plot two numeric values connected by an ordered line.")
ch.plot.line(
Returns the error:
Traceback (most recent call last): File "c:\Users\User12\Documents\test-script.py", line 16, in <module> ch.save('test.svg', 'svg') File "C:\Users\User12\AppData\Local\Programs\Python\Python39\lib\site-packages\chartify\_core\chart.py", line 415, in save image = self._figure_to_svg() File "C:\Users\User12\AppData\Local\Programs\Python\Python39\lib\site-packages\chartify\_core\chart.py", line 480, in wrapper return f(self, *args, **kwargs) File "C:\Users\User12\AppData\Local\Programs\Python\Python39\lib\site-packages\chartify\_core\chart.py", line 503, in _figure_to_svg wait_until_render_complete(driver, 10) File "C:\Users\User12\AppData\Local\Programs\Python\Python39\lib\site-packages\bokeh\io\export.py", line 330, in wait_until_render_complete raise RuntimeError('Bokeh was not loaded in time. Something may have gone wrong.') from e RuntimeError: Bokeh was not loaded in time. Something may have gone wrong.
I would like to contribute on this isssue. A potential fix could involve increasing the wait time or ensuring Bokeh is fully loaded before rendering the SVG.
Let me know if that works!
Running the following chartify code: import chartify data = chartify.examples.example_data() price_by_date = ( data.groupby('date')['total_price'].sum() .reset_index() # Move 'date' from index to column ) print(price_by_date.head()) ch = chartify.Chart(blank_labels=True, x_axis_type='datetime') ch.set_title("Line charts") ch.set_subtitle("Plot two numeric values connected by an ordered line.") ch.plot.line(
Data must be sorted by x column
ch.save('test.svg', 'svg')
Returns the error:
Traceback (most recent call last): File "c:\Users\User12\Documents\test-script.py", line 16, in <module> ch.save('test.svg', 'svg') File "C:\Users\User12\AppData\Local\Programs\Python\Python39\lib\site-packages\chartify\_core\chart.py", line 415, in save image = self._figure_to_svg() File "C:\Users\User12\AppData\Local\Programs\Python\Python39\lib\site-packages\chartify\_core\chart.py", line 480, in wrapper return f(self, *args, **kwargs) File "C:\Users\User12\AppData\Local\Programs\Python\Python39\lib\site-packages\chartify\_core\chart.py", line 503, in _figure_to_svg wait_until_render_complete(driver, 10) File "C:\Users\User12\AppData\Local\Programs\Python\Python39\lib\site-packages\bokeh\io\export.py", line 330, in wait_until_render_complete raise RuntimeError('Bokeh was not loaded in time. Something may have gone wrong.') from e RuntimeError: Bokeh was not loaded in time. Something may have gone wrong.