Refactoring/Enhancements/Fixes
Breaking Changes:
- Removed the `api` parameter; callbacks no longer need to be in a specific class.
- Topbar callbacks now take a chart as an argument (see updated callback examples)
- Removed the `topbar` parameter from chart declaration. The Topbar will be automatically created upon declaration of a topbar widget.
- Removed the `searchbox` parameter from charts. It will be created upon subscribing to it in `chart.events`.
- Removed `dynamic_loading`.
- Removed ‘volume_enabled’ parameter. Volume will be enabled if the volumn column is present in the dataframe.
- Widgets’ `func` parameter is now declared last.
- Switchers take a tuple of options rather than a variable number of arguments.
- `add_hotkey` renamed to `hotkey`
- Horizontal lines now take a `func` argument rather than `interactive`. This event will emit the Line object that was moved.
- Removed the `name` parameter from `line.set`. Line object names are now declared upon creation.
Enhancements:
- Added the `button` widget to the Topbar.
- Added the color picker to the drawing context menu.
- Charts now have a `candle_data` method, which returns the current data displayed on the chart as a DataFrame.
- Fixed callbacks are now located in the `chart.events` object:
- search (e.g `chart.events.search += on_search`)
- new_bar
- range_change
- Added volume to the legend
- Drawings can now be accessed through `chart.toolbox.drawings`
- added the `style` and `name` parameters to `create_line`
Bug Fixes:
- Fixed a bug causing new charts not to load after `exit` was called.
- Refactored rayline placement to ensure they do not move the visible range.
- Fixed a bug causing the visible range to shift when trendlines are moved past the final candlestick.
- Fixed a bug preventing trendlines and raylines on irregular timeframes.
- Fixed a bug causing the legend to prevent mouse input into the chart.
This commit is contained in:
@ -5,8 +5,7 @@ This page contains a reference to all chart objects that can be used within the
|
||||
___
|
||||
|
||||
## Chart
|
||||
`volume_enabled: bool` | `width: int` | `height: int` | `x: int` | `y: int` | `on_top: bool` | `maximize: bool` | `debug: bool` |
|
||||
`api: object` | `topbar: bool` | `searchbox: bool` | `toolbox: bool`
|
||||
`width: int` | `height: int` | `x: int` | `y: int` | `on_top: bool` | `maximize: bool` | `debug: bool` | `toolbox: bool`
|
||||
|
||||
The main object used for the normal functionality of lightweight-charts-python, built on the pywebview library.
|
||||
|
||||
@ -61,11 +60,13 @@ This method should be called after the chart window has loaded.
|
||||
___
|
||||
|
||||
## QtChart
|
||||
`widget: QWidget` | `volume_enabled: bool`
|
||||
`widget: QWidget`
|
||||
|
||||
The `QtChart` object allows the use of charts within a `QMainWindow` object, and has similar functionality to the `Chart` and `ChartAsync` objects for manipulating data, configuring and styling.
|
||||
The `QtChart` object allows the use of charts within a `QMainWindow` object, and has similar functionality to the `Chart` object for manipulating data, configuring and styling.
|
||||
|
||||
Callbacks can be recieved through the Qt event loop.
|
||||
Either the `PyQt5` or `PySide6` libraries will work with this chart.
|
||||
|
||||
Callbacks can be received through the Qt event loop.
|
||||
___
|
||||
|
||||
### `get_webview`
|
||||
@ -107,11 +108,11 @@ app.exec_()
|
||||
___
|
||||
|
||||
## WxChart
|
||||
`parent: wx.Panel` | `volume_enabled: bool`
|
||||
`parent: wx.Panel`
|
||||
|
||||
The WxChart object allows the use of charts within a `wx.Frame` object, and has similar functionality to the `Chart` and `ChartAsync` objects for manipulating data, configuring and styling.
|
||||
The WxChart object allows the use of charts within a `wx.Frame` object, and has similar functionality to the `Chart` object for manipulating data, configuring and styling.
|
||||
|
||||
Callbacks can be recieved through the Wx event loop.
|
||||
Callbacks can be received through the Wx event loop.
|
||||
___
|
||||
|
||||
### `get_webview`
|
||||
@ -157,7 +158,6 @@ if __name__ == '__main__':
|
||||
___
|
||||
|
||||
## StreamlitChart
|
||||
`parent: wx.Panel` | `volume_enabled: bool`
|
||||
|
||||
The `StreamlitChart` object allows the use of charts within a Streamlit app, and has similar functionality to the `Chart` object for manipulating data, configuring and styling.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user