-
-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 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.
- Loading branch information
Showing
8 changed files
with
185 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# `Histogram` | ||
|
||
|
||
````{py:class} Histogram(name: str, color: COLOR, style: LINE_STYLE, width: int, price_line: bool, price_label: bool) | ||
The `Histogram` object represents a `HistogramSeries` object in Lightweight Charts and can be used to create indicators. As well as the methods described below, the `Line` object also has access to: | ||
[`horizontal_line`](#AbstractChart.horizontal_line), [`hide_data`](#hide_data), [`show_data`](#show_data) and [`price_line`](#price_line). | ||
Its instance should only be accessed from [`create_histogram`](#AbstractChart.create_histogram). | ||
___ | ||
```{py:method} set(data: pd.DataFrame) | ||
Sets the data for the histogram. | ||
When a name has not been set upon declaration, the columns should be named: `time | value` (Not case sensitive). | ||
The column containing the data should be named after the string given in the `name`. | ||
A `color` column can be used within the dataframe to specify the color of individual bars. | ||
``` | ||
___ | ||
```{py:method} update(series: pd.Series) | ||
Updates the data for the histogram. | ||
This should be given as a Series object, with labels akin to the `histogram.set` method. | ||
``` | ||
___ | ||
```{py:method} scale(scale_margin_top: float, scale_margin_bottom: float) | ||
Scales the margins of the histogram, as used within [`volume_config`](#AbstractChart.volume_config). | ||
``` | ||
___ | ||
```{py:method} delete() | ||
Irreversibly deletes the histogram. | ||
``` | ||
```` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
:hidden: | ||
abstract_chart | ||
line | ||
histogram | ||
horizontal_line | ||
charts | ||
events | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.