mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-09 03:30:09 +00:00
Merge pull request #33360 from frysztak/victoryscatter-size-active
[victory] Add (data, active) alternative to VictoryScatter
This commit is contained in:
2
types/victory/index.d.ts
vendored
2
types/victory/index.d.ts
vendored
@@ -2057,7 +2057,7 @@ declare module "victory" {
|
||||
/**
|
||||
* The size prop determines how to scale each data point
|
||||
*/
|
||||
size?: number | { (data: any): number };
|
||||
size?: number | { (data: any): number } | { (data: any, active: boolean): number };
|
||||
/**
|
||||
* The style prop specifies styles for your VictoryScatter. Any valid inline style properties
|
||||
* will be applied. Height, width, and padding should be specified via the height,
|
||||
|
||||
@@ -642,6 +642,32 @@ test = (
|
||||
/>
|
||||
);
|
||||
|
||||
test = (
|
||||
<VictoryScatter
|
||||
data={[
|
||||
{x: 1, y: 3},
|
||||
{x: 2, y: 5},
|
||||
{x: 3, y: 4},
|
||||
{x: 4, y: 2},
|
||||
{x: 5, y: 5}
|
||||
]}
|
||||
size={(d: any) => 5}
|
||||
/>
|
||||
);
|
||||
|
||||
test = (
|
||||
<VictoryScatter
|
||||
data={[
|
||||
{x: 1, y: 3},
|
||||
{x: 2, y: 5},
|
||||
{x: 3, y: 4},
|
||||
{x: 4, y: 2},
|
||||
{x: 5, y: 5}
|
||||
]}
|
||||
size={(d, a) => (a ? 5 : 3)}
|
||||
/>
|
||||
);
|
||||
|
||||
// VictoryPie test
|
||||
test = (
|
||||
<VictoryPie
|
||||
|
||||
Reference in New Issue
Block a user