Closed JamesGalt closed 6 years ago
I'm develop and test on 5.0.0-beta. The plans are to create a parameter that sets the width and number of boxes.
It may come from there, does 5.0.0-beta is stable enough? do you know how to migrate safely from 4.6.3 to 5.0.0? the number of boxes is not set by the groupBY time?
The problem comes from the fact I use a template variable for the groupBY interval so setting box width may come handy to avoid this issue. Are you using the __$interval hard coded in the panel? You can also set the box width by dividing the width of the graph by the length of data. This would make it dynamique so it's the best way I think. (like the bar view in the graph panel)
5.0.0-beta is unstable. I do not recommend yet to be updated, because no return.
Examples of query:
open: SELECT first("open") FROM "ticker" WHERE ("market" =~ /^$market$/ AND "pair" =~ /^$pair$/) AND $timeFilter GROUP BY time($__interval) fill(linear)
close: SELECT last("close") FROM "ticker" WHERE ("market" =~ /^$market$/ AND "pair" =~ /^$pair$/) AND $timeFilter GROUP BY time($__interval) fill(linear)
low: SELECT min("low") FROM "ticker" WHERE ("market" =~ /^$market$/ AND "pair" =~ /^$pair$/) AND $timeFilter GROUP BY time($__interval) fill(linear)
high: SELECT max("high") FROM "ticker" WHERE ("market" =~ /^$market$/ AND "pair" =~ /^$pair$/) AND $timeFilter GROUP BY time($__interval) fill(linear)
volume: SELECT max("volume") FROM "ticker" WHERE ("market" =~ /^$market$/ AND "pair" =~ /^$pair$/) AND $timeFilter GROUP BY time($__interval) fill(linear)
I use the same queries, but it would be great to be able to use custom intervals. so the box width should be calculated using the value in the GROUP BY time(XXX) so it adjusts by itself. Thanks
Hi, Thanks, This is better but is it possible to set it dynamically (panel width / nb data points)? I don't know how it is done in the graph panel but when you select bars drawing it adjusts by itself. Thanks
Auto width by max data points. Candlestick width = panel width / max data points.
I've seen that, but I'm talking about real auto, without setting max data points like in the graph panel
look at the bars they auto adapt. By the way thanks, i really appreciate the work. ;)
Try now autowidth.
Perfect !!!! 🥇
Last thing to be perfect, it should be aligned with the bar graph (I think you center the box and they dont in the bar graph) see screenshot below Impressive work by the way
I dont know why but boxes are two wide see screenshot I'm using Grafana Version 4.6.3 (commit: 7a06a47)
Thanks