-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: area and line shares the same curve generator(#5877)
* docs: update description of mark shape options * fix: let area and line use the same curve smoothing strategy * test: update tests for modification of the area curve strategy * test: add tests for modification of the area curve strategy --------- Co-authored-by: taoliujun <taoliujun@qq.com>
- Loading branch information
Showing
19 changed files
with
1,365 additions
and
270 deletions.
There are no files selected for viewing
62 changes: 28 additions & 34 deletions
62
__tests__/integration/snapshots/animation/control/interval0.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 28 additions & 34 deletions
62
__tests__/integration/snapshots/animation/control/interval1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 28 additions & 31 deletions
59
__tests__/integration/snapshots/animation/control/interval2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 28 additions & 31 deletions
59
__tests__/integration/snapshots/animation/control/interval3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 28 additions & 28 deletions
56
__tests__/integration/snapshots/animation/os-area-stack-enter/interval0-0.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 28 additions & 28 deletions
56
__tests__/integration/snapshots/animation/os-area-stack-enter/interval0-1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 28 additions & 28 deletions
56
__tests__/integration/snapshots/animation/os-area-stack-enter/interval0-2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions
14
__tests__/integration/snapshots/animation/stocks-keyframe/interval2-0.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions
14
__tests__/integration/snapshots/animation/stocks-keyframe/interval2-1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions
14
__tests__/integration/snapshots/animation/stocks-keyframe/interval3-0.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions
14
__tests__/integration/snapshots/animation/stocks-keyframe/interval3-1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,067 changes: 1,067 additions & 0 deletions
1,067
__tests__/integration/snapshots/static/aaplAreaLineSmoothSample.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions
4
__tests__/integration/snapshots/static/forecastRangeAreaLine.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,49 @@ | ||
import { G2Spec } from '../../../src'; | ||
|
||
export function aaplAreaLineSmoothSample(): G2Spec { | ||
return { | ||
type: 'view', | ||
data: { | ||
type: 'fetch', | ||
value: 'data/aapl.csv', | ||
}, | ||
children: [ | ||
{ | ||
type: 'line', | ||
encode: { | ||
x: 'date', | ||
y: 'close', | ||
shape: 'smooth', | ||
}, | ||
style: { | ||
strokeWidth: 4, | ||
}, | ||
transform: [ | ||
{ | ||
type: 'sample', | ||
thresholds: 100, | ||
strategy: 'lttb', | ||
}, | ||
], | ||
}, | ||
{ | ||
type: 'area', | ||
encode: { | ||
x: 'date', | ||
y: 'close', | ||
shape: 'smooth', | ||
}, | ||
style: { | ||
fillOpacity: 0.5, | ||
}, | ||
transform: [ | ||
{ | ||
type: 'sample', | ||
thresholds: 100, | ||
strategy: 'lttb', | ||
}, | ||
], | ||
}, | ||
], | ||
}; | ||
} |
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