NEW FEATURE: Polygon.io Full integration
- Added `polygon` to the common methods, allowing for data to be pulled from polygon.io. (`chart.polygon.<method>`)
- Added the `PolygonChart` object, which allows for a plug and play solution with the Polygon API.
- Check the docs for more details and examples!
Enhancements:
- Added `clear_markers` and `clear_horizontal_lines` to the common methods.
- Added the `maximize` parameter to the `Chart` object, which maximizes the chart window when shown.
- The Legend will now show Line values, and can be disabled using the `lines` parameter.
- Added the `name` parameter to the `set` method of line, using the column within the dataframe as the value and using its name within the legend.
- Added the `scale_candles_only` parameter to all Chart objects, which prevents the autoscaling of Lines.
- new `screenshot` method, which returns a bytes object of the displayed chart.
Fixes:
- `chart.lines()` now returns a copy of the list rather than the original.
- Fixed a bug causing Subcharts not to sync initially.
- added `scale_margin_top` and `scale_margin_bottom` parameters to the `price_scale` method.
- Added `price_line` and `price_label` parameters to `create_line`.
- Lowered the default margins of the chart.
- Added the chart.spinner method, which when set to `True` shows a loading spinner on the chart (a nice visual for API calls, large datasets etc).
- If an empty data frame is passed to set (eg.`chart.set(pd.DataFrame())`) the volume series and candle series will be cleared.
- added the `cumulative_volume` parameter to `update_from_tick`, which adds the given volume tick onto the latest bar.
- Added `vert_visible` and `horz_visible` parameters to `crosshair`.
- Small style improvements to the searchbox and topbar.
- Fixed a bug preventing callbacks within `WxChart` and `QtChart`
Thanks to @emma-uw for the following fixes and enhancements!
- Methods `hide_data`, `show_data` and `price_line` can be used within Charts, Subcharts and Lines to change the visibility of data, price lines, and the price line labels.
- Added the `delete` method to Line, which irreversably deletes the Line on the chart as well as its objects in JavaScript and Python.
- Added the `lines` common method, which returns a list of all Line objects for the chart.
- Added the `fit` method to the common methods, which uses the `fitContent()` method from Lightweight Charts.
- Fixed a big which caused synced SubCharts to be out of sync upon loading.
BETA: Polygon.io integration
- Added the `PolygonChart` and `polygon` method, allowing for direct integration of polygon.io’s API.
- This feature is still in beta, and there will be a full announcement and update once the feature is complete!
- Removed ChartAsync.
- Added the `show_async` method to `Chart`.
- Refactored how the TopBar is used. The docs explain this in detail, but a basic rundown is:
- `corner_text` and `create_switcher` are no longer methods. The `topbar` attribute of `chart` should be used instead.
- switchers and textboxes, now created with `chart.topbar.textbox` and `chart.topbar.switcher` require a name to be passed to them, which is used to access its instance (e.g `chart.topbar[‘timeframe’]`)
- If you have any questions about these changes, or potential enhancements, feel free to raise an issue and I will get back to you ASAP :)
- PtQt and Wx can now use either synchronous or asynchronous callback functions
- BETA: Support for Jupyter Notebooks
- Fixed a bug causing the ‘date’ column of DataFrames passed to `set`, `update`, and `update_from_tick` to be modified.
- Added the ChartAsync class, allowing for more sophisticated Charts and SubCharts.
- Symbol searching, timeframe selectors, and more is now possible with this varation of Chart.
`QtChart` and `WxChart` have access to all the methods that `ChartAsync` has, however they utilize their own respective event loops rather than asyncio.
New Feature: `StreamlitChart`
- Chart window that can display static data within a Streamlit application.
Removed the `subscribe_click` method.
- BETA: Dynamic candlestick loading
- the config method has been removed, and its methods can now be found in various places:
- right_padding: moved to the ‘time_scale’ method.
- mode: moved to the ‘price_scale’ method.
- title: declared in the new ‘title’ method.
- It is now possible to update titles, horizontal_lines, and markers within Line objects.
- BETA: Dynamic candlestick loading
- the config method has been removed, and its methods can now be found in various places:
- right_padding: moved to the ‘time_scale’ method.
- mode: moved to the ‘price_scale’ method.
- title: declared in the new ‘title’ method.
- It is now possible to update titles, horizontal_lines, and markers within Line objects.
- Upgraded to Lightweight Charts v4.0.1.
- Added a ‘hover’ item to the returning dictionary from subscribe_click.
- Markers and SubCharts no longer use a UUID for identification, but an 8 character string.
- Upgraded to Lightweight Charts v4.0.1.
- Added a ‘hover’ item to the returning dictionary from subscribe_click.
- Markers and SubCharts no longer use a UUID for identification, but an 8 character string.
- Added the create_subchart method to Chart.
- Added the SubChart class.
- Added an inner_width and inner_height parameter to Chart.
- The time_scale method can now disable the time scale completely.
Bugs:
- Fixed a bug which prevented markers from being placed on charts with a timescale less than a day.
- Added the create_subchart method to Chart.
- Added the SubChart class.
- Added an inner_width and inner_height parameter to Chart.
- The time_scale method can now disable the time scale completely.
Bugs:
- Fixed a bug which prevented markers from being placed on charts with a timescale less than a day.
- Updated chart.exit() to destroy objects and terminate the webview process.
- Fixed WxChart not expanding correctly and removed its width and height parameters.
- Fixed KeyboardInterrupt error message when using show(block=True).