This repository has been archived by the owner on Apr 19, 2021. It is now read-only.
Adjust Redash graphs to drawn datasets close to the max value properly #178
Labels
Comments
The same issue is reported in chartjs/Chart.js#4202 and fixed in chartjs/Chart.js#5321 but not yet released. Using that commit will resolve this: Diff: diff --git a/package.json b/package.json
index fd3ea90..bebc445 100644
--- a/package.json
+++ b/package.json
@@ -37,7 +37,7 @@
"@material-ui/icons": "^3.0.1",
"@mozilla-frontend-infra/perf-goggles": "^2.0.1",
"aggregatejs": "^0.0.5",
- "chart.js": "^2.7.2",
+ "chart.js": "chartjs/Chart.js#7c3e934",
"classnames": "^2.2.5",
"d3": "^4.10.0",
"lodash": "^4.17.2",
diff --git a/yarn.lock b/yarn.lock
index 9f5e772..773efac 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2058,10 +2058,9 @@ chardet@^0.7.0:
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==
-chart.js@^2.7.2:
+chart.js@chartjs/Chart.js#7c3e934:
version "2.7.2"
- resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-2.7.2.tgz#3c9fde4dc5b95608211bdefeda7e5d33dffa5714"
- integrity sha512-90wl3V9xRZ8tnMvMlpcW+0Yg13BelsGS9P9t0ClaDxv/hdypHDr/YAGf+728m11P5ljwyB0ZHfPKCapZFqSqYA==
+ resolved "https://codeload.github.com/chartjs/Chart.js/tar.gz/7c3e934062c2679d6e06905b342f6432dd7d87f6"
dependencies:
chartjs-color "^2.1.0"
moment "^2.10.2" |
armenzg
added a commit
that referenced
this issue
Oct 12, 2018
Thanks a lot to https://github.com/kojole!!
oh wow! I didn't know you could include a revision from GitHub. I have a PR with your proposed fix and gave you credit in it. |
Also, let me know if you would be interested on contributing. |
No problem if you merge #180. |
Thank you @uu1t ! |
armenzg
added a commit
that referenced
this issue
Oct 15, 2018
Thanks a lot to https://github.com/kojole!!
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In this page (NOTE: Code yet to land) we can see that one of the lines goes to the top of the graph but it looks odd:
Here's the documentation:
http://www.chartjs.org/docs/latest/axes/cartesian/linear.html
If we pass a
max
value to the ticks larger that the highest value for that dataset we get to see the line properly drawn, however, the last two tick labels are too close:A
suggestedMax
of 31000 will extend the Y axis to 35000:We want a generic way to do this.
Here's a diff where I hardcoded the values:
The text was updated successfully, but these errors were encountered: