Commit Graph

233 Commits

Author SHA1 Message Date
33be333b41 - legend 'text' parameter for displaying static text
- table 'resize' method
2023-10-09 17:30:40 +01:00
8b6a92be62 - table heading/footer callbacks
- fix Qt contextMenuPolicy bug on PyQt5
2023-10-09 16:50:38 +01:00
ab251a7600 implement table row click callbacks for individual cells
update docs
2023-10-04 19:32:46 +01:00
f5ad8613f4 - implement table header
- implement table background color, border color, border width, heading text colors and heading background colors
2023-10-02 19:11:18 +01:00
2e71edaf7a SwitcherWidget.set implementation 2023-10-02 17:31:24 +01:00
2bd4c7c037 Bug Fixes:
- Screen now defaults to the active screen rather than the `0` screen.
- `null` values given in chart data are now removed and replaced with whitespace.
- Closing the chart window now cleanly exits.
- Fixed a bug causing the `offset` parameter to be greater than `0` when there is no offset.
2023-09-29 12:03:49 +01:00
d43e7c24e7 Enhancements:
- Hotkeys can now use any character, and modifier keys are not required.
- Refactored the colors of the topbar, searchbox, toolbox, and widgets for consistency.
- Toolbox/interval refactoring and simplification.
- Histograms now show up in the legend, and will use shorthand notation by default (e.g 34k rather than 34000).
2023-09-24 15:09:45 +01:00
43eab9854d Modify hotkey implementation 2023-09-15 12:30:38 +01:00
2f1ad83b4d Merge pull request #114 from jamesbaber1/main
Made modifier key optional and adding support for more than just single alphnumeric keycodes
2023-09-15 12:20:22 +01:00
f4dcb0d8fd - handled upper lowercase 2023-09-14 10:12:33 -05:00
2219b32bd6 - change var name 2023-09-14 10:01:35 -05:00
5b792fbaa2 - reverted arg order change
- switched to using event.key when no modifier
2023-09-14 09:52:05 -05:00
36fae9fe15 Merge branch 'louisnw01:main' into main 2023-09-14 09:25:22 -05:00
b1f007f6d0 Enhancements:
- added the `align` parameter to all topbar widgets, allowing for individual widgets to be placed either on the left or right hand side of the topbar.
- Disabled QtChart’s context menu by default.

Bug Fixes:
- The `screenshot` method now works for subcharts.
- Tables will still render if a `NoneType` is passed to them as a value.
- Qt and Wx charts no longer throw an error when using the toolbox.
2023-09-14 10:51:10 +01:00
c60a918bb7 - made modifier key optional
- handle multi character key names
2023-09-13 16:50:02 -05:00
8f65a7fc96 - Fixed legend not hiding when resizing to 0
- Added the `menu` widget to the topbar.
2023-09-06 12:46:52 +01:00
7891c1bc64 Add issue_templates 2023-09-05 12:39:15 +01:00
555573b54b Enhancements:
- added the `create_histogram` method and the `Histogram` object.
- added the `round` parameter to `trend_line` and `ray_line`
- chart.set can now be given line data.

Bug Fixes:
- `NaN` values can now be given when setting data, and will leave a blank space in the data.
- `resize` will now change the chart wrapper’s size as well as the chart itself.
2023-09-04 20:29:15 +01:00
8532d48e5d update version number 2023-09-03 17:12:17 +01:00
2ff9d985a8 Merge pull request #97 from jamesbaber1/main
Fixed numpy value error on string
2023-09-03 17:08:56 +01:00
aad2a988b7 Enhancements:
- The `start_date` parameter of `vertical_span` can take a list or tuple of dates to create multiple vertical lines.
- Added style parameters to drawings.

Bug Fixes:
- `VerticalSpan.delete()` now works as intended.
- Drawings no longer show up in the legend
2023-09-03 17:08:10 +01:00
06fb7898b5 -fixed numpy value error on string 2023-09-01 12:48:45 -05:00
eacafe3cd1 update landing.html 2023-08-31 22:44:44 +01:00
a7c1dc8a30 Enhancements:
- Added the `screen` parameter to `Chart`, allowing for monitor selection. This should be an index from 0 (0 = primary monitor, 1=  second monitor, etc.)
- `vertical_span` method, allowing for vertical lines/spans to be drawn across the chart.
- `set_visible_range` method, which will set the visible range of the chart based on two given dates.
- `resize` method, which resizes the chart to the given size.
- `sync` will now sync both charts, regardless of which one is scrolled/zoomed.
2023-08-31 21:25:00 +01:00
769fd8ac0a update README.md 2023-08-27 00:33:47 +01:00
a63943380c update requirements.txt 2023-08-27 00:26:28 +01:00
f72baf95ba Polygon:
- Added async methods to polygon.
- The `requests` library is no longer required, with `urllib` being used instead.
- Added the `get_bar_data` function, which returns a dataframe of aggregate data from polygon.
- Opened up the `subscribe` and `unsubscribe` functions

Enhancements:
- Tables will now scroll when the rows exceed table height.

Bugs:
- Fixed a bug preventing async functions being used with horizontal line event.
- Fixed a bug causing the legend to show duplicate lines if the line was created after the legend.
- Fixed a bug causing the line hide icon to persist within the legend after deletion (#75)
- Fixed a bug causing the search box to be unfocused when the chart is loaded.
2023-08-27 00:20:05 +01:00
34ce3f7199 Refactoring/Enhancements/Fixes
Breaking Changes:
- Removed the `api` parameter; callbacks no longer need to be in a specific class.
- Topbar callbacks now take a chart as an argument (see updated callback examples)
- Removed the `topbar` parameter from chart declaration. The Topbar will be automatically created upon declaration of a topbar widget.
- Removed the `searchbox` parameter from charts. It will be created upon subscribing to it in `chart.events`.
- Removed `dynamic_loading`.
- Removed ‘volume_enabled’ parameter. Volume will be enabled if the volumn column is present in the dataframe.
- Widgets’ `func` parameter is now declared last.
- Switchers take a tuple of options rather than a variable number of arguments.
- `add_hotkey` renamed to `hotkey`
- Horizontal lines now take a `func` argument rather than `interactive`. This event will emit the Line object that was moved.
- Removed the `name` parameter from `line.set`. Line object names are now declared upon creation.

Enhancements:
- Added the `button` widget to the Topbar.
- Added the color picker to the drawing context menu.
- Charts now have a `candle_data` method, which returns the current data displayed on the chart as a DataFrame.
- Fixed callbacks are now located in the `chart.events` object:
    - search (e.g `chart.events.search += on_search`)
    - new_bar
    - range_change
- Added volume to the legend
- Drawings can now be accessed through `chart.toolbox.drawings`
- added the `style` and `name` parameters to `create_line`

Bug Fixes:
- Fixed a bug causing new charts not to load after `exit` was called.
- Refactored rayline placement to ensure they do not move the visible range.
- Fixed a bug causing the visible range to shift when trendlines are moved past the final candlestick.
- Fixed a bug preventing trendlines and raylines on irregular timeframes.
- Fixed a bug causing the legend to prevent mouse input into the chart.
2023-08-14 16:06:16 +01:00
06b605d3a7 Enhancements and Bug Fixes
Tables Feature
- Added the `create_table` method, which returns a `Table` object. This can be used to display watchlists, order windows, position windows and more.
- See the new page on the docs for more information!

Bugs
- Fixed a bug preventing the named column of a line to not work as a label of the series.
- Fixed a bug causing drawings loaded from the minute timeframe to not show on a daily timeframe.
- Fixed a bug causing `chart.exit` to not work.
- Fixed a bug preventing the chart from being moved after placing a ray.
- Fixed the ‘price in hoveringOver’ web console error.

Enhancements
- The date/time column can also be the `name` of the passed series object.
- Added the `label` method to `HorizontalLine`, allowing for the price line label of horizontal lines to be updated.
- `None` or an empty DataFrame can now be passed to `line.set` as a means to clear it.
- Seperate Chart objects will now run on the same pywebview instance. This means that any Chart objects created after the first will inherit the first Chart’s API.
- Reorganized the documentation for clarity.
2023-08-02 13:47:52 +01:00
77a70848fc add .readthedocs.yaml 2023-07-27 12:25:34 +01:00
e743881a89 add readthedocs.yaml 2023-07-27 12:24:50 +01:00
ca3122baf3 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 ‘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.
2023-07-24 17:03:31 +01:00
eaec61d739 hotfix (_save_under not defined) 2023-07-20 23:06:03 +01:00
527130e618 Ability to save drawings
- 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.
- HorizontalLines no longer throw cyclic structure errors in the web console.
- `API` methods can now be normal methods or coroutines.
2023-07-20 21:52:17 +01:00
b2ceae59b7 Add sponsorship button 2023-07-17 22:46:56 +01:00
851f0fb874 Delete .github directory 2023-07-17 22:44:15 +01:00
68301cf17f edit .github 2023-07-17 22:42:52 +01:00
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