Skip to content

Commit

Permalink
fix: delete useEffect
Browse files Browse the repository at this point in the history
  • Loading branch information
zy371123 committed Nov 10, 2023
1 parent 95a3239 commit 386827a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/plots/src/components/base/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useImperativeHandle, forwardRef, useEffect } from 'react';
import React, { useImperativeHandle, forwardRef } from 'react';
import { ErrorBoundary, ChartLoading } from '@ant-design/charts-util';
import useChart from '../../hooks/useChart';
import { Plots } from '../../core';
Expand Down
1 change: 1 addition & 0 deletions packages/plots/src/core/plots/violin/adaptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export function adaptor(params: Params) {

const customTransform = (params: Params) => {
const { options } = params;
// 默认‘normal’类型数据格式
if (options.violinType === 'polar') {
set(options, 'coordinate', { type: 'polar'})
} else if (options.violinType === 'density') {
Expand Down
4 changes: 3 additions & 1 deletion packages/plots/src/core/plots/violin/type.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { BaseOptions, Options } from '../../types/common';

export type ViolinOptions = Options & BaseOptions;
export type ViolinOptions = Options & BaseOptions & {
violinType?: 'normal' | 'density' | 'polar'
};
4 changes: 1 addition & 3 deletions site/examples/statistics/violin/index.zh.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
title: 小提琴图
order: 15
---


---

0 comments on commit 386827a

Please sign in to comment.