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

Hole on stacked bar graph #13832

Closed
edum18 opened this issue Oct 25, 2018 · 2 comments
Closed

Hole on stacked bar graph #13832

edum18 opened this issue Oct 25, 2018 · 2 comments

Comments

@edum18
Copy link

edum18 commented Oct 25, 2018

What Grafana version are you using?

Grafana v5.4.0-pre1 (commit: 2c8c509)

What datasource are you using?

Microsoft SQL Server

What OS are you running grafana on?

Windows 10

What did you do?

Created a bar graph with 2 queries to stack them together.

What was the expected result?

Bars with stacked data.

What happened instead?

Everything's fine except that there is a hole on a stacked bar.
Bar graph screenshot:
https://i.imgur.com/B72qvbz.png
I have 2 queries which one has 7 rows and the other has 6 rows. Response screenshot: https://i.imgur.com/ZzIDXJV.png
The second bar shouldn't be floating. If I enable the Percent option it works fine but it's not what I want. I tried switching options on "Null value" too.
Is this possible to fix? Maybe it's because I need to update grafana?
Thank you.

@torkelo
Copy link
Member

torkelo commented Oct 25, 2018

Looks like you have time period with missing data for one of your series. Make sure you have null value set to 0 and you group your data by a time interval with a fill option (0 or null)

$__timeGroup(dateColumn,‘5m’, 0)

@torkelo torkelo closed this as completed Oct 25, 2018
@edum18
Copy link
Author

edum18 commented Oct 26, 2018

In case of anyone with the same problem:
As torkelo said, I fixed it by replacing my date column to $__timeGroup(datecolumn,'24h', 0). Since my query is based on daily data, I used an interval of 24h. After this, setting "Null value" to "null as zero" may help too.

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

No branches or pull requests

2 participants