-
Notifications
You must be signed in to change notification settings - Fork 47
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
Support for hourly data for precipitation graph. #21
base: master
Are you sure you want to change the base?
Conversation
this.isAnyPrecipitation(minutely))) { | ||
wrapper.appendChild(this.renderPrecipitationGraph()); | ||
this.isAnyPrecipitation(minutely,hourly))) { | ||
wrapper.appendChild(this.renderPrecipitationGraph(minutely?this.weatherData.minutely.data:this.weatherData.hourly.data)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will you please extract the minutely?...
ternary to another line? Also add spaces between all parts for readability.
@@ -195,8 +195,8 @@ Module.register("MMM-forecast-io", { | |||
|
|||
if (this.config.alwaysShowPrecipitationGraph || | |||
(this.config.enablePrecipitationGraph && | |||
this.isAnyPrecipitation(minutely))) { | |||
wrapper.appendChild(this.renderPrecipitationGraph()); | |||
this.isAnyPrecipitation(minutely,hourly))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will you add a space after the comma?
isAnyPrecipitation: function (minutely) { | ||
if (!minutely) { | ||
isAnyPrecipitation: function (minutely,hourly) { | ||
if (!minutely&&!hourly) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add spaces.
return false; | ||
} | ||
var data = this.weatherData.minutely.data; | ||
var data = minutely?this.weatherData.minutely.data:this.weatherData.hourly.data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add spaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this still needs some fixes.
This is an attempt to get the precipitation graph when minutely data are not available.