Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add chart to DAO dashboard #152

Merged
merged 16 commits into from
Dec 20, 2024
Prev Previous commit
Next Next commit
fix chart scaling
  • Loading branch information
rubycop committed Dec 11, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 8aea01969e67df45dd4e5b606ad3c903c3c2f1be
Original file line number Diff line number Diff line change
@@ -105,8 +105,8 @@ const code = `
},
layout: {
padding: {
top: 20,
bottom: 0,
top: 10,
bottom: 10,
left: 0,
right: 0
}
@@ -224,8 +224,8 @@ const code = `
myChart.data.datasets[0].data = data.dataset;
myChart.data.labels = data.labels;
myChart.data.timestamp = data.timestamp;
myChart.options.scales.y.min = 0;
myChart.options.scales.y.max = max;
myChart.options.scales.y.min = min > 0 ? min*0.9 : 0;
myChart.options.scales.y.max = max > 0 ? max*1.1 : 0;

myChart.update();
sendChartHeight();