Skip to content

reverts metric visualization#14052

Merged
thomasneirynck merged 6 commits intoelastic:masterfrom
ppisljar:revert/metric
Nov 9, 2017
Merged

reverts metric visualization#14052
thomasneirynck merged 6 commits intoelastic:masterfrom
ppisljar:revert/metric

Conversation

@ppisljar
Copy link
Copy Markdown
Contributor

@ppisljar ppisljar commented Sep 19, 2017

Release Note: The metric visualization now no longer reuses the rendering code of the gauge and goal visualizations. This improves consistency of positioning of the metric on Dashboards.


based on top of tabify response handler for table

@ppisljar ppisljar added the WIP Work in progress label Sep 19, 2017
@trevan
Copy link
Copy Markdown
Contributor

trevan commented Sep 19, 2017

Why are you reverting metric?

@ppisljar
Copy link
Copy Markdown
Contributor Author

There have been a lot of problems with new metric visualization.
The old metric was html based, which means browser took care of things like wrapping in new line or sizing of elements.
The new one is svg based, which means we need to do all that. Taking a step back and looking at current implementation again made me realize we don't really use any of svg features and that metric should probably not use svg but be html based as it was.

@trevan
Copy link
Copy Markdown
Contributor

trevan commented Sep 20, 2017

The new metrics allows splits on aggregations while the old one doesn't. Can you keep that functionality? Some of my metrics use the filters aggregations to show different numbers. I was able to do that with the old one by using the bucket metrics but it was easy to understand with the new metric.

@ppisljar
Copy link
Copy Markdown
Contributor Author

We hope to keep all the functionality, except switching between metric and gauge

@thomasneirynck
Copy link
Copy Markdown
Contributor

jenkins, test this

@ppisljar ppisljar force-pushed the revert/metric branch 2 times, most recently from cadecdc to 0f29527 Compare October 6, 2017 11:31
@ppisljar
Copy link
Copy Markdown
Contributor Author

ppisljar commented Oct 6, 2017

i kept most options, but removed some which make less sense. let me know what you think

screenshot-localhost-5601 2017-10-06 13-30-36-459

@ppisljar ppisljar added Feature:Visualizations Generic visualization features (in case no more specific feature label is available) v6.1.0 v7.0.0 labels Oct 10, 2017
@alexfrancoeur
Copy link
Copy Markdown

alexfrancoeur commented Oct 10, 2017

@ppisljar I just pulled down the latest. Feedback below.

It looks like we're defaulting to percent mode with count when creating a new metric. This seems a bit odd to me, what do you think? I believe defaulting to count without percentage mode is the current experience.

screen shot 2017-10-10 at 12 10 01 pm

Have we done any testing to make sure that metric visualizations created in the last few releases have no issues with the reverted metric?

Quick comparison between configuration options:

Reverted metric viz:
screen shot 2017-10-10 at 12 17 01 pm

5.x configuration:
screen shot 2017-10-10 at 12 17 06 pm

Note: colors can be changed in the legend

I don't see any legend on a metric (which makes sense). Maybe we need to re-introduce the color input box if label and/or background color is chosen and remove this label?

I don't think we need to hide/show legend as it doesn't really make sense to have a legend in the metric viz, however it'd be nice to be able to show/hide labels. In most cases, it's duplicate information that is presented in the title of the visualization. Can we get this configuration back? To me, it's unnecessary to show Count here as a label.

screen shot 2017-10-10 at 12 23 29 pm

This is probably more of an enhancement request. I don't see it in the previous version of metric. It'd be great to add the Vertical split option to a metric

screen shot 2017-10-10 at 12 24 41 pm

Hope this helps!

@ppisljar
Copy link
Copy Markdown
Contributor Author

thanks @alexfrancoeur I added the show labels option back and also made percentage mode disabled by default. This needs more testing (to make sure old visualizations work ok), also more unit tests should be added.

@ppisljar ppisljar force-pushed the revert/metric branch 2 times, most recently from 99dfb99 to 6a14176 Compare October 25, 2017 09:31
Copy link
Copy Markdown
Contributor

@thomasneirynck thomasneirynck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx @ppisljar!

I am in favor of doing this revert for 6.0. I tested this with multiple layouts and setting-combinations.

The flex-based layout works well, and is exactly the behavior we need, especially on dashboards.

This will fix the fitting and margin issues. We also are preserving the coloring options we introduced in v5.

I do understand this needs to be tested, and we have two weeks of QA on this. It should also be easier to address issues in this code-base, which is the same as pre 5.5, and easier to work with than the gauges.

@thomasneirynck
Copy link
Copy Markdown
Contributor

thomasneirynck commented Oct 25, 2017

sorry @ppisljar @alexfrancoeur, it took me a while to look into this in-depth. I think we should get this in v6. A major is an appropriate venue for introducing a new approach like this. In fact, it is not really a "new" approach, we are just redressing the issues introduced in v5 by reusing the old code-base, slightly expanded to include the coloring options.

@alexfrancoeur @timroes Could either of you take a second look? It would be nice if we could pull the trigger on this by the end of this week (yes/no).

@ppisljar ppisljar added review and removed WIP Work in progress labels Oct 26, 2017
@alexfrancoeur
Copy link
Copy Markdown

@thomasneirynck @ppisljar The legend still seems to be missing. There's currently no way to customize a color for a single metric and for ranges.

screen shot 2017-10-31 at 2 20 21 pm

screen shot 2017-10-31 at 2 20 30 pm

@ppisljar
Copy link
Copy Markdown
Contributor Author

@alexfrancoeur i would vote to either:

  • put the legend back so the colors could be customized there
  • not have the ability to change colors (for now) (preferred)

@alexfrancoeur
Copy link
Copy Markdown

@ppisljar I'm fine with punting on custom colors for a metric (without a range) now but can we open an issue to track it so we don't forget to come back and address?

Also, if that's the case - shouldn't we remove the color option from style when one range is selected? Seems a bit odd that I can choose to color something but not the actual color.

screen shot 2017-11-01 at 1 26 35 pm

@thomasneirynck
Copy link
Copy Markdown
Contributor

jenkins, test this

@ppisljar
Copy link
Copy Markdown
Contributor Author

ppisljar commented Nov 9, 2017

@thomasneirynck i added another commit, so the old saved metrics will work with this, do you want to take another look into this ?

@ppisljar
Copy link
Copy Markdown
Contributor Author

ppisljar commented Nov 9, 2017

tilemap tests failling (probably no relation to this PR)

@ppisljar
Copy link
Copy Markdown
Contributor Author

ppisljar commented Nov 9, 2017

jenkins, test this

@thomasneirynck
Copy link
Copy Markdown
Contributor

@ppisljar looks good to me.

The failing tilemap tests are unrelated. It started a couple of days ago. I need to look deeper. Perhaps @jbudz has some more info about this, he looked at it earlier.

@thomasneirynck
Copy link
Copy Markdown
Contributor

jenkins, test this

@thomasneirynck thomasneirynck merged commit 5f1f28b into elastic:master Nov 9, 2017
thomasneirynck pushed a commit to thomasneirynck/kibana that referenced this pull request Nov 9, 2017
Uses the previous html/css rendering code instead of the svg-based rendering for simple metrics.
@thomasneirynck
Copy link
Copy Markdown
Contributor

thomasneirynck commented Nov 27, 2017

thomasneirynck pushed a commit to thomasneirynck/kibana that referenced this pull request Nov 28, 2017
Uses the previous html/css rendering code instead of the svg-based rendering for simple metrics.

This backport required manual edits and js-linting.
thomasneirynck added a commit that referenced this pull request Nov 28, 2017
Uses the previous html/css rendering code instead of the svg-based rendering for simple metrics.

This backport required manual edits and js-linting.
thomasneirynck added a commit to thomasneirynck/kibana that referenced this pull request Nov 28, 2017
Uses the previous html/css rendering code instead of the svg-based rendering for simple metrics.

This backport required manual edits and js-linting.
thomasneirynck added a commit that referenced this pull request Nov 29, 2017
Uses the previous html/css rendering code instead of the svg-based rendering for simple metrics.

This backport required manual edits and js-linting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:Visualizations Generic visualization features (in case no more specific feature label is available) release_note:enhancement v6.1.0 v7.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants