Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add sequential scale (close #188) #189

Merged
merged 1 commit into from
Aug 30, 2022
Merged

Conversation

pepper-nice
Copy link
Contributor

Usage

  • source
  • test: coverage 100%
  • docs

API

import { Sequential, SequentialOptions } from '@antv/scale';

const scale = new Sequential({
  domain: [0, 10],
  interpolator: (t) => 1 - t,
});

scale.map(0.5); // 0.5
scale.map(0.2); // 0.8
scale.map(0.8); // 0.2
scale.getOptions().range; // [1, 0]

@pepper-nice pepper-nice force-pushed the feat/sequential-scale branch 2 times, most recently from f5ea4c3 to a772c1e Compare August 29, 2022 02:28
src/scales/sequential.ts Outdated Show resolved Hide resolved
src/scales/sequential.ts Outdated Show resolved Hide resolved
src/scales/sequential.ts Outdated Show resolved Hide resolved
src/scales/sequential.ts Outdated Show resolved Hide resolved
src/scales/sequential.ts Outdated Show resolved Hide resolved
__tests__/unit/scales/sequential.spec.ts Outdated Show resolved Hide resolved
__tests__/unit/scales/sequential.spec.ts Show resolved Hide resolved
@pepper-nice pepper-nice force-pushed the feat/sequential-scale branch 2 times, most recently from 096f02f to 2bbb8b9 Compare August 30, 2022 07:19
@pepper-nice pepper-nice changed the title feat: add sequential scale #188 feat: add sequential scale (close #188) Aug 30, 2022
Copy link
Member

@pearmini pearmini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

可以把 eslint 这个规则关了!

Copy link
Member

@pearmini pearmini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀🚀🚀

@pearmini pearmini merged commit 2ab8209 into master Aug 30, 2022
@pearmini pearmini deleted the feat/sequential-scale branch August 30, 2022 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants