rx.data
helper function to generate a data array from a x and y list.data = rx.data(
"box_plot",
x=[1, 2, 3, 4, 5],
y=[
[1, 2, 3, 4, 10],
[5, 12, 4, 6, 1],
[1, 2, 3, 4, 10],
[5, 12, 4, 6, 1],
[1, 2, 3, 4, 10],
],
)
data = [
{"x": 1, "y": [1, 2, 3, 4, 10]},
{"x": 2, "y": [5, 12, 4, 6, 1]},
{"x": 3, "y": [1, 2, 3, 4, 10]},
{"x": 4, "y": [5, 12, 4, 6, 1]},
{"x": 5, "y": [1, 2, 3, 4, 10]},
]
rx.box_plot
component.rx.chart(
rx.box_plot(
data=rx.data(
"box_plot",
x=[1, 2, 3, 4, 5],
y=[
[1, 2, 3, 4, 10],
[5, 12, 4, 6, 1],
[1, 2, 3, 4, 10],
[5, 12, 4, 6, 1],
[1, 2, 3, 4, 10],
],
),
),
domain_padding={"x": 15, "y": 5},
)
rx.chart(
rx.box_plot(
data=rx.data(
"box_plot",
x=[1, 2, 3, 4, 5],
y=[
[1, 2, 3, 4, 10],
[5, 12, 4, 6, 1],
[1, 2, 3, 4, 10],
[5, 12, 4, 6, 1],
[1, 2, 3, 4, 10],
],
),
style={
"min": {"stroke": "tomato"},
"max": {"stroke": "orange"},
"q1": {"fill": "tomato"},
"q3": {"fill": "orange"},
"median": {"stroke": "white", "strokeWidth": 5},
},
),
domain_padding={"x": 15, "y": 5},
)
Display a victory boxplot.