implement table row click callbacks for individual cells
update docs
This commit is contained in:
27
docs/source/examples/screenshot.md
Normal file
27
docs/source/examples/screenshot.md
Normal 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.
|
||||
```
|
||||
|
||||
@ -17,6 +17,7 @@ examples/toolbox
|
||||
examples/subchart
|
||||
examples/yfinance
|
||||
examples/events
|
||||
examples/screenshot
|
||||
examples/gui_examples
|
||||
```
|
||||
|
||||
|
||||
@ -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.
|
||||
```
|
||||
|
||||
````
|
||||
`````
|
||||
|
||||
|
||||
Reference in New Issue
Block a user