-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Counter Visualization: count rows never shows zero #4265
Comments
Identified on the forum here. |
I'm also experiencing the same issue. It gives the impression that a count on a dashboard has an error in the query when 0 rows returned should be a legitimate result. |
I wrote a fix for this including bunch of unit tests for |
Thank you for taking a look at this.
You need to create a fork on GitHub, push to your fork and make a pull
request from there.
…On Fri, Nov 22, 2019, 01:45 dmudro ***@***.***> wrote:
I wrote a fix for this including bunch of unit tests for
client/app/visualizations/counter/utils.js.
Am not able to push my branch and create the PR though, getting 403. Maybe
@arikfr <https://github.com/arikfr> can advise?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4265?email_source=notifications&email_token=AAAROLGQGGRL5WQOH5JVHX3QU4MTJA5CNFSM4JCGMJEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE4BIRQ#issuecomment-557323334>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAROLCLJQFNNUUWE34ZOIDQU4MTJANCNFSM4JCGMJEA>
.
|
Hi @dmudro thanks for pointing that out, there is #4366 to allow more aggregate functions in the Counter visualization, so the "Count rows" will probably be merged into a "Counter Type" dropdown soon. Regarding the inconvenient non existent value, that seems a bug, I'll investigate further on that as it should either show a placeholder or select a valid column value by default. |
Issue Summary
If I toggle Count Rows and my query returns no results, the visualization disappears. It should show "0". It makes sense for the visualization to disappear if it points at a field and row index. But sometimes the number of rows is actually zero and this should be reflected by the counter.
Steps to Reproduce
SELECT 'foo', 'bar'
WHERE
clause to the query ...where 1 =2
. The counter disappears.Technical details:
The text was updated successfully, but these errors were encountered: