-
I'm using the visualization control and is giving me the following error: TypeError: Object of type Data is not JSON serializable plotdata = data('year person sales', 10, rows=[
('2021', 'Joe', 10),
('2022', 'Jane', 58),
('2023', 'Ann', 114),
('2021', 'Tim', 31),
('2023', 'Joe', 96),
('2021', 'Jane', 55),
('2023', 'Jane', 5),
('2022', 'Tim', 85),
('2023', 'Tim', 132),
('2022', 'Joe', 54),
('2021', 'Ann', 78),
('2022', 'Ann', 18),
])
plotheatmap = ui.plot(marks=[ui.mark(type='polygon',
x='=person',
y='=year',
olor='=sales',
color_range='#fee8c8 #fdbb84 #e34a33')])
ui.visualization(plot=plotheatmap,
data=plotdata) |
Beta Was this translation helpful? Give feedback.
Answered by
mturoci
Aug 11, 2022
Replies: 1 comment 1 reply
-
plotdata = data('year person sales', 10, rows=[
('2021', 'Joe', 10),
('2022', 'Jane', 58),
('2023', 'Ann', 114),
('2021', 'Tim', 31),
('2023', 'Joe', 96),
('2021', 'Jane', 55),
('2023', 'Jane', 5),
('2022', 'Tim', 85),
('2023', 'Tim', 132),
('2022', 'Joe', 54),
('2021', 'Ann', 78),
('2022', 'Ann', 18),
], pack=True) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
mturoci
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pack=True
parameter is needed for your data: