CorpGlory/grafana-multibar-graph-panel

Time labels shift

rozetko opened this issue · 25 comments

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?

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

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)?

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)

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

@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

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

its default timezone which i guess is UTC

@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

@rozetko thanks will do now

@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

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

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

@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

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

@nsayedqt seems like this is the reason

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

@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

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

@rozetko sorry dont remember - i just saw it

@nsayedqt no problem

@rozetko any luck reproducing it with MYSQL today?

@nsayedqt we are working on this right now

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