Skip to content

Add no-data to linechart #225

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

Merged
merged 1 commit into from
Apr 27, 2016

Conversation

yaacov
Copy link
Contributor

@yaacov yaacov commented Apr 20, 2016

Add "No Data Available" simbol to linechart if no data is available, without this PR it just render an empty div.

With data
screenshot-2016-04-20-10-02-50

No data
screenshot-2016-04-20-10-09-49

@yaacov
Copy link
Contributor Author

yaacov commented Apr 20, 2016

@jeff-phillips-18 @simon3z @zeari please review

@@ -1670,6 +1683,7 @@ angular.module('patternfly.charts').directive('pfHeatmap', ["$compile", "$window
}
$scope.data = {
dataAvailable: true,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yaacov can't you just detect this by the fact that the data is missing?

Copy link
Contributor Author

@yaacov yaacov Apr 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simon3z this is how trend-chart and heat-maps works, so all the cards will behave the same.
If we do it this way, it will just work in manageiq without changing anything :-) [we set the dataAvailable it just does not work].
Doing it by checking the data will need to change the overview in manageIQ.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yaacov ok, it just seems odd to pass an extra flag to signal whether there's data or not.

In the long run you may want to think if it make sense to drop it everywhere (unless I missed a specific use-case).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simon3z the example will not work without it :-)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simon3z the example will not work without it :-)

@yaacov it doesn't sound like an explanation on why it's required. You're just making more evident that there's some code relying on an extra unneeded flag.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We added the flag in the angular patternfly directive so the application could differentiate between an empty dataset vs data unavailable.

Copy link

@zeari zeari Apr 21, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We added the flag in the angular patternfly directive so the application could differentiate between an empty dataset vs data unavailable.

@simon3z if you look into the containers dashboard youll see that a dataAvailable flag is the current standard with these patternfly directives.

This matches the rest of the directives so LGTM

@yaacov
Copy link
Contributor Author

yaacov commented Apr 27, 2016

@jeff-phillips-18 please review

@jeff-phillips-18
Copy link
Member

LGTM

1 similar comment
@dtaylor113
Copy link
Member

LGTM

@dtaylor113 dtaylor113 merged commit 7f9fd72 into patternfly:master Apr 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants