Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
update setup/conf
  • Loading branch information
louisnw01 committed Oct 9, 2023
1 parent 33be333 commit 6df0e4f
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Expand Up @@ -3,7 +3,7 @@
project = 'lightweight-charts-python'
copyright = '2023, louisnw'
author = 'louisnw'
release = '1.0.17.7'
release = '1.0.18'

extensions = [
"myst_parser",
Expand Down
4 changes: 2 additions & 2 deletions docs/source/reference/abstract_chart.md
Expand Up @@ -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.
```
Expand Down Expand Up @@ -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.
Expand Down
19 changes: 18 additions & 1 deletion docs/source/reference/tables.md
@@ -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.
Expand All @@ -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.
___
Expand Down Expand Up @@ -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
Expand All @@ -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)
```
````


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -5,7 +5,7 @@

setup(
name='lightweight_charts',
version='1.0.17.7',
version='1.0.18',
packages=find_packages(),
python_requires='>=3.8',
install_requires=[
Expand Down

1 comment on commit 6df0e4f

@tharwani1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: Could not find a version that satisfies the requirement lightweight-charts (from versions: none)
ERROR: No matching distribution found for lightweight-charts

Please sign in to comment.