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

No order in stacked bars mode #534

Closed
funvit opened this issue Jun 25, 2014 · 10 comments
Closed

No order in stacked bars mode #534

funvit opened this issue Jun 25, 2014 · 10 comments

Comments

@funvit
Copy link

funvit commented Jun 25, 2014

2014-06-25 11 14 13

@torkelo
Copy link
Member

torkelo commented Jun 25, 2014

Strange, have not seen that. What datasource are you using? Example of query, etc?

@funvit
Copy link
Author

funvit commented Jun 25, 2014

datasource: influxdb
i use simple query (generated visually):

select  count("value") as "value_count" from "handler.call.src.views.frontside.good.Good" where  time > now() - 1h     group by time(1m)  order asc

and +5 same queries, only "from" differs

@torkelo
Copy link
Member

torkelo commented Jun 26, 2014

ok, I think I understand the issue. This does not happen with Graphite as graphite returns null for missing values. With influxdb you get no values at all if there is no measurement for that time. If there is no point for a specific time (one bar for example) then flotcharts gets confused about bar colors. I either need to insert null values/zero some how (very tricky #471) or try to go into the flotcharts bar rendering and try to understand what is going on.

@funvit
Copy link
Author

funvit commented Jul 11, 2014

I see one easy solution - use metrics order for bars ordering...

@torkelo
Copy link
Member

torkelo commented Jul 11, 2014

Yes, seems like an easy solution. If you have time please try to understand the flotcharts bar rendering, I haven't checked yet how easy this would be to change

@funvit
Copy link
Author

funvit commented Jul 11, 2014

After some code digging, i'm found relation to flotchart stack-rendering bug. flot/flot#1076 which refers to old bug https://code.google.com/p/flot/issues/detail?id=247

So described bug - not grafana bug...

@davidblewett
Copy link

Can this be fixed using the syntax from influxdata/influxdb#713 (using fill(null))? See #471 .

@soichih
Copy link

soichih commented Sep 3, 2014

I am having the same problem.

One work around I found is to add "Lines" under chart option, but set the line width / line fill to be 0 so that there won't be any lines displayed. For some reason, adding "lines" will fix the bar ordering issue. I am using v1.7.0

(update)
Actually, I've noticed something odd with adding "lines" also.. It stops rendering bars in the middle of the graph..

[Without Lines]
before

[With 0-lines]
after

@torkelo
Copy link
Member

torkelo commented Sep 3, 2014

@soichih this is a very hard issue to solve as InfluxDB does not align points (unless group by time is higher then the measure rate), and stacking only works if points align, the reason it works when lines are enabled is that that enables an interpolation for points below but this only partially solves it. If you enable stacking and the first series only have one point then the rest will not show.

I am unsure if this should be fixed in InfluxDB or grafana. It is a no issue for graphite users as graphite knows the measurement rate and can align points and turn missing values to zeros.

See this comment for more info:
#673 (comment)

torkelo added a commit that referenced this issue Sep 4, 2014
…null) option to InfluxDB query editor, also a panel wide group by time option that supports setting a low limit, Fixes issues #673, #674, #534, #743
@torkelo torkelo closed this as completed in c6b1fe5 Sep 4, 2014
@torkelo
Copy link
Member

torkelo commented Sep 4, 2014

This is now solved pretty with a pretty good solution.

fill options can now be used with the editor. You can also select a minimum group by time interval, this should the write rate for metrics (how often new values come in) so that group by time is never below this value. Otherwise fill(0) will insert zeros where there should not be any.

image

There is also a info panel if you click on the links there a detailed help will be shown. To enter a lower limit for group by specify: >60s (if your write rate is 60s)
This is now solved pretty with a pretty good solution.

Please be aware of that master and next release has some breaking changes for InfluxDB users. Read about those here: https://github.com/grafana/grafana/blob/master/CHANGELOG.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants