-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix pane widget and separator feature previously implemented in 22c6b03 * Add prepare scripts to package.json * Add empty .npmignore This file is being used in conjunction with the `prepare` script. See this for details: yarnpkg/yarn#5235 (comment) * implement subscribePaneResize and unsubscribePaneResize * add ChartApi#removePane and ChartApi#swapPane, update Series#applyOptions for pane option * update .size-limit.js * Update package.json * Revert "implement subscribePaneResize and unsubscribePaneResize" This reverts commit 2194ebc * add ChartApi#getPaneElements() * fix pane widget and separator feature previously implemented in 22c6b03 * implement subscribePaneResize and unsubscribePaneResize * add ChartApi#removePane and ChartApi#swapPane, update Series#applyOptions for pane option * Revert "implement subscribePaneResize and unsubscribePaneResize" This reverts commit 2194ebc * add ChartApi#getPaneElements() * update .size-limit.js and linter errors * add paneIndex to MouseEventParams (click and crosshair event) * add nonPrimaryPriceScale to ChartOptions for non primary pane * fix: resize panes * fix: remove empty panes * fix: be able to move series to 0 index pane * fix: paneSize method receive paneIndex * chore: add method description * update size limit * add basic e2e tests * add coverage tests * add coverage test * add customisable options * improve coverage * add PaneApi * add paneApi coverage test * remove dedicated pane options * rename method * remove pane index mapping * remove paneIndex from series options * fix tests * fix line series * remove PaneInfo interface * remove paneIndex from Series * cleanup removePane and swapPane * fix crosshair horizontal line on all panes * fix prevent removing last pane * fix: remove non-primary price scale * cleanup * Pane separator & panes resize improvements * fix add jsdoc comment * fix: rename details to point * remove getPaneElements api * add CrosshairMarksPaneView per pane * cleanup tests * fix invalidation * fix CrosshairMarksPaneView order * add getSeriesByPane and getPaneBySeries apis * add series method to pane * update size limit * createSeries fix * add PaneApi getHTMLElement + change getSeriesByPane * rename method * add integration tests * fix: remove methods from ChartApi * Update src/api/iseries-api.ts Co-authored-by: Mark Silverwood <[email protected]> * Update src/model/chart-model.ts Co-authored-by: Mark Silverwood <[email protected]> * fixed code review suggestions * move method to private * Update src/api/ichart-api.ts Co-authored-by: Mark Silverwood <[email protected]> * fix paneIndex types * change iseries-api description * add how to guide * add sidebar page * add documentation links * fix multiple logos * add e2e tests * add docs suggestions * fix links * fix docs links * Update website/tutorials/how_to/panes.mdx Co-authored-by: Evgeniia Riazanova <[email protected]> * update docs * fix markdown formatting * add tm signs * fix typo * rename createPane method * make getOrCreatePane private * _getOrCreatePane refactoring * fix: series priceScaleId option * fix: add target blank to attr-logo * test: disable attribution logo on unrelated tests --------- Co-authored-by: Adrian Ng <[email protected]> Co-authored-by: Kirill Chetverikov <[email protected]> Co-authored-by: Mark Silverwood <[email protected]> Co-authored-by: Evgeniia Riazanova <[email protected]>
- Loading branch information
1 parent
46e8894
commit 940635f
Showing
54 changed files
with
1,688 additions
and
260 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
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
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,50 @@ | ||
import { SeriesType } from '../model/series-options'; | ||
|
||
import { ISeriesApi } from './iseries-api'; | ||
|
||
/** | ||
* Represents the interface for interacting with a pane in a lightweight chart. | ||
*/ | ||
export interface IPaneApi<HorzScaleItem> { | ||
/** | ||
* Retrieves the height of the pane in pixels. | ||
* | ||
* @returns The height of the pane in pixels. | ||
*/ | ||
getHeight(): number; | ||
|
||
/** | ||
* Sets the height of the pane. | ||
* | ||
* @param height - The number of pixels to set as the height of the pane. | ||
*/ | ||
setHeight(height: number): void; | ||
|
||
/** | ||
* Moves the pane to a new position. | ||
* | ||
* @param paneIndex - The target index of the pane. Should be a number between 0 and the total number of panes - 1. | ||
*/ | ||
moveTo(paneIndex: number): void; | ||
|
||
/** | ||
* Retrieves the index of the pane. | ||
* | ||
* @returns The index of the pane. It is a number between 0 and the total number of panes - 1. | ||
*/ | ||
paneIndex(): number; | ||
|
||
/** | ||
* Retrieves the array of series for the current pane. | ||
* | ||
* @returns An array of series. | ||
*/ | ||
getSeries(): ISeriesApi<SeriesType, HorzScaleItem>[]; | ||
|
||
/** | ||
* Retrieves the HTML element of the pane. | ||
* | ||
* @returns The HTML element of the pane. | ||
*/ | ||
getHTMLElement(): HTMLElement; | ||
} |
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.