update docs

update setup/conf
This commit is contained in:
louisnw
2023-10-09 17:42:52 +01:00
parent 33be333b41
commit 6df0e4fd45
4 changed files with 22 additions and 5 deletions

View File

@ -3,7 +3,7 @@ import os.path
project = 'lightweight-charts-python'
copyright = '2023, louisnw'
author = 'louisnw'
release = '1.0.17.7'
release = '1.0.18'
extensions = [
"myst_parser",

View File

@ -273,7 +273,7 @@ ___
```{py:method} legend(visible: bool, ohlc: bool, percent: bool, lines: bool, color: COLOR, font_size: int, font_family: str)
```{py:method} legend(visible: bool, ohlc: bool, percent: bool, lines: bool, color: COLOR, font_size: int, font_family: str, text: str)
Configures the legend of the chart.
```
@ -334,7 +334,7 @@ ___
```{py:method} create_table(width: NUM, height: NUM, headings: Tuple[str], widths: Tuple[float], alignments: Tuple[str], position: FLOAT, draggable: bool, func: callable) -> Table
```{py:method} create_table(width: NUM, height: NUM, headings: Tuple[str], widths: Tuple[float], alignments: Tuple[str], position: FLOAT, draggable: bool, return_clicked_cells: bool, func: callable) -> Table
Creates and returns a [`Table`](https://lightweight-charts-python.readthedocs.io/en/latest/tables.html) object.

View File

@ -1,6 +1,6 @@
# `Table`
`````{py:class} Table(width: NUM, height: NUM, headings: Tuple[str], widths: Tuple[float], alignments: Tuple[str], position: FLOAT, draggable: bool, func: callable)
`````{py:class} Table(width: NUM, height: NUM, headings: Tuple[str], widths: Tuple[float], alignments: Tuple[str], position: FLOAT, draggable: bool, return_clicked_cells: bool, func: callable)
Tables are panes that can be used to gain further functionality from charts. They are intended to be used for watchlists, order management, or position management. It should be accessed from the `create_table` common method.
@ -18,6 +18,9 @@ The `Table` and `Row` objects act as dictionaries, and can be manipulated as suc
`draggable`
: If `True`, then the window can be dragged to any position within the window.
`return_clicked_cells`
: If `True`, an additional parameter will be emitted to the `func` given, containing the heading name of the clicked cell.
`func`
: If given, this will be called when a row is clicked, returning the `Row` object in question.
___
@ -101,6 +104,11 @@ ___
````{py:class} Footer
```{tip}
All of these methods can be applied to the `header` parameter.
```
Tables can also have a footer containing a number of text boxes. To initialize this, call the `footer` attribute with the number of textboxes to be used:
```python
@ -114,6 +122,15 @@ table.footer[1] = 'Text Box 2'
table.footer[2] = 'Text Box 3'
```
When calling footer, the `func` parameter can also be used to convert each textbox into a button:
```python
def on_footer_click(table, box_index):
print(f'Box number {box_index+1} was pressed.')
table.footer(3, func=on_footer_click)
```
````