Add y0 data accessor to datable components (#35188)

This commit is contained in:
Dominic Lee
2019-05-04 10:00:22 -07:00
committed by Wesley Wigham
parent c1942d4bc1
commit a793220943
2 changed files with 8 additions and 0 deletions
+7
View File
@@ -1087,6 +1087,13 @@ declare module "victory" {
* @default "y"
*/
y?: DataGetterPropType;
/**
* Use y0 data accessor prop to determine how the component defines the baseline y0 data.
* This prop is useful for defining custom baselines for components like VictoryBar or VictoryArea.
* This prop may be given in a variety of formats.
* @example 'last_quarter_profit', () => 10, 1, 'employees.salary', ["employees", "salary"]
*/
y0?: DataGetterPropType;
}
// Common labable interface
+1
View File
@@ -487,6 +487,7 @@ test = (
{ y: 6, x: 'B' },
{ y: 7, x: 'C' },
]}
y0={(d) => d.y - 1}
/>
</VictoryChart>
);