Skip to content

Commit

Permalink
style: fix code style flaw and remove unnecessary default parameter. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
plainheart committed Nov 8, 2022
1 parent 0f149dc commit b9a19eb
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 111 deletions.
6 changes: 5 additions & 1 deletion src/chart/bar/BaseBarSeries.ts
Expand Up @@ -86,7 +86,11 @@ class BaseBarSeriesModel<Opts extends BaseBarSeriesOption<unknown> = BaseBarSeri
return createSeriesData(null, this, {useEncodeDefaulter: true});
}

getMarkerPosition(value: ScaleDataValue[], dims?: typeof dimPermutations[number], startingAtTick: boolean = false) {
getMarkerPosition(
value: ScaleDataValue[],
dims?: typeof dimPermutations[number],
startingAtTick?: boolean
) {
const coordSys = this.coordinateSystem;
if (coordSys && coordSys.clampData) {
// PENDING if clamp ?
Expand Down
2 changes: 1 addition & 1 deletion src/component/marker/MarkAreaView.ts
Expand Up @@ -183,7 +183,7 @@ function getSingleMarkerEndPoint(
else {
pointValue[1] = (clampPointValue0[1] > clampPointValue1[1]) ? pointValue0[1] : pointValue1[1];
}
// Use the getMarkerPoisition
// Use the getMarkerPosition
point = seriesModel.getMarkerPosition(
pointValue, dims, true
);
Expand Down
3 changes: 2 additions & 1 deletion src/model/Series.ts
Expand Up @@ -103,7 +103,8 @@ interface SeriesModel {
getMarkerPosition(
value: ScaleDataValue[],
dims?: typeof dimPermutations[number],
startingAtTick?:boolean): number[];
startingAtTick?: boolean
): number[];

/**
* Get legend icon symbol according to each series type
Expand Down
206 changes: 98 additions & 108 deletions test/bar-markArea.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b9a19eb

Please sign in to comment.