Lightweight-charts

Latest version: v2.1

Safety actively analyzes 687918 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 6

1.0.14.4

Fixes/Enhancements
- Removed bar data from exported drawings, which should reduce the file size of exported drawings. (Make sure to back up any drawing files before running the new version!)
- Drawings can now be deleted through each’s right click context menu.
- Added the new `add_hotkey` method, which will execute the given method or function when the key command is pressed.
- Non-fixed callbacks no longer need to be placed in the API class.

1.0.14.2

Ability to save drawings (44)
- Added `toolbox` to the common methods.
- `toolbox.save_drawings_under` can save drawings under a specific `topbar` widget. eg `chart.toolbox.save_drawings_under(chart.topbar[’symbol’]`)
- `toolbox.load_drawings` will load and display drawings stored under the tag/string given.
- `toolbox.export_drawings` will export all currently saved drawings to the given file path.
- `toolbox.import_drawings` will import the drawings stored at the given file path.

Fixes/Enhancements:
- `update` methods are no longer case sensitive. (46)
- `HorizontalLine` no longer throws cyclic structure errors in the web console.
- `API` methods can now be normal methods or coroutines.

1.0.14

NEW FEATURE: Trendlines, Rays and the Toolbox

- Added `trend_line` and `ray_line` to the Common Methods.

- Added the `toolbox` parameter to chart declaration. This allows horizontal lines, trend lines and rays to be drawn on the chart using hotkeys and buttons.
- cmd-Z will delete the last drawing.
- Drawings can be moved by clicking and dragging.

- Added the `render_drawings` parameter to `set`, which will keep and re-render the drawings displayed on the chart (useful for multiple timeframes!)

Horizontal Lines
- The `horizontal_line` method now returns a HorizontalLine object, containing the methods `update` and `delete`.
- Added the `interactive` parameter to `horizontal_line`, allowing for callbacks to be emitted to the `on_horizontal_line_move` callback method when the line is dragged to a new price (stop losses, limit orders, etc.).

Enhancements:
- added the `precision` method to the Common Methods, allowing for the number of decimal places shown on the price scale to be declared.
- Lines displayed on legends now have toggle switches, allowing for their visibility to be controlled directly within the chart window.
- when using `set`, the column names can now be capitalised, and the `date` column can be the index.

Changes:
- Merged the `title` method into the `price_line` method.

1.0.13

[Polygon.io](http://polygon.io/) Full integration
- Added `polygon` to the common methods, allowing for data to be pulled from [polygon.io](http://polygon.io/). (`chart.polygon.<method>`)
- Added the `PolygonChart` object, which allows for a plug and play solution with the Polygon API.
- Check the docs for more details and examples!

Enhancements:
- Added `clear_markers` and `clear_horizontal_lines` to the common methods (21).
- Added the `maximize` parameter to the `Chart` object, which maximizes the chart window when shown (25).
- The Legend will now show Line values, and can be disabled using the `lines` parameter (24).
- Added the `name` parameter to the `set` method of line, using the column within the dataframe as the value and using its name within the legend (24).
- Added the `scale_candles_only` parameter to all Chart objects, which prevents the autoscaling of Lines (19).

- new `screenshot` method, which returns a bytes object of the displayed chart (27).

Fixes:
- `chart.lines()` now returns a copy of the list rather than the original.

1.0.12

- Synced subcharts will now have a synced crosshair.
- Fixed a bug causing Subcharts not to sync initially.

- added `scale_margin_top` and `scale_margin_bottom` parameters to the `price_scale` method.
- Added `price_line` and `price_label` parameters to `create_line`.

- Lowered the default margins of the chart.

1.0.11

Bug Fixes/Enhancements:
- Added the chart.spinner method, which when set to `True` shows a loading spinner on the chart (a nice visual for API calls, large datasets etc).
- If an empty data frame is passed to set (eg.`chart.set(pd.DataFrame())`) the volume series and candle series will be cleared.
- added the `cumulative_volume` parameter to `update_from_tick`, which adds the given volume tick onto the latest bar.
- Added `vert_visible` and `horz_visible` parameters to `crosshair`.
- Small style improvements to the searchbox and topbar.
- Fixed a bug preventing callbacks within `WxChart` and `QtChart`

Thanks to emma-uw for the following fixes and enhancements!
- Methods `hide_data`, `show_data` and `price_line` can be used within Charts, Subcharts and Lines to change the visibility of data, price lines, and the price line labels.
- Added the `delete` method to Line, which irreversably deletes the Line on the chart as well as its objects in JavaScript and Python.
- Added the `lines` common method, which returns a list of all Line objects for the chart.
- Added the `fit` method to the common methods, which uses the `fitContent()` method from Lightweight Charts.
- Fixed a big which caused synced SubCharts to be out of sync upon loading.

BETA: [Polygon.io](http://polygon.io/) integration
- Added the `PolygonChart` and `polygon` method, allowing for direct integration of [polygon.io](http://polygon.io/)’s API.
- **This feature is still in beta**, and there will be a full announcement and update once the feature is complete!

Page 4 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.