# How the new plugin controller works (metric\_vis)?

**URL:** <https://discuss.elastic.co/t/how-the-new-plugin-controller-works-metric-vis/203049>\
**Category:** Kibana\
**Created:** [October 10, 2019, 2:42pm UTC](https://discuss.elastic.co/t/how-the-new-plugin-controller-works-metric-vis/203049 "2019-10-10T14:42:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![clamarque](https://avatars.discourse-cdn.com/v4/letter/c/a4c791/32.png) [@clamarque](https://discuss.elastic.co/u/clamarque)\
**Post date:** [October 10, 2019, 2:42pm UTC](https://discuss.elastic.co/t/how-the-new-plugin-controller-works-metric-vis/203049/1 "2019-10-10T14:42:09Z")

</div>

Hi ! Im the developer of plugin kibana\_health\_metrics\_vis ([https://github.com/clamarque/kibana\_health\_metric\_vis](https://github.com/clamarque/kibana_health_metric_vis)). My plugin is based on the plugin metric vis. I try to work it on v7.0.0 kibana but don't understand this lines:  
`_processTableGroups(table) { .... const dimensions = this.props.visParams.dimensions; .... }`

Indeed, for me the variable `dimensions` is undefined and when I Launch my plugin, he give a error because he can't define `dimensions`. Can you explain me, how kibana retrieve the variable `dimensions` from visParams ?

Thanks you

---

<div class="post-metadata">

**Author:** ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)\
**Post date:** [October 10, 2019, 8:36pm UTC](https://discuss.elastic.co/t/how-the-new-plugin-controller-works-metric-vis/203049/2 "2019-10-10T20:36:46Z")

</div>

`visParams` is a property passed to the `MetricVisComponent` component.

From the looks of it, there is a factory created with defaults here: [https://github.com/elastic/kibana/blob/master/src/legacy/core\_plugins/vis\_type\_metric/public/metric\_vis\_type.ts#L35](https://github.com/elastic/kibana/blob/master/src/legacy/core_plugins/vis_type_metric/public/metric_vis_type.ts#L35)

Which you can see how it's unwound here: [https://github.com/elastic/kibana/blob/master/src/legacy/ui/public/vis/vis\_types/react\_vis\_type.js#L37-L50](https://github.com/elastic/kibana/blob/master/src/legacy/ui/public/vis/vis_types/react_vis_type.js#L37-L50)

Not sure if it makes a difference, but you might want to check out TSVB. The Metric visualization there provides the ability to specify color rules under the panel options.

---

<div class="post-metadata">

**Author:** ![clamarque](https://avatars.discourse-cdn.com/v4/letter/c/a4c791/32.png) [@clamarque](https://discuss.elastic.co/u/clamarque)\
**Post date:** [October 11, 2019, 7:57am UTC](https://discuss.elastic.co/t/how-the-new-plugin-controller-works-metric-vis/203049/3 "2019-10-11T07:57:18Z")

</div>

So, In logic, kibana pass visParams from herself and this, contain the property 'dimensions' ? Thank for your response

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 8, 2019, 7:57am UTC](https://discuss.elastic.co/t/how-the-new-plugin-controller-works-metric-vis/203049/4 "2019-11-08T07:57:22Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
