-
Wave SDK Version, OSpython 3.10.6 Actual behaviorcpu_card.plot_data[-1] = [tick, cpu_usage] Expected behaviorno error below is the example link: help appreciated, i was stucked for a long time |
Beta Was this translation helpful? Give feedback.
Answered by
mturoci
May 26, 2023
Replies: 1 comment
-
After discussion at Discord, the cause was getting the wrong reference to the gpu_usage_card = ui.small_series_stat_card(
box='1 1 1 1',
title='CPU',
value='={{usage}}%',
data=dict(usage=0.0),
plot_data=data('tick usage', -15),
plot_category='tick',
plot_value='usage',
plot_zero_value=0,
plot_color='$red',
)
q.page["home/gpu_stats"] = gpu_usage_card Instead of q.page["home/gpu_stats"] = ui.small_series_stat_card(
box='1 1 1 1',
title='CPU',
value='={{usage}}%',
data=dict(usage=0.0),
plot_data=data('tick usage', -15),
plot_category='tick',
plot_value='usage',
plot_zero_value=0,
plot_color='$red',
)
gpu_usage_card = q.page['home/gpu_stats'] or as the tutorial example uses: cpu_card = page.add('cpu_stats', ui.small_series_stat_card(
box='1 1 1 1',
title='CPU',
value='={{usage}}%',
data=dict(usage=0.0),
plot_data=data('tick usage', -15),
plot_category='tick',
plot_value='usage',
plot_zero_value=0,
plot_color='$red',
)) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
mturoci
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After discussion at Discord, the cause was getting the wrong reference to the
gpu_usage_card
.Instead of