Files
lightweight-charts-python/docs/source/reference/events.md
louisnw f72baf95ba Polygon:
- Added async methods to polygon.
- The `requests` library is no longer required, with `urllib` being used instead.
- Added the `get_bar_data` function, which returns a dataframe of aggregate data from polygon.
- Opened up the `subscribe` and `unsubscribe` functions

Enhancements:
- Tables will now scroll when the rows exceed table height.

Bugs:
- Fixed a bug preventing async functions being used with horizontal line event.
- Fixed a bug causing the legend to show duplicate lines if the line was created after the legend.
- Fixed a bug causing the line hide icon to persist within the legend after deletion (#75)
- Fixed a bug causing the search box to be unfocused when the chart is loaded.
2023-08-27 00:20:05 +01:00

29 lines
686 B
Markdown

# `Events`
````{py:class} AbstractChart.Events
The chart events class, accessed through `chart.events`
Events allow asynchronous and synchronous callbacks to be passed back into python.
Chart events can be subscribed to using: `chart.events.<name> += <callable>`
```{py:method} search -> (chart: Chart, string: str)
Fires upon searching. Searchbox will be automatically created.
```
```{py:method} new_bar -> (chart: Chart)
Fires when a new candlestick is added to the chart.
```
```{py:method} range_change -> (chart: Chart, bars_before: NUM, bars_after: NUM)
Fires when the range (visibleLogicalRange) changes.
```
````
Tutorial: [Topbar & Events](../tutorials/events.md)