# Data array multi-component labelling in VTKHDF for Paraview

**URL:** https://discourse.paraview.org/t/data-array-multi-component-labelling-in-vtkhdf-for-paraview/15641
**Category:** ParaView Support
**Tags:** vtk
**Created:** [October 25, 2024, 8:23pm UTC](https://discourse.paraview.org/t/data-array-multi-component-labelling-in-vtkhdf-for-paraview/15641 "2024-10-25T20:23:36Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![jpmorr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jpmorr/32/8745_2.png) [@jpmorr](https://discourse.paraview.org/u/jpmorr)
#### Post date: [October 25, 2024, 8:23pm UTC](https://discourse.paraview.org/t/data-array-multi-component-labelling-in-vtkhdf-for-paraview/15641/1 "2024-10-25T20:23:36Z")

</div>

Named components for `xml` based `vtk` files was discussed here [in this post](https://discourse.paraview.org/t/data-array-multi-component-labelling/8006). Is there an equivalent support for `VTKHDF` files in paraview?

If I just add `ComponentName` attributes to the point or cell data in the hdf file like `xml` format, will it work? I didn’t see it menetioned in the documentation but may have missed it.

---

<div class="post-metadata">

### Author: ![dcthomp](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dcthomp/32/20_2.png) [@dcthomp](https://discourse.paraview.org/u/dcthomp)
#### Post date: [October 26, 2024, 12:10am UTC](https://discourse.paraview.org/t/data-array-multi-component-labelling-in-vtkhdf-for-paraview/15641/2 "2024-10-26T00:10:02Z")

</div>

I see no calls to `SetComponentName()` in the reader, so my guess is that it is not supported yet.

---

<div class="post-metadata">

### Author: ![jpmorr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jpmorr/32/8745_2.png) [@jpmorr](https://discourse.paraview.org/u/jpmorr)
#### Post date: [October 27, 2024, 7:51pm UTC](https://discourse.paraview.org/t/data-array-multi-component-labelling-in-vtkhdf-for-paraview/15641/3 "2024-10-27T19:51:08Z")

</div>

Ok, great thanks for confirming that. Is there a way to overwrite within paraview so it doesn’t have to be done on each legend label every time you change the displayed variable?

It would be very handy if you could edit a table in the settings to set a new default name instead of 0-8.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 28, 2024, 6:24am UTC](https://discourse.paraview.org/t/data-array-multi-component-labelling-in-vtkhdf-for-paraview/15641/4 "2024-10-28T06:24:06Z")

</div>

This indeed look like a small oversight. This should be easy to add though.  
Wdyt @Lucas_Givord ?

---

<div class="post-metadata">

### Author: ![Lucas\_Givord](https://discourse.paraview.org/user_avatar/discourse.paraview.org/lucas_givord/32/6851_2.png) [@Lucas\_Givord](https://discourse.paraview.org/u/Lucas_Givord)
#### Post date: [October 28, 2024, 7:12am UTC](https://discourse.paraview.org/t/data-array-multi-component-labelling-in-vtkhdf-for-paraview/15641/5 "2024-10-28T07:12:02Z")

</div>

probably related to this issue [https://gitlab.kitware.com/vtk/vtk/-/issues/19192](https://gitlab.kitware.com/vtk/vtk/-/issues/19192)

and indeed it should be easy to fix that

---

<div class="post-metadata">

### Author: ![jpmorr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jpmorr/32/8745_2.png) [@jpmorr](https://discourse.paraview.org/u/jpmorr)
#### Post date: [October 29, 2024, 9:33am UTC](https://discourse.paraview.org/t/data-array-multi-component-labelling-in-vtkhdf-for-paraview/15641/6 "2024-10-29T09:33:30Z")

</div>

@Lucas_Givord I think the issue you mentioned only covers the `PointData` and `CellData` attributes in `vtkhdf` but not the `DataArray` attributes? In an xml file you can give both to specify the active scalar vector, etc, but also can set attributes for the array such as name:

```auto
<PointData Scalars="temp" Vectors="force" Tensors="stress" Normals="normals">
        <DataArray Name="torque" NumberOfComponents="3" type="Float64" format="ascii" RangeMin="0.02079884965962986" RangeMax="0.9983199556809254" ComponentName1="xx" ComponentName2="yy" ComponentName3="zz">

```

In the xml case Paraview loads the component names striaght from the file which is very handy. Hopefully vtkhdf will eventually support all of these little features from the existing xml standard.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 30, 2024, 8:02am UTC](https://discourse.paraview.org/t/data-array-multi-component-labelling-in-vtkhdf-for-paraview/15641/7 "2024-10-30T08:02:07Z")

</div>

> [@jpmorr](#):
>
> Paraview loads the component names striaght from the file

Lets create an issue to track that, wdyt @Lucas_Givord ?

---

<div class="post-metadata">

### Author: ![Lucas\_Givord](https://discourse.paraview.org/user_avatar/discourse.paraview.org/lucas_givord/32/6851_2.png) [@Lucas\_Givord](https://discourse.paraview.org/u/Lucas_Givord)
#### Post date: [October 30, 2024, 8:20am UTC](https://discourse.paraview.org/t/data-array-multi-component-labelling-in-vtkhdf-for-paraview/15641/8 "2024-10-30T08:20:45Z")

</div>

> I think the issue you mentioned only covers the `PointData` and `CellData` attributes in `vtkhdf` but not the `DataArray` attributes?

indeed, I open an issue here : [https://gitlab.kitware.com/vtk/vtk/-/issues/19514](https://gitlab.kitware.com/vtk/vtk/-/issues/19514)
