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

Big Number Metric - additional labels #4065

Closed
mathiasrichter opened this issue Jun 2, 2015 · 18 comments
Closed

Big Number Metric - additional labels #4065

mathiasrichter opened this issue Jun 2, 2015 · 18 comments
Labels
discuss Feature:MetricVis Metric visualization feature Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@mathiasrichter
Copy link

I propose to add the possibility for the user to configure multiple labels for the big number metric (instead of the default <> <> label in the bottom.

I propose to add

  • a top label (above the metric),
  • a bottom label (below the metric, where the current default label sits),
  • a before label (horizontally before the number)
  • an after label (horizontally after the number)

Please let me know if this is an acceptable addition (it certainly is for my use cases), as I don't think the code changes are overly complex. I am ready to submit according changes if this is deemed acceptable.

@rashidkpc
Copy link
Contributor

My concern would be how you'd address multiple numbers when using multiple metrics or multi-value metrics. Chances are you wouldn't want the same labels for all of them

@mathiasrichter
Copy link
Author

good point - if labels are under options they would apply to all metrics.

It could still be a valid use case, to specify such labels applicable to all metrics in the same group, and it would be a big step forward for where single metrics are used.

In addition (and that would solve the problem for multiple metrics), we could allow users to specify a “human-readable” field name under “index” -> “fields” -> “controls”. This would already look much nicer on the default bottom label, which then would say, e.g., “Sum of Budget per Projec in CHFt” instead of “Sum of budget_per_project_chf”.

On 02.06.2015, at 22:27, Rashid Khan [email protected] wrote:

My concern would be how you'd address multiple numbers when using multiple metrics or multi-value metrics


Reply to this email directly or view it on GitHub #4065 (comment).

@rashidkpc
Copy link
Contributor

There's a ticket for field aliases here: #1896

@mathiasrichter
Copy link
Author

Ok, so no chance for the labels on the metric itself? Here’s how I would do this in metric_vis.html

{{vis.params.label_top}}
    <div class="metric-value" ng-style="{'font-size': vis.params.fontSize+'pt'}">{{vis.params.label_before}} {{metric.value}} {{vis.params.label_after}}</div>
    <div>{{vis.params.label_bottom}}</div>
</div>

This would obviously repeat the labels for each metric (which I still think could be a valid use case). Could event think about top/bottom label for the whole group…

cheers,

Mat

On 02.06.2015, at 22:50, Rashid Khan [email protected] wrote:

There's a ticket for field aliases here: #1896 #1896

Reply to this email directly or view it on GitHub #4065 (comment).

@rashidkpc
Copy link
Contributor

I think the biggest problem here again, would be labels for the individual charts. I think we need to think about this.

@mathiasrichter
Copy link
Author

Still working my way into understanding the aggregation types and configs but maybe the labels could be parameters on the individual metric aggregation?

On 03.06.2015, at 22:48, Rashid Khan [email protected] wrote:

I think the biggest problem here again, would be labels for the individual charts. I think we need to think about this.


Reply to this email directly or view it on GitHub #4065 (comment).

@acs
Copy link

acs commented Oct 16, 2015

Is it possible to follow the same approach than in filters #2245?

One user defined label per metric and this label is used instead of the automatic one?

@acs
Copy link

acs commented Oct 19, 2015

Hi!

I have done a first implementation. Working now in preparing the pull request.

You can see in this video the feature working:

https://youtu.be/NxD22gKM3fo

As soon as I have the Pull Request, I hope we can review it and improve it.

@mathiasrichter
Copy link
Author

hi

Haven’t looked at the code, just at the video, but I like it!

Looking forward to being able to pull this…

Thanks

Mat

On 19.10.2015, at 19:08, Alvaro del Castillo [email protected] wrote:

Hi!

I have done a first implementation. Working now in preparing the pull request.

You can see in this video the feature working:

https://youtu.be/NxD22gKM3fo https://youtu.be/NxD22gKM3fo
As soon as I have the Pull Request, I hope we can review it and improve it.


Reply to this email directly or view it on GitHub #4065 (comment).

@acs
Copy link

acs commented Oct 19, 2015

@mathiasrichter the pull request is ready #5142 if you give it a try it will be great!

There are still some corners to fix, and probably the data handling could be improved, but overall, I feel comfortable with the design (pretty similar in other places in Kibana).

@acs
Copy link

acs commented Oct 26, 2015

@rashidkpc some recommendation for finding a reviewer for this PR? I have taken a look to current PR and I am not sure about when a reviewer get a PR. Thanks!

@mathiasrichter
Copy link
Author

I like this - I would want the change - however, can't find the branch to pull the code.

@acs
Copy link

acs commented Oct 26, 2015

@mathiasrichter you can test easily using the branch https://github.com/acs/kibana/tree/metric-label

@mathiasrichter
Copy link
Author

perfect, thanks - don’t know why I didn’t find the branch ;-)

thanks for the quick reply, got it on my machine now...

On 26.10.2015, at 22:32, Alvaro del Castillo [email protected] wrote:

@mathiasrichter https://github.com/mathiasrichter you can test easily using the branch https://github.com/acs/kibana/tree/metric-label https://github.com/acs/kibana/tree/metric-label

Reply to this email directly or view it on GitHub #4065 (comment).

@mathiasrichter
Copy link
Author

I am getting the following when trying to start cabana using your branch:

22:43:52:~/Downloads/kibana-metric-label/bin>./kibana

module.js:340
throw err;
^
Error: Cannot find module 'babel/register'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/Users/mrichter/Downloads/kibana-metric-label/src/cli/index.js:1:63)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)

I am new to Babel and don’t know much about RequireJS and tried to install it for RequireJS, but it didn’t do the trick...

On 26.10.2015, at 22:32, Alvaro del Castillo [email protected] wrote:

@mathiasrichter https://github.com/mathiasrichter you can test easily using the branch https://github.com/acs/kibana/tree/metric-label https://github.com/acs/kibana/tree/metric-label

Reply to this email directly or view it on GitHub #4065 (comment).

@acs
Copy link

acs commented Oct 26, 2015

Have you compiled Kibana upstream in your machine and run it? The changes for this feature are few and not related to the kind of errors you have.

@mathiasrichter
Copy link
Author

no, haven't - that's probably it

Vom Handy gesendet / Sent from mobile.

Am 26.10.2015 um 23:44 schrieb Alvaro del Castillo [email protected]:

Have you compiled Kibana upstream in your machine and run it? The changes for this feature are few and not related to the kind of errors you have.


Reply to this email directly or view it on GitHub.

@tbragin tbragin added Feature:MetricVis Metric visualization feature Feature:Visualizations Generic visualization features (in case no more specific feature label is available) labels Jan 5, 2017
@timroes timroes added Team:Visualizations Visualization editors, elastic-charts and infrastructure and removed Feature:Visualizations Generic visualization features (in case no more specific feature label is available) labels Sep 16, 2018
@stratoula
Copy link
Contributor

I am closing this as we don't plan to add more capabilities to the agg based metric. We have added in Lens the new metric which is very powerful and gives the ability to add secondary metric and additional labels

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Feature:MetricVis Metric visualization feature Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

6 participants