Commit Graph

46 Commits

Author SHA1 Message Date
27b8268799 - Fixed 'JSON cannot stringify cyclic structures' web console error
- Changed undo key command to meta+Z or ctrl+z

- Fixed a bug stopping drawings from switching correctly.
2023-07-17 15:05:11 +01:00
95607c6fa4 Update README.md, polygon.md 2023-07-16 21:23:19 +01:00
e4459208d2 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.
2023-07-16 20:54:32 +01:00
7850821c6a Ensure files are read with UTF-8 Encoding 2023-07-03 14:14:10 +01:00
4d1ce9e0d7 update docs 2023-07-02 10:33:53 +01:00
355992cdac hotfix 2023-06-29 19:00:14 +01:00
99d25f8974 v1.0.13.1 2023-06-28 19:15:49 +01:00
29c3b4833a update setup.py 2023-06-28 19:11:47 +01:00
dde46149b2 update docs 2023-06-28 18:41:53 +01:00
d9c8aa3bd8 v1.0.13
NEW FEATURE: Polygon.io Full integration
- Added `polygon` to the common methods, allowing for data to be pulled from 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.
- Added the `maximize` parameter to the `Chart` object, which maximizes the chart window when shown.
- The Legend will now show Line values, and can be disabled using the `lines` parameter.
- 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.
- Added the `scale_candles_only` parameter to all Chart objects, which prevents the autoscaling of Lines.

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

Fixes:
- `chart.lines()` now returns a copy of the list rather than the original.
2023-06-28 18:36:32 +01:00
adfc58a8af - Synced Subcharts will now have synced crosshairs.
- 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.
2023-06-10 23:15:10 +01:00
e537ae7e9d update version 2023-06-10 14:39:23 +01:00
2884699d3c fix unsubscribe loop 2023-06-10 14:38:38 +01:00
345b37e0f3 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 integration
- Added the `PolygonChart` and `polygon` method, allowing for direct integration of polygon.io’s API.
- This feature is still in beta, and there will be a full announcement and update once the feature is complete!
2023-06-10 14:34:46 +01:00
3463f8635f update docs 2023-06-04 15:10:40 +01:00
cf4694932f update README.md 2023-06-04 15:08:59 +01:00
1b49688594 update example images 2023-06-04 14:45:01 +01:00
3a7832e0d4 - Moved ChartAsync’s methods into the Chart object.
- Removed ChartAsync.
- Added the `show_async` method to `Chart`.
- Refactored how the TopBar is used. The docs explain this in detail, but a basic rundown is:
    - `corner_text` and `create_switcher` are no longer methods. The `topbar` attribute of `chart` should be used instead.
    - switchers and textboxes, now created with `chart.topbar.textbox` and `chart.topbar.switcher` require a name to be passed to them, which is used to access its instance (e.g `chart.topbar[‘timeframe’]`)
    - If you have any questions about these changes, or potential enhancements, feel free to raise an issue and I will get back to you ASAP :)

- PtQt and Wx can now use either synchronous or asynchronous callback functions

- BETA: Support for Jupyter Notebooks

- Fixed a bug causing the ‘date’ column of DataFrames passed to `set`, `update`, and `update_from_tick` to be modified.
2023-06-04 14:38:58 +01:00
a58f1e306c New Feature: ChartAsync
- Added the ChartAsync class, allowing for more sophisticated Charts and SubCharts.
- Symbol searching, timeframe selectors, and more is now possible with this varation of Chart.

`QtChart` and `WxChart` have access to all the methods that `ChartAsync` has, however they utilize their own respective event loops rather than asyncio.

New Feature: `StreamlitChart`
- Chart window that can display static data within a Streamlit application.

Removed the `subscribe_click` method.
2023-05-29 21:31:13 +01:00
39e40334d5 update README.md 2023-05-24 01:32:34 +01:00
6e6713cc8c update README.md 2023-05-24 01:25:24 +01:00
7c70b0657e - Fixed a bug causing loading times for large amounts of data to be increased significantly.
- BETA: Dynamic candlestick loading
- the config method has been removed, and its methods can now be found in various places:
    - right_padding: moved to the ‘time_scale’ method.
    - mode: moved to the ‘price_scale’ method.
    - title: declared in the new ‘title’ method.
- It is now possible to update titles, horizontal_lines, and markers within Line objects.
2023-05-23 14:31:27 +01:00
dd6e7a82c5 - Fixed a bug causing loading times for large amounts of data to be increased significantly.
- BETA: Dynamic candlestick loading
- the config method has been removed, and its methods can now be found in various places:
    - right_padding: moved to the ‘time_scale’ method.
    - mode: moved to the ‘price_scale’ method.
    - title: declared in the new ‘title’ method.
- It is now possible to update titles, horizontal_lines, and markers within Line objects.
2023-05-23 14:30:35 +01:00
6ce13f732d Merge remote-tracking branch 'origin/main' 2023-05-21 15:44:23 +01:00
a2d29ed829 - Significant refactoring resulting in a 34% reduction in size of the codebase (excluding the Lightweight Charts package) and greater efficiency.
- Upgraded to Lightweight Charts v4.0.1.
- Added a ‘hover’ item to the returning dictionary from subscribe_click.
- Markers and SubCharts no longer use a UUID for identification, but an 8 character string.
2023-05-21 15:44:10 +01:00
7ea2b0ac19 - Significant refactoring resulting in a 34% reduction in size of the codebase (excluding the Lightweight Charts package) and greater efficiency.
- Upgraded to Lightweight Charts v4.0.1.
- Added a ‘hover’ item to the returning dictionary from subscribe_click.
- Markers and SubCharts no longer use a UUID for identification, but an 8 character string.
2023-05-21 15:42:57 +01:00
3bc515e631 Update README.md 2023-05-20 01:58:46 +01:00
445d9b67d3 Cover picture 2023-05-20 01:49:12 +01:00
76b5b7a161 - Fixed a bug causing the library to throw errors when used with python 3.9.
- Fixed a bug that did not size the multi pane charts correctly.
- Implementation of the ‘grid’ common method.
2023-05-20 01:45:40 +01:00
b60e9705cb - Fixed a bug causing the library to throw errors when used with python 3.9.
- Fixed a bug that did not size the multi pane charts correctly.
- Implementation of the ‘grid’ common method.
2023-05-20 01:14:01 +01:00
0e709040d5 Update docs 2023-05-18 23:47:11 +01:00
a5df5dedfc Update README.md 2023-05-18 23:38:17 +01:00
8011616af8 New Feature: Multi-Pane Charts
- Added the create_subchart method to Chart.
- Added the SubChart class.
- Added an inner_width and inner_height parameter to Chart.
- The time_scale method can now disable the time scale completely.

Bugs:
- Fixed a bug which prevented markers from being placed on charts with a timescale less than a day.
2023-05-18 23:28:51 +01:00
6237cf4d5a New Feature: Multi-Pane Charts
- Added the create_subchart method to Chart.
- Added the SubChart class.
- Added an inner_width and inner_height parameter to Chart.
- The time_scale method can now disable the time scale completely.

Bugs:
- Fixed a bug which prevented markers from being placed on charts with a timescale less than a day.
2023-05-18 23:14:04 +01:00
0f061ae803 Fixed mistake in docs. 2023-05-17 15:25:38 +01:00
88c8a266ec - Fixed an issue which caused JavaScript variables of the same name to be declared twice.
- Refactoring to allow the widget classes to use the subscribe_click method.
2023-05-17 12:45:54 +01:00
993fbe8ed8 Fixed a bug related to the latest version of pywebview causing charts not to load. 2023-05-17 00:17:28 +01:00
00bb1c5536 RTD 2023-05-16 22:20:47 +01:00
18b9b8ff41 RTD 2023-05-16 01:44:23 +01:00
3d1c096025 RTD 2023-05-16 01:41:10 +01:00
c3dc4573f7 RTD 2023-05-16 01:38:06 +01:00
a489c66d0b RTD 2023-05-16 01:32:30 +01:00
202acd805e Update README.md 2023-05-15 12:56:00 +01:00
7c125b24ec - Added support for PyQt.
- Refactored widgets to catch ModuleNotFoundErrors.
2023-05-15 12:28:25 +01:00
d8424d6da3 - Added missing docstrings (line.set(), chart.hide(), chart.exit()).
- Updated chart.exit() to destroy objects and terminate the webview process.
- Fixed WxChart not expanding correctly and removed its width and height parameters.
- Fixed KeyboardInterrupt error message when using show(block=True).
2023-05-12 12:56:53 +01:00
5b0a8cd51f first commit 2023-05-10 20:45:23 +01:00