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

Time labels shift #22

Closed
rozetko opened this issue Oct 10, 2018 · 25 comments
Closed

Time labels shift #22

rozetko opened this issue Oct 10, 2018 · 25 comments

Comments

@rozetko
Copy link
Member

rozetko commented Oct 10, 2018

Currently, if you have data grouped by week (for example) - you have time along with time labels shifted (there is 10/16 after 10/8, although it should be 10/15 after 10/8)
Current behaviour:
image
Expected behaviour:
image
@nsayedqt, am I right? Is it the expected behaviour?

@nsayedqt
Copy link

nsayedqt commented Oct 10, 2018 via email

@nsayedqt
Copy link

nsayedqt commented Oct 10, 2018 via email

@rozetko
Copy link
Member Author

rozetko commented Oct 11, 2018

We're implementing it now
Going to generate labels by groups amount (if there are not much of groups - every group would have a label, if there are too many groups - every nth of them would be skipped)
For example:

  • groups here are big enough - we can put label under each of them
    image
  • but groups here are too small - we would skip label under every 2nd one
    image

@nsayedqt
Copy link

Assuming the groups will have option for weekly grouping? Will it also resolve the issue with dates upon hovering on the bars (currently it is not showing correct date)?

@rozetko
Copy link
Member Author

rozetko commented Oct 11, 2018

Hey, @nsayedqt

Let me make it clear:
Grouping is based on datasource response. Plugin doesn't transform data. It is something datasource should handle.

Suppose you have such dataset:
image
It is displayed like this:
image

Also, you can test it here:
http://grafana5.corpglory.com/d/r7Zvhi1ik/multibar
User: guest
Password: tx8yM

I believe you got your data already grouped by MySQL, so that should work in your case.

P.S. Could you please create another issue for tooltips? It would be nice to have more info on it (i.e. tooltip screenshots)

@nsayedqt
Copy link

looks right in your environment, but i need to test in mine. Where can i download the latest code?

@nsayedqt
Copy link

nsayedqt commented Oct 11, 2018

@rozetko ok lets try this again:
This is my query result:
image

this is my graph - x axes ticks are not pointing to correct dates and when i hover over it shows wrong dates as well
image

my data is grouped correctly, query is correct but display is wrong
I hope i am able to convey my issue

@rozetko
Copy link
Member Author

rozetko commented Oct 11, 2018

I'll make a release in half an hour and let you know
About tooltip: seems like timezone problem. What timezone is set in your dashboard? Seems like UTC

@nsayedqt
Copy link

its default timezone which i guess is UTC

rozetko added a commit that referenced this issue Oct 11, 2018
@rozetko
Copy link
Member Author

rozetko commented Oct 11, 2018

@nsayedqt you can install new version as you always do:

cd $GRAFANA_PATH/data/plugins/
wget https://github.com/CorpGlory/grafana-multibar-graph-panel/releases/download/0.1.2/grafana-multibar-graph-panel-0.1.2.tar.gz
tar -zxvf grafana-multibar-graph-panel-0.1.2.tar.gz

And restart Grafana after that

@nsayedqt
Copy link

@rozetko thanks will do now

@nsayedqt
Copy link

@rozetko i dont see any change:
image

infact the date changes when i hover on the bars. See how for 16 Oct, it is showing 15th on one bar, then 16th, then 17th... very confusing.
image

image

@rozetko
Copy link
Member Author

rozetko commented Oct 11, 2018

Did you restart Grafana server after updating plugin?
Seems like Grafana cached an old plugin version
Can you please try to clear cache? F12 (Chrome Dev Tools would be opened) -> Right click on refresh button -> Empty Cache and Hard Reload
image

@nsayedqt
Copy link

nsayedqt commented Oct 11, 2018

@rozetko did that, no change
image
i have another env that i am going to try do a fresh isntall and try

@nsayedqt
Copy link

@rozetko
Tried on a new server, where this plugin was never installed. The x axes is still off though the dates on hovering are correct
image

@nsayedqt
Copy link

@rozetko due you think the plugin (or the ticks) is responding differently for a MYSQL data source?

@rozetko
Copy link
Member Author

rozetko commented Oct 11, 2018

@nsayedqt seems like this is the reason

@rozetko
Copy link
Member Author

rozetko commented Oct 11, 2018

I'll try it with MySQL tomorrow and we'll see

@nsayedqt
Copy link

@rozetko you know whats more scary - when i zoom in, or set time to last 30 or 7 days - the axes becomes zero:
image

image
I dont see that in ur environment

@rozetko
Copy link
Member Author

rozetko commented Oct 11, 2018

About zeroes: did you have the same behaviour with previous plugin versions?

@nsayedqt
Copy link

@rozetko sorry dont remember - i just saw it

@rozetko
Copy link
Member Author

rozetko commented Oct 11, 2018

@nsayedqt no problem

@nsayedqt
Copy link

@rozetko any luck reproducing it with MYSQL today?

@jonyrock
Copy link
Member

@nsayedqt we are working on this right now

@rozetko
Copy link
Member Author

rozetko commented Oct 12, 2018

Hey, @nsayedqt! Tested with MySQL and got the same result
image
Let's wait until you test it with the new 0.1.3 version

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

3 participants