Skip to content

Commit

Permalink
feat(radial-bar): add type
Browse files Browse the repository at this point in the history
  • Loading branch information
hsp-sz committed Nov 20, 2023
1 parent c34c50b commit 1a5915f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/plots/src/core/plots/radial-bar/adaptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function adaptor(params: Params) {
* tooltip 配置
* @param params
*/
const tooltip = (params) => {
const tooltip = (params: Params) => {
const { options } = params;
const { tooltip, xField, yField } = options;
if (!tooltip) {
Expand All @@ -57,7 +57,7 @@ export function adaptor(params: Params) {
* background 配置
* @param params
*/
const background = (params) => {
const background = (params: Params) => {
const { options } = params;
const { markBackground, children, scale, coordinate, xField } = options;
const domain = get(scale, 'y.domain', []);
Expand Down
10 changes: 8 additions & 2 deletions packages/plots/src/core/plots/radial-bar/type.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import type { BaseOptions, Options } from '../../types/common';
import type { Options } from '../../types/common';

export type RadialBarOptions = Options & BaseOptions;
export type RadialBarOptions = Options & {
startAngle: number;
maxAngle: number;
radius: number;
innerRadius: number;
markBackground: Record<string, string>;
};

0 comments on commit 1a5915f

Please sign in to comment.