rx.data
helper function to generate a data array from a x and y list.data = rx.data(
"bar",
x=["Cats", "Dogs", "Birds", "Fish", "Reptiles"],
y=[1, 2, 3, 4, 10],
)
data = [
{"x": "Cats", "y": 1},
{"x": "Dogs", "y": 2},
{"x": "Birds", "y": 3},
{"x": "Fish", "y": 4},
{"x": "Reptiles", "y": 10},
]
rx.bar
component.rx.bar(
data=rx.data(
"bar",
x=["Cats", "Dogs", "Birds", "Fish", "Reptiles"],
y=[1, 2, 3, 4, 10],
),
)
rx.chart(
rx.bar(
data=rx.data(
"bar",
x=["Cats", "Dogs", "Birds", "Fish", "Reptiles"],
y=[1, 2, 3, 4, 10],
),
style={
"data": {
"fill": "rgb(107,99,246)",
"stroke": "black",
"strokeWidth": 2,
}
},
),
domain_padding={"x": 20, "y": 0},
)
Display a victory bar.