implement table row click callbacks for individual cells

update docs
This commit is contained in:
louisnw
2023-10-04 19:32:46 +01:00
parent f5ad8613f4
commit ab251a7600
6 changed files with 80 additions and 26 deletions

View File

@ -0,0 +1,27 @@
# Screenshot & Save
```python
import pandas as pd
from lightweight_charts import Chart
if __name__ == '__main__':
chart = Chart()
df = pd.read_csv('ohlcv.csv')
chart.set(df)
chart.show()
img = chart.screenshot()
with open('screenshot.png', 'wb') as f:
f.write(img)
```
```{important}
The `screenshot` command can only be executed after the chart window is open. Therefore, either `block` must equal `False`, the screenshot should be triggered with a callback, or `async_show` should be used.
```
```{important}
This example can only be used with the standard `Chart` object.
```

View File

@ -17,6 +17,7 @@ examples/toolbox
examples/subchart
examples/yfinance
examples/events
examples/screenshot
examples/gui_examples
```

View File

@ -364,6 +364,10 @@ Charts are arranged horizontally from left to right. When the available space is
[Subchart examples](../examples/subchart.md)
```{important}
Price axis scales vary depending on the precision of the data used, and there is no way to perfectly 'align' two seperate price scales if they contain differing price data.
```
````
`````