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

Multiple values for each bar #141

Closed
wants to merge 1 commit into from
Closed

Conversation

dynaum
Copy link

@dynaum dynaum commented Dec 19, 2012

I modified the bars chart to accept multiple values for each bar.

Why:
I need a graph to tell me the percentage of success and fails for each method per day.

@tiraeth
Copy link
Contributor

tiraeth commented Dec 19, 2012

As far as I know, this is already done by dynaum as stacked bars in #120.

@dynaum
Copy link
Author

dynaum commented Dec 19, 2012

Yes, I did!

But there is a little difference between stacked bars and multiple values.
The stacked bars allow us to join bars per day, for example, to visualise the amount.
But Multiple values allow us to show more info in each bar per day.

@tiraeth
Copy link
Contributor

tiraeth commented Dec 19, 2012

I will look into #120 and try to provide such functionality as an add-on to
stacked bars.

@oesmith
Copy link
Contributor

oesmith commented Dec 20, 2012

Could you implement this feature for your charts using the new hoverCallback feature instead? It's currently undocumented, but see the example in decimals-custom-hover.

I'm not sure this is a common enough use case to justify adding the extra complexity to the core library.

@dynaum
Copy link
Author

dynaum commented Dec 20, 2012

I saw the example but is not what I want, because I show the graph with a table in the page. This is not the case to just have the hover customized. I need to show bars in the same day with more then one value.

@tiraeth
Copy link
Contributor

tiraeth commented Dec 20, 2012

Tomorrow I will introduce a new option to Morris.Bar called accumulate: true|false (default: true). If it's value is true, the chart will look as it looks now (for each data row the upper bound for the bar will be the sum of all series in this row) but if you set it to false, each data row series will get sorted ascending and drew bottom-up so the upper bound will be the maximum for the given row. In this case, you will achieve exactly what you expect to get.

@dynaum
Copy link
Author

dynaum commented Dec 20, 2012

Great! But I am not sure if you understood my problem.

For example we have the follow table:
Screen Shot 2012-12-20 at 4 35 47 PM

So my graph should display the success(# Sucesso) and fail(# Falha) for each method(Método) per day(Data).

Can I have 2 accumulated bars per day?

@oesmith
Copy link
Contributor

oesmith commented Dec 20, 2012

Honestly, my gut reaction is that just isn't a great chart.

I want to keep Morris.js simple, so I'm pushing back on more features recently. If you want to do this with Morris.js, I suggest you find an alternative way of showing that data. Otherwise look at Highcharts or something in the D3 ecosystem.

tiraeth pushed a commit to tiraeth/morris.js that referenced this pull request Dec 31, 2012
@tiraeth
Copy link
Contributor

tiraeth commented Dec 31, 2012

#148 Somehow solves @dynaum's issue, but it requires to have consistent value domain for the whole chart (so no mixing %'s and #'s is allowed).

@oesmith
Copy link
Contributor

oesmith commented Jan 25, 2013

I've rejected this #148, so I'm closing this one too.

@oesmith oesmith closed this Jan 25, 2013
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

Successfully merging this pull request may close these issues.

3 participants