#30562 Updated VictoryLegendProps

This commit is contained in:
alreadyExisted
2019-03-02 22:43:58 +02:00
parent 34116971d5
commit ab4aa16e85
2 changed files with 1036 additions and 1000 deletions
+1013 -995
View File
File diff suppressed because it is too large Load Diff
+23 -5
View File
@@ -197,9 +197,9 @@ test = (
<VictoryAxis
scale="time"
style={{
grid: { strokeWidth: tick => tick.x },
ticks: { stroke: tick => tick.color },
tickLabels: { fontSize: tick => tick.y },
grid: { strokeWidth: (tick: any) => tick.x },
ticks: { stroke: (tick: any) => tick.color },
tickLabels: { fontSize: (tick: any) => tick.y },
}}
tickValues={[
new Date(1980, 1, 1),
@@ -611,8 +611,8 @@ test = (
]}
style={{
data: {
fill: d => d.x,
stroke: (datum, active) => active ? datum.x : datum.y,
fill: (d: any) => d.x,
stroke: (datum: any, active: boolean) => active ? datum.x : datum.y,
strokeWidth: 3
}
}}
@@ -757,6 +757,7 @@ test = (
]}
gutter={10}
orientation="horizontal"
title="Title"
symbolSpacer={8}
width={100}
height={50}
@@ -771,5 +772,22 @@ test = (
standalone
padding={{ top: 20, right: 40, bottom: 60, left: 20 }}
colorScale="heatmap"
events={[{
target: "data",
eventKey: "thisOne",
eventHandlers: {
onClick: () => ([
{
eventKey: "theOtherOne",
mutation: props => ({ style: { ...props.style, fill: "orange" } })
},
{
eventKey: "theOtherOne",
target: "labels",
mutation: () => ({ text: "hey" })
}
])
}
}]}
/>
);