# How to obtain \_type for Canvas?

**URL:** <https://discuss.elastic.co/t/how-to-obtain-type-for-canvas/162907>\
**Category:** Kibana\
**Tags:** canvas\
**Created:** [January 4, 2019, 8:09am UTC](https://discuss.elastic.co/t/how-to-obtain-type-for-canvas/162907 "2019-01-04T08:09:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gyau](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gyau/32/37824_2.png) [@gyau](https://discuss.elastic.co/u/gyau)\
**Post date:** [January 4, 2019, 8:09am UTC](https://discuss.elastic.co/t/how-to-obtain-type-for-canvas/162907/1 "2019-01-04T08:09:02Z")

</div>

Hi! I have 5 different Elasticsearch indices in a Kibana index pattern. I made a pie chart visualization according to their \_type (that's how I distinguish them). Now I'm trying to recreate the same pie chart in Canvas, but Canvas will display all the available columns but the \_type column.

Is there any way to obtain \_type ? maybe lucene query language or ESSQL?

---

<div class="post-metadata">

**Author:** ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)\
**Post date:** [January 4, 2019, 7:30pm UTC](https://discuss.elastic.co/t/how-to-obtain-type-for-canvas/162907/2 "2019-01-04T19:30:40Z")

</div>

Canvas does not support the `_type` field. Mapping types were deprecated in v6.0 and will be removed in v7.0 (see [https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html)).

There's a great example showing how you can create a custom `type` field and re-index your documents here: [https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html#\_custom\_type\_field\_2](https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html#_custom_type_field_2). Then you can use your new custom `type` field with Canvas.

---

<div class="post-metadata">

**Author:** ![gyau](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gyau/32/37824_2.png) [@gyau](https://discuss.elastic.co/u/gyau)\
**Post date:** [January 7, 2019, 8:57am UTC](https://discuss.elastic.co/t/how-to-obtain-type-for-canvas/162907/4 "2019-01-07T08:57:47Z")

</div>

Thanks a lot! I'll just have to create the dashboards, visualizations with the new indices.

---

<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:** [February 4, 2019, 8:57am UTC](https://discuss.elastic.co/t/how-to-obtain-type-for-canvas/162907/5 "2019-02-04T08:57:48Z")

</div>

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