gree / Orion

126 stars 22 forks source link

Bar Graphs? #12

Open mmirabedini opened 11 years ago

mmirabedini commented 11 years ago

Hi there,

Great job on this tool.. Is there anyway to draw mix of bar and line graphs using Orion? I know Highcharts has the ability to do this but would Orion be able to do that as well?

Thanks!

Maz

karankurani commented 11 years ago

Hi Maz,

Thanks for the kind words :) . Currently there is no way to draw bar graphs on Orion. You are correct that high charts has the ability to display them but we havent encountered a compelling use case to use it till now.

Cheers, Karan

mmirabedini commented 11 years ago

Hi Karan,

We're finding special use for that sort of graph for our HBase cluster metrics where we need to draw multiple metrics on the same graph. For example drawing Garbage Collection time versus CPU Used (cpu_system, cpu_user, cpu_io)... Drawing them as line graphs will create confusion since one is percentage and the other one could go in thousands.

Thanks for the response! maz

karankurani commented 11 years ago

Gotcha.

We always welcome contributions/pull requests. :)

pcockwell commented 11 years ago

@mmirabedini Are you looking to have both line and bar graphs in the same one? If they have different Y-axis scales, how do you intend to indicate those values over 2 different scales?

I don't see a reason why bar graphs could not be implemented (I'd even be willing to do that myself if/when i get time), I just don't quite grasp what the end result you are looking for is. Multiple metrics on the same graph, some bar, some line, or just all bar? What about different scale values? Right now if 2 metrics are on completely different scales, even with line graphs, Orion doesn't handle that - they get skewed and the graph looks bad.

Or are you simply looking to have a dashboard with multiple graphs, some of which are bar and some of which are line? That seems a little bit more feasible, and shouldn't be very hard to implement at all.

mmirabedini commented 11 years ago

Hi Patrick,

I looked further into Highcharts and I think in terms of highcharts the correct term to use was "column" type graphs.

We're looking to create a dashboard that has combination of lines graphs, column graphs and some graphs that have both line and columns graphs. In cases where the graph has both line and column graph, we would have two Y-axis. In the example of Garbage Collection and CPU Used... Garbage collection is in milliseconds and CPU Used is in percent and it show it very well.

I created a demo page using PHP and Highcharts that loads data from Graphite and creates the highcharts. I've attached the screenshot. Hope that clears it up.

maz

On Wed, May 15, 2013 at 12:06 PM, Patrick Cockwell <notifications@github.com

wrote:

@mmirabedini https://github.com/mmirabedini Are you looking to have both line and bar graphs in the same one? If they have different Y-axis scales, how do you intend to indicate those values over 2 different scales?

I don't see a reason why bar graphs could not be implemented (I'd even be willing to do that myself if/when i get time), I just don't quite grasp what the end result you are looking for is. Multiple metrics on the same graph, some bar, some line, or just all bar? What about different scale values? Right now if 2 metrics are on completely different scales, even with line graphs, Orion doesn't handle that - they get skewed and the graph looks bad.

Or are you simply looking to have a dashboard with multiple graphs, some of which are bar and some of which are line? That seems a little bit more feasible, and shouldn't be very hard to implement at all.

— Reply to this email directly or view it on GitHubhttps://github.com/gree/Orion/issues/12#issuecomment-17959299 .

pcockwell commented 11 years ago

@mmirabedini

You did not include your screenshot. Regardless though, I've looked into the Highstock api reference and done some playing around. It is possible to do multiple types of series (column and spline) on the same graph. It is also possible to have a as many different Y-Axis and corresponding labels as you have metrics on the graph.

I'm going to get @karankurani to reopen this issue because I think it is something that would be very beneficial and could be done with 6-8 hours of work. I am willing to look into this if you don't have time, but I can't give you a time frame on it's completion (I am a student in university right now).

If you would like to tackle this yourself, let me know and I can give you the references I've looked at to determine how to do this with regards to the graph itself. This would also require a dashboard creation page modification to allow the type of series desired, as well as whether a separate axis should be shown, and if so, what side of the graph it should be on. Beyond that, it will also require some data validation changes to incorporate the new values being sent to the DB. The DB schema would also need to be modified to allow these values to be saved.

mmirabedini commented 11 years ago

ahh..github doesn't support tiff.. I converted it to PNG. Here it is again.

gcmillisvscpu

I just reopen the issue. For now I've gone straight to Highcharts and I'm using my own PHP functions to build the javascript. I'm not sure when I'll get around to adding this but I think other people will definitely benefit from it.

pcockwell commented 11 years ago

Would you like me to work on adding it Orion, or are you going to do so?

mmirabedini commented 11 years ago

I don't think I'll be able to work on it anytime soon. Its up to you. If you can get to it then go for it.

On Wed, May 15, 2013 at 1:19 PM, Patrick Cockwell notifications@github.comwrote:

Would you like me to work on adding it Orion, or are you going to do so?

— Reply to this email directly or view it on GitHubhttps://github.com/gree/Orion/issues/12#issuecomment-17963531 .