rx.data
helper function to generate a data array from a x list.data = rx.data(
"histogram", x=[1, 6, 3, 5, 3, 14, 18, 19, 20]
)
data = [
{"x": 1},
{"x": 6},
{"x": 3},
{"x": 5},
{"x": 3},
{"x": 14},
{"x": 18},
{"x": 19},
{"x": 20},
]
rx.histogram
component.rx.chart(
rx.histogram(
data=rx.data(
"histogram", x=[1, 6, 3, 5, 3, 14, 18, 19, 20]
),
),
)
rx.chart(
rx.histogram(
data=rx.data(
"histogram", x=[1, 6, 3, 5, 3, 14, 18, 19, 20]
),
style={
"data": {
"fill": "orange",
"stroke": "tomato",
"strokeWidth": 2,
"opacity": 0.5,
},
"labels": {"fill": "white", "fontSize": 12},
},
),
domain_padding={"x": 100},
)
Display a victory histogram.